@dso-toolkit/core 81.1.0 → 82.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/dso-accordion-section.js +3 -3
- package/dist/bundle/dso-accordion-section.js.map +1 -1
- package/dist/bundle/dso-accordion.js +2 -2
- package/dist/bundle/dso-accordion.js.map +1 -1
- package/dist/bundle/dso-document-component.js +1 -1
- package/dist/bundle/dso-history-item.js +3 -2
- package/dist/bundle/dso-history-item.js.map +1 -1
- package/dist/bundle/dso-list-button.js +1 -1
- package/dist/bundle/dso-list-button.js.map +1 -1
- package/dist/bundle/dso-map-base-layers.js +1 -1
- package/dist/bundle/dso-map-overlays.js +1 -1
- package/dist/bundle/dso-ozon-content.js +1 -1
- package/dist/bundle/dso-selectable.js +1 -1
- package/dist/bundle/dsot-document-component-demo.js +2 -2
- package/dist/bundle/{p-ZFqVNkha.js → p-COQMcyrp.js} +3 -3
- package/dist/bundle/p-COQMcyrp.js.map +1 -0
- package/dist/bundle/{p-DwMDdxsX.js → p-DbaZzGS_.js} +8 -8
- package/dist/bundle/p-DbaZzGS_.js.map +1 -0
- package/dist/bundle/{p-mimda5aG.js → p-ZIaudZgD.js} +3 -3
- package/dist/bundle/{p-mimda5aG.js.map → p-ZIaudZgD.js.map} +1 -1
- 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-accordion.cjs.entry.js +2 -2
- package/dist/cjs/dso-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-ozon-content-toggletip.dso-panel.dso-table.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-alert_7.cjs.entry.js +6 -6
- package/dist/cjs/dso-alert_7.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-history-item.cjs.entry.js +3 -2
- package/dist/cjs/dso-history-item.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-history-item.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-info.dso-selectable.entry.cjs.js.map +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-list-button.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-list-button.entry.cjs.js.map +1 -1
- package/dist/collection/components/accordion/accordion.css +10 -0
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion/accordion.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.css +1 -0
- package/dist/collection/components/accordion/components/accordion-section.js +2 -2
- package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
- package/dist/collection/components/history-item/history-item.css +4 -0
- package/dist/collection/components/history-item/history-item.interfaces.js.map +1 -1
- package/dist/collection/components/history-item/history-item.js +3 -2
- package/dist/collection/components/history-item/history-item.js.map +1 -1
- package/dist/collection/components/ozon-content/nodes/figuur.node.js +4 -4
- package/dist/collection/components/ozon-content/nodes/figuur.node.js.map +1 -1
- package/dist/collection/components/selectable/selectable.css +22 -6
- package/dist/components/dso-accordion-section.js +3 -3
- package/dist/components/dso-accordion-section.js.map +1 -1
- package/dist/components/dso-accordion.js +2 -2
- package/dist/components/dso-accordion.js.map +1 -1
- package/dist/components/dso-history-item.js +3 -2
- package/dist/components/dso-history-item.js.map +1 -1
- package/dist/components/dso-list-button.js.map +1 -1
- package/dist/components/ozon-content.js +6 -6
- package/dist/components/ozon-content.js.map +1 -1
- package/dist/components/selectable.js +1 -1
- package/dist/components/selectable.js.map +1 -1
- package/dist/dso-toolkit/dso-accordion-section.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-accordion.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-ozon-content-toggletip.dso-panel.dso-table.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-history-item.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-info.dso-selectable.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-list-button.entry.esm.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-9c063e0c.entry.js → p-004b02b7.entry.js} +2 -2
- package/dist/dso-toolkit/p-004b02b7.entry.js.map +1 -0
- package/dist/dso-toolkit/p-05275c43.entry.js +2 -0
- package/dist/dso-toolkit/p-05275c43.entry.js.map +1 -0
- package/dist/dso-toolkit/p-32b64025.entry.js.map +1 -1
- package/dist/dso-toolkit/p-4bd397cb.entry.js +2 -0
- package/dist/dso-toolkit/p-4bd397cb.entry.js.map +1 -0
- package/dist/dso-toolkit/p-4f87903d.entry.js +2 -0
- package/dist/dso-toolkit/p-4f87903d.entry.js.map +1 -0
- package/dist/dso-toolkit/p-5a7ce367.entry.js +2 -0
- package/dist/dso-toolkit/p-5a7ce367.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-accordion.entry.js +2 -2
- package/dist/esm/dso-accordion.entry.js.map +1 -1
- package/dist/esm/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-ozon-content-toggletip.dso-panel.dso-table.entry.js.map +1 -1
- package/dist/esm/dso-alert_7.entry.js +6 -6
- package/dist/esm/dso-alert_7.entry.js.map +1 -1
- package/dist/esm/dso-history-item.entry.js +3 -2
- package/dist/esm/dso-history-item.entry.js.map +1 -1
- package/dist/esm/dso-info.dso-selectable.entry.js.map +1 -1
- package/dist/esm/dso-info_2.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js.map +1 -1
- package/dist/esm/dso-list-button.entry.js.map +1 -1
- package/dist/types/components/history-item/history-item.interfaces.d.ts +1 -1
- package/package.json +3 -3
- package/dist/bundle/p-DwMDdxsX.js.map +0 -1
- package/dist/bundle/p-ZFqVNkha.js.map +0 -1
- package/dist/dso-toolkit/p-622e11c0.entry.js +0 -2
- package/dist/dso-toolkit/p-622e11c0.entry.js.map +0 -1
- package/dist/dso-toolkit/p-70ea6c42.entry.js +0 -2
- package/dist/dso-toolkit/p-70ea6c42.entry.js.map +0 -1
- package/dist/dso-toolkit/p-9c063e0c.entry.js.map +0 -1
- package/dist/dso-toolkit/p-c123217b.entry.js +0 -2
- package/dist/dso-toolkit/p-c123217b.entry.js.map +0 -1
- package/dist/dso-toolkit/p-d14bcff7.entry.js +0 -2
- package/dist/dso-toolkit/p-d14bcff7.entry.js.map +0 -1
|
@@ -18,7 +18,7 @@ function createIdentifier(prefix) {
|
|
|
18
18
|
return `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const selectableCss = ".sc-dso-selectable-h{padding-inline-start:var(--_dt-selectable-padding-inline-start, 32px);position:relative;display:var(--dso-selectable-display, block)}.sc-dso-selectable-h label.sc-dso-selectable{font-weight:400;line-height:24px;margin:0}.sc-dso-selectable-h input[type=checkbox][disabled].sc-dso-selectable+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=checkbox][disabled].sc-dso-selectable:active+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=checkbox][disabled].sc-dso-selectable:focus+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio][disabled].sc-dso-selectable+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio][disabled].sc-dso-selectable:active+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio][disabled].sc-dso-selectable:focus+label.sc-dso-selectable::before{background-color:#fff;box-shadow:0 0 0 2px #e5e5e5}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable,.sc-dso-selectable-h input[type=radio].sc-dso-selectable{block-size:100%;inset-inline-start:0;margin:0;appearance:none;position:absolute;inset-block-start:0;inline-size:100%;z-index:100;zoom:1}@media (prefers-contrast: more){.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable,.sc-dso-selectable-h input[type=radio].sc-dso-selectable{opacity:1}}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable:not([disabled]),.sc-dso-selectable-h input[type=radio].sc-dso-selectable:not([disabled]){cursor:pointer}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable+label.sc-dso-selectable,.sc-dso-selectable-h input[type=radio].sc-dso-selectable+label.sc-dso-selectable{display:inline;font-style:normal;padding-inline-start:0}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio].sc-dso-selectable+label.sc-dso-selectable::before{background:#fff;border:0;box-shadow:0 0 0 2px var(--
|
|
21
|
+
const selectableCss = ".sc-dso-selectable-h{padding-inline-start:var(--_dt-selectable-padding-inline-start, 32px);position:relative;display:var(--dso-selectable-display, block)}.sc-dso-selectable-h label.sc-dso-selectable{font-weight:400;line-height:24px;margin:0}.sc-dso-selectable-h input[type=checkbox][disabled].sc-dso-selectable+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=checkbox][disabled].sc-dso-selectable:active+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=checkbox][disabled].sc-dso-selectable:focus+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio][disabled].sc-dso-selectable+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio][disabled].sc-dso-selectable:active+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio][disabled].sc-dso-selectable:focus+label.sc-dso-selectable::before{background-color:#fff;box-shadow:0 0 0 2px #e5e5e5}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable,.sc-dso-selectable-h input[type=radio].sc-dso-selectable{block-size:100%;inset-inline-start:0;margin:0;appearance:none;position:absolute;inset-block-start:0;inline-size:100%;z-index:100;zoom:1}@media (prefers-contrast: more){.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable,.sc-dso-selectable-h input[type=radio].sc-dso-selectable{opacity:1}}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable:not([disabled]),.sc-dso-selectable-h input[type=radio].sc-dso-selectable:not([disabled]){cursor:pointer}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable+label.sc-dso-selectable,.sc-dso-selectable-h input[type=radio].sc-dso-selectable+label.sc-dso-selectable{display:inline;font-style:normal;padding-inline-start:0}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio].sc-dso-selectable+label.sc-dso-selectable::before{background:#fff;border:0;box-shadow:0 0 0 2px var(--_dso-selectable-color, #275937);content:\"\";block-size:20px;inset-inline-start:2px;position:absolute;inset-block-start:2px;inline-size:20px}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable:active+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=checkbox].active.sc-dso-selectable+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio].sc-dso-selectable:active+label.sc-dso-selectable::before,.sc-dso-selectable-h input[type=radio].active.sc-dso-selectable+label.sc-dso-selectable::before{background-color:#ebf3e6;box-shadow:0 0 0 1px #275937;block-size:22px;inset-inline-start:1px;inset-block-start:1px;inline-size:22px}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable+label.sc-dso-selectable::before{border-radius:4px}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable+label.sc-dso-selectable::after{background:transparent;content:\"\";inset-inline-start:6px;opacity:0;position:absolute;inset-block-start:6px;zoom:1}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable:checked+label.sc-dso-selectable::after,.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable:indeterminate+label.sc-dso-selectable::after{opacity:1}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable:checked+label.sc-dso-selectable::after{border:solid;border-color:var(--_dso-selectable-color, #39870c);border-block-start-color:transparent;border-width:0 0 3px 3px;block-size:8px;transform:rotate(-45deg);inline-size:13px}.sc-dso-selectable-h input[type=checkbox].sc-dso-selectable:indeterminate+label.sc-dso-selectable::after{background-color:var(--_dso-selectable-color, #39870c);block-size:12px;inline-size:12px}.sc-dso-selectable-h input[type=radio].sc-dso-selectable+label.sc-dso-selectable::before{border-radius:50%}.sc-dso-selectable-h input[type=radio].sc-dso-selectable+label.sc-dso-selectable::after{background-color:transparent;border-radius:50%;content:\"\";block-size:12px;inset-inline-start:6px;opacity:0;position:absolute;inset-block-start:6px;inline-size:12px;zoom:1}.sc-dso-selectable-h input[type=radio].sc-dso-selectable:checked+label.sc-dso-selectable::after{background-color:var(--_dso-selectable-color, #39870c);opacity:1}[invalid].sc-dso-selectable-h:not([invalid=false]){--_dso-selectable-color:#ce3f51}.sc-dso-selectable-h>dso-info.sc-dso-selectable{float:none;margin-block:8px 0;margin-inline:0 16px;inline-size:100%}.sc-dso-selectable-h .dso-selectable-options.sc-dso-selectable{list-style:none;margin-block-start:8px;padding-inline-start:0}.sc-dso-selectable-h .dso-selectable-options.sc-dso-selectable li.sc-dso-selectable+li.sc-dso-selectable{margin-block-start:8px}.sc-dso-selectable-h:not(:last-child){margin-block-end:8px}*.sc-dso-selectable,*.sc-dso-selectable::after,*.sc-dso-selectable::before{box-sizing:border-box}.dso-selectable-container.sc-dso-selectable{display:inline-block}.dso-selectable-container.sc-dso-selectable .dso-selectable-input-wrapper.sc-dso-selectable{display:inline-block;min-block-size:24px;position:relative;margin-inline-start:var(--_dt-selectable-input-wrapper-margin-inline-start, -32px);padding-inline-start:var(--_dt-selectable-input-wrapper-padding-inline-start, 32px)}.dso-selectable-container.sc-dso-selectable .dso-selectable-input-wrapper.sc-dso-selectable input[type=radio].sc-dso-selectable:focus+label.sc-dso-selectable::before,.dso-selectable-container.sc-dso-selectable .dso-selectable-input-wrapper.sc-dso-selectable input[type=checkbox].sc-dso-selectable:focus+label.sc-dso-selectable::before{box-shadow:0 0 0 2px var(--_dso-selectable-color, #275937);block-size:20px;inset-inline-start:2px;inset-block-start:2px;inline-size:20px}.sc-dso-selectable-s>[slot=info]{float:none;margin-block:8px 0;margin-inline:0 16px;inline-size:100%}.sc-dso-selectable-s>[slot=options]{list-style:none;margin-block-start:8px;padding-inline-start:0}.sc-dso-selectable-s>[slot=options] li+li{margin-block-start:8px}";
|
|
22
22
|
|
|
23
23
|
const Selectable = /*@__PURE__*/ proxyCustomElement(class Selectable extends HTMLElement {
|
|
24
24
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"selectable.js","mappings":";;;;;;AAAA;;AAEG;SACa,IAAI,GAAA;AAClB,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7C;AAEA;;;AAGG;AACG,SAAU,gBAAgB,CAAC,MAAc,EAAA;IAC7C,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,IAAI,EAAE,CAAG,EAAA,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAI,CAAA,EAAA,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAI,CAAA,EAAA,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAG,EAAA,IAAI,EAAE,CAAA,CAAE;AACjG;;ACbA,MAAM,aAAa,GAAG,y+KAAy+K;;MC6Bl/K,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAA,WAAA,CAAA;AALvB,IAAA,WAAA,GAAA;;;;AA6FE,QAAA,IAAU,CAAA,UAAA,GAAG,KAAK;AAeV,QAAA,IAAA,CAAA,kBAAkB,GAAG,gBAAgB,CAAC,eAAe,CAAC;AAItD,QAAA,IAAA,CAAA,cAAc,GAAG,CAAC,CAAQ,KAAI;AACpC,YAAA,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC;AAEpB,YAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;AAClB,gBAAA,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A,0CAAA,EAAA,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,WAAW,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAA,CACtC,CACpB,CACG,EACL,OAAO,KACN,CACE,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,GAAG,SAAS,EAC9D,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,UAAU,EAAE,OAAO,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EAAA,EAE3C,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,MAAM,EAAQ,CAAA,CACrB,CACG,CACZ,EACD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAG,CAAA,CACd;;IAIf,kBAAkB,GAAA;QAChB,IAAI,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;YAC1F,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;;;IAI7B,aAAa,GAAA;;QACnB,OAAO,CAAA,EAAA,GAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/utils/create-identifier.ts","src/components/selectable/selectable.scss?tag=dso-selectable&encapsulation=scoped","src/components/selectable/selectable.tsx"],"sourcesContent":["/**\r\n * Form random hash\r\n */\r\nexport function chr4() {\r\n return Math.random().toString(16).slice(-4);\r\n}\r\n\r\n/**\r\n * Create random identifier with a prefix\r\n * @param prefix\r\n */\r\nexport function createIdentifier(prefix: string): string {\r\n return `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;\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/zindex\";\r\n@use \"selectable.variables\" as selectable-variables;\r\n\r\n:host {\r\n padding-inline-start: var(--_dt-selectable-padding-inline-start, selectable-variables.$symbol-indent);\r\n position: relative;\r\n display: var(--dso-selectable-display, block);\r\n\r\n label {\r\n font-weight: 400;\r\n line-height: selectable-variables.$size;\r\n margin: 0;\r\n }\r\n\r\n input[type=\"checkbox\"][disabled],\r\n input[type=\"radio\"][disabled] {\r\n &,\r\n &:active,\r\n &:focus {\r\n + label {\r\n &::before {\r\n background-color: colors.$wit;\r\n box-shadow: 0 0 0 selectable-variables.$border-width selectable-variables.$disabled-color;\r\n }\r\n }\r\n }\r\n }\r\n\r\n input[type=\"checkbox\"],\r\n input[type=\"radio\"] {\r\n block-size: 100%;\r\n inset-inline-start: 0;\r\n margin: 0;\r\n appearance: none;\r\n position: absolute;\r\n inset-block-start: 0;\r\n inline-size: 100%;\r\n z-index: zindex.$selectable;\r\n zoom: 1;\r\n\r\n @media (prefers-contrast: more) {\r\n & {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n &:not([disabled]) {\r\n cursor: pointer;\r\n }\r\n\r\n + label {\r\n display: inline;\r\n font-style: normal;\r\n padding-inline-start: 0;\r\n\r\n &::before {\r\n background: colors.$wit;\r\n border: 0;\r\n box-shadow: 0 0 0 selectable-variables.$border-width\r\n var(--dso-selectable-color, selectable-variables.$valid-color);\r\n content: \"\";\r\n block-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n inset-inline-start: selectable-variables.$border-width;\r\n position: absolute;\r\n inset-block-start: selectable-variables.$border-width;\r\n inline-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n }\r\n }\r\n\r\n &:active,\r\n &.active {\r\n + label::before {\r\n background-color: selectable-variables.$active-background-color;\r\n box-shadow: 0 0 0 1px selectable-variables.$valid-color;\r\n block-size: selectable-variables.$size - 2px;\r\n inset-inline-start: 1px;\r\n inset-block-start: 1px;\r\n inline-size: selectable-variables.$size - 2px;\r\n }\r\n }\r\n }\r\n\r\n input[type=\"checkbox\"] {\r\n + label {\r\n &::before {\r\n border-radius: 4px;\r\n }\r\n\r\n &::after {\r\n background: transparent;\r\n content: \"\";\r\n inset-inline-start: 6px;\r\n opacity: 0;\r\n position: absolute;\r\n inset-block-start: 6px;\r\n zoom: 1;\r\n }\r\n }\r\n\r\n &:checked,\r\n &:indeterminate {\r\n + label {\r\n &::after {\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n\r\n &:checked {\r\n + label {\r\n &::after {\r\n border: solid;\r\n border-color: var(--dso-selectable-color, selectable-variables.$valid-marker-color);\r\n border-block-start-color: transparent;\r\n border-width: 0 0 3px 3px;\r\n block-size: 8px;\r\n transform: rotate(-45deg);\r\n inline-size: 13px;\r\n }\r\n }\r\n }\r\n\r\n &:indeterminate {\r\n + label {\r\n &::after {\r\n background-color: var(--dso-selectable-color, selectable-variables.$valid-marker-color);\r\n block-size: selectable-variables.$indeterminate-size;\r\n inline-size: selectable-variables.$indeterminate-size;\r\n }\r\n }\r\n }\r\n }\r\n\r\n input[type=\"radio\"] {\r\n + label {\r\n &::before {\r\n border-radius: 50%;\r\n }\r\n\r\n &::after {\r\n background-color: transparent;\r\n border-radius: 50%;\r\n content: \"\";\r\n block-size: 12px;\r\n inset-inline-start: 6px;\r\n opacity: 0;\r\n position: absolute;\r\n inset-block-start: 6px;\r\n inline-size: 12px;\r\n zoom: 1;\r\n }\r\n }\r\n\r\n &:checked {\r\n + label {\r\n &::after {\r\n background-color: var(--dso-selectable-color, selectable-variables.$valid-marker-color);\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n &[invalid]:not([invalid=\"false\"]) {\r\n --dso-selectable-color: #{selectable-variables.$invalid-color};\r\n }\r\n\r\n > dso-info {\r\n float: none;\r\n margin-block: units.$u1 0;\r\n margin-inline: 0 units.$u2;\r\n inline-size: 100%;\r\n }\r\n\r\n .dso-selectable-options {\r\n list-style: none;\r\n margin-block-start: units.$u1;\r\n padding-inline-start: 0;\r\n\r\n li + li {\r\n margin-block-start: units.$u1;\r\n }\r\n }\r\n}\r\n\r\n:host(:not(:last-child)) {\r\n margin-block-end: units.$u1;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-selectable-container {\r\n display: inline-block;\r\n\r\n .dso-selectable-input-wrapper {\r\n display: inline-block;\r\n min-block-size: units.$u3;\r\n position: relative;\r\n margin-inline-start: var(\r\n --_dt-selectable-input-wrapper-margin-inline-start,\r\n -(selectable-variables.$symbol-indent)\r\n );\r\n padding-inline-start: var(--_dt-selectable-input-wrapper-padding-inline-start, selectable-variables.$symbol-indent);\r\n\r\n input[type=\"radio\"],\r\n input[type=\"checkbox\"] {\r\n &:focus + label::before {\r\n box-shadow: 0 0 0 selectable-variables.$border-width\r\n var(--dso-selectable-color, selectable-variables.$valid-color);\r\n block-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n inset-inline-start: selectable-variables.$border-width;\r\n inset-block-start: selectable-variables.$border-width;\r\n inline-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n }\r\n }\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 Method,\r\n Prop,\r\n State,\r\n Watch,\r\n forceUpdate,\r\n h,\r\n} from \"@stencil/core\";\r\n\r\nimport { createIdentifier } from \"../../utils/create-identifier\";\r\n\r\nimport { SelectableChangeEvent } from \"./selectable.interfaces\";\r\n\r\n/**\r\n * @slot - The label for this control\r\n * @slot info - Rich Content to be slotted in Info.\r\n * @slot options - for further nested selectable options: `<ul class=\"dso-selectable-options\" slot=\"options\">` and wrap each Selectable in a `<li>`.\r\n */\r\n@Component({\r\n tag: \"dso-selectable\",\r\n styleUrl: \"selectable.scss\",\r\n scoped: true,\r\n})\r\nexport class Selectable implements ComponentInterface {\r\n /**\r\n * Type of Selectable.\r\n *\r\n * `checkbox`: Multiple options\r\n * `radio`: Single option.\r\n */\r\n @Prop()\r\n type!: \"checkbox\" | \"radio\";\r\n\r\n /**\r\n * To set `<input id>` attribute for external references.\r\n */\r\n @Prop()\r\n identifier?: string;\r\n\r\n /**\r\n * Name of the Selectable. Can be used to group Selectables.\r\n */\r\n @Prop()\r\n name?: string;\r\n\r\n /**\r\n * The value of the Selectable.\r\n */\r\n @Prop()\r\n value!: string;\r\n\r\n /**\r\n * Set to true of the current value is not valid.\r\n */\r\n @Prop()\r\n invalid?: boolean;\r\n\r\n /**\r\n * To link this control to an element that describes it.\r\n */\r\n @Prop()\r\n describedById?: string;\r\n\r\n /**\r\n * To link this control to an element that labels it.\r\n */\r\n @Prop()\r\n labelledById?: string;\r\n\r\n /**\r\n * To disable the Selectable.\r\n */\r\n @Prop()\r\n disabled?: boolean;\r\n\r\n /**\r\n * To mark the Selectable as required.\r\n */\r\n @Prop()\r\n required?: boolean;\r\n\r\n /**\r\n * Mark the Selectable as checked\r\n */\r\n @Prop({ reflect: true })\r\n checked?: boolean;\r\n\r\n /**\r\n * An indeterminate state is neither true or false. It means the answer is somewhere in between.\r\n *\r\n * Can be used to indicate child Selectables that are a mix of checked and unchecked.\r\n */\r\n @Prop()\r\n indeterminate?: boolean;\r\n\r\n /**\r\n * Set to true if the Info should not be toggled and always visible.\r\n */\r\n @Prop()\r\n infoFixed?: boolean;\r\n\r\n /**\r\n * Emitted when the user checks or unchecks the Selectable.\r\n */\r\n @Event()\r\n dsoChange!: EventEmitter<SelectableChangeEvent>;\r\n\r\n @Element()\r\n host!: HTMLDsoSelectableElement;\r\n\r\n @State()\r\n infoActive = false;\r\n\r\n /**\r\n * Method to toggle the Info. Is set to `active` when passed.\r\n *\r\n * If `active` is not passed, Info is toggled to opposite value.\r\n * @param active\r\n */\r\n @Method()\r\n async toggleInfo(active?: boolean) {\r\n this.infoActive = active ?? !this.infoActive;\r\n }\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n private fallbackIdentifier = createIdentifier(\"DsoSelectable\");\r\n\r\n private input: HTMLInputElement | undefined;\r\n\r\n private handleOnChange = (e: Event) => {\r\n const { target } = e;\r\n\r\n this.dsoChange.emit({\r\n originalEvent: e,\r\n checked: target instanceof HTMLInputElement && target.checked,\r\n });\r\n\r\n forceUpdate(this.host);\r\n };\r\n\r\n componentDidLoad() {\r\n this.mutationObserver?.disconnect();\r\n\r\n this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));\r\n this.mutationObserver.observe(this.host, {\r\n childList: true,\r\n });\r\n\r\n this.setIndeterminate();\r\n }\r\n\r\n disconnectedCallback() {\r\n this.mutationObserver?.disconnect();\r\n }\r\n\r\n @Watch(\"indeterminate\")\r\n setIndeterminate() {\r\n if (!(this.input instanceof HTMLInputElement) || this.type !== \"checkbox\") {\r\n return;\r\n }\r\n\r\n this.input.indeterminate = !!this.indeterminate;\r\n }\r\n\r\n render() {\r\n const hasInfo = !!this.host.querySelector('[slot=\"info\"]');\r\n\r\n return (\r\n <Fragment>\r\n <div class=\"dso-selectable-container\">\r\n <div class=\"dso-selectable-input-wrapper\">\r\n <input\r\n type={this.type}\r\n id={this.getIdentifier()}\r\n value={this.value}\r\n name={this.name}\r\n aria-invalid={this.invalid?.toString()}\r\n aria-describedby={hasInfo && this.infoFixed ? this.describedById : undefined}\r\n aria-labelledBy={this.labelledById}\r\n disabled={this.disabled}\r\n required={this.required}\r\n checked={this.checked}\r\n onChange={this.handleOnChange}\r\n ref={(el) => (this.input = el)}\r\n />\r\n {!this.labelledById ? (\r\n <label htmlFor={this.getIdentifier()}>\r\n <slot />\r\n </label>\r\n ) : (\r\n <label>\r\n <slot />\r\n </label>\r\n )}\r\n </div>\r\n {hasInfo && !this.infoFixed && (\r\n <dso-info-button\r\n active={this.infoActive}\r\n onDsoToggle={(e) => (this.infoActive = e.detail.active)}\r\n ></dso-info-button>\r\n )}\r\n </div>\r\n {hasInfo && (\r\n <dso-info\r\n id={hasInfo && this.infoFixed ? this.describedById : undefined}\r\n fixed={this.infoFixed}\r\n active={this.infoActive}\r\n onDsoClose={() => (this.infoActive = false)}\r\n >\r\n <div>\r\n <slot name=\"info\"></slot>\r\n </div>\r\n </dso-info>\r\n )}\r\n <slot name=\"options\" />\r\n </Fragment>\r\n );\r\n }\r\n\r\n componentDidRender(): void {\r\n if (this.input && typeof this.checked === \"boolean\" && this.input.checked !== this.checked) {\r\n this.input.checked = this.checked;\r\n }\r\n }\r\n\r\n private getIdentifier(): string {\r\n return this.identifier ?? this.fallbackIdentifier;\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"selectable.js","mappings":";;;;;;AAAA;;AAEG;SACa,IAAI,GAAA;AAClB,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7C;AAEA;;;AAGG;AACG,SAAU,gBAAgB,CAAC,MAAc,EAAA;IAC7C,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,IAAI,EAAE,CAAG,EAAA,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAI,CAAA,EAAA,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAI,CAAA,EAAA,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAG,EAAA,IAAI,EAAE,CAAA,CAAE;AACjG;;ACbA,MAAM,aAAa,GAAG,uvLAAuvL;;MC6BhwL,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAA,WAAA,CAAA;A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C,OAAO;;;IAI7B,aAAa,GAAA;;QACnB,OAAO,CAAA,EAAA,GAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/utils/create-identifier.ts","src/components/selectable/selectable.scss?tag=dso-selectable&encapsulation=scoped","src/components/selectable/selectable.tsx"],"sourcesContent":["/**\r\n * Form random hash\r\n */\r\nexport function chr4() {\r\n return Math.random().toString(16).slice(-4);\r\n}\r\n\r\n/**\r\n * Create random identifier with a prefix\r\n * @param prefix\r\n */\r\nexport function createIdentifier(prefix: string): string {\r\n return `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;\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/zindex\";\r\n@use \"selectable.variables\" as selectable-variables;\r\n\r\n:host {\r\n padding-inline-start: var(--_dt-selectable-padding-inline-start, selectable-variables.$symbol-indent);\r\n position: relative;\r\n display: var(--dso-selectable-display, block);\r\n\r\n label {\r\n font-weight: 400;\r\n line-height: selectable-variables.$size;\r\n margin: 0;\r\n }\r\n\r\n input[type=\"checkbox\"][disabled],\r\n input[type=\"radio\"][disabled] {\r\n &,\r\n &:active,\r\n &:focus {\r\n + label {\r\n &::before {\r\n background-color: colors.$wit;\r\n box-shadow: 0 0 0 selectable-variables.$border-width selectable-variables.$disabled-color;\r\n }\r\n }\r\n }\r\n }\r\n\r\n input[type=\"checkbox\"],\r\n input[type=\"radio\"] {\r\n block-size: 100%;\r\n inset-inline-start: 0;\r\n margin: 0;\r\n appearance: none;\r\n position: absolute;\r\n inset-block-start: 0;\r\n inline-size: 100%;\r\n z-index: zindex.$selectable;\r\n zoom: 1;\r\n\r\n @media (prefers-contrast: more) {\r\n & {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n &:not([disabled]) {\r\n cursor: pointer;\r\n }\r\n\r\n + label {\r\n display: inline;\r\n font-style: normal;\r\n padding-inline-start: 0;\r\n\r\n &::before {\r\n background: colors.$wit;\r\n border: 0;\r\n box-shadow: 0 0 0 selectable-variables.$border-width\r\n var(--_dso-selectable-color, selectable-variables.$valid-color);\r\n content: \"\";\r\n block-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n inset-inline-start: selectable-variables.$border-width;\r\n position: absolute;\r\n inset-block-start: selectable-variables.$border-width;\r\n inline-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n }\r\n }\r\n\r\n &:active,\r\n &.active {\r\n + label::before {\r\n background-color: selectable-variables.$active-background-color;\r\n box-shadow: 0 0 0 1px selectable-variables.$valid-color;\r\n block-size: selectable-variables.$size - 2px;\r\n inset-inline-start: 1px;\r\n inset-block-start: 1px;\r\n inline-size: selectable-variables.$size - 2px;\r\n }\r\n }\r\n }\r\n\r\n input[type=\"checkbox\"] {\r\n + label {\r\n &::before {\r\n border-radius: 4px;\r\n }\r\n\r\n &::after {\r\n background: transparent;\r\n content: \"\";\r\n inset-inline-start: 6px;\r\n opacity: 0;\r\n position: absolute;\r\n inset-block-start: 6px;\r\n zoom: 1;\r\n }\r\n }\r\n\r\n &:checked,\r\n &:indeterminate {\r\n + label {\r\n &::after {\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n\r\n &:checked {\r\n + label {\r\n &::after {\r\n border: solid;\r\n border-color: var(--_dso-selectable-color, selectable-variables.$valid-marker-color);\r\n border-block-start-color: transparent;\r\n border-width: 0 0 3px 3px;\r\n block-size: 8px;\r\n transform: rotate(-45deg);\r\n inline-size: 13px;\r\n }\r\n }\r\n }\r\n\r\n &:indeterminate {\r\n + label {\r\n &::after {\r\n background-color: var(--_dso-selectable-color, selectable-variables.$valid-marker-color);\r\n block-size: selectable-variables.$indeterminate-size;\r\n inline-size: selectable-variables.$indeterminate-size;\r\n }\r\n }\r\n }\r\n }\r\n\r\n input[type=\"radio\"] {\r\n + label {\r\n &::before {\r\n border-radius: 50%;\r\n }\r\n\r\n &::after {\r\n background-color: transparent;\r\n border-radius: 50%;\r\n content: \"\";\r\n block-size: 12px;\r\n inset-inline-start: 6px;\r\n opacity: 0;\r\n position: absolute;\r\n inset-block-start: 6px;\r\n inline-size: 12px;\r\n zoom: 1;\r\n }\r\n }\r\n\r\n &:checked {\r\n + label {\r\n &::after {\r\n background-color: var(--_dso-selectable-color, selectable-variables.$valid-marker-color);\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n &[invalid]:not([invalid=\"false\"]) {\r\n --_dso-selectable-color: #{selectable-variables.$invalid-color};\r\n }\r\n\r\n > dso-info {\r\n float: none;\r\n margin-block: units.$u1 0;\r\n margin-inline: 0 units.$u2;\r\n inline-size: 100%;\r\n }\r\n\r\n .dso-selectable-options {\r\n list-style: none;\r\n margin-block-start: units.$u1;\r\n padding-inline-start: 0;\r\n\r\n li + li {\r\n margin-block-start: units.$u1;\r\n }\r\n }\r\n}\r\n\r\n:host(:not(:last-child)) {\r\n margin-block-end: units.$u1;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-selectable-container {\r\n display: inline-block;\r\n\r\n .dso-selectable-input-wrapper {\r\n display: inline-block;\r\n min-block-size: units.$u3;\r\n position: relative;\r\n margin-inline-start: var(\r\n --_dt-selectable-input-wrapper-margin-inline-start,\r\n -(selectable-variables.$symbol-indent)\r\n );\r\n padding-inline-start: var(--_dt-selectable-input-wrapper-padding-inline-start, selectable-variables.$symbol-indent);\r\n\r\n input[type=\"radio\"],\r\n input[type=\"checkbox\"] {\r\n &:focus + label::before {\r\n box-shadow: 0 0 0 selectable-variables.$border-width\r\n var(--_dso-selectable-color, selectable-variables.$valid-color);\r\n block-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n inset-inline-start: selectable-variables.$border-width;\r\n inset-block-start: selectable-variables.$border-width;\r\n inline-size: selectable-variables.$size - 2 * selectable-variables.$border-width;\r\n }\r\n }\r\n }\r\n}\r\n\r\n::slotted([slot=\"info\"]) {\r\n float: none;\r\n margin-block: units.$u1 0;\r\n margin-inline: 0 units.$u2;\r\n inline-size: 100%;\r\n}\r\n\r\n::slotted([slot=\"options\"]) {\r\n list-style: none;\r\n margin-block-start: units.$u1;\r\n padding-inline-start: 0;\r\n\r\n li + li {\r\n margin-block-start: units.$u1;\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 Method,\r\n Prop,\r\n State,\r\n Watch,\r\n forceUpdate,\r\n h,\r\n} from \"@stencil/core\";\r\n\r\nimport { createIdentifier } from \"../../utils/create-identifier\";\r\n\r\nimport { SelectableChangeEvent } from \"./selectable.interfaces\";\r\n\r\n/**\r\n * @slot - The label for this control\r\n * @slot info - Rich Content to be slotted in Info.\r\n * @slot options - for further nested selectable options: `<ul class=\"dso-selectable-options\" slot=\"options\">` and wrap each Selectable in a `<li>`.\r\n */\r\n@Component({\r\n tag: \"dso-selectable\",\r\n styleUrl: \"selectable.scss\",\r\n scoped: true,\r\n})\r\nexport class Selectable implements ComponentInterface {\r\n /**\r\n * Type of Selectable.\r\n *\r\n * `checkbox`: Multiple options\r\n * `radio`: Single option.\r\n */\r\n @Prop()\r\n type!: \"checkbox\" | \"radio\";\r\n\r\n /**\r\n * To set `<input id>` attribute for external references.\r\n */\r\n @Prop()\r\n identifier?: string;\r\n\r\n /**\r\n * Name of the Selectable. Can be used to group Selectables.\r\n */\r\n @Prop()\r\n name?: string;\r\n\r\n /**\r\n * The value of the Selectable.\r\n */\r\n @Prop()\r\n value!: string;\r\n\r\n /**\r\n * Set to true of the current value is not valid.\r\n */\r\n @Prop()\r\n invalid?: boolean;\r\n\r\n /**\r\n * To link this control to an element that describes it.\r\n */\r\n @Prop()\r\n describedById?: string;\r\n\r\n /**\r\n * To link this control to an element that labels it.\r\n */\r\n @Prop()\r\n labelledById?: string;\r\n\r\n /**\r\n * To disable the Selectable.\r\n */\r\n @Prop()\r\n disabled?: boolean;\r\n\r\n /**\r\n * To mark the Selectable as required.\r\n */\r\n @Prop()\r\n required?: boolean;\r\n\r\n /**\r\n * Mark the Selectable as checked\r\n */\r\n @Prop({ reflect: true })\r\n checked?: boolean;\r\n\r\n /**\r\n * An indeterminate state is neither true or false. It means the answer is somewhere in between.\r\n *\r\n * Can be used to indicate child Selectables that are a mix of checked and unchecked.\r\n */\r\n @Prop()\r\n indeterminate?: boolean;\r\n\r\n /**\r\n * Set to true if the Info should not be toggled and always visible.\r\n */\r\n @Prop()\r\n infoFixed?: boolean;\r\n\r\n /**\r\n * Emitted when the user checks or unchecks the Selectable.\r\n */\r\n @Event()\r\n dsoChange!: EventEmitter<SelectableChangeEvent>;\r\n\r\n @Element()\r\n host!: HTMLDsoSelectableElement;\r\n\r\n @State()\r\n infoActive = false;\r\n\r\n /**\r\n * Method to toggle the Info. Is set to `active` when passed.\r\n *\r\n * If `active` is not passed, Info is toggled to opposite value.\r\n * @param active\r\n */\r\n @Method()\r\n async toggleInfo(active?: boolean) {\r\n this.infoActive = active ?? !this.infoActive;\r\n }\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n private fallbackIdentifier = createIdentifier(\"DsoSelectable\");\r\n\r\n private input: HTMLInputElement | undefined;\r\n\r\n private handleOnChange = (e: Event) => {\r\n const { target } = e;\r\n\r\n this.dsoChange.emit({\r\n originalEvent: e,\r\n checked: target instanceof HTMLInputElement && target.checked,\r\n });\r\n\r\n forceUpdate(this.host);\r\n };\r\n\r\n componentDidLoad() {\r\n this.mutationObserver?.disconnect();\r\n\r\n this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));\r\n this.mutationObserver.observe(this.host, {\r\n childList: true,\r\n });\r\n\r\n this.setIndeterminate();\r\n }\r\n\r\n disconnectedCallback() {\r\n this.mutationObserver?.disconnect();\r\n }\r\n\r\n @Watch(\"indeterminate\")\r\n setIndeterminate() {\r\n if (!(this.input instanceof HTMLInputElement) || this.type !== \"checkbox\") {\r\n return;\r\n }\r\n\r\n this.input.indeterminate = !!this.indeterminate;\r\n }\r\n\r\n render() {\r\n const hasInfo = !!this.host.querySelector('[slot=\"info\"]');\r\n\r\n return (\r\n <Fragment>\r\n <div class=\"dso-selectable-container\">\r\n <div class=\"dso-selectable-input-wrapper\">\r\n <input\r\n type={this.type}\r\n id={this.getIdentifier()}\r\n value={this.value}\r\n name={this.name}\r\n aria-invalid={this.invalid?.toString()}\r\n aria-describedby={hasInfo && this.infoFixed ? this.describedById : undefined}\r\n aria-labelledBy={this.labelledById}\r\n disabled={this.disabled}\r\n required={this.required}\r\n checked={this.checked}\r\n onChange={this.handleOnChange}\r\n ref={(el) => (this.input = el)}\r\n />\r\n {!this.labelledById ? (\r\n <label htmlFor={this.getIdentifier()}>\r\n <slot />\r\n </label>\r\n ) : (\r\n <label>\r\n <slot />\r\n </label>\r\n )}\r\n </div>\r\n {hasInfo && !this.infoFixed && (\r\n <dso-info-button\r\n active={this.infoActive}\r\n onDsoToggle={(e) => (this.infoActive = e.detail.active)}\r\n ></dso-info-button>\r\n )}\r\n </div>\r\n {hasInfo && (\r\n <dso-info\r\n id={hasInfo && this.infoFixed ? this.describedById : undefined}\r\n fixed={this.infoFixed}\r\n active={this.infoActive}\r\n onDsoClose={() => (this.infoActive = false)}\r\n >\r\n <div>\r\n <slot name=\"info\"></slot>\r\n </div>\r\n </dso-info>\r\n )}\r\n <slot name=\"options\" />\r\n </Fragment>\r\n );\r\n }\r\n\r\n componentDidRender(): void {\r\n if (this.input && typeof this.checked === \"boolean\" && this.input.checked !== this.checked) {\r\n this.input.checked = this.checked;\r\n }\r\n }\r\n\r\n private getIdentifier(): string {\r\n return this.identifier ?? this.fallbackIdentifier;\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dso-accordion-section.entry.esm.js","sources":["src/components/accordion/components/accordion-section.interfaces.ts","src/components/accordion/components/accordion-section.scss?tag=dso-accordion-section&encapsulation=shadow","src/components/accordion/components/accordion-section.tsx"],"sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\r\n\r\nexport type AccordionSectionWijzigactie = \"voegtoe\" | \"verwijder\";\r\n\r\nexport const stateMap: Record<AccordionSectionState, string> = {\r\n success: \"succes:\",\r\n info: \"info:\",\r\n warning: \"waarschuwing:\",\r\n danger: \"fout:\",\r\n error: \"fout:\",\r\n};\r\n\r\nexport interface AccordionSectionToggleClickEvent {\r\n /**\r\n * The original MouseEvent that triggered the click.\r\n *\r\n * In case the Section Handle is an <a> this event can be used to preventDefault() so the framework router is reponsible for navigating the user.\r\n */\r\n originalEvent?: MouseEvent;\r\n\r\n /**\r\n * The requested state. If the Accordion Section is closed, `open = true`.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionAnimationStartEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * Whether or not the Accordion opening or closing.\r\n */\r\n animation: \"opening\" | \"closing\";\r\n}\r\n\r\nexport interface AccordionSectionAnimationEndEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * The state of the Accordion Section after animation.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionActiveChangeEvent {\r\n /**\r\n * De current status van de Accordion Section.\r\n */\r\n current: boolean;\r\n\r\n /**\r\n * De desired status van de Accordion Section.\r\n */\r\n next: boolean;\r\n\r\n originalEvent: Event;\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n@use \"~dso-toolkit/src/components/accordion\";\r\n@use \"~dso-toolkit/src/components/link\";\r\n\r\n@use \"accordion-section-theme-compact\";\r\n@use \"accordion-section-theme-compact-black\";\r\n@use \"accordion-section-theme-conclusion\";\r\n@use \"accordion-section-theme-default\";\r\n@use \"accordion-section-theme-neutral\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n:host {\r\n display: block;\r\n\r\n .dso-section-handle {\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n position: relative;\r\n\r\n > a:active {\r\n text-decoration: none;\r\n }\r\n\r\n a {\r\n @include link.clean();\r\n }\r\n\r\n .dso-status {\r\n color: colors.$zwart;\r\n font-size: typography.$font-size-small;\r\n font-weight: 400;\r\n }\r\n }\r\n\r\n .dso-section-handle > button,\r\n .dso-section-handle > a {\r\n align-items: flex-start;\r\n background-color: transparent;\r\n border: 0;\r\n cursor: pointer;\r\n display: flex;\r\n font-family: typography.$font-family-base;\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n padding-block: accordion.$block-padding;\r\n padding-inline: accordion.$inline-padding;\r\n text-align: start;\r\n inline-size: 100%;\r\n overflow-wrap: anywhere;\r\n\r\n dso-icon {\r\n flex-shrink: 0;\r\n\r\n &.dso-section-handle-chevron {\r\n @include utilities.transition(transform);\r\n\r\n transform: rotate(0);\r\n }\r\n }\r\n\r\n > .dso-section-handle-addons:first-child,\r\n > dso-icon:first-child {\r\n margin-inline-end: units.$u1;\r\n }\r\n\r\n > dso-icon:last-child {\r\n margin-inline-start: auto;\r\n }\r\n\r\n > .dso-section-handle-addons:last-child {\r\n margin-inline-start: auto;\r\n\r\n dso-attachments-counter,\r\n dso-icon {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n\r\n > dso-label {\r\n margin-inline-start: auto;\r\n padding-inline-start: units.$u1;\r\n word-break: normal;\r\n\r\n & + dso-icon:last-child,\r\n & + .dso-section-handle-addons:last-child {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n }\r\n}\r\n\r\n:host([open]:not([open=\"false\"])) {\r\n .dso-section-handle {\r\n > button,\r\n > a {\r\n .dso-section-handle-chevron {\r\n &:first-child {\r\n transform: rotate(90deg);\r\n }\r\n\r\n &:last-child {\r\n transform: rotate(-180deg);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.dso-section-body {\r\n background-color: colors.$wit;\r\n border-block-start: 0;\r\n\r\n .dso-section-body-content {\r\n padding-block: units.$u2 + accordion.$border-radius units.$u2;\r\n padding-inline: units.$u2;\r\n }\r\n}\r\n\r\n// Default\r\n:host(.dso-accordion-default) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default();\r\n}\r\n\r\n:host(.dso-accordion-default[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open();\r\n}\r\n\r\n:host(.dso-accordion-default.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open-nested();\r\n}\r\n\r\n// Compact\r\n:host(.dso-accordion-compact) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open-nested();\r\n}\r\n\r\n// Compact black\r\n:host(.dso-accordion-compact-black) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-section-activate) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-activate();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-voegtoe) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-voegtoe();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-verwijder) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-verwijder();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact-black[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open-nested();\r\n}\r\n\r\n// Conclusion\r\n:host(.dso-accordion-conclusion) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion();\r\n}\r\n\r\n:host(.dso-accordion-conclusion[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open();\r\n}\r\n\r\n:host(.dso-accordion-conclusion.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open-nested();\r\n}\r\n\r\n// Neutral\r\n:host(.dso-accordion-neutral) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral();\r\n}\r\n\r\n:host(.dso-accordion-neutral[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open();\r\n}\r\n\r\n:host(.dso-accordion-neutral.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open-nested();\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n FunctionalComponent,\r\n Host,\r\n Method,\r\n Prop,\r\n State,\r\n forceUpdate,\r\n h,\r\n} from \"@stencil/core\";\r\n\r\nimport { DsoSlideToggleCustomEvent } from \"../../../components\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\nimport { LabelStatus } from \"../../label/label.interfaces\";\r\nimport { RenvooiValue } from \"../../renvooi/renvooi.interfaces\";\r\nimport { SlideToggleActiveEvent } from \"../../slide-toggle/slide-toggle.interfaces\";\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\n\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionActiveChangeEvent,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionAnimationStartEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n AccordionSectionWijzigactie,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\n\r\n// eslint-disable-next-line no-console\r\nconst log = (window as any)[\"_dsoLog\"] === true ? console.log.bind(console.log) : function () {};\r\n\r\nconst HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n showSlideToggle: boolean;\r\n active: boolean;\r\n onActiveChange: (e: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => void;\r\n handleElementRef: (element: HTMLAnchorElement | HTMLButtonElement | undefined) => void;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open, showSlideToggle, active, onActiveChange, handleElementRef }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <>\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </a>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </button>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </>\r\n );\r\n};\r\n\r\nconst Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n\r\nconst HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n\r\nconst HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle!: RenvooiValue | RenvooiValue[] | undefined;\r\n\r\n /**\r\n * An optional 'wijzigactie' that signals if the section is added or removed.\r\n */\r\n @Prop()\r\n wijzigactie?: AccordionSectionWijzigactie;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Set when this Accordion Section contains or will contain an Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n hasNestedAccordion = false;\r\n\r\n /**\r\n * The label to be displayed in the heading handle inside a Label (optional)\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The status of the Label in the heading handle (optional)\r\n */\r\n @Prop()\r\n labelStatus?: LabelStatus;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is capable of being activated. When `true` a Slide Toggle displays\r\n * on the right in the heading handle (optional). Works only for `variant` `compact-black` and `reverseAlign` false.\r\n */\r\n @Prop({ reflect: true })\r\n activatable = false;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is `active`. Only applicable when the Accordion Section is\r\n * `activatable`.\r\n */\r\n @Prop({ reflect: true })\r\n active = false;\r\n\r\n /**\r\n * An optional event listener for changes on the value of property `active`.\r\n */\r\n @Event()\r\n dsoActiveChange!: EventEmitter<AccordionSectionActiveChangeEvent>;\r\n\r\n /**\r\n * Calling this method will set focus to the handle.\r\n */\r\n @Method()\r\n async focusHandle() {\r\n this.handleElementRef?.focus();\r\n }\r\n\r\n @State()\r\n hover = false;\r\n\r\n get containsNestedAccordion() {\r\n return this.host.querySelector(\"dso-accordion\") !== null;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined, behavior: ScrollBehavior = \"auto\"): Promise<void> {\r\n log(\r\n `DSO Toolkit [Accordion Section] scrollIntoView(bodyHeight: ${JSON.stringify(\r\n bodyHeight,\r\n )}, behavior: ${JSON.stringify(behavior)})`,\r\n );\r\n\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n log(`DSO Toolkit [Accordion Section] const bodyClientRect = ${JSON.stringify(bodyClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] const headingClientRect = ${JSON.stringify(headingClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] this.accordionState = ${JSON.stringify(this.accordionState)};`);\r\n log(`DSO Toolkit [Accordion Section] this.open = ${JSON.stringify(this.open)};`);\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n log(`DSO Toolkit [Accordion Section] returning`);\r\n\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? (bodyHeight ?? 0) : 0);\r\n\r\n log(`DSO Toolkit [Accordion Section] const sectionBottomY = ${JSON.stringify(sectionBottomY)};`);\r\n log(`DSO Toolkit [Accordion Section] window.innerHeight = ${JSON.stringify(window.innerHeight)};`);\r\n\r\n const box = this.host.getBoundingClientRect();\r\n\r\n const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;\r\n const clientTop = document.documentElement.clientTop || document.body.clientTop || 0;\r\n const top = box.top + scrollTop - clientTop;\r\n\r\n log(\"DSO Toolkit [Accordion Section] scroll\", { box, scrollTop, clientTop, top });\r\n\r\n if (sectionBottomY > window.innerHeight) {\r\n log(\r\n `DSO Toolkit [Accordion Section] sectionBottomY > window.innerHeight === ${JSON.stringify(\r\n sectionBottomY > window.innerHeight,\r\n )};`,\r\n );\r\n\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n log(\r\n `DSO Toolkit [Accordion Section] const expandedAccordionHeight = ${JSON.stringify(expandedAccordionHeight)};`,\r\n );\r\n log(\r\n `DSO Toolkit [Accordion Section] const shouldScrollToTopOfSection = ${JSON.stringify(\r\n shouldScrollToTopOfSection,\r\n )};`,\r\n );\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection ? top : top - (window.innerHeight - expandedAccordionHeight),\r\n behavior,\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n log(\r\n `DSO Toolkit [Accordion Section] headingClientRect.top < 0 === ${JSON.stringify(headingClientRect.top < 0)};`,\r\n );\r\n\r\n window.scrollTo({\r\n top,\r\n behavior,\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleActiveChange = (event: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => {\r\n this.dsoActiveChange.emit({\r\n current: Boolean(this.active),\r\n next: !this.active,\r\n originalEvent: event,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationStart = (e: CustomEvent<any>) => {\r\n this.dsoAnimationStart.emit({\r\n animation: this.open ? \"opening\" : \"closing\",\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section starts its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationStart!: EventEmitter<AccordionSectionAnimationStartEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n private handleElementRef?: HTMLAnchorElement | HTMLButtonElement;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n const showSlideToggle = this.activatable && variant === \"compact-black\" && !reverseAlign;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: !!variant,\r\n \"dso-nested-accordion\": this.hasNestedAccordion || this.containsNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n [\"dso-accordion-wijzigactie-\" + this.wijzigactie]: !!this.wijzigactie,\r\n \"dso-accordion-section-activate\": showSlideToggle,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement\r\n handleUrl={this.handleUrl}\r\n onClick={this.handleClick}\r\n open={this.open}\r\n showSlideToggle={showSlideToggle}\r\n active={this.active}\r\n onActiveChange={this.handleActiveChange}\r\n handleElementRef={(e) => (this.handleElementRef = e)}\r\n >\r\n {reverseAlign ? (\r\n <Fragment>\r\n {this.icon && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </div>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n <span>\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationStart={this.handleExpandableAnimationStart}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAMO,MAAM,QAAQ,GAA0C;AAC7D,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,KAAK,EAAE,OAAO;CACf;;ACZD,MAAM,mBAAmB,GAAG,w6jBAAw6jB;;ACkCp8jB;AACA,MAAM,GAAG,GAAI,MAAc,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,YAAa,GAAC;AAEhG,MAAM,aAAa,GAQd,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,EAAE,QAAQ,KAAI;IACzG,IAAI,SAAS,EAAE;AACb,QAAA,QACE,CAAA,CAAA,QAAA,EAAA,IAAA,EACE,CAAG,CAAA,GAAA,EAAA,EAAA,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAiB,eAAA,EAAA,IAAI,GAAG,MAAM,GAAG,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAChG,EAAA,QAAQ,CACP,EACH,eAAe,KACd,CAAA,CAAA,kBAAA,EAAA,EAAkB,eAAe,EAAC,eAAe,EAAC,OAAO,E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OAAO,MAAM,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,EAAA,EAClF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,CACS,CACZ;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dso-accordion-section.entry.esm.js","sources":["src/components/accordion/components/accordion-section.interfaces.ts","src/components/accordion/components/accordion-section.scss?tag=dso-accordion-section&encapsulation=shadow","src/components/accordion/components/accordion-section.tsx"],"sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\r\n\r\nexport type AccordionSectionWijzigactie = \"voegtoe\" | \"verwijder\";\r\n\r\nexport const stateMap: Record<AccordionSectionState, string> = {\r\n success: \"succes:\",\r\n info: \"info:\",\r\n warning: \"waarschuwing:\",\r\n danger: \"fout:\",\r\n error: \"fout:\",\r\n};\r\n\r\nexport interface AccordionSectionToggleClickEvent {\r\n /**\r\n * The original MouseEvent that triggered the click.\r\n *\r\n * In case the Section Handle is an <a> this event can be used to preventDefault() so the framework router is reponsible for navigating the user.\r\n */\r\n originalEvent?: MouseEvent;\r\n\r\n /**\r\n * The requested state. If the Accordion Section is closed, `open = true`.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionAnimationStartEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * Whether or not the Accordion opening or closing.\r\n */\r\n animation: \"opening\" | \"closing\";\r\n}\r\n\r\nexport interface AccordionSectionAnimationEndEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * The state of the Accordion Section after animation.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionActiveChangeEvent {\r\n /**\r\n * De current status van de Accordion Section.\r\n */\r\n current: boolean;\r\n\r\n /**\r\n * De desired status van de Accordion Section.\r\n */\r\n next: boolean;\r\n\r\n originalEvent: Event;\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n@use \"~dso-toolkit/src/components/link\";\r\n\r\n@use \"../accordion.variables\" as accordion-variables;\r\n\r\n@use \"accordion-section-theme-compact\";\r\n@use \"accordion-section-theme-compact-black\";\r\n@use \"accordion-section-theme-conclusion\";\r\n@use \"accordion-section-theme-default\";\r\n@use \"accordion-section-theme-neutral\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n:host {\r\n display: block;\r\n --_dso-accordion-margin-block-end: 0;\r\n\r\n .dso-section-handle {\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion-variables.$handle-line-height;\r\n margin: 0;\r\n position: relative;\r\n\r\n > a:active {\r\n text-decoration: none;\r\n }\r\n\r\n a {\r\n @include link.clean();\r\n }\r\n\r\n .dso-status {\r\n color: colors.$zwart;\r\n font-size: typography.$font-size-small;\r\n font-weight: 400;\r\n }\r\n }\r\n\r\n .dso-section-handle > button,\r\n .dso-section-handle > a {\r\n align-items: flex-start;\r\n background-color: transparent;\r\n border: 0;\r\n cursor: pointer;\r\n display: flex;\r\n font-family: typography.$font-family-base;\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion-variables.$handle-line-height;\r\n margin: 0;\r\n padding-block: accordion-variables.$block-padding;\r\n padding-inline: accordion-variables.$inline-padding;\r\n text-align: start;\r\n inline-size: 100%;\r\n overflow-wrap: anywhere;\r\n\r\n dso-icon {\r\n flex-shrink: 0;\r\n\r\n &.dso-section-handle-chevron {\r\n @include utilities.transition(transform);\r\n\r\n transform: rotate(0);\r\n }\r\n }\r\n\r\n > .dso-section-handle-addons:first-child,\r\n > dso-icon:first-child {\r\n margin-inline-end: units.$u1;\r\n }\r\n\r\n > dso-icon:last-child {\r\n margin-inline-start: auto;\r\n }\r\n\r\n > .dso-section-handle-addons:last-child {\r\n margin-inline-start: auto;\r\n\r\n dso-attachments-counter,\r\n dso-icon {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n\r\n > dso-label {\r\n margin-inline-start: auto;\r\n padding-inline-start: units.$u1;\r\n word-break: normal;\r\n\r\n & + dso-icon:last-child,\r\n & + .dso-section-handle-addons:last-child {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n }\r\n}\r\n\r\n:host([open]:not([open=\"false\"])) {\r\n .dso-section-handle {\r\n > button,\r\n > a {\r\n .dso-section-handle-chevron {\r\n &:first-child {\r\n transform: rotate(90deg);\r\n }\r\n\r\n &:last-child {\r\n transform: rotate(-180deg);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.dso-section-body {\r\n background-color: colors.$wit;\r\n border-block-start: 0;\r\n\r\n .dso-section-body-content {\r\n padding-block: units.$u2 + accordion-variables.$border-radius units.$u2;\r\n padding-inline: units.$u2;\r\n }\r\n}\r\n\r\n// Default\r\n:host(.dso-accordion-default) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default();\r\n}\r\n\r\n:host(.dso-accordion-default[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open();\r\n}\r\n\r\n:host(.dso-accordion-default.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open-nested();\r\n}\r\n\r\n// Compact\r\n:host(.dso-accordion-compact) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open-nested();\r\n}\r\n\r\n// Compact black\r\n:host(.dso-accordion-compact-black) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-section-activate) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-activate();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-voegtoe) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-voegtoe();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-verwijder) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-verwijder();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact-black[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open-nested();\r\n}\r\n\r\n// Conclusion\r\n:host(.dso-accordion-conclusion) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion();\r\n}\r\n\r\n:host(.dso-accordion-conclusion[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open();\r\n}\r\n\r\n:host(.dso-accordion-conclusion.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open-nested();\r\n}\r\n\r\n// Neutral\r\n:host(.dso-accordion-neutral) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral();\r\n}\r\n\r\n:host(.dso-accordion-neutral[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open();\r\n}\r\n\r\n:host(.dso-accordion-neutral.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open-nested();\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n FunctionalComponent,\r\n Host,\r\n Method,\r\n Prop,\r\n State,\r\n forceUpdate,\r\n h,\r\n} from \"@stencil/core\";\r\n\r\nimport { DsoSlideToggleCustomEvent } from \"../../../components\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\nimport { LabelStatus } from \"../../label/label.interfaces\";\r\nimport { RenvooiValue } from \"../../renvooi/renvooi.interfaces\";\r\nimport { SlideToggleActiveEvent } from \"../../slide-toggle/slide-toggle.interfaces\";\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\n\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionActiveChangeEvent,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionAnimationStartEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n AccordionSectionWijzigactie,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\n\r\n// eslint-disable-next-line no-console\r\nconst log = (window as any)[\"_dsoLog\"] === true ? console.log.bind(console.log) : function () {};\r\n\r\nconst HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n showSlideToggle: boolean;\r\n active: boolean;\r\n onActiveChange: (e: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => void;\r\n handleElementRef: (element: HTMLAnchorElement | HTMLButtonElement | undefined) => void;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open, showSlideToggle, active, onActiveChange, handleElementRef }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <Fragment>\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </a>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </button>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </Fragment>\r\n );\r\n};\r\n\r\nconst Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n\r\nconst HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n\r\nconst HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle!: RenvooiValue | RenvooiValue[] | undefined;\r\n\r\n /**\r\n * An optional 'wijzigactie' that signals if the section is added or removed.\r\n */\r\n @Prop()\r\n wijzigactie?: AccordionSectionWijzigactie;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Set when this Accordion Section contains or will contain an Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n hasNestedAccordion = false;\r\n\r\n /**\r\n * The label to be displayed in the heading handle inside a Label (optional)\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The status of the Label in the heading handle (optional)\r\n */\r\n @Prop()\r\n labelStatus?: LabelStatus;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is capable of being activated. When `true` a Slide Toggle displays\r\n * on the right in the heading handle (optional). Works only for `variant` `compact-black` and `reverseAlign` false.\r\n */\r\n @Prop({ reflect: true })\r\n activatable = false;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is `active`. Only applicable when the Accordion Section is\r\n * `activatable`.\r\n */\r\n @Prop({ reflect: true })\r\n active = false;\r\n\r\n /**\r\n * An optional event listener for changes on the value of property `active`.\r\n */\r\n @Event()\r\n dsoActiveChange!: EventEmitter<AccordionSectionActiveChangeEvent>;\r\n\r\n /**\r\n * Calling this method will set focus to the handle.\r\n */\r\n @Method()\r\n async focusHandle() {\r\n this.handleElementRef?.focus();\r\n }\r\n\r\n @State()\r\n hover = false;\r\n\r\n get containsNestedAccordion() {\r\n return this.host.querySelector(\"dso-accordion\") !== null;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined, behavior: ScrollBehavior = \"auto\"): Promise<void> {\r\n log(\r\n `DSO Toolkit [Accordion Section] scrollIntoView(bodyHeight: ${JSON.stringify(\r\n bodyHeight,\r\n )}, behavior: ${JSON.stringify(behavior)})`,\r\n );\r\n\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n log(`DSO Toolkit [Accordion Section] const bodyClientRect = ${JSON.stringify(bodyClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] const headingClientRect = ${JSON.stringify(headingClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] this.accordionState = ${JSON.stringify(this.accordionState)};`);\r\n log(`DSO Toolkit [Accordion Section] this.open = ${JSON.stringify(this.open)};`);\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n log(`DSO Toolkit [Accordion Section] returning`);\r\n\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? (bodyHeight ?? 0) : 0);\r\n\r\n log(`DSO Toolkit [Accordion Section] const sectionBottomY = ${JSON.stringify(sectionBottomY)};`);\r\n log(`DSO Toolkit [Accordion Section] window.innerHeight = ${JSON.stringify(window.innerHeight)};`);\r\n\r\n const box = this.host.getBoundingClientRect();\r\n\r\n const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;\r\n const clientTop = document.documentElement.clientTop || document.body.clientTop || 0;\r\n const top = box.top + scrollTop - clientTop;\r\n\r\n log(\"DSO Toolkit [Accordion Section] scroll\", { box, scrollTop, clientTop, top });\r\n\r\n if (sectionBottomY > window.innerHeight) {\r\n log(\r\n `DSO Toolkit [Accordion Section] sectionBottomY > window.innerHeight === ${JSON.stringify(\r\n sectionBottomY > window.innerHeight,\r\n )};`,\r\n );\r\n\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n log(\r\n `DSO Toolkit [Accordion Section] const expandedAccordionHeight = ${JSON.stringify(expandedAccordionHeight)};`,\r\n );\r\n log(\r\n `DSO Toolkit [Accordion Section] const shouldScrollToTopOfSection = ${JSON.stringify(\r\n shouldScrollToTopOfSection,\r\n )};`,\r\n );\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection ? top : top - (window.innerHeight - expandedAccordionHeight),\r\n behavior,\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n log(\r\n `DSO Toolkit [Accordion Section] headingClientRect.top < 0 === ${JSON.stringify(headingClientRect.top < 0)};`,\r\n );\r\n\r\n window.scrollTo({\r\n top,\r\n behavior,\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleActiveChange = (event: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => {\r\n this.dsoActiveChange.emit({\r\n current: Boolean(this.active),\r\n next: !this.active,\r\n originalEvent: event,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationStart = (e: CustomEvent<any>) => {\r\n this.dsoAnimationStart.emit({\r\n animation: this.open ? \"opening\" : \"closing\",\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section starts its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationStart!: EventEmitter<AccordionSectionAnimationStartEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n private handleElementRef?: HTMLAnchorElement | HTMLButtonElement;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n const showSlideToggle = this.activatable && variant === \"compact-black\" && !reverseAlign;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: !!variant,\r\n \"dso-nested-accordion\": this.hasNestedAccordion || this.containsNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n [\"dso-accordion-wijzigactie-\" + this.wijzigactie]: !!this.wijzigactie,\r\n \"dso-accordion-section-activate\": showSlideToggle,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement\r\n handleUrl={this.handleUrl}\r\n onClick={this.handleClick}\r\n open={this.open}\r\n showSlideToggle={showSlideToggle}\r\n active={this.active}\r\n onActiveChange={this.handleActiveChange}\r\n handleElementRef={(e) => (this.handleElementRef = e)}\r\n >\r\n {reverseAlign ? (\r\n <Fragment>\r\n {this.icon && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </div>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n <span>\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationStart={this.handleExpandableAnimationStart}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAMO,MAAM,QAAQ,GAA0C;AAC7D,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,KAAK,EAAE,OAAO;CACf;;ACZD,MAAM,mBAAmB,GAAG,48jBAA48jB;;ACkCx+jB;AACA,MAAM,GAAG,GAAI,MAAc,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,YAAa,GAAC;AAEhG,MAAM,aAAa,GAQd,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,EAAE,QAAQ,KAAI;IACzG,IAAI,SAAS,EAAE;AACb,QAAA,QACE,EAAC,QAAQ,EAAA,I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AA,EAAA,aAAa,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,CAAC,EACrC,6BAA6B,EAAE,IAAI,CAAC,8BAA8B,EAClE,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAAA,EAE9D,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,0BAA0B,EAAC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,EAAA,EAClF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,CACS,CACZ;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dso-accordion.entry.esm.js","sources":["../../node_modules/@stencil/store/dist/index.js","src/components/accordion/accordion.scss?tag=dso-accordion&encapsulation=shadow","src/components/accordion/accordion.tsx"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n // Track onChange listeners to enable removeListener functionality\n const changeListeners = new Map();\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const setHandler = (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n };\n const resetHandler = () => cb(unwrap(defaultState)[propName]);\n // Register the handlers\n const unSet = on('set', setHandler);\n const unReset = on('reset', resetHandler);\n // Track the relationship between the user callback and internal handlers\n changeListeners.set(cb, { setHandler, resetHandler, propName });\n return () => {\n unSet();\n unReset();\n changeListeners.delete(cb);\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n const removeListener = (propName, listener) => {\n const listenerInfo = changeListeners.get(listener);\n if (listenerInfo && listenerInfo.propName === propName) {\n // Remove the specific handlers that were created for this listener\n removeFromArray(handlers.set, listenerInfo.setHandler);\n removeFromArray(handlers.reset, listenerInfo.resetHandler);\n changeListeners.delete(listener);\n }\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n removeListener,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n","import { Component, ComponentInterface, Element, Host, Method, Prop, h } from \"@stencil/core\";\r\nimport { createStore } from \"@stencil/store\";\r\n\r\nimport { AccordionInternalState, AccordionVariant } from \"./accordion.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-accordion\",\r\n styleUrl: \"accordion.scss\",\r\n shadow: true,\r\n})\r\nexport class Accordion implements ComponentInterface {\r\n private readonly accordionState: AccordionInternalState;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionElement;\r\n\r\n constructor() {\r\n const { state } = createStore<AccordionInternalState>({\r\n variant: \"default\",\r\n reverseAlign: false,\r\n });\r\n\r\n this.accordionState = state;\r\n }\r\n\r\n /**\r\n * The variant of the Accordion.\r\n */\r\n @Prop()\r\n get variant(): AccordionVariant {\r\n return this.accordionState.variant;\r\n }\r\n set variant(value: AccordionVariant) {\r\n this.accordionState.variant = value || \"default\";\r\n }\r\n\r\n /**\r\n * Places the chevron at the opposite side.\r\n *\r\n * Note: this mode does not display `state`, `attachmentCount` or `status` props on Accordion Sections\r\n */\r\n @Prop()\r\n get reverseAlign() {\r\n return this.accordionState.reverseAlign;\r\n }\r\n set reverseAlign(value: boolean) {\r\n this.accordionState.reverseAlign = value || false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _getState(): Promise<AccordionInternalState> {\r\n return this.accordionState;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class=\"dso-accordion\">\r\n <slot></slot>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB;AACA,CAAC;AACD,MAAM,QAAQ,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AMpB,IAAA,WAAA,CAAA,OAAA,EAAA;;AACE,QAAA,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,CAAyB;AACpD,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,YAAY,EAAE,KAAK;AACpB,SAAA,CAAC;AAEF,QAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC5B;AAED;;AAEG;AACH,IAAA,IACI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO;;IAEpC,IAAI,OAAO,CAAC,KAAuB,EAAA;QACjC,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,KAAK,IAAI,SAAS;;AAGlD;;;;AAIG;AACH,IAAA,IACI,YAAY,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY;;IAEzC,IAAI,YAAY,CAAC,KAAc,EAAA;QAC7B,IAAI,CAAC,cAAc,CAAC,YAAY,GAAG,KAAK,IAAI,KAAK;;AAGnD;;AAEG;AAEH,IAAA,MAAM,SAAS,GAAA;QACb,OAAO,IAAI,CAAC,cAAc;;IAG5B,MAAM,GAAA;QACJ,QACE,CAAC,CAAA,IAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACzB,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"dso-accordion.entry.esm.js","sources":["../../node_modules/@stencil/store/dist/index.js","src/components/accordion/accordion.scss?tag=dso-accordion&encapsulation=shadow","src/components/accordion/accordion.tsx"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n // Track onChange listeners to enable removeListener functionality\n const changeListeners = new Map();\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const setHandler = (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n };\n const resetHandler = () => cb(unwrap(defaultState)[propName]);\n // Register the handlers\n const unSet = on('set', setHandler);\n const unReset = on('reset', resetHandler);\n // Track the relationship between the user callback and internal handlers\n changeListeners.set(cb, { setHandler, resetHandler, propName });\n return () => {\n unSet();\n unReset();\n changeListeners.delete(cb);\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n const removeListener = (propName, listener) => {\n const listenerInfo = changeListeners.get(listener);\n if (listenerInfo && listenerInfo.propName === propName) {\n // Remove the specific handlers that were created for this listener\n removeFromArray(handlers.set, listenerInfo.setHandler);\n removeFromArray(handlers.reset, listenerInfo.resetHandler);\n changeListeners.delete(listener);\n }\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n removeListener,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n\r\n@use \"accordion.variables\" as accordion-variables;\r\n\r\n:host {\r\n display: block;\r\n margin-block-end: var(--_dso-accordion-margin-block-end, units.$block-spacing-xlarge);\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n::slotted(dso-accordion-section:not(:first-child, .dso-accordion-compact, .dso-accordion-compact-black)) {\r\n margin-block-start: units.$u1 * 0.5;\r\n}\r\n\r\n::slotted(dso-accordion-section.dso-accordion-compact:last-child),\r\n::slotted(dso-accordion-section.dso-accordion-compact-black:last-child) {\r\n border-block-end: 1px solid accordion-variables.$compact-border-color;\r\n}\r\n","import { Component, ComponentInterface, Element, Host, Method, Prop, h } from \"@stencil/core\";\r\nimport { createStore } from \"@stencil/store\";\r\n\r\nimport { AccordionInternalState, AccordionVariant } from \"./accordion.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-accordion\",\r\n styleUrl: \"accordion.scss\",\r\n shadow: true,\r\n})\r\nexport class Accordion implements ComponentInterface {\r\n private readonly accordionState: AccordionInternalState;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionElement;\r\n\r\n constructor() {\r\n const { state } = createStore<AccordionInternalState>({\r\n variant: \"default\",\r\n reverseAlign: false,\r\n });\r\n\r\n this.accordionState = state;\r\n }\r\n\r\n /**\r\n * The variant of the Accordion.\r\n */\r\n @Prop()\r\n get variant(): AccordionVariant {\r\n return this.accordionState.variant;\r\n }\r\n set variant(value: AccordionVariant) {\r\n this.accordionState.variant = value || \"default\";\r\n }\r\n\r\n /**\r\n * Places the chevron at the opposite side.\r\n *\r\n * Note: this mode does not display `state`, `attachmentCount` or `status` props on Accordion Sections\r\n */\r\n @Prop()\r\n get reverseAlign() {\r\n return this.accordionState.reverseAlign;\r\n }\r\n set reverseAlign(value: boolean) {\r\n this.accordionState.reverseAlign = value || false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _getState(): Promise<AccordionInternalState> {\r\n return this.accordionState;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <slot></slot>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB;AACA,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS;AACjB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC;AACnC;AACA,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAAS,GAAG,CAAC;AACzB,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC;AACvB,SAAS,EAAE,EAAE,CAAC;AACd,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,CAAC,YAAY,KAAK,EAAE,aAAa,IAAI,YAAY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