@dso-toolkit/core 76.0.0 → 77.0.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 +5 -5
- package/dist/bundle/dso-action-list-item.js +1 -1
- package/dist/bundle/dso-advanced-select.js +3 -3
- package/dist/bundle/dso-alert.js +1 -1
- package/dist/bundle/dso-annotation-activiteit.js +5 -5
- package/dist/bundle/dso-annotation-activiteit.js.map +1 -1
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.js +5 -5
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.js.map +1 -1
- package/dist/bundle/dso-annotation-kaart.js +3 -3
- package/dist/bundle/dso-annotation-kaart.js.map +1 -1
- package/dist/bundle/dso-annotation-locatie.js +1 -1
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.js +5 -5
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.js.map +1 -1
- package/dist/bundle/dso-attachments-counter.js +1 -1
- package/dist/bundle/dso-autosuggest.js +3 -3
- package/dist/bundle/dso-button-group.d.ts +11 -0
- package/dist/bundle/dso-button-group.js +9 -0
- package/dist/bundle/dso-button-group.js.map +1 -0
- package/dist/bundle/dso-card-container.js +1 -1
- package/dist/bundle/dso-card.js +4 -4
- package/dist/bundle/dso-card.js.map +1 -1
- package/dist/bundle/dso-contact-information.js +1 -1
- package/dist/bundle/dso-date-picker-legacy.js +4 -4
- package/dist/bundle/dso-date-picker.js +1 -1
- package/dist/bundle/dso-document-card.js +2 -2
- package/dist/bundle/dso-document-component.js +1 -1
- package/dist/bundle/dso-dropdown-menu.js +1 -1
- package/dist/bundle/dso-header.js +4 -4
- package/dist/bundle/dso-header.js.map +1 -1
- package/dist/bundle/dso-highlight-box.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-item.js +6 -6
- package/dist/bundle/dso-list-button.js +5 -5
- package/dist/bundle/dso-logo.js +1 -1
- package/dist/bundle/dso-map-base-layers.js +5 -5
- package/dist/bundle/dso-map-controls.js +12 -6
- package/dist/bundle/dso-map-controls.js.map +1 -1
- package/dist/bundle/dso-map-overlays.js +5 -5
- package/dist/bundle/dso-mark-bar.js +2 -2
- package/dist/bundle/dso-modal.js +3 -3
- package/dist/bundle/dso-onboarding-tip.js +3 -1661
- package/dist/bundle/dso-onboarding-tip.js.map +1 -1
- package/dist/bundle/dso-ozon-content.js +1 -1
- package/dist/bundle/dso-pagination.js +3 -3
- package/dist/bundle/dso-pagination.js.map +1 -1
- package/dist/bundle/dso-panel.js +1 -1
- package/dist/bundle/dso-plekinfo-card.js +2 -2
- package/dist/bundle/dso-progress-bar.js +1 -1
- 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-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-toggletip.js +1 -1
- package/dist/bundle/dso-tooltip.js +1 -1
- 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 +13 -13
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/{p-BS-Y76bJ.js → p-9zjtdLN6.js} +3 -3
- package/dist/bundle/{p-BS-Y76bJ.js.map → p-9zjtdLN6.js.map} +1 -1
- package/dist/bundle/{p-DAtQydKx.js → p-BBxSnuWP.js} +4 -4
- package/dist/bundle/{p-DAtQydKx.js.map → p-BBxSnuWP.js.map} +1 -1
- package/dist/bundle/{p-C0s1JAlb.js → p-BGaAMVmM.js} +6 -6
- package/dist/bundle/{p-C0s1JAlb.js.map → p-BGaAMVmM.js.map} +1 -1
- package/dist/bundle/{p-C62PayXc.js → p-BLcgQKpu.js} +3 -3
- package/dist/bundle/{p-C62PayXc.js.map → p-BLcgQKpu.js.map} +1 -1
- package/dist/bundle/{p-DhhVHw2w.js → p-BP2p2tL5.js} +12 -12
- package/dist/bundle/{p-DhhVHw2w.js.map → p-BP2p2tL5.js.map} +1 -1
- package/dist/bundle/{p-L6frHRla.js → p-BlvELqv3.js} +8 -8
- package/dist/bundle/{p-L6frHRla.js.map → p-BlvELqv3.js.map} +1 -1
- package/dist/bundle/{p-_DIUHRiS.js → p-BzRDrr-_.js} +3 -3
- package/dist/bundle/{p-_DIUHRiS.js.map → p-BzRDrr-_.js.map} +1 -1
- package/dist/bundle/{p-r4JnUhJ5.js → p-CMjyxr8o.js} +4 -4
- package/dist/bundle/{p-r4JnUhJ5.js.map → p-CMjyxr8o.js.map} +1 -1
- package/dist/bundle/{p-BJhPYrsL.js → p-CoKesn28.js} +4 -4
- package/dist/bundle/{p-BJhPYrsL.js.map → p-CoKesn28.js.map} +1 -1
- package/dist/bundle/p-Cve9JK5u.js +58 -0
- package/dist/bundle/p-Cve9JK5u.js.map +1 -0
- package/dist/bundle/{p-CdvSnpb_.js → p-CyJdlUc_.js} +3 -3
- package/dist/bundle/{p-CdvSnpb_.js.map → p-CyJdlUc_.js.map} +1 -1
- package/dist/bundle/{p-BI8W5IHk.js → p-DJ7nyiIt.js} +4 -4
- package/dist/bundle/{p-BI8W5IHk.js.map → p-DJ7nyiIt.js.map} +1 -1
- package/dist/bundle/{p-Dp31hMfn.js → p-DK7N75_d.js} +48 -115
- package/dist/bundle/p-DK7N75_d.js.map +1 -0
- package/dist/bundle/{p-CIShecZA.js → p-DM1_b6nQ.js} +3 -3
- package/dist/bundle/{p-CIShecZA.js.map → p-DM1_b6nQ.js.map} +1 -1
- package/dist/{cjs/has-overflow-B_4p67wC.js → bundle/p-DNO4kzq4.js} +311 -7
- package/dist/bundle/p-DNO4kzq4.js.map +1 -0
- package/dist/bundle/{p-J2YfZwgD.js → p-DSdjKKyW.js} +7 -7
- package/dist/bundle/{p-J2YfZwgD.js.map → p-DSdjKKyW.js.map} +1 -1
- package/dist/bundle/{p-D1jpHeMq.js → p-DZ8OX1GG.js} +3 -3
- package/dist/bundle/{p-D1jpHeMq.js.map → p-DZ8OX1GG.js.map} +1 -1
- package/dist/bundle/{p-CgRdthz0.js → p-DpoKLKOQ.js} +5 -5
- package/dist/bundle/{p-CgRdthz0.js.map → p-DpoKLKOQ.js.map} +1 -1
- package/dist/bundle/{p-BCHeTZOb.js → p-DwVf2qDM.js} +6 -6
- package/dist/bundle/{p-BCHeTZOb.js.map → p-DwVf2qDM.js.map} +1 -1
- package/dist/bundle/p-DyzZdG1l.js +80 -0
- package/dist/bundle/{p-CagCGFPb.js.map → p-DyzZdG1l.js.map} +1 -1
- package/dist/bundle/{p-Fr4DmH1l.js → p-Hd6HHp3Q.js} +4 -4
- package/dist/bundle/{p-Fr4DmH1l.js.map → p-Hd6HHp3Q.js.map} +1 -1
- package/dist/bundle/p-gdsca1fx.js +1663 -0
- package/dist/bundle/p-gdsca1fx.js.map +1 -0
- package/dist/cjs/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-alert_6.cjs.entry.js +5 -5
- package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-activiteit.cjs.entry.js +1 -1
- package/dist/cjs/dso-annotation-activiteit.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-activiteit.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-annotation-gebiedsaanwijzing.cjs.entry.js +1 -1
- package/dist/cjs/dso-annotation-gebiedsaanwijzing.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-gebiedsaanwijzing.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-annotation-kaart.cjs.entry.js +1 -1
- package/dist/cjs/dso-annotation-kaart.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-kaart.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-annotation-locatie.dso-document-component.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +3 -3
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-omgevingsnormwaarde.cjs.entry.js +1 -1
- package/dist/cjs/dso-annotation-omgevingsnormwaarde.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-omgevingsnormwaarde.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-button-group.cjs.entry.js +43 -0
- package/dist/cjs/dso-button-group.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-button-group.entry.cjs.js.map +1 -0
- package/dist/cjs/dso-card-container.cjs.entry.js +1 -1
- package/dist/cjs/dso-card.cjs.entry.js +3 -3
- package/dist/cjs/dso-card.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-card.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-contact-information.cjs.entry.js +1 -1
- package/dist/cjs/dso-date-picker-legacy.cjs.entry.js +3 -3
- package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/dso-document-card.cjs.entry.js +1 -1
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +44 -103
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-dropdown-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +2 -2
- package/dist/cjs/dso-header.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-header.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- 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-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-list-button.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/dso-map-controls.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-map-controls.entry.cjs.js.map +1 -1
- 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 +1 -1
- package/dist/cjs/dso-onboarding-tip.cjs.entry.js +9 -1667
- package/dist/cjs/dso-onboarding-tip.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-onboarding-tip.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-pagination.cjs.entry.js +1 -1
- package/dist/cjs/dso-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-pagination.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-plekinfo-card.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-bar.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 +2 -2
- package/dist/cjs/dso-skiplink.cjs.entry.js +1 -1
- package/dist/cjs/dso-survey-rating.cjs.entry.js +3 -3
- package/dist/cjs/dso-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +1802 -6
- package/dist/cjs/dso-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-tooltip.entry.cjs.js.map +1 -1
- 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/dsot-document-component-demo.cjs.entry.js +1 -1
- package/dist/cjs/floating-ui.dom-uZgU2YQo.js +1671 -0
- package/dist/cjs/floating-ui.dom-uZgU2YQo.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/annotation/annotation.css +3 -0
- package/dist/collection/components/button-group/button-group.css +76 -0
- package/dist/collection/components/button-group/button-group.interfaces.js +2 -0
- package/dist/collection/components/button-group/button-group.interfaces.js.map +1 -0
- package/dist/collection/components/button-group/button-group.js +74 -0
- package/dist/collection/components/button-group/button-group.js.map +1 -0
- package/dist/collection/components/card/card.css +3 -0
- package/dist/collection/components/card/card.js +2 -2
- package/dist/collection/components/card-container/card-container.js +1 -1
- package/dist/collection/components/contact-information/contact-information.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-picker-legacy/date-picker-legacy.js +3 -3
- package/dist/collection/components/document-card/document-card.js +1 -1
- package/dist/collection/components/document-component/document-component.css +226 -5
- package/dist/collection/components/document-component/document-component.js +1 -1
- package/dist/collection/components/document-component-demo/document-component.demo.js +1 -1
- package/dist/collection/components/dropdown-menu/dropdown-menu.css +8 -0
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +43 -176
- package/dist/collection/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/collection/components/header/header.js +2 -2
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/highlight-box/highlight-box.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/image-overlay/image-overlay.css +8 -8
- 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 +3 -3
- package/dist/collection/components/legend-item/legend-item.js +1 -1
- package/dist/collection/components/list-button/list-button.js +1 -1
- 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.css +725 -184
- package/dist/collection/components/map-controls/map-controls.js +3 -3
- package/dist/collection/components/map-controls/map-controls.js.map +1 -1
- 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/modal.js +1 -1
- package/dist/collection/components/onboarding-tip/onboarding-tip.js +1 -1
- package/dist/collection/components/ozon-content/ozon-content.css +226 -5
- package/dist/collection/components/ozon-content/ozon-content.js +1 -1
- package/dist/collection/components/pagination/pagination.css +1 -2
- package/dist/collection/components/plekinfo-card/plekinfo-card.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.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 +2 -2
- 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.js +1 -1
- package/dist/collection/components/survey-rating/survey-rating.css +4 -4
- package/dist/collection/components/survey-rating/survey-rating.js +2 -2
- package/dist/collection/components/table/table.css +223 -5
- package/dist/collection/components/table/table.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/toggletip/toggletip.js +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.css +4 -4
- package/dist/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/components/annotation-locatie.js +1 -1
- package/dist/components/annotation-locatie.js.map +1 -1
- package/dist/components/button-group.js +58 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/document-component.js +2 -2
- package/dist/components/document-component.js.map +1 -1
- package/dist/components/dropdown-menu.js +46 -113
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dso-annotation-activiteit.js +1 -1
- package/dist/components/dso-annotation-activiteit.js.map +1 -1
- package/dist/components/dso-annotation-gebiedsaanwijzing.js +1 -1
- package/dist/components/dso-annotation-gebiedsaanwijzing.js.map +1 -1
- package/dist/components/dso-annotation-kaart.js +1 -1
- package/dist/components/dso-annotation-kaart.js.map +1 -1
- package/dist/components/dso-annotation-omgevingsnormwaarde.js +1 -1
- package/dist/components/dso-annotation-omgevingsnormwaarde.js.map +1 -1
- package/dist/components/dso-button-group.d.ts +11 -0
- package/dist/components/dso-button-group.js +9 -0
- package/dist/components/dso-button-group.js.map +1 -0
- package/dist/components/dso-card-container.js +1 -1
- package/dist/components/dso-card.js +3 -3
- package/dist/components/dso-card.js.map +1 -1
- package/dist/components/dso-contact-information.js +1 -1
- package/dist/components/dso-date-picker-legacy.js +3 -3
- package/dist/components/dso-date-picker.js +1 -1
- package/dist/components/dso-document-card.js +1 -1
- package/dist/components/dso-header.js +2 -2
- package/dist/components/dso-header.js.map +1 -1
- package/dist/components/dso-highlight-box.js +1 -1
- package/dist/components/dso-input-range.js +2 -2
- package/dist/components/dso-legend-item.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 +10 -4
- package/dist/components/dso-map-controls.js.map +1 -1
- package/dist/components/dso-map-overlays.js +1 -1
- package/dist/components/dso-mark-bar.js +1 -1
- package/dist/components/dso-modal.js +1 -1
- package/dist/components/dso-onboarding-tip.js +5 -1663
- package/dist/components/dso-onboarding-tip.js.map +1 -1
- package/dist/components/dso-pagination.js +1 -1
- package/dist/components/dso-pagination.js.map +1 -1
- package/dist/components/dso-plekinfo-card.js +1 -1
- package/dist/components/dso-progress-bar.js +1 -1
- package/dist/components/dso-project-item.js +1 -1
- package/dist/components/dso-skiplink.js +1 -1
- package/dist/components/dso-survey-rating.js +3 -3
- package/dist/components/dso-tabs.js +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-viewer-grid.js +2 -2
- package/dist/components/dsot-document-component-demo.js +1 -1
- package/dist/components/floating-ui.dom.js +1663 -0
- package/dist/components/floating-ui.dom.js.map +1 -0
- package/dist/components/icon.js +1 -1
- package/dist/components/image-overlay.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/info-button.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/label.js +3 -3
- package/dist/components/ozon-content.js +2 -2
- package/dist/components/ozon-content.js.map +1 -1
- package/dist/components/progress-indicator.js +1 -1
- package/dist/components/responsive-element.js +1 -1
- package/dist/components/scrollable.js +2 -2
- package/dist/components/selectable.js +1 -1
- package/dist/components/slide-toggle.js +1 -1
- package/dist/components/table.js +2 -2
- package/dist/components/table.js.map +1 -1
- package/dist/components/toggletip.js +1 -1
- package/dist/components/tooltip.js +1804 -8
- package/dist/components/tooltip.js.map +1 -1
- package/dist/dso-toolkit/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-annotation-activiteit.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-annotation-gebiedsaanwijzing.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-annotation-kaart.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-annotation-locatie.dso-document-component.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-annotation-omgevingsnormwaarde.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-button-group.entry.esm.js.map +1 -0
- package/dist/dso-toolkit/dso-card.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-dropdown-menu.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-header.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-map-controls.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-onboarding-tip.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-pagination.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-tooltip.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/{p-41f3732b.entry.js → p-088d0493.entry.js} +2 -2
- package/dist/dso-toolkit/{p-137404b4.entry.js → p-090ab6fc.entry.js} +2 -2
- package/dist/dso-toolkit/{p-b3a8f101.entry.js → p-099c6eb7.entry.js} +2 -2
- package/dist/dso-toolkit/{p-27f7b86f.entry.js → p-10901139.entry.js} +2 -2
- package/dist/dso-toolkit/p-15e3e714.entry.js +2 -0
- package/dist/dso-toolkit/{p-f41b0ba0.entry.js.map → p-15e3e714.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-221c7378.entry.js +2 -0
- package/dist/dso-toolkit/{p-bfaa3608.entry.js.map → p-221c7378.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-68cff470.entry.js → p-2d4a4552.entry.js} +2 -2
- package/dist/dso-toolkit/p-2f070718.entry.js +2 -0
- package/dist/dso-toolkit/p-2f070718.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-7bedc94d.entry.js → p-2ff601f9.entry.js} +2 -2
- package/dist/dso-toolkit/p-351746ae.entry.js +2 -0
- package/dist/dso-toolkit/p-351746ae.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-5e821c40.entry.js → p-356f8d94.entry.js} +2 -2
- package/dist/dso-toolkit/{p-1db24923.entry.js → p-4231f2f8.entry.js} +2 -2
- package/dist/dso-toolkit/{p-ffa6ca48.entry.js → p-44d831b6.entry.js} +2 -2
- package/dist/dso-toolkit/{p-009bd60a.entry.js → p-451f3c78.entry.js} +2 -2
- package/dist/dso-toolkit/{p-071e8dff.entry.js → p-474cc813.entry.js} +2 -2
- package/dist/dso-toolkit/p-517cbc20.entry.js +2 -0
- package/dist/dso-toolkit/p-54820bbe.entry.js +2 -0
- package/dist/dso-toolkit/p-54820bbe.entry.js.map +1 -0
- package/dist/dso-toolkit/p-586838c3.entry.js +2 -0
- package/dist/dso-toolkit/p-586838c3.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-a4618476.entry.js → p-595e12bd.entry.js} +2 -2
- package/dist/dso-toolkit/p-595e12bd.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-7233cef7.entry.js → p-613f19f9.entry.js} +2 -2
- package/dist/dso-toolkit/p-6949021b.entry.js +2 -0
- package/dist/dso-toolkit/p-6949021b.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-86658809.entry.js → p-74718de8.entry.js} +2 -2
- package/dist/dso-toolkit/{p-cc66c346.entry.js → p-83d63542.entry.js} +2 -2
- package/dist/dso-toolkit/p-87716442.entry.js +2 -0
- package/dist/dso-toolkit/p-87716442.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-e4907ab7.entry.js → p-92f93d4d.entry.js} +2 -2
- package/dist/dso-toolkit/{p-13512a35.entry.js → p-9674e7d2.entry.js} +2 -2
- package/dist/dso-toolkit/{p-8ac044db.entry.js → p-97320fda.entry.js} +2 -2
- package/dist/dso-toolkit/{p-eb5e5d0e.entry.js → p-a10cea33.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e9ea10ed.entry.js → p-a1dd8602.entry.js} +2 -2
- package/dist/dso-toolkit/{p-bcfeeafb.entry.js → p-a3fd0646.entry.js} +2 -2
- package/dist/dso-toolkit/{p-903c3603.entry.js → p-b9b0c72d.entry.js} +2 -2
- package/dist/dso-toolkit/p-c7318c7e.entry.js +2 -0
- package/dist/dso-toolkit/{p-c93fae9e.entry.js.map → p-c7318c7e.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-469b876f.entry.js → p-c9389342.entry.js} +2 -2
- package/dist/dso-toolkit/{p-6d3d29ac.entry.js → p-c9645d23.entry.js} +2 -2
- package/dist/dso-toolkit/p-cf388db9.entry.js +2 -0
- package/dist/dso-toolkit/{p-4f56a26d.entry.js → p-d3e56081.entry.js} +2 -2
- package/dist/dso-toolkit/{p-f32bced2.entry.js → p-e0bc1853.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e5a25571.entry.js → p-e3883983.entry.js} +2 -2
- package/dist/dso-toolkit/p-e41ede6e.entry.js +2 -0
- package/dist/dso-toolkit/{p-11cd688b.entry.js.map → p-e41ede6e.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-f63d51f9.entry.js → p-e9f5382c.entry.js} +2 -2
- package/dist/dso-toolkit/p-eca54e01.entry.js +2 -0
- package/dist/dso-toolkit/{p-75091e9b.entry.js.map → p-eca54e01.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-ee48009b.entry.js +2 -0
- package/dist/dso-toolkit/{p-bd7d4a27.entry.js.map → p-ee48009b.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-76eb0308.entry.js → p-f0579969.entry.js} +2 -2
- package/dist/dso-toolkit/{p-3e8bda7c.entry.js → p-f1f414b6.entry.js} +2 -2
- package/dist/dso-toolkit/p-ff80c101.entry.js +2 -0
- package/dist/dso-toolkit/{p-9cf46bde.entry.js.map → p-ff80c101.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-gdsca1fx.js +2 -0
- package/dist/dso-toolkit/p-gdsca1fx.js.map +1 -0
- package/dist/esm/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.js.map +1 -1
- package/dist/esm/dso-alert_6.entry.js +5 -5
- package/dist/esm/dso-alert_6.entry.js.map +1 -1
- package/dist/esm/dso-annotation-activiteit.entry.js +1 -1
- package/dist/esm/dso-annotation-activiteit.entry.js.map +1 -1
- package/dist/esm/dso-annotation-gebiedsaanwijzing.entry.js +1 -1
- package/dist/esm/dso-annotation-gebiedsaanwijzing.entry.js.map +1 -1
- package/dist/esm/dso-annotation-kaart.entry.js +1 -1
- package/dist/esm/dso-annotation-kaart.entry.js.map +1 -1
- package/dist/esm/dso-annotation-locatie.dso-document-component.entry.js.map +1 -1
- package/dist/esm/dso-annotation-locatie_2.entry.js +3 -3
- package/dist/esm/dso-annotation-locatie_2.entry.js.map +1 -1
- package/dist/esm/dso-annotation-omgevingsnormwaarde.entry.js +1 -1
- package/dist/esm/dso-annotation-omgevingsnormwaarde.entry.js.map +1 -1
- package/dist/esm/dso-button-group.entry.js +41 -0
- package/dist/esm/dso-button-group.entry.js.map +1 -0
- package/dist/esm/dso-card-container.entry.js +1 -1
- package/dist/esm/dso-card.entry.js +3 -3
- package/dist/esm/dso-card.entry.js.map +1 -1
- package/dist/esm/dso-contact-information.entry.js +1 -1
- package/dist/esm/dso-date-picker-legacy.entry.js +3 -3
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-document-card.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +44 -103
- package/dist/esm/dso-dropdown-menu.entry.js.map +1 -1
- package/dist/esm/dso-header.entry.js +2 -2
- package/dist/esm/dso-header.entry.js.map +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +2 -2
- 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-item.entry.js +1 -1
- package/dist/esm/dso-list-button.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/dso-map-controls.entry.js.map +1 -1
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-mark-bar.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +1 -1
- package/dist/esm/dso-onboarding-tip.entry.js +2 -1660
- package/dist/esm/dso-onboarding-tip.entry.js.map +1 -1
- package/dist/esm/dso-pagination.entry.js +1 -1
- package/dist/esm/dso-pagination.entry.js.map +1 -1
- package/dist/esm/dso-plekinfo-card.entry.js +1 -1
- package/dist/esm/dso-progress-bar.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 +2 -2
- package/dist/esm/dso-skiplink.entry.js +1 -1
- package/dist/esm/dso-survey-rating.entry.js +3 -3
- package/dist/esm/dso-tabs.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +1800 -4
- package/dist/esm/dso-tooltip.entry.js.map +1 -1
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +2 -2
- package/dist/esm/dsot-document-component-demo.entry.js +1 -1
- package/dist/esm/floating-ui.dom-gdsca1fx.js +1663 -0
- package/dist/esm/floating-ui.dom-gdsca1fx.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/button-group/button-group.d.ts +16 -0
- package/dist/types/components/button-group/button-group.interfaces.d.ts +1 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +3 -20
- package/dist/types/components/map-controls/map-controls.d.ts +2 -2
- package/dist/types/components.d.ts +25 -26
- package/package.json +3 -3
- package/dist/bundle/p-CBwbkAC7.js +0 -314
- package/dist/bundle/p-CBwbkAC7.js.map +0 -1
- package/dist/bundle/p-CagCGFPb.js +0 -80
- package/dist/bundle/p-CsY83cJO.js +0 -1801
- package/dist/bundle/p-CsY83cJO.js.map +0 -1
- package/dist/bundle/p-Dp31hMfn.js.map +0 -1
- package/dist/cjs/has-overflow-B_4p67wC.js.map +0 -1
- package/dist/components/has-overflow.js +0 -1801
- package/dist/components/has-overflow.js.map +0 -1
- package/dist/dso-toolkit/p-11cd688b.entry.js +0 -2
- package/dist/dso-toolkit/p-2968e740.entry.js +0 -2
- package/dist/dso-toolkit/p-2968e740.entry.js.map +0 -1
- package/dist/dso-toolkit/p-5327558b.entry.js +0 -2
- package/dist/dso-toolkit/p-75091e9b.entry.js +0 -2
- package/dist/dso-toolkit/p-858970da.entry.js +0 -2
- package/dist/dso-toolkit/p-858970da.entry.js.map +0 -1
- package/dist/dso-toolkit/p-9cf46bde.entry.js +0 -2
- package/dist/dso-toolkit/p-CsY83cJO.js +0 -2
- package/dist/dso-toolkit/p-CsY83cJO.js.map +0 -1
- package/dist/dso-toolkit/p-a4618476.entry.js.map +0 -1
- package/dist/dso-toolkit/p-ad8a1705.entry.js +0 -2
- package/dist/dso-toolkit/p-b61f1d16.entry.js +0 -2
- package/dist/dso-toolkit/p-b61f1d16.entry.js.map +0 -1
- package/dist/dso-toolkit/p-bd7d4a27.entry.js +0 -2
- package/dist/dso-toolkit/p-bfaa3608.entry.js +0 -2
- package/dist/dso-toolkit/p-c93fae9e.entry.js +0 -2
- package/dist/dso-toolkit/p-cad0c5d9.entry.js +0 -2
- package/dist/dso-toolkit/p-cad0c5d9.entry.js.map +0 -1
- package/dist/dso-toolkit/p-cea64895.entry.js +0 -2
- package/dist/dso-toolkit/p-cea64895.entry.js.map +0 -1
- package/dist/dso-toolkit/p-f41b0ba0.entry.js +0 -2
- package/dist/esm/has-overflow-CsY83cJO.js +0 -1801
- package/dist/esm/has-overflow-CsY83cJO.js.map +0 -1
- /package/dist/dso-toolkit/{p-41f3732b.entry.js.map → p-088d0493.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-137404b4.entry.js.map → p-090ab6fc.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-b3a8f101.entry.js.map → p-099c6eb7.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-27f7b86f.entry.js.map → p-10901139.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-68cff470.entry.js.map → p-2d4a4552.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-7bedc94d.entry.js.map → p-2ff601f9.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-5e821c40.entry.js.map → p-356f8d94.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-1db24923.entry.js.map → p-4231f2f8.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-ffa6ca48.entry.js.map → p-44d831b6.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-009bd60a.entry.js.map → p-451f3c78.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-071e8dff.entry.js.map → p-474cc813.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-5327558b.entry.js.map → p-517cbc20.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-7233cef7.entry.js.map → p-613f19f9.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-86658809.entry.js.map → p-74718de8.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-cc66c346.entry.js.map → p-83d63542.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e4907ab7.entry.js.map → p-92f93d4d.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-13512a35.entry.js.map → p-9674e7d2.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-8ac044db.entry.js.map → p-97320fda.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-eb5e5d0e.entry.js.map → p-a10cea33.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e9ea10ed.entry.js.map → p-a1dd8602.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-bcfeeafb.entry.js.map → p-a3fd0646.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-903c3603.entry.js.map → p-b9b0c72d.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-469b876f.entry.js.map → p-c9389342.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-6d3d29ac.entry.js.map → p-c9645d23.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-ad8a1705.entry.js.map → p-cf388db9.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-4f56a26d.entry.js.map → p-d3e56081.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-f32bced2.entry.js.map → p-e0bc1853.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e5a25571.entry.js.map → p-e3883983.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-f63d51f9.entry.js.map → p-e9f5382c.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-76eb0308.entry.js.map → p-f0579969.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-3e8bda7c.entry.js.map → p-f1f414b6.entry.js.map} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { autoUpdate, computePosition, flip, offset } from "@floating-ui/dom";
|
|
2
2
|
import { Host, h } from "@stencil/core";
|
|
3
3
|
import { tabbable } from "tabbable";
|
|
4
4
|
import { v4 as uuidv4 } from "uuid";
|
|
5
5
|
import { getActiveElement } from "../../utils/get-active-element";
|
|
6
|
-
import { hasOverflow } from "../../utils/has-overflow";
|
|
7
6
|
export class DropdownMenu {
|
|
8
7
|
constructor() {
|
|
9
8
|
/**
|
|
@@ -23,70 +22,17 @@ export class DropdownMenu {
|
|
|
23
22
|
* Whether the menu is checkable.
|
|
24
23
|
*/
|
|
25
24
|
this.checkable = false;
|
|
26
|
-
/**
|
|
27
|
-
* Set position strategy of dropdown options
|
|
28
|
-
*/
|
|
29
|
-
this.strategy = "auto";
|
|
30
25
|
this.focusOutListener = (event) => {
|
|
31
26
|
if (this.open &&
|
|
32
27
|
(!(event.relatedTarget instanceof HTMLElement) || !this.tabbables(true).includes(event.relatedTarget))) {
|
|
33
|
-
this.
|
|
28
|
+
this.toggleOptions(false);
|
|
34
29
|
}
|
|
35
30
|
};
|
|
36
31
|
this.escape = () => {
|
|
37
32
|
this.button.focus();
|
|
38
|
-
this.
|
|
33
|
+
this.toggleOptions(false);
|
|
39
34
|
};
|
|
40
35
|
}
|
|
41
|
-
watchPosition() {
|
|
42
|
-
if (!this.popper) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
this.popper.setOptions({
|
|
46
|
-
placement: this.placement || (this.dropdownAlign === "right" ? "bottom-end" : "bottom-start"),
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
watchOptionsOffset() {
|
|
50
|
-
var _a;
|
|
51
|
-
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions({
|
|
52
|
-
modifiers: [
|
|
53
|
-
{
|
|
54
|
-
name: "offset",
|
|
55
|
-
options: {
|
|
56
|
-
offset: [0, this.dropdownOptionsOffset],
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
watchStrategy() {
|
|
63
|
-
this.setStrategy();
|
|
64
|
-
}
|
|
65
|
-
setStrategy() {
|
|
66
|
-
if (!this.popper) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
if (this.strategy === "absolute" || this.strategy === "fixed") {
|
|
70
|
-
this.popper.setOptions({
|
|
71
|
-
strategy: this.strategy,
|
|
72
|
-
});
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
let element = this.host;
|
|
76
|
-
const boundary = this.boundary || document;
|
|
77
|
-
while (element && element.parentNode !== boundary) {
|
|
78
|
-
element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;
|
|
79
|
-
if (element !== null && hasOverflow(element)) {
|
|
80
|
-
this.popper.setOptions({
|
|
81
|
-
strategy: "fixed",
|
|
82
|
-
});
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
this.popper.setOptions({
|
|
87
|
-
strategy: "absolute",
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
36
|
get button() {
|
|
91
37
|
const button = this.host.querySelector('button[slot="toggle"]');
|
|
92
38
|
if (!(button instanceof HTMLButtonElement)) {
|
|
@@ -104,50 +50,20 @@ export class DropdownMenu {
|
|
|
104
50
|
if (!this.button.id) {
|
|
105
51
|
this.button.id = uuidv4();
|
|
106
52
|
}
|
|
107
|
-
const
|
|
108
|
-
if (!
|
|
109
|
-
throw new
|
|
53
|
+
const dropdownOptionsElement = this.host.querySelector(".dso-dropdown-options");
|
|
54
|
+
if (!(dropdownOptionsElement instanceof HTMLElement)) {
|
|
55
|
+
throw new Error("dropdown options element is not instanceof HTMLElement");
|
|
110
56
|
}
|
|
111
|
-
|
|
112
|
-
|
|
57
|
+
dropdownOptionsElement.setAttribute("role", "menu");
|
|
58
|
+
dropdownOptionsElement.setAttribute("aria-labelledby", this.button.id);
|
|
113
59
|
for (const ul of Array.from(this.host.getElementsByTagName("ul"))) {
|
|
114
60
|
ul.setAttribute("role", "group");
|
|
115
61
|
for (const li of Array.from(ul.getElementsByTagName("li"))) {
|
|
116
62
|
li.setAttribute("role", "none");
|
|
117
63
|
}
|
|
118
64
|
}
|
|
119
|
-
if (this.popper) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
const dropdownOptionsElement = this.host.querySelector(".dso-dropdown-options");
|
|
123
|
-
if (!(dropdownOptionsElement instanceof HTMLElement)) {
|
|
124
|
-
throw new Error("dropdown options element is not instanceof HTMLElement");
|
|
125
|
-
}
|
|
126
|
-
this.popper = createPopper(this.button, dropdownOptionsElement, {
|
|
127
|
-
placement: this.placement || (this.dropdownAlign === "right" ? "bottom-end" : "bottom-start"),
|
|
128
|
-
modifiers: [
|
|
129
|
-
{
|
|
130
|
-
name: "offset",
|
|
131
|
-
options: {
|
|
132
|
-
offset: [0, this.dropdownOptionsOffset],
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
name: "preventOverflow",
|
|
137
|
-
options: {
|
|
138
|
-
boundary: this.boundary ? document.querySelector(this.boundary) : null,
|
|
139
|
-
},
|
|
140
|
-
enabled: this.boundary !== undefined,
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
});
|
|
144
65
|
}
|
|
145
66
|
componentDidRender() {
|
|
146
|
-
var _a;
|
|
147
|
-
this.setStrategy();
|
|
148
|
-
if (this.open) {
|
|
149
|
-
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
|
|
150
|
-
}
|
|
151
67
|
for (const li of Array.from(this.host.getElementsByTagName("li"))) {
|
|
152
68
|
for (const tab of this.host.isConnected ? tabbable(li) : []) {
|
|
153
69
|
tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
|
|
@@ -157,14 +73,34 @@ export class DropdownMenu {
|
|
|
157
73
|
}
|
|
158
74
|
}
|
|
159
75
|
this.button.setAttribute("aria-expanded", this.open ? "true" : "false");
|
|
76
|
+
if (this.popoverElement && !this.cleanUp) {
|
|
77
|
+
const element = this.popoverElement;
|
|
78
|
+
this.cleanUp = autoUpdate(this.button, element, () => {
|
|
79
|
+
computePosition(this.button, element, {
|
|
80
|
+
strategy: "fixed",
|
|
81
|
+
middleware: [
|
|
82
|
+
offset(this.dropdownOptionsOffset),
|
|
83
|
+
flip({
|
|
84
|
+
padding: this.dropdownOptionsOffset,
|
|
85
|
+
}),
|
|
86
|
+
],
|
|
87
|
+
placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
|
|
88
|
+
}).then(({ x, y }) => {
|
|
89
|
+
Object.assign(element.style, {
|
|
90
|
+
left: `${x}px`,
|
|
91
|
+
top: `${y}px`,
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
160
96
|
}
|
|
161
97
|
onClick(event) {
|
|
162
98
|
const composedPath = event.composedPath();
|
|
163
99
|
if (this.isToggleButtonEvent(composedPath)) {
|
|
164
|
-
this.
|
|
100
|
+
this.toggleOptions();
|
|
165
101
|
}
|
|
166
102
|
else if (this.open && this.isMenuItemEvent(composedPath)) {
|
|
167
|
-
this.
|
|
103
|
+
this.toggleOptions(false);
|
|
168
104
|
}
|
|
169
105
|
}
|
|
170
106
|
isToggleButtonEvent(composedPath) {
|
|
@@ -173,9 +109,19 @@ export class DropdownMenu {
|
|
|
173
109
|
isMenuItemEvent(composedPath) {
|
|
174
110
|
return composedPath.includes(this.host) && !this.isToggleButtonEvent(composedPath);
|
|
175
111
|
}
|
|
112
|
+
toggleOptions(force) {
|
|
113
|
+
var _a, _b;
|
|
114
|
+
this.open = force !== null && force !== void 0 ? force : !this.open;
|
|
115
|
+
if ((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.isConnected) {
|
|
116
|
+
(_b = this.popoverElement) === null || _b === void 0 ? void 0 : _b.togglePopover(this.open);
|
|
117
|
+
}
|
|
118
|
+
if (!this.open && this.cleanUp) {
|
|
119
|
+
this.cleanUp();
|
|
120
|
+
this.cleanUp = undefined;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
176
123
|
disconnectedCallback() {
|
|
177
|
-
|
|
178
|
-
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
124
|
+
this.toggleOptions(false);
|
|
179
125
|
}
|
|
180
126
|
keyDownListener(event) {
|
|
181
127
|
if (event.defaultPrevented || !this.open) {
|
|
@@ -222,7 +168,7 @@ export class DropdownMenu {
|
|
|
222
168
|
(_a = tabbables[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
223
169
|
}
|
|
224
170
|
render() {
|
|
225
|
-
return (h(Host, { key: '
|
|
171
|
+
return (h(Host, { key: '9afd8972737639f89ad1a4692630873b783e4565', onFocusout: this.focusOutListener }, h("slot", { key: '1dcb47d44aa64263048235e5ef126a9c021fc2d9', name: "toggle" }), h("div", { key: 'ad7d1edefabae59820c974da1b2a37088baaf1ce', popover: "manual", ref: (element) => (this.popoverElement = element) }, h("slot", { key: 'b2a5188261a9edca8d948365152d817b69104936' }))));
|
|
226
172
|
}
|
|
227
173
|
static get is() { return "dso-dropdown-menu"; }
|
|
228
174
|
static get encapsulation() { return "shadow"; }
|
|
@@ -317,89 +263,10 @@ export class DropdownMenu {
|
|
|
317
263
|
"setter": false,
|
|
318
264
|
"reflect": false,
|
|
319
265
|
"defaultValue": "false"
|
|
320
|
-
},
|
|
321
|
-
"boundary": {
|
|
322
|
-
"type": "string",
|
|
323
|
-
"attribute": "boundary",
|
|
324
|
-
"mutable": false,
|
|
325
|
-
"complexType": {
|
|
326
|
-
"original": "string",
|
|
327
|
-
"resolved": "string | undefined",
|
|
328
|
-
"references": {}
|
|
329
|
-
},
|
|
330
|
-
"required": false,
|
|
331
|
-
"optional": true,
|
|
332
|
-
"docs": {
|
|
333
|
-
"tags": [],
|
|
334
|
-
"text": "Selector for the element the dropdown options should not be overflowing."
|
|
335
|
-
},
|
|
336
|
-
"getter": false,
|
|
337
|
-
"setter": false,
|
|
338
|
-
"reflect": false
|
|
339
|
-
},
|
|
340
|
-
"placement": {
|
|
341
|
-
"type": "string",
|
|
342
|
-
"attribute": "placement",
|
|
343
|
-
"mutable": false,
|
|
344
|
-
"complexType": {
|
|
345
|
-
"original": "Placement",
|
|
346
|
-
"resolved": "\"auto\" | \"auto-end\" | \"auto-start\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\" | undefined",
|
|
347
|
-
"references": {
|
|
348
|
-
"Placement": {
|
|
349
|
-
"location": "import",
|
|
350
|
-
"path": "@popperjs/core",
|
|
351
|
-
"id": "../../node_modules/@popperjs/core/index.d.ts::Placement"
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
"required": false,
|
|
356
|
-
"optional": true,
|
|
357
|
-
"docs": {
|
|
358
|
-
"tags": [],
|
|
359
|
-
"text": "Force placement of dropdown.\r\n\r\nThis property overrides `dropdownAlign`."
|
|
360
|
-
},
|
|
361
|
-
"getter": false,
|
|
362
|
-
"setter": false,
|
|
363
|
-
"reflect": false
|
|
364
|
-
},
|
|
365
|
-
"strategy": {
|
|
366
|
-
"type": "string",
|
|
367
|
-
"attribute": "strategy",
|
|
368
|
-
"mutable": false,
|
|
369
|
-
"complexType": {
|
|
370
|
-
"original": "\"auto\" | \"absolute\" | \"fixed\"",
|
|
371
|
-
"resolved": "\"absolute\" | \"auto\" | \"fixed\"",
|
|
372
|
-
"references": {}
|
|
373
|
-
},
|
|
374
|
-
"required": false,
|
|
375
|
-
"optional": false,
|
|
376
|
-
"docs": {
|
|
377
|
-
"tags": [],
|
|
378
|
-
"text": "Set position strategy of dropdown options"
|
|
379
|
-
},
|
|
380
|
-
"getter": false,
|
|
381
|
-
"setter": false,
|
|
382
|
-
"reflect": false,
|
|
383
|
-
"defaultValue": "\"auto\""
|
|
384
266
|
}
|
|
385
267
|
};
|
|
386
268
|
}
|
|
387
269
|
static get elementRef() { return "host"; }
|
|
388
|
-
static get watchers() {
|
|
389
|
-
return [{
|
|
390
|
-
"propName": "placement",
|
|
391
|
-
"methodName": "watchPosition"
|
|
392
|
-
}, {
|
|
393
|
-
"propName": "dropdownAlign",
|
|
394
|
-
"methodName": "watchPosition"
|
|
395
|
-
}, {
|
|
396
|
-
"propName": "dropdownOptionsOffset",
|
|
397
|
-
"methodName": "watchOptionsOffset"
|
|
398
|
-
}, {
|
|
399
|
-
"propName": "strategy",
|
|
400
|
-
"methodName": "watchStrategy"
|
|
401
|
-
}];
|
|
402
|
-
}
|
|
403
270
|
static get listeners() {
|
|
404
271
|
return [{
|
|
405
272
|
"name": "click",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../../src/components/dropdown-menu/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyC,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACj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AAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBACvB,CAAC;gBAED,MAAM;YAER;gBACE,OAAO;QACX,CAAC;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;IACzB,CAAC;IAEO,UAAU,CAAC,SAA6B,EAAE,SAAiB;;QACjE,MAAM,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,gBAAgB,EAAE,CAAC,CAAC;QAE1E,IAAI,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;QACzC,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;YAClC,SAAS,GAAG,CAAC,CAAC;QAChB,CAAC;aAAM,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;YACzB,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;QACnC,CAAC;QAED,MAAA,SAAS,CAAC,SAAS,CAAC,0CAAE,KAAK,EAAE,CAAC;IAChC,CAAC;IAOD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB;YACrC,6DAAM,IAAI,EAAC,QAAQ,GAAG;YACtB,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI;gBACrB,8DAAQ,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Instance as PopperInstance, Placement, createPopper } from \"@popperjs/core\";\r\nimport { Component, Element, Host, Listen, Prop, Watch, h } from \"@stencil/core\";\r\nimport { FocusableElement, tabbable } from \"tabbable\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { hasOverflow } from \"../../utils/has-overflow\";\r\n\r\n@Component({\r\n tag: \"dso-dropdown-menu\",\r\n styleUrl: \"dropdown-menu.scss\",\r\n shadow: true,\r\n})\r\nexport class DropdownMenu {\r\n /**\r\n * Whether the menu is open or closed.\r\n * This attribute is reflected and mutable.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n open = false;\r\n\r\n /**\r\n * Alignment of the dropdown\r\n */\r\n @Prop()\r\n dropdownAlign: \"left\" | \"right\" = \"left\";\r\n\r\n /**\r\n * Space between button and dropdown options\r\n */\r\n @Prop()\r\n dropdownOptionsOffset = 2;\r\n\r\n /**\r\n * Whether the menu is checkable.\r\n */\r\n @Prop()\r\n checkable = false;\r\n\r\n /**\r\n * Selector for the element the dropdown options should not be overflowing.\r\n */\r\n @Prop()\r\n boundary?: string;\r\n\r\n /**\r\n * Force placement of dropdown.\r\n *\r\n * This property overrides `dropdownAlign`.\r\n */\r\n @Prop()\r\n placement?: Placement;\r\n\r\n /**\r\n * Set position strategy of dropdown options\r\n */\r\n @Prop()\r\n strategy: \"auto\" | \"absolute\" | \"fixed\" = \"auto\";\r\n\r\n @Watch(\"placement\")\r\n @Watch(\"dropdownAlign\")\r\n watchPosition() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n this.popper.setOptions({\r\n placement: this.placement || (this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\"),\r\n });\r\n }\r\n\r\n @Watch(\"dropdownOptionsOffset\")\r\n watchOptionsOffset() {\r\n this.popper?.setOptions({\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n ],\r\n });\r\n }\r\n\r\n @Watch(\"strategy\")\r\n watchStrategy() {\r\n this.setStrategy();\r\n }\r\n\r\n private setStrategy() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n if (this.strategy === \"absolute\" || this.strategy === \"fixed\") {\r\n this.popper.setOptions({\r\n strategy: this.strategy,\r\n });\r\n\r\n return;\r\n }\r\n\r\n let element: Element | null = this.host;\r\n\r\n const boundary = this.boundary || document;\r\n\r\n while (element && element.parentNode !== boundary) {\r\n element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;\r\n if (element !== null && hasOverflow(element)) {\r\n this.popper.setOptions({\r\n strategy: \"fixed\",\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n this.popper.setOptions({\r\n strategy: \"absolute\",\r\n });\r\n }\r\n\r\n @Element()\r\n host!: HTMLDsoDropdownMenuElement;\r\n\r\n private popper: PopperInstance | undefined;\r\n\r\n get button(): HTMLButtonElement {\r\n const button = this.host.querySelector('button[slot=\"toggle\"]');\r\n\r\n if (!(button instanceof HTMLButtonElement)) {\r\n throw new ReferenceError(\"Mandatory toggle button not found\");\r\n }\r\n\r\n return button;\r\n }\r\n\r\n private tabbables(withButton: boolean): FocusableElement[] {\r\n const tabbables = this.host.isConnected ? tabbable(this.host) : [];\r\n\r\n return withButton ? tabbables : tabbables.filter((element) => element !== this.button);\r\n }\r\n\r\n componentDidLoad() {\r\n this.button.setAttribute(\"aria-haspopup\", \"menu\");\r\n this.button.setAttribute(\"aria-expanded\", \"false\");\r\n if (!this.button.id) {\r\n this.button.id = uuidv4();\r\n }\r\n\r\n const options = this.host.querySelector(\".dso-dropdown-options\");\r\n if (!options) {\r\n throw new ReferenceError(\"Dropdown options not found\");\r\n }\r\n\r\n options.setAttribute(\"role\", \"menu\");\r\n options.setAttribute(\"aria-labelledby\", this.button.id);\r\n\r\n for (const ul of Array.from(this.host.getElementsByTagName(\"ul\"))) {\r\n ul.setAttribute(\"role\", \"group\");\r\n for (const li of Array.from(ul.getElementsByTagName(\"li\"))) {\r\n li.setAttribute(\"role\", \"none\");\r\n }\r\n }\r\n\r\n if (this.popper) {\r\n return;\r\n }\r\n\r\n const dropdownOptionsElement = this.host.querySelector(\".dso-dropdown-options\");\r\n\r\n if (!(dropdownOptionsElement instanceof HTMLElement)) {\r\n throw new Error(\"dropdown options element is not instanceof HTMLElement\");\r\n }\r\n\r\n this.popper = createPopper(this.button, dropdownOptionsElement, {\r\n placement: this.placement || (this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\"),\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n {\r\n name: \"preventOverflow\",\r\n options: {\r\n boundary: this.boundary ? document.querySelector(this.boundary) : null,\r\n },\r\n enabled: this.boundary !== undefined,\r\n },\r\n ],\r\n });\r\n }\r\n\r\n componentDidRender() {\r\n this.setStrategy();\r\n if (this.open) {\r\n this.popper?.update();\r\n }\r\n\r\n for (const li of Array.from(this.host.getElementsByTagName(\"li\"))) {\r\n for (const tab of this.host.isConnected ? tabbable(li) : []) {\r\n tab.setAttribute(\"role\", this.checkable ? \"menuitemradio\" : \"menuitem\");\r\n\r\n if (this.checkable) {\r\n tab.setAttribute(\"aria-checked\", li.classList.contains(\"dso-checked\").toString());\r\n }\r\n }\r\n }\r\n\r\n this.button.setAttribute(\"aria-expanded\", this.open ? \"true\" : \"false\");\r\n }\r\n\r\n @Listen(\"click\", { target: \"window\" })\r\n onClick(event: MouseEvent) {\r\n const composedPath = event.composedPath();\r\n\r\n if (this.isToggleButtonEvent(composedPath)) {\r\n this.open = !this.open;\r\n } else if (this.open && this.isMenuItemEvent(composedPath)) {\r\n this.open = false;\r\n }\r\n }\r\n\r\n private isToggleButtonEvent(composedPath: EventTarget[]) {\r\n return composedPath.includes(this.button);\r\n }\r\n\r\n private isMenuItemEvent(composedPath: EventTarget[]) {\r\n return composedPath.includes(this.host) && !this.isToggleButtonEvent(composedPath);\r\n }\r\n\r\n disconnectedCallback() {\r\n this.popper?.destroy();\r\n }\r\n\r\n private focusOutListener = (event: FocusEvent) => {\r\n if (\r\n this.open &&\r\n (!(event.relatedTarget instanceof HTMLElement) || !this.tabbables(true).includes(event.relatedTarget))\r\n ) {\r\n this.open = false;\r\n }\r\n };\r\n\r\n @Listen(\"keydown\", { target: \"window\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.defaultPrevented || !this.open) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"Tab\":\r\n if (event.shiftKey) {\r\n this.tabInPopup(this.tabbables(true), -1);\r\n } else {\r\n this.tabInPopup(this.tabbables(true), 1);\r\n }\r\n\r\n break;\r\n case \"ArrowDown\":\r\n this.tabInPopup(this.tabbables(false), 1);\r\n break;\r\n\r\n case \"ArrowUp\":\r\n this.tabInPopup(this.tabbables(false), -1);\r\n break;\r\n\r\n case \"Escape\":\r\n this.escape();\r\n break;\r\n\r\n case \" \":\r\n if (event.target instanceof HTMLElement) {\r\n event.target.click();\r\n }\r\n\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n }\r\n\r\n private tabInPopup(tabbables: FocusableElement[], direction: number) {\r\n const currentIndex = tabbables.findIndex((e) => e === getActiveElement());\r\n\r\n let nextIndex = currentIndex + direction;\r\n if (nextIndex >= tabbables.length) {\r\n nextIndex = 0;\r\n } else if (nextIndex < 0) {\r\n nextIndex = tabbables.length - 1;\r\n }\r\n\r\n tabbables[nextIndex]?.focus();\r\n }\r\n\r\n private escape = () => {\r\n this.button.focus();\r\n this.open = false;\r\n };\r\n\r\n render() {\r\n return (\r\n <Host onFocusout={this.focusOutListener}>\r\n <slot name=\"toggle\" />\r\n <div hidden={!this.open}>\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../../src/components/dropdown-menu/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MA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,MAAM;YAER;gBACE,OAAO;QACX,CAAC;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;IACzB,CAAC;IAEO,UAAU,CAAC,SAA6B,EAAE,SAAiB;;QACjE,MAAM,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,gBAAgB,EAAE,CAAC,CAAC;QAE1E,IAAI,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;QACzC,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;YAClC,SAAS,GAAG,CAAC,CAAC;QAChB,CAAC;aAAM,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;YACzB,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;QACnC,CAAC;QAED,MAAA,SAAS,CAAC,SAAS,CAAC,0CAAE,KAAK,EAAE,CAAC;IAChC,CAAC;IAOD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB;YACrC,6DAAM,IAAI,EAAC,QAAQ,GAAG;YACtB,4DAAK,OAAO,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;gBACrE,8DAAQ,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { autoUpdate, computePosition, flip, offset } from \"@floating-ui/dom\";\r\nimport { Component, Element, Host, Listen, Prop, h } from \"@stencil/core\";\r\nimport { FocusableElement, tabbable } from \"tabbable\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\n\r\n@Component({\r\n tag: \"dso-dropdown-menu\",\r\n styleUrl: \"dropdown-menu.scss\",\r\n shadow: true,\r\n})\r\nexport class DropdownMenu {\r\n /**\r\n * Whether the menu is open or closed.\r\n * This attribute is reflected and mutable.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n open = false;\r\n\r\n /**\r\n * Alignment of the dropdown\r\n */\r\n @Prop()\r\n dropdownAlign: \"left\" | \"right\" = \"left\";\r\n\r\n /**\r\n * Space between button and dropdown options\r\n */\r\n @Prop()\r\n dropdownOptionsOffset = 2;\r\n\r\n /**\r\n * Whether the menu is checkable.\r\n */\r\n @Prop()\r\n checkable = false;\r\n\r\n @Element()\r\n host!: HTMLDsoDropdownMenuElement;\r\n\r\n private cleanUp: ReturnType<typeof autoUpdate> | undefined;\r\n\r\n private popoverElement: HTMLDivElement | undefined;\r\n\r\n get button(): HTMLButtonElement {\r\n const button = this.host.querySelector('button[slot=\"toggle\"]');\r\n\r\n if (!(button instanceof HTMLButtonElement)) {\r\n throw new ReferenceError(\"Mandatory toggle button not found\");\r\n }\r\n\r\n return button;\r\n }\r\n\r\n private tabbables(withButton: boolean): FocusableElement[] {\r\n const tabbables = this.host.isConnected ? tabbable(this.host) : [];\r\n\r\n return withButton ? tabbables : tabbables.filter((element) => element !== this.button);\r\n }\r\n\r\n componentDidLoad() {\r\n this.button.setAttribute(\"aria-haspopup\", \"menu\");\r\n this.button.setAttribute(\"aria-expanded\", \"false\");\r\n if (!this.button.id) {\r\n this.button.id = uuidv4();\r\n }\r\n\r\n const dropdownOptionsElement = this.host.querySelector(\".dso-dropdown-options\");\r\n\r\n if (!(dropdownOptionsElement instanceof HTMLElement)) {\r\n throw new Error(\"dropdown options element is not instanceof HTMLElement\");\r\n }\r\n\r\n dropdownOptionsElement.setAttribute(\"role\", \"menu\");\r\n dropdownOptionsElement.setAttribute(\"aria-labelledby\", this.button.id);\r\n\r\n for (const ul of Array.from(this.host.getElementsByTagName(\"ul\"))) {\r\n ul.setAttribute(\"role\", \"group\");\r\n for (const li of Array.from(ul.getElementsByTagName(\"li\"))) {\r\n li.setAttribute(\"role\", \"none\");\r\n }\r\n }\r\n }\r\n\r\n componentDidRender() {\r\n for (const li of Array.from(this.host.getElementsByTagName(\"li\"))) {\r\n for (const tab of this.host.isConnected ? tabbable(li) : []) {\r\n tab.setAttribute(\"role\", this.checkable ? \"menuitemradio\" : \"menuitem\");\r\n\r\n if (this.checkable) {\r\n tab.setAttribute(\"aria-checked\", li.classList.contains(\"dso-checked\").toString());\r\n }\r\n }\r\n }\r\n\r\n this.button.setAttribute(\"aria-expanded\", this.open ? \"true\" : \"false\");\r\n\r\n if (this.popoverElement && !this.cleanUp) {\r\n const element = this.popoverElement;\r\n this.cleanUp = autoUpdate(this.button, element, () => {\r\n computePosition(this.button, element, {\r\n strategy: \"fixed\",\r\n middleware: [\r\n offset(this.dropdownOptionsOffset),\r\n flip({\r\n padding: this.dropdownOptionsOffset,\r\n }),\r\n ],\r\n placement: this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\",\r\n }).then(({ x, y }) => {\r\n Object.assign(element.style, {\r\n left: `${x}px`,\r\n top: `${y}px`,\r\n });\r\n });\r\n });\r\n }\r\n }\r\n\r\n @Listen(\"click\", { target: \"window\" })\r\n onClick(event: MouseEvent) {\r\n const composedPath = event.composedPath();\r\n\r\n if (this.isToggleButtonEvent(composedPath)) {\r\n this.toggleOptions();\r\n } else if (this.open && this.isMenuItemEvent(composedPath)) {\r\n this.toggleOptions(false);\r\n }\r\n }\r\n\r\n private isToggleButtonEvent(composedPath: EventTarget[]) {\r\n return composedPath.includes(this.button);\r\n }\r\n\r\n private isMenuItemEvent(composedPath: EventTarget[]) {\r\n return composedPath.includes(this.host) && !this.isToggleButtonEvent(composedPath);\r\n }\r\n\r\n private toggleOptions(force?: boolean) {\r\n this.open = force ?? !this.open;\r\n if (this.popoverElement?.isConnected) {\r\n this.popoverElement?.togglePopover(this.open);\r\n }\r\n\r\n if (!this.open && this.cleanUp) {\r\n this.cleanUp();\r\n this.cleanUp = undefined;\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.toggleOptions(false);\r\n }\r\n\r\n private focusOutListener = (event: FocusEvent) => {\r\n if (\r\n this.open &&\r\n (!(event.relatedTarget instanceof HTMLElement) || !this.tabbables(true).includes(event.relatedTarget))\r\n ) {\r\n this.toggleOptions(false);\r\n }\r\n };\r\n\r\n @Listen(\"keydown\", { target: \"window\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.defaultPrevented || !this.open) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"Tab\":\r\n if (event.shiftKey) {\r\n this.tabInPopup(this.tabbables(true), -1);\r\n } else {\r\n this.tabInPopup(this.tabbables(true), 1);\r\n }\r\n\r\n break;\r\n case \"ArrowDown\":\r\n this.tabInPopup(this.tabbables(false), 1);\r\n break;\r\n\r\n case \"ArrowUp\":\r\n this.tabInPopup(this.tabbables(false), -1);\r\n break;\r\n\r\n case \"Escape\":\r\n this.escape();\r\n break;\r\n\r\n case \" \":\r\n if (event.target instanceof HTMLElement) {\r\n event.target.click();\r\n }\r\n\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n }\r\n\r\n private tabInPopup(tabbables: FocusableElement[], direction: number) {\r\n const currentIndex = tabbables.findIndex((e) => e === getActiveElement());\r\n\r\n let nextIndex = currentIndex + direction;\r\n if (nextIndex >= tabbables.length) {\r\n nextIndex = 0;\r\n } else if (nextIndex < 0) {\r\n nextIndex = tabbables.length - 1;\r\n }\r\n\r\n tabbables[nextIndex]?.focus();\r\n }\r\n\r\n private escape = () => {\r\n this.button.focus();\r\n this.toggleOptions(false);\r\n };\r\n\r\n render() {\r\n return (\r\n <Host onFocusout={this.focusOutListener}>\r\n <slot name=\"toggle\" />\r\n <div popover=\"manual\" ref={(element) => (this.popoverElement = element)}>\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -124,10 +124,10 @@ export class Header {
|
|
|
124
124
|
["use-drop-down"]: this.showDropDown,
|
|
125
125
|
}), ref: (element) => (this.wrapper = element) }, h("div", { class: "logo-container" }, h("slot", { name: "logo" })), this.showDropDown &&
|
|
126
126
|
this.mainMenu &&
|
|
127
|
-
(this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== "none") && (h("div", { class: "dropdown" }, h("dso-dropdown-menu", { "dropdown-align": "right",
|
|
127
|
+
(this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== "none") && (h("div", { class: "dropdown" }, h("dso-dropdown-menu", { "dropdown-align": "right", dropdownOptionsOffset: this.dropdownOptionsOffset, ref: (element) => (this.dropdownElement = element) }, h("button", { type: "button", slot: "toggle" }, h("span", null, this.text("menu")), h("dso-icon", { icon: "chevron-down" })), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu.map(this.MenuItem), this.userHomeUrl && (h("li", null, h("a", { href: this.userHomeUrl, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, this.text("userHome")))), this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("li", null, h("a", { href: this.userProfileUrl, onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName, h("span", { class: "profile-label" }, " - Mijn profiel")))), this.authStatus === "loggedOut" && (h("li", null, this.loginUrl ? (h("a", { href: this.loginUrl, onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, this.text("login"))) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "login") }, this.text("login"))))), this.authStatus === "loggedIn" && (h("li", null, this.logoutUrl ? (h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, this.text("logout"))) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "logout") }, this.text("logout"))))), this.showHelp && (h("li", null, this.helpUrl ? (h("a", { href: this.helpUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "help", { url: this.helpUrl }) }, h("span", null, this.text("help")), h("dso-icon", { icon: "help" }))) : (h("button", { type: "button", class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "help") }, h("span", null, this.text("help")), h("dso-icon", { icon: "help" })))))))))), !this.showDropDown && (h(Fragment, null, h("div", { class: "dso-header-session" }, this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("div", { class: "profile" }, h("a", { href: this.userProfileUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName))), this.authStatus === "loggedOut" && (h("div", { class: "login" }, this.loginUrl ? (h("a", { href: this.loginUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, this.text("login"))) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "login") }, this.text("login"))))), this.authStatus === "loggedIn" && (h("div", { class: "logout" }, this.logoutUrl ? (h("a", { href: this.logoutUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, this.text("logout"))) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "logout") }, this.text("logout"))))), this.showHelp && (h("div", { class: "help" }, this.helpUrl ? (h("a", { href: this.helpUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "help", { url: this.helpUrl }) }, h("span", null, this.text("help")), h("dso-icon", { icon: "help" }))) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "help") }, h("span", null, this.text("help")), h("dso-icon", { icon: "help" })))))), ((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (h("nav", { class: "dso-navbar" }, h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) }, this.mainMenu &&
|
|
128
128
|
this.mainMenu
|
|
129
129
|
.filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)
|
|
130
|
-
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu",
|
|
130
|
+
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu", null, h("button", { type: "button", slot: "toggle" }, h("span", null, this.text("overflowMenu")), h("dso-icon", { icon: "chevron-down" })), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu &&
|
|
131
131
|
this.mainMenu
|
|
132
132
|
.filter((_, index) => this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems)
|
|
133
133
|
.map(this.MenuItem)))))), this.userHomeUrl && (h("li", { class: clsx("menu-user-home", { "dso-active": this.userHomeActive }) }, h("a", { href: this.userHomeUrl, "aria-current": this.userHomeActive ? "page" : undefined, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, h("dso-icon", { icon: "user-line" }), this.text("userHome"))))))))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAOpC,MAAM,OAAO,MAAM;IALnB;QAyBE;;WAEG;QAEH,aAAQ,GAAsB,EAAE,CAAC;QAEjC;;WAEG;QAEH,oBAAe,GAAsB,MAAM,CAAC;QAE5C;;WAEG;QAEH,eAAU,GAAsC,MAAM,CAAC;QAgBvD;;WAEG;QAEH,aAAQ,GAAI,KAAK,CAAC;QAqClB,sBAAiB,GAAG,CAAC,CAAC;QAGtB,0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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Fragment, Prop, State, Watch, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { i18n } from \"../../utils/i18n\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { translations } from \"./header.i18n\";\r\nimport { HeaderEvent, HeaderMenuItem, HeaderNavigationType } from \"./header.interfaces\";\r\n\r\nconst minDesktopViewportWidth = 992;\r\n\r\n@Component({\r\n tag: \"dso-header\",\r\n styleUrl: \"header.scss\",\r\n shadow: true,\r\n})\r\nexport class Header {\r\n private clickHandler(\r\n e: MouseEvent,\r\n type: HeaderNavigationType,\r\n options?: { menuItem?: HeaderMenuItem; url?: string },\r\n ) {\r\n this.dsoHeaderClick.emit({\r\n originalEvent: e,\r\n isModifiedEvent: isModifiedEvent(e),\r\n type,\r\n menuItem: options?.menuItem,\r\n url: options?.url ?? options?.menuItem?.url,\r\n });\r\n }\r\n\r\n private dropdownElement?: HTMLElement;\r\n\r\n @Element()\r\n host!: HTMLDsoHeaderElement;\r\n\r\n /**\r\n * The main menu items.\r\n */\r\n @Prop()\r\n mainMenu?: HeaderMenuItem[] = [];\r\n\r\n /**\r\n * Either have the dropdown menu appear automatically or always.\r\n */\r\n @Prop()\r\n useDropDownMenu: \"always\" | \"auto\" = \"auto\";\r\n\r\n /**\r\n * Used to show the login/logout option. 'none' renders nothing.\r\n */\r\n @Prop()\r\n authStatus: \"none\" | \"loggedIn\" | \"loggedOut\" = \"none\";\r\n\r\n /**\r\n * When the `authStatus` is `loggedOut` a loginUrl can be provided.\r\n * The login button will then render as an anchor.\r\n */\r\n @Prop()\r\n loginUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"logout\".\r\n * If no URL is specified, a button element is used instead.\r\n */\r\n @Prop()\r\n logoutUrl?: string;\r\n\r\n /**\r\n * Show a help-button or link in the header\r\n */\r\n @Prop()\r\n showHelp? = false;\r\n\r\n /**\r\n * The URL to open when the user activates \"help\".\r\n * If no URL is specified, a button element is used instead.\r\n */\r\n @Prop()\r\n helpUrl?: string;\r\n\r\n /**\r\n * The name to show when the user is logged in.\r\n */\r\n @Prop()\r\n userProfileName?: string;\r\n\r\n /**\r\n * The URL to open when the user activates the profile url.\r\n */\r\n @Prop()\r\n userProfileUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeUrl?: string;\r\n\r\n /**\r\n * Set this to true when the user is at \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeActive?: boolean;\r\n\r\n @State()\r\n showDropDown?: boolean;\r\n\r\n @State()\r\n overflowMenuItems = 0;\r\n\r\n @State()\r\n dropdownOptionsOffset = 0;\r\n\r\n /**\r\n * Emitted when something in the header is selected.\r\n *\r\n * `event.detail.type` indicates the functionality the user pressed. eg. `'login'` or `'menuItem'`\r\n */\r\n @Event()\r\n dsoHeaderClick!: EventEmitter<HeaderEvent>;\r\n\r\n @Watch(\"useDropDownMenu\")\r\n setShowDropDown(value: \"always\" | \"auto\") {\r\n if (value === \"auto\") {\r\n this.setDropDownMenu();\r\n\r\n return;\r\n }\r\n\r\n this.showDropDown = value === \"always\";\r\n }\r\n\r\n private wrapper: HTMLDivElement | undefined;\r\n\r\n private nav: HTMLUListElement | undefined;\r\n\r\n private shrinkMenuToFit() {\r\n if (!this.wrapper || !this.nav) {\r\n return;\r\n }\r\n\r\n if (this.wrapper.clientWidth >= this.nav.clientWidth) {\r\n return;\r\n }\r\n\r\n if (this.mainMenu && this.overflowMenuItems >= this.mainMenu.length) {\r\n return;\r\n }\r\n\r\n this.overflowMenuItems++;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidRender() {\r\n if (!this.host.isConnected) {\r\n return;\r\n }\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n\r\n return;\r\n }\r\n\r\n window.setTimeout(() => this.shrinkMenuToFit(), 0);\r\n }\r\n\r\n componentDidLoad() {\r\n this.setShowDropDown(this.useDropDownMenu);\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }\r\n\r\n private setOverflowMenu() {\r\n if (this.showDropDown) {\r\n return;\r\n }\r\n\r\n if (this.overflowMenuItems !== 0) {\r\n this.overflowMenuItems = 0;\r\n return;\r\n }\r\n\r\n this.shrinkMenuToFit();\r\n }\r\n\r\n private setDropDownMenu() {\r\n if (this.useDropDownMenu !== \"auto\") {\r\n return;\r\n }\r\n\r\n this.showDropDown = window.innerWidth < minDesktopViewportWidth;\r\n }\r\n\r\n private calculateDropdownOptionsOffset() {\r\n if (!this.dropdownElement) {\r\n return 0;\r\n }\r\n\r\n return (\r\n this.host.clientHeight -\r\n (this.dropdownElement?.getBoundingClientRect().bottom - this.host.getBoundingClientRect().top)\r\n );\r\n }\r\n\r\n private onWindowResize = debounce(() => {\r\n this.dropdownElement?.removeAttribute(\"open\");\r\n this.dropdownElement?.removeAttribute(\"tabindex\");\r\n\r\n this.setDropDownMenu();\r\n this.setOverflowMenu();\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }, 100);\r\n\r\n connectedCallback() {\r\n window.addEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n disconnectedCallback() {\r\n window.removeEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n private MenuItem = (item: HeaderMenuItem) => {\r\n return (\r\n <li class={item.active ? \"dso-active\" : undefined}>\r\n <a\r\n href={item.url}\r\n aria-current={item.active ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"menuItem\", { menuItem: item })}\r\n >\r\n {item.label}\r\n </a>\r\n </li>\r\n );\r\n };\r\n\r\n render() {\r\n // Prevent 'flickering' when useDropDownMenu = 'always'\r\n if (this.showDropDown === undefined) {\r\n return;\r\n }\r\n\r\n return (\r\n <>\r\n <div\r\n class={clsx(\"dso-header\", {\r\n [\"use-drop-down\"]: this.showDropDown,\r\n })}\r\n ref={(element) => (this.wrapper = element)}\r\n >\r\n <div class=\"logo-container\">\r\n <slot name=\"logo\" />\r\n </div>\r\n {this.showDropDown &&\r\n this.mainMenu &&\r\n (this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== \"none\") && (\r\n <div class=\"dropdown\">\r\n <dso-dropdown-menu\r\n dropdown-align=\"right\"\r\n strategy=\"absolute\"\r\n dropdownOptionsOffset={this.dropdownOptionsOffset}\r\n ref={(element) => (this.dropdownElement = element)}\r\n >\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>{this.text(\"menu\")}</span>\r\n <dso-icon icon=\"chevron-down\"></dso-icon>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu.map(this.MenuItem)}\r\n {this.userHomeUrl && (\r\n <li>\r\n <a\r\n href={this.userHomeUrl}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n {this.text(\"userHome\")}\r\n </a>\r\n </li>\r\n )}\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <li>\r\n <a\r\n href={this.userProfileUrl}\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n <span class=\"profile-label\"> - Mijn profiel</span>\r\n </a>\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <li>\r\n {this.loginUrl ? (\r\n <a\r\n href={this.loginUrl}\r\n onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}\r\n >\r\n {this.text(\"login\")}\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n {this.text(\"login\")}\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <li>\r\n {this.logoutUrl ? (\r\n <a\r\n href={this.logoutUrl}\r\n onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}\r\n >\r\n {this.text(\"logout\")}\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n {this.text(\"logout\")}\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n {this.showHelp && (\r\n <li>\r\n {this.helpUrl ? (\r\n <a\r\n href={this.helpUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"help\", { url: this.helpUrl })}\r\n >\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </a>\r\n ) : (\r\n <button type=\"button\" class=\"dso-tertiary\" onClick={(e) => this.clickHandler(e, \"help\")}>\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </div>\r\n )}\r\n {!this.showDropDown && (\r\n <>\r\n <div class=\"dso-header-session\">\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <div class=\"profile\">\r\n <a\r\n href={this.userProfileUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n </a>\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <div class=\"login\">\r\n {this.loginUrl ? (\r\n <a\r\n href={this.loginUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}\r\n >\r\n {this.text(\"login\")}\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n {this.text(\"login\")}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <div class=\"logout\">\r\n {this.logoutUrl ? (\r\n <a\r\n href={this.logoutUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}\r\n >\r\n {this.text(\"logout\")}\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n {this.text(\"logout\")}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {this.showHelp && (\r\n <div class=\"help\">\r\n {this.helpUrl ? (\r\n <a\r\n href={this.helpUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"help\", { url: this.helpUrl })}\r\n >\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"help\")}>\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (\r\n <nav class=\"dso-navbar\">\r\n <ul class=\"dso-nav dso-nav-main\" ref={(element) => (this.nav = element)}>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)\r\n .map(this.MenuItem)}\r\n {this.overflowMenuItems > 0 && (\r\n <li>\r\n <dso-dropdown-menu placement=\"bottom\">\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>{this.text(\"overflowMenu\")}</span>\r\n <dso-icon icon=\"chevron-down\"></dso-icon>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter(\r\n (_, index) =>\r\n this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems,\r\n )\r\n .map(this.MenuItem)}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </li>\r\n )}\r\n {this.userHomeUrl && (\r\n <li class={clsx(\"menu-user-home\", { \"dso-active\": this.userHomeActive })}>\r\n <a\r\n href={this.userHomeUrl}\r\n aria-current={this.userHomeActive ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n <dso-icon icon=\"user-line\"></dso-icon>\r\n {this.text(\"userHome\")}\r\n </a>\r\n </li>\r\n )}\r\n </ul>\r\n </nav>\r\n )}\r\n </>\r\n )}\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAOpC,MAAM,OAAO,MAAM;IALnB;QAyBE;;WAEG;QAEH,aAAQ,GAAsB,EAAE,CAAC;QAEjC;;WAEG;QAEH,oBAAe,GAAsB,MAAM,CAAC;QAE5C;;WAEG;QAEH,eAAU,GAAsC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Fragment, Prop, State, Watch, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { i18n } from \"../../utils/i18n\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { translations } from \"./header.i18n\";\r\nimport { HeaderEvent, HeaderMenuItem, HeaderNavigationType } from \"./header.interfaces\";\r\n\r\nconst minDesktopViewportWidth = 992;\r\n\r\n@Component({\r\n tag: \"dso-header\",\r\n styleUrl: \"header.scss\",\r\n shadow: true,\r\n})\r\nexport class Header {\r\n private clickHandler(\r\n e: MouseEvent,\r\n type: HeaderNavigationType,\r\n options?: { menuItem?: HeaderMenuItem; url?: string },\r\n ) {\r\n this.dsoHeaderClick.emit({\r\n originalEvent: e,\r\n isModifiedEvent: isModifiedEvent(e),\r\n type,\r\n menuItem: options?.menuItem,\r\n url: options?.url ?? options?.menuItem?.url,\r\n });\r\n }\r\n\r\n private dropdownElement?: HTMLElement;\r\n\r\n @Element()\r\n host!: HTMLDsoHeaderElement;\r\n\r\n /**\r\n * The main menu items.\r\n */\r\n @Prop()\r\n mainMenu?: HeaderMenuItem[] = [];\r\n\r\n /**\r\n * Either have the dropdown menu appear automatically or always.\r\n */\r\n @Prop()\r\n useDropDownMenu: \"always\" | \"auto\" = \"auto\";\r\n\r\n /**\r\n * Used to show the login/logout option. 'none' renders nothing.\r\n */\r\n @Prop()\r\n authStatus: \"none\" | \"loggedIn\" | \"loggedOut\" = \"none\";\r\n\r\n /**\r\n * When the `authStatus` is `loggedOut` a loginUrl can be provided.\r\n * The login button will then render as an anchor.\r\n */\r\n @Prop()\r\n loginUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"logout\".\r\n * If no URL is specified, a button element is used instead.\r\n */\r\n @Prop()\r\n logoutUrl?: string;\r\n\r\n /**\r\n * Show a help-button or link in the header\r\n */\r\n @Prop()\r\n showHelp? = false;\r\n\r\n /**\r\n * The URL to open when the user activates \"help\".\r\n * If no URL is specified, a button element is used instead.\r\n */\r\n @Prop()\r\n helpUrl?: string;\r\n\r\n /**\r\n * The name to show when the user is logged in.\r\n */\r\n @Prop()\r\n userProfileName?: string;\r\n\r\n /**\r\n * The URL to open when the user activates the profile url.\r\n */\r\n @Prop()\r\n userProfileUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeUrl?: string;\r\n\r\n /**\r\n * Set this to true when the user is at \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeActive?: boolean;\r\n\r\n @State()\r\n showDropDown?: boolean;\r\n\r\n @State()\r\n overflowMenuItems = 0;\r\n\r\n @State()\r\n dropdownOptionsOffset = 0;\r\n\r\n /**\r\n * Emitted when something in the header is selected.\r\n *\r\n * `event.detail.type` indicates the functionality the user pressed. eg. `'login'` or `'menuItem'`\r\n */\r\n @Event()\r\n dsoHeaderClick!: EventEmitter<HeaderEvent>;\r\n\r\n @Watch(\"useDropDownMenu\")\r\n setShowDropDown(value: \"always\" | \"auto\") {\r\n if (value === \"auto\") {\r\n this.setDropDownMenu();\r\n\r\n return;\r\n }\r\n\r\n this.showDropDown = value === \"always\";\r\n }\r\n\r\n private wrapper: HTMLDivElement | undefined;\r\n\r\n private nav: HTMLUListElement | undefined;\r\n\r\n private shrinkMenuToFit() {\r\n if (!this.wrapper || !this.nav) {\r\n return;\r\n }\r\n\r\n if (this.wrapper.clientWidth >= this.nav.clientWidth) {\r\n return;\r\n }\r\n\r\n if (this.mainMenu && this.overflowMenuItems >= this.mainMenu.length) {\r\n return;\r\n }\r\n\r\n this.overflowMenuItems++;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidRender() {\r\n if (!this.host.isConnected) {\r\n return;\r\n }\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n\r\n return;\r\n }\r\n\r\n window.setTimeout(() => this.shrinkMenuToFit(), 0);\r\n }\r\n\r\n componentDidLoad() {\r\n this.setShowDropDown(this.useDropDownMenu);\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }\r\n\r\n private setOverflowMenu() {\r\n if (this.showDropDown) {\r\n return;\r\n }\r\n\r\n if (this.overflowMenuItems !== 0) {\r\n this.overflowMenuItems = 0;\r\n return;\r\n }\r\n\r\n this.shrinkMenuToFit();\r\n }\r\n\r\n private setDropDownMenu() {\r\n if (this.useDropDownMenu !== \"auto\") {\r\n return;\r\n }\r\n\r\n this.showDropDown = window.innerWidth < minDesktopViewportWidth;\r\n }\r\n\r\n private calculateDropdownOptionsOffset() {\r\n if (!this.dropdownElement) {\r\n return 0;\r\n }\r\n\r\n return (\r\n this.host.clientHeight -\r\n (this.dropdownElement?.getBoundingClientRect().bottom - this.host.getBoundingClientRect().top)\r\n );\r\n }\r\n\r\n private onWindowResize = debounce(() => {\r\n this.dropdownElement?.removeAttribute(\"open\");\r\n this.dropdownElement?.removeAttribute(\"tabindex\");\r\n\r\n this.setDropDownMenu();\r\n this.setOverflowMenu();\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }, 100);\r\n\r\n connectedCallback() {\r\n window.addEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n disconnectedCallback() {\r\n window.removeEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n private MenuItem = (item: HeaderMenuItem) => {\r\n return (\r\n <li class={item.active ? \"dso-active\" : undefined}>\r\n <a\r\n href={item.url}\r\n aria-current={item.active ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"menuItem\", { menuItem: item })}\r\n >\r\n {item.label}\r\n </a>\r\n </li>\r\n );\r\n };\r\n\r\n render() {\r\n // Prevent 'flickering' when useDropDownMenu = 'always'\r\n if (this.showDropDown === undefined) {\r\n return;\r\n }\r\n\r\n return (\r\n <>\r\n <div\r\n class={clsx(\"dso-header\", {\r\n [\"use-drop-down\"]: this.showDropDown,\r\n })}\r\n ref={(element) => (this.wrapper = element)}\r\n >\r\n <div class=\"logo-container\">\r\n <slot name=\"logo\" />\r\n </div>\r\n {this.showDropDown &&\r\n this.mainMenu &&\r\n (this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== \"none\") && (\r\n <div class=\"dropdown\">\r\n <dso-dropdown-menu\r\n dropdown-align=\"right\"\r\n dropdownOptionsOffset={this.dropdownOptionsOffset}\r\n ref={(element) => (this.dropdownElement = element)}\r\n >\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>{this.text(\"menu\")}</span>\r\n <dso-icon icon=\"chevron-down\"></dso-icon>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu.map(this.MenuItem)}\r\n {this.userHomeUrl && (\r\n <li>\r\n <a\r\n href={this.userHomeUrl}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n {this.text(\"userHome\")}\r\n </a>\r\n </li>\r\n )}\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <li>\r\n <a\r\n href={this.userProfileUrl}\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n <span class=\"profile-label\"> - Mijn profiel</span>\r\n </a>\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <li>\r\n {this.loginUrl ? (\r\n <a\r\n href={this.loginUrl}\r\n onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}\r\n >\r\n {this.text(\"login\")}\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n {this.text(\"login\")}\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <li>\r\n {this.logoutUrl ? (\r\n <a\r\n href={this.logoutUrl}\r\n onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}\r\n >\r\n {this.text(\"logout\")}\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n {this.text(\"logout\")}\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n {this.showHelp && (\r\n <li>\r\n {this.helpUrl ? (\r\n <a\r\n href={this.helpUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"help\", { url: this.helpUrl })}\r\n >\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </a>\r\n ) : (\r\n <button type=\"button\" class=\"dso-tertiary\" onClick={(e) => this.clickHandler(e, \"help\")}>\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </div>\r\n )}\r\n {!this.showDropDown && (\r\n <>\r\n <div class=\"dso-header-session\">\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <div class=\"profile\">\r\n <a\r\n href={this.userProfileUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n </a>\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <div class=\"login\">\r\n {this.loginUrl ? (\r\n <a\r\n href={this.loginUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}\r\n >\r\n {this.text(\"login\")}\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n {this.text(\"login\")}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <div class=\"logout\">\r\n {this.logoutUrl ? (\r\n <a\r\n href={this.logoutUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}\r\n >\r\n {this.text(\"logout\")}\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n {this.text(\"logout\")}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {this.showHelp && (\r\n <div class=\"help\">\r\n {this.helpUrl ? (\r\n <a\r\n href={this.helpUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"help\", { url: this.helpUrl })}\r\n >\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"help\")}>\r\n <span>{this.text(\"help\")}</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (\r\n <nav class=\"dso-navbar\">\r\n <ul class=\"dso-nav dso-nav-main\" ref={(element) => (this.nav = element)}>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)\r\n .map(this.MenuItem)}\r\n {this.overflowMenuItems > 0 && (\r\n <li>\r\n <dso-dropdown-menu>\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>{this.text(\"overflowMenu\")}</span>\r\n <dso-icon icon=\"chevron-down\"></dso-icon>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter(\r\n (_, index) =>\r\n this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems,\r\n )\r\n .map(this.MenuItem)}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </li>\r\n )}\r\n {this.userHomeUrl && (\r\n <li class={clsx(\"menu-user-home\", { \"dso-active\": this.userHomeActive })}>\r\n <a\r\n href={this.userHomeUrl}\r\n aria-current={this.userHomeActive ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n <dso-icon icon=\"user-line\"></dso-icon>\r\n {this.text(\"userHome\")}\r\n </a>\r\n </li>\r\n )}\r\n </ul>\r\n </nav>\r\n )}\r\n </>\r\n )}\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -3,7 +3,7 @@ export class HighlightBox {
|
|
|
3
3
|
render() {
|
|
4
4
|
var _a;
|
|
5
5
|
const hasCounter = this.step || !!this.element.querySelector("[slot=icon]");
|
|
6
|
-
return (h(Host, { key: '
|
|
6
|
+
return (h(Host, { key: '86c4c5ff4f81dc76c1dc7ced1ae0f08ac4ab871c', "has-counter": hasCounter }, hasCounter && h("div", { key: '550d9f9ef78cc89764ceebf7c9cff46587a4ec80', class: "dso-step-counter" }, (_a = this.step) !== null && _a !== void 0 ? _a : h("slot", { key: 'bc7cbca36525b162059ec21356ab96d1f313722f', name: "icon" })), h("slot", { key: 'd4d43a29f08c330a3e6b59604e8509d2af05a50a' })));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "dso-highlight-box"; }
|
|
9
9
|
static get encapsulation() { return "shadow"; }
|
|
@@ -216,7 +216,7 @@ export class Icon {
|
|
|
216
216
|
if (!icon) {
|
|
217
217
|
throw new TypeError(`Unknown svg: ${this.icon}`);
|
|
218
218
|
}
|
|
219
|
-
return h("span", { key: '
|
|
219
|
+
return h("span", { key: 'fb24ae73d46158d43091e9a654b7e2651f428a7c', class: "icon-container", innerHTML: icon.svg });
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
static get is() { return "dso-icon"; }
|
|
@@ -76,12 +76,12 @@ button::-moz-focus-inner {
|
|
|
76
76
|
}
|
|
77
77
|
.open:hover {
|
|
78
78
|
background-color: var(--_dso-button-secondary-hover-background-color, #d7e7ce);
|
|
79
|
-
border-color: var(--_dso-button-secondary-hover-border-color, #
|
|
80
|
-
color: var(--_dso-button-secondary-hover-color, #
|
|
79
|
+
border-color: var(--_dso-button-secondary-hover-border-color, #275937);
|
|
80
|
+
color: var(--_dso-button-secondary-hover-color, #275937);
|
|
81
81
|
}
|
|
82
82
|
.open:active {
|
|
83
|
-
background-color: var(--_dso-button-secondary-active-background-color, #
|
|
84
|
-
border-color: var(--_dso-button-secondary-active-border-color, #
|
|
83
|
+
background-color: var(--_dso-button-secondary-active-background-color, #275937);
|
|
84
|
+
border-color: var(--_dso-button-secondary-active-border-color, #275937);
|
|
85
85
|
color: var(--_dso-button-secondary-active-color, #fff);
|
|
86
86
|
}
|
|
87
87
|
.open[disabled], .open[disabled]:hover {
|
|
@@ -251,12 +251,12 @@ button::-moz-focus-inner {
|
|
|
251
251
|
}
|
|
252
252
|
.close:hover {
|
|
253
253
|
background-color: var(--_dso-button-secondary-hover-background-color, #d7e7ce);
|
|
254
|
-
border-color: var(--_dso-button-secondary-hover-border-color, #
|
|
255
|
-
color: var(--_dso-button-secondary-hover-color, #
|
|
254
|
+
border-color: var(--_dso-button-secondary-hover-border-color, #275937);
|
|
255
|
+
color: var(--_dso-button-secondary-hover-color, #275937);
|
|
256
256
|
}
|
|
257
257
|
.close:active {
|
|
258
|
-
background-color: var(--_dso-button-secondary-active-background-color, #
|
|
259
|
-
border-color: var(--_dso-button-secondary-active-border-color, #
|
|
258
|
+
background-color: var(--_dso-button-secondary-active-background-color, #275937);
|
|
259
|
+
border-color: var(--_dso-button-secondary-active-border-color, #275937);
|
|
260
260
|
color: var(--_dso-button-secondary-active-color, #fff);
|
|
261
261
|
}
|
|
262
262
|
.close[disabled], .close[disabled]:hover {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, h } from "@stencil/core";
|
|
2
2
|
export class Info {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Fragment, { key: '
|
|
4
|
+
return (h(Fragment, { key: '7c3f9fed7a8ab8dbabe817e1b978e940f26f27f8' }, h("slot", { key: '74dbbbdf2d445f448a7de100196ef0df2305734f' }), !this.fixed && (h("button", { key: '5e702078b32a2d57fafb0758941c57548d7a5851', type: "button", onClick: (e) => this.dsoClose.emit(e) }, h("dso-icon", { key: '494887a2f0fa4ab19a2d2b448d9821a001cd9cfb', icon: "times" }), h("span", { key: '052dde259dd0f396097b3c3ead102bb10edda4ff', class: "sr-only" }, "Sluiten")))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "dso-info"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,7 +20,7 @@ export class InfoButton {
|
|
|
20
20
|
this.dsoToggle.emit({ originalEvent: e, active: this.active });
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '0943299e0676d7b9abcb7ce7ccc1bf189e0d492a', onMouseenter: () => (this.hover = true), onMouseleave: () => (this.hover = false) }, h("button", { key: '062f533cb31e179a279d1b4f6b18374966434196', type: "button", class: clsx({ "dso-open": !!this.active, "dso-info-secondary": !!this.secondary }), "aria-expanded": typeof this.active === "boolean" ? this.active.toString() : undefined, onClick: (e) => this.handleToggle(e), ref: (element) => (this.button = element) }, h("dso-icon", { key: 'a8a717a778cfbb2fe2306c5420e2a97dddc69be7', icon: this.active || this.hover ? "info-active" : "info" }), h("span", { key: '18c1eb9ca295d6f46f6cd52ce1b379186fe06e53', class: "sr-only" }, this.label))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "dso-info-button"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|