@swisspost/design-system-components 2.0.0 → 2.0.2
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/LICENSE +183 -185
- package/dist/cjs/check-non-empty-eeaa8f77.js +0 -2
- package/dist/cjs/constants-238701d3.js +0 -2
- package/dist/cjs/fade-35a3633a.js +0 -2
- package/dist/cjs/index-8c288b1a.js +0 -2
- package/dist/cjs/{index-13695f3f.js → index-f243643b.js} +30 -4
- package/dist/cjs/index.cjs.js +15 -15
- package/dist/cjs/loader.cjs.js +1 -3
- package/dist/cjs/package-e8091039.js +5 -0
- package/dist/cjs/{post-accordion-9877919c.js → post-accordion-eebf7827.js} +5 -6
- package/dist/cjs/post-accordion-item-b2977ca5.js +51 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +5 -47
- package/dist/cjs/post-accordion.cjs.entry.js +3 -5
- package/dist/cjs/post-alert-af7728e6.js +98 -0
- package/dist/cjs/post-alert.cjs.entry.js +3 -5
- package/dist/cjs/{post-collapsible-ef0561b4.js → post-collapsible-15f79667.js} +5 -6
- package/dist/cjs/post-collapsible.cjs.entry.js +3 -5
- package/dist/cjs/post-components.cjs.js +2 -4
- package/dist/cjs/{post-icon-e9dcd643.js → post-icon-b80d7e24.js} +6 -7
- package/dist/cjs/post-icon.cjs.entry.js +3 -5
- package/dist/cjs/{post-popover-e114ebe7.js → post-popover-392b0554.js} +6 -7
- package/dist/cjs/post-popover.cjs.entry.js +3 -5
- package/dist/cjs/{post-popovercontainer-20fb22ee.js → post-popovercontainer-130193cf.js} +120 -30
- package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -5
- package/dist/cjs/post-tab-header-454cc178.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -5
- package/dist/cjs/{post-tab-panel-95cf7092.js → post-tab-panel-fc0bfcbe.js} +5 -6
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -5
- package/dist/cjs/{post-tabs-dbe7c341.js → post-tabs-3f909e1c.js} +5 -6
- package/dist/cjs/post-tabs.cjs.entry.js +3 -5
- package/dist/cjs/{post-tooltip-659af1e3.js → post-tooltip-e5b22230.js} +1863 -393
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -5
- package/dist/collection/animations/collapse.js +0 -1
- package/dist/collection/animations/fade.js +0 -1
- package/dist/collection/animations/index.js +0 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/post-accordion/post-accordion.js +4 -2
- package/dist/collection/components/post-accordion-item/heading-levels.js +0 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +5 -2
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +2 -2
- package/dist/collection/components/post-alert/post-alert.js +10 -8
- package/dist/collection/components/post-collapsible/post-collapsible.js +4 -2
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +1 -2
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +5 -3
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +8 -4
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +4 -2
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -2
- package/dist/collection/components/post-tabs/post-tabs.js +5 -2
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +142 -45
- package/dist/collection/components/post-tooltip/types.js +0 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.spec.js +27 -0
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/is-motion-reduced.js +0 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js +0 -1
- package/dist/collection/utils/property-checkers/check-one-of.js +0 -1
- package/dist/collection/utils/property-checkers/check-pattern.js +0 -1
- package/dist/collection/utils/property-checkers/check-type.js +0 -1
- package/dist/collection/utils/property-checkers/constants.js +0 -1
- package/dist/collection/utils/property-checkers/empty-or.js +0 -1
- package/dist/collection/utils/property-checkers/index.js +0 -1
- package/dist/components/check-non-empty.js +0 -2
- package/dist/components/constants.js +0 -2
- package/dist/components/fade.js +0 -2
- package/dist/components/index.js +1 -2
- package/dist/components/index2.js +1 -3
- package/dist/components/package.js +1 -3
- package/dist/components/post-accordion-item.js +1 -77
- package/dist/components/post-accordion-item2.js +78 -0
- package/dist/components/post-accordion.js +0 -2
- package/dist/components/post-accordion2.js +3 -4
- package/dist/components/post-alert.js +0 -2
- package/dist/components/post-alert2.js +8 -11
- package/dist/components/post-collapsible.js +0 -2
- package/dist/components/post-collapsible2.js +3 -4
- package/dist/components/post-icon.js +0 -2
- package/dist/components/post-icon2.js +5 -6
- package/dist/components/post-popover.js +0 -2
- package/dist/components/post-popover2.js +4 -5
- package/dist/components/post-popovercontainer.js +0 -2
- package/dist/components/post-popovercontainer2.js +118 -28
- package/dist/components/post-tab-header.js +0 -2
- package/dist/components/post-tab-header2.js +4 -5
- package/dist/components/post-tab-panel.js +0 -2
- package/dist/components/post-tab-panel2.js +3 -4
- package/dist/components/post-tabs.js +0 -2
- package/dist/components/post-tabs2.js +3 -4
- package/dist/components/post-tooltip.js +0 -2
- package/dist/components/post-tooltip2.js +1864 -394
- package/dist/docs.json +152 -30
- package/dist/esm/check-non-empty-58bd6b17.js +0 -2
- package/dist/esm/constants-8d548297.js +0 -2
- package/dist/esm/fade-7fd71785.js +0 -2
- package/dist/esm/{index-74cf5c9d.js → index-1708db56.js} +30 -4
- package/dist/esm/{index-1427953c.js → index-b444db27.js} +1 -3
- package/dist/esm/index.js +15 -16
- package/dist/esm/loader.js +2 -4
- package/dist/esm/package-aa903c40.js +3 -0
- package/dist/esm/{post-accordion-3b137073.js → post-accordion-82b49f7b.js} +5 -6
- package/dist/esm/post-accordion-item-3deff76a.js +49 -0
- package/dist/esm/post-accordion-item.entry.js +4 -50
- package/dist/esm/post-accordion.entry.js +3 -5
- package/dist/esm/post-alert-c88451ba.js +96 -0
- package/dist/esm/post-alert.entry.js +4 -6
- package/dist/esm/{post-collapsible-a418570f.js → post-collapsible-87ce4e6e.js} +6 -7
- package/dist/esm/post-collapsible.entry.js +4 -6
- package/dist/esm/post-components.js +3 -5
- package/dist/esm/{post-icon-302d1767.js → post-icon-e0536000.js} +7 -8
- package/dist/esm/post-icon.entry.js +4 -6
- package/dist/esm/{post-popover-5725afc7.js → post-popover-00b006b4.js} +6 -7
- package/dist/esm/post-popover.entry.js +3 -5
- package/dist/esm/{post-popovercontainer-1c050e83.js → post-popovercontainer-6d1d7f76.js} +120 -30
- package/dist/esm/post-popovercontainer.entry.js +3 -5
- package/dist/esm/post-tab-header-0f7866f9.js +30 -0
- package/dist/esm/post-tab-header.entry.js +3 -5
- package/dist/esm/{post-tab-panel-16796ee3.js → post-tab-panel-b41d5d0f.js} +5 -6
- package/dist/esm/post-tab-panel.entry.js +3 -5
- package/dist/esm/{post-tabs-16f99043.js → post-tabs-97868e9c.js} +5 -6
- package/dist/esm/post-tabs.entry.js +3 -5
- package/dist/esm/{post-tooltip-03a6d578.js → post-tooltip-531b569d.js} +1863 -393
- package/dist/esm/post-tooltip.entry.js +3 -5
- package/dist/post-components/index.esm.js +1 -2
- package/dist/post-components/p-0ef425cd.entry.js +1 -0
- package/dist/post-components/p-10b4cf7a.js +2 -0
- package/dist/post-components/p-202a23d3.js +1 -0
- package/dist/post-components/p-23d55894.entry.js +1 -0
- package/dist/post-components/p-25766de1.js +1 -0
- package/dist/post-components/p-2737eaf5.js +1 -2
- package/dist/post-components/p-284ca5da.js +1 -0
- package/dist/post-components/p-2b5a940c.entry.js +1 -0
- package/dist/post-components/p-31c06741.entry.js +1 -0
- package/dist/post-components/p-320a90d8.entry.js +1 -0
- package/dist/post-components/p-3b8a1f9d.entry.js +1 -0
- package/dist/post-components/p-440193f4.js +1 -2
- package/dist/post-components/p-61ad6181.entry.js +1 -0
- package/dist/post-components/p-71a57911.js +1 -0
- package/dist/post-components/p-b095519d.js +1 -2
- package/dist/post-components/p-b111a381.js +1 -0
- package/dist/post-components/p-ba40e160.js +1 -0
- package/dist/post-components/p-be08f39f.entry.js +1 -0
- package/dist/post-components/p-bf1293e1.js +1 -0
- package/dist/post-components/p-c3dd84af.js +1 -0
- package/dist/post-components/p-c9ecada7.entry.js +1 -0
- package/dist/post-components/p-cdd7ad0a.js +15 -0
- package/dist/post-components/p-d7863a77.js +1 -0
- package/dist/post-components/p-d8ac8ae9.js +1 -0
- package/dist/post-components/p-dc9ffe1d.js +1 -0
- package/dist/post-components/p-f0e82e63.js +1 -0
- package/dist/post-components/p-fbf645c4.entry.js +1 -0
- package/dist/post-components/p-ff9016ce.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -2
- package/dist/types/components/post-accordion/post-accordion.d.ts +3 -0
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +4 -0
- package/dist/types/components/post-alert/post-alert.d.ts +5 -0
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +3 -0
- package/dist/types/components/post-popover/post-popover.d.ts +3 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +3 -0
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +3 -0
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -0
- package/dist/types/components/post-tabs/post-tabs.d.ts +4 -0
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +14 -6
- package/dist/types/index.d.ts +1 -0
- package/package.json +13 -14
- package/dist/cjs/check-non-empty-eeaa8f77.js.map +0 -1
- package/dist/cjs/constants-238701d3.js.map +0 -1
- package/dist/cjs/fade-35a3633a.js.map +0 -1
- package/dist/cjs/index-13695f3f.js.map +0 -1
- package/dist/cjs/index-8c288b1a.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/package-8152e25e.js +0 -7
- package/dist/cjs/package-8152e25e.js.map +0 -1
- package/dist/cjs/post-accordion-9877919c.js.map +0 -1
- package/dist/cjs/post-accordion-item.cjs.entry.js.map +0 -1
- package/dist/cjs/post-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/post-alert-d87e6132.js +0 -101
- package/dist/cjs/post-alert-d87e6132.js.map +0 -1
- package/dist/cjs/post-alert.cjs.entry.js.map +0 -1
- package/dist/cjs/post-collapsible-ef0561b4.js.map +0 -1
- package/dist/cjs/post-collapsible.cjs.entry.js.map +0 -1
- package/dist/cjs/post-components.cjs.js.map +0 -1
- package/dist/cjs/post-icon-e9dcd643.js.map +0 -1
- package/dist/cjs/post-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/post-popover-e114ebe7.js.map +0 -1
- package/dist/cjs/post-popover.cjs.entry.js.map +0 -1
- package/dist/cjs/post-popovercontainer-20fb22ee.js.map +0 -1
- package/dist/cjs/post-popovercontainer.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tab-header-34c1cc21.js +0 -33
- package/dist/cjs/post-tab-header-34c1cc21.js.map +0 -1
- package/dist/cjs/post-tab-header.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tab-panel-95cf7092.js.map +0 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tabs-dbe7c341.js.map +0 -1
- package/dist/cjs/post-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tooltip-659af1e3.js.map +0 -1
- package/dist/cjs/post-tooltip.cjs.entry.js.map +0 -1
- package/dist/collection/animations/collapse.js.map +0 -1
- package/dist/collection/animations/fade.js.map +0 -1
- package/dist/collection/animations/index.js.map +0 -1
- package/dist/collection/components/post-accordion/post-accordion.js.map +0 -1
- package/dist/collection/components/post-accordion-item/heading-levels.js.map +0 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js.map +0 -1
- package/dist/collection/components/post-alert/alert-types.js.map +0 -1
- package/dist/collection/components/post-alert/post-alert.js.map +0 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js.map +0 -1
- package/dist/collection/components/post-icon/post-icon.js.map +0 -1
- package/dist/collection/components/post-popover/post-popover.js.map +0 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js.map +0 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js.map +0 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js.map +0 -1
- package/dist/collection/components/post-tabs/post-tabs.js.map +0 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js.map +0 -1
- package/dist/collection/components/post-tooltip/types.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/index.js.map +0 -1
- package/dist/collection/utils/is-motion-reduced.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-one-of.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-pattern.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-type.js.map +0 -1
- package/dist/collection/utils/property-checkers/constants.js.map +0 -1
- package/dist/collection/utils/property-checkers/empty-or.js.map +0 -1
- package/dist/collection/utils/property-checkers/index.js.map +0 -1
- package/dist/components/check-non-empty.js.map +0 -1
- package/dist/components/constants.js.map +0 -1
- package/dist/components/fade.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js.map +0 -1
- package/dist/components/package.js.map +0 -1
- package/dist/components/post-accordion-item.js.map +0 -1
- package/dist/components/post-accordion.js.map +0 -1
- package/dist/components/post-accordion2.js.map +0 -1
- package/dist/components/post-alert.js.map +0 -1
- package/dist/components/post-alert2.js.map +0 -1
- package/dist/components/post-collapsible.js.map +0 -1
- package/dist/components/post-collapsible2.js.map +0 -1
- package/dist/components/post-icon.js.map +0 -1
- package/dist/components/post-icon2.js.map +0 -1
- package/dist/components/post-popover.js.map +0 -1
- package/dist/components/post-popover2.js.map +0 -1
- package/dist/components/post-popovercontainer.js.map +0 -1
- package/dist/components/post-popovercontainer2.js.map +0 -1
- package/dist/components/post-tab-header.js.map +0 -1
- package/dist/components/post-tab-header2.js.map +0 -1
- package/dist/components/post-tab-panel.js.map +0 -1
- package/dist/components/post-tab-panel2.js.map +0 -1
- package/dist/components/post-tabs.js.map +0 -1
- package/dist/components/post-tabs2.js.map +0 -1
- package/dist/components/post-tooltip.js.map +0 -1
- package/dist/components/post-tooltip2.js.map +0 -1
- package/dist/esm/check-non-empty-58bd6b17.js.map +0 -1
- package/dist/esm/constants-8d548297.js.map +0 -1
- package/dist/esm/fade-7fd71785.js.map +0 -1
- package/dist/esm/index-1427953c.js.map +0 -1
- package/dist/esm/index-74cf5c9d.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/package-af0ef704.js +0 -5
- package/dist/esm/package-af0ef704.js.map +0 -1
- package/dist/esm/post-accordion-3b137073.js.map +0 -1
- package/dist/esm/post-accordion-item.entry.js.map +0 -1
- package/dist/esm/post-accordion.entry.js.map +0 -1
- package/dist/esm/post-alert-0dcc6ac7.js +0 -99
- package/dist/esm/post-alert-0dcc6ac7.js.map +0 -1
- package/dist/esm/post-alert.entry.js.map +0 -1
- package/dist/esm/post-collapsible-a418570f.js.map +0 -1
- package/dist/esm/post-collapsible.entry.js.map +0 -1
- package/dist/esm/post-components.js.map +0 -1
- package/dist/esm/post-icon-302d1767.js.map +0 -1
- package/dist/esm/post-icon.entry.js.map +0 -1
- package/dist/esm/post-popover-5725afc7.js.map +0 -1
- package/dist/esm/post-popover.entry.js.map +0 -1
- package/dist/esm/post-popovercontainer-1c050e83.js.map +0 -1
- package/dist/esm/post-popovercontainer.entry.js.map +0 -1
- package/dist/esm/post-tab-header-ede9f078.js +0 -31
- package/dist/esm/post-tab-header-ede9f078.js.map +0 -1
- package/dist/esm/post-tab-header.entry.js.map +0 -1
- package/dist/esm/post-tab-panel-16796ee3.js.map +0 -1
- package/dist/esm/post-tab-panel.entry.js.map +0 -1
- package/dist/esm/post-tabs-16f99043.js.map +0 -1
- package/dist/esm/post-tabs.entry.js.map +0 -1
- package/dist/esm/post-tooltip-03a6d578.js.map +0 -1
- package/dist/esm/post-tooltip.entry.js.map +0 -1
- package/dist/post-components/index.esm.js.map +0 -1
- package/dist/post-components/p-06566f88.js +0 -2
- package/dist/post-components/p-06566f88.js.map +0 -1
- package/dist/post-components/p-12a0f4b9.js +0 -2
- package/dist/post-components/p-12a0f4b9.js.map +0 -1
- package/dist/post-components/p-26dad3c3.js +0 -2
- package/dist/post-components/p-26dad3c3.js.map +0 -1
- package/dist/post-components/p-2737eaf5.js.map +0 -1
- package/dist/post-components/p-299a3e41.entry.js +0 -2
- package/dist/post-components/p-299a3e41.entry.js.map +0 -1
- package/dist/post-components/p-3241987a.entry.js +0 -2
- package/dist/post-components/p-3241987a.entry.js.map +0 -1
- package/dist/post-components/p-3fd14a00.js +0 -2
- package/dist/post-components/p-3fd14a00.js.map +0 -1
- package/dist/post-components/p-440193f4.js.map +0 -1
- package/dist/post-components/p-4b950d70.js +0 -2
- package/dist/post-components/p-4b950d70.js.map +0 -1
- package/dist/post-components/p-503ac49b.entry.js +0 -2
- package/dist/post-components/p-503ac49b.entry.js.map +0 -1
- package/dist/post-components/p-6391f970.js +0 -2
- package/dist/post-components/p-6391f970.js.map +0 -1
- package/dist/post-components/p-6d0226cd.entry.js +0 -2
- package/dist/post-components/p-6d0226cd.entry.js.map +0 -1
- package/dist/post-components/p-775859cc.entry.js +0 -2
- package/dist/post-components/p-775859cc.entry.js.map +0 -1
- package/dist/post-components/p-78589fac.entry.js +0 -2
- package/dist/post-components/p-78589fac.entry.js.map +0 -1
- package/dist/post-components/p-803284de.js +0 -9
- package/dist/post-components/p-803284de.js.map +0 -1
- package/dist/post-components/p-83cedb31.entry.js +0 -2
- package/dist/post-components/p-83cedb31.entry.js.map +0 -1
- package/dist/post-components/p-88481640.entry.js +0 -2
- package/dist/post-components/p-88481640.entry.js.map +0 -1
- package/dist/post-components/p-8f37921c.entry.js +0 -2
- package/dist/post-components/p-8f37921c.entry.js.map +0 -1
- package/dist/post-components/p-91236c61.js +0 -2
- package/dist/post-components/p-91236c61.js.map +0 -1
- package/dist/post-components/p-91f2291a.js +0 -2
- package/dist/post-components/p-91f2291a.js.map +0 -1
- package/dist/post-components/p-93ab273b.js +0 -2
- package/dist/post-components/p-93ab273b.js.map +0 -1
- package/dist/post-components/p-96f4ebc4.js +0 -2
- package/dist/post-components/p-96f4ebc4.js.map +0 -1
- package/dist/post-components/p-b095519d.js.map +0 -1
- package/dist/post-components/p-b4f01350.js +0 -3
- package/dist/post-components/p-b4f01350.js.map +0 -1
- package/dist/post-components/p-d96fbe33.entry.js +0 -2
- package/dist/post-components/p-d96fbe33.entry.js.map +0 -1
- package/dist/post-components/p-de4704fc.js +0 -2
- package/dist/post-components/p-de4704fc.js.map +0 -1
- package/dist/post-components/p-fe7650bc.entry.js +0 -2
- package/dist/post-components/p-fe7650bc.entry.js.map +0 -1
- package/dist/post-components/post-components.esm.js.map +0 -1
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
const _package = require('./package-
|
|
3
|
+
const index = require('./index-f243643b.js');
|
|
4
|
+
const _package = require('./package-e8091039.js');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function
|
|
6
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
|
+
|
|
8
|
+
function getDefaultExportFromCjs (x) {
|
|
9
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var focusable = {exports: {}};
|
|
13
|
+
|
|
14
|
+
var focusRelevant = {exports: {}};
|
|
15
|
+
|
|
16
|
+
var parents = {exports: {}};
|
|
17
|
+
|
|
18
|
+
var contextToElement = {exports: {}};
|
|
19
|
+
|
|
20
|
+
var nodeArray = {exports: {}};
|
|
21
|
+
|
|
22
|
+
(function (module, exports) {
|
|
23
|
+
|
|
24
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25
|
+
value: true
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.default = function (input) {
|
|
9
29
|
if (!input) {
|
|
10
30
|
return [];
|
|
11
31
|
}
|
|
@@ -28,16 +48,28 @@ function nodeArray (input) {
|
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
throw new TypeError('unexpected input ' + String(input));
|
|
31
|
-
}
|
|
51
|
+
};
|
|
32
52
|
|
|
33
|
-
|
|
53
|
+
module.exports = exports['default'];
|
|
54
|
+
// input may be undefined, selector-tring, Node, NodeList, HTMLCollection, array of Nodes
|
|
55
|
+
// yes, to some extent this is a bad replica of jQuery's constructor function
|
|
56
|
+
|
|
57
|
+
}(nodeArray, nodeArray.exports));
|
|
58
|
+
|
|
59
|
+
(function (module, exports) {
|
|
60
|
+
|
|
61
|
+
Object.defineProperty(exports, "__esModule", {
|
|
62
|
+
value: true
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
exports.default = function (_ref) {
|
|
34
66
|
var context = _ref.context,
|
|
35
67
|
_ref$label = _ref.label,
|
|
36
68
|
label = _ref$label === undefined ? 'context-to-element' : _ref$label,
|
|
37
69
|
resolveDocument = _ref.resolveDocument,
|
|
38
70
|
defaultToDocument = _ref.defaultToDocument;
|
|
39
71
|
|
|
40
|
-
var element =
|
|
72
|
+
var element = (0, _nodeArray2.default)(context)[0];
|
|
41
73
|
|
|
42
74
|
if (resolveDocument && element && element.nodeType === Node.DOCUMENT_NODE) {
|
|
43
75
|
element = element.documentElement;
|
|
@@ -56,16 +88,30 @@ function contextToElement (_ref) {
|
|
|
56
88
|
}
|
|
57
89
|
|
|
58
90
|
return element;
|
|
59
|
-
}
|
|
91
|
+
};
|
|
60
92
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
93
|
+
var _nodeArray = nodeArray.exports;
|
|
94
|
+
|
|
95
|
+
var _nodeArray2 = _interopRequireDefault(_nodeArray);
|
|
96
|
+
|
|
97
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
98
|
+
|
|
99
|
+
module.exports = exports['default'];
|
|
100
|
+
|
|
101
|
+
}(contextToElement, contextToElement.exports));
|
|
102
|
+
|
|
103
|
+
(function (module, exports) {
|
|
104
|
+
|
|
105
|
+
Object.defineProperty(exports, "__esModule", {
|
|
106
|
+
value: true
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
exports.default = function () {
|
|
64
110
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
65
111
|
context = _ref.context;
|
|
66
112
|
|
|
67
113
|
var list = [];
|
|
68
|
-
var element =
|
|
114
|
+
var element = (0, _contextToElement2.default)({
|
|
69
115
|
label: 'get/parents',
|
|
70
116
|
context: context
|
|
71
117
|
});
|
|
@@ -80,7 +126,29 @@ function getParents () {
|
|
|
80
126
|
}
|
|
81
127
|
|
|
82
128
|
return list;
|
|
83
|
-
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
var _contextToElement = contextToElement.exports;
|
|
132
|
+
|
|
133
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
134
|
+
|
|
135
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
136
|
+
|
|
137
|
+
module.exports = exports['default'];
|
|
138
|
+
|
|
139
|
+
// [elem, elem.parent, elem.parent.parent, …, html]
|
|
140
|
+
// will not contain the shadowRoot (DOCUMENT_FRAGMENT_NODE) and shadowHost
|
|
141
|
+
|
|
142
|
+
}(parents, parents.exports));
|
|
143
|
+
|
|
144
|
+
var elementMatches = {exports: {}};
|
|
145
|
+
|
|
146
|
+
(function (module, exports) {
|
|
147
|
+
|
|
148
|
+
Object.defineProperty(exports, "__esModule", {
|
|
149
|
+
value: true
|
|
150
|
+
});
|
|
151
|
+
exports.default = elementMatches;
|
|
84
152
|
|
|
85
153
|
// Element.prototype.matches may be available at a different name
|
|
86
154
|
// https://developer.mozilla.org/en/docs/Web/API/Element/matches
|
|
@@ -106,24 +174,30 @@ function elementMatches(element, selector) {
|
|
|
106
174
|
|
|
107
175
|
return element[name](selector);
|
|
108
176
|
}
|
|
177
|
+
module.exports = exports['default'];
|
|
109
178
|
|
|
110
|
-
|
|
179
|
+
}(elementMatches, elementMatches.exports));
|
|
111
180
|
|
|
112
|
-
|
|
113
|
-
return module = {
|
|
114
|
-
path: basedir,
|
|
115
|
-
exports: {},
|
|
116
|
-
require: function (path, base) {
|
|
117
|
-
return commonjsRequire();
|
|
118
|
-
}
|
|
119
|
-
}, fn(module, module.exports), module.exports;
|
|
120
|
-
}
|
|
181
|
+
var tabindexValue = {exports: {}};
|
|
121
182
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
183
|
+
var validTabindex = {exports: {}};
|
|
184
|
+
|
|
185
|
+
var supports = {exports: {}};
|
|
186
|
+
|
|
187
|
+
var detectFocus = {exports: {}};
|
|
188
|
+
|
|
189
|
+
var platform$1 = {exports: {}};
|
|
125
190
|
|
|
126
|
-
var platform
|
|
191
|
+
var platform = {exports: {}};
|
|
192
|
+
|
|
193
|
+
/*!
|
|
194
|
+
* Platform.js <https://mths.be/platform>
|
|
195
|
+
* Copyright 2014-2016 Benjamin Tan <https://demoneaux.github.io/>
|
|
196
|
+
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
197
|
+
* Available under MIT license <https://mths.be/mit>
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
(function (module, exports) {
|
|
127
201
|
(function() {
|
|
128
202
|
|
|
129
203
|
/** Used to determine if values are of the language type `Object`. */
|
|
@@ -139,10 +213,10 @@ var platform$1 = createCommonjsModule(function (module, exports) {
|
|
|
139
213
|
var oldRoot = root;
|
|
140
214
|
|
|
141
215
|
/** Detect free variable `exports`. */
|
|
142
|
-
var freeExports =
|
|
216
|
+
var freeExports = exports;
|
|
143
217
|
|
|
144
218
|
/** Detect free variable `module`. */
|
|
145
|
-
var freeModule =
|
|
219
|
+
var freeModule = module && !module.nodeType && module;
|
|
146
220
|
|
|
147
221
|
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
|
|
148
222
|
var freeGlobal = freeExports && freeModule && typeof commonjsGlobal == 'object' && commonjsGlobal;
|
|
@@ -1259,31 +1333,49 @@ var platform$1 = createCommonjsModule(function (module, exports) {
|
|
|
1259
1333
|
root.platform = platform;
|
|
1260
1334
|
}
|
|
1261
1335
|
}.call(commonjsGlobal));
|
|
1336
|
+
}(platform, platform.exports));
|
|
1337
|
+
|
|
1338
|
+
(function (module, exports) {
|
|
1339
|
+
|
|
1340
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1341
|
+
value: true
|
|
1262
1342
|
});
|
|
1263
1343
|
|
|
1344
|
+
var _platform2 = platform.exports;
|
|
1345
|
+
|
|
1346
|
+
var _platform3 = _interopRequireDefault(_platform2);
|
|
1347
|
+
|
|
1348
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1349
|
+
|
|
1264
1350
|
// deep clone of original platform
|
|
1265
|
-
var platform = JSON.parse(JSON.stringify(
|
|
1351
|
+
var platform$1 = JSON.parse(JSON.stringify(_platform3.default));
|
|
1266
1352
|
|
|
1267
1353
|
// operating system
|
|
1268
|
-
|
|
1354
|
+
|
|
1355
|
+
// sugar for https://github.com/bestiejs/platform.js
|
|
1356
|
+
// make sure to ALWAYS reference the layout engine,
|
|
1357
|
+
// even if it is not necessary for the condition,
|
|
1358
|
+
// as this makes grepping for this stuff simpler
|
|
1359
|
+
|
|
1360
|
+
var os = platform$1.os.family || '';
|
|
1269
1361
|
var ANDROID = os === 'Android';
|
|
1270
1362
|
var WINDOWS = os.slice(0, 7) === 'Windows';
|
|
1271
1363
|
var OSX = os === 'OS X';
|
|
1272
1364
|
var IOS = os === 'iOS';
|
|
1273
1365
|
|
|
1274
1366
|
// layout
|
|
1275
|
-
var BLINK = platform.layout === 'Blink';
|
|
1276
|
-
var GECKO = platform.layout === 'Gecko';
|
|
1277
|
-
var TRIDENT = platform.layout === 'Trident';
|
|
1278
|
-
var EDGE = platform.layout === 'EdgeHTML';
|
|
1279
|
-
var WEBKIT = platform.layout === 'WebKit';
|
|
1367
|
+
var BLINK = platform$1.layout === 'Blink';
|
|
1368
|
+
var GECKO = platform$1.layout === 'Gecko';
|
|
1369
|
+
var TRIDENT = platform$1.layout === 'Trident';
|
|
1370
|
+
var EDGE = platform$1.layout === 'EdgeHTML';
|
|
1371
|
+
var WEBKIT = platform$1.layout === 'WebKit';
|
|
1280
1372
|
|
|
1281
1373
|
// browser version (not layout engine version!)
|
|
1282
|
-
var version
|
|
1283
|
-
var majorVersion = Math.floor(version
|
|
1284
|
-
platform.majorVersion = majorVersion;
|
|
1374
|
+
var version = parseFloat(platform$1.version);
|
|
1375
|
+
var majorVersion = Math.floor(version);
|
|
1376
|
+
platform$1.majorVersion = majorVersion;
|
|
1285
1377
|
|
|
1286
|
-
platform.is = {
|
|
1378
|
+
platform$1.is = {
|
|
1287
1379
|
// operating system
|
|
1288
1380
|
ANDROID: ANDROID,
|
|
1289
1381
|
WINDOWS: WINDOWS,
|
|
@@ -1301,6 +1393,35 @@ platform.is = {
|
|
|
1301
1393
|
IE11: TRIDENT && majorVersion === 11
|
|
1302
1394
|
};
|
|
1303
1395
|
|
|
1396
|
+
exports.default = platform$1;
|
|
1397
|
+
module.exports = exports['default'];
|
|
1398
|
+
|
|
1399
|
+
}(platform$1, platform$1.exports));
|
|
1400
|
+
|
|
1401
|
+
(function (module, exports) {
|
|
1402
|
+
|
|
1403
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1404
|
+
value: true
|
|
1405
|
+
});
|
|
1406
|
+
|
|
1407
|
+
exports.default = function (tests) {
|
|
1408
|
+
var data = before();
|
|
1409
|
+
|
|
1410
|
+
var results = {};
|
|
1411
|
+
Object.keys(tests).map(function (key) {
|
|
1412
|
+
results[key] = test(data, tests[key]);
|
|
1413
|
+
});
|
|
1414
|
+
|
|
1415
|
+
after(data);
|
|
1416
|
+
return results;
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
var _platform = platform$1.exports;
|
|
1420
|
+
|
|
1421
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
1422
|
+
|
|
1423
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1424
|
+
|
|
1304
1425
|
function before() {
|
|
1305
1426
|
var data = {
|
|
1306
1427
|
// remember what had focus to restore after test
|
|
@@ -1368,7 +1489,7 @@ function after(data) {
|
|
|
1368
1489
|
// restore focus to what it was before test and cleanup
|
|
1369
1490
|
if (data.activeElement === document.body) {
|
|
1370
1491
|
document.activeElement && document.activeElement.blur && document.activeElement.blur();
|
|
1371
|
-
if (
|
|
1492
|
+
if (_platform2.default.is.IE10) {
|
|
1372
1493
|
// IE10 does not redirect focus to <body> when the activeElement is removed
|
|
1373
1494
|
document.body.focus();
|
|
1374
1495
|
}
|
|
@@ -1385,28 +1506,38 @@ function after(data) {
|
|
|
1385
1506
|
document.body.scrollLeft = data.bodyScrollLeft;
|
|
1386
1507
|
}
|
|
1387
1508
|
|
|
1388
|
-
|
|
1389
|
-
var data = before();
|
|
1509
|
+
module.exports = exports['default'];
|
|
1390
1510
|
|
|
1391
|
-
|
|
1392
|
-
Object.keys(tests).map(function (key) {
|
|
1393
|
-
results[key] = test(data, tests[key]);
|
|
1394
|
-
});
|
|
1511
|
+
}(detectFocus, detectFocus.exports));
|
|
1395
1512
|
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
}
|
|
1513
|
+
var supportsCache = {exports: {}};
|
|
1514
|
+
|
|
1515
|
+
var version = {exports: {}};
|
|
1516
|
+
|
|
1517
|
+
(function (module, exports) {
|
|
1518
|
+
|
|
1519
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1520
|
+
value: true
|
|
1521
|
+
});
|
|
1399
1522
|
|
|
1400
1523
|
// this file is overwritten by `npm run build:pre`
|
|
1401
1524
|
var version = '1.4.1';
|
|
1525
|
+
exports.default = version;
|
|
1526
|
+
module.exports = exports['default'];
|
|
1402
1527
|
|
|
1403
|
-
|
|
1404
|
-
Facility to cache test results in localStorage.
|
|
1528
|
+
}(version, version.exports));
|
|
1405
1529
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1530
|
+
(function (module, exports) {
|
|
1531
|
+
|
|
1532
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1533
|
+
value: true
|
|
1534
|
+
});
|
|
1535
|
+
|
|
1536
|
+
var _version = version.exports;
|
|
1537
|
+
|
|
1538
|
+
var _version2 = _interopRequireDefault(_version);
|
|
1539
|
+
|
|
1540
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1410
1541
|
|
|
1411
1542
|
function readLocalStorage(key) {
|
|
1412
1543
|
// allow reading from storage to retrieve previous support results
|
|
@@ -1421,7 +1552,13 @@ function readLocalStorage(key) {
|
|
|
1421
1552
|
}
|
|
1422
1553
|
|
|
1423
1554
|
return data;
|
|
1424
|
-
}
|
|
1555
|
+
} /*
|
|
1556
|
+
Facility to cache test results in localStorage.
|
|
1557
|
+
|
|
1558
|
+
USAGE:
|
|
1559
|
+
cache.get('key');
|
|
1560
|
+
cache.set('key', 'value');
|
|
1561
|
+
*/
|
|
1425
1562
|
|
|
1426
1563
|
function writeLocalStorage(key, value) {
|
|
1427
1564
|
if (!document.hasFocus()) {
|
|
@@ -1449,14 +1586,14 @@ var cacheKey = 'ally-supports-cache';
|
|
|
1449
1586
|
var cache = readLocalStorage(cacheKey);
|
|
1450
1587
|
|
|
1451
1588
|
// update the cache if ally or the user agent changed (newer version, etc)
|
|
1452
|
-
if (cache.userAgent !== userAgent || cache.version !==
|
|
1589
|
+
if (cache.userAgent !== userAgent || cache.version !== _version2.default) {
|
|
1453
1590
|
cache = {};
|
|
1454
1591
|
}
|
|
1455
1592
|
|
|
1456
1593
|
cache.userAgent = userAgent;
|
|
1457
|
-
cache.version =
|
|
1594
|
+
cache.version = _version2.default;
|
|
1458
1595
|
|
|
1459
|
-
|
|
1596
|
+
exports.default = {
|
|
1460
1597
|
get: function get() {
|
|
1461
1598
|
return cache;
|
|
1462
1599
|
},
|
|
@@ -1469,8 +1606,19 @@ const cache$1 = {
|
|
|
1469
1606
|
writeLocalStorage(cacheKey, cache);
|
|
1470
1607
|
}
|
|
1471
1608
|
};
|
|
1609
|
+
module.exports = exports['default'];
|
|
1472
1610
|
|
|
1473
|
-
|
|
1611
|
+
}(supportsCache, supportsCache.exports));
|
|
1612
|
+
|
|
1613
|
+
var cssShadowPiercingDeepCombinator = {exports: {}};
|
|
1614
|
+
|
|
1615
|
+
(function (module, exports) {
|
|
1616
|
+
|
|
1617
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1618
|
+
value: true
|
|
1619
|
+
});
|
|
1620
|
+
|
|
1621
|
+
exports.default = function () {
|
|
1474
1622
|
var combinator = void 0;
|
|
1475
1623
|
|
|
1476
1624
|
// see https://dev.w3.org/csswg/css-scoping-1/#deep-combinator
|
|
@@ -1491,30 +1639,79 @@ function cssShadowPiercingDeepCombinator () {
|
|
|
1491
1639
|
}
|
|
1492
1640
|
|
|
1493
1641
|
return combinator;
|
|
1494
|
-
}
|
|
1642
|
+
};
|
|
1643
|
+
|
|
1644
|
+
module.exports = exports['default'];
|
|
1495
1645
|
|
|
1496
|
-
|
|
1646
|
+
}(cssShadowPiercingDeepCombinator, cssShadowPiercingDeepCombinator.exports));
|
|
1647
|
+
|
|
1648
|
+
var focusAreaImgTabindex = {exports: {}};
|
|
1649
|
+
|
|
1650
|
+
var gif = {exports: {}};
|
|
1651
|
+
|
|
1652
|
+
(function (module, exports) {
|
|
1653
|
+
|
|
1654
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1655
|
+
value: true
|
|
1656
|
+
});
|
|
1657
|
+
exports.default = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
|
1658
|
+
module.exports = exports['default'];
|
|
1659
|
+
|
|
1660
|
+
}(gif, gif.exports));
|
|
1661
|
+
|
|
1662
|
+
(function (module, exports) {
|
|
1663
|
+
|
|
1664
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1665
|
+
value: true
|
|
1666
|
+
});
|
|
1667
|
+
|
|
1668
|
+
var _gif = gif.exports;
|
|
1669
|
+
|
|
1670
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
1671
|
+
|
|
1672
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1497
1673
|
|
|
1498
1674
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap
|
|
1499
|
-
|
|
1675
|
+
exports.default = {
|
|
1500
1676
|
element: 'div',
|
|
1501
1677
|
mutate: function mutate(element) {
|
|
1502
|
-
element.innerHTML = '<map name="image-map-tabindex-test">' + '<area shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-tabindex-test" tabindex="-1" alt="" src="' +
|
|
1678
|
+
element.innerHTML = '<map name="image-map-tabindex-test">' + '<area shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-tabindex-test" tabindex="-1" alt="" src="' + _gif2.default + '">';
|
|
1503
1679
|
|
|
1504
1680
|
return element.querySelector('area');
|
|
1505
1681
|
}
|
|
1506
1682
|
};
|
|
1683
|
+
module.exports = exports['default'];
|
|
1684
|
+
|
|
1685
|
+
}(focusAreaImgTabindex, focusAreaImgTabindex.exports));
|
|
1686
|
+
|
|
1687
|
+
var focusAreaTabindex = {exports: {}};
|
|
1688
|
+
|
|
1689
|
+
(function (module, exports) {
|
|
1690
|
+
|
|
1691
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1692
|
+
value: true
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
var _gif = gif.exports;
|
|
1696
|
+
|
|
1697
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
1698
|
+
|
|
1699
|
+
var _platform = platform$1.exports;
|
|
1700
|
+
|
|
1701
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
1702
|
+
|
|
1703
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1507
1704
|
|
|
1508
1705
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap
|
|
1509
|
-
|
|
1706
|
+
exports.default = {
|
|
1510
1707
|
element: 'div',
|
|
1511
1708
|
mutate: function mutate(element) {
|
|
1512
|
-
element.innerHTML = '<map name="image-map-tabindex-test">' + '<area href="#void" tabindex="-1" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-tabindex-test" alt="" src="' +
|
|
1709
|
+
element.innerHTML = '<map name="image-map-tabindex-test">' + '<area href="#void" tabindex="-1" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-tabindex-test" alt="" src="' + _gif2.default + '">';
|
|
1513
1710
|
|
|
1514
1711
|
return false;
|
|
1515
1712
|
},
|
|
1516
1713
|
validate: function validate(element, focusTarget, _document) {
|
|
1517
|
-
if (
|
|
1714
|
+
if (_platform2.default.is.GECKO) {
|
|
1518
1715
|
// fixes https://github.com/medialize/ally.js/issues/35
|
|
1519
1716
|
// Firefox loads the DataURI asynchronously, causing a false-negative
|
|
1520
1717
|
return true;
|
|
@@ -1525,17 +1722,38 @@ const focusAreaTabindex = {
|
|
|
1525
1722
|
return _document.activeElement === focus;
|
|
1526
1723
|
}
|
|
1527
1724
|
};
|
|
1725
|
+
module.exports = exports['default'];
|
|
1726
|
+
|
|
1727
|
+
}(focusAreaTabindex, focusAreaTabindex.exports));
|
|
1728
|
+
|
|
1729
|
+
var focusAreaWithoutHref = {exports: {}};
|
|
1730
|
+
|
|
1731
|
+
(function (module, exports) {
|
|
1732
|
+
|
|
1733
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1734
|
+
value: true
|
|
1735
|
+
});
|
|
1736
|
+
|
|
1737
|
+
var _gif = gif.exports;
|
|
1738
|
+
|
|
1739
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
1740
|
+
|
|
1741
|
+
var _platform = platform$1.exports;
|
|
1742
|
+
|
|
1743
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
1744
|
+
|
|
1745
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1528
1746
|
|
|
1529
1747
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap
|
|
1530
|
-
|
|
1748
|
+
exports.default = {
|
|
1531
1749
|
element: 'div',
|
|
1532
1750
|
mutate: function mutate(element) {
|
|
1533
|
-
element.innerHTML = '<map name="image-map-area-href-test">' + '<area shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-area-href-test" alt="" src="' +
|
|
1751
|
+
element.innerHTML = '<map name="image-map-area-href-test">' + '<area shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-area-href-test" alt="" src="' + _gif2.default + '">';
|
|
1534
1752
|
|
|
1535
1753
|
return element.querySelector('area');
|
|
1536
1754
|
},
|
|
1537
1755
|
validate: function validate(element, focusTarget, _document) {
|
|
1538
|
-
if (
|
|
1756
|
+
if (_platform2.default.is.GECKO) {
|
|
1539
1757
|
// fixes https://github.com/medialize/ally.js/issues/35
|
|
1540
1758
|
// Firefox loads the DataURI asynchronously, causing a false-negative
|
|
1541
1759
|
return true;
|
|
@@ -1544,35 +1762,111 @@ const focusAreaWithoutHref = {
|
|
|
1544
1762
|
return _document.activeElement === focusTarget;
|
|
1545
1763
|
}
|
|
1546
1764
|
};
|
|
1765
|
+
module.exports = exports['default'];
|
|
1766
|
+
|
|
1767
|
+
}(focusAreaWithoutHref, focusAreaWithoutHref.exports));
|
|
1768
|
+
|
|
1769
|
+
var focusAudioWithoutControls = {exports: {}};
|
|
1770
|
+
|
|
1771
|
+
var mp3 = {exports: {}};
|
|
1772
|
+
|
|
1773
|
+
(function (module, exports) {
|
|
1774
|
+
|
|
1775
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1776
|
+
value: true
|
|
1777
|
+
});
|
|
1778
|
+
|
|
1779
|
+
var _gif = gif.exports;
|
|
1780
|
+
|
|
1781
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
1782
|
+
|
|
1783
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1784
|
+
|
|
1785
|
+
exports.default = _gif2.default;
|
|
1786
|
+
// export default 'data:audio/mp3;base64,audio-focus-test';
|
|
1787
|
+
|
|
1788
|
+
module.exports = exports['default'];
|
|
1789
|
+
|
|
1790
|
+
}(mp3, mp3.exports));
|
|
1791
|
+
|
|
1792
|
+
(function (module, exports) {
|
|
1793
|
+
|
|
1794
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1795
|
+
value: true
|
|
1796
|
+
});
|
|
1797
|
+
|
|
1798
|
+
var _mp = mp3.exports;
|
|
1547
1799
|
|
|
1548
|
-
|
|
1800
|
+
var _mp2 = _interopRequireDefault(_mp);
|
|
1801
|
+
|
|
1802
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1803
|
+
|
|
1804
|
+
exports.default = {
|
|
1549
1805
|
name: 'can-focus-audio-without-controls',
|
|
1550
1806
|
element: 'audio',
|
|
1551
1807
|
mutate: function mutate(element) {
|
|
1552
1808
|
try {
|
|
1553
1809
|
// invalid media file can trigger warning in console, data-uri to prevent HTTP request
|
|
1554
|
-
element.setAttribute('src',
|
|
1810
|
+
element.setAttribute('src', _mp2.default);
|
|
1555
1811
|
} catch (e) {
|
|
1556
1812
|
// IE9 may throw "Error: Not implemented"
|
|
1557
1813
|
}
|
|
1558
1814
|
}
|
|
1559
1815
|
};
|
|
1816
|
+
module.exports = exports['default'];
|
|
1817
|
+
|
|
1818
|
+
}(focusAudioWithoutControls, focusAudioWithoutControls.exports));
|
|
1819
|
+
|
|
1820
|
+
var focusBrokenImageMap = {exports: {}};
|
|
1821
|
+
|
|
1822
|
+
var gif_invalid = {exports: {}};
|
|
1823
|
+
|
|
1824
|
+
(function (module, exports) {
|
|
1825
|
+
|
|
1826
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1827
|
+
value: true
|
|
1828
|
+
});
|
|
1829
|
+
exports.default = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ';
|
|
1830
|
+
module.exports = exports['default'];
|
|
1560
1831
|
|
|
1561
|
-
|
|
1832
|
+
}(gif_invalid, gif_invalid.exports));
|
|
1833
|
+
|
|
1834
|
+
(function (module, exports) {
|
|
1835
|
+
|
|
1836
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1837
|
+
value: true
|
|
1838
|
+
});
|
|
1839
|
+
|
|
1840
|
+
var _gif = gif_invalid.exports;
|
|
1841
|
+
|
|
1842
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
1843
|
+
|
|
1844
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1562
1845
|
|
|
1563
1846
|
// NOTE: https://github.com/medialize/ally.js/issues/35
|
|
1564
1847
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap
|
|
1565
|
-
|
|
1848
|
+
exports.default = {
|
|
1566
1849
|
element: 'div',
|
|
1567
1850
|
mutate: function mutate(element) {
|
|
1568
|
-
element.innerHTML = '<map name="broken-image-map-test"><area href="#void" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#broken-image-map-test" alt="" src="' +
|
|
1851
|
+
element.innerHTML = '<map name="broken-image-map-test"><area href="#void" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#broken-image-map-test" alt="" src="' + _gif2.default + '">';
|
|
1569
1852
|
|
|
1570
1853
|
return element.querySelector('area');
|
|
1571
1854
|
}
|
|
1572
1855
|
};
|
|
1856
|
+
module.exports = exports['default'];
|
|
1857
|
+
|
|
1858
|
+
}(focusBrokenImageMap, focusBrokenImageMap.exports));
|
|
1859
|
+
|
|
1860
|
+
var focusChildrenOfFocusableFlexbox = {exports: {}};
|
|
1861
|
+
|
|
1862
|
+
(function (module, exports) {
|
|
1863
|
+
|
|
1864
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1865
|
+
value: true
|
|
1866
|
+
});
|
|
1573
1867
|
|
|
1574
1868
|
// Children of focusable elements with display:flex are focusable in IE10-11
|
|
1575
|
-
|
|
1869
|
+
exports.default = {
|
|
1576
1870
|
element: 'div',
|
|
1577
1871
|
mutate: function mutate(element) {
|
|
1578
1872
|
element.setAttribute('tabindex', '-1');
|
|
@@ -1581,70 +1875,157 @@ const focusChildrenOfFocusableFlexbox = {
|
|
|
1581
1875
|
return element.querySelector('span');
|
|
1582
1876
|
}
|
|
1583
1877
|
};
|
|
1878
|
+
module.exports = exports['default'];
|
|
1879
|
+
|
|
1880
|
+
}(focusChildrenOfFocusableFlexbox, focusChildrenOfFocusableFlexbox.exports));
|
|
1881
|
+
|
|
1882
|
+
var focusFieldsetDisabled = {exports: {}};
|
|
1883
|
+
|
|
1884
|
+
(function (module, exports) {
|
|
1885
|
+
|
|
1886
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1887
|
+
value: true
|
|
1888
|
+
});
|
|
1584
1889
|
|
|
1585
1890
|
// fieldset[tabindex=0][disabled] should not be focusable, but Blink and WebKit disagree
|
|
1586
1891
|
// @specification https://www.w3.org/TR/html5/disabled-elements.html#concept-element-disabled
|
|
1587
1892
|
// @browser-issue Chromium https://crbug.com/453847
|
|
1588
1893
|
// @browser-issue WebKit https://bugs.webkit.org/show_bug.cgi?id=141086
|
|
1589
|
-
|
|
1894
|
+
exports.default = {
|
|
1590
1895
|
element: 'fieldset',
|
|
1591
1896
|
mutate: function mutate(element) {
|
|
1592
1897
|
element.setAttribute('tabindex', 0);
|
|
1593
1898
|
element.setAttribute('disabled', 'disabled');
|
|
1594
1899
|
}
|
|
1595
1900
|
};
|
|
1901
|
+
module.exports = exports['default'];
|
|
1596
1902
|
|
|
1597
|
-
|
|
1903
|
+
}(focusFieldsetDisabled, focusFieldsetDisabled.exports));
|
|
1904
|
+
|
|
1905
|
+
var focusFieldset = {exports: {}};
|
|
1906
|
+
|
|
1907
|
+
(function (module, exports) {
|
|
1908
|
+
|
|
1909
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1910
|
+
value: true
|
|
1911
|
+
});
|
|
1912
|
+
exports.default = {
|
|
1598
1913
|
element: 'fieldset',
|
|
1599
1914
|
mutate: function mutate(element) {
|
|
1600
1915
|
element.innerHTML = '<legend>legend</legend><p>content</p>';
|
|
1601
1916
|
}
|
|
1602
1917
|
};
|
|
1918
|
+
module.exports = exports['default'];
|
|
1919
|
+
|
|
1920
|
+
}(focusFieldset, focusFieldset.exports));
|
|
1921
|
+
|
|
1922
|
+
var focusFlexboxContainer = {exports: {}};
|
|
1923
|
+
|
|
1924
|
+
(function (module, exports) {
|
|
1925
|
+
|
|
1926
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1927
|
+
value: true
|
|
1928
|
+
});
|
|
1603
1929
|
|
|
1604
1930
|
// elements with display:flex are focusable in IE10-11
|
|
1605
|
-
|
|
1931
|
+
exports.default = {
|
|
1606
1932
|
element: 'span',
|
|
1607
1933
|
mutate: function mutate(element) {
|
|
1608
1934
|
element.setAttribute('style', 'display: -webkit-flex; display: -ms-flexbox; display: flex;');
|
|
1609
1935
|
element.innerHTML = '<span style="display: block;">hello</span>';
|
|
1610
1936
|
}
|
|
1611
1937
|
};
|
|
1938
|
+
module.exports = exports['default'];
|
|
1939
|
+
|
|
1940
|
+
}(focusFlexboxContainer, focusFlexboxContainer.exports));
|
|
1941
|
+
|
|
1942
|
+
var focusFormDisabled = {exports: {}};
|
|
1943
|
+
|
|
1944
|
+
(function (module, exports) {
|
|
1945
|
+
|
|
1946
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1947
|
+
value: true
|
|
1948
|
+
});
|
|
1612
1949
|
|
|
1613
1950
|
// form[tabindex=0][disabled] should be focusable as the
|
|
1614
1951
|
// specification doesn't know the disabled attribute on the form element
|
|
1615
1952
|
// @specification https://www.w3.org/TR/html5/forms.html#the-form-element
|
|
1616
|
-
|
|
1953
|
+
exports.default = {
|
|
1617
1954
|
element: 'form',
|
|
1618
1955
|
mutate: function mutate(element) {
|
|
1619
1956
|
element.setAttribute('tabindex', 0);
|
|
1620
1957
|
element.setAttribute('disabled', 'disabled');
|
|
1621
1958
|
}
|
|
1622
1959
|
};
|
|
1960
|
+
module.exports = exports['default'];
|
|
1961
|
+
|
|
1962
|
+
}(focusFormDisabled, focusFormDisabled.exports));
|
|
1963
|
+
|
|
1964
|
+
var focusImgIsmap = {exports: {}};
|
|
1965
|
+
|
|
1966
|
+
(function (module, exports) {
|
|
1967
|
+
|
|
1968
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1969
|
+
value: true
|
|
1970
|
+
});
|
|
1971
|
+
|
|
1972
|
+
var _gif = gif.exports;
|
|
1973
|
+
|
|
1974
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
1975
|
+
|
|
1976
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1623
1977
|
|
|
1624
1978
|
// NOTE: https://github.com/medialize/ally.js/issues/35
|
|
1625
1979
|
// fixes https://github.com/medialize/ally.js/issues/20
|
|
1626
1980
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-ismap
|
|
1627
|
-
|
|
1981
|
+
exports.default = {
|
|
1628
1982
|
element: 'a',
|
|
1629
1983
|
mutate: function mutate(element) {
|
|
1630
1984
|
element.href = '#void';
|
|
1631
|
-
element.innerHTML = '<img ismap src="' +
|
|
1985
|
+
element.innerHTML = '<img ismap src="' + _gif2.default + '" alt="">';
|
|
1632
1986
|
return element.querySelector('img');
|
|
1633
1987
|
}
|
|
1634
1988
|
};
|
|
1989
|
+
module.exports = exports['default'];
|
|
1990
|
+
|
|
1991
|
+
}(focusImgIsmap, focusImgIsmap.exports));
|
|
1992
|
+
|
|
1993
|
+
var focusImgUsemapTabindex = {exports: {}};
|
|
1994
|
+
|
|
1995
|
+
(function (module, exports) {
|
|
1996
|
+
|
|
1997
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1998
|
+
value: true
|
|
1999
|
+
});
|
|
2000
|
+
|
|
2001
|
+
var _gif = gif.exports;
|
|
2002
|
+
|
|
2003
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
2004
|
+
|
|
2005
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1635
2006
|
|
|
1636
2007
|
// NOTE: https://github.com/medialize/ally.js/issues/35
|
|
1637
2008
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap
|
|
1638
|
-
|
|
2009
|
+
exports.default = {
|
|
1639
2010
|
element: 'div',
|
|
1640
2011
|
mutate: function mutate(element) {
|
|
1641
|
-
element.innerHTML = '<map name="image-map-tabindex-test"><area href="#void" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-tabindex-test" tabindex="-1" alt="" ' + 'src="' +
|
|
2012
|
+
element.innerHTML = '<map name="image-map-tabindex-test"><area href="#void" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#image-map-tabindex-test" tabindex="-1" alt="" ' + 'src="' + _gif2.default + '">';
|
|
1642
2013
|
|
|
1643
2014
|
return element.querySelector('img');
|
|
1644
2015
|
}
|
|
1645
2016
|
};
|
|
2017
|
+
module.exports = exports['default'];
|
|
2018
|
+
|
|
2019
|
+
}(focusImgUsemapTabindex, focusImgUsemapTabindex.exports));
|
|
2020
|
+
|
|
2021
|
+
var focusInHiddenIframe = {exports: {}};
|
|
1646
2022
|
|
|
1647
|
-
|
|
2023
|
+
(function (module, exports) {
|
|
2024
|
+
|
|
2025
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2026
|
+
value: true
|
|
2027
|
+
});
|
|
2028
|
+
exports.default = {
|
|
1648
2029
|
element: function element(wrapper, _document) {
|
|
1649
2030
|
var iframe = _document.createElement('iframe');
|
|
1650
2031
|
|
|
@@ -1671,23 +2052,62 @@ const focusInHiddenIframe = {
|
|
|
1671
2052
|
return iframeDocument.activeElement === focus;
|
|
1672
2053
|
}
|
|
1673
2054
|
};
|
|
2055
|
+
module.exports = exports['default'];
|
|
1674
2056
|
|
|
1675
|
-
|
|
2057
|
+
}(focusInHiddenIframe, focusInHiddenIframe.exports));
|
|
1676
2058
|
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
2059
|
+
var focusInZeroDimensionObject = {exports: {}};
|
|
2060
|
+
|
|
2061
|
+
(function (module, exports) {
|
|
2062
|
+
|
|
2063
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2064
|
+
value: true
|
|
2065
|
+
});
|
|
2066
|
+
|
|
2067
|
+
exports.default = function () {
|
|
2068
|
+
return result;
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
var _platform = platform$1.exports;
|
|
2072
|
+
|
|
2073
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
2074
|
+
|
|
2075
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2076
|
+
|
|
2077
|
+
var result = !_platform2.default.is.WEBKIT;
|
|
2078
|
+
|
|
2079
|
+
module.exports = exports['default'];
|
|
2080
|
+
|
|
2081
|
+
}(focusInZeroDimensionObject, focusInZeroDimensionObject.exports));
|
|
2082
|
+
|
|
2083
|
+
var focusInvalidTabindex = {exports: {}};
|
|
2084
|
+
|
|
2085
|
+
(function (module, exports) {
|
|
2086
|
+
|
|
2087
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2088
|
+
value: true
|
|
2089
|
+
});
|
|
1680
2090
|
|
|
1681
2091
|
// Firefox allows *any* value and treats invalid values like tabindex="-1"
|
|
1682
2092
|
// @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054
|
|
1683
|
-
|
|
2093
|
+
exports.default = {
|
|
1684
2094
|
element: 'div',
|
|
1685
2095
|
mutate: function mutate(element) {
|
|
1686
2096
|
element.setAttribute('tabindex', 'invalid-value');
|
|
1687
2097
|
}
|
|
1688
2098
|
};
|
|
2099
|
+
module.exports = exports['default'];
|
|
2100
|
+
|
|
2101
|
+
}(focusInvalidTabindex, focusInvalidTabindex.exports));
|
|
1689
2102
|
|
|
1690
|
-
|
|
2103
|
+
var focusLabelTabindex = {exports: {}};
|
|
2104
|
+
|
|
2105
|
+
(function (module, exports) {
|
|
2106
|
+
|
|
2107
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2108
|
+
value: true
|
|
2109
|
+
});
|
|
2110
|
+
exports.default = {
|
|
1691
2111
|
element: 'label',
|
|
1692
2112
|
mutate: function mutate(element) {
|
|
1693
2113
|
element.setAttribute('tabindex', '-1');
|
|
@@ -1698,35 +2118,83 @@ const focusLabelTabindex = {
|
|
|
1698
2118
|
return _document.activeElement === element;
|
|
1699
2119
|
}
|
|
1700
2120
|
};
|
|
2121
|
+
module.exports = exports['default'];
|
|
2122
|
+
|
|
2123
|
+
}(focusLabelTabindex, focusLabelTabindex.exports));
|
|
1701
2124
|
|
|
1702
|
-
|
|
2125
|
+
var focusObjectSvgHidden = {exports: {}};
|
|
2126
|
+
|
|
2127
|
+
var svg$1 = {exports: {}};
|
|
2128
|
+
|
|
2129
|
+
(function (module, exports) {
|
|
2130
|
+
|
|
2131
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2132
|
+
value: true
|
|
2133
|
+
});
|
|
2134
|
+
exports.default = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtb' + 'G5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBpZD0ic3ZnIj48dGV4dCB4PSIxMCIgeT0iMjAiIGlkPSJ' + 'zdmctbGluay10ZXh0Ij50ZXh0PC90ZXh0Pjwvc3ZnPg==';
|
|
2135
|
+
module.exports = exports['default'];
|
|
2136
|
+
|
|
2137
|
+
}(svg$1, svg$1.exports));
|
|
2138
|
+
|
|
2139
|
+
(function (module, exports) {
|
|
2140
|
+
|
|
2141
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2142
|
+
value: true
|
|
2143
|
+
});
|
|
2144
|
+
|
|
2145
|
+
var _svg = svg$1.exports;
|
|
2146
|
+
|
|
2147
|
+
var _svg2 = _interopRequireDefault(_svg);
|
|
2148
|
+
|
|
2149
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1703
2150
|
|
|
1704
2151
|
// Note: IE10 on BrowserStack does not like this test
|
|
1705
2152
|
|
|
1706
|
-
|
|
2153
|
+
exports.default = {
|
|
1707
2154
|
element: 'object',
|
|
1708
2155
|
mutate: function mutate(element) {
|
|
1709
2156
|
element.setAttribute('type', 'image/svg+xml');
|
|
1710
|
-
element.setAttribute('data',
|
|
2157
|
+
element.setAttribute('data', _svg2.default);
|
|
1711
2158
|
element.setAttribute('width', '200');
|
|
1712
2159
|
element.setAttribute('height', '50');
|
|
1713
2160
|
element.style.visibility = 'hidden';
|
|
1714
2161
|
}
|
|
1715
2162
|
};
|
|
2163
|
+
module.exports = exports['default'];
|
|
1716
2164
|
|
|
1717
|
-
|
|
2165
|
+
}(focusObjectSvgHidden, focusObjectSvgHidden.exports));
|
|
1718
2166
|
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
2167
|
+
var focusObjectSvg = {exports: {}};
|
|
2168
|
+
|
|
2169
|
+
(function (module, exports) {
|
|
2170
|
+
|
|
2171
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2172
|
+
value: true
|
|
2173
|
+
});
|
|
2174
|
+
|
|
2175
|
+
var _svg = svg$1.exports;
|
|
2176
|
+
|
|
2177
|
+
var _svg2 = _interopRequireDefault(_svg);
|
|
2178
|
+
|
|
2179
|
+
var _platform = platform$1.exports;
|
|
2180
|
+
|
|
2181
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
2182
|
+
|
|
2183
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2184
|
+
|
|
2185
|
+
// Note: IE10 on BrowserStack does not like this test
|
|
2186
|
+
|
|
2187
|
+
exports.default = {
|
|
2188
|
+
name: 'can-focus-object-svg',
|
|
2189
|
+
element: 'object',
|
|
2190
|
+
mutate: function mutate(element) {
|
|
2191
|
+
element.setAttribute('type', 'image/svg+xml');
|
|
2192
|
+
element.setAttribute('data', _svg2.default);
|
|
1725
2193
|
element.setAttribute('width', '200');
|
|
1726
2194
|
element.setAttribute('height', '50');
|
|
1727
2195
|
},
|
|
1728
2196
|
validate: function validate(element, focusTarget, _document) {
|
|
1729
|
-
if (
|
|
2197
|
+
if (_platform2.default.is.GECKO) {
|
|
1730
2198
|
// Firefox seems to be handling the object creation asynchronously and thereby produces a false negative test result.
|
|
1731
2199
|
// Because we know Firefox is able to focus object elements referencing SVGs, we simply cheat by sniffing the user agent string
|
|
1732
2200
|
return true;
|
|
@@ -1735,18 +2203,53 @@ const focusObjectSvg = {
|
|
|
1735
2203
|
return _document.activeElement === element;
|
|
1736
2204
|
}
|
|
1737
2205
|
};
|
|
2206
|
+
module.exports = exports['default'];
|
|
2207
|
+
|
|
2208
|
+
}(focusObjectSvg, focusObjectSvg.exports));
|
|
2209
|
+
|
|
2210
|
+
var focusObjectSwf = {exports: {}};
|
|
2211
|
+
|
|
2212
|
+
(function (module, exports) {
|
|
2213
|
+
|
|
2214
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2215
|
+
value: true
|
|
2216
|
+
});
|
|
2217
|
+
|
|
2218
|
+
exports.default = function () {
|
|
2219
|
+
return result;
|
|
2220
|
+
};
|
|
2221
|
+
|
|
2222
|
+
var _platform = platform$1.exports;
|
|
2223
|
+
|
|
2224
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
2225
|
+
|
|
2226
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1738
2227
|
|
|
1739
2228
|
// Every Environment except IE9 considers SWF objects focusable
|
|
1740
|
-
var result
|
|
2229
|
+
var result = !_platform2.default.is.IE9;
|
|
1741
2230
|
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
}
|
|
2231
|
+
module.exports = exports['default'];
|
|
2232
|
+
|
|
2233
|
+
}(focusObjectSwf, focusObjectSwf.exports));
|
|
2234
|
+
|
|
2235
|
+
var focusRedirectImgUsemap = {exports: {}};
|
|
2236
|
+
|
|
2237
|
+
(function (module, exports) {
|
|
2238
|
+
|
|
2239
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2240
|
+
value: true
|
|
2241
|
+
});
|
|
2242
|
+
|
|
2243
|
+
var _gif = gif.exports;
|
|
2244
|
+
|
|
2245
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
1745
2246
|
|
|
1746
|
-
|
|
2247
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2248
|
+
|
|
2249
|
+
exports.default = {
|
|
1747
2250
|
element: 'div',
|
|
1748
2251
|
mutate: function mutate(element) {
|
|
1749
|
-
element.innerHTML = '<map name="focus-redirect-img-usemap"><area href="#void" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#focus-redirect-img-usemap" alt="" ' + 'src="' +
|
|
2252
|
+
element.innerHTML = '<map name="focus-redirect-img-usemap"><area href="#void" shape="rect" coords="63,19,144,45"></map>' + '<img usemap="#focus-redirect-img-usemap" alt="" ' + 'src="' + _gif2.default + '">';
|
|
1750
2253
|
|
|
1751
2254
|
// focus the <img>, not the <div>
|
|
1752
2255
|
return element.querySelector('img');
|
|
@@ -1756,10 +2259,21 @@ const focusRedirectImgUsemap = {
|
|
|
1756
2259
|
return _document.activeElement === target;
|
|
1757
2260
|
}
|
|
1758
2261
|
};
|
|
2262
|
+
module.exports = exports['default'];
|
|
2263
|
+
|
|
2264
|
+
}(focusRedirectImgUsemap, focusRedirectImgUsemap.exports));
|
|
2265
|
+
|
|
2266
|
+
var focusRedirectLegend = {exports: {}};
|
|
2267
|
+
|
|
2268
|
+
(function (module, exports) {
|
|
2269
|
+
|
|
2270
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2271
|
+
value: true
|
|
2272
|
+
});
|
|
1759
2273
|
|
|
1760
2274
|
// see https://jsbin.com/nenirisage/edit?html,js,console,output
|
|
1761
2275
|
|
|
1762
|
-
|
|
2276
|
+
exports.default = {
|
|
1763
2277
|
element: 'fieldset',
|
|
1764
2278
|
mutate: function mutate(element) {
|
|
1765
2279
|
element.innerHTML = '<legend>legend</legend><input tabindex="-1"><input tabindex="0">';
|
|
@@ -1778,9 +2292,20 @@ const focusRedirectLegend = {
|
|
|
1778
2292
|
return _document.activeElement === focusable && 'focusable' || _document.activeElement === tabbable && 'tabbable' || '';
|
|
1779
2293
|
}
|
|
1780
2294
|
};
|
|
2295
|
+
module.exports = exports['default'];
|
|
2296
|
+
|
|
2297
|
+
}(focusRedirectLegend, focusRedirectLegend.exports));
|
|
2298
|
+
|
|
2299
|
+
var focusScrollBody = {exports: {}};
|
|
2300
|
+
|
|
2301
|
+
(function (module, exports) {
|
|
2302
|
+
|
|
2303
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2304
|
+
value: true
|
|
2305
|
+
});
|
|
1781
2306
|
|
|
1782
2307
|
// https://github.com/medialize/ally.js/issues/21
|
|
1783
|
-
|
|
2308
|
+
exports.default = {
|
|
1784
2309
|
element: 'div',
|
|
1785
2310
|
mutate: function mutate(element) {
|
|
1786
2311
|
element.setAttribute('style', 'width: 100px; height: 50px; overflow: auto;');
|
|
@@ -1788,41 +2313,81 @@ const focusScrollBody = {
|
|
|
1788
2313
|
return element.querySelector('div');
|
|
1789
2314
|
}
|
|
1790
2315
|
};
|
|
2316
|
+
module.exports = exports['default'];
|
|
2317
|
+
|
|
2318
|
+
}(focusScrollBody, focusScrollBody.exports));
|
|
2319
|
+
|
|
2320
|
+
var focusScrollContainerWithoutOverflow = {exports: {}};
|
|
2321
|
+
|
|
2322
|
+
(function (module, exports) {
|
|
2323
|
+
|
|
2324
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2325
|
+
value: true
|
|
2326
|
+
});
|
|
1791
2327
|
|
|
1792
2328
|
// https://github.com/medialize/ally.js/issues/21
|
|
1793
|
-
|
|
2329
|
+
exports.default = {
|
|
1794
2330
|
element: 'div',
|
|
1795
2331
|
mutate: function mutate(element) {
|
|
1796
2332
|
element.setAttribute('style', 'width: 100px; height: 50px;');
|
|
1797
2333
|
element.innerHTML = '<div style="width: 500px; height: 40px;">scrollable content</div>';
|
|
1798
2334
|
}
|
|
1799
2335
|
};
|
|
2336
|
+
module.exports = exports['default'];
|
|
2337
|
+
|
|
2338
|
+
}(focusScrollContainerWithoutOverflow, focusScrollContainerWithoutOverflow.exports));
|
|
2339
|
+
|
|
2340
|
+
var focusScrollContainer = {exports: {}};
|
|
2341
|
+
|
|
2342
|
+
(function (module, exports) {
|
|
2343
|
+
|
|
2344
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2345
|
+
value: true
|
|
2346
|
+
});
|
|
1800
2347
|
|
|
1801
2348
|
// https://github.com/medialize/ally.js/issues/21
|
|
1802
|
-
|
|
2349
|
+
exports.default = {
|
|
1803
2350
|
element: 'div',
|
|
1804
2351
|
mutate: function mutate(element) {
|
|
1805
2352
|
element.setAttribute('style', 'width: 100px; height: 50px; overflow: auto;');
|
|
1806
2353
|
element.innerHTML = '<div style="width: 500px; height: 40px;">scrollable content</div>';
|
|
1807
2354
|
}
|
|
1808
2355
|
};
|
|
2356
|
+
module.exports = exports['default'];
|
|
2357
|
+
|
|
2358
|
+
}(focusScrollContainer, focusScrollContainer.exports));
|
|
1809
2359
|
|
|
1810
|
-
|
|
2360
|
+
var focusSummary = {exports: {}};
|
|
2361
|
+
|
|
2362
|
+
(function (module, exports) {
|
|
2363
|
+
|
|
2364
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2365
|
+
value: true
|
|
2366
|
+
});
|
|
2367
|
+
exports.default = {
|
|
1811
2368
|
element: 'details',
|
|
1812
2369
|
mutate: function mutate(element) {
|
|
1813
2370
|
element.innerHTML = '<summary>foo</summary><p>content</p>';
|
|
1814
2371
|
return element.firstElementChild;
|
|
1815
2372
|
}
|
|
1816
2373
|
};
|
|
2374
|
+
module.exports = exports['default'];
|
|
1817
2375
|
|
|
1818
|
-
|
|
1819
|
-
var fragment = document.createElement('div');
|
|
1820
|
-
fragment.innerHTML = '<svg><foreignObject width="30" height="30">\n <input type="text"/>\n </foreignObject></svg>';
|
|
2376
|
+
}(focusSummary, focusSummary.exports));
|
|
1821
2377
|
|
|
1822
|
-
|
|
1823
|
-
|
|
2378
|
+
var focusSvgFocusableAttribute = {exports: {}};
|
|
2379
|
+
|
|
2380
|
+
var svg = {};
|
|
2381
|
+
|
|
2382
|
+
var focus_svgForeignObjectHack = {exports: {}};
|
|
1824
2383
|
|
|
1825
|
-
function
|
|
2384
|
+
(function (module, exports) {
|
|
2385
|
+
|
|
2386
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2387
|
+
value: true
|
|
2388
|
+
});
|
|
2389
|
+
|
|
2390
|
+
exports.default = function (element) {
|
|
1826
2391
|
// Edge13, Edge14: foreignObject focus hack
|
|
1827
2392
|
// https://jsbin.com/kunehinugi/edit?html,js,output
|
|
1828
2393
|
// https://jsbin.com/fajagi/3/edit?html,js,output
|
|
@@ -1846,8 +2411,32 @@ function focusSvgForeignObjectHack (element) {
|
|
|
1846
2411
|
// clean up
|
|
1847
2412
|
element.removeChild(foreignObject);
|
|
1848
2413
|
return true;
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2416
|
+
function makeFocusableForeignObject() {
|
|
2417
|
+
var fragment = document.createElement('div');
|
|
2418
|
+
fragment.innerHTML = '<svg><foreignObject width="30" height="30">\n <input type="text"/>\n </foreignObject></svg>';
|
|
2419
|
+
|
|
2420
|
+
return fragment.firstChild.firstChild;
|
|
1849
2421
|
}
|
|
1850
2422
|
|
|
2423
|
+
module.exports = exports['default'];
|
|
2424
|
+
|
|
2425
|
+
}(focus_svgForeignObjectHack, focus_svgForeignObjectHack.exports));
|
|
2426
|
+
|
|
2427
|
+
Object.defineProperty(svg, "__esModule", {
|
|
2428
|
+
value: true
|
|
2429
|
+
});
|
|
2430
|
+
svg.generate = generate;
|
|
2431
|
+
svg.focus = focus;
|
|
2432
|
+
svg.validate = validate;
|
|
2433
|
+
|
|
2434
|
+
var _focus = focus_svgForeignObjectHack.exports;
|
|
2435
|
+
|
|
2436
|
+
var _focus2 = _interopRequireDefault$1(_focus);
|
|
2437
|
+
|
|
2438
|
+
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2439
|
+
|
|
1851
2440
|
function generate(element) {
|
|
1852
2441
|
return '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' + element + '</svg>';
|
|
1853
2442
|
}
|
|
@@ -1860,7 +2449,7 @@ function focus(element) {
|
|
|
1860
2449
|
try {
|
|
1861
2450
|
HTMLElement.prototype.focus.call(element);
|
|
1862
2451
|
} catch (e) {
|
|
1863
|
-
|
|
2452
|
+
(0, _focus2.default)(element);
|
|
1864
2453
|
}
|
|
1865
2454
|
}
|
|
1866
2455
|
|
|
@@ -1869,84 +2458,196 @@ function validate(element, focusTarget, _document) {
|
|
|
1869
2458
|
return _document.activeElement === focusTarget;
|
|
1870
2459
|
}
|
|
1871
2460
|
|
|
1872
|
-
|
|
2461
|
+
(function (module, exports) {
|
|
2462
|
+
|
|
2463
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2464
|
+
value: true
|
|
2465
|
+
});
|
|
2466
|
+
|
|
2467
|
+
var _svg = svg;
|
|
2468
|
+
|
|
2469
|
+
exports.default = {
|
|
1873
2470
|
element: 'div',
|
|
1874
2471
|
mutate: function mutate(element) {
|
|
1875
|
-
element.innerHTML = generate('<text focusable="true">a</text>');
|
|
2472
|
+
element.innerHTML = (0, _svg.generate)('<text focusable="true">a</text>');
|
|
1876
2473
|
return element.querySelector('text');
|
|
1877
2474
|
},
|
|
1878
|
-
validate: validate
|
|
2475
|
+
validate: _svg.validate
|
|
1879
2476
|
};
|
|
2477
|
+
module.exports = exports['default'];
|
|
2478
|
+
|
|
2479
|
+
}(focusSvgFocusableAttribute, focusSvgFocusableAttribute.exports));
|
|
2480
|
+
|
|
2481
|
+
var focusSvgTabindexAttribute = {exports: {}};
|
|
2482
|
+
|
|
2483
|
+
(function (module, exports) {
|
|
2484
|
+
|
|
2485
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2486
|
+
value: true
|
|
2487
|
+
});
|
|
1880
2488
|
|
|
1881
|
-
|
|
2489
|
+
var _svg = svg;
|
|
2490
|
+
|
|
2491
|
+
exports.default = {
|
|
1882
2492
|
element: 'div',
|
|
1883
2493
|
mutate: function mutate(element) {
|
|
1884
|
-
element.innerHTML = generate('<text tabindex="0">a</text>');
|
|
2494
|
+
element.innerHTML = (0, _svg.generate)('<text tabindex="0">a</text>');
|
|
1885
2495
|
return element.querySelector('text');
|
|
1886
2496
|
},
|
|
1887
|
-
validate: validate
|
|
2497
|
+
validate: _svg.validate
|
|
1888
2498
|
};
|
|
2499
|
+
module.exports = exports['default'];
|
|
2500
|
+
|
|
2501
|
+
}(focusSvgTabindexAttribute, focusSvgTabindexAttribute.exports));
|
|
2502
|
+
|
|
2503
|
+
var focusSvgNegativeTabindexAttribute = {exports: {}};
|
|
2504
|
+
|
|
2505
|
+
(function (module, exports) {
|
|
2506
|
+
|
|
2507
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2508
|
+
value: true
|
|
2509
|
+
});
|
|
2510
|
+
|
|
2511
|
+
var _svg = svg;
|
|
1889
2512
|
|
|
1890
|
-
|
|
2513
|
+
exports.default = {
|
|
1891
2514
|
element: 'div',
|
|
1892
2515
|
mutate: function mutate(element) {
|
|
1893
|
-
element.innerHTML = generate('<text tabindex="-1">a</text>');
|
|
2516
|
+
element.innerHTML = (0, _svg.generate)('<text tabindex="-1">a</text>');
|
|
1894
2517
|
return element.querySelector('text');
|
|
1895
2518
|
},
|
|
1896
|
-
validate: validate
|
|
2519
|
+
validate: _svg.validate
|
|
1897
2520
|
};
|
|
2521
|
+
module.exports = exports['default'];
|
|
2522
|
+
|
|
2523
|
+
}(focusSvgNegativeTabindexAttribute, focusSvgNegativeTabindexAttribute.exports));
|
|
2524
|
+
|
|
2525
|
+
var focusSvgUseTabindex = {exports: {}};
|
|
2526
|
+
|
|
2527
|
+
(function (module, exports) {
|
|
1898
2528
|
|
|
1899
|
-
|
|
2529
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2530
|
+
value: true
|
|
2531
|
+
});
|
|
2532
|
+
|
|
2533
|
+
var _svg = svg;
|
|
2534
|
+
|
|
2535
|
+
exports.default = {
|
|
1900
2536
|
element: 'div',
|
|
1901
2537
|
mutate: function mutate(element) {
|
|
1902
|
-
element.innerHTML = generate(['<g id="ally-test-target"><a xlink:href="#void"><text>link</text></a></g>', '<use xlink:href="#ally-test-target" x="0" y="0" tabindex="-1" />'].join(''));
|
|
2538
|
+
element.innerHTML = (0, _svg.generate)(['<g id="ally-test-target"><a xlink:href="#void"><text>link</text></a></g>', '<use xlink:href="#ally-test-target" x="0" y="0" tabindex="-1" />'].join(''));
|
|
1903
2539
|
|
|
1904
2540
|
return element.querySelector('use');
|
|
1905
2541
|
},
|
|
1906
|
-
validate: validate
|
|
2542
|
+
validate: _svg.validate
|
|
1907
2543
|
};
|
|
2544
|
+
module.exports = exports['default'];
|
|
2545
|
+
|
|
2546
|
+
}(focusSvgUseTabindex, focusSvgUseTabindex.exports));
|
|
2547
|
+
|
|
2548
|
+
var focusSvgForeignobjectTabindex = {exports: {}};
|
|
1908
2549
|
|
|
1909
|
-
|
|
2550
|
+
(function (module, exports) {
|
|
2551
|
+
|
|
2552
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2553
|
+
value: true
|
|
2554
|
+
});
|
|
2555
|
+
|
|
2556
|
+
var _svg = svg;
|
|
2557
|
+
|
|
2558
|
+
exports.default = {
|
|
1910
2559
|
element: 'div',
|
|
1911
2560
|
mutate: function mutate(element) {
|
|
1912
|
-
element.innerHTML = generate('<foreignObject tabindex="-1"><input type="text" /></foreignObject>');
|
|
2561
|
+
element.innerHTML = (0, _svg.generate)('<foreignObject tabindex="-1"><input type="text" /></foreignObject>');
|
|
1913
2562
|
// Safari 8's quersSelector() can't identify foreignObject, but getElementyByTagName() can
|
|
1914
2563
|
return element.querySelector('foreignObject') || element.getElementsByTagName('foreignObject')[0];
|
|
1915
2564
|
},
|
|
1916
|
-
validate: validate
|
|
2565
|
+
validate: _svg.validate
|
|
2566
|
+
|
|
2567
|
+
};
|
|
2568
|
+
module.exports = exports['default'];
|
|
2569
|
+
|
|
2570
|
+
}(focusSvgForeignobjectTabindex, focusSvgForeignobjectTabindex.exports));
|
|
2571
|
+
|
|
2572
|
+
var focusSvgInIframe = {exports: {}};
|
|
2573
|
+
|
|
2574
|
+
(function (module, exports) {
|
|
2575
|
+
|
|
2576
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2577
|
+
value: true
|
|
2578
|
+
});
|
|
1917
2579
|
|
|
2580
|
+
exports.default = function () {
|
|
2581
|
+
return result;
|
|
1918
2582
|
};
|
|
1919
2583
|
|
|
2584
|
+
var _platform = platform$1.exports;
|
|
2585
|
+
|
|
2586
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
2587
|
+
|
|
2588
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2589
|
+
|
|
1920
2590
|
// Firefox seems to be handling the SVG-document-in-iframe creation asynchronously
|
|
1921
2591
|
// and thereby produces a false negative test result. Thus the test is pointless
|
|
1922
2592
|
// and we resort to UA sniffing once again.
|
|
1923
2593
|
// see http://jsbin.com/vunadohoko/1/edit?js,console,output
|
|
1924
2594
|
|
|
1925
|
-
var result
|
|
2595
|
+
var result = Boolean(_platform2.default.is.GECKO && typeof SVGElement !== 'undefined' && SVGElement.prototype.focus);
|
|
1926
2596
|
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
}
|
|
2597
|
+
module.exports = exports['default'];
|
|
2598
|
+
|
|
2599
|
+
}(focusSvgInIframe, focusSvgInIframe.exports));
|
|
2600
|
+
|
|
2601
|
+
var focusSvg = {exports: {}};
|
|
2602
|
+
|
|
2603
|
+
(function (module, exports) {
|
|
2604
|
+
|
|
2605
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2606
|
+
value: true
|
|
2607
|
+
});
|
|
2608
|
+
|
|
2609
|
+
var _svg = svg;
|
|
1930
2610
|
|
|
1931
|
-
|
|
2611
|
+
exports.default = {
|
|
1932
2612
|
element: 'div',
|
|
1933
2613
|
mutate: function mutate(element) {
|
|
1934
|
-
element.innerHTML = generate('');
|
|
2614
|
+
element.innerHTML = (0, _svg.generate)('');
|
|
1935
2615
|
return element.firstChild;
|
|
1936
2616
|
},
|
|
1937
|
-
validate: validate
|
|
2617
|
+
validate: _svg.validate
|
|
1938
2618
|
};
|
|
2619
|
+
module.exports = exports['default'];
|
|
2620
|
+
|
|
2621
|
+
}(focusSvg, focusSvg.exports));
|
|
2622
|
+
|
|
2623
|
+
var focusTabindexTrailingCharacters = {exports: {}};
|
|
2624
|
+
|
|
2625
|
+
(function (module, exports) {
|
|
2626
|
+
|
|
2627
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2628
|
+
value: true
|
|
2629
|
+
});
|
|
1939
2630
|
|
|
1940
2631
|
// Firefox allows *any* value and treats invalid values like tabindex="-1"
|
|
1941
2632
|
// @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054
|
|
1942
|
-
|
|
2633
|
+
exports.default = {
|
|
1943
2634
|
element: 'div',
|
|
1944
2635
|
mutate: function mutate(element) {
|
|
1945
2636
|
element.setAttribute('tabindex', '3x');
|
|
1946
2637
|
}
|
|
1947
2638
|
};
|
|
2639
|
+
module.exports = exports['default'];
|
|
2640
|
+
|
|
2641
|
+
}(focusTabindexTrailingCharacters, focusTabindexTrailingCharacters.exports));
|
|
2642
|
+
|
|
2643
|
+
var focusTable = {exports: {}};
|
|
2644
|
+
|
|
2645
|
+
(function (module, exports) {
|
|
1948
2646
|
|
|
1949
|
-
|
|
2647
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2648
|
+
value: true
|
|
2649
|
+
});
|
|
2650
|
+
exports.default = {
|
|
1950
2651
|
element: 'table',
|
|
1951
2652
|
mutate: function mutate(element, wrapper, _document) {
|
|
1952
2653
|
// IE9 has a problem replacing TBODY contents with innerHTML.
|
|
@@ -1957,71 +2658,308 @@ const focusTable = {
|
|
|
1957
2658
|
element.appendChild(fragment);
|
|
1958
2659
|
}
|
|
1959
2660
|
};
|
|
2661
|
+
module.exports = exports['default'];
|
|
2662
|
+
|
|
2663
|
+
}(focusTable, focusTable.exports));
|
|
2664
|
+
|
|
2665
|
+
var focusVideoWithoutControls = {exports: {}};
|
|
2666
|
+
|
|
2667
|
+
var mp4 = {exports: {}};
|
|
2668
|
+
|
|
2669
|
+
(function (module, exports) {
|
|
1960
2670
|
|
|
1961
|
-
|
|
2671
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2672
|
+
value: true
|
|
2673
|
+
});
|
|
2674
|
+
|
|
2675
|
+
var _gif = gif.exports;
|
|
2676
|
+
|
|
2677
|
+
var _gif2 = _interopRequireDefault(_gif);
|
|
2678
|
+
|
|
2679
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2680
|
+
|
|
2681
|
+
exports.default = _gif2.default;
|
|
2682
|
+
// export default 'data:video/mp4;base64,video-focus-test';
|
|
2683
|
+
|
|
2684
|
+
module.exports = exports['default'];
|
|
2685
|
+
|
|
2686
|
+
}(mp4, mp4.exports));
|
|
2687
|
+
|
|
2688
|
+
(function (module, exports) {
|
|
2689
|
+
|
|
2690
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2691
|
+
value: true
|
|
2692
|
+
});
|
|
2693
|
+
|
|
2694
|
+
var _mp = mp4.exports;
|
|
2695
|
+
|
|
2696
|
+
var _mp2 = _interopRequireDefault(_mp);
|
|
2697
|
+
|
|
2698
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2699
|
+
|
|
2700
|
+
exports.default = {
|
|
1962
2701
|
element: 'video',
|
|
1963
2702
|
mutate: function mutate(element) {
|
|
1964
2703
|
try {
|
|
1965
2704
|
// invalid media file can trigger warning in console, data-uri to prevent HTTP request
|
|
1966
|
-
element.setAttribute('src',
|
|
2705
|
+
element.setAttribute('src', _mp2.default);
|
|
1967
2706
|
} catch (e) {
|
|
1968
2707
|
// IE9 may throw "Error: Not implemented"
|
|
1969
2708
|
}
|
|
1970
2709
|
}
|
|
1971
2710
|
};
|
|
2711
|
+
module.exports = exports['default'];
|
|
1972
2712
|
|
|
1973
|
-
|
|
1974
|
-
var result = platform.is.GECKO || platform.is.TRIDENT || platform.is.EDGE;
|
|
2713
|
+
}(focusVideoWithoutControls, focusVideoWithoutControls.exports));
|
|
1975
2714
|
|
|
1976
|
-
|
|
2715
|
+
var tabsequenceAreaAtImgPosition = {exports: {}};
|
|
2716
|
+
|
|
2717
|
+
(function (module, exports) {
|
|
2718
|
+
|
|
2719
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2720
|
+
value: true
|
|
2721
|
+
});
|
|
2722
|
+
|
|
2723
|
+
exports.default = function () {
|
|
1977
2724
|
return result;
|
|
1978
|
-
}
|
|
2725
|
+
};
|
|
2726
|
+
|
|
2727
|
+
var _platform = platform$1.exports;
|
|
2728
|
+
|
|
2729
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
2730
|
+
|
|
2731
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2732
|
+
|
|
2733
|
+
// https://jsbin.com/vafaba/3/edit?html,js,console,output
|
|
2734
|
+
var result = _platform2.default.is.GECKO || _platform2.default.is.TRIDENT || _platform2.default.is.EDGE;
|
|
2735
|
+
|
|
2736
|
+
module.exports = exports['default'];
|
|
2737
|
+
|
|
2738
|
+
}(tabsequenceAreaAtImgPosition, tabsequenceAreaAtImgPosition.exports));
|
|
2739
|
+
|
|
2740
|
+
(function (module, exports) {
|
|
2741
|
+
|
|
2742
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2743
|
+
value: true
|
|
2744
|
+
});
|
|
2745
|
+
|
|
2746
|
+
exports.default = function () {
|
|
2747
|
+
if (supportsCache$1) {
|
|
2748
|
+
return supportsCache$1;
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
supportsCache$1 = _supportsCache2.default.get();
|
|
2752
|
+
if (!supportsCache$1.time) {
|
|
2753
|
+
_supportsCache2.default.set(executeTests());
|
|
2754
|
+
supportsCache$1 = _supportsCache2.default.get();
|
|
2755
|
+
}
|
|
2756
|
+
|
|
2757
|
+
return supportsCache$1;
|
|
2758
|
+
};
|
|
2759
|
+
|
|
2760
|
+
var _detectFocus = detectFocus.exports;
|
|
2761
|
+
|
|
2762
|
+
var _detectFocus2 = _interopRequireDefault(_detectFocus);
|
|
2763
|
+
|
|
2764
|
+
var _supportsCache = supportsCache.exports;
|
|
2765
|
+
|
|
2766
|
+
var _supportsCache2 = _interopRequireDefault(_supportsCache);
|
|
2767
|
+
|
|
2768
|
+
var _cssShadowPiercingDeepCombinator = cssShadowPiercingDeepCombinator.exports;
|
|
2769
|
+
|
|
2770
|
+
var _cssShadowPiercingDeepCombinator2 = _interopRequireDefault(_cssShadowPiercingDeepCombinator);
|
|
2771
|
+
|
|
2772
|
+
var _focusAreaImgTabindex = focusAreaImgTabindex.exports;
|
|
2773
|
+
|
|
2774
|
+
var _focusAreaImgTabindex2 = _interopRequireDefault(_focusAreaImgTabindex);
|
|
2775
|
+
|
|
2776
|
+
var _focusAreaTabindex = focusAreaTabindex.exports;
|
|
2777
|
+
|
|
2778
|
+
var _focusAreaTabindex2 = _interopRequireDefault(_focusAreaTabindex);
|
|
2779
|
+
|
|
2780
|
+
var _focusAreaWithoutHref = focusAreaWithoutHref.exports;
|
|
2781
|
+
|
|
2782
|
+
var _focusAreaWithoutHref2 = _interopRequireDefault(_focusAreaWithoutHref);
|
|
2783
|
+
|
|
2784
|
+
var _focusAudioWithoutControls = focusAudioWithoutControls.exports;
|
|
2785
|
+
|
|
2786
|
+
var _focusAudioWithoutControls2 = _interopRequireDefault(_focusAudioWithoutControls);
|
|
2787
|
+
|
|
2788
|
+
var _focusBrokenImageMap = focusBrokenImageMap.exports;
|
|
2789
|
+
|
|
2790
|
+
var _focusBrokenImageMap2 = _interopRequireDefault(_focusBrokenImageMap);
|
|
2791
|
+
|
|
2792
|
+
var _focusChildrenOfFocusableFlexbox = focusChildrenOfFocusableFlexbox.exports;
|
|
2793
|
+
|
|
2794
|
+
var _focusChildrenOfFocusableFlexbox2 = _interopRequireDefault(_focusChildrenOfFocusableFlexbox);
|
|
2795
|
+
|
|
2796
|
+
var _focusFieldsetDisabled = focusFieldsetDisabled.exports;
|
|
2797
|
+
|
|
2798
|
+
var _focusFieldsetDisabled2 = _interopRequireDefault(_focusFieldsetDisabled);
|
|
2799
|
+
|
|
2800
|
+
var _focusFieldset = focusFieldset.exports;
|
|
2801
|
+
|
|
2802
|
+
var _focusFieldset2 = _interopRequireDefault(_focusFieldset);
|
|
2803
|
+
|
|
2804
|
+
var _focusFlexboxContainer = focusFlexboxContainer.exports;
|
|
2805
|
+
|
|
2806
|
+
var _focusFlexboxContainer2 = _interopRequireDefault(_focusFlexboxContainer);
|
|
2807
|
+
|
|
2808
|
+
var _focusFormDisabled = focusFormDisabled.exports;
|
|
2809
|
+
|
|
2810
|
+
var _focusFormDisabled2 = _interopRequireDefault(_focusFormDisabled);
|
|
2811
|
+
|
|
2812
|
+
var _focusImgIsmap = focusImgIsmap.exports;
|
|
2813
|
+
|
|
2814
|
+
var _focusImgIsmap2 = _interopRequireDefault(_focusImgIsmap);
|
|
2815
|
+
|
|
2816
|
+
var _focusImgUsemapTabindex = focusImgUsemapTabindex.exports;
|
|
2817
|
+
|
|
2818
|
+
var _focusImgUsemapTabindex2 = _interopRequireDefault(_focusImgUsemapTabindex);
|
|
2819
|
+
|
|
2820
|
+
var _focusInHiddenIframe = focusInHiddenIframe.exports;
|
|
2821
|
+
|
|
2822
|
+
var _focusInHiddenIframe2 = _interopRequireDefault(_focusInHiddenIframe);
|
|
2823
|
+
|
|
2824
|
+
var _focusInZeroDimensionObject = focusInZeroDimensionObject.exports;
|
|
2825
|
+
|
|
2826
|
+
var _focusInZeroDimensionObject2 = _interopRequireDefault(_focusInZeroDimensionObject);
|
|
2827
|
+
|
|
2828
|
+
var _focusInvalidTabindex = focusInvalidTabindex.exports;
|
|
2829
|
+
|
|
2830
|
+
var _focusInvalidTabindex2 = _interopRequireDefault(_focusInvalidTabindex);
|
|
2831
|
+
|
|
2832
|
+
var _focusLabelTabindex = focusLabelTabindex.exports;
|
|
2833
|
+
|
|
2834
|
+
var _focusLabelTabindex2 = _interopRequireDefault(_focusLabelTabindex);
|
|
2835
|
+
|
|
2836
|
+
var _focusObjectSvgHidden = focusObjectSvgHidden.exports;
|
|
2837
|
+
|
|
2838
|
+
var _focusObjectSvgHidden2 = _interopRequireDefault(_focusObjectSvgHidden);
|
|
2839
|
+
|
|
2840
|
+
var _focusObjectSvg = focusObjectSvg.exports;
|
|
2841
|
+
|
|
2842
|
+
var _focusObjectSvg2 = _interopRequireDefault(_focusObjectSvg);
|
|
2843
|
+
|
|
2844
|
+
var _focusObjectSwf = focusObjectSwf.exports;
|
|
2845
|
+
|
|
2846
|
+
var _focusObjectSwf2 = _interopRequireDefault(_focusObjectSwf);
|
|
2847
|
+
|
|
2848
|
+
var _focusRedirectImgUsemap = focusRedirectImgUsemap.exports;
|
|
2849
|
+
|
|
2850
|
+
var _focusRedirectImgUsemap2 = _interopRequireDefault(_focusRedirectImgUsemap);
|
|
2851
|
+
|
|
2852
|
+
var _focusRedirectLegend = focusRedirectLegend.exports;
|
|
2853
|
+
|
|
2854
|
+
var _focusRedirectLegend2 = _interopRequireDefault(_focusRedirectLegend);
|
|
2855
|
+
|
|
2856
|
+
var _focusScrollBody = focusScrollBody.exports;
|
|
2857
|
+
|
|
2858
|
+
var _focusScrollBody2 = _interopRequireDefault(_focusScrollBody);
|
|
2859
|
+
|
|
2860
|
+
var _focusScrollContainerWithoutOverflow = focusScrollContainerWithoutOverflow.exports;
|
|
2861
|
+
|
|
2862
|
+
var _focusScrollContainerWithoutOverflow2 = _interopRequireDefault(_focusScrollContainerWithoutOverflow);
|
|
2863
|
+
|
|
2864
|
+
var _focusScrollContainer = focusScrollContainer.exports;
|
|
2865
|
+
|
|
2866
|
+
var _focusScrollContainer2 = _interopRequireDefault(_focusScrollContainer);
|
|
2867
|
+
|
|
2868
|
+
var _focusSummary = focusSummary.exports;
|
|
2869
|
+
|
|
2870
|
+
var _focusSummary2 = _interopRequireDefault(_focusSummary);
|
|
2871
|
+
|
|
2872
|
+
var _focusSvgFocusableAttribute = focusSvgFocusableAttribute.exports;
|
|
2873
|
+
|
|
2874
|
+
var _focusSvgFocusableAttribute2 = _interopRequireDefault(_focusSvgFocusableAttribute);
|
|
2875
|
+
|
|
2876
|
+
var _focusSvgTabindexAttribute = focusSvgTabindexAttribute.exports;
|
|
2877
|
+
|
|
2878
|
+
var _focusSvgTabindexAttribute2 = _interopRequireDefault(_focusSvgTabindexAttribute);
|
|
2879
|
+
|
|
2880
|
+
var _focusSvgNegativeTabindexAttribute = focusSvgNegativeTabindexAttribute.exports;
|
|
2881
|
+
|
|
2882
|
+
var _focusSvgNegativeTabindexAttribute2 = _interopRequireDefault(_focusSvgNegativeTabindexAttribute);
|
|
2883
|
+
|
|
2884
|
+
var _focusSvgUseTabindex = focusSvgUseTabindex.exports;
|
|
2885
|
+
|
|
2886
|
+
var _focusSvgUseTabindex2 = _interopRequireDefault(_focusSvgUseTabindex);
|
|
2887
|
+
|
|
2888
|
+
var _focusSvgForeignobjectTabindex = focusSvgForeignobjectTabindex.exports;
|
|
2889
|
+
|
|
2890
|
+
var _focusSvgForeignobjectTabindex2 = _interopRequireDefault(_focusSvgForeignobjectTabindex);
|
|
2891
|
+
|
|
2892
|
+
var _focusSvgInIframe = focusSvgInIframe.exports;
|
|
2893
|
+
|
|
2894
|
+
var _focusSvgInIframe2 = _interopRequireDefault(_focusSvgInIframe);
|
|
2895
|
+
|
|
2896
|
+
var _focusSvg = focusSvg.exports;
|
|
2897
|
+
|
|
2898
|
+
var _focusSvg2 = _interopRequireDefault(_focusSvg);
|
|
2899
|
+
|
|
2900
|
+
var _focusTabindexTrailingCharacters = focusTabindexTrailingCharacters.exports;
|
|
2901
|
+
|
|
2902
|
+
var _focusTabindexTrailingCharacters2 = _interopRequireDefault(_focusTabindexTrailingCharacters);
|
|
2903
|
+
|
|
2904
|
+
var _focusTable = focusTable.exports;
|
|
2905
|
+
|
|
2906
|
+
var _focusTable2 = _interopRequireDefault(_focusTable);
|
|
2907
|
+
|
|
2908
|
+
var _focusVideoWithoutControls = focusVideoWithoutControls.exports;
|
|
2909
|
+
|
|
2910
|
+
var _focusVideoWithoutControls2 = _interopRequireDefault(_focusVideoWithoutControls);
|
|
2911
|
+
|
|
2912
|
+
var _tabsequenceAreaAtImgPosition = tabsequenceAreaAtImgPosition.exports;
|
|
2913
|
+
|
|
2914
|
+
var _tabsequenceAreaAtImgPosition2 = _interopRequireDefault(_tabsequenceAreaAtImgPosition);
|
|
2915
|
+
|
|
2916
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1979
2917
|
|
|
1980
2918
|
var testCallbacks = {
|
|
1981
|
-
cssShadowPiercingDeepCombinator:
|
|
1982
|
-
focusInZeroDimensionObject:
|
|
1983
|
-
focusObjectSwf:
|
|
1984
|
-
focusSvgInIframe:
|
|
1985
|
-
tabsequenceAreaAtImgPosition:
|
|
2919
|
+
cssShadowPiercingDeepCombinator: _cssShadowPiercingDeepCombinator2.default,
|
|
2920
|
+
focusInZeroDimensionObject: _focusInZeroDimensionObject2.default,
|
|
2921
|
+
focusObjectSwf: _focusObjectSwf2.default,
|
|
2922
|
+
focusSvgInIframe: _focusSvgInIframe2.default,
|
|
2923
|
+
tabsequenceAreaAtImgPosition: _tabsequenceAreaAtImgPosition2.default
|
|
1986
2924
|
};
|
|
1987
2925
|
|
|
1988
2926
|
var testDescriptions = {
|
|
1989
|
-
focusAreaImgTabindex:
|
|
1990
|
-
focusAreaTabindex:
|
|
1991
|
-
focusAreaWithoutHref:
|
|
1992
|
-
focusAudioWithoutControls:
|
|
1993
|
-
focusBrokenImageMap:
|
|
1994
|
-
focusChildrenOfFocusableFlexbox:
|
|
1995
|
-
focusFieldsetDisabled:
|
|
1996
|
-
focusFieldset:
|
|
1997
|
-
focusFlexboxContainer:
|
|
1998
|
-
focusFormDisabled:
|
|
1999
|
-
focusImgIsmap:
|
|
2000
|
-
focusImgUsemapTabindex:
|
|
2001
|
-
focusInHiddenIframe:
|
|
2002
|
-
focusInvalidTabindex:
|
|
2003
|
-
focusLabelTabindex:
|
|
2004
|
-
focusObjectSvg:
|
|
2005
|
-
focusObjectSvgHidden:
|
|
2006
|
-
focusRedirectImgUsemap:
|
|
2007
|
-
focusRedirectLegend:
|
|
2008
|
-
focusScrollBody:
|
|
2009
|
-
focusScrollContainerWithoutOverflow:
|
|
2010
|
-
focusScrollContainer:
|
|
2011
|
-
focusSummary:
|
|
2012
|
-
focusSvgFocusableAttribute:
|
|
2013
|
-
focusSvgTabindexAttribute:
|
|
2014
|
-
focusSvgNegativeTabindexAttribute:
|
|
2015
|
-
focusSvgUseTabindex:
|
|
2016
|
-
focusSvgForeignobjectTabindex:
|
|
2017
|
-
focusSvg:
|
|
2018
|
-
focusTabindexTrailingCharacters:
|
|
2019
|
-
focusTable:
|
|
2020
|
-
focusVideoWithoutControls:
|
|
2927
|
+
focusAreaImgTabindex: _focusAreaImgTabindex2.default,
|
|
2928
|
+
focusAreaTabindex: _focusAreaTabindex2.default,
|
|
2929
|
+
focusAreaWithoutHref: _focusAreaWithoutHref2.default,
|
|
2930
|
+
focusAudioWithoutControls: _focusAudioWithoutControls2.default,
|
|
2931
|
+
focusBrokenImageMap: _focusBrokenImageMap2.default,
|
|
2932
|
+
focusChildrenOfFocusableFlexbox: _focusChildrenOfFocusableFlexbox2.default,
|
|
2933
|
+
focusFieldsetDisabled: _focusFieldsetDisabled2.default,
|
|
2934
|
+
focusFieldset: _focusFieldset2.default,
|
|
2935
|
+
focusFlexboxContainer: _focusFlexboxContainer2.default,
|
|
2936
|
+
focusFormDisabled: _focusFormDisabled2.default,
|
|
2937
|
+
focusImgIsmap: _focusImgIsmap2.default,
|
|
2938
|
+
focusImgUsemapTabindex: _focusImgUsemapTabindex2.default,
|
|
2939
|
+
focusInHiddenIframe: _focusInHiddenIframe2.default,
|
|
2940
|
+
focusInvalidTabindex: _focusInvalidTabindex2.default,
|
|
2941
|
+
focusLabelTabindex: _focusLabelTabindex2.default,
|
|
2942
|
+
focusObjectSvg: _focusObjectSvg2.default,
|
|
2943
|
+
focusObjectSvgHidden: _focusObjectSvgHidden2.default,
|
|
2944
|
+
focusRedirectImgUsemap: _focusRedirectImgUsemap2.default,
|
|
2945
|
+
focusRedirectLegend: _focusRedirectLegend2.default,
|
|
2946
|
+
focusScrollBody: _focusScrollBody2.default,
|
|
2947
|
+
focusScrollContainerWithoutOverflow: _focusScrollContainerWithoutOverflow2.default,
|
|
2948
|
+
focusScrollContainer: _focusScrollContainer2.default,
|
|
2949
|
+
focusSummary: _focusSummary2.default,
|
|
2950
|
+
focusSvgFocusableAttribute: _focusSvgFocusableAttribute2.default,
|
|
2951
|
+
focusSvgTabindexAttribute: _focusSvgTabindexAttribute2.default,
|
|
2952
|
+
focusSvgNegativeTabindexAttribute: _focusSvgNegativeTabindexAttribute2.default,
|
|
2953
|
+
focusSvgUseTabindex: _focusSvgUseTabindex2.default,
|
|
2954
|
+
focusSvgForeignobjectTabindex: _focusSvgForeignobjectTabindex2.default,
|
|
2955
|
+
focusSvg: _focusSvg2.default,
|
|
2956
|
+
focusTabindexTrailingCharacters: _focusTabindexTrailingCharacters2.default,
|
|
2957
|
+
focusTable: _focusTable2.default,
|
|
2958
|
+
focusVideoWithoutControls: _focusVideoWithoutControls2.default
|
|
2021
2959
|
};
|
|
2022
2960
|
|
|
2023
2961
|
function executeTests() {
|
|
2024
|
-
var results =
|
|
2962
|
+
var results = (0, _detectFocus2.default)(testDescriptions);
|
|
2025
2963
|
Object.keys(testCallbacks).forEach(function (key) {
|
|
2026
2964
|
results[key] = testCallbacks[key]();
|
|
2027
2965
|
});
|
|
@@ -2029,37 +2967,26 @@ function executeTests() {
|
|
|
2029
2967
|
return results;
|
|
2030
2968
|
}
|
|
2031
2969
|
|
|
2032
|
-
var supportsCache = null;
|
|
2970
|
+
var supportsCache$1 = null;
|
|
2033
2971
|
|
|
2034
|
-
|
|
2035
|
-
if (supportsCache) {
|
|
2036
|
-
return supportsCache;
|
|
2037
|
-
}
|
|
2972
|
+
module.exports = exports['default'];
|
|
2038
2973
|
|
|
2039
|
-
|
|
2040
|
-
if (!supportsCache.time) {
|
|
2041
|
-
cache$1.set(executeTests());
|
|
2042
|
-
supportsCache = cache$1.get();
|
|
2043
|
-
}
|
|
2974
|
+
}(supports, supports.exports));
|
|
2044
2975
|
|
|
2045
|
-
|
|
2046
|
-
}
|
|
2976
|
+
(function (module, exports) {
|
|
2047
2977
|
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
// NOTE: all browsers agree to allow trailing spaces as well
|
|
2052
|
-
var validIntegerPatternNoTrailing = /^\s*(-|\+)?[0-9]+\s*$/;
|
|
2053
|
-
var validIntegerPatternWithTrailing = /^\s*(-|\+)?[0-9]+.*$/;
|
|
2978
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2979
|
+
value: true
|
|
2980
|
+
});
|
|
2054
2981
|
|
|
2055
|
-
function
|
|
2056
|
-
if (!supports$
|
|
2057
|
-
supports$
|
|
2982
|
+
exports.default = function (context) {
|
|
2983
|
+
if (!supports$1) {
|
|
2984
|
+
supports$1 = (0, _supports3.default)();
|
|
2058
2985
|
}
|
|
2059
2986
|
|
|
2060
|
-
var validIntegerPattern = supports$
|
|
2987
|
+
var validIntegerPattern = supports$1.focusTabindexTrailingCharacters ? validIntegerPatternWithTrailing : validIntegerPatternNoTrailing;
|
|
2061
2988
|
|
|
2062
|
-
var element =
|
|
2989
|
+
var element = (0, _contextToElement2.default)({
|
|
2063
2990
|
label: 'is/valid-tabindex',
|
|
2064
2991
|
resolveDocument: true,
|
|
2065
2992
|
context: context
|
|
@@ -2076,12 +3003,12 @@ function isValidTabindex (context) {
|
|
|
2076
3003
|
|
|
2077
3004
|
// older Firefox and Internet Explorer don't support tabindex on SVG elements
|
|
2078
3005
|
var isSvgElement = element.ownerSVGElement || element.nodeName.toLowerCase() === 'svg';
|
|
2079
|
-
if (isSvgElement && !supports$
|
|
3006
|
+
if (isSvgElement && !supports$1.focusSvgTabindexAttribute) {
|
|
2080
3007
|
return false;
|
|
2081
3008
|
}
|
|
2082
3009
|
|
|
2083
3010
|
// @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054
|
|
2084
|
-
if (supports$
|
|
3011
|
+
if (supports$1.focusInvalidTabindex) {
|
|
2085
3012
|
return true;
|
|
2086
3013
|
}
|
|
2087
3014
|
|
|
@@ -2094,10 +3021,39 @@ function isValidTabindex (context) {
|
|
|
2094
3021
|
}
|
|
2095
3022
|
|
|
2096
3023
|
return Boolean(tabindex && validIntegerPattern.test(tabindex));
|
|
2097
|
-
}
|
|
3024
|
+
};
|
|
3025
|
+
|
|
3026
|
+
var _contextToElement = contextToElement.exports;
|
|
3027
|
+
|
|
3028
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
3029
|
+
|
|
3030
|
+
var _supports2 = supports.exports;
|
|
3031
|
+
|
|
3032
|
+
var _supports3 = _interopRequireDefault(_supports2);
|
|
3033
|
+
|
|
3034
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3035
|
+
|
|
3036
|
+
// determine if an element's tabindex attribute has a valid value
|
|
3037
|
+
|
|
3038
|
+
var supports$1 = void 0;
|
|
3039
|
+
|
|
3040
|
+
// https://www.w3.org/TR/html5/infrastructure.html#rules-for-parsing-integers
|
|
3041
|
+
// NOTE: all browsers agree to allow trailing spaces as well
|
|
3042
|
+
var validIntegerPatternNoTrailing = /^\s*(-|\+)?[0-9]+\s*$/;
|
|
3043
|
+
var validIntegerPatternWithTrailing = /^\s*(-|\+)?[0-9]+.*$/;
|
|
2098
3044
|
|
|
2099
|
-
|
|
2100
|
-
|
|
3045
|
+
module.exports = exports['default'];
|
|
3046
|
+
|
|
3047
|
+
}(validTabindex, validTabindex.exports));
|
|
3048
|
+
|
|
3049
|
+
(function (module, exports) {
|
|
3050
|
+
|
|
3051
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3052
|
+
value: true
|
|
3053
|
+
});
|
|
3054
|
+
|
|
3055
|
+
exports.default = function (element) {
|
|
3056
|
+
if (!(0, _validTabindex2.default)(element)) {
|
|
2101
3057
|
return null;
|
|
2102
3058
|
}
|
|
2103
3059
|
|
|
@@ -2109,7 +3065,27 @@ function tabindexValue (element) {
|
|
|
2109
3065
|
// @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054
|
|
2110
3066
|
var tabindex = parseInt(element.getAttribute(attributeName), 10);
|
|
2111
3067
|
return isNaN(tabindex) ? -1 : tabindex;
|
|
2112
|
-
}
|
|
3068
|
+
};
|
|
3069
|
+
|
|
3070
|
+
var _validTabindex = validTabindex.exports;
|
|
3071
|
+
|
|
3072
|
+
var _validTabindex2 = _interopRequireDefault(_validTabindex);
|
|
3073
|
+
|
|
3074
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3075
|
+
|
|
3076
|
+
module.exports = exports['default'];
|
|
3077
|
+
|
|
3078
|
+
}(tabindexValue, tabindexValue.exports));
|
|
3079
|
+
|
|
3080
|
+
var is_util = {};
|
|
3081
|
+
|
|
3082
|
+
Object.defineProperty(is_util, "__esModule", {
|
|
3083
|
+
value: true
|
|
3084
|
+
});
|
|
3085
|
+
is_util.isUserModifyWritable = isUserModifyWritable;
|
|
3086
|
+
is_util.hasCssOverflowScroll = hasCssOverflowScroll;
|
|
3087
|
+
is_util.hasCssDisplayFlex = hasCssDisplayFlex;
|
|
3088
|
+
is_util.isScrollableContainer = isScrollableContainer;
|
|
2113
3089
|
|
|
2114
3090
|
// this is a shared utility file for focus-relevant.js and tabbable.js
|
|
2115
3091
|
// separate testing of this file's functions is not necessary,
|
|
@@ -2147,7 +3123,44 @@ function isScrollableContainer(element, nodeName, parentNodeName, parentStyle) {
|
|
|
2147
3123
|
return element.offsetHeight < element.scrollHeight || element.offsetWidth < element.scrollWidth;
|
|
2148
3124
|
}
|
|
2149
3125
|
|
|
2150
|
-
|
|
3126
|
+
(function (module, exports) {
|
|
3127
|
+
|
|
3128
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3129
|
+
value: true
|
|
3130
|
+
});
|
|
3131
|
+
|
|
3132
|
+
var _parents = parents.exports;
|
|
3133
|
+
|
|
3134
|
+
var _parents2 = _interopRequireDefault(_parents);
|
|
3135
|
+
|
|
3136
|
+
var _contextToElement = contextToElement.exports;
|
|
3137
|
+
|
|
3138
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
3139
|
+
|
|
3140
|
+
var _elementMatches = elementMatches.exports;
|
|
3141
|
+
|
|
3142
|
+
var _elementMatches2 = _interopRequireDefault(_elementMatches);
|
|
3143
|
+
|
|
3144
|
+
var _tabindexValue = tabindexValue.exports;
|
|
3145
|
+
|
|
3146
|
+
var _tabindexValue2 = _interopRequireDefault(_tabindexValue);
|
|
3147
|
+
|
|
3148
|
+
var _validTabindex = validTabindex.exports;
|
|
3149
|
+
|
|
3150
|
+
var _validTabindex2 = _interopRequireDefault(_validTabindex);
|
|
3151
|
+
|
|
3152
|
+
var _is = is_util;
|
|
3153
|
+
|
|
3154
|
+
var _supports2 = supports.exports;
|
|
3155
|
+
|
|
3156
|
+
var _supports3 = _interopRequireDefault(_supports2);
|
|
3157
|
+
|
|
3158
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3159
|
+
|
|
3160
|
+
var supports$1 = void 0;
|
|
3161
|
+
// determine if an element supports.can be focused by script regardless
|
|
3162
|
+
// of the element actually being focusable at the time of execution
|
|
3163
|
+
// i.e. <input disabled> is conisdered focus-relevant, but not focusable
|
|
2151
3164
|
|
|
2152
3165
|
function isFocusRelevantRules() {
|
|
2153
3166
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -2159,11 +3172,11 @@ function isFocusRelevantRules() {
|
|
|
2159
3172
|
shadow: false
|
|
2160
3173
|
} : _ref$except;
|
|
2161
3174
|
|
|
2162
|
-
if (!supports$
|
|
2163
|
-
supports$
|
|
3175
|
+
if (!supports$1) {
|
|
3176
|
+
supports$1 = (0, _supports3.default)();
|
|
2164
3177
|
}
|
|
2165
3178
|
|
|
2166
|
-
var element =
|
|
3179
|
+
var element = (0, _contextToElement2.default)({
|
|
2167
3180
|
label: 'is/focus-relevant',
|
|
2168
3181
|
resolveDocument: true,
|
|
2169
3182
|
context: context
|
|
@@ -2185,7 +3198,7 @@ function isFocusRelevantRules() {
|
|
|
2185
3198
|
return true;
|
|
2186
3199
|
}
|
|
2187
3200
|
|
|
2188
|
-
if (nodeName === 'legend' && supports$
|
|
3201
|
+
if (nodeName === 'legend' && supports$1.focusRedirectLegend) {
|
|
2189
3202
|
// specifics filtered in is/focusable
|
|
2190
3203
|
return true;
|
|
2191
3204
|
}
|
|
@@ -2211,10 +3224,10 @@ function isFocusRelevantRules() {
|
|
|
2211
3224
|
|
|
2212
3225
|
if (nodeName === 'object') {
|
|
2213
3226
|
var svgType = element.getAttribute('type');
|
|
2214
|
-
if (!supports$
|
|
3227
|
+
if (!supports$1.focusObjectSvg && svgType === 'image/svg+xml') {
|
|
2215
3228
|
// object[type="image/svg+xml"] is not focusable in Internet Explorer
|
|
2216
3229
|
return false;
|
|
2217
|
-
} else if (!supports$
|
|
3230
|
+
} else if (!supports$1.focusObjectSwf && svgType === 'application/x-shockwave-flash') {
|
|
2218
3231
|
// object[type="application/x-shockwave-flash"] is not focusable in Internet Explorer 9
|
|
2219
3232
|
return false;
|
|
2220
3233
|
}
|
|
@@ -2236,32 +3249,32 @@ function isFocusRelevantRules() {
|
|
|
2236
3249
|
return true;
|
|
2237
3250
|
}
|
|
2238
3251
|
|
|
2239
|
-
if (nodeName === 'audio' && (supports$
|
|
3252
|
+
if (nodeName === 'audio' && (supports$1.focusAudioWithoutControls || element.hasAttribute('controls'))) {
|
|
2240
3253
|
return true;
|
|
2241
3254
|
}
|
|
2242
3255
|
|
|
2243
|
-
if (nodeName === 'video' && (supports$
|
|
3256
|
+
if (nodeName === 'video' && (supports$1.focusVideoWithoutControls || element.hasAttribute('controls'))) {
|
|
2244
3257
|
return true;
|
|
2245
3258
|
}
|
|
2246
3259
|
|
|
2247
|
-
if (supports$
|
|
3260
|
+
if (supports$1.focusSummary && nodeName === 'summary') {
|
|
2248
3261
|
return true;
|
|
2249
3262
|
}
|
|
2250
3263
|
|
|
2251
|
-
var validTabindex =
|
|
3264
|
+
var validTabindex = (0, _validTabindex2.default)(element);
|
|
2252
3265
|
|
|
2253
3266
|
if (nodeName === 'img' && element.hasAttribute('usemap')) {
|
|
2254
3267
|
// Gecko, Trident and Edge do not allow an image with an image map and tabindex to be focused,
|
|
2255
3268
|
// it appears the tabindex is overruled so focus is still forwarded to the <map>
|
|
2256
|
-
return validTabindex && supports$
|
|
3269
|
+
return validTabindex && supports$1.focusImgUsemapTabindex || supports$1.focusRedirectImgUsemap;
|
|
2257
3270
|
}
|
|
2258
3271
|
|
|
2259
|
-
if (supports$
|
|
3272
|
+
if (supports$1.focusTable && (nodeName === 'table' || nodeName === 'td')) {
|
|
2260
3273
|
// IE10-11 supports.can focus <table> and <td>
|
|
2261
3274
|
return true;
|
|
2262
3275
|
}
|
|
2263
3276
|
|
|
2264
|
-
if (supports$
|
|
3277
|
+
if (supports$1.focusFieldset && nodeName === 'fieldset') {
|
|
2265
3278
|
// IE10-11 supports.can focus <fieldset>
|
|
2266
3279
|
return true;
|
|
2267
3280
|
}
|
|
@@ -2269,23 +3282,23 @@ function isFocusRelevantRules() {
|
|
|
2269
3282
|
var isSvgElement = nodeName === 'svg';
|
|
2270
3283
|
var isSvgContent = element.ownerSVGElement;
|
|
2271
3284
|
var focusableAttribute = element.getAttribute('focusable');
|
|
2272
|
-
var tabindex =
|
|
3285
|
+
var tabindex = (0, _tabindexValue2.default)(element);
|
|
2273
3286
|
|
|
2274
|
-
if (nodeName === 'use' && tabindex !== null && !supports$
|
|
3287
|
+
if (nodeName === 'use' && tabindex !== null && !supports$1.focusSvgUseTabindex) {
|
|
2275
3288
|
// <use> cannot be made focusable by adding a tabindex attribute anywhere but Blink and WebKit
|
|
2276
3289
|
return false;
|
|
2277
3290
|
}
|
|
2278
3291
|
|
|
2279
3292
|
if (nodeName === 'foreignobject') {
|
|
2280
3293
|
// <use> can only be made focusable in Blink and WebKit
|
|
2281
|
-
return tabindex !== null && supports$
|
|
3294
|
+
return tabindex !== null && supports$1.focusSvgForeignobjectTabindex;
|
|
2282
3295
|
}
|
|
2283
3296
|
|
|
2284
|
-
if (
|
|
3297
|
+
if ((0, _elementMatches2.default)(element, 'svg a') && element.hasAttribute('xlink:href')) {
|
|
2285
3298
|
return true;
|
|
2286
3299
|
}
|
|
2287
3300
|
|
|
2288
|
-
if ((isSvgElement || isSvgContent) && element.focus && !supports$
|
|
3301
|
+
if ((isSvgElement || isSvgContent) && element.focus && !supports$1.focusSvgNegativeTabindexAttribute && tabindex < 0) {
|
|
2289
3302
|
// Firefox 51 and 52 treat any natively tabbable SVG element with
|
|
2290
3303
|
// tabindex="-1" as tabbable and everything else as inert
|
|
2291
3304
|
// see https://bugzilla.mozilla.org/show_bug.cgi?id=1302340
|
|
@@ -2293,17 +3306,17 @@ function isFocusRelevantRules() {
|
|
|
2293
3306
|
}
|
|
2294
3307
|
|
|
2295
3308
|
if (isSvgElement) {
|
|
2296
|
-
return validTabindex || supports$
|
|
3309
|
+
return validTabindex || supports$1.focusSvg || supports$1.focusSvgInIframe
|
|
2297
3310
|
// Internet Explorer understands the focusable attribute introduced in SVG Tiny 1.2
|
|
2298
|
-
|| Boolean(supports$
|
|
3311
|
+
|| Boolean(supports$1.focusSvgFocusableAttribute && focusableAttribute && focusableAttribute === 'true');
|
|
2299
3312
|
}
|
|
2300
3313
|
|
|
2301
3314
|
if (isSvgContent) {
|
|
2302
|
-
if (supports$
|
|
3315
|
+
if (supports$1.focusSvgTabindexAttribute && validTabindex) {
|
|
2303
3316
|
return true;
|
|
2304
3317
|
}
|
|
2305
3318
|
|
|
2306
|
-
if (supports$
|
|
3319
|
+
if (supports$1.focusSvgFocusableAttribute) {
|
|
2307
3320
|
// Internet Explorer understands the focusable attribute introduced in SVG Tiny 1.2
|
|
2308
3321
|
return focusableAttribute === 'true';
|
|
2309
3322
|
}
|
|
@@ -2315,14 +3328,14 @@ function isFocusRelevantRules() {
|
|
|
2315
3328
|
}
|
|
2316
3329
|
|
|
2317
3330
|
var style = window.getComputedStyle(element, null);
|
|
2318
|
-
if (isUserModifyWritable(style)) {
|
|
3331
|
+
if ((0, _is.isUserModifyWritable)(style)) {
|
|
2319
3332
|
return true;
|
|
2320
3333
|
}
|
|
2321
3334
|
|
|
2322
|
-
if (supports$
|
|
3335
|
+
if (supports$1.focusImgIsmap && nodeName === 'img' && element.hasAttribute('ismap')) {
|
|
2323
3336
|
// IE10-11 considers the <img> in <a href><img ismap> focusable
|
|
2324
3337
|
// https://github.com/medialize/ally.js/issues/20
|
|
2325
|
-
var hasLinkParent =
|
|
3338
|
+
var hasLinkParent = (0, _parents2.default)({ context: element }).some(function (parent) {
|
|
2326
3339
|
return parent.nodeName.toLowerCase() === 'a' && parent.hasAttribute('href');
|
|
2327
3340
|
});
|
|
2328
3341
|
|
|
@@ -2332,22 +3345,22 @@ function isFocusRelevantRules() {
|
|
|
2332
3345
|
}
|
|
2333
3346
|
|
|
2334
3347
|
// https://github.com/medialize/ally.js/issues/21
|
|
2335
|
-
if (!except.scrollable && supports$
|
|
2336
|
-
if (supports$
|
|
3348
|
+
if (!except.scrollable && supports$1.focusScrollContainer) {
|
|
3349
|
+
if (supports$1.focusScrollContainerWithoutOverflow) {
|
|
2337
3350
|
// Internet Explorer does will consider the scrollable area focusable
|
|
2338
3351
|
// if the element is a <div> or a <span> and it is in fact scrollable,
|
|
2339
3352
|
// regardless of the CSS overflow property
|
|
2340
|
-
if (isScrollableContainer(element, nodeName)) {
|
|
3353
|
+
if ((0, _is.isScrollableContainer)(element, nodeName)) {
|
|
2341
3354
|
return true;
|
|
2342
3355
|
}
|
|
2343
|
-
} else if (hasCssOverflowScroll(style)) {
|
|
3356
|
+
} else if ((0, _is.hasCssOverflowScroll)(style)) {
|
|
2344
3357
|
// Firefox requires proper overflow setting, IE does not necessarily
|
|
2345
3358
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/overflow
|
|
2346
3359
|
return true;
|
|
2347
3360
|
}
|
|
2348
3361
|
}
|
|
2349
3362
|
|
|
2350
|
-
if (!except.flexbox && supports$
|
|
3363
|
+
if (!except.flexbox && supports$1.focusFlexboxContainer && (0, _is.hasCssDisplayFlex)(style)) {
|
|
2351
3364
|
// elements with display:flex are focusable in IE10-11
|
|
2352
3365
|
return true;
|
|
2353
3366
|
}
|
|
@@ -2356,15 +3369,15 @@ function isFocusRelevantRules() {
|
|
|
2356
3369
|
if (!except.scrollable && parent) {
|
|
2357
3370
|
var parentNodeName = parent.nodeName.toLowerCase();
|
|
2358
3371
|
var parentStyle = window.getComputedStyle(parent, null);
|
|
2359
|
-
if (supports$
|
|
3372
|
+
if (supports$1.focusScrollBody && (0, _is.isScrollableContainer)(parent, nodeName, parentNodeName, parentStyle)) {
|
|
2360
3373
|
// scrollable bodies are focusable Internet Explorer
|
|
2361
3374
|
// https://github.com/medialize/ally.js/issues/21
|
|
2362
3375
|
return true;
|
|
2363
3376
|
}
|
|
2364
3377
|
|
|
2365
3378
|
// Children of focusable elements with display:flex are focusable in IE10-11
|
|
2366
|
-
if (supports$
|
|
2367
|
-
if (hasCssDisplayFlex(parentStyle)) {
|
|
3379
|
+
if (supports$1.focusChildrenOfFocusableFlexbox) {
|
|
3380
|
+
if ((0, _is.hasCssDisplayFlex)(parentStyle)) {
|
|
2368
3381
|
return true;
|
|
2369
3382
|
}
|
|
2370
3383
|
}
|
|
@@ -2394,7 +3407,23 @@ isFocusRelevantRules.except = function () {
|
|
|
2394
3407
|
|
|
2395
3408
|
// provide isFocusRelevant(context) as default iterator callback
|
|
2396
3409
|
var isFocusRelevant = isFocusRelevantRules.except({});
|
|
3410
|
+
exports.default = isFocusRelevant;
|
|
3411
|
+
module.exports = exports['default'];
|
|
3412
|
+
|
|
3413
|
+
}(focusRelevant, focusRelevant.exports));
|
|
2397
3414
|
|
|
3415
|
+
var validArea = {exports: {}};
|
|
3416
|
+
|
|
3417
|
+
var visible = {exports: {}};
|
|
3418
|
+
|
|
3419
|
+
var arrayFindIndex = {exports: {}};
|
|
3420
|
+
|
|
3421
|
+
(function (module, exports) {
|
|
3422
|
+
|
|
3423
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3424
|
+
value: true
|
|
3425
|
+
});
|
|
3426
|
+
exports.default = findIndex;
|
|
2398
3427
|
function findIndex(array, callback) {
|
|
2399
3428
|
// attempt to use native or polyfilled Array#findIndex first
|
|
2400
3429
|
if (array.findIndex) {
|
|
@@ -2417,8 +3446,21 @@ function findIndex(array, callback) {
|
|
|
2417
3446
|
|
|
2418
3447
|
return -1;
|
|
2419
3448
|
}
|
|
3449
|
+
module.exports = exports["default"];
|
|
2420
3450
|
|
|
2421
|
-
|
|
3451
|
+
}(arrayFindIndex, arrayFindIndex.exports));
|
|
3452
|
+
|
|
3453
|
+
var getFrameElement = {exports: {}};
|
|
3454
|
+
|
|
3455
|
+
var getContentDocument = {exports: {}};
|
|
3456
|
+
|
|
3457
|
+
(function (module, exports) {
|
|
3458
|
+
|
|
3459
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3460
|
+
value: true
|
|
3461
|
+
});
|
|
3462
|
+
|
|
3463
|
+
exports.default = function (node) {
|
|
2422
3464
|
try {
|
|
2423
3465
|
// works on <object> and <iframe>
|
|
2424
3466
|
return node.contentDocument
|
|
@@ -2431,9 +3473,23 @@ function getContentDocument (node) {
|
|
|
2431
3473
|
// also IE may throw member not found exception e.g. on <object type="image/png">
|
|
2432
3474
|
return null;
|
|
2433
3475
|
}
|
|
2434
|
-
}
|
|
3476
|
+
};
|
|
2435
3477
|
|
|
2436
|
-
|
|
3478
|
+
module.exports = exports["default"];
|
|
3479
|
+
|
|
3480
|
+
}(getContentDocument, getContentDocument.exports));
|
|
3481
|
+
|
|
3482
|
+
var getWindow = {exports: {}};
|
|
3483
|
+
|
|
3484
|
+
var getDocument = {exports: {}};
|
|
3485
|
+
|
|
3486
|
+
(function (module, exports) {
|
|
3487
|
+
|
|
3488
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3489
|
+
value: true
|
|
3490
|
+
});
|
|
3491
|
+
|
|
3492
|
+
exports.default = function (node) {
|
|
2437
3493
|
if (!node) {
|
|
2438
3494
|
return document;
|
|
2439
3495
|
}
|
|
@@ -2443,18 +3499,44 @@ function getDocument (node) {
|
|
|
2443
3499
|
}
|
|
2444
3500
|
|
|
2445
3501
|
return node.ownerDocument || document;
|
|
2446
|
-
}
|
|
3502
|
+
};
|
|
3503
|
+
|
|
3504
|
+
module.exports = exports["default"];
|
|
3505
|
+
|
|
3506
|
+
}(getDocument, getDocument.exports));
|
|
3507
|
+
|
|
3508
|
+
(function (module, exports) {
|
|
2447
3509
|
|
|
2448
|
-
|
|
2449
|
-
|
|
3510
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3511
|
+
value: true
|
|
3512
|
+
});
|
|
3513
|
+
|
|
3514
|
+
exports.default = function (node) {
|
|
3515
|
+
var _document = (0, _getDocument2.default)(node);
|
|
2450
3516
|
return _document.defaultView || window;
|
|
2451
|
-
}
|
|
3517
|
+
};
|
|
2452
3518
|
|
|
2453
|
-
var
|
|
3519
|
+
var _getDocument = getDocument.exports;
|
|
3520
|
+
|
|
3521
|
+
var _getDocument2 = _interopRequireDefault(_getDocument);
|
|
3522
|
+
|
|
3523
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3524
|
+
|
|
3525
|
+
module.exports = exports['default'];
|
|
3526
|
+
|
|
3527
|
+
}(getWindow, getWindow.exports));
|
|
3528
|
+
|
|
3529
|
+
var selectInShadows = {exports: {}};
|
|
3530
|
+
|
|
3531
|
+
(function (module, exports) {
|
|
3532
|
+
|
|
3533
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3534
|
+
value: true
|
|
3535
|
+
});
|
|
2454
3536
|
|
|
2455
|
-
function
|
|
3537
|
+
exports.default = function (selector) {
|
|
2456
3538
|
if (typeof shadowPrefix !== 'string') {
|
|
2457
|
-
var operator =
|
|
3539
|
+
var operator = (0, _cssShadowPiercingDeepCombinator2.default)();
|
|
2458
3540
|
if (operator) {
|
|
2459
3541
|
shadowPrefix = ', html ' + operator + ' ';
|
|
2460
3542
|
}
|
|
@@ -2465,13 +3547,48 @@ function selectInShadows (selector) {
|
|
|
2465
3547
|
}
|
|
2466
3548
|
|
|
2467
3549
|
return selector + shadowPrefix + selector.replace(/\s*,\s*/g, ',').split(',').join(shadowPrefix);
|
|
2468
|
-
}
|
|
3550
|
+
};
|
|
3551
|
+
|
|
3552
|
+
var _cssShadowPiercingDeepCombinator = cssShadowPiercingDeepCombinator.exports;
|
|
3553
|
+
|
|
3554
|
+
var _cssShadowPiercingDeepCombinator2 = _interopRequireDefault(_cssShadowPiercingDeepCombinator);
|
|
3555
|
+
|
|
3556
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3557
|
+
|
|
3558
|
+
var shadowPrefix = void 0;
|
|
3559
|
+
// convert a CSS selector so that it also pierces ShadowDOM
|
|
3560
|
+
// takes ".a, #b" and turns it into ".a, #b, html >>> .a, html >>> #b"
|
|
3561
|
+
|
|
3562
|
+
module.exports = exports['default'];
|
|
3563
|
+
|
|
3564
|
+
}(selectInShadows, selectInShadows.exports));
|
|
3565
|
+
|
|
3566
|
+
(function (module, exports) {
|
|
3567
|
+
|
|
3568
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3569
|
+
value: true
|
|
3570
|
+
});
|
|
3571
|
+
exports.default = getFrameElement;
|
|
3572
|
+
|
|
3573
|
+
var _getContentDocument = getContentDocument.exports;
|
|
3574
|
+
|
|
3575
|
+
var _getContentDocument2 = _interopRequireDefault(_getContentDocument);
|
|
3576
|
+
|
|
3577
|
+
var _getWindow = getWindow.exports;
|
|
3578
|
+
|
|
3579
|
+
var _getWindow2 = _interopRequireDefault(_getWindow);
|
|
3580
|
+
|
|
3581
|
+
var _selectInShadows = selectInShadows.exports;
|
|
3582
|
+
|
|
3583
|
+
var _selectInShadows2 = _interopRequireDefault(_selectInShadows);
|
|
3584
|
+
|
|
3585
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2469
3586
|
|
|
2470
3587
|
var selector = void 0;
|
|
2471
3588
|
|
|
2472
3589
|
function findDocumentHostElement(_window) {
|
|
2473
3590
|
if (!selector) {
|
|
2474
|
-
selector =
|
|
3591
|
+
selector = (0, _selectInShadows2.default)('object, iframe');
|
|
2475
3592
|
}
|
|
2476
3593
|
|
|
2477
3594
|
if (_window._frameElement !== undefined) {
|
|
@@ -2482,7 +3599,7 @@ function findDocumentHostElement(_window) {
|
|
|
2482
3599
|
|
|
2483
3600
|
var potentialHosts = _window.parent.document.querySelectorAll(selector);
|
|
2484
3601
|
[].some.call(potentialHosts, function (element) {
|
|
2485
|
-
var _document =
|
|
3602
|
+
var _document = (0, _getContentDocument2.default)(element);
|
|
2486
3603
|
if (_document !== _window.document) {
|
|
2487
3604
|
return false;
|
|
2488
3605
|
}
|
|
@@ -2495,7 +3612,7 @@ function findDocumentHostElement(_window) {
|
|
|
2495
3612
|
}
|
|
2496
3613
|
|
|
2497
3614
|
function getFrameElement(element) {
|
|
2498
|
-
var _window =
|
|
3615
|
+
var _window = (0, _getWindow2.default)(element);
|
|
2499
3616
|
if (!_window.parent || _window.parent === _window) {
|
|
2500
3617
|
// if there is no parent browsing context,
|
|
2501
3618
|
// we're not going to get a frameElement either way
|
|
@@ -2510,9 +3627,40 @@ function getFrameElement(element) {
|
|
|
2510
3627
|
return null;
|
|
2511
3628
|
}
|
|
2512
3629
|
}
|
|
3630
|
+
module.exports = exports['default'];
|
|
3631
|
+
|
|
3632
|
+
}(getFrameElement, getFrameElement.exports));
|
|
3633
|
+
|
|
3634
|
+
(function (module, exports) {
|
|
3635
|
+
|
|
3636
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3637
|
+
value: true
|
|
3638
|
+
});
|
|
3639
|
+
|
|
3640
|
+
var _arrayFindIndex = arrayFindIndex.exports;
|
|
3641
|
+
|
|
3642
|
+
var _arrayFindIndex2 = _interopRequireDefault(_arrayFindIndex);
|
|
3643
|
+
|
|
3644
|
+
var _parents = parents.exports;
|
|
3645
|
+
|
|
3646
|
+
var _parents2 = _interopRequireDefault(_parents);
|
|
3647
|
+
|
|
3648
|
+
var _contextToElement = contextToElement.exports;
|
|
3649
|
+
|
|
3650
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
3651
|
+
|
|
3652
|
+
var _getFrameElement = getFrameElement.exports;
|
|
3653
|
+
|
|
3654
|
+
var _getFrameElement2 = _interopRequireDefault(_getFrameElement);
|
|
3655
|
+
|
|
3656
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2513
3657
|
|
|
2514
3658
|
// https://www.w3.org/TR/html5/rendering.html#being-rendered
|
|
2515
3659
|
// <area> is not rendered, but we *consider* it visible to simplfiy this function's usage
|
|
3660
|
+
|
|
3661
|
+
// determine if an element is rendered
|
|
3662
|
+
// NOTE: that does not mean an element is visible in the viewport, see util/visible-area
|
|
3663
|
+
|
|
2516
3664
|
var notRenderedElementsPattern = /^(area)$/;
|
|
2517
3665
|
|
|
2518
3666
|
function computedStyle(element, property) {
|
|
@@ -2530,7 +3678,7 @@ function notVisible(_path) {
|
|
|
2530
3678
|
// https://github.com/jquery/jquery-ui/blob/master/ui/core.js#L109-L114
|
|
2531
3679
|
// NOTE: a nested element can reverse visibility:hidden|collapse by explicitly setting visibility:visible
|
|
2532
3680
|
// NOTE: visibility can be ["", "visible", "hidden", "collapse"]
|
|
2533
|
-
var hidden =
|
|
3681
|
+
var hidden = (0, _arrayFindIndex2.default)(_path, function (element) {
|
|
2534
3682
|
var visibility = computedStyle(element, 'visibility');
|
|
2535
3683
|
return visibility === 'hidden' || visibility === 'collapse';
|
|
2536
3684
|
});
|
|
@@ -2540,7 +3688,7 @@ function notVisible(_path) {
|
|
|
2540
3688
|
return false;
|
|
2541
3689
|
}
|
|
2542
3690
|
|
|
2543
|
-
var visible =
|
|
3691
|
+
var visible = (0, _arrayFindIndex2.default)(_path, function (element) {
|
|
2544
3692
|
return computedStyle(element, 'visibility') === 'visible';
|
|
2545
3693
|
});
|
|
2546
3694
|
|
|
@@ -2582,7 +3730,7 @@ function isVisibleRules() {
|
|
|
2582
3730
|
browsingContext: false
|
|
2583
3731
|
} : _ref$except;
|
|
2584
3732
|
|
|
2585
|
-
var element =
|
|
3733
|
+
var element = (0, _contextToElement2.default)({
|
|
2586
3734
|
label: 'is/visible',
|
|
2587
3735
|
resolveDocument: true,
|
|
2588
3736
|
context: context
|
|
@@ -2593,7 +3741,7 @@ function isVisibleRules() {
|
|
|
2593
3741
|
return true;
|
|
2594
3742
|
}
|
|
2595
3743
|
|
|
2596
|
-
var _path =
|
|
3744
|
+
var _path = (0, _parents2.default)({ context: element });
|
|
2597
3745
|
|
|
2598
3746
|
// in Internet Explorer <audio> has a default display: none, where others have display: inline
|
|
2599
3747
|
// but IE allows focusing <audio style="display:none">, but not <div display:none><audio>
|
|
@@ -2614,7 +3762,7 @@ function isVisibleRules() {
|
|
|
2614
3762
|
if (!except.browsingContext) {
|
|
2615
3763
|
// elements within a browsing context are affected by the
|
|
2616
3764
|
// browsing context host element's visibility and tabindex
|
|
2617
|
-
var frameElement =
|
|
3765
|
+
var frameElement = (0, _getFrameElement2.default)(element);
|
|
2618
3766
|
var _isVisible = isVisibleRules.except(except);
|
|
2619
3767
|
if (frameElement && !_isVisible(frameElement)) {
|
|
2620
3768
|
return false;
|
|
@@ -2641,8 +3789,18 @@ isVisibleRules.except = function () {
|
|
|
2641
3789
|
|
|
2642
3790
|
// provide isVisible(context) as default iterator callback
|
|
2643
3791
|
var isVisible = isVisibleRules.except({});
|
|
3792
|
+
exports.default = isVisible;
|
|
3793
|
+
module.exports = exports['default'];
|
|
3794
|
+
|
|
3795
|
+
}(visible, visible.exports));
|
|
2644
3796
|
|
|
2645
|
-
var
|
|
3797
|
+
var imageMap = {};
|
|
3798
|
+
|
|
3799
|
+
var css_escape = {exports: {}};
|
|
3800
|
+
|
|
3801
|
+
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
|
3802
|
+
|
|
3803
|
+
(function (module, exports) {
|
|
2646
3804
|
(function(root, factory) {
|
|
2647
3805
|
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
|
2648
3806
|
{
|
|
@@ -2742,7 +3900,41 @@ var css_escape = createCommonjsModule(function (module, exports) {
|
|
|
2742
3900
|
return cssEscape;
|
|
2743
3901
|
|
|
2744
3902
|
}));
|
|
3903
|
+
}(css_escape));
|
|
3904
|
+
|
|
3905
|
+
Object.defineProperty(imageMap, "__esModule", {
|
|
3906
|
+
value: true
|
|
2745
3907
|
});
|
|
3908
|
+
imageMap.getMapByName = getMapByName;
|
|
3909
|
+
imageMap.getMapOfImage = getMapOfImage;
|
|
3910
|
+
imageMap.getImageOfArea = getImageOfArea;
|
|
3911
|
+
|
|
3912
|
+
var _css = css_escape.exports;
|
|
3913
|
+
|
|
3914
|
+
var _css2 = _interopRequireDefault(_css);
|
|
3915
|
+
|
|
3916
|
+
var _getDocument = getDocument.exports;
|
|
3917
|
+
|
|
3918
|
+
var _getDocument2 = _interopRequireDefault(_getDocument);
|
|
3919
|
+
|
|
3920
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3921
|
+
|
|
3922
|
+
function getMapByName(name, _document) {
|
|
3923
|
+
// apparently getElementsByName() also considers id attribute in IE & opera
|
|
3924
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByName
|
|
3925
|
+
var map = _document.querySelector('map[name="' + (0, _css2.default)(name) + '"]');
|
|
3926
|
+
return map || null;
|
|
3927
|
+
}
|
|
3928
|
+
|
|
3929
|
+
function getMapOfImage(element) {
|
|
3930
|
+
var usemap = element.getAttribute('usemap');
|
|
3931
|
+
if (!usemap) {
|
|
3932
|
+
return null;
|
|
3933
|
+
}
|
|
3934
|
+
|
|
3935
|
+
var _document = (0, _getDocument2.default)(element);
|
|
3936
|
+
return getMapByName(usemap.slice(1), _document);
|
|
3937
|
+
}
|
|
2746
3938
|
|
|
2747
3939
|
function getImageOfArea(element) {
|
|
2748
3940
|
var map = element.parentElement;
|
|
@@ -2759,21 +3951,22 @@ function getImageOfArea(element) {
|
|
|
2759
3951
|
// https://www.w3.org/TR/html5/embedded-content-0.html#the-map-element
|
|
2760
3952
|
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement
|
|
2761
3953
|
// the image must be valid and loaded for the map to take effect
|
|
2762
|
-
var _document =
|
|
2763
|
-
return _document.querySelector('img[usemap="#' +
|
|
3954
|
+
var _document = (0, _getDocument2.default)(element);
|
|
3955
|
+
return _document.querySelector('img[usemap="#' + (0, _css2.default)(map.name) + '"]') || null;
|
|
2764
3956
|
}
|
|
2765
3957
|
|
|
2766
|
-
|
|
3958
|
+
(function (module, exports) {
|
|
2767
3959
|
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
3960
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3961
|
+
value: true
|
|
3962
|
+
});
|
|
3963
|
+
|
|
3964
|
+
exports.default = function (context) {
|
|
3965
|
+
if (!supports$1) {
|
|
3966
|
+
supports$1 = (0, _supports3.default)();
|
|
2774
3967
|
}
|
|
2775
3968
|
|
|
2776
|
-
var element =
|
|
3969
|
+
var element = (0, _contextToElement2.default)({
|
|
2777
3970
|
label: 'is/valid-area',
|
|
2778
3971
|
context: context
|
|
2779
3972
|
});
|
|
@@ -2784,31 +3977,31 @@ function isValidArea (context) {
|
|
|
2784
3977
|
}
|
|
2785
3978
|
|
|
2786
3979
|
var hasTabindex = element.hasAttribute('tabindex');
|
|
2787
|
-
if (!supports$
|
|
3980
|
+
if (!supports$1.focusAreaTabindex && hasTabindex) {
|
|
2788
3981
|
// Blink and WebKit do not consider <area tabindex="-1" href="#void"> focusable
|
|
2789
3982
|
return false;
|
|
2790
3983
|
}
|
|
2791
3984
|
|
|
2792
|
-
var img = getImageOfArea(element);
|
|
2793
|
-
if (!img || !
|
|
3985
|
+
var img = (0, _imageMap.getImageOfArea)(element);
|
|
3986
|
+
if (!img || !(0, _visible2.default)(img)) {
|
|
2794
3987
|
return false;
|
|
2795
3988
|
}
|
|
2796
3989
|
|
|
2797
3990
|
// Firefox only allows fully loaded images to reference image maps
|
|
2798
3991
|
// https://stereochro.me/ideas/detecting-broken-images-js
|
|
2799
|
-
if (!supports$
|
|
3992
|
+
if (!supports$1.focusBrokenImageMap && (!img.complete || !img.naturalHeight || img.offsetWidth <= 0 || img.offsetHeight <= 0)) {
|
|
2800
3993
|
return false;
|
|
2801
3994
|
}
|
|
2802
3995
|
|
|
2803
3996
|
// Firefox supports.can focus area elements even if they don't have an href attribute
|
|
2804
|
-
if (!supports$
|
|
3997
|
+
if (!supports$1.focusAreaWithoutHref && !element.href) {
|
|
2805
3998
|
// Internet explorer supports.can focus area elements without href if either
|
|
2806
3999
|
// the area element or the image element has a tabindex attribute
|
|
2807
|
-
return supports$
|
|
4000
|
+
return supports$1.focusAreaTabindex && hasTabindex || supports$1.focusAreaImgTabindex && img.hasAttribute('tabindex');
|
|
2808
4001
|
}
|
|
2809
4002
|
|
|
2810
4003
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap
|
|
2811
|
-
var childOfInteractive =
|
|
4004
|
+
var childOfInteractive = (0, _parents2.default)({ context: img }).slice(1).some(function (_element) {
|
|
2812
4005
|
var name = _element.nodeName.toLowerCase();
|
|
2813
4006
|
return name === 'button' || name === 'a';
|
|
2814
4007
|
});
|
|
@@ -2818,63 +4011,115 @@ function isValidArea (context) {
|
|
|
2818
4011
|
}
|
|
2819
4012
|
|
|
2820
4013
|
return true;
|
|
2821
|
-
}
|
|
4014
|
+
};
|
|
2822
4015
|
|
|
2823
|
-
var
|
|
4016
|
+
var _contextToElement = contextToElement.exports;
|
|
2824
4017
|
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
var
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
4018
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
4019
|
+
|
|
4020
|
+
var _visible = visible.exports;
|
|
4021
|
+
|
|
4022
|
+
var _visible2 = _interopRequireDefault(_visible);
|
|
4023
|
+
|
|
4024
|
+
var _parents = parents.exports;
|
|
4025
|
+
|
|
4026
|
+
var _parents2 = _interopRequireDefault(_parents);
|
|
4027
|
+
|
|
4028
|
+
var _imageMap = imageMap;
|
|
4029
|
+
|
|
4030
|
+
var _supports2 = supports.exports;
|
|
4031
|
+
|
|
4032
|
+
var _supports3 = _interopRequireDefault(_supports2);
|
|
4033
|
+
|
|
4034
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4035
|
+
|
|
4036
|
+
var supports$1 = void 0;
|
|
2835
4037
|
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
4038
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map
|
|
4039
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap
|
|
4040
|
+
// https://github.com/jquery/jquery-ui/blob/master/ui/core.js#L88-L107
|
|
4041
|
+
|
|
4042
|
+
// determine if an <area> element is being properly used by and <img> via a <map>
|
|
4043
|
+
|
|
4044
|
+
module.exports = exports['default'];
|
|
4045
|
+
|
|
4046
|
+
}(validArea, validArea.exports));
|
|
4047
|
+
|
|
4048
|
+
var disabled = {exports: {}};
|
|
4049
|
+
|
|
4050
|
+
var nativeDisabledSupported = {exports: {}};
|
|
2839
4051
|
|
|
2840
|
-
|
|
4052
|
+
(function (module, exports) {
|
|
4053
|
+
|
|
4054
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4055
|
+
value: true
|
|
4056
|
+
});
|
|
4057
|
+
|
|
4058
|
+
exports.default = function (context) {
|
|
4059
|
+
if (!supports$1) {
|
|
4060
|
+
supports$1 = (0, _supports3.default)();
|
|
4061
|
+
|
|
4062
|
+
if (supports$1.focusFieldsetDisabled) {
|
|
2841
4063
|
delete disabledElements.fieldset;
|
|
2842
4064
|
}
|
|
2843
4065
|
|
|
2844
|
-
if (supports$
|
|
4066
|
+
if (supports$1.focusFormDisabled) {
|
|
2845
4067
|
delete disabledElements.form;
|
|
2846
4068
|
}
|
|
2847
4069
|
|
|
2848
4070
|
disabledElementsPattern = new RegExp('^(' + Object.keys(disabledElements).join('|') + ')$');
|
|
2849
4071
|
}
|
|
2850
4072
|
|
|
2851
|
-
var element =
|
|
4073
|
+
var element = (0, _contextToElement2.default)({
|
|
2852
4074
|
label: 'is/native-disabled-supported',
|
|
2853
4075
|
context: context
|
|
2854
4076
|
});
|
|
2855
4077
|
|
|
2856
4078
|
var nodeName = element.nodeName.toLowerCase();
|
|
2857
4079
|
return Boolean(disabledElementsPattern.test(nodeName));
|
|
2858
|
-
}
|
|
4080
|
+
};
|
|
4081
|
+
|
|
4082
|
+
var _contextToElement = contextToElement.exports;
|
|
4083
|
+
|
|
4084
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
4085
|
+
|
|
4086
|
+
var _supports2 = supports.exports;
|
|
4087
|
+
|
|
4088
|
+
var _supports3 = _interopRequireDefault(_supports2);
|
|
4089
|
+
|
|
4090
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4091
|
+
|
|
4092
|
+
// Determine if an element supports the disabled attribute
|
|
2859
4093
|
|
|
2860
4094
|
var supports$1 = void 0;
|
|
2861
4095
|
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
4096
|
+
// https://www.w3.org/TR/html5/disabled-elements.html#concept-element-disabled
|
|
4097
|
+
var disabledElementsPattern = void 0;
|
|
4098
|
+
var disabledElements = {
|
|
4099
|
+
input: true,
|
|
4100
|
+
select: true,
|
|
4101
|
+
textarea: true,
|
|
4102
|
+
button: true,
|
|
4103
|
+
fieldset: true,
|
|
4104
|
+
form: true
|
|
4105
|
+
};
|
|
2866
4106
|
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
}
|
|
4107
|
+
module.exports = exports['default'];
|
|
4108
|
+
|
|
4109
|
+
}(nativeDisabledSupported, nativeDisabledSupported.exports));
|
|
2871
4110
|
|
|
2872
|
-
function
|
|
4111
|
+
(function (module, exports) {
|
|
4112
|
+
|
|
4113
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4114
|
+
value: true
|
|
4115
|
+
});
|
|
4116
|
+
|
|
4117
|
+
exports.default = function (context) {
|
|
2873
4118
|
if (!supports$1) {
|
|
2874
|
-
supports$1 =
|
|
4119
|
+
supports$1 = (0, _supports3.default)();
|
|
2875
4120
|
}
|
|
2876
4121
|
|
|
2877
|
-
var element =
|
|
4122
|
+
var element = (0, _contextToElement2.default)({
|
|
2878
4123
|
label: 'is/disabled',
|
|
2879
4124
|
context: context
|
|
2880
4125
|
});
|
|
@@ -2884,7 +4129,7 @@ function isDisabled (context) {
|
|
|
2884
4129
|
return true;
|
|
2885
4130
|
}
|
|
2886
4131
|
|
|
2887
|
-
if (!
|
|
4132
|
+
if (!(0, _nativeDisabledSupported2.default)(element)) {
|
|
2888
4133
|
// non-form elements do not support the disabled attribute
|
|
2889
4134
|
return false;
|
|
2890
4135
|
}
|
|
@@ -2894,7 +4139,7 @@ function isDisabled (context) {
|
|
|
2894
4139
|
return true;
|
|
2895
4140
|
}
|
|
2896
4141
|
|
|
2897
|
-
var parents =
|
|
4142
|
+
var parents = (0, _parents2.default)({ context: element });
|
|
2898
4143
|
if (parents.some(isDisabledFieldset)) {
|
|
2899
4144
|
// a parental <fieldset> is disabld and inherits the state onto this element
|
|
2900
4145
|
return true;
|
|
@@ -2906,8 +4151,74 @@ function isDisabled (context) {
|
|
|
2906
4151
|
}
|
|
2907
4152
|
|
|
2908
4153
|
return false;
|
|
4154
|
+
};
|
|
4155
|
+
|
|
4156
|
+
var _contextToElement = contextToElement.exports;
|
|
4157
|
+
|
|
4158
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
4159
|
+
|
|
4160
|
+
var _parents = parents.exports;
|
|
4161
|
+
|
|
4162
|
+
var _parents2 = _interopRequireDefault(_parents);
|
|
4163
|
+
|
|
4164
|
+
var _nativeDisabledSupported = nativeDisabledSupported.exports;
|
|
4165
|
+
|
|
4166
|
+
var _nativeDisabledSupported2 = _interopRequireDefault(_nativeDisabledSupported);
|
|
4167
|
+
|
|
4168
|
+
var _supports2 = supports.exports;
|
|
4169
|
+
|
|
4170
|
+
var _supports3 = _interopRequireDefault(_supports2);
|
|
4171
|
+
|
|
4172
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4173
|
+
|
|
4174
|
+
// Determine if an element is disabled (i.e. not editable)
|
|
4175
|
+
|
|
4176
|
+
var supports$1 = void 0;
|
|
4177
|
+
|
|
4178
|
+
function isDisabledFieldset(element) {
|
|
4179
|
+
var nodeName = element.nodeName.toLowerCase();
|
|
4180
|
+
return nodeName === 'fieldset' && element.disabled;
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
function isDisabledForm(element) {
|
|
4184
|
+
var nodeName = element.nodeName.toLowerCase();
|
|
4185
|
+
return nodeName === 'form' && element.disabled;
|
|
2909
4186
|
}
|
|
2910
4187
|
|
|
4188
|
+
module.exports = exports['default'];
|
|
4189
|
+
|
|
4190
|
+
}(disabled, disabled.exports));
|
|
4191
|
+
|
|
4192
|
+
var onlyTabbable = {exports: {}};
|
|
4193
|
+
|
|
4194
|
+
(function (module, exports) {
|
|
4195
|
+
|
|
4196
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4197
|
+
value: true
|
|
4198
|
+
});
|
|
4199
|
+
|
|
4200
|
+
var _visible = visible.exports;
|
|
4201
|
+
|
|
4202
|
+
var _visible2 = _interopRequireDefault(_visible);
|
|
4203
|
+
|
|
4204
|
+
var _contextToElement = contextToElement.exports;
|
|
4205
|
+
|
|
4206
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
4207
|
+
|
|
4208
|
+
var _getFrameElement = getFrameElement.exports;
|
|
4209
|
+
|
|
4210
|
+
var _getFrameElement2 = _interopRequireDefault(_getFrameElement);
|
|
4211
|
+
|
|
4212
|
+
var _tabindexValue = tabindexValue.exports;
|
|
4213
|
+
|
|
4214
|
+
var _tabindexValue2 = _interopRequireDefault(_tabindexValue);
|
|
4215
|
+
|
|
4216
|
+
var _platform = platform$1.exports;
|
|
4217
|
+
|
|
4218
|
+
var _platform2 = _interopRequireDefault(_platform);
|
|
4219
|
+
|
|
4220
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4221
|
+
|
|
2911
4222
|
function isOnlyTabbableRules() {
|
|
2912
4223
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
2913
4224
|
context = _ref.context,
|
|
@@ -2917,20 +4228,20 @@ function isOnlyTabbableRules() {
|
|
|
2917
4228
|
visible: false
|
|
2918
4229
|
} : _ref$except;
|
|
2919
4230
|
|
|
2920
|
-
var element =
|
|
4231
|
+
var element = (0, _contextToElement2.default)({
|
|
2921
4232
|
label: 'is/only-tabbable',
|
|
2922
4233
|
resolveDocument: true,
|
|
2923
4234
|
context: context
|
|
2924
4235
|
});
|
|
2925
4236
|
|
|
2926
|
-
if (!except.visible && !
|
|
4237
|
+
if (!except.visible && !(0, _visible2.default)(element)) {
|
|
2927
4238
|
return false;
|
|
2928
4239
|
}
|
|
2929
4240
|
|
|
2930
|
-
if (!except.onlyFocusableBrowsingContext && (
|
|
2931
|
-
var frameElement =
|
|
4241
|
+
if (!except.onlyFocusableBrowsingContext && (_platform2.default.is.GECKO || _platform2.default.is.TRIDENT || _platform2.default.is.EDGE)) {
|
|
4242
|
+
var frameElement = (0, _getFrameElement2.default)(element);
|
|
2932
4243
|
if (frameElement) {
|
|
2933
|
-
if (
|
|
4244
|
+
if ((0, _tabindexValue2.default)(frameElement) < 0) {
|
|
2934
4245
|
// iframe[tabindex="-1"] and object[tabindex="-1"] inherit the
|
|
2935
4246
|
// tabbable demotion onto elements of their browsing contexts
|
|
2936
4247
|
return false;
|
|
@@ -2939,9 +4250,9 @@ function isOnlyTabbableRules() {
|
|
|
2939
4250
|
}
|
|
2940
4251
|
|
|
2941
4252
|
var nodeName = element.nodeName.toLowerCase();
|
|
2942
|
-
var tabindex =
|
|
4253
|
+
var tabindex = (0, _tabindexValue2.default)(element);
|
|
2943
4254
|
|
|
2944
|
-
if (nodeName === 'label' &&
|
|
4255
|
+
if (nodeName === 'label' && _platform2.default.is.GECKO) {
|
|
2945
4256
|
// Firefox cannot focus, but tab to: label[tabindex=0]
|
|
2946
4257
|
return tabindex !== null && tabindex >= 0;
|
|
2947
4258
|
}
|
|
@@ -2949,10 +4260,10 @@ function isOnlyTabbableRules() {
|
|
|
2949
4260
|
// SVG Elements were keyboard focusable but not script focusable before Firefox 51.
|
|
2950
4261
|
// Firefox 51 added the focus management DOM API (.focus and .blur) to SVGElement,
|
|
2951
4262
|
// see https://bugzilla.mozilla.org/show_bug.cgi?id=778654
|
|
2952
|
-
if (
|
|
4263
|
+
if (_platform2.default.is.GECKO && element.ownerSVGElement && !element.focus) {
|
|
2953
4264
|
if (nodeName === 'a' && element.hasAttribute('xlink:href')) {
|
|
2954
4265
|
// any focusable child of <svg> cannot be focused, but tabbed to
|
|
2955
|
-
if (
|
|
4266
|
+
if (_platform2.default.is.GECKO) {
|
|
2956
4267
|
return true;
|
|
2957
4268
|
}
|
|
2958
4269
|
}
|
|
@@ -2978,8 +4289,63 @@ isOnlyTabbableRules.except = function () {
|
|
|
2978
4289
|
|
|
2979
4290
|
// provide isOnlyTabbable(context) as default iterator callback
|
|
2980
4291
|
var isOnlyTabbable = isOnlyTabbableRules.except({});
|
|
4292
|
+
exports.default = isOnlyTabbable;
|
|
4293
|
+
module.exports = exports['default'];
|
|
4294
|
+
|
|
4295
|
+
}(onlyTabbable, onlyTabbable.exports));
|
|
4296
|
+
|
|
4297
|
+
(function (module, exports) {
|
|
4298
|
+
|
|
4299
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4300
|
+
value: true
|
|
4301
|
+
});
|
|
4302
|
+
|
|
4303
|
+
var _focusRelevant = focusRelevant.exports;
|
|
4304
|
+
|
|
4305
|
+
var _focusRelevant2 = _interopRequireDefault(_focusRelevant);
|
|
4306
|
+
|
|
4307
|
+
var _validArea = validArea.exports;
|
|
4308
|
+
|
|
4309
|
+
var _validArea2 = _interopRequireDefault(_validArea);
|
|
4310
|
+
|
|
4311
|
+
var _visible = visible.exports;
|
|
4312
|
+
|
|
4313
|
+
var _visible2 = _interopRequireDefault(_visible);
|
|
4314
|
+
|
|
4315
|
+
var _disabled = disabled.exports;
|
|
4316
|
+
|
|
4317
|
+
var _disabled2 = _interopRequireDefault(_disabled);
|
|
4318
|
+
|
|
4319
|
+
var _onlyTabbable = onlyTabbable.exports;
|
|
4320
|
+
|
|
4321
|
+
var _onlyTabbable2 = _interopRequireDefault(_onlyTabbable);
|
|
2981
4322
|
|
|
2982
|
-
var
|
|
4323
|
+
var _contextToElement = contextToElement.exports;
|
|
4324
|
+
|
|
4325
|
+
var _contextToElement2 = _interopRequireDefault(_contextToElement);
|
|
4326
|
+
|
|
4327
|
+
var _getFrameElement = getFrameElement.exports;
|
|
4328
|
+
|
|
4329
|
+
var _getFrameElement2 = _interopRequireDefault(_getFrameElement);
|
|
4330
|
+
|
|
4331
|
+
var _tabindexValue = tabindexValue.exports;
|
|
4332
|
+
|
|
4333
|
+
var _tabindexValue2 = _interopRequireDefault(_tabindexValue);
|
|
4334
|
+
|
|
4335
|
+
var _supports2 = supports.exports;
|
|
4336
|
+
|
|
4337
|
+
var _supports3 = _interopRequireDefault(_supports2);
|
|
4338
|
+
|
|
4339
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4340
|
+
|
|
4341
|
+
var supports$1 = void 0;
|
|
4342
|
+
// determine if an element can be focused
|
|
4343
|
+
|
|
4344
|
+
// https://www.w3.org/TR/html5/editing.html#focus-management
|
|
4345
|
+
|
|
4346
|
+
// NOTE: The following known issues exist:
|
|
4347
|
+
// Gecko: `svg a[xlink|href]` is not identified as focusable (because SVGElement.prototype.focus is missing)
|
|
4348
|
+
// Blink, WebKit: SVGElements that have been made focusable by adding a focus event listener are not identified as focusable
|
|
2983
4349
|
|
|
2984
4350
|
function isOnlyFocusRelevant(element) {
|
|
2985
4351
|
var nodeName = element.nodeName.toLowerCase();
|
|
@@ -2989,7 +4355,7 @@ function isOnlyFocusRelevant(element) {
|
|
|
2989
4355
|
return true;
|
|
2990
4356
|
}
|
|
2991
4357
|
|
|
2992
|
-
var _tabindex =
|
|
4358
|
+
var _tabindex = (0, _tabindexValue2.default)(element);
|
|
2993
4359
|
if (element.shadowRoot && _tabindex === null) {
|
|
2994
4360
|
// ShadowDOM host elements *may* receive focus
|
|
2995
4361
|
// even though they are not considered focuable
|
|
@@ -3001,14 +4367,14 @@ function isOnlyFocusRelevant(element) {
|
|
|
3001
4367
|
// there's no way to make an element focusable other than by adding a tabindex,
|
|
3002
4368
|
// and focus behavior of the label element seems hard-wired to ignore tabindex
|
|
3003
4369
|
// in some browsers (like Gecko, Blink and WebKit)
|
|
3004
|
-
return !supports.focusLabelTabindex || _tabindex === null;
|
|
4370
|
+
return !supports$1.focusLabelTabindex || _tabindex === null;
|
|
3005
4371
|
}
|
|
3006
4372
|
|
|
3007
4373
|
if (nodeName === 'legend') {
|
|
3008
4374
|
return _tabindex === null;
|
|
3009
4375
|
}
|
|
3010
4376
|
|
|
3011
|
-
if (supports.focusSvgFocusableAttribute && (element.ownerSVGElement || nodeName === 'svg')) {
|
|
4377
|
+
if (supports$1.focusSvgFocusableAttribute && (element.ownerSVGElement || nodeName === 'svg')) {
|
|
3012
4378
|
// Internet Explorer understands the focusable attribute introduced in SVG Tiny 1.2
|
|
3013
4379
|
var focusableAttribute = element.getAttribute('focusable');
|
|
3014
4380
|
return focusableAttribute && focusableAttribute === 'false';
|
|
@@ -3017,13 +4383,13 @@ function isOnlyFocusRelevant(element) {
|
|
|
3017
4383
|
if (nodeName === 'img' && element.hasAttribute('usemap')) {
|
|
3018
4384
|
// Gecko, Trident and Edge do not allow an image with an image map and tabindex to be focused,
|
|
3019
4385
|
// it appears the tabindex is overruled so focus is still forwarded to the <map>
|
|
3020
|
-
return _tabindex === null || !supports.focusImgUsemapTabindex;
|
|
4386
|
+
return _tabindex === null || !supports$1.focusImgUsemapTabindex;
|
|
3021
4387
|
}
|
|
3022
4388
|
|
|
3023
4389
|
if (nodeName === 'area') {
|
|
3024
4390
|
// all <area>s are considered relevant,
|
|
3025
4391
|
// but only the valid <area>s are focusable
|
|
3026
|
-
return !
|
|
4392
|
+
return !(0, _validArea2.default)(element);
|
|
3027
4393
|
}
|
|
3028
4394
|
|
|
3029
4395
|
return false;
|
|
@@ -3039,22 +4405,22 @@ function isFocusableRules() {
|
|
|
3039
4405
|
onlyTabbable: false
|
|
3040
4406
|
} : _ref$except;
|
|
3041
4407
|
|
|
3042
|
-
if (!supports) {
|
|
3043
|
-
supports =
|
|
4408
|
+
if (!supports$1) {
|
|
4409
|
+
supports$1 = (0, _supports3.default)();
|
|
3044
4410
|
}
|
|
3045
4411
|
|
|
3046
|
-
var _isOnlyTabbable =
|
|
4412
|
+
var _isOnlyTabbable = _onlyTabbable2.default.rules.except({
|
|
3047
4413
|
onlyFocusableBrowsingContext: true,
|
|
3048
4414
|
visible: except.visible
|
|
3049
4415
|
});
|
|
3050
4416
|
|
|
3051
|
-
var element =
|
|
4417
|
+
var element = (0, _contextToElement2.default)({
|
|
3052
4418
|
label: 'is/focusable',
|
|
3053
4419
|
resolveDocument: true,
|
|
3054
4420
|
context: context
|
|
3055
4421
|
});
|
|
3056
4422
|
|
|
3057
|
-
var focusRelevant =
|
|
4423
|
+
var focusRelevant = _focusRelevant2.default.rules({
|
|
3058
4424
|
context: element,
|
|
3059
4425
|
except: except
|
|
3060
4426
|
});
|
|
@@ -3063,7 +4429,7 @@ function isFocusableRules() {
|
|
|
3063
4429
|
return false;
|
|
3064
4430
|
}
|
|
3065
4431
|
|
|
3066
|
-
if (!except.disabled &&
|
|
4432
|
+
if (!except.disabled && (0, _disabled2.default)(element)) {
|
|
3067
4433
|
return false;
|
|
3068
4434
|
}
|
|
3069
4435
|
|
|
@@ -3079,12 +4445,12 @@ function isFocusableRules() {
|
|
|
3079
4445
|
except: {}
|
|
3080
4446
|
};
|
|
3081
4447
|
|
|
3082
|
-
if (supports.focusInHiddenIframe) {
|
|
4448
|
+
if (supports$1.focusInHiddenIframe) {
|
|
3083
4449
|
// WebKit and Blink can focus content in hidden <iframe> and <object>
|
|
3084
4450
|
visibilityOptions.except.browsingContext = true;
|
|
3085
4451
|
}
|
|
3086
4452
|
|
|
3087
|
-
if (supports.focusObjectSvgHidden) {
|
|
4453
|
+
if (supports$1.focusObjectSvgHidden) {
|
|
3088
4454
|
// Blink allows focusing the object element, even if it has visibility: hidden;
|
|
3089
4455
|
// @browser-issue Blink https://code.google.com/p/chromium/issues/detail?id=586191
|
|
3090
4456
|
var _nodeName2 = element.nodeName.toLowerCase();
|
|
@@ -3093,15 +4459,15 @@ function isFocusableRules() {
|
|
|
3093
4459
|
}
|
|
3094
4460
|
}
|
|
3095
4461
|
|
|
3096
|
-
if (!
|
|
4462
|
+
if (!_visible2.default.rules(visibilityOptions)) {
|
|
3097
4463
|
return false;
|
|
3098
4464
|
}
|
|
3099
4465
|
}
|
|
3100
4466
|
|
|
3101
|
-
var frameElement =
|
|
4467
|
+
var frameElement = (0, _getFrameElement2.default)(element);
|
|
3102
4468
|
if (frameElement) {
|
|
3103
4469
|
var _nodeName = frameElement.nodeName.toLowerCase();
|
|
3104
|
-
if (_nodeName === 'object' && !supports.focusInZeroDimensionObject) {
|
|
4470
|
+
if (_nodeName === 'object' && !supports$1.focusInZeroDimensionObject) {
|
|
3105
4471
|
if (!frameElement.offsetWidth || !frameElement.offsetHeight) {
|
|
3106
4472
|
// WebKit can not focus content in <object> if it doesn't have dimensions
|
|
3107
4473
|
return false;
|
|
@@ -3110,7 +4476,7 @@ function isFocusableRules() {
|
|
|
3110
4476
|
}
|
|
3111
4477
|
|
|
3112
4478
|
var nodeName = element.nodeName.toLowerCase();
|
|
3113
|
-
if (nodeName === 'svg' && supports.focusSvgInIframe && !frameElement && element.getAttribute('tabindex') === null) {
|
|
4479
|
+
if (nodeName === 'svg' && supports$1.focusSvgInIframe && !frameElement && element.getAttribute('tabindex') === null) {
|
|
3114
4480
|
return false;
|
|
3115
4481
|
}
|
|
3116
4482
|
|
|
@@ -3134,6 +4500,12 @@ isFocusableRules.except = function () {
|
|
|
3134
4500
|
|
|
3135
4501
|
// provide isFocusRelevant(context) as default iterator callback
|
|
3136
4502
|
var isFocusable = isFocusableRules.except({});
|
|
4503
|
+
exports.default = isFocusable;
|
|
4504
|
+
module.exports = exports['default'];
|
|
4505
|
+
|
|
4506
|
+
}(focusable, focusable.exports));
|
|
4507
|
+
|
|
4508
|
+
const isFocusable = /*@__PURE__*/getDefaultExportFromCjs(focusable.exports);
|
|
3137
4509
|
|
|
3138
4510
|
/*!
|
|
3139
4511
|
* long-press-event - v@version@
|
|
@@ -3399,17 +4771,105 @@ var isFocusable = isFocusableRules.except({});
|
|
|
3399
4771
|
|
|
3400
4772
|
}(window, document));
|
|
3401
4773
|
|
|
3402
|
-
const postTooltipCss = ":host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51}post-popovercontainer::part(popover){padding:.25rem .5rem;max-width:13.5rem;min-height:1rem}";
|
|
4774
|
+
const postTooltipCss = ":host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51}post-popovercontainer::part(popover){padding:.25rem .5rem;max-width:13.5rem;min-height:1rem}post-popovercontainer.has-arrow::part(popover)::after{position:absolute;content:\"\";inset:-13px;z-index:-1}";
|
|
4775
|
+
const PostTooltipStyle0 = postTooltipCss;
|
|
3403
4776
|
|
|
4777
|
+
/**
|
|
4778
|
+
* @slot default - Slot for the content of the tooltip.
|
|
4779
|
+
*/
|
|
4780
|
+
/**
|
|
4781
|
+
* Track how many instances remain on the page. Used for removing global event listeners
|
|
4782
|
+
*/
|
|
4783
|
+
let tooltipInstances = 0;
|
|
4784
|
+
let hideTooltipTimeout = null;
|
|
4785
|
+
/**
|
|
4786
|
+
* Global event listener to show tooltips. This is globalized so that triggers that are rendered
|
|
4787
|
+
* async will still work without the need to set listeners on the element itself
|
|
4788
|
+
* @param e Event
|
|
4789
|
+
* @returns
|
|
4790
|
+
*/
|
|
4791
|
+
const globalInterestHandler = (e) => {
|
|
4792
|
+
const target = e.target;
|
|
4793
|
+
if (!(e === null || e === void 0 ? void 0 : e.target) || !('getAttribute' in e.target))
|
|
4794
|
+
return;
|
|
4795
|
+
const tooltipTarget = target.getAttribute('data-tooltip-target');
|
|
4796
|
+
if (!tooltipTarget || tooltipTarget === '')
|
|
4797
|
+
return;
|
|
4798
|
+
const tooltip = document.getElementById(tooltipTarget);
|
|
4799
|
+
tooltip === null || tooltip === void 0 ? void 0 : tooltip.show(target);
|
|
4800
|
+
if (hideTooltipTimeout) {
|
|
4801
|
+
window.clearTimeout(hideTooltipTimeout);
|
|
4802
|
+
hideTooltipTimeout = null;
|
|
4803
|
+
}
|
|
4804
|
+
};
|
|
4805
|
+
/**
|
|
4806
|
+
* Global event listener to hide tooltips. This is globalized so that triggers that are rendered
|
|
4807
|
+
* async will still work without the need to set listeners on the element itself
|
|
4808
|
+
* @param e Event
|
|
4809
|
+
* @returns
|
|
4810
|
+
*/
|
|
4811
|
+
const globalInterestLostHandler = (e) => {
|
|
4812
|
+
const target = e.target;
|
|
4813
|
+
const tooltipTarget = target.getAttribute('data-tooltip-target');
|
|
4814
|
+
if (!tooltipTarget || tooltipTarget === '')
|
|
4815
|
+
return;
|
|
4816
|
+
const tooltip = document.getElementById(tooltipTarget);
|
|
4817
|
+
globalHideTooltip(tooltip);
|
|
4818
|
+
};
|
|
4819
|
+
/**
|
|
4820
|
+
* Start the hiding process through a timeout to give other interest events a chance to
|
|
4821
|
+
* intervene and cancel the hide event.
|
|
4822
|
+
* @param {HTMLPostTooltipElement} tooltip
|
|
4823
|
+
*/
|
|
4824
|
+
const globalHideTooltip = (tooltip) => {
|
|
4825
|
+
hideTooltipTimeout = window.setTimeout(() => {
|
|
4826
|
+
tooltip.hide();
|
|
4827
|
+
hideTooltipTimeout = null;
|
|
4828
|
+
}, 42);
|
|
4829
|
+
};
|
|
4830
|
+
/**
|
|
4831
|
+
* Patch some accessibility features that are hard to remember or understand
|
|
4832
|
+
* @param {HTMLElement} trigger
|
|
4833
|
+
*/
|
|
4834
|
+
const patchAccessibilityFeatures = (trigger) => {
|
|
4835
|
+
const describedBy = trigger.getAttribute('aria-describedby');
|
|
4836
|
+
const id = trigger.getAttribute('data-tooltip-target');
|
|
4837
|
+
// Add tooltip to aria-describedby
|
|
4838
|
+
if (!(describedBy === null || describedBy === void 0 ? void 0 : describedBy.includes(id))) {
|
|
4839
|
+
const newDescribedBy = describedBy ? `${describedBy} ${id}` : id;
|
|
4840
|
+
trigger.setAttribute('aria-describedby', newDescribedBy);
|
|
4841
|
+
}
|
|
4842
|
+
// Make element focusable
|
|
4843
|
+
if (!isFocusable(trigger)) {
|
|
4844
|
+
trigger.setAttribute('tabindex', '0');
|
|
4845
|
+
}
|
|
4846
|
+
};
|
|
4847
|
+
/**
|
|
4848
|
+
* Handle attribute changes and childList changes from the observer
|
|
4849
|
+
* @param {MutationRecord[]} mutationList
|
|
4850
|
+
*/
|
|
4851
|
+
const triggerObserverHandler = mutationList => {
|
|
4852
|
+
mutationList.forEach(mutation => {
|
|
4853
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'data-tooltip-target') {
|
|
4854
|
+
patchAccessibilityFeatures(mutation.target);
|
|
4855
|
+
}
|
|
4856
|
+
if (mutation.type === 'childList') {
|
|
4857
|
+
mutation.addedNodes.forEach(node => {
|
|
4858
|
+
if (node.nodeType === Node.ELEMENT_NODE &&
|
|
4859
|
+
node.hasAttribute('data-tooltip-target')) {
|
|
4860
|
+
patchAccessibilityFeatures(node);
|
|
4861
|
+
}
|
|
4862
|
+
});
|
|
4863
|
+
}
|
|
4864
|
+
});
|
|
4865
|
+
};
|
|
4866
|
+
// Initialize a mutation observer for patching accessibility features
|
|
4867
|
+
const triggerObserver = new MutationObserver(triggerObserverHandler);
|
|
3404
4868
|
const PostTooltip = class {
|
|
3405
4869
|
constructor(hostRef) {
|
|
3406
4870
|
index.registerInstance(this, hostRef);
|
|
3407
4871
|
this.placement = 'top';
|
|
3408
4872
|
this.arrow = true;
|
|
3409
|
-
// Create local versions of event handlers for de-registration
|
|
3410
|
-
// https://stackoverflow.com/questions/33859113/javascript-removeeventlistener-not-working-inside-a-class
|
|
3411
|
-
this.localShowTooltip = e => this.show(e.target);
|
|
3412
|
-
this.localHideTooltip = this.hide.bind(this);
|
|
3413
4873
|
}
|
|
3414
4874
|
connectedCallback() {
|
|
3415
4875
|
if (!this.host.id) {
|
|
@@ -3417,29 +4877,45 @@ const PostTooltip = class {
|
|
|
3417
4877
|
/*prettier-ignore*/
|
|
3418
4878
|
'No id set: <post-tooltip> must have an id, linking it to it\'s target element using the data-tooltip-target attribute.');
|
|
3419
4879
|
}
|
|
3420
|
-
|
|
3421
|
-
|
|
4880
|
+
}
|
|
4881
|
+
/**
|
|
4882
|
+
* Add interest event listeners, but only once, and start
|
|
4883
|
+
* the accessibility patcher
|
|
4884
|
+
*/
|
|
4885
|
+
componentWillLoad() {
|
|
4886
|
+
if (tooltipInstances === 0) {
|
|
4887
|
+
// This is the first tooltip on the page, add event listeners
|
|
4888
|
+
document.addEventListener('pointerover', globalInterestHandler);
|
|
4889
|
+
document.addEventListener('pointerout', globalInterestLostHandler);
|
|
4890
|
+
document.addEventListener('focusin', globalInterestHandler);
|
|
4891
|
+
document.addEventListener('focusout', globalInterestLostHandler);
|
|
4892
|
+
document.addEventListener('long-press', globalInterestHandler);
|
|
4893
|
+
// Initially run the accessibility patcher on all triggers
|
|
4894
|
+
document.querySelectorAll('[data-tooltip-target]').forEach(patchAccessibilityFeatures);
|
|
4895
|
+
// Start watching for future triggers
|
|
4896
|
+
triggerObserver.observe(document.body, {
|
|
4897
|
+
subtree: true,
|
|
4898
|
+
childList: true,
|
|
4899
|
+
attributeFilter: ['data-tooltip-target'],
|
|
4900
|
+
});
|
|
3422
4901
|
}
|
|
3423
|
-
|
|
3424
|
-
// https://github.com/openui/open-ui/issues/767#issuecomment-1654177227
|
|
3425
|
-
this.triggers.forEach(trigger => this.patchPopoverTargetActionInterest(trigger));
|
|
4902
|
+
tooltipInstances++;
|
|
3426
4903
|
}
|
|
3427
4904
|
/**
|
|
3428
4905
|
* Remove a bunch of event listeners if the tooltip gets removed from the DOM
|
|
4906
|
+
* and disconnect the accessibility patcher
|
|
3429
4907
|
*/
|
|
3430
4908
|
disconnectedCallback() {
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
// for browsers that don't support popover yet
|
|
3442
|
-
document.body.appendChild(this.host);
|
|
4909
|
+
tooltipInstances--;
|
|
4910
|
+
if (tooltipInstances <= 0) {
|
|
4911
|
+
// The last tooltip has been removed, stop listening for these kind of events
|
|
4912
|
+
document.removeEventListener('pointerover', globalInterestHandler);
|
|
4913
|
+
document.removeEventListener('pointerout', globalInterestLostHandler);
|
|
4914
|
+
document.removeEventListener('focusin', globalInterestHandler);
|
|
4915
|
+
document.removeEventListener('focusout', globalInterestLostHandler);
|
|
4916
|
+
document.removeEventListener('long-press', globalInterestHandler);
|
|
4917
|
+
triggerObserver.disconnect();
|
|
4918
|
+
}
|
|
3443
4919
|
}
|
|
3444
4920
|
/**
|
|
3445
4921
|
* Programmatically display the tooltip
|
|
@@ -3462,33 +4938,27 @@ const PostTooltip = class {
|
|
|
3462
4938
|
async toggle(target, force) {
|
|
3463
4939
|
this.popoverRef.toggle(target, force);
|
|
3464
4940
|
}
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
trigger.addEventListener('blur', this.localHideTooltip);
|
|
3473
|
-
trigger.addEventListener('long-press', this.localShowTooltip);
|
|
3474
|
-
// Patch missing aria-describedby attribute on the trigger without overriding existing values
|
|
3475
|
-
const describedBy = trigger.getAttribute('aria-describedby');
|
|
3476
|
-
if (!(describedBy === null || describedBy === void 0 ? void 0 : describedBy.includes(this.host.id))) {
|
|
3477
|
-
const newDescribedBy = describedBy ? `${describedBy} ${this.host.id}` : this.host.id;
|
|
3478
|
-
trigger.setAttribute('aria-describedby', newDescribedBy);
|
|
3479
|
-
}
|
|
3480
|
-
// Patch missing focus ability on the trigger element
|
|
3481
|
-
if (!isFocusable(trigger)) {
|
|
3482
|
-
trigger.setAttribute('tabindex', '0');
|
|
4941
|
+
/**
|
|
4942
|
+
* Pointer or focus is on the tooltip, stop the tooltip from disappearing
|
|
4943
|
+
*/
|
|
4944
|
+
handleInterest() {
|
|
4945
|
+
if (hideTooltipTimeout) {
|
|
4946
|
+
window.clearTimeout(hideTooltipTimeout);
|
|
4947
|
+
hideTooltipTimeout = null;
|
|
3483
4948
|
}
|
|
3484
4949
|
}
|
|
4950
|
+
/**
|
|
4951
|
+
* Pointer or focus left the tooltip, initiate the hiding process
|
|
4952
|
+
*/
|
|
4953
|
+
handleInterestLost() {
|
|
4954
|
+
globalHideTooltip(this);
|
|
4955
|
+
}
|
|
3485
4956
|
render() {
|
|
3486
|
-
|
|
4957
|
+
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4958
|
+
return (index.h(index.Host, { key: 'd773ddc0ce1a4dc682dfd05aea2191edb592a1a9', "data-version": _package.version, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, index.h("post-popovercontainer", { key: '4465e819738b663ef9961e61b2b58a4a0a3a1039', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, index.h("slot", { key: 'c97e4c780acf110048b8415d2714273abbe5e479' }))));
|
|
3487
4959
|
}
|
|
3488
4960
|
get host() { return index.getElement(this); }
|
|
3489
4961
|
};
|
|
3490
|
-
PostTooltip.style =
|
|
4962
|
+
PostTooltip.style = PostTooltipStyle0;
|
|
3491
4963
|
|
|
3492
4964
|
exports.PostTooltip = PostTooltip;
|
|
3493
|
-
|
|
3494
|
-
//# sourceMappingURL=post-tooltip-659af1e3.js.map
|