@genesislcap/design-system-configurator 14.373.2-MX-499.4 → 14.373.2-MX-499-LIST.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/151.151.0a43fc3e6414436d844f.js +2 -0
- package/dist/151.df7f6c518aba4dc761325e73decb24ee.js.map +1 -0
- package/dist/227.091b797b296b199e6c46dc176a8c7401.js.map +1 -0
- package/dist/227.227.7bbe4753e644f6b4337e.js +3 -0
- package/dist/242.242.43bdc8eeffbc0b42c358.js +786 -0
- package/dist/242.3f2d1c0429112a375ce6af7d9b77101d.js.map +1 -0
- package/dist/29.0a1ece57d1b5ca67cd47edb954da1bcc.js.map +1 -0
- package/dist/29.29.7e95d12d2aaf21c03e0d.js +4794 -0
- package/dist/347.347.07dc76528ef935608a82.js +2 -0
- package/dist/347.dc20c3579c9073997e093bb6d65c2cde.js.map +1 -0
- package/dist/417.145fa1c3801452bd5746b628ab30a25f.js.map +1 -0
- package/dist/{601.601.9cccf3a26bdb9622aa21.js → 417.417.b9aa1af5e028e65b7fdc.js} +59 -59
- package/dist/{759.759.43ca2d2aa2ae607d2aa4.js → 445.445.75bcad5095c175e4a251.js} +241 -252
- package/dist/445.c6daee010fbecacac70859b2a968ea96.js.map +1 -0
- package/dist/{445.445.97400d0ba7e0ccc6e672.js → 588.588.b954832e0228557f5751.js} +3 -3
- package/dist/{445.f33bfdd3c7659b76b08f8106d436c540.js.map → 588.7048bd4bd0c3f3085dddf60a28cf09e4.js.map} +1 -1
- package/dist/{705.6967cc91e1cb96bab531a53a432aa26a.js.map → 714.65811bc86f4924fc0def931673ca1576.js.map} +1 -1
- package/dist/714.714.4bfc6425e1dbfb7c70c2.js +2 -0
- package/dist/{826.826.9f5e19d2e8bc3c3cdc0d.js → 826.826.117e2d8d8da71c18415f.js} +2 -2
- package/dist/969.969.1e3cc8f2cd0c178eb059.js +5751 -0
- package/dist/969.f322fa1f3c643f5d5aac2658eabdca4c.js.map +1 -0
- package/dist/designSystemConfigurator.daea382a463cb47dd5f44aeccf1b76e3.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/main.4cde47e464a6367c190b4e2dc772a38a.js.map +1 -0
- package/dist/main.6db3cb2b53a1e19ba62c.js +2 -0
- package/dist/remoteEntry.js +2 -2
- package/package.json +13 -13
- package/dist/110.110.ddf26ae506131bab2ddd.js +0 -131
- package/dist/110.7e20a2b648d2484216f576ee3373601f.js.map +0 -1
- package/dist/359.3251e92dacbbae50c0067b447f49a688.js.map +0 -1
- package/dist/359.359.f5900b37a97ff746d4bd.js +0 -2
- package/dist/374.374.68d0546328c19292b57c.js +0 -5146
- package/dist/374.685ab5ac9960c62b024f7ede813aad67.js.map +0 -1
- package/dist/382.382.70135d77dc896dededa8.js +0 -13
- package/dist/382.7d8d80f08d8a7e2b06467366ed231a1c.js.map +0 -1
- package/dist/535.3ce19bad0d5e4b228991b85c6e7f0b75.js.map +0 -1
- package/dist/535.535.efe402e29cac1d3bacc6.js +0 -775
- package/dist/601.feefbfc2292c53dfcb6055ca19fe6883.js.map +0 -1
- package/dist/705.705.db7257000f97995fb284.js +0 -2
- package/dist/759.0c1fcd0684d1c65e1315b922ca4c2159.js.map +0 -1
- package/dist/835.09a2c98d7d68ff7f030a208135bbf812.js.map +0 -1
- package/dist/835.835.c45b1173559d79231a6b.js +0 -2
- package/dist/876.4b1a1261b019a55b536b90f1701ffb4e.js.map +0 -1
- package/dist/876.876.f9ed60559e9b619baa5d.js +0 -5751
- package/dist/887.012016c575e29126a68b2a4fe70a8cb7.js.map +0 -1
- package/dist/887.887.b672b67e697a8aa461e1.js +0 -3
- package/dist/designSystemConfigurator.d463ad86672fb0fdcc6c89219a1e0549.js.map +0 -1
- package/dist/main.52f9d7e8a5147ea36882308d288f2ba8.js.map +0 -1
- package/dist/main.a1565d24805b6094992a.js +0 -2
- package/dist/npm.numeral.08cacf3f8d341ee2ecc5043544e76673.js.map +0 -1
- package/dist/npm.numeral.74.6985f31d5772375ef0c8.js +0 -3
- package/dist/npm.numeral.74.6985f31d5772375ef0c8.js.LICENSE.txt +0 -14
- /package/dist/{887.887.b672b67e697a8aa461e1.js.LICENSE.txt → 227.227.7bbe4753e644f6b4337e.js.LICENSE.txt} +0 -0
- /package/dist/{445.445.97400d0ba7e0ccc6e672.js.LICENSE.txt → 588.588.b954832e0228557f5751.js.LICENSE.txt} +0 -0
- /package/dist/{826.826.9f5e19d2e8bc3c3cdc0d.js.LICENSE.txt → 826.826.117e2d8d8da71c18415f.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see
|
|
2
|
-
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[
|
|
3
|
-
//# sourceMappingURL=
|
|
1
|
+
/*! For license information please see 588.588.b954832e0228557f5751.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[588,826],{27445:(e,t,n)=>{function r(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,{S:()=>r})},64660:(e,t,n)=>{n.d(t,{AO:()=>p,tp:()=>g});var r=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],o=r.join(","),i="undefined"==typeof Element,a=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,u=!i&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},c=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},l=function(e){return"INPUT"===e.tagName},d=function(e){return function(e){return l(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||u(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},s=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},f=function(e,t){return!(t.disabled||function(e){return l(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=a.call(e,"details>summary:first-of-type")?e.parentElement:e;if(a.call(o,"details:not([open]) *"))return!0;var i=u(e).host,c=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return s(e)}else{if("function"==typeof r){for(var l=e;e;){var d=e.parentElement,f=u(e);if(d&&!d.shadowRoot&&!0===r(d))return s(e);e=e.assignedSlot?e.assignedSlot:d||f===e.ownerDocument?d:f.host}e=l}if(c)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!a.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},m=function(e,t){return!(d(t)||c(t)<0||!f(e,t))},p=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,o)&&m(t,e)},h=r.concat("iframe").join(","),g=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,h)&&f(t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9C,EAAMZ,IAIhBgF,EAA+B/B,EAASrC,EACjD,EAEIuE,EAA4CpF,EAAmBqF,OAAO,UAAUnF,KAAK,KAErFoF,EAAc,SAAqBzE,EAAMqC,GAG3C,GAFAA,EAAUA,GAAW,CAAC,GAEjBrC,EACH,MAAM,IAAIsE,MAAM,oBAGlB,OAAuD,IAAnD9E,EAAQsD,KAAK9C,EAAMuE,IAIhBnC,EAAgCC,EAASrC,EAClD,C","sources":["webpack://@genesislcap/design-system-configurator/../../../node_modules/exenv-es6/dist/can-use-dom.js","webpack://@genesislcap/design-system-configurator/../../../node_modules/tabbable/dist/index.esm.js"],"sourcesContent":["/**\n * Checks if the DOM is available to access and use\n */\nexport function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n","/*!\n* tabbable 5.3.3\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\nvar candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])', 'details>summary:first-of-type', 'details'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n return element.getRootNode();\n} : function (element) {\n return element.ownerDocument;\n};\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\n\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n\n candidates = candidates.filter(filter);\n return candidates;\n};\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\n\n\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n } // iterate over shadow content if possible\n\n\n var shadowRoot = element.shadowRoot || // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);\n\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n\n return candidates;\n};\n\nvar getTabindex = function getTabindex(node, isScope) {\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n //\n // isScope is positive for custom element with shadow root or slot that by default\n // have tabIndex -1, but need to be sorted by document order in order for their\n // content to be inserted in the correct position\n if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {\n return 0;\n }\n }\n\n return node.tabIndex;\n};\n\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\n\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\n\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\n\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\n\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\n\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n\n var radioScope = node.form || getRootNode(node);\n\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n\n var radioSet;\n\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\n\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\n\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n\n return width === 0 && height === 0;\n};\n\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n } // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n\n\n var nodeRootHost = getRootNode(node).host;\n var nodeIsAttached = (nodeRootHost === null || nodeRootHost === void 0 ? void 0 : nodeRootHost.ownerDocument.contains(nodeRootHost)) || node.ownerDocument.contains(node);\n\n if (!displayCheck || displayCheck === 'full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n\n node = originalNode;\n } // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n\n if (nodeIsAttached) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n } // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n } // visible, as far as we can tell, or per current `displayCheck` mode\n\n\n return false;\n}; // form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\n\n\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement; // check if `node` is contained in a disabled <fieldset>\n\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i); // when the first <legend> (in document order) is found\n\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n } // the disabled <fieldset> containing `node` has no <legend>\n\n\n return true;\n }\n\n parentNode = parentNode.parentElement;\n }\n } // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n\n\n return false;\n};\n\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n\n return true;\n};\n\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n\n return true;\n};\n\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n } // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n\n\n return false;\n};\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\n\n\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scope;\n var element = isScope ? item.scope : item;\n var candidateTabindex = getTabindex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\n\nvar tabbable = function tabbable(el, options) {\n options = options || {};\n var candidates;\n\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([el], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n\n return sortByOrder(candidates);\n};\n\nvar focusable = function focusable(el, options) {\n options = options || {};\n var candidates;\n\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([el], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n\n return candidates;\n};\n\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n\n if (!node) {\n throw new Error('No node provided');\n }\n\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n\n return isNodeMatchingSelectorTabbable(options, node);\n};\n\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\n\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n\n if (!node) {\n throw new Error('No node provided');\n }\n\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["canUseDOM","window","document","createElement","candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","ownerDocument","getTabindex","node","isScope","tabIndex","test","tagName","isContentEditable","isNaN","parseInt","getAttribute","isInput","isNonTabbableRadio","type","isRadio","name","radioSet","radioScope","form","queryRadios","querySelectorAll","CSS","escape","err","console","error","message","checked","nodes","i","length","getCheckedRadio","isTabbableRadio","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isNodeMatchingSelectorFocusable","options","disabled","isHiddenInput","_ref","displayCheck","getShadowRoot","getComputedStyle","visibility","nodeUnderDetails","call","parentElement","nodeRootHost","host","nodeIsAttached","contains","originalNode","rootNode","shadowRoot","assignedSlot","getClientRects","isHidden","Array","slice","apply","children","some","child","isDetailsWithSummary","parentNode","item","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isTabbable","Error","focusableCandidateSelector","concat","isFocusable"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"588.588.xxxxxxxxxxxxxxxxxxxx.js","mappings":";sKAGO,SAASA,IACZ,QAA4B,oBAAXC,SAA0BA,OAAOC,WAAYD,OAAOC,SAASC,cAClF,C,6DCDA,IAAIC,EAAqB,CAAC,QAAS,SAAU,WAAY,UAAW,SAAU,uBAAwB,kBAAmB,kBAAmB,mDAAoD,gCAAiC,WAC7NC,EAAmCD,EAAmBE,KAAK,KAC3DC,EAA+B,oBAAZC,QACnBC,EAAUF,EAAY,WAAa,EAAIC,QAAQE,UAAUD,SAAWD,QAAQE,UAAUC,mBAAqBH,QAAQE,UAAUE,sBAC7HC,GAAeN,GAAaC,QAAQE,UAAUG,YAAc,SAAUC,GACxE,OAAOA,EAAQD,aACjB,EAAI,SAAUC,GACZ,OAAOA,EAAQC,aACjB,EAoHIC,EAAc,SAAqBC,EAAMC,GAC3C,OAAID,EAAKE,SAAW,IAYbD,GAAW,0BAA0BE,KAAKH,EAAKI,UAAYJ,EAAKK,oBAAsBC,MAAMC,SAASP,EAAKQ,aAAa,YAAa,KAChI,EAIJR,EAAKE,QACd,EAMIO,EAAU,SAAiBT,GAC7B,MAAwB,UAAjBA,EAAKI,OACd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,EAAQsD,KAAKmB,EAAY,0BAAkCF,EAAMZ,SAASnD,EAErF,CAGA,OAAO,CACT,CAEAiE,EAAaA,EAAWlB,aAC1B,CAKF,OAAO,CACT,CAIgCoB,CAAuBnE,GAKvD,EAEIoE,EAAiC,SAAwC/B,EAASrC,GACpF,QAAIU,EAAmBV,IAASD,EAAYC,GAAQ,IAAMoC,EAAgCC,EAASrC,GAKrG,EAiFIqE,EAAa,SAAoBrE,EAAMqC,GAGzC,GAFAA,EAAUA,GAAW,CAAC,GAEjBrC,EACH,MAAM,IAAIsE,MAAM,oBAGlB,OAA8C,IAA1C9E,EAAQsD,KAAK9C,EAAMZ,IAIhBgF,EAA+B/B,EAASrC,EACjD,EAEIuE,EAA4CpF,EAAmBqF,OAAO,UAAUnF,KAAK,KAErFoF,EAAc,SAAqBzE,EAAMqC,GAG3C,GAFAA,EAAUA,GAAW,CAAC,GAEjBrC,EACH,MAAM,IAAIsE,MAAM,oBAGlB,OAAuD,IAAnD9E,EAAQsD,KAAK9C,EAAMuE,IAIhBnC,EAAgCC,EAASrC,EAClD,C","sources":["webpack://@genesislcap/design-system-configurator/../../../node_modules/exenv-es6/dist/can-use-dom.js","webpack://@genesislcap/design-system-configurator/../../../node_modules/tabbable/dist/index.esm.js"],"sourcesContent":["/**\n * Checks if the DOM is available to access and use\n */\nexport function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n","/*!\n* tabbable 5.3.3\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\nvar candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])', 'details>summary:first-of-type', 'details'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n return element.getRootNode();\n} : function (element) {\n return element.ownerDocument;\n};\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\n\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n\n candidates = candidates.filter(filter);\n return candidates;\n};\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\n\n\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n } // iterate over shadow content if possible\n\n\n var shadowRoot = element.shadowRoot || // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);\n\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n\n return candidates;\n};\n\nvar getTabindex = function getTabindex(node, isScope) {\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n //\n // isScope is positive for custom element with shadow root or slot that by default\n // have tabIndex -1, but need to be sorted by document order in order for their\n // content to be inserted in the correct position\n if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {\n return 0;\n }\n }\n\n return node.tabIndex;\n};\n\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\n\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\n\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\n\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\n\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\n\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n\n var radioScope = node.form || getRootNode(node);\n\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n\n var radioSet;\n\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\n\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\n\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n\n return width === 0 && height === 0;\n};\n\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n } // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n\n\n var nodeRootHost = getRootNode(node).host;\n var nodeIsAttached = (nodeRootHost === null || nodeRootHost === void 0 ? void 0 : nodeRootHost.ownerDocument.contains(nodeRootHost)) || node.ownerDocument.contains(node);\n\n if (!displayCheck || displayCheck === 'full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n\n node = originalNode;\n } // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n\n if (nodeIsAttached) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n } // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n } // visible, as far as we can tell, or per current `displayCheck` mode\n\n\n return false;\n}; // form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\n\n\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement; // check if `node` is contained in a disabled <fieldset>\n\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i); // when the first <legend> (in document order) is found\n\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n } // the disabled <fieldset> containing `node` has no <legend>\n\n\n return true;\n }\n\n parentNode = parentNode.parentElement;\n }\n } // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n\n\n return false;\n};\n\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n\n return true;\n};\n\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n\n return true;\n};\n\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n } // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n\n\n return false;\n};\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\n\n\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scope;\n var element = isScope ? item.scope : item;\n var candidateTabindex = getTabindex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\n\nvar tabbable = function tabbable(el, options) {\n options = options || {};\n var candidates;\n\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([el], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n\n return sortByOrder(candidates);\n};\n\nvar focusable = function focusable(el, options) {\n options = options || {};\n var candidates;\n\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([el], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n\n return candidates;\n};\n\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n\n if (!node) {\n throw new Error('No node provided');\n }\n\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n\n return isNodeMatchingSelectorTabbable(options, node);\n};\n\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\n\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n\n if (!node) {\n throw new Error('No node provided');\n }\n\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["canUseDOM","window","document","createElement","candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","ownerDocument","getTabindex","node","isScope","tabIndex","test","tagName","isContentEditable","isNaN","parseInt","getAttribute","isInput","isNonTabbableRadio","type","isRadio","name","radioSet","radioScope","form","queryRadios","querySelectorAll","CSS","escape","err","console","error","message","checked","nodes","i","length","getCheckedRadio","isTabbableRadio","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isNodeMatchingSelectorFocusable","options","disabled","isHiddenInput","_ref","displayCheck","getShadowRoot","getComputedStyle","visibility","nodeUnderDetails","call","parentElement","nodeRootHost","host","nodeIsAttached","contains","originalNode","rootNode","shadowRoot","assignedSlot","getClientRects","isHidden","Array","slice","apply","children","some","child","isDetailsWithSummary","parentNode","item","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isTabbable","Error","focusableCandidateSelector","concat","isFocusable"],"sourceRoot":""}
|