@dso-toolkit/core 99.0.0 → 99.2.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/bundle/dso-accordion-section.js +7 -7
- package/dist/bundle/dso-action-list-item.js +1 -1
- package/dist/bundle/dso-advanced-select.js +6 -6
- package/dist/bundle/dso-alert.js +1 -1
- package/dist/bundle/dso-annotation-activiteit.js +4 -4
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.js +4 -4
- package/dist/bundle/dso-annotation-kaart.js +2 -2
- package/dist/bundle/dso-annotation-locatie.js +1 -1
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.js +4 -4
- package/dist/bundle/dso-attachments-counter.js +1 -1
- package/dist/bundle/dso-autosuggest.js +33 -7
- package/dist/bundle/dso-badge.js +1 -1
- package/dist/bundle/dso-banner.js +1 -1
- package/dist/bundle/dso-card.js +1 -1
- package/dist/bundle/dso-contact-information.js +1 -1
- package/dist/bundle/dso-date-picker.js +1 -1
- package/dist/bundle/dso-document-card.js +1 -1
- package/dist/bundle/dso-document-component.js +1 -1
- package/dist/bundle/dso-dropdown-menu-group.js +1 -1
- package/dist/bundle/dso-dropdown-menu-item.js +2 -2
- package/dist/bundle/dso-dropdown-menu.js +20 -5
- package/dist/bundle/dso-expandable.js +1 -1
- package/dist/bundle/dso-header.js +21 -6
- package/dist/bundle/dso-highlight-box.js +1 -1
- package/dist/bundle/dso-history-item.js +2 -2
- package/dist/bundle/dso-icon-button.js +1 -1
- package/dist/bundle/dso-icon.js +1 -1
- package/dist/bundle/dso-image-overlay.js +1 -1
- package/dist/bundle/dso-info-button.js +1 -1
- package/dist/bundle/dso-info.js +1 -1
- package/dist/bundle/dso-input-range.js +2 -2
- package/dist/bundle/dso-label.js +1 -1
- package/dist/bundle/dso-legend-group.js +3 -3
- package/dist/bundle/dso-legend-item.js +6 -6
- package/dist/bundle/dso-legend.js +4 -4
- package/dist/bundle/dso-list-button.js +22 -14
- package/dist/bundle/dso-logo.js +1 -1
- package/dist/bundle/dso-map-base-layers.js +7 -7
- package/dist/bundle/dso-map-controls.js +4 -4
- package/dist/bundle/dso-map-layer-object.js +2 -2
- package/dist/bundle/dso-map-layer.js +2 -2
- package/dist/bundle/dso-map-message.js +3 -3
- package/dist/bundle/dso-map-overlays.js +7 -7
- package/dist/bundle/dso-mark-bar.js +3 -3
- package/dist/bundle/dso-modal.js +1 -1
- package/dist/bundle/dso-onboarding-tip.js +5 -5
- package/dist/bundle/dso-ozon-content-toggletip.js +1 -1
- package/dist/bundle/dso-ozon-content.js +1 -1
- package/dist/bundle/dso-pagination.js +2 -2
- package/dist/bundle/dso-panel.js +1 -1
- package/dist/bundle/dso-plekinfo-card.js +2 -2
- package/dist/bundle/dso-progress-indicator.js +1 -1
- package/dist/bundle/dso-project-item.js +4 -4
- package/dist/bundle/dso-responsive-element.js +1 -1
- package/dist/bundle/dso-scrollable.js +1 -1
- package/dist/bundle/dso-segmented-button.js +2 -2
- package/dist/bundle/dso-selectable.js +1 -1
- package/dist/bundle/dso-skiplink.js +2 -2
- package/dist/bundle/dso-slide-toggle.js +1 -1
- package/dist/bundle/dso-survey-rating.js +5 -5
- package/dist/bundle/dso-table.js +1 -1
- package/dist/bundle/dso-tabs.js +1 -1
- package/dist/bundle/dso-tijdreis-banner.js +2 -2
- package/dist/bundle/dso-tooltip.js +2 -2
- package/dist/bundle/dso-tree-view.js +3 -3
- package/dist/bundle/dso-viewer-grid.js +2 -2
- package/dist/bundle/dsot-document-component-demo.js +16 -16
- package/dist/bundle/{p-P8bro__O.js → p-BVpypRBU.js} +3 -3
- package/dist/bundle/{p-reu-eaRq.js → p-BXj3KQLr.js} +2 -2
- package/dist/bundle/{p-CWeAud7S.js → p-Bd4DueUA.js} +5 -5
- package/dist/bundle/{p-BLJDfYn6.js → p-BnDKmgzv.js} +12 -12
- package/dist/bundle/{p-Dp-4Dh4d.js → p-BnKQUOO3.js} +2 -2
- package/dist/bundle/{p-DllcFyEo.js → p-BuYJl3wN.js} +5 -2
- package/dist/bundle/{p-J9MFut03.js → p-Bw8_UiAv.js} +2 -2
- package/dist/bundle/{p-ByYAhz9G.js → p-CIKsNci_.js} +1 -1
- package/dist/bundle/{p-DkfyXO1_.js → p-CNgFbSIC.js} +1 -1
- package/dist/bundle/{p-RWOdH6CR.js → p-CXcA4DEL.js} +5 -5
- package/dist/bundle/{p-Dv5uebcx.js → p-Cc1GnE4g.js} +3 -3
- package/dist/bundle/{p-B2dzHUld.js → p-ClbMNMhN.js} +2 -2
- package/dist/bundle/{p-1_UAZ1k8.js → p-ClkjYPNB.js} +2 -2
- package/dist/bundle/{p-zRaH89Qj.js → p-CnCAM5gC.js} +1 -1
- package/dist/bundle/p-CpX0AJp6.js +161 -0
- package/dist/bundle/p-DLeHmqb5.js +83 -0
- package/dist/bundle/{p-BquLCiqR.js → p-DfXIH4Cr.js} +9 -9
- package/dist/bundle/{p-CCT77M-p.js → p-DjHplS8O.js} +4 -4
- package/dist/bundle/{p-BitwYWnu.js → p-DpwxsXR-.js} +1 -1
- package/dist/bundle/{p-DMMY0U7e.js → p-Du2uEAur.js} +1 -1
- package/dist/bundle/{p-DKxBVCbw.js → p-WTVvB0zs.js} +6 -6
- package/dist/bundle/{p--cUlQ7cz.js → p-hUKFzHir.js} +3 -3
- package/dist/bundle/{p-D-B4iPrZ.js → p-ryJKPQPH.js} +4 -4
- package/dist/bundle/{p-SQkUa7w3.js → p-y0R9QGf7.js} +5 -5
- package/dist/cjs/dso-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/dso-advanced-select.cjs.entry.js +1 -1
- package/dist/cjs/dso-alert_7.cjs.entry.js +6 -6
- package/dist/cjs/dso-attachments-counter_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-autosuggest.cjs.entry.js +29 -3
- package/dist/cjs/dso-contact-information.cjs.entry.js +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/dso-dropdown-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/dso-dropdown-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +11 -2
- package/dist/cjs/dso-header.cjs.entry.js +12 -3
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-history-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_3.cjs.entry.js +3 -3
- package/dist/cjs/dso-input-range.cjs.entry.js +2 -2
- package/dist/cjs/dso-label_3.cjs.entry.js +4 -4
- package/dist/cjs/dso-legend-group.cjs.entry.js +1 -1
- package/dist/cjs/dso-legend-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-legend.cjs.entry.js +1 -1
- package/dist/cjs/dso-list-button.cjs.entry.js +10 -2
- package/dist/cjs/dso-logo.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-layer-object.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-layer.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-message.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-mark-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +22 -2
- package/dist/cjs/dso-onboarding-tip.cjs.entry.js +2 -2
- package/dist/cjs/dso-plekinfo-card.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-project-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-responsive-element.cjs.entry.js +1 -1
- package/dist/cjs/dso-scrollable.cjs.entry.js +4 -2
- package/dist/cjs/dso-segmented-button.cjs.entry.js +2 -2
- package/dist/cjs/dso-skiplink.cjs.entry.js +1 -1
- package/dist/cjs/dso-survey-rating.cjs.entry.js +2 -2
- package/dist/cjs/dso-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dso-tijdreis-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/dso-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/components/accordion-section.css +1 -1
- package/dist/collection/components/advanced-select/advanced-select.css +1 -1
- package/dist/collection/components/alert/alert.css +1 -1
- package/dist/collection/components/autosuggest/autosuggest.css +2 -2
- package/dist/collection/components/autosuggest/autosuggest.js +34 -2
- package/dist/collection/components/contact-information/contact-information.css +1 -1
- package/dist/collection/components/date-picker/date-picker.css +2 -2
- package/dist/collection/components/dropdown-menu/dropdown-menu-group/dropdown-menu-group.js +1 -1
- package/dist/collection/components/dropdown-menu/dropdown-menu-item/dropdown-menu-item.js +1 -1
- package/dist/collection/components/dropdown-menu/dropdown-menu.css +2 -2
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +11 -2
- package/dist/collection/components/expandable/expandable.js +2 -2
- package/dist/collection/components/header/header.css +2 -2
- package/dist/collection/components/header/header.js +12 -3
- package/dist/collection/components/highlight-box/highlight-box.js +1 -1
- package/dist/collection/components/history-item/history-item.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/info/info.js +1 -1
- package/dist/collection/components/info-button/info-button.js +1 -1
- package/dist/collection/components/input-range/input-range.js +2 -2
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/legend/legend-group/legend-group.js +1 -1
- package/dist/collection/components/legend/legend-item/legend-item.js +1 -1
- package/dist/collection/components/legend/legend.js +1 -1
- package/dist/collection/components/list-button/list-button.css +1 -1
- package/dist/collection/components/list-button/list-button.js +15 -7
- package/dist/collection/components/logo/logo.js +1 -1
- package/dist/collection/components/map-base-layers/map-base-layers.js +1 -1
- package/dist/collection/components/map-controls/map-controls.js +1 -1
- package/dist/collection/components/map-layer/components/map-layer-object.js +1 -1
- package/dist/collection/components/map-layer/map-layer.js +1 -1
- package/dist/collection/components/map-message/map-message.js +2 -2
- package/dist/collection/components/map-overlays/map-overlays.js +1 -1
- package/dist/collection/components/mark-bar/mark-bar.js +1 -1
- package/dist/collection/components/modal/functional-components/body.js +4 -0
- package/dist/collection/components/modal/functional-components/footer.js +4 -0
- package/dist/collection/components/modal/functional-components/header.js +4 -0
- package/dist/collection/components/modal/modal.css +17 -4
- package/dist/collection/components/modal/modal.js +15 -3
- package/dist/collection/components/onboarding-tip/onboarding-tip.css +1 -1
- package/dist/collection/components/onboarding-tip/onboarding-tip.js +1 -1
- package/dist/collection/components/ozon-content/components/ozon-content-toggletip/ozon-content-toggletip.js +1 -1
- package/dist/collection/components/ozon-content/ozon-content.css +6 -6
- package/dist/collection/components/ozon-content/ozon-content.js +1 -1
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/plekinfo-card/plekinfo-card.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
- package/dist/collection/components/project-item/project-item.js +1 -1
- package/dist/collection/components/responsive-element/responsive-element.js +1 -1
- package/dist/collection/components/scrollable/scrollable.js +31 -2
- package/dist/collection/components/segmented-button/segmented-button.css +1 -1
- package/dist/collection/components/segmented-button/segmented-button.js +1 -1
- package/dist/collection/components/selectable/selectable.js +1 -1
- package/dist/collection/components/skiplink/skiplink.js +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.css +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.js +1 -1
- package/dist/collection/components/survey-rating/survey-rating.js +2 -2
- package/dist/collection/components/table/table.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tijdreis-banner/tijdreis-banner.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +2 -2
- package/dist/components/alert.js +1 -1
- package/dist/components/dso-accordion-section.js +1 -1
- package/dist/components/dso-advanced-select.js +1 -1
- package/dist/components/dso-autosuggest.js +1 -1
- package/dist/components/dso-contact-information.js +1 -1
- package/dist/components/dso-date-picker.js +1 -1
- package/dist/components/dso-dropdown-menu-group.js +1 -1
- package/dist/components/dso-dropdown-menu-item.js +1 -1
- package/dist/components/dso-dropdown-menu.js +1 -1
- package/dist/components/dso-header.js +1 -1
- package/dist/components/dso-highlight-box.js +1 -1
- package/dist/components/dso-history-item.js +1 -1
- package/dist/components/dso-input-range.js +1 -1
- package/dist/components/dso-legend-group.js +1 -1
- package/dist/components/dso-legend-item.js +1 -1
- package/dist/components/dso-legend.js +1 -1
- package/dist/components/dso-list-button.js +1 -1
- package/dist/components/dso-logo.js +1 -1
- package/dist/components/dso-map-base-layers.js +1 -1
- package/dist/components/dso-map-controls.js +1 -1
- package/dist/components/dso-map-layer-object.js +1 -1
- package/dist/components/dso-map-layer.js +1 -1
- package/dist/components/dso-map-message.js +1 -1
- package/dist/components/dso-map-overlays.js +1 -1
- package/dist/components/dso-mark-bar.js +1 -1
- package/dist/components/dso-onboarding-tip.js +1 -1
- package/dist/components/dso-plekinfo-card.js +1 -1
- package/dist/components/dso-project-item.js +1 -1
- package/dist/components/dso-segmented-button.js +1 -1
- package/dist/components/dso-skiplink.js +1 -1
- package/dist/components/dso-survey-rating.js +1 -1
- package/dist/components/dso-tabs.js +1 -1
- package/dist/components/dso-tijdreis-banner.js +1 -1
- package/dist/components/dso-tooltip.js +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/expandable.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/info-button.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/ozon-content-toggletip.js +1 -1
- package/dist/components/ozon-content.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/progress-indicator.js +1 -1
- package/dist/components/responsive-element.js +1 -1
- package/dist/components/scrollable.js +1 -1
- package/dist/components/selectable.js +1 -1
- package/dist/components/slide-toggle.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-4d4aec48.entry.js → p-09fee564.entry.js} +1 -1
- package/dist/dso-toolkit/{p-ae83402c.entry.js → p-0d4ea549.entry.js} +1 -1
- package/dist/dso-toolkit/{p-0004b1ea.entry.js → p-14c079e3.entry.js} +1 -1
- package/dist/dso-toolkit/p-1bfcb6a3.entry.js +1 -0
- package/dist/dso-toolkit/{p-4e13b5ac.entry.js → p-1cf76eb8.entry.js} +1 -1
- package/dist/dso-toolkit/p-1d2e543a.entry.js +1 -0
- package/dist/dso-toolkit/p-28d7d4f2.entry.js +1 -0
- package/dist/dso-toolkit/{p-86409b6e.entry.js → p-2ac35007.entry.js} +1 -1
- package/dist/dso-toolkit/p-39146a21.entry.js +1 -0
- package/dist/dso-toolkit/{p-67f0dbce.entry.js → p-3959d0b8.entry.js} +1 -1
- package/dist/dso-toolkit/{p-6c9e92db.entry.js → p-3a37e36a.entry.js} +1 -1
- package/dist/dso-toolkit/{p-d6c8285e.entry.js → p-3b620a1f.entry.js} +1 -1
- package/dist/dso-toolkit/{p-e49dfe55.entry.js → p-3d1b5a25.entry.js} +1 -1
- package/dist/dso-toolkit/p-3f6ddf06.entry.js +1 -0
- package/dist/dso-toolkit/{p-04e15a21.entry.js → p-40d5fc69.entry.js} +1 -1
- package/dist/dso-toolkit/{p-515149ae.entry.js → p-415db2f9.entry.js} +1 -1
- package/dist/dso-toolkit/{p-f2a5beef.entry.js → p-47ec99e5.entry.js} +1 -1
- package/dist/dso-toolkit/p-4de1556f.entry.js +1 -0
- package/dist/dso-toolkit/{p-cfe03a4b.entry.js → p-5fee14bc.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a624c0bd.entry.js → p-63b6ebe0.entry.js} +1 -1
- package/dist/dso-toolkit/{p-5616a8f0.entry.js → p-669d8774.entry.js} +1 -1
- package/dist/dso-toolkit/p-6bec3683.entry.js +1 -0
- package/dist/dso-toolkit/{p-b5814f08.entry.js → p-77193722.entry.js} +1 -1
- package/dist/dso-toolkit/p-7f592a1e.entry.js +1 -0
- package/dist/dso-toolkit/{p-5aedbfdc.entry.js → p-8c52725c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-1f48029c.entry.js → p-929ef098.entry.js} +1 -1
- package/dist/dso-toolkit/{p-5d7bb03d.entry.js → p-9330b7e6.entry.js} +1 -1
- package/dist/dso-toolkit/{p-291178f9.entry.js → p-a44332f4.entry.js} +1 -1
- package/dist/dso-toolkit/p-b2cf776e.entry.js +1 -0
- package/dist/dso-toolkit/{p-2f2a920f.entry.js → p-b32fac41.entry.js} +1 -1
- package/dist/dso-toolkit/{p-b8abe5a1.entry.js → p-c56e654d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-9e4f0727.entry.js → p-c97cf9f6.entry.js} +1 -1
- package/dist/dso-toolkit/{p-24d0df16.entry.js → p-cceb2ce1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-77b3e172.entry.js → p-d2a0c83c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-47c02ca5.entry.js → p-d728026a.entry.js} +1 -1
- package/dist/dso-toolkit/{p-eceaf04c.entry.js → p-e452dd0a.entry.js} +1 -1
- package/dist/dso-toolkit/{p-9d3dcb86.entry.js → p-ec9dac3d.entry.js} +1 -1
- package/dist/dso-toolkit/p-f2a9cf31.entry.js +1 -0
- package/dist/dso-toolkit/{p-2a4068d9.entry.js → p-f8d2c3d6.entry.js} +1 -1
- package/dist/dso-toolkit/{p-f1bc1d9a.entry.js → p-f8ed1a64.entry.js} +1 -1
- package/dist/dso-toolkit/p-f9275008.entry.js +1 -0
- package/dist/dso-toolkit/{p-0d59b59a.entry.js → p-fa490d62.entry.js} +1 -1
- package/dist/dso-toolkit/p-fbe4aa66.entry.js +1 -0
- package/dist/dso-toolkit/{p-b2290d21.entry.js → p-fcab1797.entry.js} +1 -1
- package/dist/dso-toolkit/{p-4ae8cc81.entry.js → p-ffc60fb8.entry.js} +1 -1
- package/dist/esm/dso-accordion-section.entry.js +1 -1
- package/dist/esm/dso-advanced-select.entry.js +1 -1
- package/dist/esm/dso-alert_7.entry.js +6 -6
- package/dist/esm/dso-attachments-counter_2.entry.js +2 -2
- package/dist/esm/dso-autosuggest.entry.js +29 -3
- package/dist/esm/dso-contact-information.entry.js +1 -1
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu-group.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu-item.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +12 -3
- package/dist/esm/dso-header.entry.js +13 -4
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-history-item.entry.js +1 -1
- package/dist/esm/dso-icon-button.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-info_3.entry.js +3 -3
- package/dist/esm/dso-input-range.entry.js +2 -2
- package/dist/esm/dso-label_3.entry.js +4 -4
- package/dist/esm/dso-legend-group.entry.js +1 -1
- package/dist/esm/dso-legend-item.entry.js +1 -1
- package/dist/esm/dso-legend.entry.js +1 -1
- package/dist/esm/dso-list-button.entry.js +10 -2
- package/dist/esm/dso-logo.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-layer-object.entry.js +1 -1
- package/dist/esm/dso-map-layer.entry.js +1 -1
- package/dist/esm/dso-map-message.entry.js +2 -2
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-mark-bar.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +23 -3
- package/dist/esm/dso-onboarding-tip.entry.js +2 -2
- package/dist/esm/dso-plekinfo-card.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-project-item.entry.js +1 -1
- package/dist/esm/dso-responsive-element.entry.js +1 -1
- package/dist/esm/dso-scrollable.entry.js +4 -2
- package/dist/esm/dso-segmented-button.entry.js +2 -2
- package/dist/esm/dso-skiplink.entry.js +1 -1
- package/dist/esm/dso-survey-rating.entry.js +2 -2
- package/dist/esm/dso-tabs.entry.js +1 -1
- package/dist/esm/dso-tijdreis-banner.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +2 -2
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/autosuggest/autosuggest.d.ts +2 -0
- package/dist/types/components/list-button/list-button.d.ts +2 -0
- package/dist/types/components/modal/functional-components/body.d.ts +2 -0
- package/dist/types/components/modal/functional-components/footer.d.ts +2 -0
- package/dist/types/components/modal/functional-components/header.d.ts +10 -0
- package/dist/types/components/modal/modal.d.ts +5 -0
- package/dist/types/components/scrollable/scrollable.d.ts +2 -0
- package/dist/types/components.d.ts +8 -1
- package/package.json +4 -4
- package/dist/bundle/p-SOcTMGt_.js +0 -140
- package/dist/bundle/p-qW59SYSp.js +0 -83
- package/dist/dso-toolkit/p-096d178a.entry.js +0 -1
- package/dist/dso-toolkit/p-0c7c446c.entry.js +0 -1
- package/dist/dso-toolkit/p-29077405.entry.js +0 -1
- package/dist/dso-toolkit/p-2a4fd631.entry.js +0 -1
- package/dist/dso-toolkit/p-2d2476dd.entry.js +0 -1
- package/dist/dso-toolkit/p-30c4f332.entry.js +0 -1
- package/dist/dso-toolkit/p-62e887fc.entry.js +0 -1
- package/dist/dso-toolkit/p-790477bb.entry.js +0 -1
- package/dist/dso-toolkit/p-7cd2b1be.entry.js +0 -1
- package/dist/dso-toolkit/p-9d41e3f8.entry.js +0 -1
- package/dist/dso-toolkit/p-ab857666.entry.js +0 -1
- package/dist/dso-toolkit/p-dfc4deeb.entry.js +0 -1
|
@@ -2,4 +2,4 @@ import{proxyCustomElement as o,HTMLElement as r,createEvent as t,h as n,transfor
|
|
|
2
2
|
/*!
|
|
3
3
|
* focus-trap 8.2.2
|
|
4
4
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
5
|
-
*/function p(o,r){(null==r||r>o.length)&&(r=o.length);for(var t=0,n=Array(r);t<r;t++)n[t]=o[t];return n}function g(o,r){var t="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=w(o))||r){t&&(o=t);var n=0,e=function(){};return{s:e,n:function(){return n>=o.length?{done:!0}:{done:!1,value:o[n++]}},e:function(o){throw o},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){t=t.call(o)},n:function(){var o=t.next();return a=o.done,o},e:function(o){c=!0,i=o},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw i}}}}function h(o,r,t){return(r=function(o){var r=function(o,r){if("object"!=typeof o||!o)return o;var t=o[Symbol.toPrimitive];if(void 0!==t){var n=t.call(o,r);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return o+""}(o,"string");return"symbol"==typeof r?r:r+""}(r))in o?Object.defineProperty(o,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[r]=t,o}function k(o,r){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),t.push.apply(t,n)}return t}function m(o){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?k(Object(t),!0).forEach((function(r){h(o,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))}))}return o}function w(o,r){if(o){if("string"==typeof o)return p(o,r);var t={}.toString.call(o).slice(8,-1);return"Object"===t&&o.constructor&&(t=o.constructor.name),"Map"===t||"Set"===t?Array.from(o):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p(o,r):void 0}}var x={getActiveTrap:function(o){return(null==o?void 0:o.length)>0?o[o.length-1]:null},activateTrap:function(o,r){r!==x.getActiveTrap(o)&&x.pauseTrap(o);var t=o.indexOf(r);-1===t||o.splice(t,1),o.push(r)},deactivateTrap:function(o,r){var t=o.indexOf(r);-1!==t&&o.splice(t,1),x.unpauseTrap(o)},pauseTrap:function(o){var r=x.getActiveTrap(o);null==r||r._setPausedState(!0)},unpauseTrap:function(o){var r=x.getActiveTrap(o);r&&!r._isManuallyPaused()&&r._setPausedState(!1)}},z=function(o){return"Tab"===(null==o?void 0:o.key)||9===(null==o?void 0:o.keyCode)},C=function(o){return z(o)&&!o.shiftKey},j=function(o){return z(o)&&o.shiftKey},E=function(o){return setTimeout(o,0)},F=function(o){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return"function"==typeof o?o.apply(void 0,t):o},S=function(o){return o.target.shadowRoot&&"function"==typeof o.composedPath?o.composedPath()[0]:o.target},T=[],O=function(o,r){var t,n=(null==r?void 0:r.document)||document,e=(null==r?void 0:r.trapStack)||T,i=m({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:C,isKeyBackward:j},r),u={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b=function(o,r,t){return o&&void 0!==o[r]?o[r]:i[t||r]},f=function(o,r){var t="function"==typeof(null==r?void 0:r.composedPath)?r.composedPath():void 0;return u.containerGroups.findIndex((function(r){var n=r.container,e=r.tabbableNodes;return n.contains(o)||(null==t?void 0:t.includes(n))||e.find((function(r){return r===o}))}))},v=function(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.hasFallback,e=void 0!==t&&t,a=r.params,c=i[o];if("function"==typeof c&&(c=c.apply(void 0,function(o){return function(o){if(Array.isArray(o))return p(o)}(o)||function(o){if("undefined"!=typeof Symbol&&null!=o[Symbol.iterator]||null!=o["@@iterator"])return Array.from(o)}(o)||w(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(void 0===a?[]:a))),!0===c&&(c=void 0),!c){if(void 0===c||!1===c)return c;throw Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var d=c;if("string"==typeof c){try{d=n.querySelector(c)}catch(r){throw Error("`".concat(o,'` appears to be an invalid selector; error="').concat(r.message,'"'))}if(!d&&!e)throw Error("`".concat(o,"` as selector refers to no known node"))}return d},_=function(o){var r=o.activeElement;return r?r.shadowRoot&&null!==r.shadowRoot.activeElement?_(r.shadowRoot):r:null},y=function(){var o=v("initialFocus",{hasFallback:!0});if(!1===o)return!1;if(void 0===o||o&&!l(o,i.tabbableOptions)){var r=_(n);if(f(r)>=0)o=r;else{var t=u.tabbableGroups[0];o=t&&t.firstTabbableNode||v("fallbackFocus")}}else null===o&&(o=v("fallbackFocus"));if(!o)throw Error("Your focus-trap needs to have at least one focusable element");return o},h=function(){if(u.containerGroups=u.containers.map((function(o){var r=a(o,i.tabbableOptions),t=c(o,i.tabbableOptions),n=r.length>0?r[0]:void 0,e=r.length>0?r[r.length-1]:void 0,l=t.find((function(o){return d(o)})),u=t.slice().reverse().find((function(o){return d(o)})),b=!!r.find((function(o){return s(o)>0}));return{container:o,tabbableNodes:r,focusableNodes:t,posTabIndexesFound:b,firstTabbableNode:n,lastTabbableNode:e,firstDomTabbableNode:l,lastDomTabbableNode:u,nextTabbableNode:function(o){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=r.indexOf(o);return e<0?n?t.slice(t.indexOf(o)+1).find((function(o){return d(o)})):t.slice(0,t.indexOf(o)).reverse().find((function(o){return d(o)})):r[e+(n?1:-1)]}}})),u.tabbableGroups=u.containerGroups.filter((function(o){return o.tabbableNodes.length>0})),u.tabbableGroups.length<=0&&!v("fallbackFocus"))throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(u.containerGroups.find((function(o){return o.posTabIndexesFound}))&&u.containerGroups.length>1)throw Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},k=function(o){!1!==o&&o!==_(document)&&(o&&o.focus?(o.focus({preventScroll:!!i.preventScroll}),u.mostRecentlyFocusedNode=o,function(o){return o.tagName&&"input"===o.tagName.toLowerCase()&&"function"==typeof o.select}(o)&&o.select()):k(y()))},O=function(o){var r=v("setReturnFocus",{params:[o]});return r||!1!==r&&o},A=function(o){var r=o.target,t=o.event,n=o.isBackward,e=void 0!==n&&n;r=r||S(t),h();var a=null;if(u.tabbableGroups.length>0){var c=f(r,t),b=c>=0?u.containerGroups[c]:void 0;if(c<0)a=e?u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:u.tabbableGroups[0].firstTabbableNode;else if(e){var _=u.tabbableGroups.findIndex((function(o){return r===o.firstTabbableNode}));if(_<0&&(b.container===r||l(r,i.tabbableOptions)&&!d(r,i.tabbableOptions)&&!b.nextTabbableNode(r,!1))&&(_=c),_>=0){var y=u.tabbableGroups[0===_?u.tabbableGroups.length-1:_-1];a=s(r)>=0?y.lastTabbableNode:y.lastDomTabbableNode}else z(t)||(a=b.nextTabbableNode(r,!1))}else{var p=u.tabbableGroups.findIndex((function(o){return r===o.lastTabbableNode}));if(p<0&&(b.container===r||l(r,i.tabbableOptions)&&!d(r,i.tabbableOptions)&&!b.nextTabbableNode(r))&&(p=c),p>=0){var g=u.tabbableGroups[p===u.tabbableGroups.length-1?0:p+1];a=s(r)>=0?g.firstTabbableNode:g.firstDomTabbableNode}else z(t)||(a=b.nextTabbableNode(r))}}else a=v("fallbackFocus");return a},D=function(o){var r=S(o);f(r,o)>=0||(F(i.clickOutsideDeactivates,o)?t.deactivate({returnFocus:i.returnFocusOnDeactivate}):F(i.allowOutsideClick,o)||o.preventDefault())},R=function(o){var r=S(o),t=f(r,o)>=0;if(t||r instanceof Document)t&&(u.mostRecentlyFocusedNode=r);else{var n;o.stopImmediatePropagation();var e=!0;if(u.mostRecentlyFocusedNode)if(s(u.mostRecentlyFocusedNode)>0){var a=f(u.mostRecentlyFocusedNode),c=u.containerGroups[a].tabbableNodes;if(c.length>0){var d=c.findIndex((function(o){return o===u.mostRecentlyFocusedNode}));d>=0&&(i.isKeyForward(u.recentNavEvent)?d+1<c.length&&(n=c[d+1],e=!1):d-1>=0&&(n=c[d-1],e=!1))}}else u.containerGroups.some((function(o){return o.tabbableNodes.some((function(o){return s(o)>0}))}))||(e=!1);else e=!1;e&&(n=A({target:u.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(u.recentNavEvent)})),k(n||u.mostRecentlyFocusedNode||y())}u.recentNavEvent=void 0},P=function(o){(i.isKeyForward(o)||i.isKeyBackward(o))&&function(o){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u.recentNavEvent=o;var t=A({event:o,isBackward:r});t&&(z(o)&&o.preventDefault(),k(t))}(o,i.isKeyBackward(o))},I=function(o){(function(o){return"Escape"===(null==o?void 0:o.key)||"Esc"===(null==o?void 0:o.key)||27===(null==o?void 0:o.keyCode)})(o)&&!1!==F(i.escapeDeactivates,o)&&(o.preventDefault(),t.deactivate())},N=function(o){var r=S(o);f(r,o)>=0||F(i.clickOutsideDeactivates,o)||F(i.allowOutsideClick,o)||(o.preventDefault(),o.stopImmediatePropagation())},B=function(){var o;if(u.active)return x.activateTrap(e,t),i.delayInitialFocus?o=new Promise((function(o){u.delayInitialFocusTimer=E((function(){k(y()),o()}))})):k(y()),n.addEventListener("focusin",R,!0),n.addEventListener("mousedown",D,{capture:!0,passive:!1}),n.addEventListener("touchstart",D,{capture:!0,passive:!1}),n.addEventListener("click",N,{capture:!0,passive:!1}),n.addEventListener("keydown",P,{capture:!0,passive:!1}),n.addEventListener("keydown",I),o},M=function(){if(u.active)return n.removeEventListener("focusin",R,!0),n.removeEventListener("mousedown",D,!0),n.removeEventListener("touchstart",D,!0),n.removeEventListener("click",N,!0),n.removeEventListener("keydown",P,!0),n.removeEventListener("keydown",I),t},H="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(o){var r=u.mostRecentlyFocusedNode;if(r&&o.some((function(o){return Array.from(o.removedNodes).some((function(o){return o===r||"function"==typeof o.contains&&o.contains(r)}))}))&&u.containers.some((function(o){return null==o?void 0:o.isConnected}))){h();var t=y();k(t)}})):void 0,U=function(){H&&(H.disconnect(),u.active&&!u.paused&&u.containers.map((function(o){H.observe(o,{subtree:!0,childList:!0})})))};return Object.defineProperties(t={get active(){return u.active},get paused(){return u.paused},activate:function(o){if(u.active)return this;var r,i=b(o,"onActivate"),a=b(o,"onPostActivate"),c=b(o,"checkCanFocusTrap"),d=x.getActiveTrap(e),s=!1;d&&!d.paused&&(null===(r=d._setSubtreeIsolation)||void 0===r||r.call(d,!1),s=!0);try{c||h(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=_(n),null==i||i({trap:t});var l=function(){c&&h();var o=function(){t._setSubtreeIsolation(!0),U(),null==a||a({trap:t})},r=B();r?r.then(o):o()};if(c)return c(u.containers.concat()).then(l,l),this;l()}catch(o){var f;throw d===x.getActiveTrap(e)&&s&&(null===(f=d._setSubtreeIsolation)||void 0===f||f.call(d,!0)),o}return this},deactivate:function(o){if(!u.active)return this;var r=m({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},o);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,u.paused||t._setSubtreeIsolation(!1),u.alreadySilent.clear(),M(),u.active=!1,u.paused=!1,U(),x.deactivateTrap(e,t);var n=b(r,"onDeactivate"),a=b(r,"onPostDeactivate"),c=b(r,"checkCanReturnFocus"),d=b(r,"delayReturnFocus"),s=b(r,"returnFocus","returnFocusOnDeactivate");null==n||n({trap:t});var l=function(){s&&k(O(u.nodeFocusedBeforeActivation)),null==a||a({trap:t})},f=function(){d&&s?E(l):l()};return s&&c?(c(O(u.nodeFocusedBeforeActivation)).then(f,f),this):(f(),this)},pause:function(o){return u.active?(u.manuallyPaused=!0,this._setPausedState(!0,o)):this},unpause:function(o){return u.active?(u.manuallyPaused=!1,e[e.length-1]!==this?this:this._setPausedState(!1,o)):this},updateContainerElements:function(o){var r=[].concat(o).filter(Boolean);return u.containers=r.map((function(o){return"string"==typeof o?n.querySelector(o):o})),i.isolateSubtrees&&function(o){u.active&&!u.paused&&t._setSubtreeIsolation(!1),u.adjacentElements.clear(),u.alreadySilent.clear();var r,n=new Set,e=new Set,i=g(o);try{for(i.s();!(r=i.n()).done;){var a=r.value;n.add(a);for(var c="undefined"!=typeof ShadowRoot&&a.getRootNode()instanceof ShadowRoot,d=a;d;){n.add(d);var s=d.parentElement,l=[];s?l=s.children:!s&&c&&(l=d.getRootNode().children,s=d.getRootNode().host,c="undefined"!=typeof ShadowRoot&&s.getRootNode()instanceof ShadowRoot);var b,f=g(l);try{for(f.s();!(b=f.n()).done;)e.add(b.value)}catch(o){f.e(o)}finally{f.f()}d=s}}}catch(o){i.e(o)}finally{i.f()}n.forEach((function(o){e.delete(o)})),u.adjacentElements=e}(u.containers),u.active&&(h(),u.paused||t._setSubtreeIsolation(!0)),U(),this}},{_isManuallyPaused:{value:function(){return u.manuallyPaused}},_setPausedState:{value:function(o,r){if(u.paused===o)return this;if(u.paused=o,o){var n=b(r,"onPause"),e=b(r,"onPostPause");null==n||n({trap:t}),M(),t._setSubtreeIsolation(!1),U(),null==e||e({trap:t})}else{var i=b(r,"onUnpause"),a=b(r,"onPostUnpause");null==i||i({trap:t}),function(){h();var o=function(){t._setSubtreeIsolation(!0),U(),null==a||a({trap:t})},r=B();r?r.then(o):o()}()}return this}},_setSubtreeIsolation:{value:function(o){i.isolateSubtrees&&u.adjacentElements.forEach((function(r){var t;o?"aria-hidden"===i.isolateSubtrees?("true"!==r.ariaHidden&&"true"!==(null===(t=r.getAttribute("aria-hidden"))||void 0===t?void 0:t.toLowerCase())||u.alreadySilent.add(r),r.setAttribute("aria-hidden","true")):((r.inert||r.hasAttribute("inert"))&&u.alreadySilent.add(r),r.setAttribute("inert",!0)):u.alreadySilent.has(r)||r.removeAttribute("aria-hidden"===i.isolateSubtrees?"aria-hidden":"inert")}))}}}),t.updateContainerElements(o),t};const A=o(class extends r{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.dsoChange=t(this,"dsoChange",3),this.dsoRedirect=t(this,"dsoRedirect",3),this.options=[],this.open=!1,this.toggleOpen=()=>{this.open=!this.open},this.handleOptionClick=(o,r)=>{this.dsoChange.emit({originalEvent:o,option:r}),this.open=!1},this.handleRedirectClick=(o,r)=>{this.dsoRedirect.emit({originalEvent:o,isModifiedEvent:u(o),redirect:r}),this.open=!1}}keyDownListener(o){this.open&&"ArrowUp"===o.key?(o.preventDefault(),this.handleTab(-1)):this.open&&"ArrowDown"===o.key&&(o.preventDefault(),this.handleTab(1))}componentDidRender(){this.open&&!this.trap?this.createTrap():!this.open&&this.trap&&this.removeTrap()}createTrap(){this.trap=O(this.host,{clickOutsideDeactivates:!0,escapeDeactivates:!0,setReturnFocus:this.toggleButtonElementRef,tabbableOptions:{getShadowRoot:!0},onDeactivate:()=>{this.open=!1}}).activate()}removeTrap(){this.trap?.deactivate(),delete this.trap}handleTab(o){const r=this.host.isConnected?a(this.host,{getShadowRoot:!0}):[];let t=r.findIndex((o=>o===this.host.shadowRoot?.activeElement))+o;t>=r.length?t=0:t<0&&(t=r.length-1),r[t]?.focus()}render(){return n("div",{key:"baa345ec80fab193203b4cc0089bcf15e722e1d7",class:"advanced-select"},n("div",{key:"2b756e8a6acac2a0cba272458d2eebcf233d23c7",class:"advanced-select-button"},n("button",{key:"bef9e0df9f7f987c087e70cc2cfe3ed37ea380d4","aria-expanded":""+this.open,class:i(["active-option",{open:this.open}]),type:"button",onClick:this.toggleOpen,ref:o=>this.toggleButtonElementRef=o},n(P,{key:"d98471d2b70ec39d03640710952cdf7407a987ab",active:this.active,options:this.options}),n("span",{key:"cc7d2205e809006270b3d4a57350c0667afdf5ed",class:"active-option-label"},this.active?.label??"Selecteer een optie"),n("span",{key:"4cea91a7355bff2d47729b7d9cd9897c4452f05c",class:"active-option-aside"},n("dso-icon",{key:"24b65f054ecfdd52778b714dea4465a3260c1fd5",icon:"caret-down"}))),this.open&&n("div",{key:"1e568894fa99fab59032cc42b1da3e6057ec8857",class:"groups-container"},n("ul",{key:"c62eccf234376aca58bd061e4aec6e1b781de760",class:"groups"},this.options.map((o=>"options"in o&&n("li",{class:i(["group",{["group-"+o.variant]:!!o.variant}])},n("p",{class:"group-label"},o.label),n("ul",{class:"options"},o.options.map((o=>n("li",null,n(D,{option:o,active:this.active,activeHint:this.activeHint,callback:this.handleOptionClick}))))),o.redirect&&n(R,{redirect:o.redirect,callback:this.handleRedirectClick}))||"placeholder"in o&&n("li",{class:"group"},n("p",{class:"group-label"},o.label),n("p",{class:"placeholder"},o.placeholder),o.redirect&&n(R,{redirect:o.redirect,callback:this.handleRedirectClick}))||n("li",null,n(D,{option:o,active:this.active,activeHint:this.activeHint,callback:this.handleOptionClick}))))))),this.options.some((o=>"summaryCounter"in o&&o?.summaryCounter))&&n("span",{key:"804d44077fde0d0b4f9c576f47780208cf51ba13",class:"badges"},this.options.filter((o=>"options"in o&&"summaryCounter"in o&&!!o?.summaryCounter)).map((o=>n("dso-badge",{status:o.variant??"outline",label:"Toon toelichting voor "+o.label.toLowerCase()},o.options.length,n("div",{slot:"toggletip"},o.toggletip))))))}static get delegatesFocus(){return!0}get host(){return this}static get style(){return':host{display:block}*,*::after,*::before{box-sizing:border-box}.advanced-select{display:flex;flex-direction:row}.advanced-select-button{flex:1;min-inline-size:0}.active-option{color:inherit;display:flex;inline-size:100%;justify-content:flex-start;align-items:center;padding:0;border:1px solid #275937;border-radius:4px;cursor:pointer;background-color:#fff;line-height:inherit;font-family:inherit;font-size:inherit}.active-option.open{border-radius:4px 4px 0 0}.active-option dso-icon{color:#275937}.active-option dso-label{margin-inline-start:8px}.active-option-label{padding-block:4px;padding-inline:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.active-option-aside{padding-inline:8px;margin-inline-start:auto}.badges{display:flex;justify-content:space-between;align-items:center;gap:4px;padding-inline-start:4px}.groups-container{position:relative;z-index:200}.groups{position:absolute;inset-block-start:-1px;inset-inline-start:0;inline-size:100%;max-block-size:500px;margin:0;padding:0;overflow-y:auto;background-color:#fff;border:1px solid #275937;border-radius:0 0 4px 4px}.groups li::marker{display:none}.group{border-block-end:1px solid #ccc}.group:last-child{border-block-end:none}.group .option{padding-inline-start:37px}.group .option-label::before{content:"";position:absolute;display:block;block-size:10px;inline-size:10px;inset-block:4px auto;inset-inline:-20px auto;border-radius:50%;--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-zwart);--_dso-link-extern-icon:var(--_dso-di-external-link-zwart);--_dso-link-phone-icon:var(--_dso-di-call-zwart);--_dso-link-mail-icon:var(--_dso-di-mail-outline-zwart);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-zwart);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:#1f472c;--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:#275937;--_dso-icon-button-secondary-toggled-hover-background-color:#1b3e27;--_dso-icon-button-tertiary-color:#191919;--_dso-icon-button-tertiary-hover-color:#4c4c4c;--_dso-icon-button-tertiary-active-color:#1f472c;--_dso-icon-button-tertiary-toggled-color:#275937;--_dso-icon-button-tertiary-toggled-hover-color:#1b3e27;--_dso-icon-button-tertiary-disabled-color:#999;--_dso-button-tertiary-download-icon:var(--_dso-di-download-zwart);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-zwart);--_dso-button-tertiary-color:#191919;--_dso-button-tertiary-hover-color:#4c4c4c;--_dso-button-tertiary-active-color:#173521;--_dso-button-tertiary-disabled-color:#999;background-color:#ccc;color:#191919}.group-label{margin:0;padding-block:4px;padding-inline:16px;color:#666;font-size:14px;font-weight:500;border-block-end:1px solid #ccc}.group-link{display:block;padding-block:8px;padding-inline:4px;text-align:end;color:#000;text-decoration:none}.group-link:hover{text-decoration:underline}.group-link dso-icon{color:#39870c}.group-info .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-zwart);--_dso-link-extern-icon:var(--_dso-di-external-link-zwart);--_dso-link-phone-icon:var(--_dso-di-call-zwart);--_dso-link-mail-icon:var(--_dso-di-mail-outline-zwart);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-zwart);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:#1f472c;--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:#275937;--_dso-icon-button-secondary-toggled-hover-background-color:#1b3e27;--_dso-icon-button-tertiary-color:#191919;--_dso-icon-button-tertiary-hover-color:#4c4c4c;--_dso-icon-button-tertiary-active-color:#1f472c;--_dso-icon-button-tertiary-toggled-color:#275937;--_dso-icon-button-tertiary-toggled-hover-color:#1b3e27;--_dso-icon-button-tertiary-disabled-color:#999;--_dso-button-tertiary-download-icon:var(--_dso-di-download-zwart);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-zwart);--_dso-button-tertiary-color:#191919;--_dso-button-tertiary-hover-color:#4c4c4c;--_dso-button-tertiary-active-color:#173521;--_dso-button-tertiary-disabled-color:#999;background-color:#6ca4d9;color:#191919}.group-primary .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#275937;color:#fff}.group-success .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#39870c;color:#fff}.group-warning .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-zwart);--_dso-link-extern-icon:var(--_dso-di-external-link-zwart);--_dso-link-phone-icon:var(--_dso-di-call-zwart);--_dso-link-mail-icon:var(--_dso-di-mail-outline-zwart);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-zwart);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:#1f472c;--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:#275937;--_dso-icon-button-secondary-toggled-hover-background-color:#1b3e27;--_dso-icon-button-tertiary-color:#191919;--_dso-icon-button-tertiary-hover-color:#4c4c4c;--_dso-icon-button-tertiary-active-color:#1f472c;--_dso-icon-button-tertiary-toggled-color:#275937;--_dso-icon-button-tertiary-toggled-hover-color:#1b3e27;--_dso-icon-button-tertiary-disabled-color:#999;--_dso-button-tertiary-download-icon:var(--_dso-di-download-zwart);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-zwart);--_dso-button-tertiary-color:#191919;--_dso-button-tertiary-hover-color:#4c4c4c;--_dso-button-tertiary-active-color:#173521;--_dso-button-tertiary-disabled-color:#999;background-color:#dcd400;color:#191919}.group-error .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#ce3f51;color:#fff}.group-attention .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#8b4a6a;color:#fff}.options{margin:0;padding:0}.option{display:block;inline-size:100%;padding-block:8px;padding-inline:16px;cursor:pointer;line-height:inherit;font-family:inherit;font-size:inherit;border:none;text-align:start;background-color:#fff}.option:hover{background-color:#ebf3e6}.option:hover .option-label{color:#39870c;font-weight:bold}.option.option-active .option-label{color:#39870c;font-weight:bold;text-decoration:underline}.option-label{position:relative;color:#000;font-size:Asap, sans-serif;font-weight:400}.option-hint{padding-inline-start:5px;color:#39870c;font-size:Asap, sans-serif;font-weight:bold}.placeholder{margin:0;padding-block:8px;padding-inline:16px;color:#666}'}},[17,"dso-advanced-select",{options:[16],active:[16],activeHint:[1,"active-hint"],open:[32]},[[8,"keydown","keyDownListener"]]]),D=({option:o,active:r,activeHint:t,callback:e})=>n("button",{class:i(["option",{"option-active":r===o}]),type:"button",onClick:r=>e(r,o)},n("span",{class:"option-label"},o.label),!!t&&r===o&&n("span",{class:"option-hint"},"(",t,")")),R=({redirect:o,callback:r})=>n("a",{class:"group-link",href:o.href,onClick:t=>r(t,o)},o.label,n("dso-icon",{icon:"chevron-right"})),P=({active:o,options:r})=>{const t=r.find((r=>"options"in r&&!!r.options.find((r=>r===o))&&!!r.activeLabel));return t&&n("dso-label",{compact:!0,status:t.variant},t.activeLabel)},I=A,N=function(){"undefined"!=typeof customElements&&["dso-advanced-select","dso-badge","dso-icon","dso-icon-button","dso-label","dso-scrollable"].forEach((o=>{switch(o){case"dso-advanced-select":customElements.get(e(o))||customElements.define(e(o),A);break;case"dso-badge":customElements.get(e(o))||b();break;case"dso-icon":customElements.get(e(o))||f();break;case"dso-icon-button":customElements.get(e(o))||v();break;case"dso-label":customElements.get(e(o))||_();break;case"dso-scrollable":customElements.get(e(o))||y()}}))};export{I as DsoAdvancedSelect,N as defineCustomElement}
|
|
5
|
+
*/function p(o,r){(null==r||r>o.length)&&(r=o.length);for(var t=0,n=Array(r);t<r;t++)n[t]=o[t];return n}function g(o,r){var t="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=w(o))||r){t&&(o=t);var n=0,e=function(){};return{s:e,n:function(){return n>=o.length?{done:!0}:{done:!1,value:o[n++]}},e:function(o){throw o},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){t=t.call(o)},n:function(){var o=t.next();return a=o.done,o},e:function(o){c=!0,i=o},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw i}}}}function h(o,r,t){return(r=function(o){var r=function(o,r){if("object"!=typeof o||!o)return o;var t=o[Symbol.toPrimitive];if(void 0!==t){var n=t.call(o,r);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return o+""}(o,"string");return"symbol"==typeof r?r:r+""}(r))in o?Object.defineProperty(o,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[r]=t,o}function k(o,r){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),t.push.apply(t,n)}return t}function m(o){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?k(Object(t),!0).forEach((function(r){h(o,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))}))}return o}function w(o,r){if(o){if("string"==typeof o)return p(o,r);var t={}.toString.call(o).slice(8,-1);return"Object"===t&&o.constructor&&(t=o.constructor.name),"Map"===t||"Set"===t?Array.from(o):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p(o,r):void 0}}var x={getActiveTrap:function(o){return(null==o?void 0:o.length)>0?o[o.length-1]:null},activateTrap:function(o,r){r!==x.getActiveTrap(o)&&x.pauseTrap(o);var t=o.indexOf(r);-1===t||o.splice(t,1),o.push(r)},deactivateTrap:function(o,r){var t=o.indexOf(r);-1!==t&&o.splice(t,1),x.unpauseTrap(o)},pauseTrap:function(o){var r=x.getActiveTrap(o);null==r||r._setPausedState(!0)},unpauseTrap:function(o){var r=x.getActiveTrap(o);r&&!r._isManuallyPaused()&&r._setPausedState(!1)}},z=function(o){return"Tab"===(null==o?void 0:o.key)||9===(null==o?void 0:o.keyCode)},C=function(o){return z(o)&&!o.shiftKey},j=function(o){return z(o)&&o.shiftKey},E=function(o){return setTimeout(o,0)},F=function(o){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return"function"==typeof o?o.apply(void 0,t):o},S=function(o){return o.target.shadowRoot&&"function"==typeof o.composedPath?o.composedPath()[0]:o.target},T=[],O=function(o,r){var t,n=(null==r?void 0:r.document)||document,e=(null==r?void 0:r.trapStack)||T,i=m({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:C,isKeyBackward:j},r),u={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b=function(o,r,t){return o&&void 0!==o[r]?o[r]:i[t||r]},f=function(o,r){var t="function"==typeof(null==r?void 0:r.composedPath)?r.composedPath():void 0;return u.containerGroups.findIndex((function(r){var n=r.container,e=r.tabbableNodes;return n.contains(o)||(null==t?void 0:t.includes(n))||e.find((function(r){return r===o}))}))},v=function(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.hasFallback,e=void 0!==t&&t,a=r.params,c=i[o];if("function"==typeof c&&(c=c.apply(void 0,function(o){return function(o){if(Array.isArray(o))return p(o)}(o)||function(o){if("undefined"!=typeof Symbol&&null!=o[Symbol.iterator]||null!=o["@@iterator"])return Array.from(o)}(o)||w(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(void 0===a?[]:a))),!0===c&&(c=void 0),!c){if(void 0===c||!1===c)return c;throw Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var d=c;if("string"==typeof c){try{d=n.querySelector(c)}catch(r){throw Error("`".concat(o,'` appears to be an invalid selector; error="').concat(r.message,'"'))}if(!d&&!e)throw Error("`".concat(o,"` as selector refers to no known node"))}return d},_=function(o){var r=o.activeElement;return r?r.shadowRoot&&null!==r.shadowRoot.activeElement?_(r.shadowRoot):r:null},y=function(){var o=v("initialFocus",{hasFallback:!0});if(!1===o)return!1;if(void 0===o||o&&!l(o,i.tabbableOptions)){var r=_(n);if(f(r)>=0)o=r;else{var t=u.tabbableGroups[0];o=t&&t.firstTabbableNode||v("fallbackFocus")}}else null===o&&(o=v("fallbackFocus"));if(!o)throw Error("Your focus-trap needs to have at least one focusable element");return o},h=function(){if(u.containerGroups=u.containers.map((function(o){var r=a(o,i.tabbableOptions),t=c(o,i.tabbableOptions),n=r.length>0?r[0]:void 0,e=r.length>0?r[r.length-1]:void 0,l=t.find((function(o){return d(o)})),u=t.slice().reverse().find((function(o){return d(o)})),b=!!r.find((function(o){return s(o)>0}));return{container:o,tabbableNodes:r,focusableNodes:t,posTabIndexesFound:b,firstTabbableNode:n,lastTabbableNode:e,firstDomTabbableNode:l,lastDomTabbableNode:u,nextTabbableNode:function(o){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=r.indexOf(o);return e<0?n?t.slice(t.indexOf(o)+1).find((function(o){return d(o)})):t.slice(0,t.indexOf(o)).reverse().find((function(o){return d(o)})):r[e+(n?1:-1)]}}})),u.tabbableGroups=u.containerGroups.filter((function(o){return o.tabbableNodes.length>0})),u.tabbableGroups.length<=0&&!v("fallbackFocus"))throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(u.containerGroups.find((function(o){return o.posTabIndexesFound}))&&u.containerGroups.length>1)throw Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},k=function(o){!1!==o&&o!==_(document)&&(o&&o.focus?(o.focus({preventScroll:!!i.preventScroll}),u.mostRecentlyFocusedNode=o,function(o){return o.tagName&&"input"===o.tagName.toLowerCase()&&"function"==typeof o.select}(o)&&o.select()):k(y()))},O=function(o){var r=v("setReturnFocus",{params:[o]});return r||!1!==r&&o},A=function(o){var r=o.target,t=o.event,n=o.isBackward,e=void 0!==n&&n;r=r||S(t),h();var a=null;if(u.tabbableGroups.length>0){var c=f(r,t),b=c>=0?u.containerGroups[c]:void 0;if(c<0)a=e?u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:u.tabbableGroups[0].firstTabbableNode;else if(e){var _=u.tabbableGroups.findIndex((function(o){return r===o.firstTabbableNode}));if(_<0&&(b.container===r||l(r,i.tabbableOptions)&&!d(r,i.tabbableOptions)&&!b.nextTabbableNode(r,!1))&&(_=c),_>=0){var y=u.tabbableGroups[0===_?u.tabbableGroups.length-1:_-1];a=s(r)>=0?y.lastTabbableNode:y.lastDomTabbableNode}else z(t)||(a=b.nextTabbableNode(r,!1))}else{var p=u.tabbableGroups.findIndex((function(o){return r===o.lastTabbableNode}));if(p<0&&(b.container===r||l(r,i.tabbableOptions)&&!d(r,i.tabbableOptions)&&!b.nextTabbableNode(r))&&(p=c),p>=0){var g=u.tabbableGroups[p===u.tabbableGroups.length-1?0:p+1];a=s(r)>=0?g.firstTabbableNode:g.firstDomTabbableNode}else z(t)||(a=b.nextTabbableNode(r))}}else a=v("fallbackFocus");return a},D=function(o){var r=S(o);f(r,o)>=0||(F(i.clickOutsideDeactivates,o)?t.deactivate({returnFocus:i.returnFocusOnDeactivate}):F(i.allowOutsideClick,o)||o.preventDefault())},R=function(o){var r=S(o),t=f(r,o)>=0;if(t||r instanceof Document)t&&(u.mostRecentlyFocusedNode=r);else{var n;o.stopImmediatePropagation();var e=!0;if(u.mostRecentlyFocusedNode)if(s(u.mostRecentlyFocusedNode)>0){var a=f(u.mostRecentlyFocusedNode),c=u.containerGroups[a].tabbableNodes;if(c.length>0){var d=c.findIndex((function(o){return o===u.mostRecentlyFocusedNode}));d>=0&&(i.isKeyForward(u.recentNavEvent)?d+1<c.length&&(n=c[d+1],e=!1):d-1>=0&&(n=c[d-1],e=!1))}}else u.containerGroups.some((function(o){return o.tabbableNodes.some((function(o){return s(o)>0}))}))||(e=!1);else e=!1;e&&(n=A({target:u.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(u.recentNavEvent)})),k(n||u.mostRecentlyFocusedNode||y())}u.recentNavEvent=void 0},P=function(o){(i.isKeyForward(o)||i.isKeyBackward(o))&&function(o){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u.recentNavEvent=o;var t=A({event:o,isBackward:r});t&&(z(o)&&o.preventDefault(),k(t))}(o,i.isKeyBackward(o))},I=function(o){(function(o){return"Escape"===(null==o?void 0:o.key)||"Esc"===(null==o?void 0:o.key)||27===(null==o?void 0:o.keyCode)})(o)&&!1!==F(i.escapeDeactivates,o)&&(o.preventDefault(),t.deactivate())},N=function(o){var r=S(o);f(r,o)>=0||F(i.clickOutsideDeactivates,o)||F(i.allowOutsideClick,o)||(o.preventDefault(),o.stopImmediatePropagation())},B=function(){var o;if(u.active)return x.activateTrap(e,t),i.delayInitialFocus?o=new Promise((function(o){u.delayInitialFocusTimer=E((function(){k(y()),o()}))})):k(y()),n.addEventListener("focusin",R,!0),n.addEventListener("mousedown",D,{capture:!0,passive:!1}),n.addEventListener("touchstart",D,{capture:!0,passive:!1}),n.addEventListener("click",N,{capture:!0,passive:!1}),n.addEventListener("keydown",P,{capture:!0,passive:!1}),n.addEventListener("keydown",I),o},M=function(){if(u.active)return n.removeEventListener("focusin",R,!0),n.removeEventListener("mousedown",D,!0),n.removeEventListener("touchstart",D,!0),n.removeEventListener("click",N,!0),n.removeEventListener("keydown",P,!0),n.removeEventListener("keydown",I),t},H="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(o){var r=u.mostRecentlyFocusedNode;if(r&&o.some((function(o){return Array.from(o.removedNodes).some((function(o){return o===r||"function"==typeof o.contains&&o.contains(r)}))}))&&u.containers.some((function(o){return null==o?void 0:o.isConnected}))){h();var t=y();k(t)}})):void 0,U=function(){H&&(H.disconnect(),u.active&&!u.paused&&u.containers.map((function(o){H.observe(o,{subtree:!0,childList:!0})})))};return Object.defineProperties(t={get active(){return u.active},get paused(){return u.paused},activate:function(o){if(u.active)return this;var r,i=b(o,"onActivate"),a=b(o,"onPostActivate"),c=b(o,"checkCanFocusTrap"),d=x.getActiveTrap(e),s=!1;d&&!d.paused&&(null===(r=d._setSubtreeIsolation)||void 0===r||r.call(d,!1),s=!0);try{c||h(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=_(n),null==i||i({trap:t});var l=function(){c&&h();var o=function(){t._setSubtreeIsolation(!0),U(),null==a||a({trap:t})},r=B();r?r.then(o):o()};if(c)return c(u.containers.concat()).then(l,l),this;l()}catch(o){var f;throw d===x.getActiveTrap(e)&&s&&(null===(f=d._setSubtreeIsolation)||void 0===f||f.call(d,!0)),o}return this},deactivate:function(o){if(!u.active)return this;var r=m({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},o);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,u.paused||t._setSubtreeIsolation(!1),u.alreadySilent.clear(),M(),u.active=!1,u.paused=!1,U(),x.deactivateTrap(e,t);var n=b(r,"onDeactivate"),a=b(r,"onPostDeactivate"),c=b(r,"checkCanReturnFocus"),d=b(r,"delayReturnFocus"),s=b(r,"returnFocus","returnFocusOnDeactivate");null==n||n({trap:t});var l=function(){s&&k(O(u.nodeFocusedBeforeActivation)),null==a||a({trap:t})},f=function(){d&&s?E(l):l()};return s&&c?(c(O(u.nodeFocusedBeforeActivation)).then(f,f),this):(f(),this)},pause:function(o){return u.active?(u.manuallyPaused=!0,this._setPausedState(!0,o)):this},unpause:function(o){return u.active?(u.manuallyPaused=!1,e[e.length-1]!==this?this:this._setPausedState(!1,o)):this},updateContainerElements:function(o){var r=[].concat(o).filter(Boolean);return u.containers=r.map((function(o){return"string"==typeof o?n.querySelector(o):o})),i.isolateSubtrees&&function(o){u.active&&!u.paused&&t._setSubtreeIsolation(!1),u.adjacentElements.clear(),u.alreadySilent.clear();var r,n=new Set,e=new Set,i=g(o);try{for(i.s();!(r=i.n()).done;){var a=r.value;n.add(a);for(var c="undefined"!=typeof ShadowRoot&&a.getRootNode()instanceof ShadowRoot,d=a;d;){n.add(d);var s=d.parentElement,l=[];s?l=s.children:!s&&c&&(l=d.getRootNode().children,s=d.getRootNode().host,c="undefined"!=typeof ShadowRoot&&s.getRootNode()instanceof ShadowRoot);var b,f=g(l);try{for(f.s();!(b=f.n()).done;)e.add(b.value)}catch(o){f.e(o)}finally{f.f()}d=s}}}catch(o){i.e(o)}finally{i.f()}n.forEach((function(o){e.delete(o)})),u.adjacentElements=e}(u.containers),u.active&&(h(),u.paused||t._setSubtreeIsolation(!0)),U(),this}},{_isManuallyPaused:{value:function(){return u.manuallyPaused}},_setPausedState:{value:function(o,r){if(u.paused===o)return this;if(u.paused=o,o){var n=b(r,"onPause"),e=b(r,"onPostPause");null==n||n({trap:t}),M(),t._setSubtreeIsolation(!1),U(),null==e||e({trap:t})}else{var i=b(r,"onUnpause"),a=b(r,"onPostUnpause");null==i||i({trap:t}),function(){h();var o=function(){t._setSubtreeIsolation(!0),U(),null==a||a({trap:t})},r=B();r?r.then(o):o()}()}return this}},_setSubtreeIsolation:{value:function(o){i.isolateSubtrees&&u.adjacentElements.forEach((function(r){var t;o?"aria-hidden"===i.isolateSubtrees?("true"!==r.ariaHidden&&"true"!==(null===(t=r.getAttribute("aria-hidden"))||void 0===t?void 0:t.toLowerCase())||u.alreadySilent.add(r),r.setAttribute("aria-hidden","true")):((r.inert||r.hasAttribute("inert"))&&u.alreadySilent.add(r),r.setAttribute("inert",!0)):u.alreadySilent.has(r)||r.removeAttribute("aria-hidden"===i.isolateSubtrees?"aria-hidden":"inert")}))}}}),t.updateContainerElements(o),t};const A=o(class extends r{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.dsoChange=t(this,"dsoChange",3),this.dsoRedirect=t(this,"dsoRedirect",3),this.options=[],this.open=!1,this.toggleOpen=()=>{this.open=!this.open},this.handleOptionClick=(o,r)=>{this.dsoChange.emit({originalEvent:o,option:r}),this.open=!1},this.handleRedirectClick=(o,r)=>{this.dsoRedirect.emit({originalEvent:o,isModifiedEvent:u(o),redirect:r}),this.open=!1}}keyDownListener(o){this.open&&"ArrowUp"===o.key?(o.preventDefault(),this.handleTab(-1)):this.open&&"ArrowDown"===o.key&&(o.preventDefault(),this.handleTab(1))}componentDidRender(){this.open&&!this.trap?this.createTrap():!this.open&&this.trap&&this.removeTrap()}createTrap(){this.trap=O(this.host,{clickOutsideDeactivates:!0,escapeDeactivates:!0,setReturnFocus:this.toggleButtonElementRef,tabbableOptions:{getShadowRoot:!0},onDeactivate:()=>{this.open=!1}}).activate()}removeTrap(){this.trap?.deactivate(),delete this.trap}handleTab(o){const r=this.host.isConnected?a(this.host,{getShadowRoot:!0}):[];let t=r.findIndex((o=>o===this.host.shadowRoot?.activeElement))+o;t>=r.length?t=0:t<0&&(t=r.length-1),r[t]?.focus()}render(){return n("div",{key:"baa345ec80fab193203b4cc0089bcf15e722e1d7",class:"advanced-select"},n("div",{key:"2b756e8a6acac2a0cba272458d2eebcf233d23c7",class:"advanced-select-button"},n("button",{key:"bef9e0df9f7f987c087e70cc2cfe3ed37ea380d4","aria-expanded":""+this.open,class:i(["active-option",{open:this.open}]),type:"button",onClick:this.toggleOpen,ref:o=>this.toggleButtonElementRef=o},n(P,{key:"d98471d2b70ec39d03640710952cdf7407a987ab",active:this.active,options:this.options}),n("span",{key:"cc7d2205e809006270b3d4a57350c0667afdf5ed",class:"active-option-label"},this.active?.label??"Selecteer een optie"),n("span",{key:"4cea91a7355bff2d47729b7d9cd9897c4452f05c",class:"active-option-aside"},n("dso-icon",{key:"24b65f054ecfdd52778b714dea4465a3260c1fd5",icon:"caret-down"}))),this.open&&n("div",{key:"1e568894fa99fab59032cc42b1da3e6057ec8857",class:"groups-container"},n("ul",{key:"c62eccf234376aca58bd061e4aec6e1b781de760",class:"groups"},this.options.map((o=>"options"in o&&n("li",{class:i(["group",{["group-"+o.variant]:!!o.variant}])},n("p",{class:"group-label"},o.label),n("ul",{class:"options"},o.options.map((o=>n("li",null,n(D,{option:o,active:this.active,activeHint:this.activeHint,callback:this.handleOptionClick}))))),o.redirect&&n(R,{redirect:o.redirect,callback:this.handleRedirectClick}))||"placeholder"in o&&n("li",{class:"group"},n("p",{class:"group-label"},o.label),n("p",{class:"placeholder"},o.placeholder),o.redirect&&n(R,{redirect:o.redirect,callback:this.handleRedirectClick}))||n("li",null,n(D,{option:o,active:this.active,activeHint:this.activeHint,callback:this.handleOptionClick}))))))),this.options.some((o=>"summaryCounter"in o&&o?.summaryCounter))&&n("span",{key:"804d44077fde0d0b4f9c576f47780208cf51ba13",class:"badges"},this.options.filter((o=>"options"in o&&"summaryCounter"in o&&!!o?.summaryCounter)).map((o=>n("dso-badge",{status:o.variant??"outline",label:"Toon toelichting voor "+o.label.toLowerCase()},o.options.length,n("div",{slot:"toggletip"},o.toggletip))))))}static get delegatesFocus(){return!0}get host(){return this}static get style(){return':host{display:block}*,*::after,*::before{box-sizing:border-box}.advanced-select{display:flex;flex-direction:row}.advanced-select-button{flex:1;min-inline-size:0}.active-option{color:inherit;display:flex;inline-size:100%;justify-content:flex-start;align-items:center;padding:0;border:1px solid #275937;border-radius:4px;cursor:pointer;background-color:#fff;line-height:inherit;font-family:inherit;font-size:inherit}.active-option.open{border-radius:4px 4px 0 0}.active-option dso-icon{color:#275937}.active-option dso-label{margin-inline-start:8px}.active-option-label{padding-block:4px;padding-inline:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.active-option-aside{padding-inline:8px;margin-inline-start:auto}.badges{display:flex;justify-content:space-between;align-items:center;gap:4px;padding-inline-start:4px}.groups-container{position:relative;z-index:200}.groups{position:absolute;inset-block-start:-1px;inset-inline-start:0;inline-size:100%;max-block-size:500px;margin:0;padding:0;overflow-y:auto;background-color:#fff;border:1px solid #275937;border-radius:0 0 4px 4px}.groups li::marker{display:none}.group{border-block-end:1px solid #ccc}.group:last-child{border-block-end:none}.group .option{padding-inline-start:37px}.group .option-label::before{content:"";position:absolute;display:block;block-size:10px;inline-size:10px;inset-block:4px auto;inset-inline:-20px auto;border-radius:50%;--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-zwart);--_dso-link-extern-icon:var(--_dso-di-external-link-zwart);--_dso-link-phone-icon:var(--_dso-di-call-zwart);--_dso-link-mail-icon:var(--_dso-di-mail-outline-zwart);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-zwart);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:#1f472c;--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:#275937;--_dso-icon-button-secondary-toggled-hover-background-color:#1b3e27;--_dso-icon-button-tertiary-color:#191919;--_dso-icon-button-tertiary-hover-color:#4c4c4c;--_dso-icon-button-tertiary-active-color:#1f472c;--_dso-icon-button-tertiary-toggled-color:#275937;--_dso-icon-button-tertiary-toggled-hover-color:#1b3e27;--_dso-icon-button-tertiary-disabled-color:#999;--_dso-button-tertiary-download-icon:var(--_dso-di-download-zwart);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-zwart);--_dso-button-tertiary-color:#191919;--_dso-button-tertiary-hover-color:#4c4c4c;--_dso-button-tertiary-active-color:#173521;--_dso-button-tertiary-disabled-color:#999;background-color:#ccc;color:#191919}.group-label{margin:0;padding-block:4px;padding-inline:16px;color:#666;font-size:0.875rem;font-weight:500;border-block-end:1px solid #ccc}.group-link{display:block;padding-block:8px;padding-inline:4px;text-align:end;color:#000;text-decoration:none}.group-link:hover{text-decoration:underline}.group-link dso-icon{color:#39870c}.group-info .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-zwart);--_dso-link-extern-icon:var(--_dso-di-external-link-zwart);--_dso-link-phone-icon:var(--_dso-di-call-zwart);--_dso-link-mail-icon:var(--_dso-di-mail-outline-zwart);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-zwart);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:#1f472c;--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:#275937;--_dso-icon-button-secondary-toggled-hover-background-color:#1b3e27;--_dso-icon-button-tertiary-color:#191919;--_dso-icon-button-tertiary-hover-color:#4c4c4c;--_dso-icon-button-tertiary-active-color:#1f472c;--_dso-icon-button-tertiary-toggled-color:#275937;--_dso-icon-button-tertiary-toggled-hover-color:#1b3e27;--_dso-icon-button-tertiary-disabled-color:#999;--_dso-button-tertiary-download-icon:var(--_dso-di-download-zwart);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-zwart);--_dso-button-tertiary-color:#191919;--_dso-button-tertiary-hover-color:#4c4c4c;--_dso-button-tertiary-active-color:#173521;--_dso-button-tertiary-disabled-color:#999;background-color:#6ca4d9;color:#191919}.group-primary .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#275937;color:#fff}.group-success .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#39870c;color:#fff}.group-warning .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-zwart);--_dso-link-extern-icon:var(--_dso-di-external-link-zwart);--_dso-link-phone-icon:var(--_dso-di-call-zwart);--_dso-link-mail-icon:var(--_dso-di-mail-outline-zwart);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-zwart);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:#1f472c;--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:#275937;--_dso-icon-button-secondary-toggled-hover-background-color:#1b3e27;--_dso-icon-button-tertiary-color:#191919;--_dso-icon-button-tertiary-hover-color:#4c4c4c;--_dso-icon-button-tertiary-active-color:#1f472c;--_dso-icon-button-tertiary-toggled-color:#275937;--_dso-icon-button-tertiary-toggled-hover-color:#1b3e27;--_dso-icon-button-tertiary-disabled-color:#999;--_dso-button-tertiary-download-icon:var(--_dso-di-download-zwart);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-zwart);--_dso-button-tertiary-color:#191919;--_dso-button-tertiary-hover-color:#4c4c4c;--_dso-button-tertiary-active-color:#173521;--_dso-button-tertiary-disabled-color:#999;background-color:#dcd400;color:#191919}.group-error .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#ce3f51;color:#fff}.group-attention .option-label::before{--_dso-alert-success-border-color:#39870c;--_dso-alert-error-border-color:#ce3f51;--_dso-alert-info-border-color:#6ca4d9;--_dso-alert-warning-border-color:#dcd400;--_dso-link-color:currentColor;--_dso-link-hover-color:currentColor;--_dso-link-visited-color:currentColor;--_dso-link-download-icon:var(--_dso-di-download-wit);--_dso-link-extern-icon:var(--_dso-di-external-link-wit);--_dso-link-phone-icon:var(--_dso-di-call-wit);--_dso-link-mail-icon:var(--_dso-di-mail-outline-wit);--_dso-link-list-chevron-icon:var(--_dso-di-chevron-right-wit);--_dso-icon-button-secondary-active-color:#fff;--_dso-icon-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-secondary-toggled-color:#fff;--_dso-icon-button-secondary-toggled-background-color:rgba(255, 255, 255, 0.2);--_dso-icon-button-secondary-toggled-hover-background-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-color:#f2f2f2;--_dso-icon-button-tertiary-hover-color:#fff;--_dso-icon-button-tertiary-active-color:rgba(255, 255, 255, 0.4);--_dso-icon-button-tertiary-toggled-color:#fff;--_dso-icon-button-tertiary-toggled-hover-color:rgba(255, 255, 255, 0.3);--_dso-icon-button-tertiary-disabled-color:#b2b2b2;--_dso-button-tertiary-download-icon:var(--_dso-di-download-wit);--_dso-button-tertiary-external-link-icon:var(--_dso-di-external-link-wit);--_dso-button-primary-background-color:#fff;--_dso-button-primary-hover-background-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-background-color:#f2f2f2;--_dso-button-primary-disabled-background-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-border-color:#fff;--_dso-button-primary-hover-border-color:rgba(255, 255, 255, 0.8);--_dso-button-primary-active-border-color:#f2f2f2;--_dso-button-primary-disabled-border-color:rgba(255, 255, 255, 0.6);--_dso-button-primary-color:#191919;--_dso-button-primary-hover-color:#191919;--_dso-button-primary-active-color:#191919;--_dso-button-primary-disabled-color:#666;--_dso-button-secondary-background-color:none;--_dso-button-secondary-hover-background-color:rgba(255, 255, 255, 0.2);--_dso-button-secondary-active-background-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-background-color:none;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-hover-border-color:#fff;--_dso-button-secondary-active-border-color:rgba(255, 255, 255, 0.4);--_dso-button-secondary-disabled-border-color:rgba(255, 255, 255, 0.7);--_dso-button-secondary-color:#fff;--_dso-button-secondary-hover-color:#fff;--_dso-button-secondary-active-color:#fff;--_dso-button-secondary-disabled-color:rgba(255, 255, 255, 0.7);--_dso-button-tertiary-color:#fff;--_dso-button-tertiary-hover-color:#fff;--_dso-button-tertiary-active-color:#fff;--_dso-button-tertiary-disabled-color:#b2b2b2;background-color:#8b4a6a;color:#fff}.options{margin:0;padding:0}.option{display:block;inline-size:100%;padding-block:8px;padding-inline:16px;cursor:pointer;line-height:inherit;font-family:inherit;font-size:inherit;border:none;text-align:start;background-color:#fff}.option:hover{background-color:#ebf3e6}.option:hover .option-label{color:#39870c;font-weight:bold}.option.option-active .option-label{color:#39870c;font-weight:bold;text-decoration:underline}.option-label{position:relative;color:#000;font-size:Asap, sans-serif;font-weight:400}.option-hint{padding-inline-start:5px;color:#39870c;font-size:Asap, sans-serif;font-weight:bold}.placeholder{margin:0;padding-block:8px;padding-inline:16px;color:#666}'}},[17,"dso-advanced-select",{options:[16],active:[16],activeHint:[1,"active-hint"],open:[32]},[[8,"keydown","keyDownListener"]]]),D=({option:o,active:r,activeHint:t,callback:e})=>n("button",{class:i(["option",{"option-active":r===o}]),type:"button",onClick:r=>e(r,o)},n("span",{class:"option-label"},o.label),!!t&&r===o&&n("span",{class:"option-hint"},"(",t,")")),R=({redirect:o,callback:r})=>n("a",{class:"group-link",href:o.href,onClick:t=>r(t,o)},o.label,n("dso-icon",{icon:"chevron-right"})),P=({active:o,options:r})=>{const t=r.find((r=>"options"in r&&!!r.options.find((r=>r===o))&&!!r.activeLabel));return t&&n("dso-label",{compact:!0,status:t.variant},t.activeLabel)},I=A,N=function(){"undefined"!=typeof customElements&&["dso-advanced-select","dso-badge","dso-icon","dso-icon-button","dso-label","dso-scrollable"].forEach((o=>{switch(o){case"dso-advanced-select":customElements.get(e(o))||customElements.define(e(o),A);break;case"dso-badge":customElements.get(e(o))||b();break;case"dso-icon":customElements.get(e(o))||f();break;case"dso-icon-button":customElements.get(e(o))||v();break;case"dso-label":customElements.get(e(o))||_();break;case"dso-scrollable":customElements.get(e(o))||y()}}))};export{I as DsoAdvancedSelect,N as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as s,HTMLElement as t,createEvent as i,h as e,Fragment as o,transformTag as h}from"@stencil/core/internal/client";import{d as n}from"./index3.js";import{i as a}from"./i18n.js";import{d as r}from"./icon.js";import{d as u}from"./progress-indicator.js";import{d as c}from"./scrollable.js";import{v as d}from"./v4.js";const l={en:{"dso-autosuggest":{notFound:"{{inputValue}} was not found."}},nl:{"dso-autosuggest":{notFound:"{{inputValue}} is niet gevonden."}}},g=({id:s,mouseEnter:t,mouseLeave:i,click:o,selected:h,suggestion:n,ref:a,markedSuggestion:r})=>e("div",{class:"option",role:"option",id:s,onMouseEnter:t,onMouseLeave:i,onClick:o,"aria-selected":h,"aria-label":n.value,ref:a},e("div",{class:"suggestion-row"},e("span",{class:"value"},r.value),r.type?e("span",{class:"type"},r.type):void 0),r.extras&&r.extras.map((s=>e("div",{class:"suggestion-row"},s.map((s=>e("span",{class:"extra"},s)))))));function p(s){return!!s&&s.length>0&&s.every((s=>void 0!==s&&"groupLabel"in s&&void 0!==s.groupLabel&&"suggestions"in s&&s.suggestions.length>0))}function b(s){return!!s&&s.length>0&&s.every((s=>void 0!==s&&"value"in s&&void 0!==s.value))}const f=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.dsoSelect=i(this,"dsoSelect",7),this.dsoChange=i(this,"dsoChange",7),this.dsoSearch=i(this,"dsoSearch",7),this.suggestions=null,this.loading=!1,this.loadingLabel="Een moment geduld.",this.showSuggestions=!1,this.notFound=!1,this.showLoading=!1,this.listboxItems=[],this.listboxId=d(),this.inputId=d(),this.labelId=d(),this.resizeObserver=new ResizeObserver(n((()=>this.scheduleListboxContainerMaxBlockSizeUpdate()),150)),this.debouncedEmitValue=n((s=>{this.dsoChange.emit(s),this.debouncedShowLoading()}),200),this.debouncedShowLoading=n((()=>{this.inputValue&&(this.showLoading=!0)}),this.loadingDelayed),this.inputValue="",this.onInput=s=>{s.target instanceof HTMLInputElement&&(this.showLoading=!this.loadingDelayed,this.inputValue=s.target.value,this.debouncedEmitValue(s.target.value.match(/(\S+)/g)?s.target.value:""))},this.onFocusIn=()=>{this.suggestions&&this.suggestions.length>1&&this.openSuggestions()},this.text=a((()=>this.host),l),this.onWindowResize=n((()=>this.scheduleListboxContainerMaxBlockSizeUpdate()),150),this.onScrollend=()=>this.scheduleListboxContainerMaxBlockSizeUpdate(),this.onOptionClick=s=>{s.stopPropagation(),this.pickSelectedValue()},this.onKeyDown=s=>{if(!s.defaultPrevented&&!this.loading){switch(s.key){case"ArrowDown":this.showSuggestions?this.selectNextSuggestion():this.openSuggestions("first");break;case"ArrowUp":this.showSuggestions?this.selectPreviousSuggestion():this.openSuggestions("last");break;case"Tab":return void this.closeSuggestions();case"Escape":this.closeSuggestions();break;case"Enter":this.pickSelectedValue();break;default:return}s.preventDefault()}}}suggestionsWatcher(){this.resetSelectedSuggestion(),this.showSuggestions&&this.notFound||!this.inputValue?!this.showSuggestions&&!this.notFound||this.inputValue||this.closeSuggestions():this.openSuggestions()}onDocumentClick(s){(this.showSuggestions||this.notFound)&&this.listbox&&s.target instanceof Node&&!this.listbox.contains(s.target)&&this.input!==s.target&&this.closeSuggestions()}componentDidRender(){this.scheduleListboxContainerMaxBlockSizeUpdate()}connectedCallback(){const s=this.host.querySelector('input[type="text"]');if(!(s instanceof HTMLInputElement))return;if(this.input=s,s.id?this.inputId=s.id:s.id=this.inputId,!this.input.labels||this.input.labels.length<1)return;const t=this.input.labels[0];t?.id?this.labelId=t.id:t&&(t.id=this.labelId),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-activedescendant",""),this.input.addEventListener("input",this.onInput),this.input.addEventListener("keydown",this.onKeyDown),this.input.addEventListener("focusin",this.onFocusIn),window.addEventListener("resize",this.onWindowResize),document.addEventListener("scrollend",this.onScrollend),this.resizeObserver.observe(this.host)}disconnectedCallback(){this.input?.removeEventListener("input",this.onInput),this.input?.removeEventListener("keydown",this.onKeyDown),this.input?.removeEventListener("focusin",this.onFocusIn),window.removeEventListener("resize",this.onWindowResize),document.removeEventListener("scrollend",this.onScrollend),void 0!==this.listboxContainerMaxBlockSizeFrameId&&(cancelAnimationFrame(this.listboxContainerMaxBlockSizeFrameId),this.listboxContainerMaxBlockSizeFrameId=void 0),this.resizeObserver.disconnect()}scheduleListboxContainerMaxBlockSizeUpdate(){void 0===this.listboxContainerMaxBlockSizeFrameId&&(this.listboxContainerMaxBlockSizeFrameId=requestAnimationFrame((()=>{this.listboxContainerMaxBlockSizeFrameId=void 0,this.setListboxContainerMaxBlockSize()})))}setListboxContainerMaxBlockSize(){if(this.listboxContainer&&this.showSuggestions&&this.showSuggestions){let s=0;const t=this.listboxItems.length?Math.min(this.listboxItems.length,10):0;for(let i=0;i<t;i++)s+=this.listboxItems[i]?.getBoundingClientRect().height||0;const i=window.innerHeight-this.host.getBoundingClientRect().bottom,e=s+16+2;this.listboxContainer.style.setProperty("--_dso-autosuggest-max-block-size",(i<e||i<=s?i-16:e)+"px")}}showInputValueNotFound(s){return this.processAutosuggestMarkItems(this.markTerms(this.input?.value.split(" ").filter((s=>s))??[],s))}handleMark(s,t,i,e){return this.processAutosuggestMarkItems(this.mark&&i?this.mark(s,t,i,e):this.markTerms(this.input?.value.split(" ").filter((s=>s))??[],t))}markTerms(s,t){if(!t||!s||0===s.length||void 0===s[0])return[""];const i=RegExp(`(${function(s){if("string"!=typeof s)throw new TypeError("Expected a string");return s.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(s[0])})`,"gi");return t.split(i).reduce(((t,e)=>(e?i.test(e)?t.push({mark:e}):1===s.length?t.push(e):t.push(...this.markTerms(s.slice(1),e)):t.push(e),t)),[])}processAutosuggestMarkItems(s){return 0===s.length?[""]:s.map((s=>"object"==typeof s?e("mark",null,s.mark):s))}selectSuggestion(s,t){this.selectedSuggestion=s,this.selectedSuggestionGroup=t,this.setAriaActiveDescendant()}selectFirstSuggestion(){this.suggestions&&(p(this.suggestions)&&this.selectedSuggestionGroup?this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]:b(this.suggestions)&&(this.selectedSuggestion=this.suggestions[0]),this.setAriaActiveDescendant(!0))}selectLastSuggestion(){this.suggestions&&(p(this.suggestions)&&this.selectedSuggestionGroup?this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]:b(this.suggestions)&&(this.selectedSuggestion=this.suggestions[this.suggestions.length-1]),this.setAriaActiveDescendant(!0))}selectNextSuggestion(){if(this.suggestions){if(p(this.suggestions))this.selectNextGroupedSuggestion();else{const s=this.selectedSuggestion?this.suggestions.indexOf(this.selectedSuggestion):-1;this.selectedSuggestion=this.suggestions[s+1]??this.suggestions[0]}this.setAriaActiveDescendant(!0)}}selectNextGroupedSuggestion(){if(this.suggestions)if(this.selectedSuggestionGroup){const s=this.selectedSuggestion?this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion):-1;if(s===this.selectedSuggestionGroup.suggestions.length-1){const s=this.suggestionGroups.indexOf(this.selectedSuggestionGroup);this.selectedSuggestionGroup=this.suggestionGroups[s+1]??this.suggestionGroups[0],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]}else this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[s+1]}else this.selectedSuggestionGroup=this.suggestionGroups[0],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]}selectPreviousSuggestion(){if(this.suggestions){if(p(this.suggestions))this.selectPreviousGroupedSuggestion();else{const s=this.selectedSuggestion?this.suggestions.indexOf(this.selectedSuggestion):0;this.selectedSuggestion=this.suggestions[s-1]??this.suggestions[this.suggestions.length-1]}this.setAriaActiveDescendant(!0)}}selectPreviousGroupedSuggestion(){if(this.suggestions)if(this.selectedSuggestionGroup){const s=this.selectedSuggestion?this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion):-1;if(0===s){const s=this.suggestionGroups.indexOf(this.selectedSuggestionGroup);this.selectedSuggestionGroup=this.suggestionGroups[s-1]??this.suggestionGroups[this.suggestions.length-1],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]}else this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[s-1]}else this.selectedSuggestionGroup=this.suggestionGroups[this.suggestions.length-1],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]}get suggestionGroups(){return p(this.suggestions)?this.suggestions:[]}setAriaActiveDescendant(s=!1){if(this.selectedSuggestion){const t=this.selectedSuggestionGroup?this.listboxGroupedItemId(this.selectedSuggestionGroup,this.selectedSuggestion):this.listboxItemId(this.selectedSuggestion);this.input?.setAttribute("aria-activedescendant",t),s&&document.getElementById(t)?.scrollIntoView({block:"nearest"})}}resetSelectedSuggestion(){this.showLoading=!this.loadingDelayed,this.notFound=!1,this.selectedSuggestion=void 0,this.selectedSuggestionGroup=void 0,this.input?.setAttribute("aria-activedescendant","")}openSuggestions(s){this.showSuggestions=(this.suggestions&&this.suggestions.length>0)??!1,this.notFound=(this.suggestions&&0===this.suggestions?.length)??!1,this.input?.setAttribute("aria-expanded",""+(this.showSuggestions||this.notFound)),this.showSuggestions&&"first"===s?this.selectFirstSuggestion():this.showSuggestions&&"last"===s&&this.selectLastSuggestion()}closeSuggestions(){this.showSuggestions=!1,this.notFound=!1,this.input?.setAttribute("aria-expanded","false"),this.selectFirstSuggestion()}pickSelectedValue(){this.selectedSuggestion&&this.showSuggestions?this.dsoSelect.emit(this.selectedSuggestion):this.dsoSearch.emit(this.input?.value),this.closeSuggestions()}listboxItemId(s){return this.suggestions?`${this.inputId}-${b(this.suggestions)&&this.suggestions.indexOf(s)+1}`:""}listboxGroupedItemId(s,t){return this.suggestions?`${this.inputId}-${this.suggestionGroups.indexOf(s)+1}-${s.suggestions.indexOf(t)+1}`:""}getMarkedChunkedExtras(s,t){return s.reduce(((s,t,i)=>{const e=Math.floor(i/2);return s[e]||(s[e]=[]),s[e]?.push(t),s}),[]).map(((s,i)=>s.map(((s,e)=>this.handleMark(t,s,"extra",2*i+e)))))}getMarkedSuggestions(s){return{value:this.handleMark(s,s.value,"value"),type:s.type?this.handleMark(s,s.type,"type"):void 0,extras:s.extras?this.getMarkedChunkedExtras(s.extras,s):void 0}}getAutosuggestStatus(){if(this.notFound)return`"${this.inputValue}" is niet gevonden.`;let s=0;return b(this.suggestions)?s=this.suggestions.length:p(this.suggestions)&&(s=this.suggestions.reduce(((s,t)=>s+t.suggestions.length),0)),s+" resultaten gevonden."}render(){this.listboxItems=[];const s=this.showSuggestions||this.notFound,t=p(this.suggestions),i=b(this.suggestions);return s&&this.input?this.input.setAttribute("aria-controls",this.listboxId):this.input&&this.input.removeAttribute("aria-controls"),e(o,null,e("slot",{key:"1cd7c93050fbf51796895db760bcaec67e78bd2f"}),this.loading&&this.showLoading?e("div",{class:"autosuggest-progress-box"},e("dso-progress-indicator",{label:this.loadingLabel})):s&&e(o,null,e("dso-scrollable",{class:"listbox-container",ref:s=>this.listboxContainer=s},e("div",{class:"listbox",role:"listbox",id:this.listboxId,"aria-labelledby":this.labelId,ref:s=>this.listbox=s,tabindex:"0"},i&&this.showSuggestions&&this.suggestions&&this.suggestions.map((s=>e(g,{id:this.listboxItemId(s),mouseEnter:()=>this.selectSuggestion(s),mouseLeave:()=>this.resetSelectedSuggestion(),click:this.onOptionClick,selected:""+(s===this.selectedSuggestion),suggestion:s,ref:s=>s&&this.listboxItems.push(s),markedSuggestion:this.getMarkedSuggestions(s)})))||t&&this.showSuggestions&&this.suggestions&&this.suggestions.map((s=>{const t=d();return e("div",{role:"group",class:"group","aria-labelledby":t},e("div",{class:"group-label",role:"presentation",id:t,ref:s=>s&&this.listboxItems.push(s)},s.groupLabel),s.suggestions.map((t=>e(g,{id:this.listboxGroupedItemId(s,t),mouseEnter:()=>this.selectSuggestion(t,s),mouseLeave:()=>this.resetSelectedSuggestion(),click:this.onOptionClick,selected:""+(t===this.selectedSuggestion),suggestion:t,ref:s=>s&&this.listboxItems.push(s),markedSuggestion:this.getMarkedSuggestions(t)}))))}))||this.notFound&&e("div",{class:"option"},e("span",{class:"value"},this.notFoundLabel||this.showInputValueNotFound(this.text("notFound",{inputValue:this.inputValue})))))),e("div",{class:"sr-only","aria-live":"polite","aria-atomic":"true"},this.getAutosuggestStatus())))}get host(){return this}static get watchers(){return{suggestions:[{suggestionsWatcher:0}]}}static get style(){return".sc-dso-autosuggest-h{display:block;position:relative}.listbox-container.sc-dso-autosuggest{inset-inline:0;inset-block-start:100%;block-size:auto;max-block-size:var(--_dso-autosuggest-max-block-size);min-block-size:50px;overflow-y:auto;position:absolute;z-index:200}.listbox.sc-dso-autosuggest,.autosuggest-progress-box.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-block:0}.autosuggest-progress-box.sc-dso-autosuggest{padding-block:12px;padding-inline:8px}.listbox.sc-dso-autosuggest{padding-block:8px;padding-inline:0}.listbox.sc-dso-autosuggest .group.sc-dso-autosuggest:not(:first-child) .group-label.sc-dso-autosuggest{border-block-start:1px solid #b2b2b2;padding-block-start:12px}.listbox.sc-dso-autosuggest .group-label.sc-dso-autosuggest{color:#275937;font-weight:700;padding-block:4px;margin-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest{padding-block:4px;padding-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest .suggestion-row.sc-dso-autosuggest{display:flex;justify-content:space-between}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active{background-color:#275937}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .type.sc-dso-autosuggest,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .extra.sc-dso-autosuggest{color:#fff}.option[aria-selected=true].sc-dso-autosuggest{cursor:pointer;background-color:#d7e7ce}mark.sc-dso-autosuggest{font-weight:700;background-color:inherit;color:inherit;padding:0}.type.sc-dso-autosuggest,.extra.sc-dso-autosuggest{color:#666}.type.sc-dso-autosuggest{text-align:end}.extra.sc-dso-autosuggest{font-size:14px;line-height:21px}.extra.sc-dso-autosuggest:not(:first-child){text-align:end}"}},[262,"dso-autosuggest",{suggestions:[16],loading:[4],loadingLabel:[1,"loading-label"],loadingDelayed:[2,"loading-delayed"],notFoundLabel:[1,"not-found-label"],mark:[16],showSuggestions:[32],selectedSuggestion:[32],selectedSuggestionGroup:[32],notFound:[32],showLoading:[32]},[[4,"click","onDocumentClick"]],{suggestions:[{suggestionsWatcher:0}]}]),x=f,m=function(){"undefined"!=typeof customElements&&["dso-autosuggest","dso-icon","dso-progress-indicator","dso-scrollable"].forEach((s=>{switch(s){case"dso-autosuggest":customElements.get(h(s))||customElements.define(h(s),f);break;case"dso-icon":customElements.get(h(s))||r();break;case"dso-progress-indicator":customElements.get(h(s))||u();break;case"dso-scrollable":customElements.get(h(s))||c()}}))};export{x as DsoAutosuggest,m as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as s,HTMLElement as t,createEvent as i,h as e,Fragment as o,transformTag as h}from"@stencil/core/internal/client";import{d as n}from"./index3.js";import{i as a}from"./i18n.js";import{d as r}from"./icon.js";import{d as u}from"./progress-indicator.js";import{d as c}from"./scrollable.js";import{v as d}from"./v4.js";const l={en:{"dso-autosuggest":{notFound:"{{inputValue}} was not found."}},nl:{"dso-autosuggest":{notFound:"{{inputValue}} is niet gevonden."}}},g=({id:s,mouseEnter:t,mouseLeave:i,click:o,selected:h,suggestion:n,ref:a,markedSuggestion:r})=>e("div",{class:"option",role:"option",id:s,onMouseEnter:t,onMouseLeave:i,onClick:o,"aria-selected":h,"aria-label":n.value,ref:a},e("div",{class:"suggestion-row"},e("span",{class:"value"},r.value),r.type?e("span",{class:"type"},r.type):void 0),r.extras&&r.extras.map((s=>e("div",{class:"suggestion-row"},s.map((s=>e("span",{class:"extra"},s)))))));function p(s){return!!s&&s.length>0&&s.every((s=>void 0!==s&&"groupLabel"in s&&void 0!==s.groupLabel&&"suggestions"in s&&s.suggestions.length>0))}function b(s){return!!s&&s.length>0&&s.every((s=>void 0!==s&&"value"in s&&void 0!==s.value))}const f=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.dsoSelect=i(this,"dsoSelect",7),this.dsoChange=i(this,"dsoChange",7),this.dsoSearch=i(this,"dsoSearch",7),this.suggestions=null,this.loading=!1,this.loadingLabel="Een moment geduld.",this.showSuggestions=!1,this.notFound=!1,this.showLoading=!1,this.listboxItems=[],this.listboxId=d(),this.inputId=d(),this.labelId=d(),this.resizeObserver=new ResizeObserver(n((()=>this.scheduleListboxContainerMaxBlockSizeUpdate()),150)),this.debouncedEmitValue=n((s=>{this.dsoChange.emit(s),this.debouncedShowLoading()}),200),this.debouncedShowLoading=n((()=>{this.inputValue&&(this.showLoading=!0)}),this.loadingDelayed),this.inputValue="",this.onInput=s=>{s.target instanceof HTMLInputElement&&(this.showLoading=!this.loadingDelayed,this.inputValue=s.target.value,this.debouncedEmitValue(s.target.value.match(/(\S+)/g)?s.target.value:""))},this.onFocusIn=()=>{this.input?.select(),this.suggestions&&this.suggestions.length>1&&this.openSuggestions()},this.text=a((()=>this.host),l),this.onWindowResize=n((()=>this.scheduleListboxContainerMaxBlockSizeUpdate()),150),this.onScrollend=()=>this.scheduleListboxContainerMaxBlockSizeUpdate(),this.onOptionClick=s=>{s.stopPropagation(),this.pickSelectedValue()},this.onKeyDown=s=>{if(!s.defaultPrevented&&!this.loading){switch(s.key){case"ArrowDown":this.showSuggestions?this.selectNextSuggestion():this.openSuggestions("first");break;case"ArrowUp":this.showSuggestions?this.selectPreviousSuggestion():this.openSuggestions("last");break;case"Tab":return void this.closeSuggestions();case"Escape":this.closeSuggestions();break;case"Enter":this.pickSelectedValue();break;default:return}s.preventDefault()}}}suggestionsWatcher(){this.resetSelectedSuggestion(),this.showSuggestions&&this.notFound||!this.inputValue?!this.showSuggestions&&!this.notFound||this.inputValue||this.closeSuggestions():this.openSuggestions()}handleSearchBarButtonKeydown(s){s.defaultPrevented||this.loading||"ArrowDown"!==s.key&&"ArrowUp"!==s.key||this.input&&s.target!==this.input&&this.isEventInOwnSearchBar(s)&&(s.preventDefault(),this.input.focus(),this.openSuggestions("ArrowDown"===s.key?"first":"last"))}isEventInOwnSearchBar(s){const t=this.host.closest(".dso-search-bar");return!!t&&s.composedPath().includes(t)}onDocumentClick(s){(this.showSuggestions||this.notFound)&&this.listbox&&s.target instanceof Node&&!this.listbox.contains(s.target)&&this.input!==s.target&&this.closeSuggestions()}componentDidRender(){this.scheduleListboxContainerMaxBlockSizeUpdate()}connectedCallback(){const s=this.host.querySelector('input[type="text"]');if(!(s instanceof HTMLInputElement))return;if(this.input=s,s.id?this.inputId=s.id:s.id=this.inputId,!this.input.labels||this.input.labels.length<1)return;const t=this.input.labels[0];t?.id?this.labelId=t.id:t&&(t.id=this.labelId),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-activedescendant",""),this.input.addEventListener("input",this.onInput),this.input.addEventListener("keydown",this.onKeyDown),this.input.addEventListener("focusin",this.onFocusIn),window.addEventListener("resize",this.onWindowResize),document.addEventListener("scrollend",this.onScrollend),this.resizeObserver.observe(this.host)}disconnectedCallback(){this.input?.removeEventListener("input",this.onInput),this.input?.removeEventListener("keydown",this.onKeyDown),this.input?.removeEventListener("focusin",this.onFocusIn),window.removeEventListener("resize",this.onWindowResize),document.removeEventListener("scrollend",this.onScrollend),void 0!==this.listboxContainerMaxBlockSizeFrameId&&(cancelAnimationFrame(this.listboxContainerMaxBlockSizeFrameId),this.listboxContainerMaxBlockSizeFrameId=void 0),this.resizeObserver.disconnect()}scheduleListboxContainerMaxBlockSizeUpdate(){void 0===this.listboxContainerMaxBlockSizeFrameId&&(this.listboxContainerMaxBlockSizeFrameId=requestAnimationFrame((()=>{this.listboxContainerMaxBlockSizeFrameId=void 0,this.setListboxContainerMaxBlockSize()})))}setListboxContainerMaxBlockSize(){if(this.listboxContainer&&this.showSuggestions&&this.showSuggestions){let s=0;const t=this.listboxItems.length?Math.min(this.listboxItems.length,10):0;for(let i=0;i<t;i++)s+=this.listboxItems[i]?.getBoundingClientRect().height||0;const i=window.innerHeight-this.host.getBoundingClientRect().bottom,e=s+16+2;this.listboxContainer.style.setProperty("--_dso-autosuggest-max-block-size",(i<e||i<=s?i-16:e)+"px")}}showInputValueNotFound(s){return this.processAutosuggestMarkItems(this.markTerms(this.input?.value.split(" ").filter((s=>s))??[],s))}handleMark(s,t,i,e){return this.processAutosuggestMarkItems(this.mark&&i?this.mark(s,t,i,e):this.markTerms(this.input?.value.split(" ").filter((s=>s))??[],t))}markTerms(s,t){if(!t||!s||0===s.length||void 0===s[0])return[""];const i=RegExp(`(${function(s){if("string"!=typeof s)throw new TypeError("Expected a string");return s.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(s[0])})`,"gi");return t.split(i).reduce(((t,e)=>(e?i.test(e)?t.push({mark:e}):1===s.length?t.push(e):t.push(...this.markTerms(s.slice(1),e)):t.push(e),t)),[])}processAutosuggestMarkItems(s){return 0===s.length?[""]:s.map((s=>"object"==typeof s?e("mark",null,s.mark):s))}selectSuggestion(s,t){this.selectedSuggestion=s,this.selectedSuggestionGroup=t,this.setAriaActiveDescendant()}selectFirstSuggestion(){this.suggestions&&(p(this.suggestions)&&this.selectedSuggestionGroup?this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]:b(this.suggestions)&&(this.selectedSuggestion=this.suggestions[0]),this.setAriaActiveDescendant(!0))}selectLastSuggestion(){this.suggestions&&(p(this.suggestions)&&this.selectedSuggestionGroup?this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]:b(this.suggestions)&&(this.selectedSuggestion=this.suggestions[this.suggestions.length-1]),this.setAriaActiveDescendant(!0))}selectNextSuggestion(){if(this.suggestions){if(p(this.suggestions))this.selectNextGroupedSuggestion();else{const s=this.selectedSuggestion?this.suggestions.indexOf(this.selectedSuggestion):-1;this.selectedSuggestion=this.suggestions[s+1]??this.suggestions[0]}this.setAriaActiveDescendant(!0)}}selectNextGroupedSuggestion(){if(this.suggestions)if(this.selectedSuggestionGroup){const s=this.selectedSuggestion?this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion):-1;if(s===this.selectedSuggestionGroup.suggestions.length-1){const s=this.suggestionGroups.indexOf(this.selectedSuggestionGroup);this.selectedSuggestionGroup=this.suggestionGroups[s+1]??this.suggestionGroups[0],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]}else this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[s+1]}else this.selectedSuggestionGroup=this.suggestionGroups[0],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]}selectPreviousSuggestion(){if(this.suggestions){if(p(this.suggestions))this.selectPreviousGroupedSuggestion();else{const s=this.selectedSuggestion?this.suggestions.indexOf(this.selectedSuggestion):0;this.selectedSuggestion=this.suggestions[s-1]??this.suggestions[this.suggestions.length-1]}this.setAriaActiveDescendant(!0)}}selectPreviousGroupedSuggestion(){if(this.suggestions)if(this.selectedSuggestionGroup){const s=this.selectedSuggestion?this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion):-1;if(0===s){const s=this.suggestionGroups.indexOf(this.selectedSuggestionGroup);this.selectedSuggestionGroup=this.suggestionGroups[s-1]??this.suggestionGroups[this.suggestions.length-1],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]}else this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[s-1]}else this.selectedSuggestionGroup=this.suggestionGroups[this.suggestions.length-1],this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]}get suggestionGroups(){return p(this.suggestions)?this.suggestions:[]}setAriaActiveDescendant(s=!1){if(this.selectedSuggestion){const t=this.selectedSuggestionGroup?this.listboxGroupedItemId(this.selectedSuggestionGroup,this.selectedSuggestion):this.listboxItemId(this.selectedSuggestion);if(this.input?.setAttribute("aria-activedescendant",t),s){const s=this.host.getRootNode();if(!(s instanceof Document||s instanceof ShadowRoot))return void console.warn("Autosuggest: rootNode is not instance of Document or ShadowRoot");s.querySelector("#"+t)?s.querySelector("#"+t)?.scrollIntoView({block:"nearest"}):console.warn(`Autosuggest: Element with id ${t} is not found in the DOM.`)}}}resetSelectedSuggestion(){this.showLoading=!this.loadingDelayed,this.notFound=!1,this.selectedSuggestion=void 0,this.selectedSuggestionGroup=void 0,this.input?.setAttribute("aria-activedescendant","")}openSuggestions(s){this.showSuggestions=(this.suggestions&&this.suggestions.length>0)??!1,this.notFound=(this.suggestions&&0===this.suggestions?.length)??!1,this.input?.setAttribute("aria-expanded",""+(this.showSuggestions||this.notFound)),this.showSuggestions&&"first"===s?this.selectFirstSuggestion():this.showSuggestions&&"last"===s&&this.selectLastSuggestion()}closeSuggestions(){this.showSuggestions=!1,this.notFound=!1,this.input?.setAttribute("aria-expanded","false"),this.selectFirstSuggestion()}pickSelectedValue(){this.selectedSuggestion&&this.showSuggestions?this.dsoSelect.emit(this.selectedSuggestion):this.dsoSearch.emit(this.input?.value),this.closeSuggestions()}listboxItemId(s){return this.suggestions?`${this.inputId}-${b(this.suggestions)&&this.suggestions.indexOf(s)+1}`:""}listboxGroupedItemId(s,t){return this.suggestions?`${this.inputId}-${this.suggestionGroups.indexOf(s)+1}-${s.suggestions.indexOf(t)+1}`:""}getMarkedChunkedExtras(s,t){return s.reduce(((s,t,i)=>{const e=Math.floor(i/2);return s[e]||(s[e]=[]),s[e]?.push(t),s}),[]).map(((s,i)=>s.map(((s,e)=>this.handleMark(t,s,"extra",2*i+e)))))}getMarkedSuggestions(s){return{value:this.handleMark(s,s.value,"value"),type:s.type?this.handleMark(s,s.type,"type"):void 0,extras:s.extras?this.getMarkedChunkedExtras(s.extras,s):void 0}}getAutosuggestStatus(){if(this.notFound)return`"${this.inputValue}" is niet gevonden.`;let s=0;return b(this.suggestions)?s=this.suggestions.length:p(this.suggestions)&&(s=this.suggestions.reduce(((s,t)=>s+t.suggestions.length),0)),s+" resultaten gevonden."}render(){this.listboxItems=[];const s=this.showSuggestions||this.notFound,t=p(this.suggestions),i=b(this.suggestions);return s&&this.input?this.input.setAttribute("aria-controls",this.listboxId):this.input&&this.input.removeAttribute("aria-controls"),e(o,null,e("slot",{key:"27cfa8bc81482dca996532582d210a0edcee11b2"}),this.loading&&this.showLoading?e("div",{class:"autosuggest-progress-box"},e("dso-progress-indicator",{label:this.loadingLabel})):s&&e(o,null,e("dso-scrollable",{class:"listbox-container",ref:s=>this.listboxContainer=s,_preventFocus:!0},e("div",{class:"listbox",role:"listbox",id:this.listboxId,"aria-labelledby":this.labelId,ref:s=>this.listbox=s},i&&this.showSuggestions&&this.suggestions&&this.suggestions.map((s=>e(g,{id:this.listboxItemId(s),mouseEnter:()=>this.selectSuggestion(s),mouseLeave:()=>this.resetSelectedSuggestion(),click:this.onOptionClick,selected:""+(s===this.selectedSuggestion),suggestion:s,ref:s=>s&&this.listboxItems.push(s),markedSuggestion:this.getMarkedSuggestions(s)})))||t&&this.showSuggestions&&this.suggestions&&this.suggestions.map((s=>{const t=d();return e("div",{role:"group",class:"group","aria-labelledby":t},e("div",{class:"group-label",role:"presentation",id:t,ref:s=>s&&this.listboxItems.push(s)},s.groupLabel),s.suggestions.map((t=>e(g,{id:this.listboxGroupedItemId(s,t),mouseEnter:()=>this.selectSuggestion(t,s),mouseLeave:()=>this.resetSelectedSuggestion(),click:this.onOptionClick,selected:""+(t===this.selectedSuggestion),suggestion:t,ref:s=>s&&this.listboxItems.push(s),markedSuggestion:this.getMarkedSuggestions(t)}))))}))||this.notFound&&e("div",{class:"option"},e("span",{class:"value"},this.notFoundLabel||this.showInputValueNotFound(this.text("notFound",{inputValue:this.inputValue})))))),e("div",{class:"sr-only","aria-live":"polite","aria-atomic":"true"},this.getAutosuggestStatus())))}get host(){return this}static get watchers(){return{suggestions:[{suggestionsWatcher:0}]}}static get style(){return".sc-dso-autosuggest-h{display:block;position:relative}.listbox-container.sc-dso-autosuggest{inset-inline:0;inset-block-start:100%;block-size:auto;max-block-size:var(--_dso-autosuggest-max-block-size);min-block-size:50px;overflow-y:auto;position:absolute;z-index:200}.listbox.sc-dso-autosuggest,.autosuggest-progress-box.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-block:0}.autosuggest-progress-box.sc-dso-autosuggest{padding-block:12px;padding-inline:8px}.listbox.sc-dso-autosuggest{padding-block:8px;padding-inline:0}.listbox.sc-dso-autosuggest .group.sc-dso-autosuggest:not(:first-child) .group-label.sc-dso-autosuggest{border-block-start:1px solid #b2b2b2;padding-block-start:12px}.listbox.sc-dso-autosuggest .group-label.sc-dso-autosuggest{color:#275937;font-weight:700;padding-block:4px;margin-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest{padding-block:4px;padding-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest .suggestion-row.sc-dso-autosuggest{display:flex;justify-content:space-between}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active{background-color:#275937}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .type.sc-dso-autosuggest,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .extra.sc-dso-autosuggest{color:#fff}.option[aria-selected=true].sc-dso-autosuggest{cursor:pointer;background-color:#d7e7ce}mark.sc-dso-autosuggest{font-weight:700;background-color:inherit;color:inherit;padding:0}.type.sc-dso-autosuggest,.extra.sc-dso-autosuggest{color:#666}.type.sc-dso-autosuggest{text-align:end}.extra.sc-dso-autosuggest{font-size:0.875rem;line-height:1.3125rem}.extra.sc-dso-autosuggest:not(:first-child){text-align:end}"}},[262,"dso-autosuggest",{suggestions:[16],loading:[4],loadingLabel:[1,"loading-label"],loadingDelayed:[2,"loading-delayed"],notFoundLabel:[1,"not-found-label"],mark:[16],showSuggestions:[32],selectedSuggestion:[32],selectedSuggestionGroup:[32],notFound:[32],showLoading:[32]},[[8,"keydown","handleSearchBarButtonKeydown"],[4,"click","onDocumentClick"]],{suggestions:[{suggestionsWatcher:0}]}]),m=f,x=function(){"undefined"!=typeof customElements&&["dso-autosuggest","dso-icon","dso-progress-indicator","dso-scrollable"].forEach((s=>{switch(s){case"dso-autosuggest":customElements.get(h(s))||customElements.define(h(s),f);break;case"dso-icon":customElements.get(h(s))||r();break;case"dso-progress-indicator":customElements.get(h(s))||u();break;case"dso-scrollable":customElements.get(h(s))||c()}}))};export{m as DsoAutosuggest,x as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as n,h as o,transformTag as e}from"@stencil/core/internal/client";const i=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}render(){return o("div",{key:"a511c3b7e61371a74f3e55c0a71abaf56768cb52",class:"dso-contact-information"},o("slot",{key:"98fae6e8614de0c46fb8fb5d55e77f5807dc4231",name:"heading"}),o("slot",{key:"b84cd2bcc9a9874110d302b16ece15d37ab35896",name:"anchor-items"}),o("slot",{key:"32bae418af1a46f538c8cb4dde38e347f99cf7b1",name:"info-items"}))}static get style(){return":host{--_dso-link-icon-visibility:none;--_dso-link-icon-padding-inline-start:0;--_dso-link-icon-padding-inline-end:0;display:block}*,*::after,*::before{box-sizing:border-box}::slotted([slot=anchor-items]),::slotted([slot=info-items]){display:flex !important;flex-wrap:wrap !important;gap:16px 24px !important;padding-inline-start:0 !important;list-style:none !important}@media screen and (max-width: 991px){::slotted([slot=anchor-items]),::slotted([slot=info-items]){flex-direction:column !important;gap:16px !important}}::slotted([slot=info-items]){margin-block-end:0 !important}::slotted([slot=heading]){margin-block:0 16px !important;font-size:
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as n,h as o,transformTag as e}from"@stencil/core/internal/client";const i=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}render(){return o("div",{key:"a511c3b7e61371a74f3e55c0a71abaf56768cb52",class:"dso-contact-information"},o("slot",{key:"98fae6e8614de0c46fb8fb5d55e77f5807dc4231",name:"heading"}),o("slot",{key:"b84cd2bcc9a9874110d302b16ece15d37ab35896",name:"anchor-items"}),o("slot",{key:"32bae418af1a46f538c8cb4dde38e347f99cf7b1",name:"info-items"}))}static get style(){return":host{--_dso-link-icon-visibility:none;--_dso-link-icon-padding-inline-start:0;--_dso-link-icon-padding-inline-end:0;display:block}*,*::after,*::before{box-sizing:border-box}::slotted([slot=anchor-items]),::slotted([slot=info-items]){display:flex !important;flex-wrap:wrap !important;gap:16px 24px !important;padding-inline-start:0 !important;list-style:none !important}@media screen and (max-width: 991px){::slotted([slot=anchor-items]),::slotted([slot=info-items]){flex-direction:column !important;gap:16px !important}}::slotted([slot=info-items]){margin-block-end:0 !important}::slotted([slot=heading]){margin-block:0 16px !important;font-size:1rem !important}"}},[257,"dso-contact-information"]),s=i,a=function(){"undefined"!=typeof customElements&&["dso-contact-information"].forEach((t=>{"dso-contact-information"===t&&(customElements.get(e(t))||customElements.define(e(t),i))}))};export{s as DsoContactInformation,a as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as s,transformTag as o}from"@stencil/core/internal/client";function d(e){if(!e)return;const t=e.split("-");if(3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"string"==typeof t[2]){const[e,i,s]=t,o=e.padStart(2,"0"),d=i.padStart(2,"0");return[s.padStart(4,"0"),d,o].join("-")}return e}function a(e){return e?[e.getDate().toString(10).padStart(2,"0"),(e.getMonth()+1).toString(10).padStart(2,"0"),e.getFullYear().toString(10).padStart(4,"0")].join("-"):""}const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.dsoDateChange=i(this,"dsoDateChange",7),this.dsoBlur=i(this,"dsoBlur",7),this.dsoKeyUp=i(this,"dsoKeyUp",7),this.dsoKeyDown=i(this,"dsoKeyDown",7),this.dsoFocus=i(this,"dsoFocus",7),this.name="dso-date",this.disabled=!1,this.required=!1,this.dsoAutofocus=!1,this.value="",this.handleBlur=e=>{e.stopPropagation();const{target:t}=e;if(!(t instanceof HTMLInputElement))return;const{validity:i}=t,{value:s,valueAsDate:o}=this.dateValues(t),d=this.validityToError(i);this.dsoBlur.emit({component:"dso-date-picker",originalEvent:e,validity:i,value:s,valueAsDate:o,error:d})},this.handleFocus=e=>{e.stopPropagation(),this.dsoFocus.emit({originalEvent:e,component:"dso-date-picker"})},this.handleKeyUp=e=>{e.stopPropagation(),this.dsoKeyUp.emit({component:"dso-date-picker",originalEvent:e})},this.handleKeyDown=e=>{e.stopPropagation(),this.dsoKeyDown.emit({component:"dso-date-picker",originalEvent:e})},this.handleInputChange=e=>{const t=e.target;if(!(t instanceof HTMLInputElement))return;const{validity:i}=t,{value:s,valueAsDate:o}=this.dateValues(t),d=this.validityToError(i);this.dsoDateChange.emit({component:"dso-date-picker",originalEvent:e,validity:i,value:s,valueAsDate:o,error:d})}}dateValues(e){const{valueAsDate:t,validity:i}=e;return{value:a(t),valueAsDate:!i.rangeOverflow&&!i.rangeUnderflow&&t||void 0}}validityToError(e){return e.valueMissing?"required":e.rangeUnderflow?"min-range":e.rangeOverflow?"max-range":e.valid?void 0:"invalid"}render(){return s("input",{key:"06fd80a7119e551733de7fe25c722c677a32a029",type:"date",id:this.identifier,class:"dso-date__input",value:d(this.value),name:this.name,min:d(this.min),max:d(this.max),disabled:this.disabled||void 0,required:this.required||void 0,"aria-autocomplete":"none","aria-invalid":this.invalid?.toString(),"aria-describedby":this.describedBy,autoComplete:"off",autofocus:this.dsoAutofocus||void 0,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyUp:this.handleKeyUp,onKeyDown:this.handleKeyDown,onChange:this.handleInputChange})}get element(){return this}static get style(){return".sc-dso-date-picker-h{display:block}[invalid].sc-dso-date-picker-h:not([invalid=false]) .dso-date__input.sc-dso-date-picker{border-color:#ce3f51}.dso-date__input.sc-dso-date-picker{display:block;inline-size:100%;block-size:
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as s,transformTag as o}from"@stencil/core/internal/client";function d(e){if(!e)return;const t=e.split("-");if(3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"string"==typeof t[2]){const[e,i,s]=t,o=e.padStart(2,"0"),d=i.padStart(2,"0");return[s.padStart(4,"0"),d,o].join("-")}return e}function a(e){return e?[e.getDate().toString(10).padStart(2,"0"),(e.getMonth()+1).toString(10).padStart(2,"0"),e.getFullYear().toString(10).padStart(4,"0")].join("-"):""}const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.dsoDateChange=i(this,"dsoDateChange",7),this.dsoBlur=i(this,"dsoBlur",7),this.dsoKeyUp=i(this,"dsoKeyUp",7),this.dsoKeyDown=i(this,"dsoKeyDown",7),this.dsoFocus=i(this,"dsoFocus",7),this.name="dso-date",this.disabled=!1,this.required=!1,this.dsoAutofocus=!1,this.value="",this.handleBlur=e=>{e.stopPropagation();const{target:t}=e;if(!(t instanceof HTMLInputElement))return;const{validity:i}=t,{value:s,valueAsDate:o}=this.dateValues(t),d=this.validityToError(i);this.dsoBlur.emit({component:"dso-date-picker",originalEvent:e,validity:i,value:s,valueAsDate:o,error:d})},this.handleFocus=e=>{e.stopPropagation(),this.dsoFocus.emit({originalEvent:e,component:"dso-date-picker"})},this.handleKeyUp=e=>{e.stopPropagation(),this.dsoKeyUp.emit({component:"dso-date-picker",originalEvent:e})},this.handleKeyDown=e=>{e.stopPropagation(),this.dsoKeyDown.emit({component:"dso-date-picker",originalEvent:e})},this.handleInputChange=e=>{const t=e.target;if(!(t instanceof HTMLInputElement))return;const{validity:i}=t,{value:s,valueAsDate:o}=this.dateValues(t),d=this.validityToError(i);this.dsoDateChange.emit({component:"dso-date-picker",originalEvent:e,validity:i,value:s,valueAsDate:o,error:d})}}dateValues(e){const{valueAsDate:t,validity:i}=e;return{value:a(t),valueAsDate:!i.rangeOverflow&&!i.rangeUnderflow&&t||void 0}}validityToError(e){return e.valueMissing?"required":e.rangeUnderflow?"min-range":e.rangeOverflow?"max-range":e.valid?void 0:"invalid"}render(){return s("input",{key:"06fd80a7119e551733de7fe25c722c677a32a029",type:"date",id:this.identifier,class:"dso-date__input",value:d(this.value),name:this.name,min:d(this.min),max:d(this.max),disabled:this.disabled||void 0,required:this.required||void 0,"aria-autocomplete":"none","aria-invalid":this.invalid?.toString(),"aria-describedby":this.describedBy,autoComplete:"off",autofocus:this.dsoAutofocus||void 0,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyUp:this.handleKeyUp,onKeyDown:this.handleKeyDown,onChange:this.handleInputChange})}get element(){return this}static get style(){return".sc-dso-date-picker-h{display:block}[invalid].sc-dso-date-picker-h:not([invalid=false]) .dso-date__input.sc-dso-date-picker{border-color:#ce3f51}.dso-date__input.sc-dso-date-picker{display:block;inline-size:100%;block-size:calc(16px + 1.5rem);padding-block:6px;padding-inline:14px;font-size:1rem;line-height:1.5;color:#191919;background-color:#fff;background-image:none;border:1px solid #275937;border-radius:4px;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s}.dso-date__input.sc-dso-date-picker::-moz-placeholder{color:#666;opacity:1}.dso-date__input.sc-dso-date-picker:-ms-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-webkit-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-ms-expand{background-color:transparent;border:0}.dso-date__input.sc-dso-date-picker:focus{border-color:#275937;outline:0;box-shadow:inset 0 0 0 1px #275937}.dso-date__input[disabled].sc-dso-date-picker,.dso-date__input[readonly].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{background-color:#fff;opacity:1}.dso-date__input[disabled].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{cursor:default}.dso-date__input[disabled].sc-dso-date-picker{border-color:#e5e5e5;color:#999}.dso-date__input[readonly].sc-dso-date-picker{border-width:1px}.dso-date__input[type=text].sc-dso-date-picker{line-height:calc(16px + 1.5rem)}.dso-date__input[size].sc-dso-date-picker{inline-size:auto}.dso-date__input.sc-dso-date-picker::-webkit-calendar-picker-indicator{position:relative;inset-inline-end:-8px;font-size:1.75rem;filter:invert(50%) sepia(66%) saturate(6528%) hue-rotate(71deg) brightness(94%) contrast(91%)}"}},[2,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],required:[516],invalid:[516],describedBy:[1,"described-by"],dsoAutofocus:[4,"dso-autofocus"],value:[513],min:[1],max:[1]}]),r=n,c=function(){"undefined"!=typeof customElements&&["dso-date-picker"].forEach((e=>{"dso-date-picker"===e&&(customElements.get(o(e))||customElements.define(o(e),n))}))};export{r as DsoDatePicker,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as o,forceUpdate as t,h as s,Host as n,transformTag as r}from"@stencil/core/internal/client";import{c
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as o,forceUpdate as t,h as s,Host as n,transformTag as r}from"@stencil/core/internal/client";import{c}from"./clsx.js";import{v as d}from"./v4.js";const a=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get dropdownMenu(){return this.host.closest("dso-dropdown-menu")}componentWillLoad(){this.dropdownMenu?._getState().then((e=>{this.dropdownMenuState=e,t(this.host)}))}render(){const e=this.dropdownMenuState?.checkable,o=this.label?d():void 0;return s(n,{key:"c980682012525ce3546015fe7540fcf4e7faf136"},s("div",{key:"3f5c3a7cfd9ba183a32bb5e2a6d2755a18bc1456","aria-labelledby":o,role:"group"},this.label&&s("div",{key:"66e08cb43cac066676dfe98eac5c30a00d6d1135",id:o,class:c("group-label",{checkable:e}),role:"none"},this.label),s("slot",{key:"b3367a35147c303415c7f12910be0ba8dc5aad78"})))}get host(){return this}static get style(){return":host{display:block}.group-label{color:#999;font-size:0.875em;font-weight:400;margin:0;padding-block:4px 2px;padding-inline:20px;text-transform:uppercase}.group-label.checkable{padding-inline-start:40px}"}},[257,"dso-dropdown-menu-group",{label:[513]}]),i=a,l=function(){"undefined"!=typeof customElements&&["dso-dropdown-menu-group"].forEach((e=>{"dso-dropdown-menu-group"===e&&(customElements.get(r(e))||customElements.define(r(e),a))}))};export{i as DsoDropdownMenuGroup,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as o,createEvent as t,forceUpdate as n,h as i,Host as c,transformTag as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as o,createEvent as t,forceUpdate as n,h as i,Host as c,transformTag as d}from"@stencil/core/internal/client";import{c as s}from"./clsx.js";import{i as r}from"./is-modified-event.js";import{d as a}from"./icon.js";const b=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dsoClick=t(this,"dsoClick",7),this.handleClick=e=>{this.dsoClick.emit({originalEvent:e,isModifiedEvent:r(e)})}}async _dsoFocus(){this.anchorOrButtonRef?.focus()}get dropdownMenu(){return this.host.closest("dso-dropdown-menu")}componentWillLoad(){this.dropdownMenu?._getState().then((e=>{this.dropdownMenuState=e,n(this.host)}))}render(){const e=this.dropdownMenuState?.checkable,o=e?!!this.checked:void 0;return i(c,{key:"5468bcac99a2e1ad213d5f1f120b323c5e6aaca0"},i("div",{key:"069873f5c8de079328d8ea1b875682c575db81f0",role:"none",class:s([{checkable:e,checked:o}])},"button"===this.type&&i("button",{key:"db677f1410458682d3c5d9dcb796bb8221c9827f",type:"button",role:e?"menuitemradio":"menuitem","aria-checked":o?.toString(),onClick:this.handleClick,ref:e=>this.anchorOrButtonRef=e},e&&o&&i("dso-icon",{key:"ef98fef2183db8dbee9d5f3dbb3f1e46ce436750",icon:"check"}),i("slot",{key:"799feb352b1ff9af58c04a5dea11eee534f59027"})),"link"===this.type&&this.href&&i("a",{key:"af569dd1cd167021b68bcef8bed8d0f463549bbd",href:this.href,role:e?"menuitemradio":"menuitem","aria-checked":o?.toString(),onClick:this.handleClick,ref:e=>this.anchorOrButtonRef=e},e&&o&&i("dso-icon",{key:"c3130e6ee9a433bc7a21409772e6f47924d3c9fa",icon:"check"}),i("slot",{key:"d9d9751cd6c6be4d4af00f6ef92c135d4d6ea4d4"}))))}get host(){return this}static get style(){return":host{display:block}a:visited{color:#191919}button{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}button[disabled]{cursor:default}button::-moz-focus-inner{border:0;padding:0}button{background-color:transparent;border:0;border-radius:0;text-align:inherit;inline-size:100%}a,button{text-decoration:none}a:hover,a:focus-visible,a:active,button:hover,button:focus-visible,button:active{text-decoration:underline}a,button{clear:both;color:#191919;display:block;font-weight:400;line-height:1.5;padding-block:3px;padding-inline:20px;text-decoration:none;white-space:nowrap}a:hover,a:focus,button:hover,button:focus{background-color:#39870c;border-color:#39870c;color:#fff;text-decoration:none}a dso-icon,button dso-icon{margin-inline:-12px 4px}.checkable:not(.checked) a,.checkable:not(.checked) button{padding-inline-start:40px}.checked a:not(:focus),.checked button:not(:focus){background-color:#39870c;color:#fff}"}},[257,"dso-dropdown-menu-item",{type:[513],href:[513],checked:[516],_dsoFocus:[64]}]),f=b,h=function(){"undefined"!=typeof customElements&&["dso-dropdown-menu-item","dso-icon"].forEach((e=>{switch(e){case"dso-dropdown-menu-item":customElements.get(d(e))||customElements.define(d(e),b);break;case"dso-icon":customElements.get(d(e))||a()}}))};export{f as DsoDropdownMenuItem,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as o,HTMLElement as t,forceUpdate as r,h as e,Host as n,transformTag as s}from"@stencil/core/internal/client";import{a,c as i,o as d,f as l}from"./floating-ui.dom.js";import{c}from"./index2.js";import{d as b}from"./icon.js";import{v as p}from"./v4.js";const f=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.variant="secondary",this.open=!1,this.focusOutListener=o=>{!this.open||o.relatedTarget instanceof t||this.toggleOptions(!1)},this.keyDownHandler=o=>{if(o.target instanceof t&&!o.defaultPrevented&&this.open){switch(o.key){case"Tab":o.shiftKey?this.moveFocusToPrevious(o.target):this.moveFocusToNext(o.target);break;case"ArrowDown":this.moveFocusToNext(o.target,!1);break;case"ArrowUp":this.moveFocusToPrevious(o.target,!1);break;case"Escape":this.escape();break;default:return}o.preventDefault()}},this.escape=()=>{this.button?.focus(),this.toggleOptions(!1)};const{state:r}=c({checkable:!1});this.dropdownMenuState=r}get checkable(){return this.dropdownMenuState.checkable}set checkable(o){this.dropdownMenuState.checkable=o||!1,r(this.host)}dsoClickHandler(o){o.stopPropagation(),this.open&&o.target instanceof t&&this.toggleOptions(!1)}async _getState(){return this.dropdownMenuState}dropdownMenuTabbables(o){const t=this.host.isConnected?Array.from(this.host.querySelectorAll(":scope > dso-dropdown-menu-group > dso-dropdown-menu-item")):[];return o?[this.host,...t]:t}componentDidRender(){if(this.button&&this.popoverElement&&!this.cleanUp){const o=this.popoverElement,t=this.button;this.cleanUp=a(t,o,(()=>{i(t,o,{strategy:"fixed",middleware:[d(2),l({padding:2})],placement:"bottom-start"}).then((({x:t,y:r})=>{Object.assign(o.style,{left:t+"px",top:r+"px"})}))}))}}toggleOptions(o){this.open=o??!this.open,this.popoverElement?.isConnected&&this.popoverElement.togglePopover(this.open),this.open&&requestAnimationFrame((()=>this.moveFocusTo(this.firstItem(!1)))),!this.open&&this.cleanUp&&(this.cleanUp(),this.cleanUp=void 0)}disconnectedCallback(){this.toggleOptions(!1)}get lastItem(){return this.dropdownMenuTabbables(!0).at(-1)}firstItem(o){return this.dropdownMenuTabbables(o)[0]}moveFocusToPrevious(o,t=!0){const r=this.dropdownMenuTabbables(t).findIndex((t=>t===o)),e=this.dropdownMenuTabbables(t)[r-1]??this.lastItem;this.moveFocusTo(e)}moveFocusToNext(o,t=!0){const r=this.dropdownMenuTabbables(t).findIndex((t=>t===o)),e=this.dropdownMenuTabbables(t)[r+1]??this.firstItem(t);this.moveFocusTo(e)}moveFocusTo(o){o&&(o===this.host&&this.button?this.button.focus():"_dsoFocus"in o&&o._dsoFocus())}render(){const o=p();return e(n,{key:"04b9d28b55a06ae6f13811c0dd905c05ad92de25",onFocusout:this.focusOutListener,onKeyDown:this.keyDownHandler},this.label&&e("button",{key:"c096f5279d24ad7969f9cc18c24db374d314204f",id:o,class:"dso-"+this.variant,type:"button",onClick:()=>this.toggleOptions(),"aria-expanded":""+this.open,"aria-haspopup":"menu",ref:o=>this.button=o},this.label,e("dso-icon",{key:"861e2eb587415cd092487e3de7438fc884ceffe4",icon:this.open?"chevron-up":"chevron-down"})),e("div",{key:"8470a79b40f303020eb698c4f6727f1143fe398f",popover:"manual",class:"dso-dropdown-options","aria-labelledby":o,role:"menu",ref:o=>this.popoverElement=o},e("slot",{key:"0832da4107efa630d368c171348da1b9fb47cab6"})))}get host(){return this}static get style(){return":host(:focus) { outline: none; } :host { display: inline-block; } button { -webkit-appearance: button; color: inherit; cursor: pointer; font: inherit; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; overflow: visible; text-transform: none; } button[disabled] { cursor: default; } button::-moz-focus-inner { border: 0; padding: 0; } button.dso-primary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-primary:focus, button.dso-primary:focus-visible { outline-offset: 2px; } button.dso-primary:active { outline: 0; } button.dso-primary.extern::after, button.dso-primary.download::after { content: \"\"; display: inline-block; } button.dso-primary { background-color: var(--_dso-button-primary-background-color, #39870c); border-color: var(--_dso-button-primary-border-color, #39870c); color: var(--_dso-button-primary-color, #fff); float: var(--_dso-button-float-primary, none); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: 56px; inline-size: var(--_dso-button-inline-size, auto); padding-block: 11px; padding-inline: 15px; } button.dso-primary:hover { background-color: var(--_dso-button-primary-hover-background-color, #275937); border-color: var(--_dso-button-primary-hover-border-color, #275937); color: var(--_dso-button-primary-hover-color, #fff); float: var(--_dso-button-float-primary, none); } button.dso-primary:active { background-color: var(--_dso-button-primary-active-background-color, #173521); border-color: var(--_dso-button-primary-active-border-color, #173521); color: var(--_dso-button-primary-active-color, #fff); float: var(--_dso-button-float-primary, none); } button.dso-primary[disabled], button.dso-primary[disabled]:hover { background-color: var(--_dso-button-primary-disabled-background-color, #afcf9d); border-color: var(--_dso-button-primary-disabled-border-color, #afcf9d); color: var(--_dso-button-primary-disabled-color, #fff); float: var(--_dso-button-float-primary, none); } button.dso-primary.dso-small { line-height: 1rem; } button.dso-primary.dso-small dso-icon, button.dso-primary.dso-small.extern::after, button.dso-primary.dso-small.download::after, button.dso-primary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-primary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-extra-small { line-height: 1rem; } button.dso-primary.dso-extra-small dso-icon, button.dso-primary.dso-extra-small.extern::after, button.dso-primary.dso-extra-small.download::after, button.dso-primary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-primary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-extra-small { padding-block: 9px; } button.dso-primary dso-icon:has(+ span:not(.sr-only)) { margin-inline-start: -8px; } button.dso-primary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; margin-inline-end: -8px; } button.dso-primary dso-icon + span:not(.sr-only) { margin-inline-start: 8px; } button.dso-primary.dso-spinner-left[disabled], button.dso-primary.dso-spinner-right[disabled] { background-color: #39870c; border-color: #39870c; color: #fff; } button.dso-primary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-end: 8px; } button.dso-primary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-start: 8px; } button.dso-secondary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-secondary:focus, button.dso-secondary:focus-visible { outline-offset: 2px; } button.dso-secondary:active { outline: 0; } button.dso-secondary.extern::after, button.dso-secondary.download::after { content: \"\"; display: inline-block; } button.dso-secondary { background-color: var(--_dso-button-secondary-background-color, #fff); border-color: var(--_dso-button-secondary-border-color, #39870c); color: var(--_dso-button-secondary-color, #39870c); float: var(--_dso-button-float-secondary, none); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: 56px; inline-size: var(--_dso-button-inline-size, auto); padding-block: 11px; padding-inline: 15px; } button.dso-secondary:hover { background-color: var(--_dso-button-secondary-hover-background-color, #d7e7ce); border-color: var(--_dso-button-secondary-hover-border-color, #275937); color: var(--_dso-button-secondary-hover-color, #275937); float: var(--_dso-button-float-secondary, none); } button.dso-secondary:active { background-color: var(--_dso-button-secondary-active-background-color, #275937); border-color: var(--_dso-button-secondary-active-border-color, #275937); color: var(--_dso-button-secondary-active-color, #fff); float: var(--_dso-button-float-secondary, none); } button.dso-secondary[disabled], button.dso-secondary[disabled]:hover { background-color: var(--_dso-button-secondary-disabled-background-color, #fff); border-color: var(--_dso-button-secondary-disabled-border-color, #afcf9d); color: var(--_dso-button-secondary-disabled-color, #afcf9d); float: var(--_dso-button-float-secondary, none); } button.dso-secondary.dso-small { line-height: 1rem; } button.dso-secondary.dso-small dso-icon, button.dso-secondary.dso-small.extern::after, button.dso-secondary.dso-small.download::after, button.dso-secondary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-secondary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-extra-small { line-height: 1rem; } button.dso-secondary.dso-extra-small dso-icon, button.dso-secondary.dso-extra-small.extern::after, button.dso-secondary.dso-extra-small.download::after, button.dso-secondary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-secondary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-extra-small { padding-block: 9px; } button.dso-secondary dso-icon:has(+ span:not(.sr-only)) { margin-inline-start: -8px; } button.dso-secondary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; margin-inline-end: -8px; } button.dso-secondary dso-icon + span:not(.sr-only) { margin-inline-start: 8px; } button.dso-secondary.dso-spinner-left[disabled], button.dso-secondary.dso-spinner-right[disabled] { background-color: #fff; border-color: #39870c; color: #39870c; } button.dso-secondary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-end: 8px; } button.dso-secondary.dso-spinner-left:not([disabled]):hover::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-end: 8px; } button.dso-secondary.dso-spinner-left:not([disabled]).dso-small:hover::before { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-start: 8px; } button.dso-secondary.dso-spinner-right:not([disabled]):hover::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-start: 8px; } button.dso-secondary.dso-spinner-right:not([disabled]).dso-small:hover::after { block-size: 16px; inline-size: 16px; } button.dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-tertiary:focus, button.dso-tertiary:focus-visible { outline-offset: 2px; } button.dso-tertiary:active { outline: 0; } button.dso-tertiary.extern::after, button.dso-tertiary.download::after { content: \"\"; display: inline-block; } button.dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-tertiary:focus, button.dso-tertiary:focus-visible { outline-offset: 2px; } button.dso-tertiary:active { outline: 0; } button.dso-tertiary.extern::after, button.dso-tertiary.download::after { content: \"\"; display: inline-block; } button.dso-tertiary { background-color: var(--_dso-button-tertiary-background-color, ); border-color: var(--_dso-button-tertiary-border-color, ); color: var(--_dso-button-tertiary-color, #39870c); float: var(--_dso-button-float-tertiary, none); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: auto; inline-size: var(--_dso-button-inline-size, auto); padding-block: 11px; padding-inline: 15px; } button.dso-tertiary:hover { background-color: var(--_dso-button-tertiary-hover-background-color, ); border-color: var(--_dso-button-tertiary-hover-border-color, ); color: var(--_dso-button-tertiary-hover-color, #275937); float: var(--_dso-button-float-tertiary, none); } button.dso-tertiary:active { background-color: var(--_dso-button-tertiary-active-background-color, ); border-color: var(--_dso-button-tertiary-active-border-color, ); color: var(--_dso-button-tertiary-active-color, #173521); float: var(--_dso-button-float-tertiary, none); } button.dso-tertiary[disabled], button.dso-tertiary[disabled]:hover { background-color: var(--_dso-button-tertiary-disabled-background-color, ); border-color: var(--_dso-button-tertiary-disabled-border-color, ); color: var(--_dso-button-tertiary-disabled-color, #afcf9d); float: var(--_dso-button-float-tertiary, none); } button.dso-tertiary.dso-small { line-height: 1rem; } button.dso-tertiary.dso-small dso-icon, button.dso-tertiary.dso-small.extern::after, button.dso-tertiary.dso-small.download::after, button.dso-tertiary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-tertiary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-extra-small { line-height: 1rem; } button.dso-tertiary.dso-extra-small dso-icon, button.dso-tertiary.dso-extra-small.extern::after, button.dso-tertiary.dso-extra-small.download::after, button.dso-tertiary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-tertiary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-extra-small { padding-block: 9px; } button.dso-tertiary { border: 0; line-height: 1; padding-inline: 0; padding-block: var(--_dso-button-padding-block-tertiary, 0); background-color: transparent; } button.dso-tertiary[disabled].dso-spinner-left, button.dso-tertiary[disabled].dso-spinner-right { color: #39870c; } button.dso-tertiary:not([disabled]):hover { text-decoration: underline; text-underline-position: under; } button.dso-tertiary.dso-align { line-height: calc(1.5em - 1px); padding-block: 11px; padding-inline: 0; position: relative; } button.dso-tertiary.dso-truncate { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } button.dso-tertiary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-end: 8px; } button.dso-tertiary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-start: 8px; } button.dso-tertiary dso-icon + span:not(.sr-only), button.dso-tertiary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; } button.dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only), button.dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only), button.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left], button.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] { margin-inline-start: 0; } button.dso-tertiary dso-icon, button.dso-tertiary span { vertical-align: middle; } button dso-icon { margin-inline-start: 8px; } button:not(.dso-tertiary) dso-icon { margin-inline-end: 0; } .dso-dropdown-options { margin: 0 !important; overflow: unset; background-clip: padding-box; background-color: #fff; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.4); font-size: 1rem; min-inline-size: 160px; inline-size: max-content; padding-block: 5px; padding-inline: 0; z-index: 220; } ::slotted(dso-dropdown-menu-group:not(:last-child)) { border-block-end: 1px solid #e5e5e5; margin-block-end: 11px; padding-block-end: 11px; }"}},[257,"dso-dropdown-menu",{checkable:[6660],label:[513],variant:[513],open:[32],_getState:[64]},[[0,"dsoClick","dsoClickHandler"]]]),u=f,m=function(){"undefined"!=typeof customElements&&["dso-dropdown-menu","dso-icon"].forEach((o=>{switch(o){case"dso-dropdown-menu":customElements.get(s(o))||customElements.define(s(o),f);break;case"dso-icon":customElements.get(s(o))||b()}}))};export{u as DsoDropdownMenu,m as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as o,HTMLElement as t,forceUpdate as r,h as e,Host as n,transformTag as s}from"@stencil/core/internal/client";import{a,c as i,o as d,f as l,d as c}from"./floating-ui.dom.js";import{c as b}from"./index2.js";import{d as p}from"./icon.js";import{d as f}from"./scrollable.js";import{v as u}from"./v4.js";const m=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.variant="secondary",this.open=!1,this.focusOutListener=o=>{!this.open||o.relatedTarget instanceof t||this.toggleOptions(!1)},this.keyDownHandler=o=>{if(o.target instanceof t&&!o.defaultPrevented&&this.open){switch(o.key){case"Tab":o.shiftKey?this.moveFocusToPrevious(o.target):this.moveFocusToNext(o.target);break;case"ArrowDown":this.moveFocusToNext(o.target,!1);break;case"ArrowUp":this.moveFocusToPrevious(o.target,!1);break;case"Escape":this.escape();break;default:return}o.preventDefault()}},this.escape=()=>{this.button?.focus(),this.toggleOptions(!1)};const{state:r}=b({checkable:!1});this.dropdownMenuState=r}get checkable(){return this.dropdownMenuState.checkable}set checkable(o){this.dropdownMenuState.checkable=o||!1,r(this.host)}dsoClickHandler(o){o.stopPropagation(),this.open&&o.target instanceof t&&this.toggleOptions(!1)}async _getState(){return this.dropdownMenuState}dropdownMenuTabbables(o){const t=this.host.isConnected?Array.from(this.host.querySelectorAll(":scope > dso-dropdown-menu-group > dso-dropdown-menu-item")):[];return o?[this.host,...t]:t}componentDidRender(){if(this.button&&this.popoverElement&&!this.cleanUp){const o=this.popoverElement,t=this.button;this.cleanUp=a(t,o,(()=>{i(t,o,{strategy:"fixed",middleware:[d(2),l({padding:2}),c({apply({availableHeight:o,availableWidth:t,elements:r}){const e=r.floating.querySelector("dso-scrollable")??r.floating;Object.assign(e.style,{maxHeight:o+"px",maxInlineSize:t+"px"})}})],placement:"bottom-start"}).then((({x:t,y:r})=>{Object.assign(o.style,{left:t+"px",top:r+"px"})}))}))}}toggleOptions(o){this.open=o??!this.open,this.popoverElement?.isConnected&&this.popoverElement.togglePopover(this.open),this.open&&requestAnimationFrame((()=>this.moveFocusTo(this.firstItem(!1)))),!this.open&&this.cleanUp&&(this.cleanUp(),this.cleanUp=void 0)}disconnectedCallback(){this.toggleOptions(!1)}get lastItem(){return this.dropdownMenuTabbables(!0).at(-1)}firstItem(o){return this.dropdownMenuTabbables(o)[0]}moveFocusToPrevious(o,t=!0){const r=this.dropdownMenuTabbables(t).findIndex((t=>t===o)),e=this.dropdownMenuTabbables(t)[r-1]??this.lastItem;this.moveFocusTo(e)}moveFocusToNext(o,t=!0){const r=this.dropdownMenuTabbables(t).findIndex((t=>t===o)),e=this.dropdownMenuTabbables(t)[r+1]??this.firstItem(t);this.moveFocusTo(e)}moveFocusTo(o){o&&(o===this.host&&this.button?this.button.focus():"_dsoFocus"in o&&o._dsoFocus())}render(){const o=u();return e(n,{key:"fb24a3ee2a56ec3adce14f72da596f8d8d37e1bb",onFocusout:this.focusOutListener,onKeyDown:this.keyDownHandler},this.label&&e("button",{key:"b0faa08f561a0e2dd92b2431eb51aa550d573050",id:o,class:"dso-"+this.variant,type:"button",onClick:()=>this.toggleOptions(),"aria-expanded":""+this.open,"aria-haspopup":"menu",ref:o=>this.button=o},this.label,e("dso-icon",{key:"87623c7e94e6d5d6295de723cafa3430fce2d535",icon:this.open?"chevron-up":"chevron-down"})),e("div",{key:"4204d3bf86431d9b3a139330e27dc8ab6c5025af",popover:"manual",class:"dso-dropdown-options","aria-labelledby":o,role:"menu",ref:o=>this.popoverElement=o},e("dso-scrollable",{key:"dfef9de7599d5749d84ec01f054363fd928cec90"},e("slot",{key:"6d9f409c730a0b95d66a2f63addeb2e6392edb04"}))))}get host(){return this}static get style(){return":host(:focus) { outline: none; } :host { display: inline-block; } button { -webkit-appearance: button; color: inherit; cursor: pointer; font: inherit; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; overflow: visible; text-transform: none; } button[disabled] { cursor: default; } button::-moz-focus-inner { border: 0; padding: 0; } button.dso-primary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-primary:focus, button.dso-primary:focus-visible { outline-offset: 2px; } button.dso-primary:active { outline: 0; } button.dso-primary.extern::after, button.dso-primary.download::after { content: \"\"; display: inline-block; } button.dso-primary { background-color: var(--_dso-button-primary-background-color, #39870c); border-color: var(--_dso-button-primary-border-color, #39870c); color: var(--_dso-button-primary-color, #fff); float: var(--_dso-button-float-primary, none); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: 56px; inline-size: var(--_dso-button-inline-size, auto); padding-block: 11px; padding-inline: 15px; } button.dso-primary:hover { background-color: var(--_dso-button-primary-hover-background-color, #275937); border-color: var(--_dso-button-primary-hover-border-color, #275937); color: var(--_dso-button-primary-hover-color, #fff); float: var(--_dso-button-float-primary, none); } button.dso-primary:active { background-color: var(--_dso-button-primary-active-background-color, #173521); border-color: var(--_dso-button-primary-active-border-color, #173521); color: var(--_dso-button-primary-active-color, #fff); float: var(--_dso-button-float-primary, none); } button.dso-primary[disabled], button.dso-primary[disabled]:hover { background-color: var(--_dso-button-primary-disabled-background-color, #afcf9d); border-color: var(--_dso-button-primary-disabled-border-color, #afcf9d); color: var(--_dso-button-primary-disabled-color, #fff); float: var(--_dso-button-float-primary, none); } button.dso-primary.dso-small { line-height: 1rem; } button.dso-primary.dso-small dso-icon, button.dso-primary.dso-small.extern::after, button.dso-primary.dso-small.download::after, button.dso-primary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-primary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-extra-small { line-height: 1rem; } button.dso-primary.dso-extra-small dso-icon, button.dso-primary.dso-extra-small.extern::after, button.dso-primary.dso-extra-small.download::after, button.dso-primary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-primary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-primary.dso-extra-small { padding-block: 9px; } button.dso-primary dso-icon:has(+ span:not(.sr-only)) { margin-inline-start: -8px; } button.dso-primary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; margin-inline-end: -8px; } button.dso-primary dso-icon + span:not(.sr-only) { margin-inline-start: 8px; } button.dso-primary.dso-spinner-left[disabled], button.dso-primary.dso-spinner-right[disabled] { background-color: #39870c; border-color: #39870c; color: #fff; } button.dso-primary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-end: 8px; } button.dso-primary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-start: 8px; } button.dso-secondary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-secondary:focus, button.dso-secondary:focus-visible { outline-offset: 2px; } button.dso-secondary:active { outline: 0; } button.dso-secondary.extern::after, button.dso-secondary.download::after { content: \"\"; display: inline-block; } button.dso-secondary { background-color: var(--_dso-button-secondary-background-color, #fff); border-color: var(--_dso-button-secondary-border-color, #39870c); color: var(--_dso-button-secondary-color, #39870c); float: var(--_dso-button-float-secondary, none); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: 56px; inline-size: var(--_dso-button-inline-size, auto); padding-block: 11px; padding-inline: 15px; } button.dso-secondary:hover { background-color: var(--_dso-button-secondary-hover-background-color, #d7e7ce); border-color: var(--_dso-button-secondary-hover-border-color, #275937); color: var(--_dso-button-secondary-hover-color, #275937); float: var(--_dso-button-float-secondary, none); } button.dso-secondary:active { background-color: var(--_dso-button-secondary-active-background-color, #275937); border-color: var(--_dso-button-secondary-active-border-color, #275937); color: var(--_dso-button-secondary-active-color, #fff); float: var(--_dso-button-float-secondary, none); } button.dso-secondary[disabled], button.dso-secondary[disabled]:hover { background-color: var(--_dso-button-secondary-disabled-background-color, #fff); border-color: var(--_dso-button-secondary-disabled-border-color, #afcf9d); color: var(--_dso-button-secondary-disabled-color, #afcf9d); float: var(--_dso-button-float-secondary, none); } button.dso-secondary.dso-small { line-height: 1rem; } button.dso-secondary.dso-small dso-icon, button.dso-secondary.dso-small.extern::after, button.dso-secondary.dso-small.download::after, button.dso-secondary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-secondary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-extra-small { line-height: 1rem; } button.dso-secondary.dso-extra-small dso-icon, button.dso-secondary.dso-extra-small.extern::after, button.dso-secondary.dso-extra-small.download::after, button.dso-secondary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-secondary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-extra-small { padding-block: 9px; } button.dso-secondary dso-icon:has(+ span:not(.sr-only)) { margin-inline-start: -8px; } button.dso-secondary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; margin-inline-end: -8px; } button.dso-secondary dso-icon + span:not(.sr-only) { margin-inline-start: 8px; } button.dso-secondary.dso-spinner-left[disabled], button.dso-secondary.dso-spinner-right[disabled] { background-color: #fff; border-color: #39870c; color: #39870c; } button.dso-secondary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-end: 8px; } button.dso-secondary.dso-spinner-left:not([disabled]):hover::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-end: 8px; } button.dso-secondary.dso-spinner-left:not([disabled]).dso-small:hover::before { block-size: 16px; inline-size: 16px; } button.dso-secondary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-start: 8px; } button.dso-secondary.dso-spinner-right:not([disabled]):hover::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: top; inline-size: 24px; margin-inline-start: 8px; } button.dso-secondary.dso-spinner-right:not([disabled]).dso-small:hover::after { block-size: 16px; inline-size: 16px; } button.dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-tertiary:focus, button.dso-tertiary:focus-visible { outline-offset: 2px; } button.dso-tertiary:active { outline: 0; } button.dso-tertiary.extern::after, button.dso-tertiary.download::after { content: \"\"; display: inline-block; } button.dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: var(--_dso-button-text-align, start); user-select: none; vertical-align: middle; background-clip: padding-box; } button.dso-tertiary:focus, button.dso-tertiary:focus-visible { outline-offset: 2px; } button.dso-tertiary:active { outline: 0; } button.dso-tertiary.extern::after, button.dso-tertiary.download::after { content: \"\"; display: inline-block; } button.dso-tertiary { background-color: var(--_dso-button-tertiary-background-color, ); border-color: var(--_dso-button-tertiary-border-color, ); color: var(--_dso-button-tertiary-color, #39870c); float: var(--_dso-button-float-tertiary, none); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: auto; inline-size: var(--_dso-button-inline-size, auto); padding-block: 11px; padding-inline: 15px; } button.dso-tertiary:hover { background-color: var(--_dso-button-tertiary-hover-background-color, ); border-color: var(--_dso-button-tertiary-hover-border-color, ); color: var(--_dso-button-tertiary-hover-color, #275937); float: var(--_dso-button-float-tertiary, none); } button.dso-tertiary:active { background-color: var(--_dso-button-tertiary-active-background-color, ); border-color: var(--_dso-button-tertiary-active-border-color, ); color: var(--_dso-button-tertiary-active-color, #173521); float: var(--_dso-button-float-tertiary, none); } button.dso-tertiary[disabled], button.dso-tertiary[disabled]:hover { background-color: var(--_dso-button-tertiary-disabled-background-color, ); border-color: var(--_dso-button-tertiary-disabled-border-color, ); color: var(--_dso-button-tertiary-disabled-color, #afcf9d); float: var(--_dso-button-float-tertiary, none); } button.dso-tertiary.dso-small { line-height: 1rem; } button.dso-tertiary.dso-small dso-icon, button.dso-tertiary.dso-small.extern::after, button.dso-tertiary.dso-small.download::after, button.dso-tertiary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-tertiary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-extra-small { line-height: 1rem; } button.dso-tertiary.dso-extra-small dso-icon, button.dso-tertiary.dso-extra-small.extern::after, button.dso-tertiary.dso-extra-small.download::after, button.dso-tertiary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } button.dso-tertiary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } button.dso-tertiary.dso-extra-small { padding-block: 9px; } button.dso-tertiary { border: 0; line-height: 1; padding-inline: 0; padding-block: var(--_dso-button-padding-block-tertiary, 0); background-color: transparent; } button.dso-tertiary[disabled].dso-spinner-left, button.dso-tertiary[disabled].dso-spinner-right { color: #39870c; } button.dso-tertiary:not([disabled]):hover { text-decoration: underline; text-underline-position: under; } button.dso-tertiary.dso-align { line-height: calc(1.5em - 1px); padding-block: 11px; padding-inline: 0; position: relative; } button.dso-tertiary.dso-truncate { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } button.dso-tertiary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-end: 8px; } button.dso-tertiary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-start: 8px; } button.dso-tertiary dso-icon + span:not(.sr-only), button.dso-tertiary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; } button.dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only), button.dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only), button.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left], button.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] { margin-inline-start: 0; } button.dso-tertiary dso-icon, button.dso-tertiary span { vertical-align: middle; } button dso-icon { margin-inline-start: 8px; } button:not(.dso-tertiary) dso-icon { margin-inline-end: 0; } .dso-dropdown-options { box-sizing: border-box; margin: 0 !important; overflow: unset; background-clip: padding-box; background-color: #fff; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.4); font-size: 1rem; min-inline-size: 160px; inline-size: max-content; padding: 0; z-index: 220; } ::slotted(dso-dropdown-menu-group:not(:last-child)) { border-block-end: 1px solid #e5e5e5; margin-block-end: 11px; padding-block-end: 11px; }"}},[257,"dso-dropdown-menu",{checkable:[6660],label:[513],variant:[513],open:[32],_getState:[64]},[[0,"dsoClick","dsoClickHandler"]]]),g=m,y=function(){"undefined"!=typeof customElements&&["dso-dropdown-menu","dso-icon","dso-scrollable"].forEach((o=>{switch(o){case"dso-dropdown-menu":customElements.get(s(o))||customElements.define(s(o),m);break;case"dso-icon":customElements.get(s(o))||p();break;case"dso-scrollable":customElements.get(s(o))||f()}}))};export{g as DsoDropdownMenu,y as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as o,proxyCustomElement as i,HTMLElement as n,createEvent as e,forceUpdate as t,Host as s,Fragment as r,transformTag as d}from"@stencil/core/internal/client";import{a,c as l,o as h,f as u}from"./floating-ui.dom.js";import{c as p}from"./clsx.js";import{t as c}from"./index.esm.js";import{g as m}from"./get-active-element.js";import{i as f}from"./i18n.js";import{i as b}from"./is-modified-event.js";import{d as g}from"./icon.js";import{v}from"./v4.js";const w={en:{"dso-header":{menu:"Menu",login:"Log in",logout:"Log out",help:"Help",overflowMenu:"More"}},nl:{"dso-header":{menu:"Menu",login:"Inloggen",logout:"Uitloggen",help:"Help",overflowMenu:"Meer",userHome:"Mijn Omgevingsloket"}}},x=({item:i,onClick:n,key:e,ref:t})=>o("li",{class:p({"dso-active":i.active}),key:e,ref:t},o("a",{href:i.url,"aria-current":i.active?"page":void 0,onClick:n},i.label)),k=i(class extends n{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.dsoHeaderClick=e(this,"dsoHeaderClick",7),this.mainMenu=[],this.compact="auto",this.authStatus="none",this.showHelp=!1,this.userHomeActive=!1,this.visibleMenuItemsCount=void 0,this.dropdownOptionsOffset=0,this.open=!1,this.escape=()=>{this.dropdownButtonElement?.focus(),this.toggleOptions()},this.keyDownHandler=o=>{if(!o.defaultPrevented&&this.open){switch(o.key){case"Tab":this.tabInPopup(this.tabbables(!0),o.shiftKey?-1:1);break;case"ArrowDown":this.tabInPopup(this.tabbables(!1),1);break;case"ArrowUp":this.tabInPopup(this.tabbables(!1),-1);break;case"Escape":this.escape();break;case" ":o.target instanceof n&&o.target.click();break;default:return}o.preventDefault()}},this.resetVisibleMenuItems=()=>{this.visibleMenuItemsCount=void 0},this.clickHandler=(o,i,n)=>{this.toggleOptions(!1),this.dsoHeaderClick.emit({originalEvent:o,isModifiedEvent:b(o),type:i,menuItem:n?.menuItem,url:n?.url??n?.menuItem?.url})},this.menuItemElementRefs=[],this.text=f((()=>this.host),w),this.flushResize=()=>{this.resizeFrameId=void 0,this.host.isConnected&&(this.resetVisibleMenuItems(),this.toggleOptions(!1),this.dropdownOptionsOffset=0,t(this.host))},this.scheduleResize=()=>{void 0===this.resizeFrameId&&(this.resizeFrameId=requestAnimationFrame(this.flushResize))},this.resizeObserver=new ResizeObserver((()=>{this.scheduleResize()})),this.focusOutListener=o=>{!this.open||o.relatedTarget instanceof n&&this.tabbables(!0).includes(o.relatedTarget)||this.toggleOptions(!1)}}mainMenuChanged(){this.resetVisibleMenuItems()}tabInPopup(o,i){let n=o.findIndex((o=>o===m()))+i;n>=o.length?n=0:n<0&&(n=o.length-1),o[n]?.focus()}get isCompact(){return"always"===this.compact||window.innerWidth<992}calculateOverflowMenuItemCount(o){const i=o.offsetWidth,n=this.menuItemElementRefs[this.menuItemElementRefs.length-1],e=this.userHomeMenuItemElementRef??n,t=this.dropdownMenuItemElementRef;if(!e||!t||!n)return this.menuItemElementRefs.length;const s=t.offsetLeft+t.offsetWidth-(n.offsetLeft+n.offsetWidth);if(e.offsetLeft+e.offsetWidth-s<=i)return this.menuItemElementRefs.length;const r=i-s-(this.userHomeMenuItemElementRef?this.userHomeMenuItemElementRef.offsetLeft+this.userHomeMenuItemElementRef.offsetWidth-(t.offsetLeft+t.offsetWidth):0),d=this.menuItemElementRefs.findIndex((o=>o&&o.offsetLeft+o.offsetWidth>r));return d<0?this.menuItemElementRefs.length:d}calculateDropdownOptionsOffset(){return this.dropdownElement?this.host.clientHeight-(this.dropdownElement?.getBoundingClientRect().bottom-this.host.getBoundingClientRect().top):0}get visibleMainMenuItems(){return"number"==typeof this.visibleMenuItemsCount?this.mainMenu.slice(0,this.visibleMenuItemsCount):this.mainMenu}get hiddenMainMenuItems(){return"number"==typeof this.visibleMenuItemsCount?this.mainMenu.slice(this.visibleMenuItemsCount):[]}connectedCallback(){this.resizeObserver.observe(this.host)}disconnectedCallback(){this.resizeObserver.disconnect(),void 0!==this.resizeFrameId&&(cancelAnimationFrame(this.resizeFrameId),this.resizeFrameId=void 0),this.toggleOptions(!1)}componentDidRender(){if(this.host.isConnected&&(this.isCompact&&this.dropdownElement&&(this.dropdownOptionsOffset=this.calculateDropdownOptionsOffset()),void 0===this.visibleMenuItemsCount&&this.navElement&&(this.visibleMenuItemsCount=this.calculateOverflowMenuItemCount(this.navElement)),this.popoverElement&&!this.cleanUp&&this.dropdownButtonElement)){const o=this.popoverElement;this.cleanUp=a(this.dropdownButtonElement,o,(()=>{this.dropdownButtonElement&&l(this.dropdownButtonElement,o,{strategy:"fixed",middleware:[h(this.dropdownOptionsOffset),u({padding:this.dropdownOptionsOffset})],placement:this.isCompact?"bottom-end":"bottom-start"}).then((({x:i,y:n})=>{Object.assign(o.style,{left:i+"px",top:n+"px"})}))}))}}render(){return o(s,{key:"99c692979885d3c2bc1f0f6950b1395fdd233c85","is-compact":this.isCompact},o("div",{key:"328e012a746752be0d8531d0f5b0a905a07eb825",class:"dso-header"},o("div",{key:"f84877cdd45325fcc7b5a5093fd40f3de83f7a6e",class:"logo-container"},o("slot",{key:"915ff23b15413931ab9f334b46b2b3f7740706d4",name:"logo"})),this.isCompact?this.renderCompact():this.renderNormal()))}tabbables(o){const i=this.dropdownElement?c(this.dropdownElement):[];return o?i:i.filter((o=>o!==this.dropdownButtonElement))}toggleOptions(o){this.open=o??!this.open,this.popoverElement?.isConnected&&this.popoverElement?.togglePopover(this.open),!this.open&&this.cleanUp&&(this.cleanUp(),this.cleanUp=void 0)}renderCompact(){return(this.mainMenu.length>0||this.userHomeUrl||"none"!==this.authStatus)&&o("div",{class:"dropdown"},o("div",{class:"dropdown-menu",onFocusout:this.focusOutListener,ref:o=>this.dropdownElement=o},o("button",{id:v(),type:"button",onClick:()=>this.toggleOptions(),ref:o=>this.dropdownButtonElement=o,"aria-haspopup":"menu","aria-expanded":this.open?"true":"false"},o("span",null,this.text("menu")),o("dso-icon",{icon:"chevron-down"})),o("div",{popover:"manual",ref:o=>this.popoverElement=o},o("div",{class:"dropdown-menu-options",role:"menu","aria-labelledby":this.dropdownButtonElement?.id,onKeyDown:this.keyDownHandler},o("ul",{role:"group"},this.mainMenu.map((i=>o(x,{item:i,onClick:o=>this.clickHandler(o,"menuItem",{menuItem:i}),key:i.label}))),this.userHomeUrl&&o("li",{role:"menuitem"},o("a",{href:this.userHomeUrl,onClick:o=>this.clickHandler(o,"userHome",{url:this.userHomeUrl})},this.text("userHome"))),this.userProfileUrl&&this.userProfileName&&"loggedIn"===this.authStatus&&o("li",{role:"menuitem"},o("a",{href:this.userProfileUrl,onClick:o=>this.clickHandler(o,"profile",{url:this.userProfileUrl})},this.userProfileName,o("span",{class:"profile-label"}," - Mijn profiel"))),"loggedOut"===this.authStatus&&o("li",{role:"menuitem"},this.loginUrl?o("a",{href:this.loginUrl,onClick:o=>this.clickHandler(o,"login",{url:this.loginUrl})},this.text("login")):o("button",{type:"button",onClick:o=>this.clickHandler(o,"login")},this.text("login"))),"loggedIn"===this.authStatus&&o("li",{role:"menuitem"},this.logoutUrl?o("a",{href:this.logoutUrl,onClick:o=>this.clickHandler(o,"logout",{url:this.logoutUrl})},this.text("logout")):o("button",{type:"button",onClick:o=>this.clickHandler(o,"logout")},this.text("logout"))),this.showHelp&&o("li",{role:"menuitem"},this.helpUrl?o("a",{href:this.helpUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"help",{url:this.helpUrl})},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"})):o("button",{type:"button",class:"dso-tertiary",onClick:o=>this.clickHandler(o,"help")},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"}))))))))}renderNormal(){return this.menuItemElementRefs=[],o(r,null,o("div",{class:"dso-header-session"},this.userProfileUrl&&this.userProfileName&&"loggedIn"===this.authStatus&&o("div",{class:"profile"},o("a",{href:this.userProfileUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"profile",{url:this.userProfileUrl})},this.userProfileName)),"loggedOut"===this.authStatus&&o("div",{class:"login"},this.loginUrl?o("a",{href:this.loginUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"login",{url:this.loginUrl})},this.text("login")):o("button",{class:"dso-tertiary",type:"button",onClick:o=>this.clickHandler(o,"login")},this.text("login"))),"loggedIn"===this.authStatus&&o("div",{class:"logout"},this.logoutUrl?o("a",{href:this.logoutUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"logout",{url:this.logoutUrl})},this.text("logout")):o("button",{class:"dso-tertiary",type:"button",onClick:o=>this.clickHandler(o,"logout")},this.text("logout"))),this.showHelp&&o("div",{class:"help"},this.helpUrl?o("a",{href:this.helpUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"help",{url:this.helpUrl})},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"})):o("button",{class:"dso-tertiary",type:"button",onClick:o=>this.clickHandler(o,"help")},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"})))),(this.mainMenu.length>0||this.userHomeUrl)&&o("nav",{class:"dso-navbar"},o("ul",{class:p("dso-nav","dso-nav-main",{ready:void 0!==this.visibleMenuItemsCount}),ref:o=>this.navElement=o},this.visibleMainMenuItems.map(((i,n)=>o(x,{item:i,onClick:o=>this.clickHandler(o,"menuItem",{menuItem:i}),key:i.label,ref:o=>this.menuItemElementRefs[n]=o}))),(void 0===this.visibleMenuItemsCount||this.hiddenMainMenuItems.length>0)&&o("li",{"aria-hidden":void 0===this.visibleMenuItemsCount,ref:o=>this.dropdownMenuItemElementRef=o,class:"dropdown-menu-item"},o("div",{class:"dropdown-menu",onFocusout:this.focusOutListener,ref:o=>this.dropdownElement=o},o("button",{id:v(),type:"button",onClick:()=>this.toggleOptions(),ref:o=>this.dropdownButtonElement=o,"aria-haspopup":"menu","aria-expanded":this.open?"true":"false"},o("span",null,this.text("overflowMenu")),o("dso-icon",{icon:"chevron-down",class:"main-menu-item-icon"})),o("div",{popover:"manual",ref:o=>this.popoverElement=o},o("div",{class:"dropdown-menu-options",role:"menu","aria-labelledby":this.dropdownButtonElement?.id,onKeyDown:this.keyDownHandler},o("ul",null,this.hiddenMainMenuItems.map((i=>o(x,{item:i,onClick:o=>this.clickHandler(o,"menuItem",{menuItem:i}),key:i.label})))))))),this.userHomeUrl&&o("li",{class:p("menu-user-home",{"dso-active":this.userHomeActive}),ref:o=>this.userHomeMenuItemElementRef=o},o("a",{href:this.userHomeUrl,"aria-current":this.userHomeActive?"page":void 0,onClick:o=>this.clickHandler(o,"userHome",{url:this.userHomeUrl})},o("dso-icon",{icon:"user-outline",class:"main-menu-item-icon"}),this.text("userHome"))))))}get host(){return this}static get watchers(){return{mainMenu:[{mainMenuChanged:0}]}}static get style(){return"*,*::after,*::before{box-sizing:border-box}:host{display:block}:host([is-compact]) ::slotted([slot=logo]){--_dso-logo-block-size:2.5rem !important}:host([is-compact]) .dso-header{flex-wrap:nowrap}:host([is-compact]) .dropdown-menu .dropdown-menu-options{inline-size:100%}:host(:not([is-compact])) .dso-header{align-items:center}:host(:not([is-compact])) .dropdown-menu .dropdown-menu-options{inline-size:375px}div[popover]{margin:0 !important;border:0;padding:0;background-color:transparent;overflow:unset;inline-size:max-content}.dso-header{border-block-end:1px solid #ccc;display:flex;flex-wrap:wrap;position:relative}.dso-header .dso-nav{border:0}.logo-container{flex:1 1 12.5rem;margin-inline-end:24px;padding-block-end:16px;padding-block-start:16px}.dso-header-session{display:flex;align-items:center;margin-inline-start:auto}.dso-header-session .profile .dso-tertiary,.dso-header-session .login .dso-tertiary,.dso-header-session .logout .dso-tertiary,.dso-header-session .help .dso-tertiary{display:flex;cursor:pointer;border:0;background-color:transparent;padding-inline:0;outline-offset:2px;font-family:Asap, sans-serif;color:#39870c;font-size:1rem;font-weight:600;line-height:1.5;text-decoration:none}.dso-header-session .profile .dso-tertiary:hover,.dso-header-session .login .dso-tertiary:hover,.dso-header-session .logout .dso-tertiary:hover,.dso-header-session .help .dso-tertiary:hover{text-decoration:underline}.dso-header-session .profile+.logout,.dso-header-session .logout+.help,.dso-header-session .login+.help{border-inline-start:3px solid #ccc;margin-inline-start:8px;padding-inline-start:8px}.dso-header-session .help a,.dso-header-session .help button{display:flex}.dso-navbar{flex-basis:100%;max-inline-size:100%;position:relative}.dropdown-menu button{align-items:center;background-color:transparent;border:0;color:#39870c;display:flex;font-family:Asap, sans-serif;font-size:16px;font-weight:600;line-height:normal;position:relative}.dropdown-menu button::after{margin-inline-start:8px;position:absolute;inset-inline-end:0;inset-block-start:50%;transform:translateY(-50%)}.dropdown-menu button:hover,.dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dropdown-menu button dso-icon{inline-size:24px;block-size:24px;margin-inline-start:8px;padding-block-start:2px}.dropdown-menu button[aria-expanded=true] dso-icon{transform:rotate(180deg)}.dropdown-menu .dropdown-menu-options{background-clip:padding-box;background-color:#fff;border:0;border-radius:0;box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4);font-size:1rem;min-inline-size:160px;padding-block:5px;padding-inline:0;z-index:220}.dropdown-menu .dropdown-menu-options ul{margin:0;padding:0;list-style:none}.dropdown-menu .dropdown-menu-options ul:not(:last-child){border-block-end:1px solid #e5e5e5;margin-block-end:11px;padding-block-end:11px}.dropdown-menu .dropdown-menu-options ul li{list-style:none}.dropdown-menu .dropdown-menu-options ul li a,.dropdown-menu .dropdown-menu-options ul li button{text-decoration:none}.dropdown-menu .dropdown-menu-options ul li a:hover,.dropdown-menu .dropdown-menu-options ul li a:focus-visible,.dropdown-menu .dropdown-menu-options ul li a:active,.dropdown-menu .dropdown-menu-options ul li button:hover,.dropdown-menu .dropdown-menu-options ul li button:focus-visible,.dropdown-menu .dropdown-menu-options ul li button:active{text-decoration:underline}.dropdown-menu .dropdown-menu-options ul li a,.dropdown-menu .dropdown-menu-options ul li button{clear:both;color:#275937;display:block;font-size:1.25rem;font-weight:400;line-height:1.5;padding:16px;text-decoration:none;white-space:nowrap}.dropdown-menu .dropdown-menu-options ul li a:hover,.dropdown-menu .dropdown-menu-options ul li a:focus,.dropdown-menu .dropdown-menu-options ul li button:hover,.dropdown-menu .dropdown-menu-options ul li button:focus{background-color:#39870c;border-color:#39870c;color:#fff;text-decoration:none}.dropdown-menu .dropdown-menu-options ul li a:focus-visible,.dropdown-menu .dropdown-menu-options ul li button:focus-visible{background-color:#39870c;color:#fff}.dropdown-menu .dropdown-menu-options ul li a:hover,.dropdown-menu .dropdown-menu-options ul li button:hover{background-color:#fff;color:#275937;text-decoration:underline}.dropdown-menu .dropdown-menu-options ul li a:visited,.dropdown-menu .dropdown-menu-options ul li button:visited{color:#191919}.dropdown-menu .dropdown-menu-options ul li a:visited:not(:hover):not(:focus-visible),.dropdown-menu .dropdown-menu-options ul li button:visited:not(:hover):not(:focus-visible){color:#275937}.dropdown-menu .dropdown-menu-options ul li.dso-active a{font-weight:600}.dropdown-menu .dropdown-menu-options ul li+li{border-block-start:1px solid #ccc}.dropdown{margin-inline-start:auto;display:flex;align-items:center}.dropdown .dropdown-menu{position:static}.dropdown .dropdown-menu .dropdown-menu-options{inset-inline-end:0;inset-block-start:100%;box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4)}.dso-nav.ready .menu-user-home{margin-inline-start:auto}.dso-nav{align-items:end;column-gap:32px;display:flex;list-style:none;margin-block-end:0;margin-block-start:0;padding-inline-start:0}.dso-nav>li{margin-block-end:4px}.dso-nav>li>a{display:block}.dso-nav>li>a,.dso-nav>li>a:hover,.dso-nav>li>a:focus,.dso-nav>li>a:visited{color:#275937}.dso-nav>li.dso-active,.dso-nav>li.is-active{margin-block-end:0}.dso-nav>li.dso-active>a,.dso-nav>li.is-active>a{border-block-end:4px solid #8b4a6a;font-weight:bold}.dso-nav.dso-nav-main{display:flex !important}.dso-nav.dso-nav-main>li>a{text-decoration:none}.dso-nav.dso-nav-main>li>a:hover,.dso-nav.dso-nav-main>li>a:focus-visible,.dso-nav.dso-nav-main>li>a:active{text-decoration:underline}.dso-nav.dso-nav-main>li>a{font-size:1.25em;line-height:1;padding-block:16px;padding-inline:0;white-space:nowrap}.dso-nav.dso-nav-main .dropdown-menu .dropdown-menu-options{inset-inline-start:-1rem !important;inset-block-start:3px !important}.dso-nav.dso-nav-main .dropdown-menu button{font-size:1.25em;line-height:1;padding-block:16px;padding-inline:0;align-items:flex-end;color:#275937}.dso-nav.dso-nav-main .dropdown-menu button:hover,.dso-nav.dso-nav-main .dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dso-nav.dso-nav-main .dropdown-menu button::after{margin-inline-start:8px;position:absolute;inset-inline-end:0px;inset-block-start:auto;transform:none}.dso-nav .main-menu-item-icon{block-size:1em;margin-inline-end:8px;position:relative;inset-block-start:-2px;inline-size:1.2em}.dso-nav .dropdown-menu-item .main-menu-item-icon{margin-inline-end:0}"}},[257,"dso-header",{mainMenu:[16],compact:[1],authStatus:[1,"auth-status"],loginUrl:[1,"login-url"],logoutUrl:[1,"logout-url"],showHelp:[4,"show-help"],helpUrl:[1,"help-url"],userProfileName:[1,"user-profile-name"],userProfileUrl:[1,"user-profile-url"],userHomeUrl:[1,"user-home-url"],userHomeActive:[4,"user-home-active"],visibleMenuItemsCount:[32],dropdownOptionsOffset:[32],open:[32]},void 0,{mainMenu:[{mainMenuChanged:0}]}]),y=k,C=function(){"undefined"!=typeof customElements&&["dso-header","dso-icon"].forEach((o=>{switch(o){case"dso-header":customElements.get(d(o))||customElements.define(d(o),k);break;case"dso-icon":customElements.get(d(o))||g()}}))};export{y as DsoHeader,C as defineCustomElement}
|
|
1
|
+
import{h as o,proxyCustomElement as i,HTMLElement as e,createEvent as n,forceUpdate as t,Host as s,Fragment as r,transformTag as d}from"@stencil/core/internal/client";import{a,c as l,o as h,f as u,d as p}from"./floating-ui.dom.js";import{c}from"./clsx.js";import{t as m}from"./index.esm.js";import{g as b}from"./get-active-element.js";import{i as f}from"./i18n.js";import{i as g}from"./is-modified-event.js";import{d as v}from"./icon.js";import{d as w}from"./scrollable.js";import{v as x}from"./v4.js";const k={en:{"dso-header":{menu:"Menu",login:"Log in",logout:"Log out",help:"Help",overflowMenu:"More"}},nl:{"dso-header":{menu:"Menu",login:"Inloggen",logout:"Uitloggen",help:"Help",overflowMenu:"Meer",userHome:"Mijn Omgevingsloket"}}},y=({item:i,onClick:e,key:n,ref:t})=>o("li",{class:c({"dso-active":i.active}),key:n,ref:t},o("a",{href:i.url,"aria-current":i.active?"page":void 0,onClick:e},i.label)),C=i(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.dsoHeaderClick=n(this,"dsoHeaderClick",7),this.mainMenu=[],this.compact="auto",this.authStatus="none",this.showHelp=!1,this.userHomeActive=!1,this.visibleMenuItemsCount=void 0,this.dropdownOptionsOffset=0,this.open=!1,this.escape=()=>{this.dropdownButtonElement?.focus(),this.toggleOptions()},this.keyDownHandler=o=>{if(!o.defaultPrevented&&this.open){switch(o.key){case"Tab":this.tabInPopup(this.tabbables(!0),o.shiftKey?-1:1);break;case"ArrowDown":this.tabInPopup(this.tabbables(!1),1);break;case"ArrowUp":this.tabInPopup(this.tabbables(!1),-1);break;case"Escape":this.escape();break;case" ":o.target instanceof e&&o.target.click();break;default:return}o.preventDefault()}},this.resetVisibleMenuItems=()=>{this.visibleMenuItemsCount=void 0},this.clickHandler=(o,i,e)=>{this.toggleOptions(!1),this.dsoHeaderClick.emit({originalEvent:o,isModifiedEvent:g(o),type:i,menuItem:e?.menuItem,url:e?.url??e?.menuItem?.url})},this.menuItemElementRefs=[],this.text=f((()=>this.host),k),this.flushResize=()=>{this.resizeFrameId=void 0,this.host.isConnected&&(this.resetVisibleMenuItems(),this.toggleOptions(!1),this.dropdownOptionsOffset=0,t(this.host))},this.scheduleResize=()=>{void 0===this.resizeFrameId&&(this.resizeFrameId=requestAnimationFrame(this.flushResize))},this.resizeObserver=new ResizeObserver((()=>{this.scheduleResize()})),this.focusOutListener=o=>{!this.open||o.relatedTarget instanceof e&&this.tabbables(!0).includes(o.relatedTarget)||this.toggleOptions(!1)}}mainMenuChanged(){this.resetVisibleMenuItems()}tabInPopup(o,i){let e=o.findIndex((o=>o===b()))+i;e>=o.length?e=0:e<0&&(e=o.length-1),o[e]?.focus()}get isCompact(){return"always"===this.compact||window.innerWidth<992}calculateOverflowMenuItemCount(o){const i=o.offsetWidth,e=this.menuItemElementRefs[this.menuItemElementRefs.length-1],n=this.userHomeMenuItemElementRef??e,t=this.dropdownMenuItemElementRef;if(!n||!t||!e)return this.menuItemElementRefs.length;const s=t.offsetLeft+t.offsetWidth-(e.offsetLeft+e.offsetWidth);if(n.offsetLeft+n.offsetWidth-s<=i)return this.menuItemElementRefs.length;const r=i-s-(this.userHomeMenuItemElementRef?this.userHomeMenuItemElementRef.offsetLeft+this.userHomeMenuItemElementRef.offsetWidth-(t.offsetLeft+t.offsetWidth):0),d=this.menuItemElementRefs.findIndex((o=>o&&o.offsetLeft+o.offsetWidth>r));return d<0?this.menuItemElementRefs.length:d}calculateDropdownOptionsOffset(){return this.dropdownElement?this.host.clientHeight-(this.dropdownElement?.getBoundingClientRect().bottom-this.host.getBoundingClientRect().top):0}get visibleMainMenuItems(){return"number"==typeof this.visibleMenuItemsCount?this.mainMenu.slice(0,this.visibleMenuItemsCount):this.mainMenu}get hiddenMainMenuItems(){return"number"==typeof this.visibleMenuItemsCount?this.mainMenu.slice(this.visibleMenuItemsCount):[]}connectedCallback(){this.resizeObserver.observe(this.host)}disconnectedCallback(){this.resizeObserver.disconnect(),void 0!==this.resizeFrameId&&(cancelAnimationFrame(this.resizeFrameId),this.resizeFrameId=void 0),this.toggleOptions(!1)}componentDidRender(){if(this.host.isConnected&&(this.isCompact&&this.dropdownElement&&(this.dropdownOptionsOffset=this.calculateDropdownOptionsOffset()),void 0===this.visibleMenuItemsCount&&this.navElement&&(this.visibleMenuItemsCount=this.calculateOverflowMenuItemCount(this.navElement)),this.popoverElement&&!this.cleanUp&&this.dropdownButtonElement)){const o=this.popoverElement;this.cleanUp=a(this.dropdownButtonElement,o,(()=>{this.dropdownButtonElement&&l(this.dropdownButtonElement,o,{strategy:"fixed",middleware:[h(this.dropdownOptionsOffset),u({padding:this.dropdownOptionsOffset}),p({apply({availableHeight:o,availableWidth:i,elements:e}){const n=e.floating.querySelector(".dropdown-menu-options")??e.floating;Object.assign(n.style,{maxHeight:o+"px",maxInlineSize:i+"px"})}})],placement:this.isCompact?"bottom-end":"bottom-start"}).then((({x:i,y:e})=>{Object.assign(o.style,{left:i+"px",top:e+"px"})}))}))}}render(){return o(s,{key:"0edd012815b6b408bde18b0bc5f1c474bf4e83a3","is-compact":this.isCompact},o("div",{key:"abccc6c719264305b21546f45d335c9744ddc829",class:"dso-header"},o("div",{key:"55fe9d36d3b61251fd6c189def02f080efdadb95",class:"logo-container"},o("slot",{key:"90f81070b0aa4aedb2bb4973a1b2a45667b3261e",name:"logo"})),this.isCompact?this.renderCompact():this.renderNormal()))}tabbables(o){const i=this.dropdownElement?m(this.dropdownElement):[];return o?i:i.filter((o=>o!==this.dropdownButtonElement))}toggleOptions(o){this.open=o??!this.open,this.popoverElement?.isConnected&&this.popoverElement?.togglePopover(this.open),!this.open&&this.cleanUp&&(this.cleanUp(),this.cleanUp=void 0)}renderCompact(){return(this.mainMenu.length>0||this.userHomeUrl||"none"!==this.authStatus)&&o("div",{class:"dropdown"},o("div",{class:"dropdown-menu",onFocusout:this.focusOutListener,ref:o=>this.dropdownElement=o},o("button",{id:x(),type:"button",onClick:()=>this.toggleOptions(),ref:o=>this.dropdownButtonElement=o,"aria-haspopup":"menu","aria-expanded":this.open?"true":"false"},o("span",null,this.text("menu")),o("dso-icon",{icon:"chevron-down"})),o("div",{popover:"manual",ref:o=>this.popoverElement=o},o("dso-scrollable",{class:"dropdown-menu-options",role:"menu","aria-labelledby":this.dropdownButtonElement?.id,onKeyDown:this.keyDownHandler},o("ul",{role:"group"},this.mainMenu.map((i=>o(y,{item:i,onClick:o=>this.clickHandler(o,"menuItem",{menuItem:i}),key:i.label}))),this.userHomeUrl&&o("li",{role:"menuitem"},o("a",{href:this.userHomeUrl,onClick:o=>this.clickHandler(o,"userHome",{url:this.userHomeUrl})},this.text("userHome"))),this.userProfileUrl&&this.userProfileName&&"loggedIn"===this.authStatus&&o("li",{role:"menuitem"},o("a",{href:this.userProfileUrl,onClick:o=>this.clickHandler(o,"profile",{url:this.userProfileUrl})},this.userProfileName,o("span",{class:"profile-label"}," - Mijn profiel"))),"loggedOut"===this.authStatus&&o("li",{role:"menuitem"},this.loginUrl?o("a",{href:this.loginUrl,onClick:o=>this.clickHandler(o,"login",{url:this.loginUrl})},this.text("login")):o("button",{type:"button",onClick:o=>this.clickHandler(o,"login")},this.text("login"))),"loggedIn"===this.authStatus&&o("li",{role:"menuitem"},this.logoutUrl?o("a",{href:this.logoutUrl,onClick:o=>this.clickHandler(o,"logout",{url:this.logoutUrl})},this.text("logout")):o("button",{type:"button",onClick:o=>this.clickHandler(o,"logout")},this.text("logout"))),this.showHelp&&o("li",{role:"menuitem"},this.helpUrl?o("a",{href:this.helpUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"help",{url:this.helpUrl})},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"})):o("button",{type:"button",class:"dso-tertiary",onClick:o=>this.clickHandler(o,"help")},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"}))))))))}renderNormal(){return this.menuItemElementRefs=[],o(r,null,o("div",{class:"dso-header-session"},this.userProfileUrl&&this.userProfileName&&"loggedIn"===this.authStatus&&o("div",{class:"profile"},o("a",{href:this.userProfileUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"profile",{url:this.userProfileUrl})},this.userProfileName)),"loggedOut"===this.authStatus&&o("div",{class:"login"},this.loginUrl?o("a",{href:this.loginUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"login",{url:this.loginUrl})},this.text("login")):o("button",{class:"dso-tertiary",type:"button",onClick:o=>this.clickHandler(o,"login")},this.text("login"))),"loggedIn"===this.authStatus&&o("div",{class:"logout"},this.logoutUrl?o("a",{href:this.logoutUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"logout",{url:this.logoutUrl})},this.text("logout")):o("button",{class:"dso-tertiary",type:"button",onClick:o=>this.clickHandler(o,"logout")},this.text("logout"))),this.showHelp&&o("div",{class:"help"},this.helpUrl?o("a",{href:this.helpUrl,class:"dso-tertiary",onClick:o=>this.clickHandler(o,"help",{url:this.helpUrl})},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"})):o("button",{class:"dso-tertiary",type:"button",onClick:o=>this.clickHandler(o,"help")},o("span",null,this.text("help")),o("dso-icon",{icon:"help-outline"})))),(this.mainMenu.length>0||this.userHomeUrl)&&o("nav",{class:"dso-navbar"},o("ul",{class:c("dso-nav","dso-nav-main",{ready:void 0!==this.visibleMenuItemsCount}),ref:o=>this.navElement=o},this.visibleMainMenuItems.map(((i,e)=>o(y,{item:i,onClick:o=>this.clickHandler(o,"menuItem",{menuItem:i}),key:i.label,ref:o=>this.menuItemElementRefs[e]=o}))),(void 0===this.visibleMenuItemsCount||this.hiddenMainMenuItems.length>0)&&o("li",{"aria-hidden":void 0===this.visibleMenuItemsCount,ref:o=>this.dropdownMenuItemElementRef=o,class:"dropdown-menu-item"},o("div",{class:"dropdown-menu",onFocusout:this.focusOutListener,ref:o=>this.dropdownElement=o},o("button",{id:x(),type:"button",onClick:()=>this.toggleOptions(),ref:o=>this.dropdownButtonElement=o,"aria-haspopup":"menu","aria-expanded":this.open?"true":"false"},o("span",null,this.text("overflowMenu")),o("dso-icon",{icon:"chevron-down",class:"main-menu-item-icon"})),o("div",{popover:"manual",ref:o=>this.popoverElement=o},o("div",{class:"dropdown-menu-options",role:"menu","aria-labelledby":this.dropdownButtonElement?.id,onKeyDown:this.keyDownHandler},o("ul",null,this.hiddenMainMenuItems.map((i=>o(y,{item:i,onClick:o=>this.clickHandler(o,"menuItem",{menuItem:i}),key:i.label})))))))),this.userHomeUrl&&o("li",{class:c("menu-user-home",{"dso-active":this.userHomeActive}),ref:o=>this.userHomeMenuItemElementRef=o},o("a",{href:this.userHomeUrl,"aria-current":this.userHomeActive?"page":void 0,onClick:o=>this.clickHandler(o,"userHome",{url:this.userHomeUrl})},o("dso-icon",{icon:"user-outline",class:"main-menu-item-icon"}),this.text("userHome"))))))}get host(){return this}static get watchers(){return{mainMenu:[{mainMenuChanged:0}]}}static get style(){return"*,*::after,*::before{box-sizing:border-box}:host{display:block}:host([is-compact]) ::slotted([slot=logo]){--_dso-logo-block-size:2.5rem !important}:host([is-compact]) .dso-header{flex-wrap:nowrap}:host([is-compact]) .dropdown-menu .dropdown-menu-options{inline-size:100%}:host(:not([is-compact])) .dso-header{align-items:center}:host(:not([is-compact])) .dropdown-menu .dropdown-menu-options{inline-size:375px}div[popover]{margin:0 !important;border:0;padding:0;background-color:transparent;overflow:unset;inline-size:max-content}.dso-header{border-block-end:1px solid #ccc;display:flex;flex-wrap:wrap;position:relative}.dso-header .dso-nav{border:0}.logo-container{flex:1 1 12.5rem;margin-inline-end:24px;padding-block-end:16px;padding-block-start:16px}.dso-header-session{display:flex;align-items:center;margin-inline-start:auto}.dso-header-session .profile .dso-tertiary,.dso-header-session .login .dso-tertiary,.dso-header-session .logout .dso-tertiary,.dso-header-session .help .dso-tertiary{display:flex;cursor:pointer;border:0;background-color:transparent;padding-inline:0;outline-offset:2px;font-family:Asap, sans-serif;color:#39870c;font-size:1rem;font-weight:600;line-height:1.5;text-decoration:none}.dso-header-session .profile .dso-tertiary:hover,.dso-header-session .login .dso-tertiary:hover,.dso-header-session .logout .dso-tertiary:hover,.dso-header-session .help .dso-tertiary:hover{text-decoration:underline}.dso-header-session .profile+.logout,.dso-header-session .logout+.help,.dso-header-session .login+.help{border-inline-start:3px solid #ccc;margin-inline-start:8px;padding-inline-start:8px}.dso-header-session .help a,.dso-header-session .help button{display:flex}.dso-navbar{flex-basis:100%;max-inline-size:100%;position:relative}.dropdown-menu button{align-items:center;background-color:transparent;border:0;color:#39870c;display:flex;font-family:Asap, sans-serif;font-size:1rem;font-weight:600;line-height:normal;position:relative}.dropdown-menu button::after{margin-inline-start:8px;position:absolute;inset-inline-end:0;inset-block-start:50%;transform:translateY(-50%)}.dropdown-menu button:hover,.dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dropdown-menu button dso-icon{inline-size:24px;block-size:24px;margin-inline-start:8px;padding-block-start:2px}.dropdown-menu button[aria-expanded=true] dso-icon{transform:rotate(180deg)}.dropdown-menu .dropdown-menu-options{box-sizing:border-box;background-clip:padding-box;background-color:#fff;border:0;border-radius:0;box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4);font-size:1rem;min-inline-size:160px;padding-inline:0;z-index:220}.dropdown-menu .dropdown-menu-options ul{margin:0;padding:0;list-style:none}.dropdown-menu .dropdown-menu-options ul:not(:last-child){border-block-end:1px solid #e5e5e5;margin-block-end:11px;padding-block-end:11px}.dropdown-menu .dropdown-menu-options ul li{list-style:none}.dropdown-menu .dropdown-menu-options ul li a,.dropdown-menu .dropdown-menu-options ul li button{text-decoration:none}.dropdown-menu .dropdown-menu-options ul li a:hover,.dropdown-menu .dropdown-menu-options ul li a:focus-visible,.dropdown-menu .dropdown-menu-options ul li a:active,.dropdown-menu .dropdown-menu-options ul li button:hover,.dropdown-menu .dropdown-menu-options ul li button:focus-visible,.dropdown-menu .dropdown-menu-options ul li button:active{text-decoration:underline}.dropdown-menu .dropdown-menu-options ul li a,.dropdown-menu .dropdown-menu-options ul li button{clear:both;color:#275937;display:block;font-size:1.25rem;font-weight:400;line-height:1.5;padding:16px;text-decoration:none;white-space:nowrap}.dropdown-menu .dropdown-menu-options ul li a:hover,.dropdown-menu .dropdown-menu-options ul li a:focus,.dropdown-menu .dropdown-menu-options ul li button:hover,.dropdown-menu .dropdown-menu-options ul li button:focus{background-color:#39870c;border-color:#39870c;color:#fff;text-decoration:none}.dropdown-menu .dropdown-menu-options ul li a:focus-visible,.dropdown-menu .dropdown-menu-options ul li button:focus-visible{background-color:#39870c;color:#fff}.dropdown-menu .dropdown-menu-options ul li a:hover,.dropdown-menu .dropdown-menu-options ul li button:hover{background-color:#fff;color:#275937;text-decoration:underline}.dropdown-menu .dropdown-menu-options ul li a:visited,.dropdown-menu .dropdown-menu-options ul li button:visited{color:#191919}.dropdown-menu .dropdown-menu-options ul li a:visited:not(:hover):not(:focus-visible),.dropdown-menu .dropdown-menu-options ul li button:visited:not(:hover):not(:focus-visible){color:#275937}.dropdown-menu .dropdown-menu-options ul li.dso-active a{font-weight:600}.dropdown-menu .dropdown-menu-options ul li+li{border-block-start:1px solid #ccc}.dropdown{margin-inline-start:auto;display:flex;align-items:center}.dropdown .dropdown-menu{position:static}.dropdown .dropdown-menu .dropdown-menu-options{inset-inline-end:0;inset-block-start:100%;box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4)}.dso-nav.ready .menu-user-home{margin-inline-start:auto}.dso-nav{align-items:end;column-gap:32px;display:flex;list-style:none;margin-block-end:0;margin-block-start:0;padding-inline-start:0}.dso-nav>li{margin-block-end:4px}.dso-nav>li>a{display:block}.dso-nav>li>a,.dso-nav>li>a:hover,.dso-nav>li>a:focus,.dso-nav>li>a:visited{color:#275937}.dso-nav>li.dso-active,.dso-nav>li.is-active{margin-block-end:0}.dso-nav>li.dso-active>a,.dso-nav>li.is-active>a{border-block-end:4px solid #8b4a6a;font-weight:bold}.dso-nav.dso-nav-main{display:flex !important}.dso-nav.dso-nav-main>li>a{text-decoration:none}.dso-nav.dso-nav-main>li>a:hover,.dso-nav.dso-nav-main>li>a:focus-visible,.dso-nav.dso-nav-main>li>a:active{text-decoration:underline}.dso-nav.dso-nav-main>li>a{font-size:1.25em;line-height:1;padding-block:16px;padding-inline:0;white-space:nowrap}.dso-nav.dso-nav-main .dropdown-menu .dropdown-menu-options{inset-inline-start:-1rem !important;inset-block-start:3px !important}.dso-nav.dso-nav-main .dropdown-menu button{font-size:1.25em;line-height:1;padding-block:16px;padding-inline:0;align-items:flex-end;color:#275937}.dso-nav.dso-nav-main .dropdown-menu button:hover,.dso-nav.dso-nav-main .dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dso-nav.dso-nav-main .dropdown-menu button::after{margin-inline-start:8px;position:absolute;inset-inline-end:0px;inset-block-start:auto;transform:none}.dso-nav .main-menu-item-icon{block-size:1em;margin-inline-end:8px;position:relative;inset-block-start:-2px;inline-size:1.2em}.dso-nav .dropdown-menu-item .main-menu-item-icon{margin-inline-end:0}"}},[257,"dso-header",{mainMenu:[16],compact:[1],authStatus:[1,"auth-status"],loginUrl:[1,"login-url"],logoutUrl:[1,"logout-url"],showHelp:[4,"show-help"],helpUrl:[1,"help-url"],userProfileName:[1,"user-profile-name"],userProfileUrl:[1,"user-profile-url"],userHomeUrl:[1,"user-home-url"],userHomeActive:[4,"user-home-active"],visibleMenuItemsCount:[32],dropdownOptionsOffset:[32],open:[32]},void 0,{mainMenu:[{mainMenuChanged:0}]}]),M=C,z=function(){"undefined"!=typeof customElements&&["dso-header","dso-icon","dso-scrollable"].forEach((o=>{switch(o){case"dso-header":customElements.get(d(o))||customElements.define(d(o),C);break;case"dso-icon":customElements.get(d(o))||v();break;case"dso-scrollable":customElements.get(d(o))||w()}}))};export{M as DsoHeader,z as defineCustomElement}
|