@dso-toolkit/core 58.1.0 → 58.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{clsx.m-b81c6b86.js → clsx-fd0bee58.js} +1 -1
- package/dist/{esm/clsx.m-25174a58.js.map → cjs/clsx-fd0bee58.js.map} +1 -1
- package/dist/cjs/{create-identifier-6ee2a08b.js → create-identifier-5900c27b.js} +1 -1
- package/dist/cjs/create-identifier-5900c27b.js.map +1 -0
- package/dist/cjs/dso-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-accordion.cjs.entry.js +1 -1
- package/dist/cjs/dso-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-action-list-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-action-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-action-list.cjs.entry.js +1 -1
- package/dist/cjs/dso-action-list.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-alert_5.cjs.entry.js +9 -9
- package/dist/cjs/dso-alert_5.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-output_3.cjs.entry.js +2 -2
- package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +2 -2
- package/dist/cjs/dso-autosuggest.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-banner.cjs.entry.js +3 -3
- package/dist/cjs/dso-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-card-container.cjs.entry.js +1 -1
- package/dist/cjs/dso-card-container.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-card.cjs.entry.js +4 -4
- package/dist/cjs/dso-card.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +3 -2
- package/dist/cjs/dso-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +3 -3
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-expandable.cjs.entry.js +3 -3
- package/dist/cjs/dso-expandable.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +5 -5
- package/dist/cjs/dso-header.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +3 -3
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +3 -3
- package/dist/cjs/dso-highlight-box.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-image-overlay.cjs.entry.js +3 -3
- package/dist/cjs/dso-image-overlay.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-info-button.cjs.entry.js +3 -3
- package/dist/cjs/dso-info-button.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +5 -5
- package/dist/cjs/dso-info_2.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-list-button.cjs.entry.js +5 -5
- package/dist/cjs/dso-list-button.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-overlays.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-pagination.cjs.entry.js +2 -2
- package/dist/cjs/dso-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-responsive-element.cjs.entry.js +1 -1
- package/dist/cjs/dso-responsive-element.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-scrollable.cjs.entry.js +3 -3
- package/dist/cjs/dso-scrollable.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-table.cjs.entry.js +3 -3
- package/dist/cjs/dso-table.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +2 -2
- package/dist/cjs/dso-toggletip.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +2 -5
- package/dist/cjs/dso-toolkit.cjs.js.map +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +5 -5
- package/dist/cjs/dso-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-tree-view.cjs.entry.js +4 -4
- package/dist/cjs/dso-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +3 -3
- package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1 -1
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -1
- package/dist/cjs/{focus-trap.esm-a5b7273f.js → focus-trap.esm-b6bba312.js} +245 -97
- package/dist/cjs/focus-trap.esm-b6bba312.js.map +1 -0
- package/dist/cjs/{has-overflow-d7baff1e.js → has-overflow-27e20400.js} +1 -1
- package/dist/cjs/has-overflow-27e20400.js.map +1 -0
- package/dist/cjs/{index-d4003ee3.js → index-d46ec033.js} +91 -19
- package/dist/cjs/index-d46ec033.js.map +1 -0
- package/dist/cjs/{index.esm-0e935715.js → index.esm-970bc106.js} +49 -16
- package/dist/cjs/index.esm-970bc106.js.map +1 -0
- package/dist/cjs/{is-modified-event-dcab03a0.js → is-modified-event-ccd748ea.js} +1 -1
- package/dist/cjs/is-modified-event-ccd748ea.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -11
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +45 -45
- package/dist/collection/components/accordion/accordion.js +6 -3
- package/dist/collection/components/accordion/accordion.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.js +8 -4
- package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
- package/dist/collection/components/annotation-button/annotation-button.js +2 -1
- package/dist/collection/components/annotation-button/annotation-button.js.map +1 -1
- package/dist/collection/components/annotation-output/annotation-output.js +2 -1
- package/dist/collection/components/annotation-output/annotation-output.js.map +1 -1
- package/dist/collection/components/autosuggest/autosuggest.js +5 -3
- package/dist/collection/components/autosuggest/autosuggest.js.map +1 -1
- package/dist/collection/components/card/card.js +4 -2
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/card-container/card-container.js +2 -1
- package/dist/collection/components/card-container/card-container.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.js +18 -9
- package/dist/collection/components/date-picker/date-picker.js.map +1 -1
- package/dist/collection/components/date-picker/date-utils.js +1 -0
- package/dist/collection/components/date-picker/date-utils.js.map +1 -1
- package/dist/collection/components/document-component/document-component.css +1 -1
- package/dist/collection/components/document-component/document-component.js +6 -3
- package/dist/collection/components/document-component/document-component.js.map +1 -1
- package/dist/collection/components/expandable/expandable.js +2 -1
- package/dist/collection/components/expandable/expandable.js.map +1 -1
- package/dist/collection/components/header/header.js +4 -2
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/info/info.js +2 -1
- package/dist/collection/components/info/info.js.map +1 -1
- package/dist/collection/components/info-button/info-button.js +4 -2
- package/dist/collection/components/info-button/info-button.js.map +1 -1
- package/dist/collection/components/label/label.js +4 -2
- package/dist/collection/components/label/label.js.map +1 -1
- package/dist/collection/components/list-button/list-button.js +4 -2
- package/dist/collection/components/list-button/list-button.js.map +1 -1
- package/dist/collection/components/map-base-layers/map-base-layers.js +4 -2
- package/dist/collection/components/map-base-layers/map-base-layers.js.map +1 -1
- package/dist/collection/components/map-controls/map-controls.js +12 -6
- package/dist/collection/components/map-controls/map-controls.js.map +1 -1
- package/dist/collection/components/map-overlays/map-overlays.js +4 -2
- package/dist/collection/components/map-overlays/map-overlays.js.map +1 -1
- package/dist/collection/components/modal/modal.js +2 -1
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/ozon-content/ozon-content.css +5 -5
- package/dist/collection/components/ozon-content/ozon-content.js +4 -2
- package/dist/collection/components/ozon-content/ozon-content.js.map +1 -1
- package/dist/collection/components/pagination/pagination.js +2 -1
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/responsive-element/responsive-element.js +6 -3
- package/dist/collection/components/responsive-element/responsive-element.js.map +1 -1
- package/dist/collection/components/scrollable/scrollable.js +4 -2
- package/dist/collection/components/scrollable/scrollable.js.map +1 -1
- package/dist/collection/components/selectable/selectable.css +1 -1
- package/dist/collection/components/selectable/selectable.js +4 -2
- package/dist/collection/components/selectable/selectable.js.map +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.js +2 -1
- package/dist/collection/components/slide-toggle/slide-toggle.js.map +1 -1
- package/dist/collection/components/toggletip/toggletip.js +1 -1
- package/dist/collection/components/toggletip/toggletip.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.css +1 -3
- package/dist/collection/components/tooltip/tooltip.js +4 -2
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/components/tree-view/tree-view.js +14 -7
- package/dist/collection/components/tree-view/tree-view.js.map +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +10 -5
- package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/alert.js.map +1 -1
- package/dist/components/annotation-button.js.map +1 -1
- package/dist/components/annotation-output.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/{clsx.m.js → clsx.js} +1 -1
- package/dist/components/clsx.js.map +1 -0
- package/dist/components/create-identifier.js.map +1 -1
- package/dist/components/document-component.js +1 -1
- package/dist/components/document-component.js.map +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dso-accordion-section.js.map +1 -1
- package/dist/components/dso-accordion.js.map +1 -1
- package/dist/components/dso-action-list-item.js.map +1 -1
- package/dist/components/dso-action-list.js.map +1 -1
- package/dist/components/dso-attachments-counter.js.map +1 -1
- package/dist/components/dso-autosuggest.js +1 -1
- package/dist/components/dso-autosuggest.js.map +1 -1
- package/dist/components/dso-banner.js +1 -1
- package/dist/components/dso-banner.js.map +1 -1
- package/dist/components/dso-card-container.js.map +1 -1
- package/dist/components/dso-card.js +1 -1
- package/dist/components/dso-card.js.map +1 -1
- package/dist/components/dso-date-picker.js +1 -0
- package/dist/components/dso-date-picker.js.map +1 -1
- package/dist/components/dso-header.js +1 -1
- package/dist/components/dso-header.js.map +1 -1
- package/dist/components/dso-helpcenter-panel.js.map +1 -1
- package/dist/components/dso-highlight-box.js +1 -1
- package/dist/components/dso-highlight-box.js.map +1 -1
- package/dist/components/dso-image-overlay.js.map +1 -1
- package/dist/components/dso-list-button.js +1 -1
- package/dist/components/dso-list-button.js.map +1 -1
- package/dist/components/dso-map-base-layers.js.map +1 -1
- package/dist/components/dso-map-controls.js.map +1 -1
- package/dist/components/dso-map-overlays.js.map +1 -1
- package/dist/components/dso-modal.js.map +1 -1
- package/dist/components/dso-pagination.js.map +1 -1
- package/dist/components/dso-progress-bar.js.map +1 -1
- package/dist/components/dso-table.js.map +1 -1
- package/dist/components/dso-toggletip.js +1 -1
- package/dist/components/dso-toggletip.js.map +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-tree-view.js.map +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/dso-viewer-grid.js.map +1 -1
- package/dist/components/dsot-document-component-demo.js.map +1 -1
- package/dist/components/expandable.js +1 -1
- package/dist/components/expandable.js.map +1 -1
- package/dist/components/focus-trap.esm.js +244 -96
- package/dist/components/focus-trap.esm.js.map +1 -1
- package/dist/components/has-overflow.js.map +1 -1
- package/dist/components/icon.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.esm.js +48 -16
- package/dist/components/index.esm.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/info-button.js +1 -1
- package/dist/components/info-button.js.map +1 -1
- package/dist/components/info.js.map +1 -1
- package/dist/components/is-modified-event.js.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/ozon-content.js +2 -2
- package/dist/components/ozon-content.js.map +1 -1
- package/dist/components/progress-indicator.js.map +1 -1
- package/dist/components/responsive-element.js.map +1 -1
- package/dist/components/scrollable.js +1 -1
- package/dist/components/scrollable.js.map +1 -1
- package/dist/components/selectable.js +2 -2
- package/dist/components/selectable.js.map +1 -1
- package/dist/components/slide-toggle.js.map +1 -1
- package/dist/components/tooltip.js +2 -2
- package/dist/components/tooltip.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/p-0bac5eea.entry.js +2 -0
- package/dist/dso-toolkit/p-0bac5eea.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-bc9e3037.entry.js → p-0e095af8.entry.js} +2 -2
- package/dist/dso-toolkit/p-0e095af8.entry.js.map +1 -0
- package/dist/dso-toolkit/p-1521d319.js +6 -0
- package/dist/dso-toolkit/p-1521d319.js.map +1 -0
- package/dist/dso-toolkit/{p-1c721290.entry.js → p-169e3931.entry.js} +2 -2
- package/dist/dso-toolkit/p-169e3931.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-4bc67e5c.entry.js → p-298453a9.entry.js} +2 -2
- package/dist/dso-toolkit/p-298453a9.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-2ccbf58d.entry.js → p-3631ce14.entry.js} +2 -2
- package/dist/dso-toolkit/p-3631ce14.entry.js.map +1 -0
- package/dist/dso-toolkit/p-3ca5b6f4.js +3 -0
- package/dist/dso-toolkit/p-3ca5b6f4.js.map +1 -0
- package/dist/dso-toolkit/{p-3cbf8b97.entry.js → p-41066f6f.entry.js} +2 -2
- package/dist/dso-toolkit/p-41066f6f.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-22baee8e.entry.js → p-42ba2c81.entry.js} +2 -2
- package/dist/dso-toolkit/p-42ba2c81.entry.js.map +1 -0
- package/dist/dso-toolkit/p-48d76094.entry.js +2 -0
- package/dist/dso-toolkit/p-48d76094.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-4e86089d.entry.js → p-4ace5655.entry.js} +2 -2
- package/dist/dso-toolkit/p-4ace5655.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-745b6678.entry.js → p-59fe2479.entry.js} +2 -2
- package/dist/dso-toolkit/p-59fe2479.entry.js.map +1 -0
- package/dist/dso-toolkit/p-5c5e43d3.entry.js +2 -0
- package/dist/dso-toolkit/p-5c5e43d3.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-e69d7e62.entry.js → p-5c976ac9.entry.js} +2 -2
- package/dist/dso-toolkit/p-5c976ac9.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-a00c4003.entry.js → p-60301d53.entry.js} +2 -2
- package/dist/dso-toolkit/{p-a00c4003.entry.js.map → p-60301d53.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-7a6be9c1.entry.js → p-6af09f64.entry.js} +2 -2
- package/dist/dso-toolkit/p-6af09f64.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-5ee79846.entry.js → p-6f533d1a.entry.js} +2 -2
- package/dist/dso-toolkit/p-6f533d1a.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-f21e4ccc.entry.js → p-755e55cf.entry.js} +2 -2
- package/dist/dso-toolkit/p-755e55cf.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-420e0d23.entry.js → p-7ef42606.entry.js} +2 -2
- package/dist/dso-toolkit/p-7ef42606.entry.js.map +1 -0
- package/dist/dso-toolkit/p-86133aa5.js +6 -0
- package/dist/dso-toolkit/p-86133aa5.js.map +1 -0
- package/dist/dso-toolkit/{p-669c3743.entry.js → p-8af61320.entry.js} +2 -2
- package/dist/dso-toolkit/p-8af61320.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-a4d423fd.entry.js → p-8bee65a1.entry.js} +2 -2
- package/dist/dso-toolkit/p-8bee65a1.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-3d4308ba.entry.js → p-95b70498.entry.js} +2 -2
- package/dist/dso-toolkit/p-95b70498.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-33df9903.js → p-9747c291.js} +1 -1
- package/dist/dso-toolkit/p-9747c291.js.map +1 -0
- package/dist/dso-toolkit/{p-5e5302ef.entry.js → p-9a3f154b.entry.js} +2 -2
- package/dist/dso-toolkit/p-9a3f154b.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-4da2fa8b.entry.js → p-9dbe2931.entry.js} +2 -2
- package/dist/dso-toolkit/p-9dbe2931.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-423fa057.entry.js → p-a2a82d7c.entry.js} +2 -2
- package/dist/dso-toolkit/p-a2a82d7c.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-604eb60b.entry.js → p-a3dc08f4.entry.js} +2 -2
- package/dist/dso-toolkit/p-a3dc08f4.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-712fca2c.entry.js → p-a63c82a4.entry.js} +2 -2
- package/dist/dso-toolkit/p-a63c82a4.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-b34f24b4.entry.js → p-a7186c03.entry.js} +2 -2
- package/dist/dso-toolkit/p-a7186c03.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-51f19c06.entry.js → p-aadd6311.entry.js} +2 -2
- package/dist/dso-toolkit/p-aadd6311.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-440fc4ae.entry.js → p-b68ac725.entry.js} +2 -2
- package/dist/dso-toolkit/p-b68ac725.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-6c543986.js → p-c19cfe3f.js} +1 -1
- package/dist/dso-toolkit/p-c19cfe3f.js.map +1 -0
- package/dist/dso-toolkit/{p-6a1980b4.js → p-c87b4d11.js} +1 -1
- package/dist/dso-toolkit/p-c87b4d11.js.map +1 -0
- package/dist/dso-toolkit/{p-0dffb117.entry.js → p-cbeb00cc.entry.js} +2 -2
- package/dist/dso-toolkit/p-cbeb00cc.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-8b77b083.entry.js → p-cce85c45.entry.js} +2 -2
- package/dist/dso-toolkit/p-cce85c45.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-98f7ede6.entry.js → p-d37a6c95.entry.js} +2 -2
- package/dist/dso-toolkit/p-d37a6c95.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-54c65314.entry.js → p-d728a136.entry.js} +2 -2
- package/dist/dso-toolkit/p-d728a136.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-bcecc743.entry.js → p-dae7d6f2.entry.js} +2 -2
- package/dist/dso-toolkit/p-dae7d6f2.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-b9d441d5.entry.js → p-dc6e37dd.entry.js} +2 -2
- package/dist/dso-toolkit/p-dc6e37dd.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-918bcdbe.entry.js → p-f08a5a06.entry.js} +2 -2
- package/dist/dso-toolkit/p-f08a5a06.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-a1060560.entry.js → p-f0bc4a9d.entry.js} +2 -2
- package/dist/dso-toolkit/p-f0bc4a9d.entry.js.map +1 -0
- package/dist/dso-toolkit/p-fbb63820.entry.js +2 -0
- package/dist/dso-toolkit/p-fbb63820.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-871bfdf9.js → p-fd7891ef.js} +1 -1
- package/dist/dso-toolkit/p-fd7891ef.js.map +1 -0
- package/dist/esm/{clsx.m-25174a58.js → clsx-93f1b68e.js} +1 -1
- package/dist/esm/clsx-93f1b68e.js.map +1 -0
- package/dist/esm/{create-identifier-51ee50c4.js → create-identifier-479a4699.js} +1 -1
- package/dist/esm/create-identifier-479a4699.js.map +1 -0
- package/dist/esm/dso-accordion-section.entry.js +1 -1
- package/dist/esm/dso-accordion-section.entry.js.map +1 -1
- package/dist/esm/dso-accordion.entry.js +1 -1
- package/dist/esm/dso-accordion.entry.js.map +1 -1
- package/dist/esm/dso-action-list-item.entry.js +1 -1
- package/dist/esm/dso-action-list-item.entry.js.map +1 -1
- package/dist/esm/dso-action-list.entry.js +1 -1
- package/dist/esm/dso-action-list.entry.js.map +1 -1
- package/dist/esm/dso-alert_5.entry.js +4 -4
- package/dist/esm/dso-alert_5.entry.js.map +1 -1
- package/dist/esm/dso-annotation-output_3.entry.js +2 -2
- package/dist/esm/dso-annotation-output_3.entry.js.map +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js.map +1 -1
- package/dist/esm/dso-autosuggest.entry.js +2 -2
- package/dist/esm/dso-autosuggest.entry.js.map +1 -1
- package/dist/esm/dso-banner.entry.js +2 -2
- package/dist/esm/dso-banner.entry.js.map +1 -1
- package/dist/esm/dso-card-container.entry.js +1 -1
- package/dist/esm/dso-card-container.entry.js.map +1 -1
- package/dist/esm/dso-card.entry.js +3 -3
- package/dist/esm/dso-card.entry.js.map +1 -1
- package/dist/esm/dso-date-picker.entry.js +3 -2
- package/dist/esm/dso-date-picker.entry.js.map +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +3 -3
- package/dist/esm/dso-dropdown-menu.entry.js.map +1 -1
- package/dist/esm/dso-expandable.entry.js +2 -2
- package/dist/esm/dso-expandable.entry.js.map +1 -1
- package/dist/esm/dso-header.entry.js +3 -3
- package/dist/esm/dso-header.entry.js.map +1 -1
- package/dist/esm/dso-helpcenter-panel.entry.js +3 -3
- package/dist/esm/dso-helpcenter-panel.entry.js.map +1 -1
- package/dist/esm/dso-highlight-box.entry.js +2 -2
- package/dist/esm/dso-highlight-box.entry.js.map +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js.map +1 -1
- package/dist/esm/dso-image-overlay.entry.js +3 -3
- package/dist/esm/dso-image-overlay.entry.js.map +1 -1
- package/dist/esm/dso-info-button.entry.js +2 -2
- package/dist/esm/dso-info-button.entry.js.map +1 -1
- package/dist/esm/dso-info_2.entry.js +4 -4
- package/dist/esm/dso-info_2.entry.js.map +1 -1
- package/dist/esm/dso-list-button.entry.js +4 -4
- package/dist/esm/dso-list-button.entry.js.map +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js.map +1 -1
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js.map +1 -1
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-map-overlays.entry.js.map +1 -1
- package/dist/esm/dso-modal.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js.map +1 -1
- package/dist/esm/dso-pagination.entry.js +2 -2
- package/dist/esm/dso-pagination.entry.js.map +1 -1
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-bar.entry.js.map +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js.map +1 -1
- package/dist/esm/dso-responsive-element.entry.js +1 -1
- package/dist/esm/dso-responsive-element.entry.js.map +1 -1
- package/dist/esm/dso-scrollable.entry.js +2 -2
- package/dist/esm/dso-scrollable.entry.js.map +1 -1
- package/dist/esm/dso-table.entry.js +3 -3
- package/dist/esm/dso-table.entry.js.map +1 -1
- package/dist/esm/dso-toggletip.entry.js +2 -2
- package/dist/esm/dso-toggletip.entry.js.map +1 -1
- package/dist/esm/dso-toolkit.js +3 -6
- package/dist/esm/dso-toolkit.js.map +1 -1
- package/dist/esm/dso-tooltip.entry.js +4 -4
- package/dist/esm/dso-tooltip.entry.js.map +1 -1
- package/dist/esm/dso-tree-view.entry.js +2 -2
- package/dist/esm/dso-tree-view.entry.js.map +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +2 -2
- package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
- package/dist/esm/dsot-document-component-demo.entry.js +1 -1
- package/dist/esm/dsot-document-component-demo.entry.js.map +1 -1
- package/dist/esm/{focus-trap.esm-2a49a38f.js → focus-trap.esm-ad846bd4.js} +245 -97
- package/dist/esm/focus-trap.esm-ad846bd4.js.map +1 -0
- package/dist/esm/{has-overflow-814a0f4e.js → has-overflow-9f720f83.js} +1 -1
- package/dist/esm/has-overflow-9f720f83.js.map +1 -0
- package/dist/esm/{index-3e9ed0c5.js → index-f82ed648.js} +91 -19
- package/dist/esm/index-f82ed648.js.map +1 -0
- package/dist/esm/{index.esm-3d6c8190.js → index.esm-7e16e884.js} +49 -17
- package/dist/esm/index.esm-7e16e884.js.map +1 -0
- package/dist/esm/{is-modified-event-34370220.js → is-modified-event-587a0b0a.js} +1 -1
- package/dist/esm/is-modified-event-587a0b0a.js.map +1 -0
- package/dist/esm/loader.js +3 -12
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/stencil-public-runtime.d.ts +14 -2
- package/loader/index.d.ts +1 -1
- package/package.json +13 -13
- package/dist/cjs/clsx.m-b81c6b86.js.map +0 -1
- package/dist/cjs/create-identifier-6ee2a08b.js.map +0 -1
- package/dist/cjs/focus-trap.esm-a5b7273f.js.map +0 -1
- package/dist/cjs/has-overflow-d7baff1e.js.map +0 -1
- package/dist/cjs/index-d4003ee3.js.map +0 -1
- package/dist/cjs/index.esm-0e935715.js.map +0 -1
- package/dist/cjs/is-modified-event-dcab03a0.js.map +0 -1
- package/dist/components/clsx.m.js.map +0 -1
- package/dist/dso-toolkit/p-0dffb117.entry.js.map +0 -1
- package/dist/dso-toolkit/p-14aa091d.entry.js +0 -2
- package/dist/dso-toolkit/p-14aa091d.entry.js.map +0 -1
- package/dist/dso-toolkit/p-1a1a43fd.js +0 -3
- package/dist/dso-toolkit/p-1a1a43fd.js.map +0 -1
- package/dist/dso-toolkit/p-1c721290.entry.js.map +0 -1
- package/dist/dso-toolkit/p-22baee8e.entry.js.map +0 -1
- package/dist/dso-toolkit/p-2ccbf58d.entry.js.map +0 -1
- package/dist/dso-toolkit/p-33df9903.js.map +0 -1
- package/dist/dso-toolkit/p-3cbf8b97.entry.js.map +0 -1
- package/dist/dso-toolkit/p-3d4308ba.entry.js.map +0 -1
- package/dist/dso-toolkit/p-420e0d23.entry.js.map +0 -1
- package/dist/dso-toolkit/p-423fa057.entry.js.map +0 -1
- package/dist/dso-toolkit/p-440fc4ae.entry.js.map +0 -1
- package/dist/dso-toolkit/p-4bc67e5c.entry.js.map +0 -1
- package/dist/dso-toolkit/p-4da2fa8b.entry.js.map +0 -1
- package/dist/dso-toolkit/p-4e86089d.entry.js.map +0 -1
- package/dist/dso-toolkit/p-51f19c06.entry.js.map +0 -1
- package/dist/dso-toolkit/p-54c65314.entry.js.map +0 -1
- package/dist/dso-toolkit/p-5950644a.js +0 -6
- package/dist/dso-toolkit/p-5950644a.js.map +0 -1
- package/dist/dso-toolkit/p-5e5302ef.entry.js.map +0 -1
- package/dist/dso-toolkit/p-5ee79846.entry.js.map +0 -1
- package/dist/dso-toolkit/p-604eb60b.entry.js.map +0 -1
- package/dist/dso-toolkit/p-669c3743.entry.js.map +0 -1
- package/dist/dso-toolkit/p-6a1980b4.js.map +0 -1
- package/dist/dso-toolkit/p-6c543986.js.map +0 -1
- package/dist/dso-toolkit/p-712fca2c.entry.js.map +0 -1
- package/dist/dso-toolkit/p-745b6678.entry.js.map +0 -1
- package/dist/dso-toolkit/p-7a6be9c1.entry.js.map +0 -1
- package/dist/dso-toolkit/p-871bfdf9.js.map +0 -1
- package/dist/dso-toolkit/p-8b77b083.entry.js.map +0 -1
- package/dist/dso-toolkit/p-8f8dd254.entry.js +0 -2
- package/dist/dso-toolkit/p-8f8dd254.entry.js.map +0 -1
- package/dist/dso-toolkit/p-918bcdbe.entry.js.map +0 -1
- package/dist/dso-toolkit/p-91963e3d.js +0 -6
- package/dist/dso-toolkit/p-91963e3d.js.map +0 -1
- package/dist/dso-toolkit/p-98f7ede6.entry.js.map +0 -1
- package/dist/dso-toolkit/p-a0798096.entry.js +0 -2
- package/dist/dso-toolkit/p-a0798096.entry.js.map +0 -1
- package/dist/dso-toolkit/p-a1060560.entry.js.map +0 -1
- package/dist/dso-toolkit/p-a4d423fd.entry.js.map +0 -1
- package/dist/dso-toolkit/p-b34f24b4.entry.js.map +0 -1
- package/dist/dso-toolkit/p-b911f052.entry.js +0 -2
- package/dist/dso-toolkit/p-b911f052.entry.js.map +0 -1
- package/dist/dso-toolkit/p-b9d441d5.entry.js.map +0 -1
- package/dist/dso-toolkit/p-bc9e3037.entry.js.map +0 -1
- package/dist/dso-toolkit/p-bcecc743.entry.js.map +0 -1
- package/dist/dso-toolkit/p-e69d7e62.entry.js.map +0 -1
- package/dist/dso-toolkit/p-f21e4ccc.entry.js.map +0 -1
- package/dist/esm/create-identifier-51ee50c4.js.map +0 -1
- package/dist/esm/focus-trap.esm-2a49a38f.js.map +0 -1
- package/dist/esm/has-overflow-814a0f4e.js.map +0 -1
- package/dist/esm/index-3e9ed0c5.js.map +0 -1
- package/dist/esm/index.esm-3d6c8190.js.map +0 -1
- package/dist/esm/is-modified-event-34370220.js.map +0 -1
- package/dist/esm/polyfills/css-shim.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as tabbable, f as focusable, i as isTabbable, a as isFocusable } from './index.esm.js';
|
|
1
|
+
import { t as tabbable, f as focusable, i as isTabbable, g as getTabIndex, a as isFocusable } from './index.esm.js';
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
|
-
* focus-trap 7.
|
|
4
|
+
* focus-trap 7.5.2
|
|
5
5
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -86,10 +86,10 @@ var isSelectableInput = function isSelectableInput(node) {
|
|
|
86
86
|
return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
|
|
87
87
|
};
|
|
88
88
|
var isEscapeEvent = function isEscapeEvent(e) {
|
|
89
|
-
return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
|
|
89
|
+
return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;
|
|
90
90
|
};
|
|
91
91
|
var isTabEvent = function isTabEvent(e) {
|
|
92
|
-
return e.key === 'Tab' || e.keyCode === 9;
|
|
92
|
+
return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
// checks for TAB by default
|
|
@@ -173,8 +173,11 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
173
173
|
// container: HTMLElement,
|
|
174
174
|
// tabbableNodes: Array<HTMLElement>, // empty if none
|
|
175
175
|
// focusableNodes: Array<HTMLElement>, // empty if none
|
|
176
|
-
//
|
|
177
|
-
//
|
|
176
|
+
// posTabIndexesFound: boolean,
|
|
177
|
+
// firstTabbableNode: HTMLElement|undefined,
|
|
178
|
+
// lastTabbableNode: HTMLElement|undefined,
|
|
179
|
+
// firstDomTabbableNode: HTMLElement|undefined,
|
|
180
|
+
// lastDomTabbableNode: HTMLElement|undefined,
|
|
178
181
|
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
179
182
|
// }>}
|
|
180
183
|
containerGroups: [],
|
|
@@ -191,7 +194,9 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
191
194
|
paused: false,
|
|
192
195
|
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
193
196
|
// has been delayed during activation
|
|
194
|
-
delayInitialFocusTimer: undefined
|
|
197
|
+
delayInitialFocusTimer: undefined,
|
|
198
|
+
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
199
|
+
recentNavEvent: undefined
|
|
195
200
|
};
|
|
196
201
|
var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
|
|
197
202
|
|
|
@@ -210,7 +215,9 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
210
215
|
/**
|
|
211
216
|
* Finds the index of the container that contains the element.
|
|
212
217
|
* @param {HTMLElement} element
|
|
213
|
-
* @param {Event} [event]
|
|
218
|
+
* @param {Event} [event] If available, and `element` isn't directly found in any container,
|
|
219
|
+
* the event's composed path is used to see if includes any known trap containers in the
|
|
220
|
+
* case where the element is inside a Shadow DOM.
|
|
214
221
|
* @returns {number} Index of the container in either `state.containers` or
|
|
215
222
|
* `state.containerGroups` (the order/length of these lists are the same); -1
|
|
216
223
|
* if the element isn't found.
|
|
@@ -305,14 +312,41 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
305
312
|
var tabbableNodes = tabbable(container, config.tabbableOptions);
|
|
306
313
|
|
|
307
314
|
// NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
308
|
-
// are a superset of tabbable nodes
|
|
315
|
+
// are a superset of tabbable nodes since nodes with negative `tabindex` attributes
|
|
316
|
+
// are focusable but not tabbable
|
|
309
317
|
var focusableNodes = focusable(container, config.tabbableOptions);
|
|
318
|
+
var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;
|
|
319
|
+
var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;
|
|
320
|
+
var firstDomTabbableNode = focusableNodes.find(function (node) {
|
|
321
|
+
return isTabbable(node);
|
|
322
|
+
});
|
|
323
|
+
var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {
|
|
324
|
+
return isTabbable(node);
|
|
325
|
+
});
|
|
326
|
+
var posTabIndexesFound = !!tabbableNodes.find(function (node) {
|
|
327
|
+
return getTabIndex(node) > 0;
|
|
328
|
+
});
|
|
310
329
|
return {
|
|
311
330
|
container: container,
|
|
312
331
|
tabbableNodes: tabbableNodes,
|
|
313
332
|
focusableNodes: focusableNodes,
|
|
314
|
-
|
|
315
|
-
|
|
333
|
+
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
334
|
+
posTabIndexesFound: posTabIndexesFound,
|
|
335
|
+
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
336
|
+
firstTabbableNode: firstTabbableNode,
|
|
337
|
+
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
338
|
+
lastTabbableNode: lastTabbableNode,
|
|
339
|
+
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
340
|
+
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
341
|
+
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
342
|
+
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
|
343
|
+
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
|
344
|
+
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
345
|
+
// be avoided anyway...
|
|
346
|
+
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
347
|
+
firstDomTabbableNode: firstDomTabbableNode,
|
|
348
|
+
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
349
|
+
lastDomTabbableNode: lastDomTabbableNode,
|
|
316
350
|
/**
|
|
317
351
|
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
318
352
|
* in this container, if any.
|
|
@@ -323,30 +357,24 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
323
357
|
*/
|
|
324
358
|
nextTabbableNode: function nextTabbableNode(node) {
|
|
325
359
|
var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
326
|
-
|
|
327
|
-
// from the DOM order), this __will not work__ because the list of focusableNodes,
|
|
328
|
-
// while it contains tabbable nodes, does not sort its nodes in any order other
|
|
329
|
-
// than DOM order, because it can't: Where would you place focusable (but not
|
|
330
|
-
// tabbable) nodes in that order? They have no order, because they aren't tabbale...
|
|
331
|
-
// Support for positive tabindex is already broken and hard to manage (possibly
|
|
332
|
-
// not supportable, TBD), so this isn't going to make things worse than they
|
|
333
|
-
// already are, and at least makes things better for the majority of cases where
|
|
334
|
-
// tabindex is either 0/unset or negative.
|
|
335
|
-
// FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
|
|
336
|
-
var nodeIdx = focusableNodes.findIndex(function (n) {
|
|
337
|
-
return n === node;
|
|
338
|
-
});
|
|
360
|
+
var nodeIdx = tabbableNodes.indexOf(node);
|
|
339
361
|
if (nodeIdx < 0) {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
362
|
+
// either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):
|
|
363
|
+
// since `node` should at least have been focusable, we assume that's the case and mimic
|
|
364
|
+
// what browsers do, which is set focus to the next node in __document position order__,
|
|
365
|
+
// regardless of positive tabindexes, if any -- and for reasons explained in the NOTE
|
|
366
|
+
// above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to
|
|
367
|
+
// basic DOM order
|
|
368
|
+
if (forward) {
|
|
369
|
+
return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {
|
|
370
|
+
return isTabbable(el);
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {
|
|
374
|
+
return isTabbable(el);
|
|
345
375
|
});
|
|
346
376
|
}
|
|
347
|
-
return
|
|
348
|
-
return isTabbable(n, config.tabbableOptions);
|
|
349
|
-
});
|
|
377
|
+
return tabbableNodes[nodeIdx + (forward ? 1 : -1)];
|
|
350
378
|
}
|
|
351
379
|
};
|
|
352
380
|
});
|
|
@@ -359,6 +387,19 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
359
387
|
) {
|
|
360
388
|
throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
|
|
361
389
|
}
|
|
390
|
+
|
|
391
|
+
// NOTE: Positive tabindexes are only properly supported in single-container traps because
|
|
392
|
+
// doing it across multiple containers where tabindexes could be all over the place
|
|
393
|
+
// would require Tabbable to support multiple containers, would require additional
|
|
394
|
+
// specialized Shadow DOM support, and would require Tabbable's multi-container support
|
|
395
|
+
// to look at those containers in document position order rather than user-provided
|
|
396
|
+
// order (as they are treated in Focus-trap, for legacy reasons). See discussion on
|
|
397
|
+
// https://github.com/focus-trap/focus-trap/issues/375 for more details.
|
|
398
|
+
if (state.containerGroups.find(function (g) {
|
|
399
|
+
return g.posTabIndexesFound;
|
|
400
|
+
}) && state.containerGroups.length > 1) {
|
|
401
|
+
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
402
|
+
}
|
|
362
403
|
};
|
|
363
404
|
var tryFocus = function tryFocus(node) {
|
|
364
405
|
if (node === false) {
|
|
@@ -374,6 +415,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
374
415
|
node.focus({
|
|
375
416
|
preventScroll: !!config.preventScroll
|
|
376
417
|
});
|
|
418
|
+
// NOTE: focus() API does not trigger focusIn event so set MRU node manually
|
|
377
419
|
state.mostRecentlyFocusedNode = node;
|
|
378
420
|
if (isSelectableInput(node)) {
|
|
379
421
|
node.select();
|
|
@@ -384,64 +426,23 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
384
426
|
return node ? node : node === false ? false : previousActiveElement;
|
|
385
427
|
};
|
|
386
428
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
returnFocus: config.returnFocusOnDeactivate
|
|
405
|
-
});
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// This is needed for mobile devices.
|
|
410
|
-
// (If we'll only let `click` events through,
|
|
411
|
-
// then on mobile they will be blocked anyways if `touchstart` is blocked.)
|
|
412
|
-
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
413
|
-
// allow the click outside the trap to take place
|
|
414
|
-
return;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// otherwise, prevent the click
|
|
418
|
-
e.preventDefault();
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
// In case focus escapes the trap for some strange reason, pull it back in.
|
|
422
|
-
var checkFocusIn = function checkFocusIn(e) {
|
|
423
|
-
var target = getActualTarget(e);
|
|
424
|
-
var targetContained = findContainerIndex(target, e) >= 0;
|
|
425
|
-
|
|
426
|
-
// In Firefox when you Tab out of an iframe the Document is briefly focused.
|
|
427
|
-
if (targetContained || target instanceof Document) {
|
|
428
|
-
if (targetContained) {
|
|
429
|
-
state.mostRecentlyFocusedNode = target;
|
|
430
|
-
}
|
|
431
|
-
} else {
|
|
432
|
-
// escaped! pull it back in to where it just left
|
|
433
|
-
e.stopImmediatePropagation();
|
|
434
|
-
tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
// Hijack key nav events on the first and last focusable nodes of the trap,
|
|
439
|
-
// in order to prevent focus from escaping. If it escapes for even a
|
|
440
|
-
// moment it can end up scrolling the page and causing confusion so we
|
|
441
|
-
// kind of need to capture the action at the keydown phase.
|
|
442
|
-
var checkKeyNav = function checkKeyNav(event) {
|
|
443
|
-
var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
444
|
-
var target = getActualTarget(event);
|
|
429
|
+
/**
|
|
430
|
+
* Finds the next node (in either direction) where focus should move according to a
|
|
431
|
+
* keyboard focus-in event.
|
|
432
|
+
* @param {Object} params
|
|
433
|
+
* @param {Node} [params.target] Known target __from which__ to navigate, if any.
|
|
434
|
+
* @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event
|
|
435
|
+
* will be used to determine the `target`). Ignored if `target` is specified.
|
|
436
|
+
* @param {boolean} [params.isBackward] True if focus should move backward.
|
|
437
|
+
* @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be
|
|
438
|
+
* determined given the current state of the trap.
|
|
439
|
+
*/
|
|
440
|
+
var findNextNavNode = function findNextNavNode(_ref2) {
|
|
441
|
+
var target = _ref2.target,
|
|
442
|
+
event = _ref2.event,
|
|
443
|
+
_ref2$isBackward = _ref2.isBackward,
|
|
444
|
+
isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;
|
|
445
|
+
target = target || getActualTarget(event);
|
|
445
446
|
updateTabbableNodes();
|
|
446
447
|
var destinationNode = null;
|
|
447
448
|
if (state.tabbableGroups.length > 0) {
|
|
@@ -464,8 +465,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
464
465
|
// REVERSE
|
|
465
466
|
|
|
466
467
|
// is the target the first tabbable node in a group?
|
|
467
|
-
var startOfGroupIndex = findIndex(state.tabbableGroups, function (
|
|
468
|
-
var firstTabbableNode =
|
|
468
|
+
var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
|
|
469
|
+
var firstTabbableNode = _ref3.firstTabbableNode;
|
|
469
470
|
return target === firstTabbableNode;
|
|
470
471
|
});
|
|
471
472
|
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
|
|
@@ -483,7 +484,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
483
484
|
// the LAST group if it's the first tabbable node of the FIRST group)
|
|
484
485
|
var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
|
|
485
486
|
var destinationGroup = state.tabbableGroups[destinationGroupIndex];
|
|
486
|
-
destinationNode = destinationGroup.lastTabbableNode;
|
|
487
|
+
destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;
|
|
487
488
|
} else if (!isTabEvent(event)) {
|
|
488
489
|
// user must have customized the nav keys so we have to move focus manually _within_
|
|
489
490
|
// the active group: do this based on the order determined by tabbable()
|
|
@@ -493,8 +494,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
493
494
|
// FORWARD
|
|
494
495
|
|
|
495
496
|
// is the target the last tabbable node in a group?
|
|
496
|
-
var lastOfGroupIndex = findIndex(state.tabbableGroups, function (
|
|
497
|
-
var lastTabbableNode =
|
|
497
|
+
var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref4) {
|
|
498
|
+
var lastTabbableNode = _ref4.lastTabbableNode;
|
|
498
499
|
return target === lastTabbableNode;
|
|
499
500
|
});
|
|
500
501
|
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
|
|
@@ -512,7 +513,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
512
513
|
// group if it's the last tabbable node of the LAST group)
|
|
513
514
|
var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
|
|
514
515
|
var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
|
|
515
|
-
destinationNode = _destinationGroup.firstTabbableNode;
|
|
516
|
+
destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;
|
|
516
517
|
} else if (!isTabEvent(event)) {
|
|
517
518
|
// user must have customized the nav keys so we have to move focus manually _within_
|
|
518
519
|
// the active group: do this based on the order determined by tabbable()
|
|
@@ -524,6 +525,153 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
524
525
|
// NOTE: the fallbackFocus option does not support returning false to opt-out
|
|
525
526
|
destinationNode = getNodeForOption('fallbackFocus');
|
|
526
527
|
}
|
|
528
|
+
return destinationNode;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
// This needs to be done on mousedown and touchstart instead of click
|
|
532
|
+
// so that it precedes the focus event.
|
|
533
|
+
var checkPointerDown = function checkPointerDown(e) {
|
|
534
|
+
var target = getActualTarget(e);
|
|
535
|
+
if (findContainerIndex(target, e) >= 0) {
|
|
536
|
+
// allow the click since it ocurred inside the trap
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
540
|
+
// immediately deactivate the trap
|
|
541
|
+
trap.deactivate({
|
|
542
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
543
|
+
// which will result in the outside click setting focus to the node
|
|
544
|
+
// that was clicked (and if not focusable, to "nothing"); by setting
|
|
545
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
546
|
+
// on activation (or the configured `setReturnFocus` node), whether the
|
|
547
|
+
// outside click was on a focusable node or not
|
|
548
|
+
returnFocus: config.returnFocusOnDeactivate
|
|
549
|
+
});
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// This is needed for mobile devices.
|
|
554
|
+
// (If we'll only let `click` events through,
|
|
555
|
+
// then on mobile they will be blocked anyways if `touchstart` is blocked.)
|
|
556
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
557
|
+
// allow the click outside the trap to take place
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// otherwise, prevent the click
|
|
562
|
+
e.preventDefault();
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
// In case focus escapes the trap for some strange reason, pull it back in.
|
|
566
|
+
// NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected
|
|
567
|
+
// scrolling if the node that got focused was out of view; there's nothing we can do to
|
|
568
|
+
// prevent that from happening by the time we discover that focus escaped
|
|
569
|
+
var checkFocusIn = function checkFocusIn(event) {
|
|
570
|
+
var target = getActualTarget(event);
|
|
571
|
+
var targetContained = findContainerIndex(target, event) >= 0;
|
|
572
|
+
|
|
573
|
+
// In Firefox when you Tab out of an iframe the Document is briefly focused.
|
|
574
|
+
if (targetContained || target instanceof Document) {
|
|
575
|
+
if (targetContained) {
|
|
576
|
+
state.mostRecentlyFocusedNode = target;
|
|
577
|
+
}
|
|
578
|
+
} else {
|
|
579
|
+
// escaped! pull it back in to where it just left
|
|
580
|
+
event.stopImmediatePropagation();
|
|
581
|
+
|
|
582
|
+
// focus will escape if the MRU node had a positive tab index and user tried to nav forward;
|
|
583
|
+
// it will also escape if the MRU node had a 0 tab index and user tried to nav backward
|
|
584
|
+
// toward a node with a positive tab index
|
|
585
|
+
var nextNode; // next node to focus, if we find one
|
|
586
|
+
var navAcrossContainers = true;
|
|
587
|
+
if (state.mostRecentlyFocusedNode) {
|
|
588
|
+
if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {
|
|
589
|
+
// MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...
|
|
590
|
+
var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);
|
|
591
|
+
// there MAY not be any tabbable nodes in the container if there are at least 2 containers
|
|
592
|
+
// and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container
|
|
593
|
+
// with at least one tabbable node in order to function, so this could be the other container
|
|
594
|
+
// with nothing tabbable in it)
|
|
595
|
+
var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;
|
|
596
|
+
if (tabbableNodes.length > 0) {
|
|
597
|
+
// MRU tab index MAY not be found if the MRU node is focusable but not tabbable
|
|
598
|
+
var mruTabIdx = tabbableNodes.findIndex(function (node) {
|
|
599
|
+
return node === state.mostRecentlyFocusedNode;
|
|
600
|
+
});
|
|
601
|
+
if (mruTabIdx >= 0) {
|
|
602
|
+
if (config.isKeyForward(state.recentNavEvent)) {
|
|
603
|
+
if (mruTabIdx + 1 < tabbableNodes.length) {
|
|
604
|
+
nextNode = tabbableNodes[mruTabIdx + 1];
|
|
605
|
+
navAcrossContainers = false;
|
|
606
|
+
}
|
|
607
|
+
// else, don't wrap within the container as focus should move to next/previous
|
|
608
|
+
// container
|
|
609
|
+
} else {
|
|
610
|
+
if (mruTabIdx - 1 >= 0) {
|
|
611
|
+
nextNode = tabbableNodes[mruTabIdx - 1];
|
|
612
|
+
navAcrossContainers = false;
|
|
613
|
+
}
|
|
614
|
+
// else, don't wrap within the container as focus should move to next/previous
|
|
615
|
+
// container
|
|
616
|
+
}
|
|
617
|
+
// else, don't find in container order without considering direction too
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
// else, no tabbable nodes in that container (which means we must have at least one other
|
|
621
|
+
// container with at least one tabbable node in it, otherwise focus-trap would've thrown
|
|
622
|
+
// an error the last time updateTabbableNodes() was run): find next node among all known
|
|
623
|
+
// containers
|
|
624
|
+
} else {
|
|
625
|
+
// check to see if there's at least one tabbable node with a positive tab index inside
|
|
626
|
+
// the trap because focus seems to escape when navigating backward from a tabbable node
|
|
627
|
+
// with tabindex=0 when this is the case (instead of wrapping to the tabbable node with
|
|
628
|
+
// the greatest positive tab index like it should)
|
|
629
|
+
if (!state.containerGroups.some(function (g) {
|
|
630
|
+
return g.tabbableNodes.some(function (n) {
|
|
631
|
+
return getTabIndex(n) > 0;
|
|
632
|
+
});
|
|
633
|
+
})) {
|
|
634
|
+
// no containers with tabbable nodes with positive tab indexes which means the focus
|
|
635
|
+
// escaped for some other reason and we should just execute the fallback to the
|
|
636
|
+
// MRU node or initial focus node, if any
|
|
637
|
+
navAcrossContainers = false;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
} else {
|
|
641
|
+
// no MRU node means we're likely in some initial condition when the trap has just
|
|
642
|
+
// been activated and initial focus hasn't been given yet, in which case we should
|
|
643
|
+
// fall through to trying to focus the initial focus node, which is what should
|
|
644
|
+
// happen below at this point in the logic
|
|
645
|
+
navAcrossContainers = false;
|
|
646
|
+
}
|
|
647
|
+
if (navAcrossContainers) {
|
|
648
|
+
nextNode = findNextNavNode({
|
|
649
|
+
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
650
|
+
// outside the trap causing the focus escape we're trying to fix)
|
|
651
|
+
target: state.mostRecentlyFocusedNode,
|
|
652
|
+
isBackward: config.isKeyBackward(state.recentNavEvent)
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
if (nextNode) {
|
|
656
|
+
tryFocus(nextNode);
|
|
657
|
+
} else {
|
|
658
|
+
tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
state.recentNavEvent = undefined; // clear
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
// Hijack key nav events on the first and last focusable nodes of the trap,
|
|
665
|
+
// in order to prevent focus from escaping. If it escapes for even a
|
|
666
|
+
// moment it can end up scrolling the page and causing confusion so we
|
|
667
|
+
// kind of need to capture the action at the keydown phase.
|
|
668
|
+
var checkKeyNav = function checkKeyNav(event) {
|
|
669
|
+
var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
670
|
+
state.recentNavEvent = event;
|
|
671
|
+
var destinationNode = findNextNavNode({
|
|
672
|
+
event: event,
|
|
673
|
+
isBackward: isBackward
|
|
674
|
+
});
|
|
527
675
|
if (destinationNode) {
|
|
528
676
|
if (isTabEvent(event)) {
|
|
529
677
|
// since tab natively moves focus, we wouldn't have a destination node unless we
|