@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 +1 @@
|
|
|
1
|
-
{"file":"dropdown-menu.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,wDAAwD;;MCYnE,YAAY;;;;;IAkNf,qBAAgB,GAAG,CAAC,KAAiB;MAC3C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,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CAAC;IACzC,IAAI,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;MAC5B,SAAS,GAAG,CAAC,CAAC;KACf;SAAM,IAAI,SAAS,GAAG,CAAC,EAAE;MACxB,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;KAC7B;IAED,MAAA,IAAI,CAAC,SAAS,CAAC,0CAAE,KAAK,EAAE,CAAC;GAC1B;EAOD,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,IAC7E,YAAM,IAAI,EAAC,QAAQ,GAAG,EACtB,WAAK,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,IACrB,eAAQ,CACJ,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["./src/components/dropdown-menu/dropdown-menu.scss?tag=dso-dropdown-menu&encapsulation=shadow","./src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/components/dropdown-menu\";\r\n\r\n:host(:focus) {\r\n outline: none;\r\n}\r\n\r\n:host {\r\n @include dropdown-menu.root();\r\n}\r\n","import { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\r\nimport { h, Component, Element, Host, Prop, Watch } from \"@stencil/core\";\r\nimport { FocusableElement, tabbable } from \"tabbable\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { hasOverflow } from \"../../utils/has-overflow\";\r\n\r\n@Component({\r\n tag: \"dso-dropdown-menu\",\r\n styleUrl: \"dropdown-menu.scss\",\r\n shadow: true,\r\n})\r\nexport class DropdownMenu {\r\n /**\r\n * Whether the menu is open or closed.\r\n * This attribute is reflected and mutable.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n open = false;\r\n\r\n /**\r\n * Alignment of the dropdown\r\n */\r\n @Prop()\r\n dropdownAlign: \"left\" | \"right\" = \"left\";\r\n\r\n /**\r\n * Space between button and dropdown options\r\n */\r\n @Prop()\r\n dropdownOptionsOffset = 2;\r\n\r\n /**\r\n * Whether the menu is checkable.\r\n */\r\n @Prop()\r\n checkable = false;\r\n\r\n /**\r\n * Selector for the element the dropdown options should not be overflowing.\r\n */\r\n @Prop()\r\n boundary?: string;\r\n\r\n /**\r\n * Set position strategy of dropdown options\r\n */\r\n @Prop()\r\n strategy: \"auto\" | \"absolute\" | \"fixed\" = \"auto\";\r\n\r\n @Watch(\"dropdownAlign\")\r\n watchPosition() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n this.popper.setOptions({\r\n placement: this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\",\r\n });\r\n }\r\n\r\n @Watch(\"dropdownOptionsOffset\")\r\n watchOptionsOffset() {\r\n this.popper?.setOptions({\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n ],\r\n });\r\n }\r\n\r\n @Watch(\"strategy\")\r\n watchStrategy() {\r\n this.setStrategy();\r\n }\r\n\r\n private setStrategy() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n if (this.strategy === \"absolute\" || this.strategy === \"fixed\") {\r\n this.popper.setOptions({\r\n strategy: this.strategy,\r\n });\r\n\r\n return;\r\n }\r\n\r\n let element: Element | null = this.host;\r\n\r\n const boundary = this.boundary || document;\r\n\r\n while (element && element.parentNode !== boundary) {\r\n element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;\r\n if (element !== null && hasOverflow(element)) {\r\n this.popper.setOptions({\r\n strategy: \"fixed\",\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n this.popper.setOptions({\r\n strategy: \"absolute\",\r\n });\r\n }\r\n\r\n @Element()\r\n host!: HTMLDsoDropdownMenuElement;\r\n\r\n private popper: PopperInstance | undefined;\r\n\r\n get button(): HTMLButtonElement {\r\n const button = this.host.querySelector('button[slot=\"toggle\"]');\r\n\r\n if (!(button instanceof HTMLButtonElement)) {\r\n throw new ReferenceError(\"Mandatory toggle button not found\");\r\n }\r\n\r\n return button;\r\n }\r\n\r\n get tabbables(): FocusableElement[] {\r\n return tabbable(this.host).filter((e) => e !== this.button);\r\n }\r\n\r\n componentDidLoad() {\r\n this.button.setAttribute(\"aria-haspopup\", \"menu\");\r\n this.button.setAttribute(\"aria-expanded\", \"false\");\r\n if (!this.button.id) {\r\n this.button.id = uuidv4();\r\n }\r\n\r\n this.button.addEventListener(\"click\", () => {\r\n this.open = !this.open;\r\n });\r\n\r\n const options = this.host.querySelector(\".dso-dropdown-options\");\r\n if (!options) {\r\n throw new ReferenceError(\"Dropdown options not found\");\r\n }\r\n\r\n options.setAttribute(\"role\", \"menu\");\r\n options.setAttribute(\"aria-labelledby\", this.button.id);\r\n\r\n for (const ul of Array.from(this.host.getElementsByTagName(\"ul\"))) {\r\n ul.setAttribute(\"role\", \"group\");\r\n for (const li of Array.from(ul.getElementsByTagName(\"li\"))) {\r\n li.setAttribute(\"role\", \"none\");\r\n }\r\n }\r\n\r\n if (this.popper) {\r\n return;\r\n }\r\n\r\n const dropdownOptionsElement = this.host.querySelector(\".dso-dropdown-options\");\r\n\r\n if (!(dropdownOptionsElement instanceof HTMLElement)) {\r\n throw new Error(\"dropdown options element is not instanceof HTMLElement\");\r\n }\r\n\r\n this.popper = createPopper(this.button, dropdownOptionsElement, {\r\n placement: this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\",\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n {\r\n name: \"preventOverflow\",\r\n options: {\r\n boundary: this.boundary ? document.querySelector(this.boundary) : null,\r\n },\r\n enabled: this.boundary !== undefined,\r\n },\r\n ],\r\n });\r\n }\r\n\r\n componentDidRender() {\r\n this.setStrategy();\r\n if (this.open) {\r\n this.popper?.update();\r\n }\r\n\r\n for (const li of Array.from(this.host.getElementsByTagName(\"li\"))) {\r\n for (const tab of tabbable(li)) {\r\n tab.setAttribute(\"role\", this.checkable ? \"menuitemradio\" : \"menuitem\");\r\n\r\n if (this.checkable) {\r\n tab.setAttribute(\"aria-checked\", li.classList.contains(\"dso-checked\").toString());\r\n }\r\n }\r\n }\r\n\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n this.button.setAttribute(\"aria-expanded\", this.open ? \"true\" : \"false\");\r\n if (this.open) {\r\n this.host.addEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n\r\n this.tabbables.forEach((focusableElement) => {\r\n focusableElement.removeEventListener(\"click\", this.escape);\r\n if (this.open) {\r\n focusableElement.addEventListener(\"click\", this.escape);\r\n }\r\n });\r\n }\r\n\r\n disconnectedCallback() {\r\n this.popper?.destroy();\r\n }\r\n\r\n private focusOutListener = (event: FocusEvent) => {\r\n if (!this.tabbables.includes(event.relatedTarget as FocusableElement)) {\r\n this.open = false;\r\n }\r\n };\r\n\r\n private keyDownListener = (event: KeyboardEvent) => {\r\n if (event.defaultPrevented) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\":\r\n this.tabInPopup(1);\r\n break;\r\n\r\n case \"ArrowUp\":\r\n this.tabInPopup(-1);\r\n break;\r\n\r\n case \"Escape\":\r\n this.escape();\r\n break;\r\n\r\n case \" \":\r\n if (event.target instanceof HTMLElement) {\r\n event.target.click();\r\n }\r\n\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n };\r\n\r\n private getActiveElement(root: Document | ShadowRoot = document): Element | null {\r\n const activeEl = root.activeElement;\r\n\r\n if (!activeEl) {\r\n return null;\r\n }\r\n\r\n if (activeEl.shadowRoot) {\r\n return this.getActiveElement(activeEl.shadowRoot);\r\n }\r\n\r\n return activeEl;\r\n }\r\n\r\n private tabInPopup(direction: number) {\r\n const tabs = this.tabbables;\r\n const currentIndex = tabs.findIndex((e) => e === this.getActiveElement());\r\n\r\n let nextIndex = currentIndex + direction;\r\n if (nextIndex >= tabs.length) {\r\n nextIndex = 0;\r\n } else if (nextIndex < 0) {\r\n nextIndex = tabs.length - 1;\r\n }\r\n\r\n tabs[nextIndex]?.focus();\r\n }\r\n\r\n private escape = () => {\r\n this.button.focus();\r\n this.open = false;\r\n };\r\n\r\n render() {\r\n return (\r\n <Host onFocusout={this.focusOutListener} tabindex={this.open ? \"-1\" : undefined}>\r\n <slot name=\"toggle\" />\r\n <div hidden={!this.open}>\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"dropdown-menu.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,wDAAwD;;MCYnE,YAAY;;;;;IAkNf,qBAAgB,GAAG,CAAC,KAAiB;MAC3C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAiC,CAAC,EAAE;QACrE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;OACnB;KACF,CAAC;IAEM,oBAAe,GAAG,CAAC,KAAoB;MAC7C,IAAI,KAAK,CAAC,gBAAgB,EAAE;QAC1B,OAAO;OACR;MAED,QAAQ,KAAK,CAAC,GAAG;QACf,KAAK,WAAW;UACd,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;UACnB,MAAM;QAER,KAAK,SAAS;UACZ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;UACpB,MAAM;QAER,KAAK,QAAQ;UACX,IAAI,CAAC,MAAM,EAAE,CAAC;UACd,MAAM;QAER,KAAK,GAAG;UACN,IAAI,KAAK,CAAC,MAAM,YAAY,WAAW,EAAE;YACvC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;WACtB;UAED,MAAM;QAER;UACE,OAAO;OACV;MAED,KAAK,CAAC,cAAc,EAAE,CAAC;KACxB,CAAC;IA8BM,WAAM,GAAG;MACf,IAAI,CAAC,MAAM,CAAC,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AAC,MAAM,0CAAE,OAAO,EAAE,CAAC;GACxB;EAwCO,gBAAgB,CAAC,OAA8B,QAAQ;IAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC;IAEpC,IAAI,CAAC,QAAQ,EAAE;MACb,OAAO,IAAI,CAAC;KACb;IAED,IAAI,QAAQ,CAAC,UAAU,EAAE;MACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;KACnD;IAED,OAAO,QAAQ,CAAC;GACjB;EAEO,UAAU,CAAC,SAAiB;;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;IAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAE1E,IAAI,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;IACzC,IAAI,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;MAC5B,SAAS,GAAG,CAAC,CAAC;KACf;SAAM,IAAI,SAAS,GAAG,CAAC,EAAE;MACxB,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;KAC7B;IAED,MAAA,IAAI,CAAC,SAAS,CAAC,0CAAE,KAAK,EAAE,CAAC;GAC1B;EAOD,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,IAC7E,YAAM,IAAI,EAAC,QAAQ,GAAG,EACtB,WAAK,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,IACrB,eAAQ,CACJ,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/dropdown-menu/dropdown-menu.scss?tag=dso-dropdown-menu&encapsulation=shadow","src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/components/dropdown-menu\";\r\n\r\n:host(:focus) {\r\n outline: none;\r\n}\r\n\r\n:host {\r\n @include dropdown-menu.root();\r\n}\r\n","import { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\r\nimport { h, Component, Element, Host, Prop, Watch } from \"@stencil/core\";\r\nimport { FocusableElement, tabbable } from \"tabbable\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { hasOverflow } from \"../../utils/has-overflow\";\r\n\r\n@Component({\r\n tag: \"dso-dropdown-menu\",\r\n styleUrl: \"dropdown-menu.scss\",\r\n shadow: true,\r\n})\r\nexport class DropdownMenu {\r\n /**\r\n * Whether the menu is open or closed.\r\n * This attribute is reflected and mutable.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n open = false;\r\n\r\n /**\r\n * Alignment of the dropdown\r\n */\r\n @Prop()\r\n dropdownAlign: \"left\" | \"right\" = \"left\";\r\n\r\n /**\r\n * Space between button and dropdown options\r\n */\r\n @Prop()\r\n dropdownOptionsOffset = 2;\r\n\r\n /**\r\n * Whether the menu is checkable.\r\n */\r\n @Prop()\r\n checkable = false;\r\n\r\n /**\r\n * Selector for the element the dropdown options should not be overflowing.\r\n */\r\n @Prop()\r\n boundary?: string;\r\n\r\n /**\r\n * Set position strategy of dropdown options\r\n */\r\n @Prop()\r\n strategy: \"auto\" | \"absolute\" | \"fixed\" = \"auto\";\r\n\r\n @Watch(\"dropdownAlign\")\r\n watchPosition() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n this.popper.setOptions({\r\n placement: this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\",\r\n });\r\n }\r\n\r\n @Watch(\"dropdownOptionsOffset\")\r\n watchOptionsOffset() {\r\n this.popper?.setOptions({\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n ],\r\n });\r\n }\r\n\r\n @Watch(\"strategy\")\r\n watchStrategy() {\r\n this.setStrategy();\r\n }\r\n\r\n private setStrategy() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n if (this.strategy === \"absolute\" || this.strategy === \"fixed\") {\r\n this.popper.setOptions({\r\n strategy: this.strategy,\r\n });\r\n\r\n return;\r\n }\r\n\r\n let element: Element | null = this.host;\r\n\r\n const boundary = this.boundary || document;\r\n\r\n while (element && element.parentNode !== boundary) {\r\n element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;\r\n if (element !== null && hasOverflow(element)) {\r\n this.popper.setOptions({\r\n strategy: \"fixed\",\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n this.popper.setOptions({\r\n strategy: \"absolute\",\r\n });\r\n }\r\n\r\n @Element()\r\n host!: HTMLDsoDropdownMenuElement;\r\n\r\n private popper: PopperInstance | undefined;\r\n\r\n get button(): HTMLButtonElement {\r\n const button = this.host.querySelector('button[slot=\"toggle\"]');\r\n\r\n if (!(button instanceof HTMLButtonElement)) {\r\n throw new ReferenceError(\"Mandatory toggle button not found\");\r\n }\r\n\r\n return button;\r\n }\r\n\r\n get tabbables(): FocusableElement[] {\r\n return tabbable(this.host).filter((e) => e !== this.button);\r\n }\r\n\r\n componentDidLoad() {\r\n this.button.setAttribute(\"aria-haspopup\", \"menu\");\r\n this.button.setAttribute(\"aria-expanded\", \"false\");\r\n if (!this.button.id) {\r\n this.button.id = uuidv4();\r\n }\r\n\r\n this.button.addEventListener(\"click\", () => {\r\n this.open = !this.open;\r\n });\r\n\r\n const options = this.host.querySelector(\".dso-dropdown-options\");\r\n if (!options) {\r\n throw new ReferenceError(\"Dropdown options not found\");\r\n }\r\n\r\n options.setAttribute(\"role\", \"menu\");\r\n options.setAttribute(\"aria-labelledby\", this.button.id);\r\n\r\n for (const ul of Array.from(this.host.getElementsByTagName(\"ul\"))) {\r\n ul.setAttribute(\"role\", \"group\");\r\n for (const li of Array.from(ul.getElementsByTagName(\"li\"))) {\r\n li.setAttribute(\"role\", \"none\");\r\n }\r\n }\r\n\r\n if (this.popper) {\r\n return;\r\n }\r\n\r\n const dropdownOptionsElement = this.host.querySelector(\".dso-dropdown-options\");\r\n\r\n if (!(dropdownOptionsElement instanceof HTMLElement)) {\r\n throw new Error(\"dropdown options element is not instanceof HTMLElement\");\r\n }\r\n\r\n this.popper = createPopper(this.button, dropdownOptionsElement, {\r\n placement: this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\",\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n {\r\n name: \"preventOverflow\",\r\n options: {\r\n boundary: this.boundary ? document.querySelector(this.boundary) : null,\r\n },\r\n enabled: this.boundary !== undefined,\r\n },\r\n ],\r\n });\r\n }\r\n\r\n componentDidRender() {\r\n this.setStrategy();\r\n if (this.open) {\r\n this.popper?.update();\r\n }\r\n\r\n for (const li of Array.from(this.host.getElementsByTagName(\"li\"))) {\r\n for (const tab of tabbable(li)) {\r\n tab.setAttribute(\"role\", this.checkable ? \"menuitemradio\" : \"menuitem\");\r\n\r\n if (this.checkable) {\r\n tab.setAttribute(\"aria-checked\", li.classList.contains(\"dso-checked\").toString());\r\n }\r\n }\r\n }\r\n\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n this.button.setAttribute(\"aria-expanded\", this.open ? \"true\" : \"false\");\r\n if (this.open) {\r\n this.host.addEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n\r\n this.tabbables.forEach((focusableElement) => {\r\n focusableElement.removeEventListener(\"click\", this.escape);\r\n if (this.open) {\r\n focusableElement.addEventListener(\"click\", this.escape);\r\n }\r\n });\r\n }\r\n\r\n disconnectedCallback() {\r\n this.popper?.destroy();\r\n }\r\n\r\n private focusOutListener = (event: FocusEvent) => {\r\n if (!this.tabbables.includes(event.relatedTarget as FocusableElement)) {\r\n this.open = false;\r\n }\r\n };\r\n\r\n private keyDownListener = (event: KeyboardEvent) => {\r\n if (event.defaultPrevented) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\":\r\n this.tabInPopup(1);\r\n break;\r\n\r\n case \"ArrowUp\":\r\n this.tabInPopup(-1);\r\n break;\r\n\r\n case \"Escape\":\r\n this.escape();\r\n break;\r\n\r\n case \" \":\r\n if (event.target instanceof HTMLElement) {\r\n event.target.click();\r\n }\r\n\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n };\r\n\r\n private getActiveElement(root: Document | ShadowRoot = document): Element | null {\r\n const activeEl = root.activeElement;\r\n\r\n if (!activeEl) {\r\n return null;\r\n }\r\n\r\n if (activeEl.shadowRoot) {\r\n return this.getActiveElement(activeEl.shadowRoot);\r\n }\r\n\r\n return activeEl;\r\n }\r\n\r\n private tabInPopup(direction: number) {\r\n const tabs = this.tabbables;\r\n const currentIndex = tabs.findIndex((e) => e === this.getActiveElement());\r\n\r\n let nextIndex = currentIndex + direction;\r\n if (nextIndex >= tabs.length) {\r\n nextIndex = 0;\r\n } else if (nextIndex < 0) {\r\n nextIndex = tabs.length - 1;\r\n }\r\n\r\n tabs[nextIndex]?.focus();\r\n }\r\n\r\n private escape = () => {\r\n this.button.focus();\r\n this.open = false;\r\n };\r\n\r\n render() {\r\n return (\r\n <Host onFocusout={this.focusOutListener} tabindex={this.open ? \"-1\" : undefined}>\r\n <slot name=\"toggle\" />\r\n <div hidden={!this.open}>\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-accordion-section.js","mappings":";;;;AAIO,MAAM,QAAQ,GAA0C;EAC7D,OAAO,EAAE,SAAS;EAClB,IAAI,EAAE,OAAO;EACb,OAAO,EAAE,eAAe;EACxB,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;CACf;;ACRM,MAAM,aAAa,GAIrB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,QAA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,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,eAAe,GAAY,EAE5E,IAAI,CAAC,MAAM,IAAI,YAAM,KAAK,EAAC,SAAS,IAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAQ,EAEpE,gBACG,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,SAAS,KACb,gBAAU,KAAK,EAAC,WAAW,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,aAAa,GAAG,MAAM,GAAI,CACvF,CACI,EAEN,SAAS,KACR,WAAK,KAAK,EAAC,2BAA2B,IACnC,IAAI,CAAC,iBAAiB,IAAI,YAAM,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,iBAAiB,CAAQ,EACnF,EAAC,UAAU,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,eAAe,GAAI,CACtF,CACP,CACQ,CACZ,CACa,CACT,EACT,sBACE,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,eAAe,QACf,aAAa,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,CAAC,EACrC,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,IAE9D,WAAK,KAAK,EAAC,0BAA0B,EAAC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,IAClF,eAAQ,CACJ,CACS,CACZ,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/accordion/components/accordion-section.interfaces.ts","./src/components/accordion/components/handles/element.handle.tsx","./src/components/accordion/components/handles/heading.handle.tsx","./src/components/accordion/components/handles/state-icon.handle.tsx","./src/components/accordion/components/handles/icon.handle.tsx","./src/components/accordion/components/accordion-section.scss?tag=dso-accordion-section&encapsulation=shadow","./src/components/accordion/components/accordion-section.tsx"],"sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\r\n\r\nexport const stateMap: Record<AccordionSectionState, string> = {\r\n success: \"succes:\",\r\n info: \"info:\",\r\n warning: \"waarschuwing:\",\r\n danger: \"fout:\",\r\n error: \"fout:\",\r\n};\r\n\r\nexport interface AccordionSectionToggleClickEvent {\r\n /**\r\n * The original MouseEvent that triggered the click.\r\n *\r\n * In case the Section Handle is an <a> this event can be used to preventDefault() so the framework router is reponsible for navigating the user.\r\n */\r\n originalEvent?: MouseEvent;\r\n\r\n /**\r\n * The requested state. If the Accordion Section is closed, `open = true`.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionAnimationEndEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(): void;\r\n\r\n /**\r\n * The state of the Accordion Section after animation.\r\n */\r\n open: boolean;\r\n}\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nexport const HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"}>\r\n {children}\r\n </a>\r\n );\r\n }\r\n\r\n return (\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"}>\r\n {children}\r\n </button>\r\n );\r\n};\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { AccordionHeading } from \"../accordion-section.interfaces\";\r\n\r\nexport const Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { AccordionSectionState } from \"../accordion-section.interfaces\";\r\n\r\nexport const HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { AccordionSectionState } from \"../accordion-section.interfaces\";\r\nimport { HandleStateIcon } from \"./state-icon.handle\";\r\n\r\nexport const HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n@use \"~dso-toolkit/src/components/accordion\";\r\n@use \"~dso-toolkit/src/components/anchor\";\r\n\r\n@use \"accordion-section-theme-compact\";\r\n@use \"accordion-section-theme-compact-black\";\r\n@use \"accordion-section-theme-conclusion\";\r\n@use \"accordion-section-theme-default\";\r\n@use \"accordion-section-theme-neutral\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n:host {\r\n display: block;\r\n\r\n .dso-section-handle {\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n position: relative;\r\n\r\n > a:active {\r\n text-decoration: none;\r\n }\r\n\r\n a {\r\n @include anchor.clean();\r\n }\r\n\r\n .dso-status {\r\n font-weight: 400;\r\n text-decoration: underline;\r\n }\r\n }\r\n\r\n .dso-section-handle > button,\r\n .dso-section-handle > a {\r\n align-items: center;\r\n background-color: transparent;\r\n border: 0;\r\n cursor: pointer;\r\n display: flex;\r\n font-family: typography.$font-family-base;\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n padding: accordion.$vertical-padding accordion.$horizontal-padding accordion.$vertical-padding;\r\n text-align: start;\r\n width: 100%;\r\n word-break: break-word;\r\n\r\n dso-icon {\r\n flex-shrink: 0;\r\n\r\n &.dso-section-handle-chevron {\r\n @include utilities.transition(transform);\r\n\r\n transform: rotate(0);\r\n }\r\n }\r\n\r\n > .dso-section-handle-addons:first-child,\r\n > dso-icon:first-child {\r\n margin-right: units.$u1;\r\n }\r\n\r\n > dso-icon:last-child {\r\n margin-left: auto;\r\n }\r\n\r\n > .dso-section-handle-addons:last-child {\r\n margin-left: auto;\r\n\r\n dso-attachments-counter,\r\n dso-icon {\r\n margin-left: 16px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n:host([open]:not([open=\"false\"])) {\r\n .dso-section-handle {\r\n > button,\r\n > a {\r\n .dso-section-handle-chevron {\r\n &:first-child {\r\n transform: rotate(90deg);\r\n }\r\n\r\n &:last-child {\r\n transform: rotate(-180deg);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.dso-section-body {\r\n background-color: colors.$wit;\r\n border-top: 0;\r\n margin-top: accordion.$border-radius * -1;\r\n\r\n .dso-section-body-content {\r\n padding: units.$u2 + accordion.$border-radius units.$u2 units.$u2;\r\n }\r\n}\r\n\r\n// Default\r\n:host(.dso-accordion-default) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default();\r\n}\r\n\r\n:host(.dso-accordion-default[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open();\r\n}\r\n\r\n:host(.dso-accordion-default.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open-nested();\r\n}\r\n\r\n// Compact\r\n:host(.dso-accordion-compact) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open-nested();\r\n}\r\n\r\n// Compact black\r\n:host(.dso-accordion-compact-black) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact-black[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open-nested();\r\n}\r\n\r\n// Conclusion\r\n:host(.dso-accordion-conclusion) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion();\r\n}\r\n\r\n:host(.dso-accordion-conclusion[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open();\r\n}\r\n\r\n:host(.dso-accordion-conclusion.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open-nested();\r\n}\r\n\r\n// Neutral\r\n:host(.dso-accordion-neutral) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral();\r\n}\r\n\r\n:host(.dso-accordion-neutral[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open();\r\n}\r\n\r\n:host(.dso-accordion-neutral.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open-nested();\r\n}\r\n","import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n forceUpdate,\r\n Fragment,\r\n Host,\r\n Prop,\r\n State,\r\n EventEmitter,\r\n} from \"@stencil/core\";\r\n\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\nimport { Handle, HandleElement, HandleIcon } from \"./handles\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle?: string;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n @State()\r\n hasNestedAccordion = false;\r\n\r\n @State()\r\n hover = false;\r\n\r\n componentWillLoad() {\r\n this.hasNestedAccordion = this.host.querySelector(\"dso-accordion\") !== null;\r\n\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined): Promise<void> {\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? bodyHeight ?? 0 : 0);\r\n if (sectionBottomY > window.innerHeight) {\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection\r\n ? this.host.offsetTop\r\n : this.host.offsetTop - (window.innerHeight - expandedAccordionHeight),\r\n behavior: \"smooth\",\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n window.scrollTo({\r\n top: this.host.offsetTop,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: () => this.scrollIntoView(e.detail.bodyHeight),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: true,\r\n \"dso-nested-accordion\": this.hasNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement handleUrl={this.handleUrl} onClick={this.handleClick} open={this.open}>\r\n {reverseAlign ? (\r\n <Fragment>\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n\r\n <span>{this.handleTitle}</span>\r\n\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n\r\n <span>\r\n {this.handleTitle}\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"dso-accordion-section.js","mappings":";;;;AAIO,MAAM,QAAQ,GAA0C;EAC7D,OAAO,EAAE,SAAS;EAClB,IAAI,EAAE,OAAO;EACb,OAAO,EAAE,eAAe;EACxB,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;CACf;;ACRM,MAAM,aAAa,GAIrB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,QAAQ;EAC1C,IAAI,SA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B,EAAC,IAAI,EAAC,eAAe,GAAY,EAE5E,IAAI,CAAC,MAAM,IAAI,YAAM,KAAK,EAAC,SAAS,IAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAQ,EAEpE,gBACG,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,SAAS,KACb,gBAAU,KAAK,EAAC,WAAW,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,aAAa,GAAG,MAAM,GAAI,CACvF,CACI,EAEN,SAAS,KACR,WAAK,KAAK,EAAC,2BAA2B,IACnC,IAAI,CAAC,iBAAiB,IAAI,YAAM,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,iBAAiB,CAAQ,EACnF,EAAC,UAAU,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,eAAe,GAAI,CACtF,CACP,CACQ,CACZ,CACa,CACT,EACT,sBACE,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,eAAe,QACf,aAAa,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,CAAC,EACrC,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,IAE9D,WAAK,KAAK,EAAC,0BAA0B,EAAC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,IAClF,eAAQ,CACJ,CACS,CACZ,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/accordion/components/accordion-section.interfaces.ts","src/components/accordion/components/handles/element.handle.tsx","src/components/accordion/components/handles/heading.handle.tsx","src/components/accordion/components/handles/state-icon.handle.tsx","src/components/accordion/components/handles/icon.handle.tsx","src/components/accordion/components/accordion-section.scss?tag=dso-accordion-section&encapsulation=shadow","src/components/accordion/components/accordion-section.tsx"],"sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\r\n\r\nexport const stateMap: Record<AccordionSectionState, string> = {\r\n success: \"succes:\",\r\n info: \"info:\",\r\n warning: \"waarschuwing:\",\r\n danger: \"fout:\",\r\n error: \"fout:\",\r\n};\r\n\r\nexport interface AccordionSectionToggleClickEvent {\r\n /**\r\n * The original MouseEvent that triggered the click.\r\n *\r\n * In case the Section Handle is an <a> this event can be used to preventDefault() so the framework router is reponsible for navigating the user.\r\n */\r\n originalEvent?: MouseEvent;\r\n\r\n /**\r\n * The requested state. If the Accordion Section is closed, `open = true`.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionAnimationEndEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(): void;\r\n\r\n /**\r\n * The state of the Accordion Section after animation.\r\n */\r\n open: boolean;\r\n}\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nexport const HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"}>\r\n {children}\r\n </a>\r\n );\r\n }\r\n\r\n return (\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"}>\r\n {children}\r\n </button>\r\n );\r\n};\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { AccordionHeading } from \"../accordion-section.interfaces\";\r\n\r\nexport const Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { AccordionSectionState } from \"../accordion-section.interfaces\";\r\n\r\nexport const HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n","import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { AccordionSectionState } from \"../accordion-section.interfaces\";\r\nimport { HandleStateIcon } from \"./state-icon.handle\";\r\n\r\nexport const HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n@use \"~dso-toolkit/src/components/accordion\";\r\n@use \"~dso-toolkit/src/components/anchor\";\r\n\r\n@use \"accordion-section-theme-compact\";\r\n@use \"accordion-section-theme-compact-black\";\r\n@use \"accordion-section-theme-conclusion\";\r\n@use \"accordion-section-theme-default\";\r\n@use \"accordion-section-theme-neutral\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n:host {\r\n display: block;\r\n\r\n .dso-section-handle {\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n position: relative;\r\n\r\n > a:active {\r\n text-decoration: none;\r\n }\r\n\r\n a {\r\n @include anchor.clean();\r\n }\r\n\r\n .dso-status {\r\n font-weight: 400;\r\n text-decoration: underline;\r\n }\r\n }\r\n\r\n .dso-section-handle > button,\r\n .dso-section-handle > a {\r\n align-items: center;\r\n background-color: transparent;\r\n border: 0;\r\n cursor: pointer;\r\n display: flex;\r\n font-family: typography.$font-family-base;\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n padding: accordion.$vertical-padding accordion.$horizontal-padding accordion.$vertical-padding;\r\n text-align: start;\r\n width: 100%;\r\n word-break: break-word;\r\n\r\n dso-icon {\r\n flex-shrink: 0;\r\n\r\n &.dso-section-handle-chevron {\r\n @include utilities.transition(transform);\r\n\r\n transform: rotate(0);\r\n }\r\n }\r\n\r\n > .dso-section-handle-addons:first-child,\r\n > dso-icon:first-child {\r\n margin-right: units.$u1;\r\n }\r\n\r\n > dso-icon:last-child {\r\n margin-left: auto;\r\n }\r\n\r\n > .dso-section-handle-addons:last-child {\r\n margin-left: auto;\r\n\r\n dso-attachments-counter,\r\n dso-icon {\r\n margin-left: 16px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n:host([open]:not([open=\"false\"])) {\r\n .dso-section-handle {\r\n > button,\r\n > a {\r\n .dso-section-handle-chevron {\r\n &:first-child {\r\n transform: rotate(90deg);\r\n }\r\n\r\n &:last-child {\r\n transform: rotate(-180deg);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.dso-section-body {\r\n background-color: colors.$wit;\r\n border-top: 0;\r\n margin-top: accordion.$border-radius * -1;\r\n\r\n .dso-section-body-content {\r\n padding: units.$u2 + accordion.$border-radius units.$u2 units.$u2;\r\n }\r\n}\r\n\r\n// Default\r\n:host(.dso-accordion-default) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default();\r\n}\r\n\r\n:host(.dso-accordion-default[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open();\r\n}\r\n\r\n:host(.dso-accordion-default.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open-nested();\r\n}\r\n\r\n// Compact\r\n:host(.dso-accordion-compact) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open-nested();\r\n}\r\n\r\n// Compact black\r\n:host(.dso-accordion-compact-black) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact-black[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open-nested();\r\n}\r\n\r\n// Conclusion\r\n:host(.dso-accordion-conclusion) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion();\r\n}\r\n\r\n:host(.dso-accordion-conclusion[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open();\r\n}\r\n\r\n:host(.dso-accordion-conclusion.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open-nested();\r\n}\r\n\r\n// Neutral\r\n:host(.dso-accordion-neutral) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral();\r\n}\r\n\r\n:host(.dso-accordion-neutral[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open();\r\n}\r\n\r\n:host(.dso-accordion-neutral.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open-nested();\r\n}\r\n","import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n forceUpdate,\r\n Fragment,\r\n Host,\r\n Prop,\r\n State,\r\n EventEmitter,\r\n} from \"@stencil/core\";\r\n\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\nimport { Handle, HandleElement, HandleIcon } from \"./handles\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle?: string;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n @State()\r\n hasNestedAccordion = false;\r\n\r\n @State()\r\n hover = false;\r\n\r\n componentWillLoad() {\r\n this.hasNestedAccordion = this.host.querySelector(\"dso-accordion\") !== null;\r\n\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined): Promise<void> {\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? bodyHeight ?? 0 : 0);\r\n if (sectionBottomY > window.innerHeight) {\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection\r\n ? this.host.offsetTop\r\n : this.host.offsetTop - (window.innerHeight - expandedAccordionHeight),\r\n behavior: \"smooth\",\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n window.scrollTo({\r\n top: this.host.offsetTop,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: () => this.scrollIntoView(e.detail.bodyHeight),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: true,\r\n \"dso-nested-accordion\": this.hasNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement handleUrl={this.handleUrl} onClick={this.handleClick} open={this.open}>\r\n {reverseAlign ? (\r\n <Fragment>\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n\r\n <span>{this.handleTitle}</span>\r\n\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n\r\n <span>\r\n {this.handleTitle}\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-accordion.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,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CAAC,CAAC;AAChE,IAAI,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC;AACnC,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;AC/LD,MAAM,YAAY,GAAG,iEAAiE;;MCWzE,SAAS;EAqBpB,aAAa,CAAC,UAA4B,SAAS;IACjD,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;GACvC;EAGD,kBAAkB,CAAC,YAAqB;IACtC,IAAI,CAAC,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;GACjD;;;;EAMD,MAAM,SAAS;IACb,OAAO,IAAI,CAAC,cAAc,CAAC;GAC5B;EAED,iBAAiB;IACf,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC3C,IAAI,CAAC,cAAc,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;GACtD;EAED;;;;mBAjC4B,SAAS;wBAQtB,KAAK;IA0BlB,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,CAAyB,EAAE,CAAC,CAAC;IAE1D,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;GAC7B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAC,eAAe,IACzB,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../../node_modules/@stencil/store/dist/index.mjs","./src/components/accordion/accordion.scss?tag=dso-accordion&encapsulation=shadow","./src/components/accordion/accordion.tsx"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n","import { h, Component, ComponentInterface, Prop, Host, Method, Watch, Element } from \"@stencil/core\";\r\n\r\nimport { AccordionInternalState, AccordionVariant } from \"./accordion.interfaces\";\r\n\r\nimport { createStore } from \"@stencil/store\";\r\n\r\n@Component({\r\n tag: \"dso-accordion\",\r\n styleUrl: \"accordion.scss\",\r\n shadow: true,\r\n})\r\nexport class Accordion implements ComponentInterface {\r\n private accordionState: AccordionInternalState;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionElement;\r\n\r\n /**\r\n * The variant of the Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n variant: AccordionVariant = \"default\";\r\n\r\n /**\r\n * Places the chevron at the opposite side.\r\n *\r\n * Note: this mode does not display `state`, `attachmentCount` or `status` props on Accordion Sections\r\n */\r\n @Prop({ reflect: true })\r\n reverseAlign = false;\r\n\r\n @Watch(\"variant\")\r\n updateVariant(variant: AccordionVariant = \"default\") {\r\n this.accordionState.variant = variant;\r\n }\r\n\r\n @Watch(\"reverseAlign\")\r\n updateReverseAlign(reverseAlign: boolean) {\r\n this.accordionState.reverseAlign = reverseAlign;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _getState(): Promise<AccordionInternalState> {\r\n return this.accordionState;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordionState.variant = this.variant;\r\n this.accordionState.reverseAlign = this.reverseAlign;\r\n }\r\n\r\n constructor() {\r\n const { state } = createStore<AccordionInternalState>({});\r\n\r\n this.accordionState = state;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class=\"dso-accordion\">\r\n <slot></slot>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"dso-accordion.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CA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AW,GAAG,CAAC,YAAY,EAAE,YAAY,KAAK;AACpD,IAAI,MAAM,GAAG,GAAG,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;AAChE,IAAI,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC;AACnC,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;AC/LD,MAAM,YAAY,GAAG,iEAAiE;;MCWzE,SAAS;EAqBpB,aAAa,CAAC,UAA4B,SAAS;IACjD,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;GACvC;EAGD,kBAAkB,CAAC,YAAqB;IACtC,IAAI,CAAC,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;GACjD;;;;EAMD,MAAM,SAAS;IACb,OAAO,IAAI,CAAC,cAAc,CAAC;GAC5B;EAED,iBAAiB;IACf,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC3C,IAAI,CAAC,cAAc,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;GACtD;EAED;;;;mBAjC4B,SAAS;wBAQtB,KAAK;IA0BlB,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,CAAyB,EAAE,CAAC,CAAC;IAE1D,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;GAC7B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAC,eAAe,IACzB,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../../node_modules/@stencil/store/dist/index.mjs","src/components/accordion/accordion.scss?tag=dso-accordion&encapsulation=shadow","src/components/accordion/accordion.tsx"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n","import { h, Component, ComponentInterface, Prop, Host, Method, Watch, Element } from \"@stencil/core\";\r\n\r\nimport { AccordionInternalState, AccordionVariant } from \"./accordion.interfaces\";\r\n\r\nimport { createStore } from \"@stencil/store\";\r\n\r\n@Component({\r\n tag: \"dso-accordion\",\r\n styleUrl: \"accordion.scss\",\r\n shadow: true,\r\n})\r\nexport class Accordion implements ComponentInterface {\r\n private accordionState: AccordionInternalState;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionElement;\r\n\r\n /**\r\n * The variant of the Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n variant: AccordionVariant = \"default\";\r\n\r\n /**\r\n * Places the chevron at the opposite side.\r\n *\r\n * Note: this mode does not display `state`, `attachmentCount` or `status` props on Accordion Sections\r\n */\r\n @Prop({ reflect: true })\r\n reverseAlign = false;\r\n\r\n @Watch(\"variant\")\r\n updateVariant(variant: AccordionVariant = \"default\") {\r\n this.accordionState.variant = variant;\r\n }\r\n\r\n @Watch(\"reverseAlign\")\r\n updateReverseAlign(reverseAlign: boolean) {\r\n this.accordionState.reverseAlign = reverseAlign;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _getState(): Promise<AccordionInternalState> {\r\n return this.accordionState;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordionState.variant = this.variant;\r\n this.accordionState.reverseAlign = this.reverseAlign;\r\n }\r\n\r\n constructor() {\r\n const { state } = createStore<AccordionInternalState>({});\r\n\r\n this.accordionState = state;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class=\"dso-accordion\">\r\n <slot></slot>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-action-list-item.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,ypCAAypC;;MCOtqC,cAAc;;;;;;;oBAiBd,KAAK;mBAMN,KAAK;mBAML,KAAK;;EAEf,MAAM;IACJ,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,WAAW,EAAE,IAAI,CAAC,QAAQ;OAC3B,IAED,WAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,OAAO,GAAG,gBAAU,IAAI,EAAC,gBAAgB,GAAY,GAAG,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,IAAI,CAAO,EAC7G,WAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,SAAS,IAAI,cAAK,IAAI,CAAC,SAAS,CAAM,EAC5C,eAAQ,CACJ,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"dso-action-list-item.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,ypCAAypC;;MCOtqC,cAAc;;;;;;;oBAiBd,KAAK;mBAMN,KAAK;mBAML,KAAK;;EAEf,MAAM;IACJ,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,WAAW,EAAE,IAAI,CAAC,QAAQ;OAC3B,IAED,WAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,OAAO,GAAG,gBAAU,IAAI,EAAC,gBAAgB,GAAY,GAAG,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,IAAI,CAAO,EAC7G,WAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,SAAS,IAAI,cAAK,IAAI,CAAC,SAAS,CAAM,EAC5C,eAAQ,CACJ,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/action-list/components/action-list-item.scss?tag=dso-action-list-item&encapsulation=shadow","src/components/action-list/components/action-list-item.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/headings\";\r\n@use \"~dso-toolkit/src/components/step-counter\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n @include step-counter.step-counter();\r\n\r\n display: block;\r\n padding-block: units.$u2;\r\n position: relative;\r\n}\r\n\r\n:host(.divider) {\r\n .dso-action-list-item {\r\n &::after {\r\n border-bottom: 0.25rem dashed colors.$lichtblauw;\r\n bottom: 0;\r\n content: \"\";\r\n display: block;\r\n height: units.$u3;\r\n left: units.$u10;\r\n position: absolute;\r\n width: calc(100% + 16px);\r\n }\r\n }\r\n}\r\n\r\nh3 {\r\n @include headings.base();\r\n @include headings.h3();\r\n\r\n margin-block-end: units.$u2;\r\n margin-block-start: 0;\r\n min-height: units.$u6;\r\n padding-block-start: 9px;\r\n}\r\n\r\n.dso-action-list-item {\r\n display: grid;\r\n grid-template-columns: units.$u10 1fr;\r\n\r\n .dso-step-counter {\r\n position: unset;\r\n }\r\n\r\n .dso-step-counter,\r\n dso-icon {\r\n margin-inline-start: units.$u1;\r\n }\r\n\r\n .action-list-item-content {\r\n grid-column: 2 / 2;\r\n }\r\n}\r\n\r\ndso-icon {\r\n height: units.$u6;\r\n width: units.$u6;\r\n}\r\n","import { h, Component, ComponentInterface, Host, Prop } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"dso-action-list-item\",\r\n styleUrl: \"action-list-item.scss\",\r\n shadow: true,\r\n})\r\nexport class ActionListItem implements ComponentInterface {\r\n /**\r\n * The step of the Action List Item.\r\n */\r\n @Prop()\r\n step!: number;\r\n\r\n /**\r\n * The title of the item.\r\n */\r\n @Prop()\r\n itemTitle?: string;\r\n\r\n /**\r\n * Show flow line to next step\r\n */\r\n @Prop()\r\n flowLine = false;\r\n\r\n /**\r\n * When there is a warning.\r\n */\r\n @Prop()\r\n warning = false;\r\n\r\n /**\r\n * Places a dashed line at the bottom of the item.\r\n */\r\n @Prop()\r\n divider = false;\r\n\r\n render() {\r\n return (\r\n <Host\r\n class={{\r\n divider: this.divider,\r\n \"flow-line\": this.flowLine,\r\n }}\r\n >\r\n <div class=\"dso-action-list-item\">\r\n {this.warning ? <dso-icon icon=\"status-warning\"></dso-icon> : <div class=\"dso-step-counter\">{this.step}</div>}\r\n <div class=\"action-list-item-content\">\r\n {this.itemTitle && <h3>{this.itemTitle}</h3>}\r\n <slot />\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-action-list.js","mappings":";;AAAA,MAAM,aAAa,GAAG,sSAAsS;;MCO/S,UAAU;;;;;;;EAOrB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,cAAK,IAAI,CAAC,SAAS,CAAM,EACzB,WAAK,KAAK,EAAC,yBAAyB,IAClC,eAAQ,CACJ,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"dso-action-list.js","mappings":";;AAAA,MAAM,aAAa,GAAG,sSAAsS;;MCO/S,UAAU;;;;;;;EAOrB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,cAAK,IAAI,CAAC,SAAS,CAAM,EACzB,WAAK,KAAK,EAAC,yBAAyB,IAClC,eAAQ,CACJ,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/action-list/action-list.scss?tag=dso-action-list&encapsulation=shadow","src/components/action-list/action-list.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/headings\";\r\n\r\n:host {\r\n background-color: colors.$lichtblauw-20;\r\n display: block;\r\n padding-block: units.$u2;\r\n padding-inline-start: units.$u2;\r\n padding-inline-end: units.$u10 + units.$u2;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\nh2 {\r\n @include headings.base();\r\n @include headings.h2();\r\n\r\n margin-block: 0 units.$u2;\r\n}\r\n\r\n.dso-action-list-content {\r\n padding-inline-start: units.$u10;\r\n}\r\n","import { h, Component, Host, ComponentInterface, Prop } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"dso-action-list\",\r\n styleUrl: \"action-list.scss\",\r\n shadow: true,\r\n})\r\nexport class ActionList implements ComponentInterface {\r\n /**\r\n * The title.\r\n */\r\n @Prop()\r\n listTitle!: string;\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <h2>{this.listTitle}</h2>\r\n <div class=\"dso-action-list-content\">\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-attachments-counter.js","mappings":";;;AAAA,MAAM,qBAAqB,GAAG,4UAA4U;;MCO7V,kBAAkB;;;;;;;EAO7B,MAAM;IACJ,QACE,YAAM,KAAK,EAAC,iBAAiB,IAC1B,IAAI,CAAC,KAAK,OAAE,YAAM,KAAK,EAAC,SAAS,eAAS,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAQ,EAC9E,gBAAU,IAAI,EAAC,WAAW,GAAY,CACjC,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"dso-attachments-counter.js","mappings":";;;AAAA,MAAM,qBAAqB,GAAG,4UAA4U;;MCO7V,kBAAkB;;;;;;;EAO7B,MAAM;IACJ,QACE,YAAM,KAAK,EAAC,iBAAiB,IAC1B,IAAI,CAAC,KAAK,OAAE,YAAM,KAAK,EAAC,SAAS,eAAS,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAQ,EAC9E,gBAAU,IAAI,EAAC,WAAW,GAAY,CACjC,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/attachments-counter/attachments-counter.scss?tag=dso-attachments-counter&encapsulation=shadow","src/components/attachments-counter/attachments-counter.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/attachments-counter\";\r\n\r\n:host {\r\n display: inline-block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-attachments {\r\n @include attachments-counter.root();\r\n}\r\n","import { Component, h, Prop } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"dso-attachments-counter\",\r\n styleUrl: \"attachments-counter.scss\",\r\n shadow: true,\r\n})\r\nexport class AttachmentsCounter {\r\n /**\r\n * The number of attachments.\r\n */\r\n @Prop()\r\n count!: number;\r\n\r\n render() {\r\n return (\r\n <span class=\"dso-attachments\">\r\n {this.count} <span class=\"sr-only\">bijlage{this.count !== 1 ? \"n\" : \"\"}</span>\r\n <dso-icon icon=\"paperclip\"></dso-icon>\r\n </span>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -268,7 +268,7 @@ const Autosuggest = /*@__PURE__*/ proxyCustomElement(class Autosuggest extends H
|
|
|
268
268
|
render() {
|
|
269
269
|
var _a, _b;
|
|
270
270
|
const terms = (_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.value.split(" ").filter((t) => t)) !== null && _b !== void 0 ? _b : [];
|
|
271
|
-
return (h(Fragment, null, h("slot", null), this.loading && this.showLoading ? (h("div", { class: "autosuggest-progress-box" }, h("dso-progress-indicator", { label: this.loadingLabel }))) : (h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: (element) => (this.listbox = element), hidden: !this.showSuggestions && !this.notFound }, (this.showSuggestions &&
|
|
271
|
+
return (h(Fragment, null, h("slot", null), this.loading && this.showLoading ? (h("div", { class: "autosuggest-progress-box" }, h("dso-progress-indicator", { label: this.loadingLabel }))) : (h("ul", { role: "listbox", "aria-live": "polite", id: this.listboxId, "aria-labelledby": this.labelId, ref: (element) => (this.listbox = element), hidden: !this.showSuggestions && !this.notFound }, (this.showSuggestions &&
|
|
272
272
|
this.suggestions &&
|
|
273
273
|
this.suggestions.map((suggestion) => (h("li", { role: "option", id: this.listboxItemId(suggestion), key: suggestion.value, onMouseEnter: () => this.selectSuggestion(suggestion), onMouseLeave: () => this.resetSelectedSuggestion(), onClick: () => this.pickSelectedValue(), "aria-selected": (suggestion === this.selectedSuggestion).toString(), "aria-label": suggestion.value }, h("span", { class: "value" }, this.markTerms(suggestion.value, terms)), suggestion.type ? h("span", { class: "type" }, suggestion.type) : undefined)))) ||
|
|
274
274
|
(this.notFound && (h("li", null, h("span", { class: "value" }, !this.notFoundLabel ? (this.markTerms(`${this.inputValue} is niet gevonden.`, terms)) : (h("span", null, this.notFoundLabel))))))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-autosuggest.js","mappings":";;;;;AAAe,SAAS,kBAAkB,CAAC,MAAM,EAAE;AACnD,CAAC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACjC,EAAE,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAC3C,EAAE;AACF;AACA;AACA;AACA,CAAC,OAAO,MAAM;AACd,GAAG,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;AACzC,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1B;;ACVA,MAAM,cAAc,GAAG,w4BAAw4B;;MCYl5B,WAAW;;;;;;;IA6Fd,cAAS,GAAW,EAAE,EAAE,CAAC;IAEzB,YAAO,GAAW,EAAE,EAAE,CAAC;IAEvB,YAAO,GAAW,EAAE,EAAE,CAAC;IAEvB,uBAAkB,GAAGA,UAAQ,CAAC,CAAC,KAAa;MAClD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;MAC3B,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC7B,EAAE,GAAG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AAK,EAAC,OAAO,IAChB,CAAC,IAAI,CAAC,aAAa,IAClB,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,UAAU,oBAAoB,EAAE,KAAK,CAAC,KAE7D,gBAAO,IAAI,CAAC,aAAa,CAAQ,CAClC,CACI,CACJ,CACN,CAAC,CACD,CACN,CACA,EACH;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["debounce"],"sources":["../../node_modules/escape-string-regexp/index.js","./src/components/autosuggest/autosuggest.scss?tag=dso-autosuggest&encapsulation=scoped","./src/components/autosuggest/autosuggest.tsx"],"sourcesContent":["export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/scaffolding\";\r\n@use \"~dso-toolkit/src/variables/zindex\";\r\n\r\n@use \"autosuggest.variables\" as core-autosuggest-variables;\r\n\r\n:host {\r\n display: block;\r\n position: relative;\r\n}\r\n\r\nul,\r\n.autosuggest-progress-box {\r\n background-clip: padding-box;\r\n background-color: core-autosuggest-variables.$background-color;\r\n border: 1px solid core-autosuggest-variables.$border-color;\r\n border-radius: scaffolding.$border-radius-base;\r\n box-shadow: core-autosuggest-variables.$box-shadow;\r\n list-style-type: none;\r\n margin-top: 2px;\r\n padding: units.$u1 * 0.5 0;\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 100%;\r\n z-index: zindex.$autosuggest;\r\n}\r\n\r\n.autosuggest-progress-box {\r\n padding: units.$u1 * 1.5 units.$u1;\r\n}\r\n\r\nul {\r\n padding: units.$u1 0;\r\n\r\n li {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: units.$u1 * 0.5 units.$u2;\r\n }\r\n}\r\n\r\nli[aria-selected=\"true\"] {\r\n cursor: pointer;\r\n background-color: colors.$grasgroen;\r\n\r\n &,\r\n .type {\r\n color: colors.$wit;\r\n }\r\n}\r\n\r\nmark {\r\n font-weight: 700;\r\n background-color: inherit;\r\n color: inherit;\r\n padding: 0;\r\n}\r\n\r\n.type {\r\n color: colors.$grijs-60;\r\n}\r\n","import { Component, Element, h, Listen, Prop, State, Fragment, Event, EventEmitter, VNode, Watch } from \"@stencil/core\";\r\nimport debounce from \"debounce\";\r\nimport { v4 } from \"uuid\";\r\nimport escapeStringRegexp from \"escape-string-regexp\";\r\n\r\nimport { Suggestion } from \"./autosuggest.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-autosuggest\",\r\n styleUrl: \"autosuggest.scss\",\r\n scoped: true,\r\n})\r\nexport class Autosuggest {\r\n /**\r\n * The suggestions for the value of the slotted input element. Optionally a\r\n * Suggestion can have a `type` and `item`.\r\n *\r\n * The `type` is used to style the suggestion. `item` can be use to reference\r\n * the original object that was used to create the suggestion.\r\n *\r\n * The value should be null when no suggestions have been fetched.\r\n */\r\n @Prop()\r\n readonly suggestions: Suggestion[] | null = null;\r\n\r\n /**\r\n * Shows progress indicator when fetching results.\r\n */\r\n @Prop()\r\n loading = false;\r\n\r\n /**\r\n * To override progress indicator's default loading label.\r\n */\r\n @Prop()\r\n loadingLabel?: string = \"Een moment geduld.\";\r\n\r\n /**\r\n * To delay progress indicator showing (in ms).\r\n */\r\n @Prop()\r\n loadingDelayed?: number;\r\n\r\n /**\r\n * To show text when no results are found.\r\n */\r\n @Prop()\r\n notFoundLabel?: string;\r\n\r\n /**\r\n * Whether the previous suggestions will be presented when the input gets focus again.\r\n */\r\n @Prop()\r\n suggestOnFocus = false;\r\n\r\n /**\r\n * Emitted when a suggestion is selected.\r\n * The `detail` property of the `CustomEvent` will contain the selected suggestion.\r\n */\r\n @Event()\r\n dsoSelect!: EventEmitter<Suggestion>;\r\n\r\n /**\r\n * This is emitted debounced for every change for the slotted input type=text element.\r\n */\r\n @Event()\r\n dsoChange!: EventEmitter<string>;\r\n\r\n /**\r\n * Emitted when enter is pressed.\r\n * The `detail` property of the `CustomEvent` will contain the input text.\r\n */\r\n @Event()\r\n dsoSearch!: EventEmitter<string>;\r\n\r\n @Element()\r\n host!: HTMLDsoAutosuggestElement;\r\n\r\n @State()\r\n showSuggestions = false;\r\n\r\n @State()\r\n selectedSuggestion: Suggestion | undefined;\r\n\r\n @State()\r\n notFound = false;\r\n\r\n @State()\r\n showLoading = false;\r\n\r\n @Watch(\"suggestions\")\r\n suggestionsWatcher() {\r\n this.resetSelectedSuggestion();\r\n\r\n if ((!this.showSuggestions || !this.notFound) && this.inputValue) {\r\n this.openSuggestions();\r\n } else if ((this.showSuggestions || this.notFound) && !this.inputValue) {\r\n this.closeSuggestions();\r\n }\r\n }\r\n\r\n private input?: HTMLInputElement;\r\n\r\n private listbox: HTMLUListElement | undefined;\r\n\r\n private listboxId: string = v4();\r\n\r\n private inputId: string = v4();\r\n\r\n private labelId: string = v4();\r\n\r\n private debouncedEmitValue = debounce((value: string) => {\r\n this.dsoChange.emit(value);\r\n this.debouncedShowLoading();\r\n }, 200);\r\n\r\n private debouncedShowLoading = debounce(() => {\r\n if (this.inputValue) {\r\n this.showLoading = true;\r\n }\r\n }, this.loadingDelayed);\r\n\r\n private inputValue = \"\";\r\n\r\n private onInput = (event: Event) => {\r\n if (!(event.target instanceof HTMLInputElement)) {\r\n return;\r\n // throw new Error(\"event.target is not instanceof HTMLInputElement\"); #2293\r\n }\r\n\r\n this.showLoading = !this.loadingDelayed;\r\n this.inputValue = event.target.value;\r\n this.debouncedEmitValue(event.target.value.match(/(\\S+)/g) ? event.target.value : \"\");\r\n };\r\n\r\n private onFocusIn = () => {\r\n if (this.suggestOnFocus) {\r\n this.openSuggestions();\r\n }\r\n };\r\n\r\n @Listen(\"click\", { target: \"document\" })\r\n onDocumentClick(event: MouseEvent) {\r\n if (\r\n (this.showSuggestions || this.notFound) &&\r\n this.listbox &&\r\n event.target instanceof Node &&\r\n !this.listbox.contains(event.target) &&\r\n this.input !== event.target\r\n ) {\r\n this.closeSuggestions();\r\n }\r\n }\r\n\r\n connectedCallback() {\r\n setTimeout(() => {\r\n const input = this.host.querySelector('input[type=\"text\"]');\r\n if (!(input instanceof HTMLInputElement)) {\r\n return;\r\n // throw new ReferenceError(\"Mandatory text input not found\"); #2293\r\n }\r\n\r\n this.input = input;\r\n if (input.id) {\r\n this.inputId = input.id;\r\n } else {\r\n input.id = this.inputId;\r\n }\r\n\r\n if (!this.input.labels || this.input.labels.length < 1) {\r\n return;\r\n // throw new ReferenceError(\"Mandatory label for text input not found\"); #2293\r\n }\r\n\r\n const label = this.input.labels[0];\r\n if (label?.id) {\r\n this.labelId = label.id;\r\n } else if (label) {\r\n label.id = this.labelId;\r\n }\r\n\r\n this.input.setAttribute(\"role\", \"combobox\");\r\n this.input.setAttribute(\"aria-haspopup\", \"listbox\");\r\n this.input.setAttribute(\"aria-controls\", this.listboxId);\r\n this.input.setAttribute(\"aria-expanded\", \"false\");\r\n this.input.setAttribute(\"autocomplete\", \"off\");\r\n this.input.setAttribute(\"aria-autocomplete\", \"list\");\r\n this.input.setAttribute(\"aria-activedescendant\", \"\");\r\n this.input.addEventListener(\"input\", this.onInput);\r\n this.input.addEventListener(\"keydown\", this.onKeyDown);\r\n this.input.addEventListener(\"focusin\", this.onFocusIn);\r\n });\r\n }\r\n\r\n disconnectedCallback() {\r\n this.input?.removeEventListener(\"input\", this.onInput);\r\n this.input?.removeEventListener(\"keydown\", this.onKeyDown);\r\n this.input?.removeEventListener(\"focusin\", this.onFocusIn);\r\n }\r\n\r\n private markTerms(suggestionValue: string, terms: string[]): (VNode | string)[] {\r\n if (!suggestionValue || !terms || terms.length === 0 || terms[0] === undefined) {\r\n return [\"\"];\r\n }\r\n\r\n const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, \"gi\");\r\n\r\n return suggestionValue.split(termRegex).map((valuePart: string) => {\r\n if (!valuePart) {\r\n return \"\";\r\n }\r\n\r\n if (termRegex.test(valuePart)) {\r\n return <mark>{valuePart}</mark>;\r\n }\r\n\r\n if (terms.length === 1) {\r\n return <span>{valuePart}</span>;\r\n }\r\n\r\n return this.markTerms(valuePart, terms.slice(1));\r\n });\r\n }\r\n\r\n private selectSuggestion(suggestion: Suggestion) {\r\n this.selectedSuggestion = suggestion;\r\n\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(suggestion));\r\n }\r\n\r\n private selectFirstSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n this.selectedSuggestion = this.suggestions[0];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private selectLastSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n this.selectedSuggestion = this.suggestions[this.suggestions.length - 1];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private selectNextSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : -1;\r\n\r\n this.selectedSuggestion = this.suggestions[index + 1] ?? this.suggestions[0];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private selectPreviousSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : 0;\r\n\r\n this.selectedSuggestion = this.suggestions[index - 1] ?? this.suggestions[this.suggestions.length - 1];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private resetSelectedSuggestion() {\r\n this.showLoading = !this.loadingDelayed;\r\n this.notFound = false;\r\n this.selectedSuggestion = undefined;\r\n this.input?.setAttribute(\"aria-activedescendant\", \"\");\r\n }\r\n\r\n private openSuggestions(selectSuggestion?: \"first\" | \"last\") {\r\n this.showSuggestions = (this.suggestions && this.suggestions.length > 0) ?? false;\r\n this.notFound = this.suggestions?.length === 0 ?? false;\r\n this.input?.setAttribute(\"aria-expanded\", (this.showSuggestions || this.notFound).toString());\r\n\r\n if (this.showSuggestions && selectSuggestion === \"first\") {\r\n this.selectFirstSuggestion();\r\n } else if (this.showSuggestions && selectSuggestion === \"last\") {\r\n this.selectLastSuggestion();\r\n }\r\n }\r\n\r\n private closeSuggestions() {\r\n this.showSuggestions = false;\r\n this.notFound = false;\r\n this.input?.setAttribute(\"aria-expanded\", \"false\");\r\n this.selectFirstSuggestion();\r\n }\r\n\r\n private pickSelectedValue() {\r\n if (this.selectedSuggestion && this.showSuggestions) {\r\n this.dsoSelect.emit(this.selectedSuggestion);\r\n } else {\r\n this.dsoSearch.emit(this.input?.value);\r\n }\r\n\r\n this.closeSuggestions();\r\n }\r\n\r\n private onKeyDown = (event: KeyboardEvent) => {\r\n if (event.defaultPrevented || this.loading) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\":\r\n if (!this.showSuggestions) {\r\n this.openSuggestions(\"first\");\r\n } else {\r\n this.selectNextSuggestion();\r\n }\r\n\r\n break;\r\n\r\n case \"ArrowUp\":\r\n if (!this.showSuggestions) {\r\n this.openSuggestions(\"last\");\r\n } else {\r\n this.selectPreviousSuggestion();\r\n }\r\n\r\n break;\r\n\r\n case \"Tab\":\r\n this.closeSuggestions();\r\n return;\r\n\r\n case \"Escape\":\r\n this.closeSuggestions();\r\n break;\r\n\r\n case \"Enter\":\r\n this.pickSelectedValue();\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n };\r\n\r\n private listboxItemId(suggestion: Suggestion): string {\r\n if (!this.suggestions) {\r\n return \"\";\r\n }\r\n return `${this.inputId}-${this.suggestions.indexOf(suggestion) + 1}`;\r\n }\r\n\r\n render() {\r\n const terms = this.input?.value.split(\" \").filter((t) => t) ?? [];\r\n\r\n return (\r\n <>\r\n <slot />\r\n {this.loading && this.showLoading ? (\r\n <div class=\"autosuggest-progress-box\">\r\n <dso-progress-indicator label={this.loadingLabel}></dso-progress-indicator>\r\n </div>\r\n ) : (\r\n <ul\r\n role=\"listbox\"\r\n id={this.listboxId}\r\n aria-labelledby={this.labelId}\r\n ref={(element) => (this.listbox = element)}\r\n hidden={!this.showSuggestions && !this.notFound}\r\n >\r\n {(this.showSuggestions &&\r\n this.suggestions &&\r\n this.suggestions.map((suggestion) => (\r\n <li\r\n role=\"option\"\r\n id={this.listboxItemId(suggestion)}\r\n key={suggestion.value}\r\n onMouseEnter={() => this.selectSuggestion(suggestion)}\r\n onMouseLeave={() => this.resetSelectedSuggestion()}\r\n onClick={() => this.pickSelectedValue()}\r\n aria-selected={(suggestion === this.selectedSuggestion).toString()}\r\n aria-label={suggestion.value}\r\n >\r\n <span class=\"value\">{this.markTerms(suggestion.value, terms)}</span>\r\n {suggestion.type ? <span class=\"type\">{suggestion.type}</span> : undefined}\r\n </li>\r\n ))) ||\r\n (this.notFound && (\r\n <li>\r\n <span class=\"value\">\r\n {!this.notFoundLabel ? (\r\n this.markTerms(`${this.inputValue} is niet gevonden.`, terms)\r\n ) : (\r\n <span>{this.notFoundLabel}</span>\r\n )}\r\n </span>\r\n </li>\r\n ))}\r\n </ul>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"dso-autosuggest.js","mappings":";;;;;AAAe,SAAS,kBAAkB,CAAC,MAAM,EAAE;AACnD,CAAC,IAAI,OAAO,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E,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAClC,GAAG,EAAE,UAAU,CAAC,KAAK,EACrB,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,EACrD,YAAY,EAAE,MAAM,IAAI,CAAC,uBAAuB,EAAE,EAClD,OAAO,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,mBACxB,CAAC,UAAU,KAAK,IAAI,CAAC,kBAAkB,EAAE,QAAQ,EAAE,gBACtD,UAAU,CAAC,KAAK,IAE5B,YAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAQ,EACnE,UAAU,CAAC,IAAI,GAAG,YAAM,KAAK,EAAC,MAAM,IAAE,UAAU,CAAC,IAAI,CAAQ,GAAG,SAAS,CACvE,CACN,CAAC;OACD,IAAI,CAAC,QAAQ,KACZ,cACE,YAAM,KAAK,EAAC,OAAO,IAChB,CAAC,IAAI,CAAC,aAAa,IAClB,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,UAAU,oBAAoB,EAAE,KAAK,CAAC,KAE7D,gBAAO,IAAI,CAAC,aAAa,CAAQ,CAClC,CACI,CACJ,CACN,CAAC,CACD,CACN,CACA,EACH;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["debounce"],"sources":["../../node_modules/escape-string-regexp/index.js","src/components/autosuggest/autosuggest.scss?tag=dso-autosuggest&encapsulation=scoped","src/components/autosuggest/autosuggest.tsx"],"sourcesContent":["export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/scaffolding\";\r\n@use \"~dso-toolkit/src/variables/zindex\";\r\n\r\n@use \"autosuggest.variables\" as core-autosuggest-variables;\r\n\r\n:host {\r\n display: block;\r\n position: relative;\r\n}\r\n\r\nul,\r\n.autosuggest-progress-box {\r\n background-clip: padding-box;\r\n background-color: core-autosuggest-variables.$background-color;\r\n border: 1px solid core-autosuggest-variables.$border-color;\r\n border-radius: scaffolding.$border-radius-base;\r\n box-shadow: core-autosuggest-variables.$box-shadow;\r\n list-style-type: none;\r\n margin-top: 2px;\r\n padding: units.$u1 * 0.5 0;\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 100%;\r\n z-index: zindex.$autosuggest;\r\n}\r\n\r\n.autosuggest-progress-box {\r\n padding: units.$u1 * 1.5 units.$u1;\r\n}\r\n\r\nul {\r\n padding: units.$u1 0;\r\n\r\n li {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: units.$u1 * 0.5 units.$u2;\r\n }\r\n}\r\n\r\nli[aria-selected=\"true\"] {\r\n cursor: pointer;\r\n background-color: colors.$grasgroen;\r\n\r\n &,\r\n .type {\r\n color: colors.$wit;\r\n }\r\n}\r\n\r\nmark {\r\n font-weight: 700;\r\n background-color: inherit;\r\n color: inherit;\r\n padding: 0;\r\n}\r\n\r\n.type {\r\n color: colors.$grijs-60;\r\n}\r\n","import { Component, Element, h, Listen, Prop, State, Fragment, Event, EventEmitter, VNode, Watch } from \"@stencil/core\";\r\nimport debounce from \"debounce\";\r\nimport { v4 } from \"uuid\";\r\nimport escapeStringRegexp from \"escape-string-regexp\";\r\n\r\nimport { Suggestion } from \"./autosuggest.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-autosuggest\",\r\n styleUrl: \"autosuggest.scss\",\r\n scoped: true,\r\n})\r\nexport class Autosuggest {\r\n /**\r\n * The suggestions for the value of the slotted input element. Optionally a\r\n * Suggestion can have a `type` and `item`.\r\n *\r\n * The `type` is used to style the suggestion. `item` can be use to reference\r\n * the original object that was used to create the suggestion.\r\n *\r\n * The value should be null when no suggestions have been fetched.\r\n */\r\n @Prop()\r\n readonly suggestions: Suggestion[] | null = null;\r\n\r\n /**\r\n * Shows progress indicator when fetching results.\r\n */\r\n @Prop()\r\n loading = false;\r\n\r\n /**\r\n * To override progress indicator's default loading label.\r\n */\r\n @Prop()\r\n loadingLabel?: string = \"Een moment geduld.\";\r\n\r\n /**\r\n * To delay progress indicator showing (in ms).\r\n */\r\n @Prop()\r\n loadingDelayed?: number;\r\n\r\n /**\r\n * To show text when no results are found.\r\n */\r\n @Prop()\r\n notFoundLabel?: string;\r\n\r\n /**\r\n * Whether the previous suggestions will be presented when the input gets focus again.\r\n */\r\n @Prop()\r\n suggestOnFocus = false;\r\n\r\n /**\r\n * Emitted when a suggestion is selected.\r\n * The `detail` property of the `CustomEvent` will contain the selected suggestion.\r\n */\r\n @Event()\r\n dsoSelect!: EventEmitter<Suggestion>;\r\n\r\n /**\r\n * This is emitted debounced for every change for the slotted input type=text element.\r\n */\r\n @Event()\r\n dsoChange!: EventEmitter<string>;\r\n\r\n /**\r\n * Emitted when enter is pressed.\r\n * The `detail` property of the `CustomEvent` will contain the input text.\r\n */\r\n @Event()\r\n dsoSearch!: EventEmitter<string>;\r\n\r\n @Element()\r\n host!: HTMLDsoAutosuggestElement;\r\n\r\n @State()\r\n showSuggestions = false;\r\n\r\n @State()\r\n selectedSuggestion: Suggestion | undefined;\r\n\r\n @State()\r\n notFound = false;\r\n\r\n @State()\r\n showLoading = false;\r\n\r\n @Watch(\"suggestions\")\r\n suggestionsWatcher() {\r\n this.resetSelectedSuggestion();\r\n\r\n if ((!this.showSuggestions || !this.notFound) && this.inputValue) {\r\n this.openSuggestions();\r\n } else if ((this.showSuggestions || this.notFound) && !this.inputValue) {\r\n this.closeSuggestions();\r\n }\r\n }\r\n\r\n private input?: HTMLInputElement;\r\n\r\n private listbox: HTMLUListElement | undefined;\r\n\r\n private listboxId: string = v4();\r\n\r\n private inputId: string = v4();\r\n\r\n private labelId: string = v4();\r\n\r\n private debouncedEmitValue = debounce((value: string) => {\r\n this.dsoChange.emit(value);\r\n this.debouncedShowLoading();\r\n }, 200);\r\n\r\n private debouncedShowLoading = debounce(() => {\r\n if (this.inputValue) {\r\n this.showLoading = true;\r\n }\r\n }, this.loadingDelayed);\r\n\r\n private inputValue = \"\";\r\n\r\n private onInput = (event: Event) => {\r\n if (!(event.target instanceof HTMLInputElement)) {\r\n return;\r\n // throw new Error(\"event.target is not instanceof HTMLInputElement\"); #2293\r\n }\r\n\r\n this.showLoading = !this.loadingDelayed;\r\n this.inputValue = event.target.value;\r\n this.debouncedEmitValue(event.target.value.match(/(\\S+)/g) ? event.target.value : \"\");\r\n };\r\n\r\n private onFocusIn = () => {\r\n if (this.suggestOnFocus) {\r\n this.openSuggestions();\r\n }\r\n };\r\n\r\n @Listen(\"click\", { target: \"document\" })\r\n onDocumentClick(event: MouseEvent) {\r\n if (\r\n (this.showSuggestions || this.notFound) &&\r\n this.listbox &&\r\n event.target instanceof Node &&\r\n !this.listbox.contains(event.target) &&\r\n this.input !== event.target\r\n ) {\r\n this.closeSuggestions();\r\n }\r\n }\r\n\r\n connectedCallback() {\r\n setTimeout(() => {\r\n const input = this.host.querySelector('input[type=\"text\"]');\r\n if (!(input instanceof HTMLInputElement)) {\r\n return;\r\n // throw new ReferenceError(\"Mandatory text input not found\"); #2293\r\n }\r\n\r\n this.input = input;\r\n if (input.id) {\r\n this.inputId = input.id;\r\n } else {\r\n input.id = this.inputId;\r\n }\r\n\r\n if (!this.input.labels || this.input.labels.length < 1) {\r\n return;\r\n // throw new ReferenceError(\"Mandatory label for text input not found\"); #2293\r\n }\r\n\r\n const label = this.input.labels[0];\r\n if (label?.id) {\r\n this.labelId = label.id;\r\n } else if (label) {\r\n label.id = this.labelId;\r\n }\r\n\r\n this.input.setAttribute(\"role\", \"combobox\");\r\n this.input.setAttribute(\"aria-haspopup\", \"listbox\");\r\n this.input.setAttribute(\"aria-controls\", this.listboxId);\r\n this.input.setAttribute(\"aria-expanded\", \"false\");\r\n this.input.setAttribute(\"autocomplete\", \"off\");\r\n this.input.setAttribute(\"aria-autocomplete\", \"list\");\r\n this.input.setAttribute(\"aria-activedescendant\", \"\");\r\n this.input.addEventListener(\"input\", this.onInput);\r\n this.input.addEventListener(\"keydown\", this.onKeyDown);\r\n this.input.addEventListener(\"focusin\", this.onFocusIn);\r\n });\r\n }\r\n\r\n disconnectedCallback() {\r\n this.input?.removeEventListener(\"input\", this.onInput);\r\n this.input?.removeEventListener(\"keydown\", this.onKeyDown);\r\n this.input?.removeEventListener(\"focusin\", this.onFocusIn);\r\n }\r\n\r\n private markTerms(suggestionValue: string, terms: string[]): (VNode | string)[] {\r\n if (!suggestionValue || !terms || terms.length === 0 || terms[0] === undefined) {\r\n return [\"\"];\r\n }\r\n\r\n const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, \"gi\");\r\n\r\n return suggestionValue.split(termRegex).map((valuePart: string) => {\r\n if (!valuePart) {\r\n return \"\";\r\n }\r\n\r\n if (termRegex.test(valuePart)) {\r\n return <mark>{valuePart}</mark>;\r\n }\r\n\r\n if (terms.length === 1) {\r\n return <span>{valuePart}</span>;\r\n }\r\n\r\n return this.markTerms(valuePart, terms.slice(1));\r\n });\r\n }\r\n\r\n private selectSuggestion(suggestion: Suggestion) {\r\n this.selectedSuggestion = suggestion;\r\n\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(suggestion));\r\n }\r\n\r\n private selectFirstSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n this.selectedSuggestion = this.suggestions[0];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private selectLastSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n this.selectedSuggestion = this.suggestions[this.suggestions.length - 1];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private selectNextSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : -1;\r\n\r\n this.selectedSuggestion = this.suggestions[index + 1] ?? this.suggestions[0];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private selectPreviousSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : 0;\r\n\r\n this.selectedSuggestion = this.suggestions[index - 1] ?? this.suggestions[this.suggestions.length - 1];\r\n\r\n if (this.selectedSuggestion) {\r\n this.input?.setAttribute(\"aria-activedescendant\", this.listboxItemId(this.selectedSuggestion));\r\n }\r\n }\r\n\r\n private resetSelectedSuggestion() {\r\n this.showLoading = !this.loadingDelayed;\r\n this.notFound = false;\r\n this.selectedSuggestion = undefined;\r\n this.input?.setAttribute(\"aria-activedescendant\", \"\");\r\n }\r\n\r\n private openSuggestions(selectSuggestion?: \"first\" | \"last\") {\r\n this.showSuggestions = (this.suggestions && this.suggestions.length > 0) ?? false;\r\n this.notFound = this.suggestions?.length === 0 ?? false;\r\n this.input?.setAttribute(\"aria-expanded\", (this.showSuggestions || this.notFound).toString());\r\n\r\n if (this.showSuggestions && selectSuggestion === \"first\") {\r\n this.selectFirstSuggestion();\r\n } else if (this.showSuggestions && selectSuggestion === \"last\") {\r\n this.selectLastSuggestion();\r\n }\r\n }\r\n\r\n private closeSuggestions() {\r\n this.showSuggestions = false;\r\n this.notFound = false;\r\n this.input?.setAttribute(\"aria-expanded\", \"false\");\r\n this.selectFirstSuggestion();\r\n }\r\n\r\n private pickSelectedValue() {\r\n if (this.selectedSuggestion && this.showSuggestions) {\r\n this.dsoSelect.emit(this.selectedSuggestion);\r\n } else {\r\n this.dsoSearch.emit(this.input?.value);\r\n }\r\n\r\n this.closeSuggestions();\r\n }\r\n\r\n private onKeyDown = (event: KeyboardEvent) => {\r\n if (event.defaultPrevented || this.loading) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\":\r\n if (!this.showSuggestions) {\r\n this.openSuggestions(\"first\");\r\n } else {\r\n this.selectNextSuggestion();\r\n }\r\n\r\n break;\r\n\r\n case \"ArrowUp\":\r\n if (!this.showSuggestions) {\r\n this.openSuggestions(\"last\");\r\n } else {\r\n this.selectPreviousSuggestion();\r\n }\r\n\r\n break;\r\n\r\n case \"Tab\":\r\n this.closeSuggestions();\r\n return;\r\n\r\n case \"Escape\":\r\n this.closeSuggestions();\r\n break;\r\n\r\n case \"Enter\":\r\n this.pickSelectedValue();\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n };\r\n\r\n private listboxItemId(suggestion: Suggestion): string {\r\n if (!this.suggestions) {\r\n return \"\";\r\n }\r\n return `${this.inputId}-${this.suggestions.indexOf(suggestion) + 1}`;\r\n }\r\n\r\n render() {\r\n const terms = this.input?.value.split(\" \").filter((t) => t) ?? [];\r\n\r\n return (\r\n <>\r\n <slot />\r\n {this.loading && this.showLoading ? (\r\n <div class=\"autosuggest-progress-box\">\r\n <dso-progress-indicator label={this.loadingLabel}></dso-progress-indicator>\r\n </div>\r\n ) : (\r\n <ul\r\n role=\"listbox\"\r\n aria-live=\"polite\"\r\n id={this.listboxId}\r\n aria-labelledby={this.labelId}\r\n ref={(element) => (this.listbox = element)}\r\n hidden={!this.showSuggestions && !this.notFound}\r\n >\r\n {(this.showSuggestions &&\r\n this.suggestions &&\r\n this.suggestions.map((suggestion) => (\r\n <li\r\n role=\"option\"\r\n id={this.listboxItemId(suggestion)}\r\n key={suggestion.value}\r\n onMouseEnter={() => this.selectSuggestion(suggestion)}\r\n onMouseLeave={() => this.resetSelectedSuggestion()}\r\n onClick={() => this.pickSelectedValue()}\r\n aria-selected={(suggestion === this.selectedSuggestion).toString()}\r\n aria-label={suggestion.value}\r\n >\r\n <span class=\"value\">{this.markTerms(suggestion.value, terms)}</span>\r\n {suggestion.type ? <span class=\"type\">{suggestion.type}</span> : undefined}\r\n </li>\r\n ))) ||\r\n (this.notFound && (\r\n <li>\r\n <span class=\"value\">\r\n {!this.notFoundLabel ? (\r\n this.markTerms(`${this.inputValue} is niet gevonden.`, terms)\r\n ) : (\r\n <span>{this.notFoundLabel}</span>\r\n )}\r\n </span>\r\n </li>\r\n ))}\r\n </ul>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as clsx } from './clsx.
|
|
2
|
+
import { c as clsx } from './clsx.js';
|
|
3
3
|
|
|
4
4
|
const bannerCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.dso-banner{padding:16px 0;position:relative}.dso-banner.dso-compact{padding:12px 0}";
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-banner.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,qJAAqJ;;MCQ1J,MAAM;;;;;;mBAWP,KAAK;kBAQN,IAAI;;EAEb,MAAM;IACJ,QACE,eACE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE;QAChD,aAAa,EAAE,IAAI,CAAC,OAAO;OAC5B,CAAC,EACF,IAAI,EAAC,OAAO,IAEZ,eAAa,CACL,EACV;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"dso-banner.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,qJAAqJ;;MCQ1J,MAAM;;;;;;mBAWP,KAAK;kBAQN,IAAI;;EAEb,MAAM;IACJ,QACE,eACE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE;QAChD,aAAa,EAAE,IAAI,CAAC,OAAO;OAC5B,CAAC,EACF,IAAI,EAAC,OAAO,IAEZ,eAAa,CACL,EACV;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/banner/banner.scss?tag=dso-banner&encapsulation=shadow","src/components/banner/banner.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/banner\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-banner {\r\n @include banner.root();\r\n}\r\n","import { Component, h, Prop } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-banner\",\r\n styleUrl: \"banner.scss\",\r\n shadow: true,\r\n})\r\nexport class Banner {\r\n /**\r\n * The status of the banner.\r\n */\r\n @Prop({ reflect: true })\r\n status!: \"danger\" | \"error\" | \"info\" | \"warning\";\r\n\r\n /**\r\n * compact mode.\r\n */\r\n @Prop()\r\n compact = false;\r\n\r\n /**\r\n * *Only available when `compact` is set to `true`.\r\n *\r\n * Option to show banner icon.\r\n */\r\n @Prop()\r\n noIcon = true;\r\n\r\n render() {\r\n return (\r\n <section\r\n class={clsx(\"dso-banner\", `alert-${this.status}`, {\r\n \"dso-compact\": this.compact,\r\n })}\r\n role=\"alert\"\r\n >\r\n <slot></slot>\r\n </section>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-card-container.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,ybAAyb;;MCQrc,aAAa;;;;;gBAKE,MAAM;;EAEhC,MAAM;IACJ,QACE,kBACG,IAAI,CAAC,IAAI,KAAK,MAAM,KACnB,UAAI,KAAK,EAAC,eAAe,IACvB,eAAQ,CACL,CACN,EACA,IAAI,CAAC,IAAI,KAAK,MAAM,KACnB,WAAK,KAAK,EAAC,eAAe,IACxB,eAAQ,CACJ,CACP,CACA,EACH;GACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"dso-card-container.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,ybAAyb;;MCQrc,aAAa;;;;;gBAKE,MAAM;;EAEhC,MAAM;IACJ,QACE,kBACG,IAAI,CAAC,IAAI,KAAK,MAAM,KACnB,UAAI,KAAK,EAAC,eAAe,IACvB,eAAQ,CACL,CACN,EACA,IAAI,CAAC,IAAI,KAAK,MAAM,KACnB,WAAK,KAAK,EAAC,eAAe,IACxB,eAAQ,CACJ,CACP,CACA,EACH;GACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/card-container/card-container.scss?tag=dso-card-container&encapsulation=shadow","src/components/card-container/card-container.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/components/card-container\";\r\n@use \"~dso-toolkit/src/components/list\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@use \"~dso-toolkit/src/components/grid/grid.variables\" as grid-variables;\r\n\r\n:host {\r\n .dso-card-list {\r\n @include list.unstyled();\r\n\r\n border-bottom: card-container.$border-width solid card-container.$border-color;\r\n margin-top: card-container.$border-width * -1;\r\n }\r\n\r\n .dso-card-grid {\r\n display: grid;\r\n gap: grid-variables.$grid-gutter-width;\r\n grid-auto-rows: 1fr;\r\n\r\n @media (max-width: media-query-breakpoints.$screen-sm-max) {\r\n grid-template-columns: repeat(1, 1fr);\r\n }\r\n\r\n @media (min-width: media-query-breakpoints.$screen-md-min) and (max-width: media-query-breakpoints.$screen-md-max) {\r\n grid-template-columns: repeat(2, 1fr);\r\n }\r\n\r\n @media (min-width: media-query-breakpoints.$screen-lg-min) {\r\n grid-template-columns: repeat(3, 1fr);\r\n }\r\n }\r\n}\r\n","import { h, Component, ComponentInterface, Fragment, Prop } from \"@stencil/core\";\r\nimport { CardContainerMode } from \"./card-container.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-card-container\",\r\n styleUrl: \"card-container.scss\",\r\n shadow: true,\r\n})\r\nexport class CardContainer implements ComponentInterface {\r\n /**\r\n * The mode of the Card Container.\r\n */\r\n @Prop({ reflect: true })\r\n mode: CardContainerMode = \"list\";\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.mode === \"list\" && (\r\n <ul class=\"dso-card-list\">\r\n <slot />\r\n </ul>\r\n )}\r\n {this.mode === \"grid\" && (\r\n <div class=\"dso-card-grid\">\r\n <slot />\r\n </div>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as clsx } from './clsx.
|
|
2
|
+
import { c as clsx } from './clsx.js';
|
|
3
3
|
import { i as isModifiedEvent } from './is-modified-event.js';
|
|
4
4
|
|
|
5
5
|
const isInteractiveElement = (element) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-card.js","mappings":";;;;AAAO,MAAM,oBAAoB,GAAG,CAAC,OAAoB;EACvD,QACE,OAAO,YAAY,iBAAiB;IACpC,OAAO,YAAY,iBAAiB;IACpC,OAAO,YAAY,gBAAgB;IACnC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,EAC3C;AACJ,CAAC;;ACPD,MAAM,OAAO,GAAG,gUAAgU;;MCanU,IAAI;;;;;;wBAQA,KAAK;oBAMT,KAAK;qBAMJ,IAAI;sBAQS,QAAQ;;EAQzB,iBAAiB,CAAC,CAAa;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;MACzD,OAAO;KACR;IAED,IAAI,OAAO,GAAuB,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AED,iBAAiB;IACf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC/E,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;GACvE;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IACH,KAAK,EAAE,IAAI,CAAC,EAAE,mBAAmB,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,EACrD,OAAO,EAAE,CAAC,CAAa,KAAK,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAErD,WAAK,KAAK,EAAC,qBAAqB,EAAC,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY,IACzD,YAAM,IAAI,EAAC,YAAY,GAAG,CACtB,EACN,WAAK,KAAK,EAAC,gBAAgB,EAAC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,IAChD,YAAM,IAAI,EAAC,OAAO,GAAG,CACjB,EACN,WAAK,KAAK,EAAC,kBAAkB,IAC3B,YAAM,IAAI,EAAC,SAAS,GAAG,EACvB,YAAM,IAAI,EAAC,cAAc,GAAG,CACxB,EACN,WAAK,KAAK,EAAC,kBAAkB,IAC3B,YAAM,IAAI,EAAC,SAAS,GAAG,CACnB,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/is-interactive-element.ts","src/components/card/card.scss?tag=dso-card&encapsulation=shadow","src/components/card/card.tsx"],"sourcesContent":["export const isInteractiveElement = (element: HTMLElement): boolean => {\r\n return (\r\n element instanceof HTMLButtonElement ||\r\n element instanceof HTMLAnchorElement ||\r\n element instanceof HTMLInputElement ||\r\n element.tagName.startsWith(\"DSO-TOGGLETIP\")\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/card\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n @include card.root();\r\n\r\n display: block;\r\n}\r\n","import { h, Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\nimport { isInteractiveElement } from \"../../utils/is-interactive-element\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { DsoCardClickedEvent, ImageShape } from \"./card.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-card\",\r\n styleUrl: \"card.scss\",\r\n shadow: true,\r\n})\r\nexport class Card implements ComponentInterface {\r\n @Element()\r\n host!: HTMLDsoCardElement;\r\n\r\n /**\r\n * Do not use, this is set programmatically by the component.\r\n */\r\n @Prop({ reflect: true })\r\n isSelectable = false;\r\n\r\n /**\r\n * Do not use, this is set programmatically by the component.\r\n */\r\n @Prop({ reflect: true })\r\n hasImage = false;\r\n\r\n /**\r\n * Whether or not the Card is clickable.\r\n */\r\n @Prop()\r\n clickable = true;\r\n\r\n /**\r\n * Presentation of image in header.\r\n * - \"normal\" (\"24 x 24\").\r\n * - \"wide\" (\"30 x 26\")\r\n */\r\n @Prop({ reflect: true })\r\n imageShape: ImageShape = \"normal\";\r\n\r\n /**\r\n * Emitted when the Card is clickable and the user clicked the Card.\r\n */\r\n @Event()\r\n dsoCardClicked!: EventEmitter<DsoCardClickedEvent>;\r\n\r\n private clickEventHandler(e: MouseEvent) {\r\n if (!(e.target instanceof HTMLElement) || !this.clickable) {\r\n return;\r\n }\r\n\r\n let element: HTMLElement | null = e.target;\r\n\r\n while (element !== this.host && element !== null) {\r\n if (isInteractiveElement(element) || element === null) {\r\n return;\r\n }\r\n\r\n if (element.parentNode instanceof ShadowRoot && element.parentNode.host instanceof HTMLElement) {\r\n element = element.parentNode.host;\r\n } else {\r\n element = element.parentElement;\r\n }\r\n }\r\n\r\n return this.dsoCardClicked.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });\r\n }\r\n\r\n componentWillLoad() {\r\n this.isSelectable = this.host.querySelector(\"*[slot = 'selectable']\") !== null;\r\n this.hasImage = this.host.querySelector(\"*[slot = 'image']\") !== null;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n class={clsx({ \"dso-not-clickable\": !this.clickable })}\r\n onClick={(e: MouseEvent) => this.clickEventHandler(e)}\r\n >\r\n <div class=\"dso-card-selectable\" hidden={!this.isSelectable}>\r\n <slot name=\"selectable\" />\r\n </div>\r\n <div class=\"dso-card-image\" hidden={!this.hasImage}>\r\n <slot name=\"image\" />\r\n </div>\r\n <div class=\"dso-card-heading\">\r\n <slot name=\"heading\" />\r\n <slot name=\"interactions\" />\r\n </div>\r\n <div class=\"dso-card-content\">\r\n <slot name=\"content\" />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -2,6 +2,7 @@ import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/
|
|
|
2
2
|
import { c as createIdentifier } from './create-identifier.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
4
|
|
|
5
|
+
// eslint-disable-next-line @stencil-community/ban-exported-const-enums -- This enum is not part of public API
|
|
5
6
|
var DaysOfWeek;
|
|
6
7
|
(function (DaysOfWeek) {
|
|
7
8
|
DaysOfWeek[DaysOfWeek["Sunday"] = 0] = "Sunday";
|