@dso-toolkit/core 73.2.1 → 74.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.d.ts +11 -0
- package/dist/bundle/dso-accordion-section.js +281 -0
- package/dist/bundle/dso-accordion-section.js.map +1 -0
- package/dist/bundle/dso-accordion.d.ts +11 -0
- package/dist/bundle/dso-accordion.js +262 -0
- package/dist/bundle/dso-accordion.js.map +1 -0
- package/dist/bundle/dso-action-list-item.d.ts +11 -0
- package/dist/bundle/dso-action-list-item.js +63 -0
- package/dist/bundle/dso-action-list-item.js.map +1 -0
- package/dist/bundle/dso-action-list.d.ts +11 -0
- package/dist/bundle/dso-action-list.js +38 -0
- package/dist/bundle/dso-action-list.js.map +1 -0
- package/dist/bundle/dso-advanced-select.d.ts +11 -0
- package/dist/bundle/dso-advanced-select.js +155 -0
- package/dist/bundle/dso-advanced-select.js.map +1 -0
- package/dist/bundle/dso-alert.d.ts +11 -0
- package/dist/bundle/dso-alert.js +9 -0
- package/dist/bundle/dso-alert.js.map +1 -0
- package/dist/bundle/dso-annotation-activiteit.d.ts +11 -0
- package/dist/bundle/dso-annotation-activiteit.js +87 -0
- package/dist/bundle/dso-annotation-activiteit.js.map +1 -0
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.d.ts +11 -0
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.js +83 -0
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.js.map +1 -0
- package/dist/bundle/dso-annotation-kaart.d.ts +11 -0
- package/dist/bundle/dso-annotation-kaart.js +72 -0
- package/dist/bundle/dso-annotation-kaart.js.map +1 -0
- package/dist/bundle/dso-annotation-locatie.d.ts +11 -0
- package/dist/bundle/dso-annotation-locatie.js +9 -0
- package/dist/bundle/dso-annotation-locatie.js.map +1 -0
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.d.ts +11 -0
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.js +87 -0
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.js.map +1 -0
- package/dist/bundle/dso-attachments-counter.d.ts +11 -0
- package/dist/bundle/dso-attachments-counter.js +9 -0
- package/dist/bundle/dso-attachments-counter.js.map +1 -0
- package/dist/bundle/dso-autosuggest.d.ts +11 -0
- package/dist/bundle/dso-autosuggest.js +588 -0
- package/dist/bundle/dso-autosuggest.js.map +1 -0
- package/dist/bundle/dso-badge.d.ts +11 -0
- package/dist/bundle/dso-badge.js +9 -0
- package/dist/bundle/dso-badge.js.map +1 -0
- package/dist/bundle/dso-banner.d.ts +11 -0
- package/dist/bundle/dso-banner.js +53 -0
- package/dist/bundle/dso-banner.js.map +1 -0
- package/dist/bundle/dso-card-container.d.ts +11 -0
- package/dist/bundle/dso-card-container.js +42 -0
- package/dist/bundle/dso-card-container.js.map +1 -0
- package/dist/bundle/dso-card.d.ts +11 -0
- package/dist/bundle/dso-card.js +72 -0
- package/dist/bundle/dso-card.js.map +1 -0
- package/dist/bundle/dso-contact-information.d.ts +11 -0
- package/dist/bundle/dso-contact-information.js +36 -0
- package/dist/bundle/dso-contact-information.js.map +1 -0
- package/dist/bundle/dso-date-picker-legacy.d.ts +11 -0
- package/dist/bundle/dso-date-picker-legacy.js +773 -0
- package/dist/bundle/dso-date-picker-legacy.js.map +1 -0
- package/dist/bundle/dso-date-picker.d.ts +11 -0
- package/dist/bundle/dso-date-picker.js +187 -0
- package/dist/bundle/dso-date-picker.js.map +1 -0
- package/dist/bundle/dso-document-card.d.ts +11 -0
- package/dist/bundle/dso-document-card.js +66 -0
- package/dist/bundle/dso-document-card.js.map +1 -0
- package/dist/bundle/dso-document-component.d.ts +11 -0
- package/dist/bundle/dso-document-component.js +9 -0
- package/dist/bundle/dso-document-component.js.map +1 -0
- package/dist/bundle/dso-dropdown-menu.d.ts +11 -0
- package/dist/bundle/dso-dropdown-menu.js +9 -0
- package/dist/bundle/dso-dropdown-menu.js.map +1 -0
- package/dist/bundle/dso-expandable.d.ts +11 -0
- package/dist/bundle/dso-expandable.js +9 -0
- package/dist/bundle/dso-expandable.js.map +1 -0
- package/dist/bundle/dso-header.d.ts +11 -0
- package/dist/bundle/dso-header.js +218 -0
- package/dist/bundle/dso-header.js.map +1 -0
- package/dist/bundle/dso-highlight-box.d.ts +11 -0
- package/dist/bundle/dso-highlight-box.js +45 -0
- package/dist/bundle/dso-highlight-box.js.map +1 -0
- package/dist/bundle/dso-icon.d.ts +11 -0
- package/dist/bundle/dso-icon.js +9 -0
- package/dist/bundle/dso-icon.js.map +1 -0
- package/dist/bundle/dso-image-overlay.d.ts +11 -0
- package/dist/bundle/dso-image-overlay.js +9 -0
- package/dist/bundle/dso-image-overlay.js.map +1 -0
- package/dist/bundle/dso-info-button.d.ts +11 -0
- package/dist/bundle/dso-info-button.js +9 -0
- package/dist/bundle/dso-info-button.js.map +1 -0
- package/dist/bundle/dso-info.d.ts +11 -0
- package/dist/bundle/dso-info.js +9 -0
- package/dist/bundle/dso-info.js.map +1 -0
- package/dist/bundle/dso-input-range.d.ts +11 -0
- package/dist/bundle/dso-input-range.js +59 -0
- package/dist/bundle/dso-input-range.js.map +1 -0
- package/dist/bundle/dso-label.d.ts +11 -0
- package/dist/bundle/dso-label.js +9 -0
- package/dist/bundle/dso-label.js.map +1 -0
- package/dist/bundle/dso-legend-item.d.ts +11 -0
- package/dist/bundle/dso-legend-item.js +90 -0
- package/dist/bundle/dso-legend-item.js.map +1 -0
- package/dist/bundle/dso-list-button.d.ts +11 -0
- package/dist/bundle/dso-list-button.js +118 -0
- package/dist/bundle/dso-list-button.js.map +1 -0
- package/dist/bundle/dso-logo.d.ts +11 -0
- package/dist/bundle/dso-logo.js +64 -0
- package/dist/bundle/dso-logo.js.map +1 -0
- package/dist/bundle/dso-map-base-layers.d.ts +11 -0
- package/dist/bundle/dso-map-base-layers.js +101 -0
- package/dist/bundle/dso-map-base-layers.js.map +1 -0
- package/dist/bundle/dso-map-controls.d.ts +11 -0
- package/dist/bundle/dso-map-controls.js +138 -0
- package/dist/bundle/dso-map-controls.js.map +1 -0
- package/dist/bundle/dso-map-overlays.d.ts +11 -0
- package/dist/bundle/dso-map-overlays.js +102 -0
- package/dist/bundle/dso-map-overlays.js.map +1 -0
- package/dist/bundle/dso-mark-bar.d.ts +11 -0
- package/dist/bundle/dso-mark-bar.js +91 -0
- package/dist/bundle/dso-mark-bar.js.map +1 -0
- package/dist/bundle/dso-modal.d.ts +11 -0
- package/dist/bundle/dso-modal.js +133 -0
- package/dist/bundle/dso-modal.js.map +1 -0
- package/dist/bundle/dso-onboarding-tip.d.ts +11 -0
- package/dist/bundle/dso-onboarding-tip.js +1839 -0
- package/dist/bundle/dso-onboarding-tip.js.map +1 -0
- package/dist/bundle/dso-ozon-content.d.ts +11 -0
- package/dist/bundle/dso-ozon-content.js +9 -0
- package/dist/bundle/dso-ozon-content.js.map +1 -0
- package/dist/bundle/dso-pagination.d.ts +11 -0
- package/dist/bundle/dso-pagination.js +188 -0
- package/dist/bundle/dso-pagination.js.map +1 -0
- package/dist/bundle/dso-panel.d.ts +11 -0
- package/dist/bundle/dso-panel.js +9 -0
- package/dist/bundle/dso-panel.js.map +1 -0
- package/dist/bundle/dso-plekinfo-card.d.ts +11 -0
- package/dist/bundle/dso-plekinfo-card.js +88 -0
- package/dist/bundle/dso-plekinfo-card.js.map +1 -0
- package/dist/bundle/dso-progress-bar.d.ts +11 -0
- package/dist/bundle/dso-progress-bar.js +50 -0
- package/dist/bundle/dso-progress-bar.js.map +1 -0
- package/dist/bundle/dso-progress-indicator.d.ts +11 -0
- package/dist/bundle/dso-progress-indicator.js +9 -0
- package/dist/bundle/dso-progress-indicator.js.map +1 -0
- package/dist/bundle/dso-project-item.d.ts +11 -0
- package/dist/bundle/dso-project-item.js +56 -0
- package/dist/bundle/dso-project-item.js.map +1 -0
- package/dist/bundle/dso-renvooi.d.ts +11 -0
- package/dist/bundle/dso-renvooi.js +9 -0
- package/dist/bundle/dso-renvooi.js.map +1 -0
- package/dist/bundle/dso-responsive-element.d.ts +11 -0
- package/dist/bundle/dso-responsive-element.js +9 -0
- package/dist/bundle/dso-responsive-element.js.map +1 -0
- package/dist/bundle/dso-scrollable.d.ts +11 -0
- package/dist/bundle/dso-scrollable.js +9 -0
- package/dist/bundle/dso-scrollable.js.map +1 -0
- package/dist/bundle/dso-selectable.d.ts +11 -0
- package/dist/bundle/dso-selectable.js +9 -0
- package/dist/bundle/dso-selectable.js.map +1 -0
- package/dist/bundle/dso-skiplink.d.ts +11 -0
- package/dist/bundle/dso-skiplink.js +53 -0
- package/dist/bundle/dso-skiplink.js.map +1 -0
- package/dist/bundle/dso-slide-toggle.d.ts +11 -0
- package/dist/bundle/dso-slide-toggle.js +9 -0
- package/dist/bundle/dso-slide-toggle.js.map +1 -0
- package/dist/bundle/dso-survey-rating.d.ts +11 -0
- package/dist/bundle/dso-survey-rating.js +70 -0
- package/dist/bundle/dso-survey-rating.js.map +1 -0
- package/dist/bundle/dso-tab.d.ts +11 -0
- package/dist/bundle/dso-tab.js +70 -0
- package/dist/bundle/dso-tab.js.map +1 -0
- package/dist/bundle/dso-table.d.ts +11 -0
- package/dist/bundle/dso-table.js +9 -0
- package/dist/bundle/dso-table.js.map +1 -0
- package/dist/bundle/dso-tabs.d.ts +11 -0
- package/dist/bundle/dso-tabs.js +94 -0
- package/dist/bundle/dso-tabs.js.map +1 -0
- package/dist/bundle/dso-toggletip.d.ts +11 -0
- package/dist/bundle/dso-toggletip.js +9 -0
- package/dist/bundle/dso-toggletip.js.map +1 -0
- package/dist/bundle/dso-tooltip.d.ts +11 -0
- package/dist/bundle/dso-tooltip.js +9 -0
- package/dist/bundle/dso-tooltip.js.map +1 -0
- package/dist/bundle/dso-tree-view.d.ts +11 -0
- package/dist/bundle/dso-tree-view.js +237 -0
- package/dist/bundle/dso-tree-view.js.map +1 -0
- package/dist/bundle/dso-viewer-grid.d.ts +11 -0
- package/dist/bundle/dso-viewer-grid.js +287 -0
- package/dist/bundle/dso-viewer-grid.js.map +1 -0
- package/dist/bundle/dsot-document-component-demo.d.ts +11 -0
- package/dist/bundle/dsot-document-component-demo.js +1957 -0
- package/dist/bundle/dsot-document-component-demo.js.map +1 -0
- package/dist/bundle/index.d.ts +45 -0
- package/dist/bundle/index.js +143 -0
- package/dist/bundle/index.js.map +1 -0
- package/dist/bundle/p-0JGmXD8O.js +59 -0
- package/dist/bundle/p-0JGmXD8O.js.map +1 -0
- package/dist/bundle/p-BF0_OXTe.js +60 -0
- package/dist/bundle/p-BF0_OXTe.js.map +1 -0
- package/dist/bundle/p-BJv2m9ZZ.js +253 -0
- package/dist/bundle/p-BJv2m9ZZ.js.map +1 -0
- package/dist/bundle/p-B_kXuEcW.js +2178 -0
- package/dist/bundle/p-B_kXuEcW.js.map +1 -0
- package/dist/bundle/p-BacS1uCc.js +35 -0
- package/dist/bundle/p-BacS1uCc.js.map +1 -0
- package/dist/bundle/p-BdyXpl60.js +76 -0
- package/dist/bundle/p-BdyXpl60.js.map +1 -0
- package/dist/bundle/p-BocpUT46.js +992 -0
- package/dist/bundle/p-BocpUT46.js.map +1 -0
- package/dist/bundle/p-BtcZ9oZ6.js +115 -0
- package/dist/bundle/p-BtcZ9oZ6.js.map +1 -0
- package/dist/bundle/p-BxvZeNWe.js +126 -0
- package/dist/bundle/p-BxvZeNWe.js.map +1 -0
- package/dist/bundle/p-C1tscMvU.js +43 -0
- package/dist/bundle/p-C1tscMvU.js.map +1 -0
- package/dist/bundle/p-CZ2ipzNO.js +63 -0
- package/dist/bundle/p-CZ2ipzNO.js.map +1 -0
- package/dist/bundle/p-C_CoF0aB.js +163 -0
- package/dist/bundle/p-C_CoF0aB.js.map +1 -0
- package/dist/bundle/p-ChV9xqsO.js +6 -0
- package/dist/bundle/p-ChV9xqsO.js.map +1 -0
- package/dist/bundle/p-CkBk3gL8.js +80 -0
- package/dist/bundle/p-CkBk3gL8.js.map +1 -0
- package/dist/bundle/p-Cng7insW.js +145 -0
- package/dist/bundle/p-Cng7insW.js.map +1 -0
- package/dist/bundle/p-CodDyi2J.js +15 -0
- package/dist/bundle/p-CodDyi2J.js.map +1 -0
- package/dist/bundle/p-CsY83cJO.js +1801 -0
- package/dist/bundle/p-CsY83cJO.js.map +1 -0
- package/dist/bundle/p-CvGnEQcm.js +80 -0
- package/dist/bundle/p-CvGnEQcm.js.map +1 -0
- package/dist/bundle/p-CwXjPr2h.js +36 -0
- package/dist/bundle/p-CwXjPr2h.js.map +1 -0
- package/dist/bundle/p-D2nuXSd0.js +723 -0
- package/dist/bundle/p-D2nuXSd0.js.map +1 -0
- package/dist/bundle/p-D9Yjz_Sm.js +125 -0
- package/dist/bundle/p-D9Yjz_Sm.js.map +1 -0
- package/dist/bundle/p-DDDh2Izf.js +12 -0
- package/dist/bundle/p-DDDh2Izf.js.map +1 -0
- package/dist/bundle/p-DGWbWwct.js +121 -0
- package/dist/bundle/p-DGWbWwct.js.map +1 -0
- package/dist/bundle/p-DHO_Za64.js +1729 -0
- package/dist/bundle/p-DHO_Za64.js.map +1 -0
- package/dist/bundle/p-DPH021KD.js +14 -0
- package/dist/bundle/p-DPH021KD.js.map +1 -0
- package/dist/bundle/p-DSyv-znO.js +18 -0
- package/dist/bundle/p-DSyv-znO.js.map +1 -0
- package/dist/bundle/p-DcpG4jOU.js +99 -0
- package/dist/bundle/p-DcpG4jOU.js.map +1 -0
- package/dist/bundle/p-DrR9RuIM.js +83 -0
- package/dist/bundle/p-DrR9RuIM.js.map +1 -0
- package/dist/bundle/p-DvqO1i1s.js +1162 -0
- package/dist/bundle/p-DvqO1i1s.js.map +1 -0
- package/dist/bundle/p-Hgv-pDpy.js +13 -0
- package/dist/bundle/p-Hgv-pDpy.js.map +1 -0
- package/dist/bundle/p-PMqbDJmA.js +78 -0
- package/dist/bundle/p-PMqbDJmA.js.map +1 -0
- package/dist/bundle/p-Pk8qng7t.js +573 -0
- package/dist/bundle/p-Pk8qng7t.js.map +1 -0
- package/dist/bundle/p-WYm6cxra.js +64 -0
- package/dist/bundle/p-WYm6cxra.js.map +1 -0
- package/dist/bundle/p-dB3K6tfb.js +41 -0
- package/dist/bundle/p-dB3K6tfb.js.map +1 -0
- package/dist/bundle/p-kDtv6DeD.js +314 -0
- package/dist/bundle/p-kDtv6DeD.js.map +1 -0
- package/dist/bundle/p-pVO6m7lg.js +271 -0
- package/dist/bundle/p-pVO6m7lg.js.map +1 -0
- package/dist/bundle/p-xNnEBBZG.js +63 -0
- package/dist/bundle/p-xNnEBBZG.js.map +1 -0
- package/dist/cjs/dso-accordion-section.cjs.entry.js +3 -3
- package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-accordion-section.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-advanced-select.cjs.entry.js +2 -2
- package/dist/cjs/dso-advanced-select.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-advanced-select.entry.cjs.js.map +1 -1
- 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 -9
- package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-banner.cjs.entry.js +2 -2
- package/dist/cjs/dso-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-banner.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-label.dso-renvooi.dso-slide-toggle.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-label_3.cjs.entry.js +1 -1
- package/dist/cjs/dso-label_3.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +19 -6
- package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-onboarding-tip.cjs.entry.js +24 -10
- 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-project-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-project-item.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-project-item.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +37 -100
- package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-viewer-grid.entry.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/components/accordion-section.js +4 -4
- package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
- package/dist/collection/components/advanced-select/advanced-select.css +0 -6
- package/dist/collection/components/advanced-select/advanced-select.interfaces.js.map +1 -1
- package/dist/collection/components/advanced-select/advanced-select.js +1 -1
- package/dist/collection/components/advanced-select/advanced-select.js.map +1 -1
- package/dist/collection/components/alert/alert.css +0 -117
- package/dist/collection/components/badge/badge.css +3 -8
- package/dist/collection/components/badge/badge.interfaces.js.map +1 -1
- package/dist/collection/components/badge/badge.js +1 -1
- package/dist/collection/components/banner/banner.js +4 -4
- package/dist/collection/components/banner/banner.js.map +1 -1
- package/dist/collection/components/label/label.css +8 -5
- package/dist/collection/components/label/label.interfaces.js.map +1 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/modal/modal.js +24 -11
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/onboarding-tip/onboarding-tip.css +21 -1
- package/dist/collection/components/onboarding-tip/onboarding-tip.js +28 -9
- package/dist/collection/components/onboarding-tip/onboarding-tip.js.map +1 -1
- package/dist/collection/components/project-item/project-item.js +1 -1
- package/dist/collection/components/project-item/project-item.js.map +1 -1
- package/dist/collection/components/table/table.css +2 -2
- package/dist/collection/components/table/table.js +3 -26
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/collection/components/viewer-grid/components/filter-panel.js +3 -0
- package/dist/collection/components/viewer-grid/components/filter-panel.js.map +1 -0
- package/dist/collection/components/viewer-grid/components/index.js +1 -1
- package/dist/collection/components/viewer-grid/components/index.js.map +1 -1
- package/dist/collection/components/viewer-grid/components/main-panel.js +3 -6
- package/dist/collection/components/viewer-grid/components/main-panel.js.map +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.css +28 -343
- package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js +1 -3
- package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js.map +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +54 -185
- package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/alert.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/dso-accordion-section.js +3 -3
- package/dist/components/dso-accordion-section.js.map +1 -1
- package/dist/components/dso-advanced-select.js +2 -2
- package/dist/components/dso-advanced-select.js.map +1 -1
- package/dist/components/dso-banner.js +2 -2
- package/dist/components/dso-banner.js.map +1 -1
- package/dist/components/dso-modal.js +20 -7
- package/dist/components/dso-modal.js.map +1 -1
- package/dist/components/dso-onboarding-tip.js +26 -11
- package/dist/components/dso-onboarding-tip.js.map +1 -1
- package/dist/components/dso-project-item.js +1 -1
- package/dist/components/dso-project-item.js.map +1 -1
- package/dist/components/dso-viewer-grid.js +41 -105
- package/dist/components/dso-viewer-grid.js.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/table.js +4 -8
- package/dist/components/table.js.map +1 -1
- package/dist/dso-toolkit/dso-accordion-section.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-advanced-select.entry.esm.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-banner.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-label.dso-renvooi.dso-slide-toggle.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-modal.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-onboarding-tip.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-project-item.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-viewer-grid.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/p-159be9e6.entry.js +2 -0
- package/dist/dso-toolkit/{p-e9053e12.entry.js.map → p-159be9e6.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-6a156238.entry.js → p-6f89da1c.entry.js} +2 -2
- package/dist/dso-toolkit/{p-6a156238.entry.js.map → p-6f89da1c.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-8897189c.entry.js +2 -0
- package/dist/dso-toolkit/p-8897189c.entry.js.map +1 -0
- package/dist/dso-toolkit/p-8f4a2401.entry.js +2 -0
- package/dist/dso-toolkit/p-8f4a2401.entry.js.map +1 -0
- package/dist/dso-toolkit/p-909118a3.entry.js +2 -0
- package/dist/dso-toolkit/p-909118a3.entry.js.map +1 -0
- package/dist/dso-toolkit/p-9abdf5aa.entry.js +2 -0
- package/dist/dso-toolkit/p-9abdf5aa.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-7020a1ec.entry.js → p-b6f5ca5e.entry.js} +2 -2
- package/dist/dso-toolkit/{p-7020a1ec.entry.js.map → p-b6f5ca5e.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-d926863a.entry.js +2 -0
- package/dist/dso-toolkit/p-d926863a.entry.js.map +1 -0
- package/dist/dso-toolkit/p-e85e3e06.entry.js +2 -0
- package/dist/dso-toolkit/p-e85e3e06.entry.js.map +1 -0
- package/dist/esm/dso-accordion-section.entry.js +3 -3
- package/dist/esm/dso-accordion-section.entry.js.map +1 -1
- package/dist/esm/dso-advanced-select.entry.js +2 -2
- package/dist/esm/dso-advanced-select.entry.js.map +1 -1
- 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 -9
- package/dist/esm/dso-alert_6.entry.js.map +1 -1
- package/dist/esm/dso-banner.entry.js +2 -2
- package/dist/esm/dso-banner.entry.js.map +1 -1
- package/dist/esm/dso-label.dso-renvooi.dso-slide-toggle.entry.js.map +1 -1
- package/dist/esm/dso-label_3.entry.js +1 -1
- package/dist/esm/dso-label_3.entry.js.map +1 -1
- package/dist/esm/dso-modal.entry.js +19 -6
- package/dist/esm/dso-modal.entry.js.map +1 -1
- package/dist/esm/dso-onboarding-tip.entry.js +24 -10
- package/dist/esm/dso-onboarding-tip.entry.js.map +1 -1
- package/dist/esm/dso-project-item.entry.js +1 -1
- package/dist/esm/dso-project-item.entry.js.map +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +38 -101
- package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/advanced-select/advanced-select.interfaces.d.ts +1 -1
- package/dist/types/components/badge/badge.interfaces.d.ts +1 -1
- package/dist/types/components/banner/banner.d.ts +1 -1
- package/dist/types/components/label/label.interfaces.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +8 -3
- package/dist/types/components/onboarding-tip/onboarding-tip.d.ts +1 -0
- package/dist/types/components/table/table.d.ts +1 -4
- package/dist/types/components/viewer-grid/components/filter-panel.d.ts +7 -0
- package/dist/types/components/viewer-grid/components/index.d.ts +1 -1
- package/dist/types/components/viewer-grid/components/main-panel.d.ts +1 -4
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +22 -43
- package/dist/types/components/viewer-grid/viewer-grid.interfaces.d.ts +3 -13
- package/dist/types/components.d.ts +39 -70
- package/package.json +3 -3
- package/dist/collection/components/viewer-grid/components/filterpanel.js +0 -13
- package/dist/collection/components/viewer-grid/components/filterpanel.js.map +0 -1
- package/dist/collection/components/viewer-grid/components/viewer-grid-filterpanel-buttons.js +0 -3
- package/dist/collection/components/viewer-grid/components/viewer-grid-filterpanel-buttons.js.map +0 -1
- package/dist/dso-toolkit/p-0c742a6a.entry.js +0 -2
- package/dist/dso-toolkit/p-0c742a6a.entry.js.map +0 -1
- package/dist/dso-toolkit/p-1107be6c.entry.js +0 -2
- package/dist/dso-toolkit/p-1107be6c.entry.js.map +0 -1
- package/dist/dso-toolkit/p-2b5f70a0.entry.js +0 -2
- package/dist/dso-toolkit/p-2b5f70a0.entry.js.map +0 -1
- package/dist/dso-toolkit/p-7d142b40.entry.js +0 -2
- package/dist/dso-toolkit/p-7d142b40.entry.js.map +0 -1
- package/dist/dso-toolkit/p-8084c884.entry.js +0 -2
- package/dist/dso-toolkit/p-8084c884.entry.js.map +0 -1
- package/dist/dso-toolkit/p-c0410277.entry.js +0 -2
- package/dist/dso-toolkit/p-c0410277.entry.js.map +0 -1
- package/dist/dso-toolkit/p-e9053e12.entry.js +0 -2
- package/dist/types/components/viewer-grid/components/filterpanel.d.ts +0 -11
- package/dist/types/components/viewer-grid/components/viewer-grid-filterpanel-buttons.d.ts +0 -6
|
@@ -18,9 +18,9 @@ const Banner = class {
|
|
|
18
18
|
this.icon = false;
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h("section", { key: '
|
|
21
|
+
return (h("section", { key: '6ec542fbb7b329d79fb6065c74be3c30edaa5bcc', class: clsx("dso-banner", `alert-${this.status}`, {
|
|
22
22
|
"dso-compact": this.compact,
|
|
23
|
-
}), role: "alert" }, h("slot", { key: '
|
|
23
|
+
}), role: "alert" }, h("slot", { key: 'c940029d0ad0ec681811cd6bb68446ccd41878c9' })));
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
Banner.style = bannerCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dso-banner.entry.js","sources":["src/components/banner/banner.scss?tag=dso-banner&encapsulation=shadow","src/components/banner/banner.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/banner\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-banner {\r\n @include banner.root();\r\n}\r\n","import { Component, Prop, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-banner\",\r\n styleUrl: \"banner.scss\",\r\n shadow: true,\r\n})\r\nexport class Banner {\r\n /**\r\n * The status of the banner.\r\n */\r\n @Prop({ reflect: true })\r\n status!: \"
|
|
1
|
+
{"version":3,"file":"dso-banner.entry.js","sources":["src/components/banner/banner.scss?tag=dso-banner&encapsulation=shadow","src/components/banner/banner.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/banner\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-banner {\r\n @include banner.root();\r\n}\r\n","import { Component, Prop, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-banner\",\r\n styleUrl: \"banner.scss\",\r\n shadow: true,\r\n})\r\nexport class Banner {\r\n /**\r\n * The status of the banner.\r\n */\r\n @Prop({ reflect: true })\r\n status!: \"success\" | \"error\" | \"info\" | \"warning\";\r\n\r\n /**\r\n * Compact mode.\r\n */\r\n @Prop()\r\n compact = false;\r\n\r\n /**\r\n * *Icon can only be hidden when the 'compact' property is set to true.\r\n *\r\n * Option to show banner icon.\r\n */\r\n @Prop({ reflect: true })\r\n icon = false;\r\n\r\n render() {\r\n return (\r\n <section\r\n class={clsx(\"dso-banner\", `alert-${this.status}`, {\r\n \"dso-compact\": this.compact,\r\n })}\r\n role=\"alert\"\r\n >\r\n <slot></slot>\r\n </section>\r\n );\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAAA,MAAM,SAAS,GAAG,+LAA+L;;MCQpM,MAAM,GAAA,MAAA;AALnB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAYE;;AAEG;AAEH,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AAEf;;;;AAIG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAcb;IAZC,MAAM,GAAA;QACJ,QACE,CAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,MAAM,CAAA,CAAE,EAAE;gBAChD,aAAa,EAAE,IAAI,CAAC,OAAO;AAC5B,aAAA,CAAC,EACF,IAAI,EAAC,OAAO,EAAA,EAEZ,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACL;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.js","sources":["src/components/label/label.scss?tag=dso-label&encapsulation=shadow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","src/components/slide-toggle/slide-toggle.scss?tag=dso-slide-toggle&encapsulation=scoped","src/components/slide-toggle/slide-toggle.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n$slide-toggle-height: 20px;\r\n\r\n:host {\r\n display: inline-block;\r\n padding-block-start: (typography.$line-height-base * typography.$font-size-base - $slide-toggle-height) * 0.5;\r\n}\r\n\r\nbutton.dso-slider {\r\n border: 0;\r\n padding: 0;\r\n\r\n &:focus-visible {\r\n outline: 2px solid colors.$grijs-80;\r\n outline-offset: 1px;\r\n }\r\n\r\n svg {\r\n rect {\r\n fill: colors.$grijs-40;\r\n transition: fill 0.25s;\r\n }\r\n\r\n circle {\r\n @include utilities.transition(transform);\r\n\r\n transform: translateX(10px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen;\r\n }\r\n\r\n circle {\r\n transform: translateX(30px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[disabled] svg {\r\n rect {\r\n fill: colors.$grijs-20;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n\r\n &[disabled][aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen-40;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n}\r\n\r\n.dso-slider {\r\n border-radius: units.$u3;\r\n display: inline-flex;\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Fragment, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { SlideToggleActiveEvent } from \"./slide-toggle.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-slide-toggle\",\r\n styleUrl: \"slide-toggle.scss\",\r\n scoped: true,\r\n shadow: false,\r\n})\r\nexport class SlideToggle implements ComponentInterface {\r\n @Element()\r\n private host!: HTMLDsoSlideToggleElement;\r\n\r\n /**\r\n * Set to true if Slide Toggle is checked.\r\n */\r\n @Prop()\r\n checked = false;\r\n\r\n /**\r\n * Disables the Slide Toggle, preventing it from checking/unchecking and therefor not emitting any events.\r\n */\r\n @Prop()\r\n disabled = false;\r\n\r\n /**\r\n * When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component.\r\n */\r\n @Prop()\r\n accessibleLabel?: string;\r\n\r\n /**\r\n * Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button.\r\n */\r\n @Prop()\r\n labelledbyId?: string;\r\n\r\n @State()\r\n hasVisibleLabel?: boolean;\r\n\r\n /**\r\n * Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for=\"id\">`.\r\n */\r\n @Prop()\r\n identifier = v4();\r\n\r\n /**\r\n * Emitted when user checks or unchecks the Slide Toggle.\r\n */\r\n @Event({ composed: false })\r\n dsoActiveChange!: EventEmitter<SlideToggleActiveEvent>;\r\n\r\n private handleSwitch(e: Event): void {\r\n this.dsoActiveChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n componentWillLoad(): void {\r\n this.hasVisibleLabel = this.host.querySelector(\"*\") !== null;\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n <button\r\n id={this.identifier}\r\n role=\"switch\"\r\n class=\"dso-slider\"\r\n aria-checked={\"\" + this.checked}\r\n disabled={this.disabled}\r\n onClick={(e) => this.handleSwitch(e)}\r\n {...(this.accessibleLabel ? { \"aria-label\": this.accessibleLabel } : {})}\r\n {...(this.labelledbyId ? { \"aria-labelledby\": this.labelledbyId } : {})}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"20\" viewBox=\"0 0 40 20\">\r\n <g fill=\"none\" fill-rule=\"evenodd\">\r\n <rect width=\"40\" height=\"20\" fill=\"currentColor\" rx=\"10\" />\r\n <circle cy=\"10\" r=\"8\" fill=\"currentColor\" />\r\n </g>\r\n </svg>\r\n </button>\r\n {this.hasVisibleLabel && (\r\n <label htmlFor={this.identifier}>\r\n <slot />\r\n </label>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,44DAA44D;;ACmB75D,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,QAAQ,CAAC,CAAC,OAA8B,KAAI;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAI;AAC7B,QAAA,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,CAAC,cAAc,EAAE;;AAE3B,KAAC,CAAC;AACJ,CAAC,EAAE,GAAG,CAAC,CACR;AAED,SAAS,mBAAmB,CAAC,OAAgB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW;AACxC;AAEA,SAAS,WAAW,CAAC,EAAe,EAAA;AAClC,IAAA,OAAO,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW;AACxC;MAOa,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAwDE,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAGnB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE;AAiJf;AA9IC,IAAA,cAAc,CAAC,SAAkB,EAAA;QAC/B,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,qBAAqB,EAAE;;aACvB;YACL,IAAI,CAAC,oBAAoB,EAAE;;;AAK/B,IAAA,aAAa,CAAC,QAAiB,EAAA;QAC7B,IAAI,QAAQ,E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Ac,EAAC,EAAE,EAAC,IAAI,EAAG,CAAA,EAC3D,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,cAAc,EAAG,CAAA,CAC1C,CACA,CACC,EACR,IAAI,CAAC,eAAe,KACnB,8DAAO,OAAO,EAAE,IAAI,CAAC,UAAU,EAAA,EAC7B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACF,CACT,CACA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.js","sources":["src/components/label/label.scss?tag=dso-label&encapsulation=shadow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","src/components/slide-toggle/slide-toggle.scss?tag=dso-slide-toggle&encapsulation=scoped","src/components/slide-toggle/slide-toggle.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n$slide-toggle-height: 20px;\r\n\r\n:host {\r\n display: inline-block;\r\n padding-block-start: (typography.$line-height-base * typography.$font-size-base - $slide-toggle-height) * 0.5;\r\n}\r\n\r\nbutton.dso-slider {\r\n border: 0;\r\n padding: 0;\r\n\r\n &:focus-visible {\r\n outline: 2px solid colors.$grijs-80;\r\n outline-offset: 1px;\r\n }\r\n\r\n svg {\r\n rect {\r\n fill: colors.$grijs-40;\r\n transition: fill 0.25s;\r\n }\r\n\r\n circle {\r\n @include utilities.transition(transform);\r\n\r\n transform: translateX(10px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen;\r\n }\r\n\r\n circle {\r\n transform: translateX(30px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[disabled] svg {\r\n rect {\r\n fill: colors.$grijs-20;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n\r\n &[disabled][aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen-40;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n}\r\n\r\n.dso-slider {\r\n border-radius: units.$u3;\r\n display: inline-flex;\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Fragment, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { SlideToggleActiveEvent } from \"./slide-toggle.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-slide-toggle\",\r\n styleUrl: \"slide-toggle.scss\",\r\n scoped: true,\r\n shadow: false,\r\n})\r\nexport class SlideToggle implements ComponentInterface {\r\n @Element()\r\n private host!: HTMLDsoSlideToggleElement;\r\n\r\n /**\r\n * Set to true if Slide Toggle is checked.\r\n */\r\n @Prop()\r\n checked = false;\r\n\r\n /**\r\n * Disables the Slide Toggle, preventing it from checking/unchecking and therefor not emitting any events.\r\n */\r\n @Prop()\r\n disabled = false;\r\n\r\n /**\r\n * When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component.\r\n */\r\n @Prop()\r\n accessibleLabel?: string;\r\n\r\n /**\r\n * Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button.\r\n */\r\n @Prop()\r\n labelledbyId?: string;\r\n\r\n @State()\r\n hasVisibleLabel?: boolean;\r\n\r\n /**\r\n * Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for=\"id\">`.\r\n */\r\n @Prop()\r\n identifier = v4();\r\n\r\n /**\r\n * Emitted when user checks or unchecks the Slide Toggle.\r\n */\r\n @Event({ composed: false })\r\n dsoActiveChange!: EventEmitter<SlideToggleActiveEvent>;\r\n\r\n private handleSwitch(e: Event): void {\r\n this.dsoActiveChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n componentWillLoad(): void {\r\n this.hasVisibleLabel = this.host.querySelector(\"*\") !== null;\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n <button\r\n id={this.identifier}\r\n role=\"switch\"\r\n class=\"dso-slider\"\r\n aria-checked={\"\" + this.checked}\r\n disabled={this.disabled}\r\n onClick={(e) => this.handleSwitch(e)}\r\n {...(this.accessibleLabel ? { \"aria-label\": this.accessibleLabel } : {})}\r\n {...(this.labelledbyId ? { \"aria-labelledby\": this.labelledbyId } : {})}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"20\" viewBox=\"0 0 40 20\">\r\n <g fill=\"none\" fill-rule=\"evenodd\">\r\n <rect width=\"40\" height=\"20\" fill=\"currentColor\" rx=\"10\" />\r\n <circle cy=\"10\" r=\"8\" fill=\"currentColor\" />\r\n </g>\r\n </svg>\r\n </button>\r\n {this.hasVisibleLabel && (\r\n <label htmlFor={this.identifier}>\r\n <slot />\r\n </label>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,y8DAAy8D;;ACmB19D,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,QAAQ,CAAC,CAAC,OAA8B,KAAI;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAI;AAC7B,QAAA,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,CAAC,cAAc,EAAE;;AAE3B,KAAC,CAAC;AACJ,CAAC,EAAE,GAAG,CAAC,CACR;AAED,SAAS,mBAAmB,CAAC,OAAgB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW;AACxC;AAEA,SAAS,WAAW,CAAC,EAAe,EAAA;AAClC,IAAA,OAAO,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW;AACxC;MAOa,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAwDE,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAGnB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE;AAiJf;AA9IC,IAAA,cAAc,CAAC,SAAkB,EAAA;QAC/B,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,qBAAqB,EAAE;;aACvB;YACL,IAAI,CAAC,oBAAoB,EAAE;;;AAK/B,IAAA,aAAa,CAAC,QAAiB,EAAA;QAC7B,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,aAAa,EAAE;;aAC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,EAC3D,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,cAAc,EAAG,CAAA,CAC1C,CACA,CACC,EACR,IAAI,CAAC,eAAe,KACnB,8DAAO,OAAO,EAAE,IAAI,CAAC,UAAU,EAAA,EAC7B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACF,CACT,CACA;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ import { d as debounce } from './index-CoMRvcY0.js';
|
|
|
4
4
|
import { v as v4 } from './v4-BF0_OXTe.js';
|
|
5
5
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
6
6
|
|
|
7
|
-
const labelCss = ":host{display:inline-block;max-inline-size:100%}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-label{border-radius:4px;display:inline-block;line-height:1.5;max-inline-size:100%;padding-block:4px;padding-inline:8px}.dso-label:focus-within,.dso-label.dso-hover{text-decoration:line-through}.dso-label button{background:none;border:0;border-radius:0 4px 4px 0;color:inherit;float:inline-end;font-size:1rem;margin-block-end:-4px;margin-inline-start:8px;margin-inline-end:-4px;margin-block-start:0;padding:0}.dso-label button:hover{cursor:pointer}.dso-label button>dso-icon,.dso-label button>svg.di{display:block}.dso-label{background-color:#f2f2f2;border-color:#f2f2f2;color:#191919}.dso-label.dso-label-info{background-color:#6ca4d9;border-color:#6ca4d9;color:#191919}.dso-label.dso-label-primary{background-color:#275937;border-color:#275937;color:#fff}.dso-label.dso-label-success{background-color:#39870c;border-color:#39870c;color:#fff}.dso-label.dso-label-warning{background-color:#dcd400;border-color:#dcd400;color:#191919}.dso-label.dso-label-
|
|
7
|
+
const labelCss = ":host{display:inline-block;max-inline-size:100%}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-label{border-radius:4px;display:inline-block;line-height:1.5;max-inline-size:100%;padding-block:4px;padding-inline:8px}.dso-label:focus-within,.dso-label.dso-hover{text-decoration:line-through}.dso-label button{background:none;border:0;border-radius:0 4px 4px 0;color:inherit;float:inline-end;font-size:1rem;margin-block-end:-4px;margin-inline-start:8px;margin-inline-end:-4px;margin-block-start:0;padding:0}.dso-label button:hover{cursor:pointer}.dso-label button>dso-icon,.dso-label button>svg.di{display:block}.dso-label{background-color:#f2f2f2;border-color:#f2f2f2;color:#191919}.dso-label.dso-label-info{background-color:#6ca4d9;border-color:#6ca4d9;color:#191919}.dso-label.dso-label-primary{background-color:#275937;border-color:#275937;color:#fff}.dso-label.dso-label-success{background-color:#39870c;border-color:#39870c;color:#fff}.dso-label.dso-label-warning{background-color:#dcd400;border-color:#dcd400;color:#191919}.dso-label.dso-label-error{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-label.dso-label-bright{background-color:#fff;border-color:#fff;color:#191919}.dso-label.dso-label-bright{outline:1px solid #ccc;outline-offset:-1px}.dso-label.dso-label-attention{background-color:#8b4a6a;border-color:#8b4a6a;color:#fff}.dso-label.dso-label-filter{background-color:#e1ecf7;border-color:#2b5780;color:#191919}.dso-label.dso-label-filter{border-inline-start:5px solid}.dso-label.dso-compact{padding-block:0;padding-inline:8px}.dso-label.dso-hover .dso-label-content{text-decoration:line-through}.dso-truncate.dso-label-content{display:inline-block;max-inline-size:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}:host([removable]) .dso-truncate.dso-label-content{max-inline-size:calc(100% - 28px)}";
|
|
8
8
|
|
|
9
9
|
const resizeObserver = new ResizeObserver(debounce((entries) => {
|
|
10
10
|
entries.forEach(({ target }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.js","mappings":";;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[],"sources":["src/components/label/label.scss?tag=dso-label&encapsulation=shadow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","src/components/slide-toggle/slide-toggle.scss?tag=dso-slide-toggle&encapsulation=scoped","src/components/slide-toggle/slide-toggle.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n$slide-toggle-height: 20px;\r\n\r\n:host {\r\n display: inline-block;\r\n padding-block-start: (typography.$line-height-base * typography.$font-size-base - $slide-toggle-height) * 0.5;\r\n}\r\n\r\nbutton.dso-slider {\r\n border: 0;\r\n padding: 0;\r\n\r\n &:focus-visible {\r\n outline: 2px solid colors.$grijs-80;\r\n outline-offset: 1px;\r\n }\r\n\r\n svg {\r\n rect {\r\n fill: colors.$grijs-40;\r\n transition: fill 0.25s;\r\n }\r\n\r\n circle {\r\n @include utilities.transition(transform);\r\n\r\n transform: translateX(10px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen;\r\n }\r\n\r\n circle {\r\n transform: translateX(30px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[disabled] svg {\r\n rect {\r\n fill: colors.$grijs-20;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n\r\n &[disabled][aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen-40;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n}\r\n\r\n.dso-slider {\r\n border-radius: units.$u3;\r\n display: inline-flex;\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Fragment, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { SlideToggleActiveEvent } from \"./slide-toggle.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-slide-toggle\",\r\n styleUrl: \"slide-toggle.scss\",\r\n scoped: true,\r\n shadow: false,\r\n})\r\nexport class SlideToggle implements ComponentInterface {\r\n @Element()\r\n private host!: HTMLDsoSlideToggleElement;\r\n\r\n /**\r\n * Set to true if Slide Toggle is checked.\r\n */\r\n @Prop()\r\n checked = false;\r\n\r\n /**\r\n * Disables the Slide Toggle, preventing it from checking/unchecking and therefor not emitting any events.\r\n */\r\n @Prop()\r\n disabled = false;\r\n\r\n /**\r\n * When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component.\r\n */\r\n @Prop()\r\n accessibleLabel?: string;\r\n\r\n /**\r\n * Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button.\r\n */\r\n @Prop()\r\n labelledbyId?: string;\r\n\r\n @State()\r\n hasVisibleLabel?: boolean;\r\n\r\n /**\r\n * Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for=\"id\">`.\r\n */\r\n @Prop()\r\n identifier = v4();\r\n\r\n /**\r\n * Emitted when user checks or unchecks the Slide Toggle.\r\n */\r\n @Event({ composed: false })\r\n dsoActiveChange!: EventEmitter<SlideToggleActiveEvent>;\r\n\r\n private handleSwitch(e: Event): void {\r\n this.dsoActiveChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n componentWillLoad(): void {\r\n this.hasVisibleLabel = this.host.querySelector(\"*\") !== null;\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n <button\r\n id={this.identifier}\r\n role=\"switch\"\r\n class=\"dso-slider\"\r\n aria-checked={\"\" + this.checked}\r\n disabled={this.disabled}\r\n onClick={(e) => this.handleSwitch(e)}\r\n {...(this.accessibleLabel ? { \"aria-label\": this.accessibleLabel } : {})}\r\n {...(this.labelledbyId ? { \"aria-labelledby\": this.labelledbyId } : {})}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"20\" viewBox=\"0 0 40 20\">\r\n <g fill=\"none\" fill-rule=\"evenodd\">\r\n <rect width=\"40\" height=\"20\" fill=\"currentColor\" rx=\"10\" />\r\n <circle cy=\"10\" r=\"8\" fill=\"currentColor\" />\r\n </g>\r\n </svg>\r\n </button>\r\n {this.hasVisibleLabel && (\r\n <label htmlFor={this.identifier}>\r\n <slot />\r\n </label>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.js","mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,y8DAAy8D;;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ow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","src/components/slide-toggle/slide-toggle.scss?tag=dso-slide-toggle&encapsulation=scoped","src/components/slide-toggle/slide-toggle.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n$slide-toggle-height: 20px;\r\n\r\n:host {\r\n display: inline-block;\r\n padding-block-start: (typography.$line-height-base * typography.$font-size-base - $slide-toggle-height) * 0.5;\r\n}\r\n\r\nbutton.dso-slider {\r\n border: 0;\r\n padding: 0;\r\n\r\n &:focus-visible {\r\n outline: 2px solid colors.$grijs-80;\r\n outline-offset: 1px;\r\n }\r\n\r\n svg {\r\n rect {\r\n fill: colors.$grijs-40;\r\n transition: fill 0.25s;\r\n }\r\n\r\n circle {\r\n @include utilities.transition(transform);\r\n\r\n transform: translateX(10px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen;\r\n }\r\n\r\n circle {\r\n transform: translateX(30px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[disabled] svg {\r\n rect {\r\n fill: colors.$grijs-20;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n\r\n &[disabled][aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen-40;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n}\r\n\r\n.dso-slider {\r\n border-radius: units.$u3;\r\n display: inline-flex;\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Fragment, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { SlideToggleActiveEvent } from \"./slide-toggle.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-slide-toggle\",\r\n styleUrl: \"slide-toggle.scss\",\r\n scoped: true,\r\n shadow: false,\r\n})\r\nexport class SlideToggle implements ComponentInterface {\r\n @Element()\r\n private host!: HTMLDsoSlideToggleElement;\r\n\r\n /**\r\n * Set to true if Slide Toggle is checked.\r\n */\r\n @Prop()\r\n checked = false;\r\n\r\n /**\r\n * Disables the Slide Toggle, preventing it from checking/unchecking and therefor not emitting any events.\r\n */\r\n @Prop()\r\n disabled = false;\r\n\r\n /**\r\n * When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component.\r\n */\r\n @Prop()\r\n accessibleLabel?: string;\r\n\r\n /**\r\n * Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button.\r\n */\r\n @Prop()\r\n labelledbyId?: string;\r\n\r\n @State()\r\n hasVisibleLabel?: boolean;\r\n\r\n /**\r\n * Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for=\"id\">`.\r\n */\r\n @Prop()\r\n identifier = v4();\r\n\r\n /**\r\n * Emitted when user checks or unchecks the Slide Toggle.\r\n */\r\n @Event({ composed: false })\r\n dsoActiveChange!: EventEmitter<SlideToggleActiveEvent>;\r\n\r\n private handleSwitch(e: Event): void {\r\n this.dsoActiveChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n componentWillLoad(): void {\r\n this.hasVisibleLabel = this.host.querySelector(\"*\") !== null;\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n <button\r\n id={this.identifier}\r\n role=\"switch\"\r\n class=\"dso-slider\"\r\n aria-checked={\"\" + this.checked}\r\n disabled={this.disabled}\r\n onClick={(e) => this.handleSwitch(e)}\r\n {...(this.accessibleLabel ? { \"aria-label\": this.accessibleLabel } : {})}\r\n {...(this.labelledbyId ? { \"aria-labelledby\": this.labelledbyId } : {})}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"20\" viewBox=\"0 0 40 20\">\r\n <g fill=\"none\" fill-rule=\"evenodd\">\r\n <rect width=\"40\" height=\"20\" fill=\"currentColor\" rx=\"10\" />\r\n <circle cy=\"10\" r=\"8\" fill=\"currentColor\" />\r\n </g>\r\n </svg>\r\n </button>\r\n {this.hasVisibleLabel && (\r\n <label htmlFor={this.identifier}>\r\n <slot />\r\n </label>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -38,12 +38,20 @@ const Modal = class {
|
|
|
38
38
|
*/
|
|
39
39
|
this.returnFocus = undefined;
|
|
40
40
|
/**
|
|
41
|
-
* when `false` the close button in the header will not be rendered.
|
|
41
|
+
* when `false` the close button in the header will not be rendered.
|
|
42
42
|
*
|
|
43
43
|
* Needs `modalTitle` to be set.
|
|
44
44
|
*/
|
|
45
|
-
this.
|
|
45
|
+
this.closable = false;
|
|
46
46
|
this.text = i18n(() => this.host, translations);
|
|
47
|
+
this.blockEscapeKey = (e) => {
|
|
48
|
+
if (e.key === "Escape") {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
if (this.closable) {
|
|
51
|
+
this.dsoClose.emit({ originalEvent: e });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
47
55
|
}
|
|
48
56
|
get hasFooter() {
|
|
49
57
|
return this.host.querySelector("[slot='footer']") !== null;
|
|
@@ -66,12 +74,17 @@ const Modal = class {
|
|
|
66
74
|
}
|
|
67
75
|
(_c = ((_b = this.returnFocus) !== null && _b !== void 0 ? _b : this.returnFocusElement)) === null || _c === void 0 ? void 0 : _c.focus();
|
|
68
76
|
}
|
|
77
|
+
handleDialogClick(e) {
|
|
78
|
+
if (!this.closable) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (e.target === this.htmlDialogElement) {
|
|
82
|
+
this.dsoClose.emit({ originalEvent: e });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
69
85
|
render() {
|
|
70
86
|
var _a;
|
|
71
|
-
return (h("dialog", { key: '
|
|
72
|
-
e.preventDefault();
|
|
73
|
-
this.dsoClose.emit({ originalEvent: e });
|
|
74
|
-
} }, h("div", { key: '5e2b1b12dbaac1b5b71aa2a52b42b201d217ee63', class: "dso-dialog", role: "document" }, this.modalTitle ? (h("div", { class: "dso-header" }, h("h2", { id: this.ariaId }, this.modalTitle), this.showCloseButton && (h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, this.text("close")))))) : (h("span", { class: "sr-only", id: this.ariaId }, this.text("dialog"))), h("dso-scrollable", { key: '241b3f078306402613b94d843c393c065125a650' }, h("div", { key: 'fc0f58c85c287ce3fb424e8cc18bec91562fc143', class: "dso-body", tabIndex: 0 }, h("slot", { key: 'e6bc51e2320f995aa2ab7d817ff655189032cc69', name: "body" }))), this.hasFooter && (h("div", { key: '77aa9bac43c4f44c15c98a87986175d057ff1ad6', class: "dso-footer" }, h("slot", { key: 'ec30bcd66bb3214e4a0efcc8c5a793596a5e92e9', name: "footer" }))))));
|
|
87
|
+
return (h("dialog", { key: '3f82d0319743f333024c6e9924c08d48f85b738b', class: "dso-modal", role: (_a = this.dialogRole) !== null && _a !== void 0 ? _a : undefined, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.htmlDialogElement = element), onClick: (e) => this.handleDialogClick(e), onKeyDown: (e) => this.blockEscapeKey(e) }, h("div", { key: 'd94bad5e57a1b0c0a84e1bf5e27570df1ec00f20', class: "dso-dialog", role: "document" }, this.modalTitle ? (h("div", { class: "dso-header" }, h("h2", { id: this.ariaId }, this.modalTitle), this.closable && (h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, this.text("close")))))) : (h("span", { class: "sr-only", id: this.ariaId }, this.text("dialog"))), h("dso-scrollable", { key: 'cabd78ee548c897ea0402b885ced40f0091c3b9d' }, h("div", { key: 'df07ed09a89f9d450878d51977bda22009de6ab3', class: "dso-body", tabIndex: 0 }, h("slot", { key: 'ec5c000202ed7c47bc752cf45a5ddfc88df8120f', name: "body" }))), this.hasFooter && (h("div", { key: '7fa17d42d7b3d73360bb2ea302b7fe2e64b0ffc3', class: "dso-footer" }, h("slot", { key: '984f518013234ca807597c9287ff652211bd5794', name: "footer" }))))));
|
|
75
88
|
}
|
|
76
89
|
get host() { return getElement(this); }
|
|
77
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dso-modal.entry.js","sources":["src/components/modal/modal.i18n.ts","src/components/modal/modal.scss?tag=dso-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-modal\": {\r\n close: \"Close\",\r\n dialog: \"Dialog\",\r\n },\r\n },\r\n nl: {\r\n \"dso-modal\": {\r\n close: \"Sluiten\",\r\n dialog: \"Dialoog\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n// fullscreen option\r\n:host([fullscreen]) dialog {\r\n @include modal.fullscreen();\r\n}\r\n\r\n// Go to fullscreen on =< 480px viewport\r\n@media screen and (max-width: media-query-breakpoints.$screen-xs-min) {\r\n :host dialog {\r\n @include modal.fullscreen();\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.dso-modal {\r\n @include modal.root();\r\n}\r\n\r\n.dso-close {\r\n dso-icon {\r\n color: modal.$close-icon-color;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { translations } from \"./modal.i18n\";\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n dialogRole: string | null = \"dialog\";\r\n\r\n /**\r\n * The element to return focus to after the modal is closed.\r\n *\r\n * * `undefined` will return focus to the previously focused element (default).\r\n * * `false` will not return focus to any element.\r\n * * or, provide your own `HTMLElement` that will receive focus upon closing.\r\n */\r\n @Prop()\r\n returnFocus: false | HTMLElement | undefined = undefined;\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered
|
|
1
|
+
{"version":3,"file":"dso-modal.entry.js","sources":["src/components/modal/modal.i18n.ts","src/components/modal/modal.scss?tag=dso-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-modal\": {\r\n close: \"Close\",\r\n dialog: \"Dialog\",\r\n },\r\n },\r\n nl: {\r\n \"dso-modal\": {\r\n close: \"Sluiten\",\r\n dialog: \"Dialoog\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n// fullscreen option\r\n:host([fullscreen]) dialog {\r\n @include modal.fullscreen();\r\n}\r\n\r\n// Go to fullscreen on =< 480px viewport\r\n@media screen and (max-width: media-query-breakpoints.$screen-xs-min) {\r\n :host dialog {\r\n @include modal.fullscreen();\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.dso-modal {\r\n @include modal.root();\r\n}\r\n\r\n.dso-close {\r\n dso-icon {\r\n color: modal.$close-icon-color;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { translations } from \"./modal.i18n\";\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n dialogRole: string | null = \"dialog\";\r\n\r\n /**\r\n * The element to return focus to after the modal is closed.\r\n *\r\n * * `undefined` will return focus to the previously focused element (default).\r\n * * `false` will not return focus to any element.\r\n * * or, provide your own `HTMLElement` that will receive focus upon closing.\r\n */\r\n @Prop()\r\n returnFocus: false | HTMLElement | undefined = undefined;\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n closable = false;\r\n\r\n private returnFocusElement: HTMLElement | undefined;\r\n\r\n /**\r\n * Emitted when the user:\r\n * - clicks the close button\r\n * - dismisses the Modal with the Escape button\r\n * - clicks or taps outside the Modal\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n get hasFooter() {\r\n return this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n const activeElement = getActiveElement();\r\n if (activeElement instanceof HTMLElement) {\r\n this.returnFocusElement = activeElement;\r\n }\r\n\r\n this.htmlDialogElement.showModal();\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.htmlDialogElement?.close();\r\n\r\n if (this.returnFocus === false) {\r\n return;\r\n }\r\n\r\n (this.returnFocus ?? this.returnFocusElement)?.focus();\r\n }\r\n\r\n private handleDialogClick(e: MouseEvent) {\r\n if (!this.closable) {\r\n return;\r\n }\r\n\r\n if (e.target === this.htmlDialogElement) {\r\n this.dsoClose.emit({ originalEvent: e });\r\n }\r\n }\r\n\r\n private blockEscapeKey = (e: KeyboardEvent) => {\r\n if (e.key === \"Escape\") {\r\n e.preventDefault();\r\n\r\n if (this.closable) {\r\n this.dsoClose.emit({ originalEvent: e });\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.dialogRole ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onClick={(e) => this.handleDialogClick(e)}\r\n onKeyDown={(e) => this.blockEscapeKey(e)}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.closable && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">{this.text(\"close\")}</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n {this.text(\"dialog\")}\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"d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AK,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,CAAC,EAAA,EAC/B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,MAAM,EAAA,CAAG,CAChB,CACS,EAEhB,IAAI,CAAC,SAAS,KACb,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAA,EACrB,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAA,CAAG,CAClB,CACP,CACG,CACC;;;;;;;;"}
|
|
@@ -1659,7 +1659,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
1659
1659
|
});
|
|
1660
1660
|
};
|
|
1661
1661
|
|
|
1662
|
-
const onboardingTipCss = "*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}::slotted([slot=heading]){display:flex !important;align-items:center !important;margin-block-end:0 !important;margin-block-start:0 !important;color:#fff !important;line-height:1.375 !important}:host{--_dso-button-primary-background-color:#fff;--_dso-button-primary-border-color:#fff;--_dso-button-primary-color:#000;--_dso-button-primary-hover-background-color:#ccc;--_dso-button-primary-hover-border-color:#ccc;--_dso-button-primary-hover-color:#000;--_dso-button-primary-active-background-color:#999;--_dso-button-primary-active-border-color:#999;--_dso-button-primary-active-color:#000;--_dso-button-primary-disabled-background-color:#fff;--_dso-button-primary-disabled-border-color:#fff;--_dso-button-primary-disabled-color:#b2b2b2;--_dso-button-secondary-background-color:#fff;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-color:#000;--_dso-button-secondary-hover-background-color:#ccc;--_dso-button-secondary-hover-border-color:#ccc;--_dso-button-secondary-hover-color:#000;--_dso-button-secondary-active-background-color:#999;--_dso-button-secondary-active-border-color:#999;--_dso-button-secondary-active-color:#000;--_dso-button-secondary-disabled-background-color:#fff;--_dso-button-secondary-disabled-border-color:#fff;--_dso-button-secondary-disabled-color:#b2b2b2;display:block;filter:drop-shadow(2px 2px 16px rgba(0, 0, 0, 0.4))}:host([popover]){margin:0 !important;border:0;padding:0;background-color:transparent;overflow:unset}.onboarding-tip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;overflow-wrap:anywhere;word-spacing:normal;word-wrap:normal;white-space:normal;font-size:14px;inset-block-start:0;inset-inline-start:0;z-index:410}@media screen and (max-width: 360px){.onboarding-tip{padding-inline-start:8px !important}}.dso-close{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none;position:absolute;inset-block-start:0;inset-inline-end:0;block-size:32px;inline-size:32px;padding:0;background-color:transparent;border:0;text-align:center}.dso-close[disabled]{cursor:default}.dso-close::-moz-focus-inner{border:0;padding:0}.onboarding-tip-inner{--link-color:#fff;--link-hover-color:#b2b2b2;--link-visited-color:#7f7f7f;max-inline-size:min(360px, 100vw - 2 * 8px);max-block-size:
|
|
1662
|
+
const onboardingTipCss = "*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}::slotted([slot=heading]){display:flex !important;align-items:center !important;margin-block-end:0 !important;margin-block-start:0 !important;color:#fff !important;line-height:1.375 !important}:host{--_dso-button-primary-background-color:#fff;--_dso-button-primary-border-color:#fff;--_dso-button-primary-color:#000;--_dso-button-primary-hover-background-color:#ccc;--_dso-button-primary-hover-border-color:#ccc;--_dso-button-primary-hover-color:#000;--_dso-button-primary-active-background-color:#999;--_dso-button-primary-active-border-color:#999;--_dso-button-primary-active-color:#000;--_dso-button-primary-disabled-background-color:#fff;--_dso-button-primary-disabled-border-color:#fff;--_dso-button-primary-disabled-color:#b2b2b2;--_dso-button-secondary-background-color:#fff;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-color:#000;--_dso-button-secondary-hover-background-color:#ccc;--_dso-button-secondary-hover-border-color:#ccc;--_dso-button-secondary-hover-color:#000;--_dso-button-secondary-active-background-color:#999;--_dso-button-secondary-active-border-color:#999;--_dso-button-secondary-active-color:#000;--_dso-button-secondary-disabled-background-color:#fff;--_dso-button-secondary-disabled-border-color:#fff;--_dso-button-secondary-disabled-color:#b2b2b2;display:block;filter:drop-shadow(2px 2px 16px rgba(0, 0, 0, 0.4));transition:visibility 400ms, opacity 400ms}:host(:not([ready])){opacity:1;animation:400ms ease-in 1 normal both fadeInOpacity}:host([popover]){margin:0 !important;border:0;padding:0;background-color:transparent;overflow:unset}.onboarding-tip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;overflow-wrap:anywhere;word-spacing:normal;word-wrap:normal;white-space:normal;font-size:14px;inset-block-start:0;inset-inline-start:0;z-index:410}@media screen and (max-width: 360px){.onboarding-tip{padding-inline-start:8px !important}}.dso-close{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none;position:absolute;inset-block-start:0;inset-inline-end:0;block-size:32px;inline-size:32px;padding:0;background-color:transparent;border:0;text-align:center}.dso-close[disabled]{cursor:default}.dso-close::-moz-focus-inner{border:0;padding:0}.onboarding-tip-inner{--link-color:#fff;--link-hover-color:#b2b2b2;--link-visited-color:#7f7f7f;max-inline-size:min(360px, 100vw - 2 * 8px);max-block-size:calc(100vh - 10px);overflow:auto;padding-block:32px 8px;padding-inline:8px;border-radius:4px;display:block;font-size:1rem;position:relative;z-index:2}.onboarding-tip-inner{background-color:#2b5780;border-color:#2b5780;color:#fff}@media screen and (max-width: 991px){.onboarding-tip-inner{max-block-size:unset}}.onboarding-tip-arrow{border-start-start-radius:4px;position:absolute;block-size:20px;inline-size:20px;background:#2b5780;z-index:1;pointer-events:none}.onboarding-tip-content-wrapper{padding-inline:16px;padding-block-end:16px}.onboarding-tip-content-heading{display:flex}.onboarding-tip-content-heading dso-icon{margin-inline-end:8px}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}";
|
|
1663
1663
|
|
|
1664
1664
|
const OnboardingTip = class {
|
|
1665
1665
|
constructor(hostRef) {
|
|
@@ -1669,6 +1669,7 @@ const OnboardingTip = class {
|
|
|
1669
1669
|
* Where to place the Onboarding Tip relative to its reference element.
|
|
1670
1670
|
*/
|
|
1671
1671
|
this.placement = "right";
|
|
1672
|
+
this.ready = false;
|
|
1672
1673
|
}
|
|
1673
1674
|
componentDidRender() {
|
|
1674
1675
|
if (!this.host.matches(":popover-open")) {
|
|
@@ -1690,16 +1691,25 @@ const OnboardingTip = class {
|
|
|
1690
1691
|
* This function positions the Onboarding Tip relative to its reference element. It is static so the position is calculated
|
|
1691
1692
|
* only using the passed arguments.
|
|
1692
1693
|
*/
|
|
1693
|
-
static positionTip(referenceElement, tipRef, tipArrowRef,
|
|
1694
|
-
// Get half the arrow box's hypotenuse length
|
|
1695
|
-
const arrowLength = tipArrowRef.offsetWidth;
|
|
1696
|
-
const floatingOffset = Math.sqrt(2 * arrowLength ** 2) / 2;
|
|
1694
|
+
static positionTip(referenceElement, tipRef, tipArrowRef, position) {
|
|
1697
1695
|
const padding = 5;
|
|
1698
1696
|
return autoUpdate(referenceElement, tipRef, () => {
|
|
1697
|
+
const arrowLength = tipArrowRef.offsetWidth;
|
|
1698
|
+
// Get half the arrow box's hypotenuse length
|
|
1699
|
+
const mainAxisOffset = Math.sqrt(2 * arrowLength ** 2) / 2;
|
|
1700
|
+
// 1.5 times the diagonal of the arrow box
|
|
1701
|
+
const arrowPadding = arrowLength * Math.sqrt(2) * 1.5;
|
|
1702
|
+
// Same as media-query-breakpoints.$screen-md-min
|
|
1703
|
+
const smallViewport = document.body.clientWidth < 992;
|
|
1704
|
+
// Only use top and bottom placement when the viewport is small
|
|
1705
|
+
const placement = smallViewport ? "top" : `${position}-start`;
|
|
1699
1706
|
computePosition(referenceElement, tipRef, {
|
|
1700
1707
|
strategy: "fixed",
|
|
1701
1708
|
middleware: [
|
|
1702
|
-
offset(
|
|
1709
|
+
offset({
|
|
1710
|
+
mainAxis: mainAxisOffset,
|
|
1711
|
+
alignmentAxis: -arrowPadding,
|
|
1712
|
+
}),
|
|
1703
1713
|
flip({
|
|
1704
1714
|
padding,
|
|
1705
1715
|
}),
|
|
@@ -1707,18 +1717,22 @@ const OnboardingTip = class {
|
|
|
1707
1717
|
padding,
|
|
1708
1718
|
}),
|
|
1709
1719
|
arrow({
|
|
1710
|
-
padding:
|
|
1720
|
+
padding: arrowPadding,
|
|
1711
1721
|
element: tipArrowRef,
|
|
1712
1722
|
}),
|
|
1713
1723
|
hide({
|
|
1714
|
-
padding:
|
|
1724
|
+
padding: arrowPadding + arrowLength + padding,
|
|
1715
1725
|
}),
|
|
1716
1726
|
],
|
|
1717
1727
|
placement,
|
|
1718
1728
|
}).then(({ x, y, middlewareData, placement: computedPlacement }) => {
|
|
1719
1729
|
if (middlewareData.hide) {
|
|
1730
|
+
// Tooltip needs to be visible at all times on small viewports
|
|
1731
|
+
const disappear = !smallViewport && middlewareData.hide.referenceHidden;
|
|
1720
1732
|
Object.assign(tipRef.style, {
|
|
1721
|
-
|
|
1733
|
+
// Both of these properties have a CSS transition
|
|
1734
|
+
visibility: disappear ? "hidden" : "visible",
|
|
1735
|
+
opacity: disappear ? 0 : 1,
|
|
1722
1736
|
});
|
|
1723
1737
|
}
|
|
1724
1738
|
Object.assign(tipRef.style, {
|
|
@@ -1765,7 +1779,7 @@ const OnboardingTip = class {
|
|
|
1765
1779
|
});
|
|
1766
1780
|
}
|
|
1767
1781
|
render() {
|
|
1768
|
-
return (h(Host, { key: '
|
|
1782
|
+
return (h(Host, { key: 'f8cf37b8d7e355da0d6405553d9b711a342ff35b', popover: "manual", ready: this.ready, onAnimationend: () => (this.ready = true) }, h("div", { key: '2c24f70065a1739ac15645a2b95d0d1e7170bd69', class: "onboarding-tip", role: "tooltip" }, h("div", { key: '36ff549f3ee6540d95253aef4d42073f82c4e6ff', class: "onboarding-tip-inner" }, h("div", { key: '1679ac6427bf11e5204bd0558c2e3eb97e79f565', class: "onboarding-tip-content-wrapper" }, this.headingSlottedElement !== null && (h("div", { key: 'cd2ed8f12e580239a9f3b17f0c68e3cc47a354e3', class: "onboarding-tip-content-heading" }, h("dso-icon", { key: '75a04ff5bcf97b13350be0f9b73a1c4a2551469b', icon: "light-bulb" }), h("slot", { key: 'befb042560938e167ce7a4ddded30589cba74837', name: "heading" }))), h("button", { key: 'a39a55d736676f329ae0fb491dd20468c7a8ef90', type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { key: '32bd8339c3df104862246bc984ae590fe9134041', icon: "times" }), h("span", { key: '96e88dded1b34e9acee34a7e5a17416aee068f25', class: "sr-only" }, "Sluiten")), h("slot", { key: 'bdcee07fc2629e1026c8eb3a525d215305dcdb93' }))), h("div", { key: '2ce90e310b4e3b5b09bf155617b7280508551d72', class: "onboarding-tip-arrow", ref: (ref) => (this.tipArrowRef = ref) }))));
|
|
1769
1783
|
}
|
|
1770
1784
|
get headingSlottedElement() {
|
|
1771
1785
|
return this.host.querySelector("[slot='heading']");
|