TP_JO2024/home/dist/component/modal/modal.nomodule.min.js.map
2024-03-27 17:19:37 +01:00

1 line
No EOL
23 KiB
Text

{"version":3,"file":"modal.nomodule.min.js","sources":["../../../.config/config.js","../../../src/core/api.js","../../../src/component/modal/script/modal/modal-selector.js","../../../src/component/modal/script/modal/modal-button.js","../../../src/component/modal/script/modal/modal-attribute.js","../../../src/component/modal/script/modal/modal.js","../../../src/component/modal/script/modal/focus-trap.js","../../../src/component/modal/script/modal/modals-group.js","../../../src/component/modal/script/modal/modal-body.js","../../../src/component/modal/index.js","../../../src/component/modal/main.js"],"sourcesContent":["const config = {\r\n prefix: 'fr',\r\n namespace: 'dsfr',\r\n organisation: '@gouvfr',\r\n version: '1.11.2'\r\n};\r\n\r\nexport default config;\r\n","import config from './config.js';\nconst api = window[config.namespace];\nexport default api;\n","import api from '../../api.js';\n\nexport const ModalSelector = {\n MODAL: api.internals.ns.selector('modal'),\n SCROLL_DIVIDER: api.internals.ns.selector('scroll-divider'),\n BODY: api.internals.ns.selector('modal__body'),\n TITLE: api.internals.ns.selector('modal__title')\n};\n","import api from '../../api.js';\n\nclass ModalButton extends api.core.DisclosureButton {\n constructor () {\n super(api.core.DisclosureType.OPENED);\n }\n\n static get instanceClassName () {\n return 'ModalButton';\n }\n}\n\nexport { ModalButton };\n","import api from '../../api';\n\nexport const ModalAttribute = {\n CONCEALING_BACKDROP: api.internals.ns.attr('concealing-backdrop')\n};\n","import api from '../../api.js';\nimport { ModalSelector } from './modal-selector.js';\nimport { ModalButton } from './modal-button.js';\nimport { ModalAttribute } from './modal-attribute';\n\nclass Modal extends api.core.Disclosure {\n constructor () {\n super(api.core.DisclosureType.OPENED, ModalSelector.MODAL, ModalButton, 'ModalsGroup');\n this._isActive = false;\n this.scrolling = this.resize.bind(this, false);\n this.resizing = this.resize.bind(this, true);\n }\n\n static get instanceClassName () {\n return 'Modal';\n }\n\n init () {\n super.init();\n this._isDialog = this.node.tagName === 'DIALOG';\n this.isScrolling = false;\n this.listenClick();\n this.addEmission(api.core.RootEmission.KEYDOWN, this._keydown.bind(this));\n }\n\n _keydown (keyCode) {\n switch (keyCode) {\n case api.core.KeyCodes.ESCAPE:\n this._escape();\n break;\n }\n }\n\n // TODO v2 : passer les tagName d'action en constante\n _escape () {\n const tagName = document.activeElement ? document.activeElement.tagName : undefined;\n\n switch (tagName) {\n case 'INPUT':\n case 'LABEL':\n case 'TEXTAREA':\n case 'SELECT':\n case 'AUDIO':\n case 'VIDEO':\n break;\n\n default:\n if (this.isDisclosed) {\n this.conceal();\n this.focus();\n }\n }\n }\n\n retrieved () {\n this._ensureAccessibleName();\n }\n\n get body () {\n return this.element.getDescendantInstances('ModalBody', 'Modal')[0];\n }\n\n handleClick (e) {\n if (e.target === this.node && this.getAttribute(ModalAttribute.CONCEALING_BACKDROP) !== 'false') this.conceal();\n }\n\n disclose (withhold) {\n if (!super.disclose(withhold)) return false;\n if (this.body) this.body.activate();\n this.isScrollLocked = true;\n this.setAttribute('aria-modal', 'true');\n this.setAttribute('open', 'true');\n if (!this._isDialog) {\n this.activateModal();\n }\n return true;\n }\n\n conceal (withhold, preventFocus) {\n if (!super.conceal(withhold, preventFocus)) return false;\n this.isScrollLocked = false;\n this.removeAttribute('aria-modal');\n this.removeAttribute('open');\n if (this.body) this.body.deactivate();\n if (!this._isDialog) {\n this.deactivateModal();\n }\n return true;\n }\n\n get isDialog () {\n return this._isDialog;\n }\n\n set isDialog (value) {\n this._isDialog = value;\n }\n\n activateModal () {\n if (this._isActive) return;\n this._isActive = true;\n this._hasDialogRole = this.getAttribute('role') === 'dialog';\n if (!this._hasDialogRole) this.setAttribute('role', 'dialog');\n }\n\n deactivateModal () {\n if (!this._isActive) return;\n this._isActive = false;\n if (!this._hasDialogRole) this.removeAttribute('role');\n }\n\n _setAccessibleName (node, append) {\n const id = this.retrieveNodeId(node, append);\n this.warn(`add reference to ${append} for accessible name (aria-labelledby)`);\n this.setAttribute('aria-labelledby', id);\n }\n\n _ensureAccessibleName () {\n if (this.hasAttribute('aria-labelledby') || this.hasAttribute('aria-label')) return;\n this.warn('missing accessible name');\n const title = this.node.querySelector(ModalSelector.TITLE);\n const primary = this.primaryButtons[0];\n\n switch (true) {\n case title !== null:\n this._setAccessibleName(title, 'title');\n break;\n\n case primary !== undefined:\n this.warn('missing required title, fallback to primary button');\n this._setAccessibleName(primary, 'primary');\n break;\n }\n }\n}\n\nexport { Modal };\n","import api from '../../api.js';\n\nconst unordereds = [\n '[tabindex=\"0\"]',\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n 'details>summary:first-of-type',\n 'details',\n 'iframe'\n];\n\nconst UNORDEREDS = unordereds.join();\n\nconst ordereds = [\n '[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])'\n];\n\nconst ORDEREDS = ordereds.join();\n\nconst IS_STUNNING = false;\n\nconst isFocusable = (element, container) => {\n if (!(element instanceof Element)) return false;\n const style = window.getComputedStyle(element);\n if (!style) return false;\n if (style.visibility === 'hidden') return false;\n if (container === undefined) container = element;\n\n while (container.contains(element)) {\n if (style.display === 'none') return false;\n element = element.parentElement;\n }\n\n return true;\n};\n\nclass FocusTrap {\n constructor (onTrap, onUntrap) {\n this.element = null;\n this.activeElement = null;\n this.onTrap = onTrap;\n this.onUntrap = onUntrap;\n this.waiting = this.wait.bind(this);\n this.handling = this.handle.bind(this);\n this.focusing = this.maintainFocus.bind(this);\n this.current = null;\n }\n\n get trapped () { return this.element !== null; }\n\n trap (element) {\n if (this.trapped) this.untrap();\n\n this.element = element;\n this.isTrapping = true;\n this.wait();\n\n if (this.onTrap) this.onTrap();\n }\n\n wait () {\n if (!isFocusable(this.element)) {\n window.requestAnimationFrame(this.waiting);\n return;\n }\n\n this.trapping();\n }\n\n trapping () {\n if (!this.isTrapping) return;\n this.isTrapping = false;\n const focusables = this.focusables;\n if (focusables.length && focusables.indexOf(document.activeElement) === -1) focusables[0].focus();\n this.element.setAttribute('aria-modal', true);\n window.addEventListener('keydown', this.handling);\n document.body.addEventListener('focus', this.focusing, true);\n\n if (IS_STUNNING) {\n this.stunneds = [];\n this.stun(document.body);\n }\n }\n\n stun (node) {\n for (const child of node.children) {\n if (child === this.element) continue;\n if (child.contains(this.element)) {\n this.stun(child);\n continue;\n }\n this.stunneds.push(new Stunned(child));\n }\n }\n\n maintainFocus (event) {\n if (!this.element.contains(event.target)) {\n const focusables = this.focusables;\n if (focusables.length === 0) return;\n const first = focusables[0];\n event.preventDefault();\n first.focus();\n }\n }\n\n handle (e) {\n if (e.keyCode !== 9) return;\n\n const focusables = this.focusables;\n if (focusables.length === 0) return;\n\n const first = focusables[0];\n const last = focusables[focusables.length - 1];\n\n const index = focusables.indexOf(document.activeElement);\n\n if (e.shiftKey) {\n if (!this.element.contains(document.activeElement) || index < 1) {\n e.preventDefault();\n last.focus();\n } else if (document.activeElement.tabIndex > 0 || focusables[index - 1].tabIndex > 0) {\n e.preventDefault();\n focusables[index - 1].focus();\n }\n } else {\n if (!this.element.contains(document.activeElement) || index === focusables.length - 1 || index === -1) {\n e.preventDefault();\n first.focus();\n } else if (document.activeElement.tabIndex > 0) {\n e.preventDefault();\n focusables[index + 1].focus();\n }\n }\n }\n\n get focusables () {\n let unordereds = api.internals.dom.querySelectorAllArray(this.element, UNORDEREDS);\n\n /**\n * filtrage des radiobutttons de même name (la navigations d'un groupe de radio se fait à la flèche et non pas au tab\n **/\n const radios = api.internals.dom.querySelectorAllArray(document.documentElement, 'input[type=\"radio\"]');\n\n if (radios.length) {\n const groups = {};\n\n for (const radio of radios) {\n const name = radio.getAttribute('name');\n if (groups[name] === undefined) groups[name] = new RadioButtonGroup(name);\n groups[name].push(radio);\n }\n\n unordereds = unordereds.filter((unordered) => {\n if (unordered.tagName.toLowerCase() !== 'input' || unordered.getAttribute('type').toLowerCase() !== 'radio') return true;\n const name = unordered.getAttribute('name');\n return groups[name].keep(unordered);\n });\n }\n\n const ordereds = api.internals.dom.querySelectorAllArray(this.element, ORDEREDS);\n\n ordereds.sort((a, b) => a.tabIndex - b.tabIndex);\n\n const noDuplicates = unordereds.filter((element) => ordereds.indexOf(element) === -1);\n const concateneds = ordereds.concat(noDuplicates);\n return concateneds.filter((element) => element.tabIndex !== '-1' && isFocusable(element, this.element));\n }\n\n untrap () {\n if (!this.trapped) return;\n this.isTrapping = false;\n\n this.element.removeAttribute('aria-modal');\n window.removeEventListener('keydown', this.handling);\n document.body.removeEventListener('focus', this.focusing, true);\n\n this.element = null;\n\n if (IS_STUNNING) {\n for (const stunned of this.stunneds) stunned.unstun();\n this.stunneds = [];\n }\n\n if (this.onUntrap) this.onUntrap();\n }\n\n dispose () {\n this.untrap();\n }\n}\n\nclass Stunned {\n constructor (element) {\n this.element = element;\n // this.hidden = element.getAttribute('aria-hidden');\n this.inert = element.getAttribute('inert');\n\n // this.element.setAttribute('aria-hidden', true);\n this.element.setAttribute('inert', '');\n }\n\n unstun () {\n /*\n if (this.hidden === null) this.element.removeAttribute('aria-hidden');\n else this.element.setAttribute('aria-hidden', this.hidden);\n */\n\n if (this.inert === null) this.element.removeAttribute('inert');\n else this.element.setAttribute('inert', this.inert);\n }\n}\n\nclass RadioButtonGroup {\n constructor (name) {\n this.name = name;\n this.buttons = [];\n }\n\n push (button) {\n this.buttons.push(button);\n if (button === document.activeElement || button.checked || this.selected === undefined) this.selected = button;\n }\n\n keep (button) {\n return this.selected === button;\n }\n}\n\nexport { FocusTrap };\n","import api from '../../api.js';\nimport { FocusTrap } from './focus-trap.js';\n\nclass ModalsGroup extends api.core.DisclosuresGroup {\n constructor () {\n super('Modal', false);\n this.focusTrap = new FocusTrap();\n }\n\n static get instanceClassName () {\n return 'ModalsGroup';\n }\n\n apply (value, initial) {\n super.apply(value, initial);\n if (this.current === null) this.focusTrap.untrap();\n else this.focusTrap.trap(this.current.node);\n }\n}\n\nexport { ModalsGroup };\n","import api from '../../api.js';\nimport { ModalSelector } from './modal-selector.js';\n\nconst OFFSET = 32; // 32px => 8v => 2rem\n\nclass ModalBody extends api.core.Instance {\n static get instanceClassName () {\n return 'ModalBody';\n }\n\n init () {\n this.listen('scroll', this.divide.bind(this));\n }\n\n activate () {\n this.isResizing = true;\n this.resize();\n }\n\n deactivate () {\n this.isResizing = false;\n }\n\n divide () {\n if (this.node.scrollHeight > this.node.clientHeight) {\n if (this.node.offsetHeight + this.node.scrollTop >= this.node.scrollHeight) {\n this.removeClass(ModalSelector.SCROLL_DIVIDER);\n } else {\n this.addClass(ModalSelector.SCROLL_DIVIDER);\n }\n } else {\n this.removeClass(ModalSelector.SCROLL_DIVIDER);\n }\n }\n\n resize () {\n this.adjust();\n this.request(this.adjust.bind(this));\n }\n\n adjust () {\n const offset = OFFSET * (this.isBreakpoint(api.core.Breakpoints.MD) ? 2 : 1);\n if (this.isLegacy) this.style.maxHeight = `${window.innerHeight - offset}px`;\n else this.style.setProperty('--modal-max-height', `${window.innerHeight - offset}px`);\n this.divide();\n }\n}\n\nexport { ModalBody };\n","import api from './api.js';\n\nimport { Modal } from './script/modal/modal.js';\nimport { ModalButton } from './script/modal/modal-button.js';\nimport { ModalsGroup } from './script/modal/modals-group.js';\nimport { ModalBody } from './script/modal/modal-body.js';\nimport { ModalSelector } from './script/modal/modal-selector.js';\n\napi.modal = {\n Modal: Modal,\n ModalButton: ModalButton,\n ModalBody: ModalBody,\n ModalsGroup: ModalsGroup,\n ModalSelector: ModalSelector\n};\n\nexport default api;\n","import api from './index.js';\n\napi.internals.register(api.modal.ModalSelector.MODAL, api.modal.Modal);\napi.internals.register(api.modal.ModalSelector.BODY, api.modal.ModalBody);\napi.internals.register(api.core.RootSelector.ROOT, api.modal.ModalsGroup);\n\nexport default api;\n"],"names":["const","api","window","ModalSelector","MODAL","internals","ns","selector","SCROLL_DIVIDER","BODY","TITLE","ModalButton","super","core","DisclosureType","OPENED","staticAccessors","instanceClassName","DisclosureButton","ModalAttribute","CONCEALING_BACKDROP","attr","Modal","this","_isActive","scrolling","resize","bind","resizing","init","_isDialog","node","tagName","isScrolling","listenClick","addEmission","RootEmission","KEYDOWN","_keydown","keyCode","KeyCodes","ESCAPE","_escape","document","activeElement","undefined","isDisclosed","conceal","focus","retrieved","_ensureAccessibleName","prototypeAccessors","body","element","getDescendantInstances","handleClick","e","target","getAttribute","disclose","withhold","activate","isScrollLocked","setAttribute","activateModal","preventFocus","removeAttribute","deactivate","deactivateModal","isDialog","value","_hasDialogRole","_setAccessibleName","append","id","retrieveNodeId","warn","hasAttribute","title","querySelector","primary","primaryButtons","Disclosure","UNORDEREDS","join","ORDEREDS","isFocusable","container","Element","style","getComputedStyle","visibility","contains","display","parentElement","FocusTrap","onTrap","onUntrap","waiting","wait","handling","handle","focusing","maintainFocus","current","trapped","trap","untrap","isTrapping","trapping","requestAnimationFrame","focusables","length","indexOf","addEventListener","stun","children","child","stunneds","push","Stunned","event","first","preventDefault","last","index","shiftKey","tabIndex","unordereds","dom","querySelectorAllArray","radios","documentElement","groups","radio","name","RadioButtonGroup","filter","unordered","toLowerCase","keep","ordereds","sort","a","b","noDuplicates","concat","removeEventListener","dispose","inert","unstun","buttons","button","checked","selected","ModalsGroup","focusTrap","apply","initial","DisclosuresGroup","ModalBody","listen","divide","isResizing","scrollHeight","clientHeight","offsetHeight","scrollTop","removeClass","addClass","adjust","request","offset","isBreakpoint","Breakpoints","MD","isLegacy","maxHeight","innerHeight","setProperty","Instance","modal","register","RootSelector","ROOT"],"mappings":";yBAAAA,ICCMC,EAAMC,OAAuB,KCCtBC,EAAgB,CAC3BC,MAAOH,EAAII,UAAUC,GAAGC,SAAS,SACjCC,eAAgBP,EAAII,UAAUC,GAAGC,SAAS,kBAC1CE,KAAMR,EAAII,UAAUC,GAAGC,SAAS,eAChCG,MAAOT,EAAII,UAAUC,GAAGC,SAAS,iBCJ7BI,cACJ,aACEC,YAAMX,EAAIY,KAAKC,eAAeC,kJAGhCC,EAAWC,iCACT,MAAO,+CANeh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