@dso-toolkit/core 65.0.2 → 66.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/cjs/dso-alert_6.cjs.entry.js +3 -4
- package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-card-container.cjs.entry.js +1 -1
- package/dist/cjs/dso-card.cjs.entry.js +7 -35
- package/dist/cjs/dso-card.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-date-picker-legacy.cjs.entry.js +3 -3
- package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/dso-document-card.cjs.entry.js +45 -0
- package/dist/cjs/dso-document-card.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +2 -2
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-info-button.cjs.entry.js +2 -2
- package/dist/cjs/dso-info-button.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-input-range.cjs.entry.js +2 -2
- package/dist/cjs/dso-label_2.cjs.entry.js +4 -4
- package/dist/cjs/dso-legend-item.cjs.entry.js +2 -2
- package/dist/cjs/dso-list-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-logo.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-mark-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +2 -2
- package/dist/cjs/dso-plekinfo-card.cjs.entry.js +59 -0
- package/dist/cjs/dso-plekinfo-card.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-project-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-renvooi_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-responsive-element.cjs.entry.js +1 -1
- package/dist/cjs/dso-scrollable.cjs.entry.js +2 -2
- package/dist/cjs/dso-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/card/card.css +33 -17
- package/dist/collection/components/card/card.interfaces.js.map +1 -1
- package/dist/collection/components/card/card.js +35 -79
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/card-container/card-container.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-picker-legacy/date-picker-legacy.js +3 -3
- package/dist/collection/components/document-card/document-card.css +90 -0
- package/dist/collection/components/document-card/document-card.interfaces.js +2 -0
- package/dist/collection/components/document-card/document-card.interfaces.js.map +1 -0
- package/dist/collection/components/document-card/document-card.js +111 -0
- package/dist/collection/components/document-card/document-card.js.map +1 -0
- package/dist/collection/components/document-component/document-component.js +1 -1
- package/dist/collection/components/document-component-demo/document-component.demo.js +1 -1
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.js +2 -2
- package/dist/collection/components/highlight-box/highlight-box.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/image-overlay/image-overlay.js +1 -2
- package/dist/collection/components/image-overlay/image-overlay.js.map +1 -1
- package/dist/collection/components/info/info.js +1 -1
- package/dist/collection/components/info-button/info-button.css +1 -1
- package/dist/collection/components/info-button/info-button.js +1 -1
- package/dist/collection/components/input-range/input-range.js +2 -2
- package/dist/collection/components/label/label.js +3 -3
- package/dist/collection/components/legend-item/legend-item.js +2 -2
- package/dist/collection/components/list-button/list-button.js +1 -1
- package/dist/collection/components/logo/logo.js +1 -1
- package/dist/collection/components/map-base-layers/map-base-layers.js +1 -1
- package/dist/collection/components/map-controls/map-controls.js +1 -1
- package/dist/collection/components/map-overlays/map-overlays.js +1 -1
- package/dist/collection/components/mark-bar/mark-bar.js +1 -1
- package/dist/collection/components/modal/modal.js +2 -2
- package/dist/collection/components/ozon-content/ozon-content.js +1 -1
- package/dist/collection/components/plekinfo-card/plekinfo-card.css +157 -0
- package/dist/collection/components/plekinfo-card/plekinfo-card.interfaces.js +2 -0
- package/dist/collection/components/plekinfo-card/plekinfo-card.interfaces.js.map +1 -0
- package/dist/collection/components/plekinfo-card/plekinfo-card.js +148 -0
- package/dist/collection/components/plekinfo-card/plekinfo-card.js.map +1 -0
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
- package/dist/collection/components/project-item/project-item.js +1 -1
- package/dist/collection/components/responsive-element/responsive-element.js +1 -1
- package/dist/collection/components/scrollable/scrollable.js +2 -2
- package/dist/collection/components/selectable/selectable.js +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.js +1 -1
- package/dist/collection/components/table/table.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/toggletip/toggletip.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/components/document-component.js +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dso-card-container.js +1 -1
- package/dist/components/dso-card.js +9 -38
- package/dist/components/dso-card.js.map +1 -1
- package/dist/components/dso-date-picker-legacy.js +3 -3
- package/dist/components/dso-date-picker.js +1 -1
- package/dist/components/dso-document-card.d.ts +11 -0
- package/dist/components/dso-document-card.js +68 -0
- package/dist/components/dso-document-card.js.map +1 -0
- package/dist/components/dso-helpcenter-panel.js +2 -2
- package/dist/components/dso-highlight-box.js +1 -1
- package/dist/components/dso-input-range.js +2 -2
- package/dist/components/dso-legend-item.js +2 -2
- package/dist/components/dso-list-button.js +1 -1
- package/dist/components/dso-logo.js +1 -1
- package/dist/components/dso-map-base-layers.js +1 -1
- package/dist/components/dso-map-controls.js +1 -1
- package/dist/components/dso-map-overlays.js +1 -1
- package/dist/components/dso-mark-bar.js +1 -1
- package/dist/components/dso-modal.js +2 -2
- package/dist/components/dso-plekinfo-card.d.ts +11 -0
- package/dist/components/dso-plekinfo-card.js +83 -0
- package/dist/components/dso-plekinfo-card.js.map +1 -0
- package/dist/components/dso-progress-bar.js +1 -1
- package/dist/components/dso-project-item.js +1 -1
- package/dist/components/dso-tabs.js +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/dsot-document-component-demo.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/image-overlay.js +1 -2
- package/dist/components/image-overlay.js.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/info-button.js +2 -2
- package/dist/components/info-button.js.map +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/label.js +3 -3
- package/dist/components/ozon-content.js +1 -1
- package/dist/components/progress-indicator.js +1 -1
- package/dist/components/responsive-element.js +1 -1
- package/dist/components/scrollable.js +2 -2
- package/dist/components/selectable.js +1 -1
- package/dist/components/slide-toggle.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/toggletip.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/p-05094f69.entry.js +2 -0
- package/dist/dso-toolkit/{p-9772e3b6.entry.js → p-228e4c2d.entry.js} +2 -2
- package/dist/dso-toolkit/{p-33629822.entry.js → p-34f1afd3.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e4eed4a2.entry.js → p-3be4c978.entry.js} +2 -2
- package/dist/dso-toolkit/{p-4948f5e5.entry.js → p-3cdfb92e.entry.js} +2 -2
- package/dist/dso-toolkit/p-462d045d.entry.js +2 -0
- package/dist/dso-toolkit/p-462d045d.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-34c19fc1.entry.js → p-64bf55d1.entry.js} +2 -2
- package/dist/dso-toolkit/{p-19dd99c6.entry.js → p-65f73444.entry.js} +2 -2
- package/dist/dso-toolkit/p-6a414b15.entry.js +2 -0
- package/dist/dso-toolkit/{p-d7358e77.entry.js.map → p-6a414b15.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-6ff3146e.entry.js +2 -0
- package/dist/dso-toolkit/p-6ff3146e.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-ff8a8429.entry.js → p-8b9ee8d3.entry.js} +2 -2
- package/dist/dso-toolkit/{p-c0460667.entry.js → p-8dbf4868.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e563fe5b.entry.js → p-950d43d8.entry.js} +2 -2
- package/dist/dso-toolkit/p-9a3879d8.entry.js +2 -0
- package/dist/dso-toolkit/p-9a3879d8.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-0cd85e9b.entry.js → p-9ebf26d8.entry.js} +2 -2
- package/dist/dso-toolkit/{p-54dd8d20.entry.js → p-a168dbd1.entry.js} +2 -2
- package/dist/dso-toolkit/{p-9af9870b.entry.js → p-a6f19891.entry.js} +2 -2
- package/dist/dso-toolkit/{p-4d1af9b6.entry.js → p-a801f428.entry.js} +2 -2
- package/dist/dso-toolkit/{p-afb2d842.entry.js → p-a9427715.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e96c2531.entry.js → p-ab22347c.entry.js} +2 -2
- package/dist/dso-toolkit/{p-2ab51dba.entry.js → p-ae076d5b.entry.js} +2 -2
- package/dist/dso-toolkit/{p-f9a0b819.entry.js → p-bb87ef29.entry.js} +2 -2
- package/dist/dso-toolkit/p-bda2d5ce.entry.js +2 -0
- package/dist/dso-toolkit/{p-85d58afe.entry.js → p-c228d56a.entry.js} +2 -2
- package/dist/dso-toolkit/{p-2a83ec2c.entry.js → p-c7b2a5ef.entry.js} +2 -2
- package/dist/dso-toolkit/p-d67efa9d.entry.js +2 -0
- package/dist/dso-toolkit/p-d67efa9d.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-5db11fa4.entry.js → p-d885c651.entry.js} +2 -2
- package/dist/dso-toolkit/{p-2f9c5d0e.entry.js → p-dd6cf2cd.entry.js} +2 -2
- package/dist/dso-toolkit/{p-4e6511c3.entry.js → p-e132910b.entry.js} +2 -2
- package/dist/dso-toolkit/{p-5fa80df5.entry.js → p-e3fea9f8.entry.js} +2 -2
- package/dist/dso-toolkit/{p-18318bd5.entry.js → p-e773c47e.entry.js} +2 -2
- package/dist/dso-toolkit/{p-d3d7cd07.entry.js → p-e96183ae.entry.js} +2 -2
- package/dist/dso-toolkit/{p-aa4d13b4.entry.js → p-e9896db2.entry.js} +2 -2
- package/dist/dso-toolkit/{p-0c228908.entry.js → p-ea46d648.entry.js} +2 -2
- package/dist/dso-toolkit/{p-448d84e3.entry.js → p-ef8fbe01.entry.js} +2 -2
- package/dist/esm/dso-alert_6.entry.js +3 -4
- package/dist/esm/dso-alert_6.entry.js.map +1 -1
- package/dist/esm/dso-annotation-locatie_2.entry.js +1 -1
- package/dist/esm/dso-card-container.entry.js +1 -1
- package/dist/esm/dso-card.entry.js +7 -35
- package/dist/esm/dso-card.entry.js.map +1 -1
- package/dist/esm/dso-date-picker-legacy.entry.js +3 -3
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-document-card.entry.js +41 -0
- package/dist/esm/dso-document-card.entry.js.map +1 -0
- package/dist/esm/dso-dropdown-menu.entry.js +1 -1
- package/dist/esm/dso-helpcenter-panel.entry.js +2 -2
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-info-button.entry.js +2 -2
- package/dist/esm/dso-info-button.entry.js.map +1 -1
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-input-range.entry.js +2 -2
- package/dist/esm/dso-label_2.entry.js +4 -4
- package/dist/esm/dso-legend-item.entry.js +2 -2
- package/dist/esm/dso-list-button.entry.js +1 -1
- package/dist/esm/dso-logo.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-mark-bar.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +2 -2
- package/dist/esm/dso-plekinfo-card.entry.js +55 -0
- package/dist/esm/dso-plekinfo-card.entry.js.map +1 -0
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-project-item.entry.js +1 -1
- package/dist/esm/dso-renvooi_2.entry.js +1 -1
- package/dist/esm/dso-responsive-element.entry.js +1 -1
- package/dist/esm/dso-scrollable.entry.js +2 -2
- package/dist/esm/dso-tabs.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +1 -1
- package/dist/esm/dsot-document-component-demo.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/card/card.d.ts +14 -18
- package/dist/types/components/card/card.interfaces.d.ts +2 -3
- package/dist/types/components/document-card/document-card.d.ts +29 -0
- package/dist/types/components/document-card/document-card.interfaces.d.ts +5 -0
- package/dist/types/components/plekinfo-card/plekinfo-card.d.ts +34 -0
- package/dist/types/components/plekinfo-card/plekinfo-card.interfaces.d.ts +6 -0
- package/dist/types/components.d.ts +119 -21
- package/package.json +2 -2
- package/dist/dso-toolkit/p-2e413e3d.entry.js +0 -2
- package/dist/dso-toolkit/p-391deb2a.entry.js +0 -2
- package/dist/dso-toolkit/p-391deb2a.entry.js.map +0 -1
- package/dist/dso-toolkit/p-502f51b9.entry.js +0 -2
- package/dist/dso-toolkit/p-88aebd15.entry.js +0 -2
- package/dist/dso-toolkit/p-88aebd15.entry.js.map +0 -1
- package/dist/dso-toolkit/p-d7358e77.entry.js +0 -2
- /package/dist/dso-toolkit/{p-2e413e3d.entry.js.map → p-05094f69.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9772e3b6.entry.js.map → p-228e4c2d.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-33629822.entry.js.map → p-34f1afd3.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e4eed4a2.entry.js.map → p-3be4c978.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-4948f5e5.entry.js.map → p-3cdfb92e.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-34c19fc1.entry.js.map → p-64bf55d1.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-19dd99c6.entry.js.map → p-65f73444.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-ff8a8429.entry.js.map → p-8b9ee8d3.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-c0460667.entry.js.map → p-8dbf4868.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e563fe5b.entry.js.map → p-950d43d8.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-0cd85e9b.entry.js.map → p-9ebf26d8.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-54dd8d20.entry.js.map → p-a168dbd1.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9af9870b.entry.js.map → p-a6f19891.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-4d1af9b6.entry.js.map → p-a801f428.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-afb2d842.entry.js.map → p-a9427715.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e96c2531.entry.js.map → p-ab22347c.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-2ab51dba.entry.js.map → p-ae076d5b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-f9a0b819.entry.js.map → p-bb87ef29.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-502f51b9.entry.js.map → p-bda2d5ce.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-85d58afe.entry.js.map → p-c228d56a.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-2a83ec2c.entry.js.map → p-c7b2a5ef.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-5db11fa4.entry.js.map → p-d885c651.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-2f9c5d0e.entry.js.map → p-dd6cf2cd.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-4e6511c3.entry.js.map → p-e132910b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-5fa80df5.entry.js.map → p-e3fea9f8.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-18318bd5.entry.js.map → p-e773c47e.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-d3d7cd07.entry.js.map → p-e96183ae.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-aa4d13b4.entry.js.map → p-e9896db2.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-0c228908.entry.js.map → p-ea46d648.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-448d84e3.entry.js.map → p-ef8fbe01.entry.js.map} +0 -0
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
:host .dso-card-selectable, :host .dso-card-image {
|
|
2
|
-
grid-row: span 2;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
a {
|
|
6
2
|
background-color: transparent;
|
|
7
3
|
color: var(--link-color);
|
|
@@ -75,32 +71,52 @@ a:where(:not(.dso-primary, .dso-secondary, .dso-tertiary))[href^="mailto:"]:hove
|
|
|
75
71
|
:host {
|
|
76
72
|
display: block;
|
|
77
73
|
}
|
|
78
|
-
|
|
74
|
+
|
|
75
|
+
:host([is-selectable]:not([is-selectable=false])) .dso-card-container {
|
|
76
|
+
display: grid;
|
|
77
|
+
grid-template-columns: 1fr minmax(0, 100%);
|
|
78
|
+
}
|
|
79
|
+
:host([is-selectable]:not([is-selectable=false])) .dso-card-container .dso-card-heading,
|
|
80
|
+
:host([is-selectable]:not([is-selectable=false])) .dso-card-container .dso-card-content {
|
|
81
|
+
grid-column: 2/-1;
|
|
82
|
+
}
|
|
83
|
+
:host([is-selectable]:not([is-selectable=false])) .dso-card-container .dso-card-selectable {
|
|
84
|
+
grid-row: span 2;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([active]:not([active=false])) .dso-card-container {
|
|
88
|
+
background-color: #e5e5e5;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.dso-card-container {
|
|
92
|
+
padding-block: 16px 8px;
|
|
93
|
+
padding-inline: 16px;
|
|
94
|
+
inline-size: 100%;
|
|
95
|
+
block-size: 100%;
|
|
96
|
+
}
|
|
97
|
+
.dso-card-container:has(.dso-card-heading a:is(:hover, :focus-visible)) {
|
|
98
|
+
background-color: #f2f2f2;
|
|
99
|
+
}
|
|
100
|
+
.dso-card-container .dso-card-heading {
|
|
79
101
|
align-items: center;
|
|
80
102
|
display: flex;
|
|
81
103
|
margin-block-end: 8px;
|
|
82
104
|
}
|
|
83
105
|
@media screen and (max-width: 480px) {
|
|
84
|
-
|
|
106
|
+
.dso-card-container .dso-card-heading {
|
|
85
107
|
flex-wrap: wrap;
|
|
86
108
|
}
|
|
87
109
|
}
|
|
88
|
-
:host .dso-card-image {
|
|
89
|
-
margin-inline-end: 8px;
|
|
90
|
-
}
|
|
91
110
|
|
|
92
|
-
|
|
111
|
+
.heading-anchor {
|
|
112
|
+
display: flex;
|
|
113
|
+
gap: 4px;
|
|
93
114
|
color: #275937;
|
|
94
|
-
text-decoration: underline;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.dso-card-heading a {
|
|
98
115
|
text-decoration: none;
|
|
99
116
|
}
|
|
100
|
-
|
|
101
|
-
.heading-anchor {
|
|
117
|
+
.heading-anchor:hover {
|
|
102
118
|
color: #275937;
|
|
103
|
-
|
|
119
|
+
text-decoration: underline;
|
|
104
120
|
}
|
|
105
121
|
.heading-anchor:visited {
|
|
106
122
|
color: #275937;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.interfaces.js","sourceRoot":"","sources":["../../../../src/components/card/card.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface
|
|
1
|
+
{"version":3,"file":"card.interfaces.js","sourceRoot":"","sources":["../../../../src/components/card/card.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface CardClickEvent {\r\n originalEvent: MouseEvent;\r\n /** True when user clicked the card while holding Ctrl, Alt or other modifiers, or when the card is right-clicked. Can be used to determine navigation. */\r\n isModifiedEvent: boolean;\r\n}\r\n"]}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { h, Host, forceUpdate } from "@stencil/core";
|
|
2
|
-
import { isInteractiveElement } from "../../utils/is-interactive-element";
|
|
3
2
|
import { isModifiedEvent } from "../../utils/is-modified-event";
|
|
3
|
+
/**
|
|
4
|
+
* @slot selectable - An optional slot to place a `Selectable` in.
|
|
5
|
+
* @slot heading - A slot to place the title of the card in.
|
|
6
|
+
* @slot interactions - An optional slot for one or more `Button`s, `Label`s, `Toggletip`s or `SlideToggle`s.
|
|
7
|
+
* @slot content - An optional slot to place `Rich Content` in.
|
|
8
|
+
*/
|
|
4
9
|
export class Card {
|
|
5
10
|
constructor() {
|
|
6
|
-
this.clickable = true;
|
|
7
|
-
this.imageShape = "normal";
|
|
8
11
|
this.href = undefined;
|
|
9
12
|
this.mode = undefined;
|
|
13
|
+
this.active = undefined;
|
|
10
14
|
}
|
|
11
15
|
connectedCallback() {
|
|
12
16
|
this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
|
|
@@ -18,41 +22,21 @@ export class Card {
|
|
|
18
22
|
delete this.mutationObserver;
|
|
19
23
|
}
|
|
20
24
|
clickEventHandler(e) {
|
|
21
|
-
if (!(e.target instanceof HTMLElement) ||
|
|
25
|
+
if (!(e.target instanceof HTMLElement) || !this.href) {
|
|
22
26
|
return;
|
|
23
27
|
}
|
|
24
|
-
|
|
25
|
-
while (element !== this.host && element !== null) {
|
|
26
|
-
if (isInteractiveElement(element) || element === null) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (element.parentNode instanceof ShadowRoot && element.parentNode.host instanceof HTMLElement) {
|
|
30
|
-
element = element.parentNode.host;
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
element = element.parentElement;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return this.dsoCardClicked.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });
|
|
28
|
+
return this.dsoCardClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });
|
|
37
29
|
}
|
|
38
30
|
get selectableSlottedElement() {
|
|
39
31
|
return this.host.querySelector("[slot='selectable']");
|
|
40
32
|
}
|
|
41
|
-
get imageSlottedElement() {
|
|
42
|
-
return this.host.querySelector("[slot='image']");
|
|
43
|
-
}
|
|
44
|
-
get headingSlottedElement() {
|
|
45
|
-
return this.host.querySelector("[slot='heading']");
|
|
46
|
-
}
|
|
47
33
|
get interactionsSlottedElement() {
|
|
48
34
|
return this.host.querySelector("[slot='interactions']");
|
|
49
35
|
}
|
|
50
36
|
render() {
|
|
51
37
|
const isSelectable = this.selectableSlottedElement !== null;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(this.mode === "extern" && (h("a", { href: this.href, class: "heading-anchor", target: "_blank", rel: "noopener noreferrer" }, h("slot", { name: "heading" }), h("dso-icon", { icon: "external-link" }), h("span", { class: "sr-only" }, "(Opent andere website in nieuw tabblad)")))) ||
|
|
55
|
-
(this.mode === "download" && (h("a", { href: this.href, class: "heading-anchor" }, h("slot", { name: "heading" }), h("dso-icon", { icon: "download" }))))), this.interactionsSlottedElement !== null && h("slot", { key: 'f318d02fe89a6aa2a9377e2f32d72726c848c42f', name: "interactions" })), h("div", { key: '7b725b7edeee93b237352eff09ae2574647b9a3b', class: "dso-card-content" }, h("slot", { key: '9f855efe124e2a273b1ecb465b27bc7e01ac10e9', name: "content" }))));
|
|
38
|
+
return (h(Host, { key: '10c83534a51247b21f0cd43788b5401bb3b7cfe4', "is-selectable": isSelectable }, h("div", { key: '1777c1843f484ca91631c8a177af1e596515313d', class: "dso-card-container" }, h("div", { key: 'da813c4a48eceb0a2032717c92f06b710241ed70', class: "dso-card-selectable", hidden: !isSelectable }, h("slot", { key: '5c9332821517bd1a472b2ecd1ab2614adee16927', name: "selectable" })), h("div", { key: '701a3a2dc0d013bfa1f50eddcb4cf8759c7f4241', class: "dso-card-heading" }, (this.mode === "extern" && (h("a", { key: '760d6e6a0ab5acc994ed46a50a792db3c6647b6a', href: this.href, class: "heading-anchor", target: "_blank", rel: "noopener noreferrer", onClick: (e) => this.clickEventHandler(e) }, h("slot", { key: 'd7c1eb29fc027e72c33efc97aa43d82d8a852b64', name: "heading" }), h("dso-icon", { key: '47bb43f25b70e3389f0f021cfd184d21b5ce4c25', icon: "external-link" }), h("span", { key: '7ca3f4c4974342f115a608729e2df6bcf24a88df', class: "sr-only" }, "(Opent andere website in nieuw tabblad)")))) ||
|
|
39
|
+
(this.mode === "download" && (h("a", { key: '4ae333ab348d7d8c3a4bf1dae8ac9dd923a226e0', href: this.href, class: "heading-anchor", onClick: (e) => this.clickEventHandler(e) }, h("slot", { key: '0d6308ffb5d5151865ca5080834d68742cc4e90a', name: "heading" }), h("dso-icon", { key: '51317cdfc3378774e61950e9e344df659727d003', icon: "download" })))) || (h("a", { key: 'cbf7cfe050923e32a0b4322cf73a98450defa97f', href: this.href, class: "heading-anchor", onClick: (e) => this.clickEventHandler(e) }, h("slot", { key: '99a1e24503833f13756b0d6e8433d314865f1fe8', name: "heading" }), h("dso-icon", { key: '5425cb2e9285b8252de9ee13dd08b51e834d89d3', icon: "chevron-right" }))), this.interactionsSlottedElement !== null && h("slot", { key: 'ce04ab4923fd97fbbea799d4937d0a2f73c781a3', name: "interactions" })), h("div", { key: '232a855da9fead8f448bbea8729231688387f4a7', class: "dso-card-content" }, h("slot", { key: '73fd2ccecbd49456b44c42c737f4aa75922910eb', name: "content" })))));
|
|
56
40
|
}
|
|
57
41
|
static get is() { return "dso-card"; }
|
|
58
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -68,52 +52,24 @@ export class Card {
|
|
|
68
52
|
}
|
|
69
53
|
static get properties() {
|
|
70
54
|
return {
|
|
71
|
-
"
|
|
72
|
-
"type": "boolean",
|
|
73
|
-
"mutable": false,
|
|
74
|
-
"complexType": {
|
|
75
|
-
"original": "boolean",
|
|
76
|
-
"resolved": "boolean",
|
|
77
|
-
"references": {}
|
|
78
|
-
},
|
|
79
|
-
"required": false,
|
|
80
|
-
"optional": false,
|
|
81
|
-
"docs": {
|
|
82
|
-
"tags": [{
|
|
83
|
-
"name": "deprecated",
|
|
84
|
-
"text": "Use `href` instead and `<ELEMENT_TYPE slot=\"heading\">` should NOT be of element type `a` (anchor)."
|
|
85
|
-
}],
|
|
86
|
-
"text": "Whether or not the Card is clickable. This is NOT a boolean attribute. Set to \"false\" to make the Card non-clickable."
|
|
87
|
-
},
|
|
88
|
-
"attribute": "clickable",
|
|
89
|
-
"reflect": true,
|
|
90
|
-
"defaultValue": "true"
|
|
91
|
-
},
|
|
92
|
-
"imageShape": {
|
|
55
|
+
"href": {
|
|
93
56
|
"type": "string",
|
|
94
57
|
"mutable": false,
|
|
95
58
|
"complexType": {
|
|
96
|
-
"original": "
|
|
97
|
-
"resolved": "
|
|
98
|
-
"references": {
|
|
99
|
-
"ImageShape": {
|
|
100
|
-
"location": "import",
|
|
101
|
-
"path": "./card.interfaces",
|
|
102
|
-
"id": "src/components/card/card.interfaces.ts::ImageShape"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
59
|
+
"original": "string | undefined",
|
|
60
|
+
"resolved": "string | undefined",
|
|
61
|
+
"references": {}
|
|
105
62
|
},
|
|
106
|
-
"required":
|
|
63
|
+
"required": true,
|
|
107
64
|
"optional": false,
|
|
108
65
|
"docs": {
|
|
109
66
|
"tags": [],
|
|
110
|
-
"text": "
|
|
67
|
+
"text": "The URL to which the Card heading links."
|
|
111
68
|
},
|
|
112
|
-
"attribute": "
|
|
113
|
-
"reflect": true
|
|
114
|
-
"defaultValue": "\"normal\""
|
|
69
|
+
"attribute": "href",
|
|
70
|
+
"reflect": true
|
|
115
71
|
},
|
|
116
|
-
"
|
|
72
|
+
"mode": {
|
|
117
73
|
"type": "string",
|
|
118
74
|
"mutable": false,
|
|
119
75
|
"complexType": {
|
|
@@ -125,49 +81,49 @@ export class Card {
|
|
|
125
81
|
"optional": true,
|
|
126
82
|
"docs": {
|
|
127
83
|
"tags": [],
|
|
128
|
-
"text": "
|
|
84
|
+
"text": "Display the link as an external link or a download link\r\n - \"download\"\r\n - \"extern\""
|
|
129
85
|
},
|
|
130
|
-
"attribute": "
|
|
86
|
+
"attribute": "mode",
|
|
131
87
|
"reflect": true
|
|
132
88
|
},
|
|
133
|
-
"
|
|
134
|
-
"type": "
|
|
89
|
+
"active": {
|
|
90
|
+
"type": "boolean",
|
|
135
91
|
"mutable": false,
|
|
136
92
|
"complexType": {
|
|
137
|
-
"original": "
|
|
138
|
-
"resolved": "
|
|
93
|
+
"original": "boolean",
|
|
94
|
+
"resolved": "boolean | undefined",
|
|
139
95
|
"references": {}
|
|
140
96
|
},
|
|
141
97
|
"required": false,
|
|
142
98
|
"optional": true,
|
|
143
99
|
"docs": {
|
|
144
100
|
"tags": [],
|
|
145
|
-
"text": "
|
|
101
|
+
"text": "Makes the Card active."
|
|
146
102
|
},
|
|
147
|
-
"attribute": "
|
|
103
|
+
"attribute": "active",
|
|
148
104
|
"reflect": true
|
|
149
105
|
}
|
|
150
106
|
};
|
|
151
107
|
}
|
|
152
108
|
static get events() {
|
|
153
109
|
return [{
|
|
154
|
-
"method": "
|
|
155
|
-
"name": "
|
|
110
|
+
"method": "dsoCardClick",
|
|
111
|
+
"name": "dsoCardClick",
|
|
156
112
|
"bubbles": true,
|
|
157
113
|
"cancelable": true,
|
|
158
114
|
"composed": true,
|
|
159
115
|
"docs": {
|
|
160
116
|
"tags": [],
|
|
161
|
-
"text": "Emitted when the Card is
|
|
117
|
+
"text": "Emitted when the Card heading is clicked."
|
|
162
118
|
},
|
|
163
119
|
"complexType": {
|
|
164
|
-
"original": "
|
|
165
|
-
"resolved": "
|
|
120
|
+
"original": "CardClickEvent",
|
|
121
|
+
"resolved": "CardClickEvent",
|
|
166
122
|
"references": {
|
|
167
|
-
"
|
|
123
|
+
"CardClickEvent": {
|
|
168
124
|
"location": "import",
|
|
169
125
|
"path": "./card.interfaces",
|
|
170
|
-
"id": "src/components/card/card.interfaces.ts::
|
|
126
|
+
"id": "src/components/card/card.interfaces.ts::CardClickEvent"
|
|
171
127
|
}
|
|
172
128
|
}
|
|
173
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExH,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIhE;;;;;GAKG;AAMH,MAAM,OAAO,IAAI;;;;;;IAgCf,iBAAiB;QACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAE3E,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,gBAAgB,0CAAE,UAAU,EAAE,CAAC;QAEpC,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAEO,iBAAiB,CAAC,CAAa;QACrC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACrD,OAAO;QACT,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED,IAAI,wBAAwB;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,0BAA0B;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM;QACJ,MAAM,YAAY,GAAG,IAAI,CAAC,wBAAwB,KAAK,IAAI,CAAC;QAE5D,OAAO,CACL,EAAC,IAAI,sEAAgB,YAAY;YAC/B,4DAAK,KAAK,EAAC,oBAAoB;gBAC7B,4DAAK,KAAK,EAAC,qBAAqB,EAAC,MAAM,EAAE,CAAC,YAAY;oBACpD,6DAAM,IAAI,EAAC,YAAY,GAAG,CACtB;gBACN,4DAAK,KAAK,EAAC,kBAAkB;oBAC1B,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,CAC1B,0DACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAC,gBAAgB,EACtB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;wBAEzC,6DAAM,IAAI,EAAC,SAAS,GAAG;wBACvB,iEAAU,IAAI,EAAC,eAAe,GAAY;wBAC1C,6DAAM,KAAK,EAAC,SAAS,8CAA+C,CAClE,CACL,CAAC;wBACA,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,CAC3B,0DAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,gBAAgB,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;4BAClF,6DAAM,IAAI,EAAC,SAAS,GAAG;4BACvB,iEAAU,IAAI,EAAC,UAAU,GAAY,CACnC,CACL,CAAC,IAAI,CACJ,0DAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,gBAAgB,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;wBAClF,6DAAM,IAAI,EAAC,SAAS,GAAG;wBACvB,iEAAU,IAAI,EAAC,eAAe,GAAY,CACxC,CACL;oBACF,IAAI,CAAC,0BAA0B,KAAK,IAAI,IAAI,6DAAM,IAAI,EAAC,cAAc,GAAG,CACrE;gBACN,4DAAK,KAAK,EAAC,kBAAkB;oBAC3B,6DAAM,IAAI,EAAC,SAAS,GAAG,CACnB,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, forceUpdate } from \"@stencil/core\";\r\n\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { CardClickEvent } from \"./card.interfaces\";\r\n\r\n/**\r\n * @slot selectable - An optional slot to place a `Selectable` in.\r\n * @slot heading - A slot to place the title of the card in.\r\n * @slot interactions - An optional slot for one or more `Button`s, `Label`s, `Toggletip`s or `SlideToggle`s.\r\n * @slot content - An optional slot to place `Rich Content` in.\r\n */\r\n@Component({\r\n tag: \"dso-card\",\r\n styleUrl: \"card.scss\",\r\n shadow: true,\r\n})\r\nexport class Card implements ComponentInterface {\r\n @Element()\r\n host!: HTMLDsoCardElement;\r\n\r\n /**\r\n * The URL to which the Card heading links.\r\n */\r\n @Prop({ reflect: true })\r\n href!: string | undefined;\r\n\r\n /**\r\n * Display the link as an external link or a download link\r\n * - \"download\"\r\n * - \"extern\"\r\n */\r\n @Prop({ reflect: true })\r\n mode?: string;\r\n\r\n /**\r\n * Makes the Card active.\r\n */\r\n @Prop({ reflect: true })\r\n active?: boolean;\r\n\r\n /**\r\n * Emitted when the Card heading is clicked.\r\n */\r\n @Event()\r\n dsoCardClick!: EventEmitter<CardClickEvent>;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n connectedCallback(): void {\r\n this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));\r\n\r\n this.mutationObserver.observe(this.host, { attributes: true, childList: true });\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n\r\n private clickEventHandler(e: MouseEvent) {\r\n if (!(e.target instanceof HTMLElement) || !this.href) {\r\n return;\r\n }\r\n\r\n return this.dsoCardClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });\r\n }\r\n\r\n get selectableSlottedElement() {\r\n return this.host.querySelector(\"[slot='selectable']\");\r\n }\r\n\r\n get interactionsSlottedElement() {\r\n return this.host.querySelector(\"[slot='interactions']\");\r\n }\r\n\r\n render() {\r\n const isSelectable = this.selectableSlottedElement !== null;\r\n\r\n return (\r\n <Host is-selectable={isSelectable}>\r\n <div class=\"dso-card-container\">\r\n <div class=\"dso-card-selectable\" hidden={!isSelectable}>\r\n <slot name=\"selectable\" />\r\n </div>\r\n <div class=\"dso-card-heading\">\r\n {(this.mode === \"extern\" && (\r\n <a\r\n href={this.href}\r\n class=\"heading-anchor\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n onClick={(e) => this.clickEventHandler(e)}\r\n >\r\n <slot name=\"heading\" />\r\n <dso-icon icon=\"external-link\"></dso-icon>\r\n <span class=\"sr-only\">(Opent andere website in nieuw tabblad)</span>\r\n </a>\r\n )) ||\r\n (this.mode === \"download\" && (\r\n <a href={this.href} class=\"heading-anchor\" onClick={(e) => this.clickEventHandler(e)}>\r\n <slot name=\"heading\" />\r\n <dso-icon icon=\"download\"></dso-icon>\r\n </a>\r\n )) || (\r\n <a href={this.href} class=\"heading-anchor\" onClick={(e) => this.clickEventHandler(e)}>\r\n <slot name=\"heading\" />\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </a>\r\n )}\r\n {this.interactionsSlottedElement !== null && <slot name=\"interactions\" />}\r\n </div>\r\n <div class=\"dso-card-content\">\r\n <slot name=\"content\" />\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -4,7 +4,7 @@ export class CardContainer {
|
|
|
4
4
|
this.mode = "list";
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Fragment, null, this.mode === "list" && (h("ul", { key: '
|
|
7
|
+
return (h(Fragment, null, this.mode === "list" && (h("ul", { key: '32d6c14a02ed4aa3a12a4a987b099ba7f786ab26', class: "dso-card-list" }, h("slot", { key: 'f9e8072d7f3dffbcf4e47b19bccc50377dfc8b90' }))), this.mode === "grid" && (h("div", { key: 'b0f534dc19d2c781eab8b13a01d222ee263a53e8', class: "dso-card-grid" }, h("slot", { key: '347c56580c98cd25a2241f7fc7ed36f868005378' })))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "dso-card-container"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -95,7 +95,7 @@ export class DsoDatePicker {
|
|
|
95
95
|
}
|
|
96
96
|
render() {
|
|
97
97
|
var _a;
|
|
98
|
-
return (h("input", { key: '
|
|
98
|
+
return (h("input", { key: '396b62306362c143d28c80cae648f11b59886c22', type: "date", id: this.identifier, class: "dso-date__input", value: parseToValueFormat(this.value), name: this.name, min: parseToValueFormat(this.min), max: parseToValueFormat(this.max), disabled: this.disabled || undefined, required: this.required || undefined, "aria-autocomplete": "none", "aria-invalid": (_a = this.invalid) === null || _a === void 0 ? void 0 : _a.toString(), "aria-describedby": this.describedBy, autoComplete: "off", autofocus: this.dsoAutofocus || undefined, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, onChange: this.handleInputChange }));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "dso-date-picker"; }
|
|
101
101
|
static get encapsulation() { return "scoped"; }
|
|
@@ -424,14 +424,14 @@ export class DsoDatePickerLegacy {
|
|
|
424
424
|
if (maxDate) {
|
|
425
425
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
426
426
|
}
|
|
427
|
-
return (h(Host, { key: '
|
|
427
|
+
return (h(Host, { key: '21048228f8ece85acafa575b65effd49c8eb06fd' }, h("div", { key: '2e8c37e0bd890e5426e18b34c293d59e0dc28fd9', class: { "dso-date": true, "dso-visible": this.visible } }, h("div", { key: '4b5498556f0ecb2959301c6274fa1ba8beeb56ba', class: "dso-date__input-wrapper" }, h("input", { key: 'e4a9c11617188151109278dca34392a7a6fd7acf', class: "dso-date__input", value: this.value, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: (_a = this.role) !== null && _a !== void 0 ? _a : undefined, required: this.required ? true : undefined, "aria-autocomplete": "none", "aria-invalid": (_b = this.invalid) === null || _b === void 0 ? void 0 : _b.toString(), "aria-describedby": this.describedBy, onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: (element) => (this.datePickerLegacyInput = element) }), h("button", { key: '59d003f5d3e0692fa692f10d2a6ea74c9d03bc73', type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: (element) => (this.datePickerLegacyButton = element) }, h("span", { key: '35499b0c092f6b64507ef47a8d453e3a9dcab0df', class: "dso-date__toggle-icon" }, h("dso-icon", { key: 'd479c33bec38d9c79aad1dbf135a8656da2bf54d', icon: "calendar" })), h("span", { key: '5868bdd17a5c2f5bfc05c7a662dd19be605f90a2', class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (h("span", { key: '987d9d6cbad6763ecf3e8c3b1dc6cd7d60a372c0' }, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), h("div", { key: 'bc69058909195de2555bda78e5849d4377e552b8', class: {
|
|
428
428
|
"dso-date__dialog": true,
|
|
429
429
|
"is-left": this.direction === "left",
|
|
430
430
|
"is-active": this.open,
|
|
431
|
-
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("div", { key: '
|
|
431
|
+
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("div", { key: '710d763d3b6fe8df45baddcfe3fa64b7f618f20b', class: "dso-date__dialog-content", onKeyDown: this.handleEscKey }, h("div", { key: 'f5825ef31295efa446836948e0af0fcc4ee36ab8', class: "dso-date__vhidden dso-date__instructions", "aria-live": "polite" }, this.localization.keyboardInstruction), h("div", { key: '83fb9c2a5a7121ddafec462c54d06b0ca4e7721b', class: "dso-date__mobile", onFocusin: this.disableActiveFocus }, h("label", { key: 'bfbbd91d21a62d54d04b231f49d2ec125b011bb8', class: "dso-date__mobile-heading" }, this.localization.calendarHeading), h("button", { key: 'a7a8dd097438f089517dedd43b7aea18dced74cd', class: "dso-date__close", ref: (element) => (this.firstFocusableElement = element), onKeyDown: this.handleFirstFocusableKeydown, onClick: () => this.hide(), type: "button" }, h("dso-icon", { key: 'a68b9956250b7884f4138d7b8e9ff9fac1ad8824', icon: "times" }), h("span", { key: '76f352ec95530ae49a75e81093d57f5ec6c0fa3b', class: "dso-date__vhidden" }, this.localization.closeLabel))), h("div", { key: '3406397370206832afd1dc7036ea25b930f72efa', class: "dso-date__header", onFocusin: this.disableActiveFocus }, h("div", { key: '2bd8c6328596ce2587452fc2dc3715b05c754d28' }, h("h2", { key: '8b9c739b4535ad8e0ce8403e615fa587e6d8aadb', id: this.dialogLabelId, class: "dso-date__vhidden", "aria-live": "polite" }, this.localization.monthNames[focusedMonth], " ", this.focusedDay.getFullYear()), h("label", { key: 'ce7cefb6892d05290f5524d02901cc1e8812b40b', htmlFor: this.monthSelectId, class: "dso-date__vhidden" }, this.localization.monthSelectLabel), h("div", { key: '28c13137c007701fbe0a3231eab38c9fb7d33e44', class: "dso-date__select" }, h("select", { key: 'b6d9ec18b2951b69b07315222bd943fa81ca7790', id: this.monthSelectId, class: "dso-date__select--month", ref: (element) => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, monthRange(this.localization, selectedYear, minDate, maxDate).map((month) => {
|
|
432
432
|
const index = this.localization.monthNames.indexOf(month);
|
|
433
433
|
return (h("option", { key: month, value: index, selected: index === focusedMonth }, month));
|
|
434
|
-
})), h("div", { key: '
|
|
434
|
+
})), h("div", { key: 'b90d2b48cfe943b91bfae7f6e0002c59e28c471b', class: "dso-date__select-label", "aria-hidden": "true" }, h("span", { key: 'e5b72a3f93ed11b68ea21a84d302072956c78d67' }, this.localization.monthNamesShort[focusedMonth]), h("dso-icon", { key: '80be2680bd6f72d1c501ddbbacf6b9f4b15d9488', icon: "chevron-down" }))), h("label", { key: 'cd80f19fa89fb2f8715e28d6480d2fc9047d1296', htmlFor: this.yearSelectId, class: "dso-date__vhidden" }, this.localization.yearSelectLabel), h("div", { key: 'a50afb24985b062fb92a649d7bc42b3d87598dd2', class: "dso-date__select" }, h("select", { key: '90902c118e070b881d157e9f6c62352086da0c7a', id: this.yearSelectId, class: "dso-date__select--year", onChange: this.handleYearSelect }, range(minYear, maxYear).map((year) => (h("option", { key: year, selected: year === focusedYear }, year)))), h("div", { key: '4f2eb767b984cfe734d8cadd9398af6cc36487d8', class: "dso-date__select-label", "aria-hidden": "true" }, h("span", { key: 'c6942320ed7fb30b89b397de2db6d45edb49812f' }, this.focusedDay.getFullYear()), h("dso-icon", { key: '47f33877c1bf98dffac4786a93fa04904354e52c', icon: "chevron-down" })))), h("div", { key: 'c4755a4ad89a3be55666ed5d107c93f314774241', class: "dso-date__nav" }, h("button", { key: '64ae003276cf0086c824f0b108ad076eeb6a090e', class: "dso-date__prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, type: "button" }, h("dso-icon", { key: '24bb4171871179fb898b40f5b30d7188d4365cce', icon: "chevron-left" }), h("span", { key: '1f25eee813d9732235b382e513d851e1e47a5b1b', class: "dso-date__vhidden" }, this.localization.prevMonthLabel)), h("button", { key: 'a1f01fd959e030d8c6bff6f0c7d47aa5ccae9fe3', class: "dso-date__next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, type: "button" }, h("dso-icon", { key: '03b4b21054ed24422283cde0ea3de83a547c3537', icon: "chevron-right" }), h("span", { key: 'd9706fd79cb7fd362a9853d6f9ba0556095fa3de', class: "dso-date__vhidden" }, this.localization.nextMonthLabel)))), h(DatePickerLegacyMonth, { key: '710479d8e9823855ad515bf3b0d2cb6f8a0cc914', selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, localization: this.localization, firstDayOfWeek: this.firstDayOfWeek, focusedDayRef: this.processFocusedDayNode, min: minDate, max: maxDate }))))));
|
|
435
435
|
}
|
|
436
436
|
static get is() { return "dso-date-picker-legacy"; }
|
|
437
437
|
static get encapsulation() { return "scoped"; }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dso-document-card-container {
|
|
12
|
+
padding-block: 16px 8px;
|
|
13
|
+
padding-inline: 16px;
|
|
14
|
+
inline-size: 100%;
|
|
15
|
+
}
|
|
16
|
+
.dso-document-card-container .dso-document-card-heading {
|
|
17
|
+
align-items: center;
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
@media screen and (max-width: 480px) {
|
|
21
|
+
.dso-document-card-container .dso-document-card-heading {
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.dso-document-card-container:has(.dso-document-card-heading a:is(:hover, :focus-visible)) {
|
|
26
|
+
background-color: #f2f2f2;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([active]:not([active=false])) .dso-document-card-container {
|
|
30
|
+
background-color: #e5e5e5;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
::slotted([slot=meta]) {
|
|
34
|
+
display: flex !important;
|
|
35
|
+
justify-content: space-between !important;
|
|
36
|
+
margin-inline-start: auto !important;
|
|
37
|
+
}
|
|
38
|
+
@media screen and (max-width: 480px) {
|
|
39
|
+
::slotted([slot=meta]) {
|
|
40
|
+
flex-basis: 100% !important;
|
|
41
|
+
margin-block-start: 16px !important;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
::slotted([slot=heading]) {
|
|
46
|
+
align-items: center !important;
|
|
47
|
+
display: flex !important;
|
|
48
|
+
font-size: 1.125em !important;
|
|
49
|
+
margin-block-end: 0 !important;
|
|
50
|
+
margin-block-start: 0 !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.heading-anchor {
|
|
54
|
+
display: flex;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
color: #275937;
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
}
|
|
59
|
+
.heading-anchor:hover {
|
|
60
|
+
color: #275937;
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
}
|
|
63
|
+
.heading-anchor:visited {
|
|
64
|
+
color: #275937;
|
|
65
|
+
}
|
|
66
|
+
.heading-anchor dso-icon {
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
}
|
|
69
|
+
.heading-anchor .sr-only {
|
|
70
|
+
position: absolute;
|
|
71
|
+
inline-size: 1px;
|
|
72
|
+
block-size: 1px;
|
|
73
|
+
padding: 0;
|
|
74
|
+
margin: -1px;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
clip: rect(0, 0, 0, 0);
|
|
77
|
+
border: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
::slotted([slot=type]) {
|
|
81
|
+
--_dt-info-button-margin-inline-start: 0;
|
|
82
|
+
display: flex !important;
|
|
83
|
+
gap: 8px !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.dso-document-card-heading + .dso-document-card-type,
|
|
87
|
+
.dso-document-card-heading + .dso-document-card-status,
|
|
88
|
+
.dso-document-card-type + .dso-document-card-status {
|
|
89
|
+
margin-block-start: 8px;
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-card.interfaces.js","sourceRoot":"","sources":["../../../../src/components/document-card/document-card.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface DocumentCardClickEvent {\r\n originalEvent: MouseEvent;\r\n /** True when user clicked the card while holding Ctrl, Alt or other modifiers, or when the card is right-clicked. Can be used to determine navigation. */\r\n isModifiedEvent: boolean;\r\n}\r\n"]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { h, forceUpdate } from "@stencil/core";
|
|
2
|
+
import { isModifiedEvent } from "../../utils/is-modified-event";
|
|
3
|
+
/**
|
|
4
|
+
* @slot heading - A slot to place the title of the card in.
|
|
5
|
+
* @slot meta - An optional slot to place a `Label` in.
|
|
6
|
+
* @slot type - A slot to hold type of document with an optional `Toggletip`.
|
|
7
|
+
* @slot status - A slot to hold some status information on the document.
|
|
8
|
+
*/
|
|
9
|
+
export class DocumentCard {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.href = undefined;
|
|
12
|
+
this.active = undefined;
|
|
13
|
+
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
|
|
16
|
+
this.mutationObserver.observe(this.host, { attributes: true, childList: true });
|
|
17
|
+
}
|
|
18
|
+
disconnectedCallback() {
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
21
|
+
delete this.mutationObserver;
|
|
22
|
+
}
|
|
23
|
+
clickEventHandler(e) {
|
|
24
|
+
if (!(e.target instanceof HTMLElement) || !this.href) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
return this.dsoDocumentCardClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });
|
|
28
|
+
}
|
|
29
|
+
get metaSlottedElement() {
|
|
30
|
+
return this.host.querySelector("[slot='meta']");
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return (h("div", { key: 'da5f35bfb4340de8123393e31d955f5e232ac1da', class: "dso-document-card-container" }, h("div", { key: 'ebb1766cc91cddff11952de180ae5c4f5e974300', class: "dso-document-card-heading" }, h("a", { key: '44c19ab92d9adce26bf92b71cc763e7f1b55df9a', href: this.href, class: "heading-anchor", onClick: (e) => this.clickEventHandler(e) }, h("slot", { key: 'd528a084a56638ec201e4494559cc5c414a22fc6', name: "heading" }), h("dso-icon", { key: 'ec5fce61c68a57ca116f8e7a836fc7cdf2fed653', icon: "chevron-right" })), this.metaSlottedElement !== null && h("slot", { key: 'ed4e4d9029de18af9cfcb34e4bb3da413b38dd84', name: "meta" })), h("div", { key: '0850812c5838eec5dcae5dbe0615a15984e3cefb', class: "dso-document-card-type" }, h("slot", { key: 'e6ad51fac2e3f166dbbd51dee7931cc1b4d74c4f', name: "type" })), h("div", { key: '1c77dc25e082ad3e82299ff991793d92713a0574', class: "dso-document-card-status" }, h("slot", { key: 'ee43d829ce2ac1457cedba9f0c4c0dbaeece098c', name: "status" }))));
|
|
34
|
+
}
|
|
35
|
+
static get is() { return "dso-document-card"; }
|
|
36
|
+
static get encapsulation() { return "shadow"; }
|
|
37
|
+
static get originalStyleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["document-card.scss"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get styleUrls() {
|
|
43
|
+
return {
|
|
44
|
+
"$": ["document-card.css"]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get properties() {
|
|
48
|
+
return {
|
|
49
|
+
"href": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "string | undefined",
|
|
54
|
+
"resolved": "string | undefined",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": true,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": "The URL to which the DocumentCard heading links."
|
|
62
|
+
},
|
|
63
|
+
"attribute": "href",
|
|
64
|
+
"reflect": true
|
|
65
|
+
},
|
|
66
|
+
"active": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"mutable": false,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "boolean",
|
|
71
|
+
"resolved": "boolean | undefined",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": true,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": "Makes the DocumentCard active."
|
|
79
|
+
},
|
|
80
|
+
"attribute": "active",
|
|
81
|
+
"reflect": true
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get events() {
|
|
86
|
+
return [{
|
|
87
|
+
"method": "dsoDocumentCardClick",
|
|
88
|
+
"name": "dsoDocumentCardClick",
|
|
89
|
+
"bubbles": true,
|
|
90
|
+
"cancelable": true,
|
|
91
|
+
"composed": true,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Emitted when the DocumentCard heading is clicked."
|
|
95
|
+
},
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "DocumentCardClickEvent",
|
|
98
|
+
"resolved": "DocumentCardClickEvent",
|
|
99
|
+
"references": {
|
|
100
|
+
"DocumentCardClickEvent": {
|
|
101
|
+
"location": "import",
|
|
102
|
+
"path": "./document-card.interfaces",
|
|
103
|
+
"id": "src/components/document-card/document-card.interfaces.ts::DocumentCardClickEvent"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}];
|
|
108
|
+
}
|
|
109
|
+
static get elementRef() { return "host"; }
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=document-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-card.js","sourceRoot":"","sources":["../../../../src/components/document-card/document-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAElH,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIhE;;;;;GAKG;AAMH,MAAM,OAAO,YAAY;;;;;IAwBvB,iBAAiB;QACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAE3E,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,gBAAgB,0CAAE,UAAU,EAAE,CAAC;QAEpC,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAEO,iBAAiB,CAAC,CAAa;QACrC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACrD,OAAO;QACT,CAAC;QAED,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACnG,CAAC;IAED,IAAI,kBAAkB;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,6BAA6B;YACtC,4DAAK,KAAK,EAAC,2BAA2B;gBACpC,0DAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,gBAAgB,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;oBAClF,6DAAM,IAAI,EAAC,SAAS,GAAG;oBACvB,iEAAU,IAAI,EAAC,eAAe,GAAY,CACxC;gBACH,IAAI,CAAC,kBAAkB,KAAK,IAAI,IAAI,6DAAM,IAAI,EAAC,MAAM,GAAG,CACrD;YACN,4DAAK,KAAK,EAAC,wBAAwB;gBACjC,6DAAM,IAAI,EAAC,MAAM,GAAG,CAChB;YACN,4DAAK,KAAK,EAAC,0BAA0B;gBACnC,6DAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Prop, forceUpdate } from \"@stencil/core\";\r\n\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { DocumentCardClickEvent } from \"./document-card.interfaces\";\r\n\r\n/**\r\n * @slot heading - A slot to place the title of the card in.\r\n * @slot meta - An optional slot to place a `Label` in.\r\n * @slot type - A slot to hold type of document with an optional `Toggletip`.\r\n * @slot status - A slot to hold some status information on the document.\r\n */\r\n@Component({\r\n tag: \"dso-document-card\",\r\n styleUrl: \"document-card.scss\",\r\n shadow: true,\r\n})\r\nexport class DocumentCard implements ComponentInterface {\r\n @Element()\r\n host!: HTMLDsoDocumentCardElement;\r\n\r\n /**\r\n * The URL to which the DocumentCard heading links.\r\n */\r\n @Prop({ reflect: true })\r\n href!: string | undefined;\r\n\r\n /**\r\n * Makes the DocumentCard active.\r\n */\r\n @Prop({ reflect: true })\r\n active?: boolean;\r\n\r\n /**\r\n * Emitted when the DocumentCard heading is clicked.\r\n */\r\n @Event()\r\n dsoDocumentCardClick!: EventEmitter<DocumentCardClickEvent>;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n connectedCallback(): void {\r\n this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));\r\n\r\n this.mutationObserver.observe(this.host, { attributes: true, childList: true });\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n\r\n private clickEventHandler(e: MouseEvent) {\r\n if (!(e.target instanceof HTMLElement) || !this.href) {\r\n return;\r\n }\r\n\r\n return this.dsoDocumentCardClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });\r\n }\r\n\r\n get metaSlottedElement() {\r\n return this.host.querySelector(\"[slot='meta']\");\r\n }\r\n\r\n render() {\r\n return (\r\n <div class=\"dso-document-card-container\">\r\n <div class=\"dso-document-card-heading\">\r\n <a href={this.href} class=\"heading-anchor\" onClick={(e) => this.clickEventHandler(e)}>\r\n <slot name=\"heading\" />\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </a>\r\n {this.metaSlottedElement !== null && <slot name=\"meta\" />}\r\n </div>\r\n <div class=\"dso-document-card-type\">\r\n <slot name=\"type\" />\r\n </div>\r\n <div class=\"dso-document-card-status\">\r\n <slot name=\"status\" />\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|