@dso-toolkit/core 56.0.0 → 56.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-alert_5.cjs.entry.js +32 -30
- package/dist/cjs/dso-alert_5.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-expandable.cjs.entry.js +1 -1
- package/dist/cjs/dso-expandable.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion.interfaces.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.css +31 -31
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.js +3 -3
- package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
- package/dist/collection/components/annotation-button/annotation-button.js +1 -1
- package/dist/collection/components/annotation-output/annotation-output.js +1 -1
- package/dist/collection/components/expandable/expandable.js +2 -2
- package/dist/collection/components/expandable/expandable.js.map +1 -1
- package/dist/collection/components/label/label.js +42 -33
- package/dist/collection/components/label/label.js.map +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
- package/dist/components/dso-accordion-section.js +1 -1
- package/dist/components/dso-accordion-section.js.map +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/dso-viewer-grid.js.map +1 -1
- package/dist/components/expandable.js +1 -1
- package/dist/components/expandable.js.map +1 -1
- package/dist/components/label.js +33 -31
- package/dist/components/label.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/p-021589dc.entry.js +2 -0
- package/dist/dso-toolkit/p-021589dc.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-39f6447d.entry.js → p-88f4366e.entry.js} +2 -2
- package/dist/dso-toolkit/p-88f4366e.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-1cc75e0b.entry.js → p-d4320890.entry.js} +2 -2
- package/dist/dso-toolkit/{p-1cc75e0b.entry.js.map → p-d4320890.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-ec4b568d.entry.js → p-f56c1b28.entry.js} +2 -2
- package/dist/dso-toolkit/{p-ec4b568d.entry.js.map → p-f56c1b28.entry.js.map} +1 -1
- package/dist/esm/dso-accordion-section.entry.js +1 -1
- package/dist/esm/dso-accordion-section.entry.js.map +1 -1
- package/dist/esm/dso-alert_5.entry.js +32 -30
- package/dist/esm/dso-alert_5.entry.js.map +1 -1
- package/dist/esm/dso-expandable.entry.js +1 -1
- package/dist/esm/dso-expandable.entry.js.map +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/accordion/accordion.interfaces.d.ts +0 -22
- package/dist/types/components/accordion/components/accordion-section.d.ts +1 -2
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +22 -0
- package/dist/types/components/label/label.d.ts +9 -9
- package/dist/types/components.d.ts +4 -4
- package/package.json +2 -2
- package/dist/dso-toolkit/p-39f6447d.entry.js.map +0 -1
- package/dist/dso-toolkit/p-484ea1d2.entry.js +0 -2
- package/dist/dso-toolkit/p-484ea1d2.entry.js.map +0 -1
|
@@ -135,7 +135,7 @@ const ViewerGrid = class {
|
|
|
135
135
|
this.dsoFilterpanelCancel.emit({ originalEvent: mouseEvent });
|
|
136
136
|
}
|
|
137
137
|
render() {
|
|
138
|
-
return (index.h(index.Host, Object.assign({}, { [this.mainSize]: true }), index.h("div", { class: "dso-map-panel", ref: (element) => (this.mapPanel = element) }, index.h("div", { class: "sizing-buttons" }, index.h("span", { class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }, "
|
|
138
|
+
return (index.h(index.Host, Object.assign({}, { [this.mainSize]: true }), index.h("div", { class: "dso-map-panel", ref: (element) => (this.mapPanel = element) }, index.h("div", { class: "sizing-buttons" }, index.h("span", { class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }, "Breedte tekstpaneel: ", this.sizeLabelMap[this.mainSize]), index.h("button", { type: "button", class: "shrink", disabled: this.mainSize === "small", onClick: this.shrinkMain }, index.h("span", { class: "sr-only" }, "Tekstpaneel smaller maken"), index.h("dso-icon", { icon: "chevron-left" })), index.h("button", { type: "button", class: "expand", disabled: this.mainSize === "large", onClick: this.expandMain }, index.h("span", { class: "sr-only" }, "Tekstpaneel breder maken"), index.h("dso-icon", { icon: "chevron-right" }))), index.h("div", { class: "main" }, index.h("slot", { name: "main" }))), index.h("div", { id: "filterpanel", class: "filterpanel", hidden: !this.filterpanelOpen || !this.filterpanelSlot, ref: (element) => (this.filterpanel = element) }, index.h("h1", null, "Uw keuzes"), index.h(ViewerGridFilterpanelButtons, { onApply: (e) => this.handleFilterpanelApply(e), onCancel: (e) => this.handleFilterpanelCancel(e) }), index.h("slot", { name: "filterpanel" }), index.h(ViewerGridFilterpanelButtons, { onApply: (e) => this.handleFilterpanelApply(e), onCancel: (e) => this.handleFilterpanelCancel(e) })), index.h("div", { class: "map" }, index.h("slot", { name: "map" })), index.h("div", { hidden: !this.overlayOpen || !this.overlaySlot, class: "dimscreen" }), index.h("div", { class: "overlay", hidden: !this.overlayOpen || !this.overlaySlot, ref: (element) => (this.overlay = element) }, index.h("button", { type: "button", class: "overlay-close-button", onClick: (e) => this.dsoCloseOverlay.emit(e) }, index.h("dso-icon", { icon: "times" }), index.h("span", { class: "sr-only" }, "sluiten")), index.h("slot", { name: "overlay" }), index.h("button", { "aria-hidden": "true", type: "button", class: "overlay-close-button", style: { zIndex: "-100" } }, index.h("dso-icon", { icon: "times" }), index.h("span", { class: "sr-only" }, "sluiten")))));
|
|
139
139
|
}
|
|
140
140
|
get host() { return index.getElement(this); }
|
|
141
141
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-viewer-grid.entry.cjs.js","mappings":";;;;;;;;AAOO,MAAM,4BAA4B,GAAoD,CAAC,EAC5F,OAAO,EACP,QAAQ,GACT,MACCA,iBAAK,KAAK,EAAC,qBAAqB;EAC9BA,oBAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,eAAe,EAAC,OAAO,EAAE,QAAQ;IAC3DA,kCAAsB,CACf;EACTA,oBAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,OAAO;IACzDA,kCAAsB;IACtBA,sBAAU,IAAI,EAAC,eAAe,GAAY,CACnC,CACL,CACP;;ACpBD,MAAM,aAAa,GAAG,un4BAAun4B;;MCUho4B,UAAU;;;;;;;IACb,iBAAY,GAAiB;MACnC,KAAK,EAAE,MAAM;MACb,MAAM,EAAE,QAAQ;MAChB,KAAK,EAAE,OAAO;KACf,CAAC;IAwDM,oBAAe,GAAuB,IAAI,CAAC;IAM3C,gBAAW,GAA0B,IAAI,CAAC;IA2B1C,eAAU,GAAG;MACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;KAChE,CAAC;IAEM,eAAU,GAAG;MACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;KAChE,CAAC;IA4BM,oBAAe,GAAG,CAAC,KAAoB;MAC7C,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;QAC1B,OAAO;OACR;MAED,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,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Ae,CAAC,IAAI,CAAC,CAAC,CAAC,IAC7FA,sBAAU,IAAI,EAAC,OAAO,GAAY,EAClCA,kBAAM,KAAK,EAAC,SAAS,cAAe,CAC7B,EACTA,kBAAM,IAAI,EAAC,SAAS,GAAG,EAEvBA,mCAAoB,MAAM,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,sBAAsB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAC7FA,sBAAU,IAAI,EAAC,OAAO,GAAY,EAClCA,kBAAM,KAAK,EAAC,SAAS,cAAe,CAC7B,CACL,CACD,EACP;GACH;;;;;;;;;;","names":["h","createFocusTrap","Host"],"sources":["./src/components/viewer-grid/viewer-grid-filterpanel-buttons.tsx","./src/components/viewer-grid/viewer-grid.scss?tag=dso-viewer-grid&encapsulation=shadow","./src/components/viewer-grid/viewer-grid.tsx"],"sourcesContent":["import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nexport interface ViewerGridFilterpanelProps {\r\n onApply: (mouseEvent: MouseEvent) => void;\r\n onCancel: (mouseEvent: MouseEvent) => void;\r\n}\r\n\r\nexport const ViewerGridFilterpanelButtons: FunctionalComponent<ViewerGridFilterpanelProps> = ({\r\n onApply,\r\n onCancel,\r\n}) => (\r\n <div class=\"filterpanel-buttons\">\r\n <button type=\"button\" class=\"cancel-button\" onClick={onCancel}>\r\n <span>Annuleren</span>\r\n </button>\r\n <button type=\"button\" class=\"apply-button\" onClick={onApply}>\r\n <span>Toepassen</span>\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </button>\r\n </div>\r\n);\r\n","@use \"~dso-toolkit/src/components/grid\" as css-grid;\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/zindex\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/headings\";\r\n\r\n@use \"viewer-grid.variables\" as core-viewer-grid-variables;\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: flex;\r\n height: 100vh;\r\n overflow: hidden;\r\n position: relative;\r\n}\r\n\r\n:host([small]) {\r\n .dso-map-panel {\r\n flex-basis: core-viewer-grid-variables.$small;\r\n min-width: 0;\r\n max-width: core-viewer-grid-variables.$small;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$small) {\r\n flex-basis: 100vw;\r\n max-width: 100vw;\r\n min-width: 0;\r\n transition: none;\r\n }\r\n }\r\n}\r\n\r\n:host([medium]) {\r\n .dso-map-panel {\r\n flex-basis: core-viewer-grid-variables.$medium;\r\n min-width: core-viewer-grid-variables.$small;\r\n max-width: core-viewer-grid-variables.$medium;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$medium) {\r\n flex-basis: 100vw;\r\n max-width: 100vw;\r\n min-width: core-viewer-grid-variables.$small;\r\n transition: none;\r\n }\r\n }\r\n}\r\n\r\n:host([large]) {\r\n .dso-map-panel {\r\n flex-basis: core-viewer-grid-variables.$large;\r\n min-width: core-viewer-grid-variables.$large-min;\r\n max-width: core-viewer-grid-variables.$large-max;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$large-min) {\r\n flex-basis: 100vw;\r\n max-width: 100vw;\r\n min-width: core-viewer-grid-variables.$large-min;\r\n transition: none;\r\n }\r\n }\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.shrink,\r\n.expand,\r\n.overlay-close-button {\r\n @include button.tertiary($modifiers: false);\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n\r\n &[disabled] {\r\n display: none;\r\n }\r\n}\r\n\r\n.overlay-close-button {\r\n position: absolute;\r\n top: units.$u1;\r\n right: css-grid.$grid-gutter-width * 0.5;\r\n}\r\n\r\n.dso-map-panel {\r\n background-color: colors.$wit;\r\n box-shadow: units.$u1 * 0.25 0 units.$u1 0 rgba(0, 0, 0, 0.4);\r\n flex-shrink: 0;\r\n flex-grow: 0;\r\n padding-right: units.$u1;\r\n position: relative;\r\n transition: flex-basis core-viewer-grid-variables.$transition-time ease-in,\r\n max-width core-viewer-grid-variables.$transition-time ease-in,\r\n min-width core-viewer-grid-variables.$transition-time ease-in;\r\n z-index: zindex.$viewer-grid-map-panel;\r\n\r\n .dso-filterblok-address {\r\n font-weight: bold;\r\n margin: units.$u1 0;\r\n }\r\n\r\n .main {\r\n height: 100%;\r\n overflow-y: scroll;\r\n padding: 0 css-grid.$grid-gutter-width * 0.5 units.$u1;\r\n }\r\n}\r\n\r\n.sizing-buttons {\r\n left: calc(100% + 1px);\r\n overflow-x: hidden;\r\n padding: 0 units.$u1 * 0.5 units.$u1 * 0.5 0;\r\n position: absolute;\r\n top: core-viewer-grid-variables.$sizing-buttons-top;\r\n transition: left core-viewer-grid-variables.$transition-time ease-in;\r\n width: core-viewer-grid-variables.$resize-button-size + units.$u1 * 0.5;\r\n z-index: zindex.$viewer-grid-sizing-buttons;\r\n\r\n button {\r\n @include button.secondary($modifiers: false, $icon-only: true);\r\n @include button.map-focus();\r\n\r\n border: 0;\r\n padding: 8px;\r\n border-radius: 0;\r\n border-bottom-right-radius: 4px;\r\n border-top-right-radius: 4px;\r\n box-shadow: 0 1px units.$u1 * 0.5 0 rgba(0, 0, 0, 0.4);\r\n flex: 0 0 100%;\r\n height: core-viewer-grid-variables.$resize-button-size;\r\n min-width: auto;\r\n width: core-viewer-grid-variables.$resize-button-size;\r\n\r\n &:hover {\r\n dso-icon {\r\n color: colors.$wit;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.map {\r\n height: 100%;\r\n width: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.filterpanel,\r\n.overlay {\r\n background-color: colors.$wit;\r\n height: 100%;\r\n overflow-y: auto;\r\n position: absolute;\r\n z-index: zindex.$viewer-grid-map-panel + 1;\r\n}\r\n\r\n.filterpanel {\r\n box-shadow: 2px 0 5px colors.$grijs-60;\r\n padding: units.$u1 css-grid.$grid-gutter-width * 0.5;\r\n left: 0;\r\n max-width: core-viewer-grid-variables.$filterpanel-max-width;\r\n width: calc(100vw - 40px);\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$filterpanel-width) {\r\n width: 100vw;\r\n\r\n &::before {\r\n display: none !important;\r\n }\r\n }\r\n\r\n h1 {\r\n @include headings.base();\r\n @include headings.margin-large();\r\n @include headings.h1();\r\n }\r\n\r\n &::before {\r\n content: \"\";\r\n display: block;\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n left: core-viewer-grid-variables.$filterpanel-max-width;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n\r\n @media screen and (max-width: #{core-viewer-grid-variables.$filterpanel-max-width + 40px}) {\r\n left: auto;\r\n width: 40px;\r\n }\r\n }\r\n}\r\n\r\n.overlay {\r\n box-shadow: -2px 0 5px colors.$grijs-60;\r\n padding: units.$u5 css-grid.$grid-gutter-width * 0.5 units.$u1;\r\n right: 0;\r\n width: core-viewer-grid-variables.$overlay-width;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$overlay-width) {\r\n width: 100vw;\r\n }\r\n}\r\n\r\n.dimscreen {\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: core-viewer-grid-variables.$overlay-width;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n z-index: zindex.$viewer-grid-map-panel + 2;\r\n}\r\n\r\n.filterpanel-buttons {\r\n text-align: right;\r\n\r\n .cancel-button {\r\n @include button.secondary($modifiers: false);\r\n @include button.small();\r\n }\r\n\r\n .apply-button {\r\n @include button.primary($modifiers: false);\r\n @include button.small();\r\n }\r\n\r\n .cancel-button + .apply-button {\r\n margin-left: units.$u2;\r\n }\r\n}\r\n","import { h, Component, Prop, State, Host, Element, Event, EventEmitter, Watch } from \"@stencil/core\";\r\nimport { FocusTrap, createFocusTrap } from \"focus-trap\";\r\nimport { ViewerGridFilterpanelButtons } from \"./viewer-grid-filterpanel-buttons\";\r\nimport { FilterpanelEvent, LabelSizeMap, MainSize, ViewerGridChangeSizeEvent } from \"./viewer-grid.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-viewer-grid\",\r\n styleUrl: \"viewer-grid.scss\",\r\n shadow: true,\r\n})\r\nexport class ViewerGrid {\r\n private sizeLabelMap: LabelSizeMap = {\r\n small: \"smal\",\r\n medium: \"middel\",\r\n large: \"breed\",\r\n };\r\n\r\n private mapPanel?: HTMLDivElement;\r\n\r\n /**\r\n * Set to true when filterpanel should show.\r\n */\r\n @Prop({ reflect: true })\r\n filterpanelOpen = false;\r\n\r\n /**\r\n * Set to true when overlay should show.\r\n */\r\n @Prop({ reflect: true })\r\n overlayOpen = false;\r\n\r\n /**\r\n * Size of the main content panel when component loads. Changing this attribute afterwards has no effect.\r\n *\r\n * Default size is `large`.\r\n */\r\n @Prop()\r\n initialMainSize?: MainSize;\r\n\r\n @State()\r\n mainSize: MainSize = \"large\";\r\n\r\n /**\r\n * Emitted when user wants to close the overlay.\r\n */\r\n @Event()\r\n dsoCloseOverlay!: EventEmitter<MouseEvent | KeyboardEvent>;\r\n\r\n /**\r\n * Emitted when user cancels filterpanel.\r\n */\r\n @Event()\r\n dsoFilterpanelCancel!: EventEmitter<FilterpanelEvent>;\r\n\r\n /**\r\n * Emitted when user applies filterpanel options.\r\n */\r\n @Event()\r\n dsoFilterpanelApply!: EventEmitter<FilterpanelEvent>;\r\n\r\n /**\r\n * Emitted before and after main size animation. Inspect `detail` property for more information.\r\n */\r\n @Event()\r\n dsoMainSizeChange!: EventEmitter<ViewerGridChangeSizeEvent>;\r\n\r\n @Element()\r\n host!: HTMLDsoViewerGridElement;\r\n\r\n private filterpanel: HTMLElement | undefined;\r\n\r\n private filterpanelSlot: HTMLElement | null = null;\r\n\r\n private filterpanelFocustrap: FocusTrap | undefined;\r\n\r\n private overlay: HTMLDivElement | undefined;\r\n\r\n private overlaySlot: HTMLDivElement | null = null;\r\n\r\n private overlayFocustrap: FocusTrap | undefined;\r\n\r\n @Watch(\"mainSize\")\r\n mainSizeWatcher(currentSize: MainSize, previousSize: MainSize) {\r\n this.dsoMainSizeChange.emit({\r\n stage: \"start\",\r\n previousSize,\r\n currentSize,\r\n });\r\n\r\n this.mapPanel?.addEventListener(\r\n \"transitionend\",\r\n (e) => {\r\n if (e.propertyName === \"flex-basis\") {\r\n this.dsoMainSizeChange.emit({\r\n stage: \"end\",\r\n previousSize,\r\n currentSize,\r\n });\r\n }\r\n },\r\n { once: true }\r\n );\r\n }\r\n\r\n private shrinkMain = () => {\r\n this.mainSize = this.mainSize === \"large\" ? \"medium\" : \"small\";\r\n };\r\n\r\n private expandMain = () => {\r\n this.mainSize = this.mainSize === \"small\" ? \"medium\" : \"large\";\r\n };\r\n\r\n private updateFocusTrap() {\r\n if (this.filterpanelOpen && this.overlayOpen) {\r\n return;\r\n }\r\n\r\n if (this.filterpanelFocustrap) {\r\n if (this.filterpanelOpen && !this.filterpanel?.hidden) {\r\n this.filterpanelFocustrap.activate();\r\n this.host.addEventListener(\"keydown\", this.keyDownListener);\r\n } else {\r\n this.filterpanelFocustrap.deactivate();\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n }\r\n\r\n if (this.overlayFocustrap) {\r\n if (this.overlayOpen && !this.overlay?.hidden) {\r\n this.overlayFocustrap.activate();\r\n this.host.addEventListener(\"keydown\", this.keyDownListener);\r\n } else {\r\n this.overlayFocustrap.deactivate();\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n }\r\n }\r\n\r\n private keyDownListener = (event: KeyboardEvent) => {\r\n if (event.key !== \"Escape\") {\r\n return;\r\n }\r\n\r\n this.dsoCloseOverlay.emit(event);\r\n };\r\n\r\n connectedCallback() {\r\n this.filterpanelSlot = this.host.querySelector<HTMLDivElement>(\"div[slot='filterpanel']\");\r\n\r\n this.overlaySlot = this.host.querySelector<HTMLDivElement>(\"div[slot='overlay']\");\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.filterpanel && this.filterpanelSlot) {\r\n this.filterpanelFocustrap = createFocusTrap([this.filterpanel, this.filterpanelSlot], {\r\n escapeDeactivates: false,\r\n allowOutsideClick: true,\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n });\r\n }\r\n\r\n if (this.overlay && this.overlaySlot) {\r\n this.overlayFocustrap = createFocusTrap([this.overlay, this.overlaySlot], {\r\n escapeDeactivates: false,\r\n allowOutsideClick: true,\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n });\r\n }\r\n\r\n this.updateFocusTrap();\r\n }\r\n\r\n componentWillLoad() {\r\n if (this.initialMainSize) {\r\n this.mainSize = this.initialMainSize;\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n this.updateFocusTrap();\r\n }\r\n\r\n disconnectedCallback() {\r\n this.overlayFocustrap?.deactivate();\r\n this.filterpanelFocustrap?.deactivate();\r\n\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n\r\n private handleFilterpanelApply(mouseEvent: MouseEvent) {\r\n this.dsoFilterpanelApply.emit({ originalEvent: mouseEvent });\r\n }\r\n\r\n private handleFilterpanelCancel(mouseEvent: MouseEvent) {\r\n this.dsoFilterpanelCancel.emit({ originalEvent: mouseEvent });\r\n }\r\n\r\n render() {\r\n return (\r\n <Host {...{ [this.mainSize]: true }}>\r\n <div class=\"dso-map-panel\" ref={(element) => (this.mapPanel = element)}>\r\n <div class=\"sizing-buttons\">\r\n <span class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\r\n breedte tekstpaneel: {this.sizeLabelMap[this.mainSize]}\r\n </span>\r\n <button type=\"button\" class=\"shrink\" disabled={this.mainSize === \"small\"} onClick={this.shrinkMain}>\r\n <span class=\"sr-only\">Kaartpaneel smaller maken</span>\r\n <dso-icon icon=\"chevron-left\"></dso-icon>\r\n </button>\r\n <button type=\"button\" class=\"expand\" disabled={this.mainSize === \"large\"} onClick={this.expandMain}>\r\n <span class=\"sr-only\">Kaartpaneel breder maken</span>\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </button>\r\n </div>\r\n <div class=\"main\">\r\n <slot name=\"main\" />\r\n </div>\r\n </div>\r\n <div\r\n id=\"filterpanel\"\r\n class=\"filterpanel\"\r\n hidden={!this.filterpanelOpen || !this.filterpanelSlot}\r\n ref={(element) => (this.filterpanel = element)}\r\n >\r\n <h1>Uw keuzes</h1>\r\n <ViewerGridFilterpanelButtons\r\n onApply={(e) => this.handleFilterpanelApply(e)}\r\n onCancel={(e) => this.handleFilterpanelCancel(e)}\r\n />\r\n <slot name=\"filterpanel\" />\r\n <ViewerGridFilterpanelButtons\r\n onApply={(e) => this.handleFilterpanelApply(e)}\r\n onCancel={(e) => this.handleFilterpanelCancel(e)}\r\n />\r\n </div>\r\n <div class=\"map\">\r\n <slot name=\"map\" />\r\n </div>\r\n <div hidden={!this.overlayOpen || !this.overlaySlot} class=\"dimscreen\"></div>\r\n <div\r\n class=\"overlay\"\r\n hidden={!this.overlayOpen || !this.overlaySlot}\r\n ref={(element) => (this.overlay = element)}\r\n >\r\n <button type=\"button\" class=\"overlay-close-button\" onClick={(e) => this.dsoCloseOverlay.emit(e)}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">sluiten</span>\r\n </button>\r\n <slot name=\"overlay\" />\r\n {/* This button is needed for the `focus-trap` library to function correctly. It is never focused. */}\r\n <button aria-hidden=\"true\" type=\"button\" class=\"overlay-close-button\" style={{ zIndex: \"-100\" }}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">sluiten</span>\r\n </button>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"dso-viewer-grid.entry.cjs.js","mappings":";;;;;;;;AAOO,MAAM,4BAA4B,GAAoD,CAAC,EAC5F,OAAO,EACP,QAAQ,GACT,MACCA,iBAAK,KAAK,EAAC,qBAAqB;EAC9BA,oB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e,CAC7B,CACL,CACD,EACP;GACH;;;;;;;;;;","names":["h","createFocusTrap","Host"],"sources":["./src/components/viewer-grid/viewer-grid-filterpanel-buttons.tsx","./src/components/viewer-grid/viewer-grid.scss?tag=dso-viewer-grid&encapsulation=shadow","./src/components/viewer-grid/viewer-grid.tsx"],"sourcesContent":["import { FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nexport interface ViewerGridFilterpanelProps {\r\n onApply: (mouseEvent: MouseEvent) => void;\r\n onCancel: (mouseEvent: MouseEvent) => void;\r\n}\r\n\r\nexport const ViewerGridFilterpanelButtons: FunctionalComponent<ViewerGridFilterpanelProps> = ({\r\n onApply,\r\n onCancel,\r\n}) => (\r\n <div class=\"filterpanel-buttons\">\r\n <button type=\"button\" class=\"cancel-button\" onClick={onCancel}>\r\n <span>Annuleren</span>\r\n </button>\r\n <button type=\"button\" class=\"apply-button\" onClick={onApply}>\r\n <span>Toepassen</span>\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </button>\r\n </div>\r\n);\r\n","@use \"~dso-toolkit/src/components/grid\" as css-grid;\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/zindex\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/headings\";\r\n\r\n@use \"viewer-grid.variables\" as core-viewer-grid-variables;\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: flex;\r\n height: 100vh;\r\n overflow: hidden;\r\n position: relative;\r\n}\r\n\r\n:host([small]) {\r\n .dso-map-panel {\r\n flex-basis: core-viewer-grid-variables.$small;\r\n min-width: 0;\r\n max-width: core-viewer-grid-variables.$small;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$small) {\r\n flex-basis: 100vw;\r\n max-width: 100vw;\r\n min-width: 0;\r\n transition: none;\r\n }\r\n }\r\n}\r\n\r\n:host([medium]) {\r\n .dso-map-panel {\r\n flex-basis: core-viewer-grid-variables.$medium;\r\n min-width: core-viewer-grid-variables.$small;\r\n max-width: core-viewer-grid-variables.$medium;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$medium) {\r\n flex-basis: 100vw;\r\n max-width: 100vw;\r\n min-width: core-viewer-grid-variables.$small;\r\n transition: none;\r\n }\r\n }\r\n}\r\n\r\n:host([large]) {\r\n .dso-map-panel {\r\n flex-basis: core-viewer-grid-variables.$large;\r\n min-width: core-viewer-grid-variables.$large-min;\r\n max-width: core-viewer-grid-variables.$large-max;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$large-min) {\r\n flex-basis: 100vw;\r\n max-width: 100vw;\r\n min-width: core-viewer-grid-variables.$large-min;\r\n transition: none;\r\n }\r\n }\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.shrink,\r\n.expand,\r\n.overlay-close-button {\r\n @include button.tertiary($modifiers: false);\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n\r\n &[disabled] {\r\n display: none;\r\n }\r\n}\r\n\r\n.overlay-close-button {\r\n position: absolute;\r\n top: units.$u1;\r\n right: css-grid.$grid-gutter-width * 0.5;\r\n}\r\n\r\n.dso-map-panel {\r\n background-color: colors.$wit;\r\n box-shadow: units.$u1 * 0.25 0 units.$u1 0 rgba(0, 0, 0, 0.4);\r\n flex-shrink: 0;\r\n flex-grow: 0;\r\n padding-right: units.$u1;\r\n position: relative;\r\n transition: flex-basis core-viewer-grid-variables.$transition-time ease-in,\r\n max-width core-viewer-grid-variables.$transition-time ease-in,\r\n min-width core-viewer-grid-variables.$transition-time ease-in;\r\n z-index: zindex.$viewer-grid-map-panel;\r\n\r\n .dso-filterblok-address {\r\n font-weight: bold;\r\n margin: units.$u1 0;\r\n }\r\n\r\n .main {\r\n height: 100%;\r\n overflow-y: scroll;\r\n padding: 0 css-grid.$grid-gutter-width * 0.5 units.$u1;\r\n }\r\n}\r\n\r\n.sizing-buttons {\r\n left: calc(100% + 1px);\r\n overflow-x: hidden;\r\n padding: 0 units.$u1 * 0.5 units.$u1 * 0.5 0;\r\n position: absolute;\r\n top: core-viewer-grid-variables.$sizing-buttons-top;\r\n transition: left core-viewer-grid-variables.$transition-time ease-in;\r\n width: core-viewer-grid-variables.$resize-button-size + units.$u1 * 0.5;\r\n z-index: zindex.$viewer-grid-sizing-buttons;\r\n\r\n button {\r\n @include button.secondary($modifiers: false, $icon-only: true);\r\n @include button.map-focus();\r\n\r\n border: 0;\r\n padding: 8px;\r\n border-radius: 0;\r\n border-bottom-right-radius: 4px;\r\n border-top-right-radius: 4px;\r\n box-shadow: 0 1px units.$u1 * 0.5 0 rgba(0, 0, 0, 0.4);\r\n flex: 0 0 100%;\r\n height: core-viewer-grid-variables.$resize-button-size;\r\n min-width: auto;\r\n width: core-viewer-grid-variables.$resize-button-size;\r\n\r\n &:hover {\r\n dso-icon {\r\n color: colors.$wit;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.map {\r\n height: 100%;\r\n width: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.filterpanel,\r\n.overlay {\r\n background-color: colors.$wit;\r\n height: 100%;\r\n overflow-y: auto;\r\n position: absolute;\r\n z-index: zindex.$viewer-grid-map-panel + 1;\r\n}\r\n\r\n.filterpanel {\r\n box-shadow: 2px 0 5px colors.$grijs-60;\r\n padding: units.$u1 css-grid.$grid-gutter-width * 0.5;\r\n left: 0;\r\n max-width: core-viewer-grid-variables.$filterpanel-max-width;\r\n width: calc(100vw - 40px);\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$filterpanel-width) {\r\n width: 100vw;\r\n\r\n &::before {\r\n display: none !important;\r\n }\r\n }\r\n\r\n h1 {\r\n @include headings.base();\r\n @include headings.margin-large();\r\n @include headings.h1();\r\n }\r\n\r\n &::before {\r\n content: \"\";\r\n display: block;\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n left: core-viewer-grid-variables.$filterpanel-max-width;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n\r\n @media screen and (max-width: #{core-viewer-grid-variables.$filterpanel-max-width + 40px}) {\r\n left: auto;\r\n width: 40px;\r\n }\r\n }\r\n}\r\n\r\n.overlay {\r\n box-shadow: -2px 0 5px colors.$grijs-60;\r\n padding: units.$u5 css-grid.$grid-gutter-width * 0.5 units.$u1;\r\n right: 0;\r\n width: core-viewer-grid-variables.$overlay-width;\r\n\r\n @media screen and (max-width: core-viewer-grid-variables.$overlay-width) {\r\n width: 100vw;\r\n }\r\n}\r\n\r\n.dimscreen {\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: core-viewer-grid-variables.$overlay-width;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n z-index: zindex.$viewer-grid-map-panel + 2;\r\n}\r\n\r\n.filterpanel-buttons {\r\n text-align: right;\r\n\r\n .cancel-button {\r\n @include button.secondary($modifiers: false);\r\n @include button.small();\r\n }\r\n\r\n .apply-button {\r\n @include button.primary($modifiers: false);\r\n @include button.small();\r\n }\r\n\r\n .cancel-button + .apply-button {\r\n margin-left: units.$u2;\r\n }\r\n}\r\n","import { h, Component, Prop, State, Host, Element, Event, EventEmitter, Watch } from \"@stencil/core\";\r\nimport { FocusTrap, createFocusTrap } from \"focus-trap\";\r\nimport { ViewerGridFilterpanelButtons } from \"./viewer-grid-filterpanel-buttons\";\r\nimport { FilterpanelEvent, LabelSizeMap, MainSize, ViewerGridChangeSizeEvent } from \"./viewer-grid.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-viewer-grid\",\r\n styleUrl: \"viewer-grid.scss\",\r\n shadow: true,\r\n})\r\nexport class ViewerGrid {\r\n private sizeLabelMap: LabelSizeMap = {\r\n small: \"smal\",\r\n medium: \"middel\",\r\n large: \"breed\",\r\n };\r\n\r\n private mapPanel?: HTMLDivElement;\r\n\r\n /**\r\n * Set to true when filterpanel should show.\r\n */\r\n @Prop({ reflect: true })\r\n filterpanelOpen = false;\r\n\r\n /**\r\n * Set to true when overlay should show.\r\n */\r\n @Prop({ reflect: true })\r\n overlayOpen = false;\r\n\r\n /**\r\n * Size of the main content panel when component loads. Changing this attribute afterwards has no effect.\r\n *\r\n * Default size is `large`.\r\n */\r\n @Prop()\r\n initialMainSize?: MainSize;\r\n\r\n @State()\r\n mainSize: MainSize = \"large\";\r\n\r\n /**\r\n * Emitted when user wants to close the overlay.\r\n */\r\n @Event()\r\n dsoCloseOverlay!: EventEmitter<MouseEvent | KeyboardEvent>;\r\n\r\n /**\r\n * Emitted when user cancels filterpanel.\r\n */\r\n @Event()\r\n dsoFilterpanelCancel!: EventEmitter<FilterpanelEvent>;\r\n\r\n /**\r\n * Emitted when user applies filterpanel options.\r\n */\r\n @Event()\r\n dsoFilterpanelApply!: EventEmitter<FilterpanelEvent>;\r\n\r\n /**\r\n * Emitted before and after main size animation. Inspect `detail` property for more information.\r\n */\r\n @Event()\r\n dsoMainSizeChange!: EventEmitter<ViewerGridChangeSizeEvent>;\r\n\r\n @Element()\r\n host!: HTMLDsoViewerGridElement;\r\n\r\n private filterpanel: HTMLElement | undefined;\r\n\r\n private filterpanelSlot: HTMLElement | null = null;\r\n\r\n private filterpanelFocustrap: FocusTrap | undefined;\r\n\r\n private overlay: HTMLDivElement | undefined;\r\n\r\n private overlaySlot: HTMLDivElement | null = null;\r\n\r\n private overlayFocustrap: FocusTrap | undefined;\r\n\r\n @Watch(\"mainSize\")\r\n mainSizeWatcher(currentSize: MainSize, previousSize: MainSize) {\r\n this.dsoMainSizeChange.emit({\r\n stage: \"start\",\r\n previousSize,\r\n currentSize,\r\n });\r\n\r\n this.mapPanel?.addEventListener(\r\n \"transitionend\",\r\n (e) => {\r\n if (e.propertyName === \"flex-basis\") {\r\n this.dsoMainSizeChange.emit({\r\n stage: \"end\",\r\n previousSize,\r\n currentSize,\r\n });\r\n }\r\n },\r\n { once: true }\r\n );\r\n }\r\n\r\n private shrinkMain = () => {\r\n this.mainSize = this.mainSize === \"large\" ? \"medium\" : \"small\";\r\n };\r\n\r\n private expandMain = () => {\r\n this.mainSize = this.mainSize === \"small\" ? \"medium\" : \"large\";\r\n };\r\n\r\n private updateFocusTrap() {\r\n if (this.filterpanelOpen && this.overlayOpen) {\r\n return;\r\n }\r\n\r\n if (this.filterpanelFocustrap) {\r\n if (this.filterpanelOpen && !this.filterpanel?.hidden) {\r\n this.filterpanelFocustrap.activate();\r\n this.host.addEventListener(\"keydown\", this.keyDownListener);\r\n } else {\r\n this.filterpanelFocustrap.deactivate();\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n }\r\n\r\n if (this.overlayFocustrap) {\r\n if (this.overlayOpen && !this.overlay?.hidden) {\r\n this.overlayFocustrap.activate();\r\n this.host.addEventListener(\"keydown\", this.keyDownListener);\r\n } else {\r\n this.overlayFocustrap.deactivate();\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n }\r\n }\r\n\r\n private keyDownListener = (event: KeyboardEvent) => {\r\n if (event.key !== \"Escape\") {\r\n return;\r\n }\r\n\r\n this.dsoCloseOverlay.emit(event);\r\n };\r\n\r\n connectedCallback() {\r\n this.filterpanelSlot = this.host.querySelector<HTMLDivElement>(\"div[slot='filterpanel']\");\r\n\r\n this.overlaySlot = this.host.querySelector<HTMLDivElement>(\"div[slot='overlay']\");\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.filterpanel && this.filterpanelSlot) {\r\n this.filterpanelFocustrap = createFocusTrap([this.filterpanel, this.filterpanelSlot], {\r\n escapeDeactivates: false,\r\n allowOutsideClick: true,\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n });\r\n }\r\n\r\n if (this.overlay && this.overlaySlot) {\r\n this.overlayFocustrap = createFocusTrap([this.overlay, this.overlaySlot], {\r\n escapeDeactivates: false,\r\n allowOutsideClick: true,\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n });\r\n }\r\n\r\n this.updateFocusTrap();\r\n }\r\n\r\n componentWillLoad() {\r\n if (this.initialMainSize) {\r\n this.mainSize = this.initialMainSize;\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n this.updateFocusTrap();\r\n }\r\n\r\n disconnectedCallback() {\r\n this.overlayFocustrap?.deactivate();\r\n this.filterpanelFocustrap?.deactivate();\r\n\r\n this.host.removeEventListener(\"keydown\", this.keyDownListener);\r\n }\r\n\r\n private handleFilterpanelApply(mouseEvent: MouseEvent) {\r\n this.dsoFilterpanelApply.emit({ originalEvent: mouseEvent });\r\n }\r\n\r\n private handleFilterpanelCancel(mouseEvent: MouseEvent) {\r\n this.dsoFilterpanelCancel.emit({ originalEvent: mouseEvent });\r\n }\r\n\r\n render() {\r\n return (\r\n <Host {...{ [this.mainSize]: true }}>\r\n <div class=\"dso-map-panel\" ref={(element) => (this.mapPanel = element)}>\r\n <div class=\"sizing-buttons\">\r\n <span class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\r\n Breedte tekstpaneel: {this.sizeLabelMap[this.mainSize]}\r\n </span>\r\n <button type=\"button\" class=\"shrink\" disabled={this.mainSize === \"small\"} onClick={this.shrinkMain}>\r\n <span class=\"sr-only\">Tekstpaneel smaller maken</span>\r\n <dso-icon icon=\"chevron-left\"></dso-icon>\r\n </button>\r\n <button type=\"button\" class=\"expand\" disabled={this.mainSize === \"large\"} onClick={this.expandMain}>\r\n <span class=\"sr-only\">Tekstpaneel breder maken</span>\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </button>\r\n </div>\r\n <div class=\"main\">\r\n <slot name=\"main\" />\r\n </div>\r\n </div>\r\n <div\r\n id=\"filterpanel\"\r\n class=\"filterpanel\"\r\n hidden={!this.filterpanelOpen || !this.filterpanelSlot}\r\n ref={(element) => (this.filterpanel = element)}\r\n >\r\n <h1>Uw keuzes</h1>\r\n <ViewerGridFilterpanelButtons\r\n onApply={(e) => this.handleFilterpanelApply(e)}\r\n onCancel={(e) => this.handleFilterpanelCancel(e)}\r\n />\r\n <slot name=\"filterpanel\" />\r\n <ViewerGridFilterpanelButtons\r\n onApply={(e) => this.handleFilterpanelApply(e)}\r\n onCancel={(e) => this.handleFilterpanelCancel(e)}\r\n />\r\n </div>\r\n <div class=\"map\">\r\n <slot name=\"map\" />\r\n </div>\r\n <div hidden={!this.overlayOpen || !this.overlaySlot} class=\"dimscreen\"></div>\r\n <div\r\n class=\"overlay\"\r\n hidden={!this.overlayOpen || !this.overlaySlot}\r\n ref={(element) => (this.overlay = element)}\r\n >\r\n <button type=\"button\" class=\"overlay-close-button\" onClick={(e) => this.dsoCloseOverlay.emit(e)}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">sluiten</span>\r\n </button>\r\n <slot name=\"overlay\" />\r\n {/* This button is needed for the `focus-trap` library to function correctly. It is never focused. */}\r\n <button aria-hidden=\"true\" type=\"button\" class=\"overlay-close-button\" style={{ zIndex: \"-100\" }}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">sluiten</span>\r\n </button>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dsot-document-component-demo.cjs",[[0,"dsot-document-component-demo",{"response":[32],"open":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"status":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"statusDescription":[1,"status-description"],"open":[516],"hasNestedAccordion":[32],"hover":[32]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"userHomeActive":[4,"user-home-active"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32],"dropdownOptionsOffset":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"returnFocus":[16],"ariaId":[32],"hasFooter":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-action-list-item.cjs",[[1,"dso-action-list-item",{"step":[2],"itemTitle":[1,"item-title"],"flowLine":[4,"flow-line"],"warning":[4],"divider":[4]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"invalid":[516],"describedBy":[1,"described-by"],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]}]]],["dso-action-list.cjs",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4],"imageShape":[513,"image-shape"]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"dropdownOptionsOffset":[2,"dropdown-options-offset"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable.cjs",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516],"enableAnimation":[4,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"keyboardFocus":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-alert_5.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"isTruncated":[32],"labelText":[32],"_truncateLabel":[64]}],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-badge",{"status":[1]}],[1,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-annotation-output_3.cjs",[[1,"dso-document-component",{"heading":[1],"label":[1],"nummer":[1],"opschrift":[1],"inhoud":[1],"open":[516],"filtered":[516],"notApplicable":[516,"not-applicable"],"genesteOntwerpInformatie":[516,"geneste-ontwerp-informatie"],"bevatOntwerpInformatie":[516,"bevat-ontwerp-informatie"],"annotated":[516],"gereserveerd":[4],"vervallen":[4],"openAnnotation":[4,"open-annotation"],"alternativeTitle":[1,"alternative-title"],"type":[513],"wijzigactie":[513]}],[4,"dso-annotation-output",{"identifier":[513],"annotationPrefix":[513,"annotation-prefix"],"open":[516]}],[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dsot-document-component-demo.cjs",[[0,"dsot-document-component-demo",{"response":[32],"open":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"status":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"statusDescription":[1,"status-description"],"open":[516],"hasNestedAccordion":[32],"hover":[32]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"userHomeActive":[4,"user-home-active"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32],"dropdownOptionsOffset":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"returnFocus":[16],"ariaId":[32],"hasFooter":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-action-list-item.cjs",[[1,"dso-action-list-item",{"step":[2],"itemTitle":[1,"item-title"],"flowLine":[4,"flow-line"],"warning":[4],"divider":[4]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"invalid":[516],"describedBy":[1,"described-by"],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]}]]],["dso-action-list.cjs",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4],"imageShape":[513,"image-shape"]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"dropdownOptionsOffset":[2,"dropdown-options-offset"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable.cjs",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516],"enableAnimation":[4,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"keyboardFocus":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-alert_5.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"isTruncated":[32],"labelText":[32],"_truncateLabel":[64]},[[4,"keydown","keyDownListener"]]],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-badge",{"status":[1]}],[1,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-annotation-output_3.cjs",[[1,"dso-document-component",{"heading":[1],"label":[1],"nummer":[1],"opschrift":[1],"inhoud":[1],"open":[516],"filtered":[516],"notApplicable":[516,"not-applicable"],"genesteOntwerpInformatie":[516,"geneste-ontwerp-informatie"],"bevatOntwerpInformatie":[516,"bevat-ontwerp-informatie"],"annotated":[516],"gereserveerd":[4],"vervallen":[4],"openAnnotation":[4,"open-annotation"],"alternativeTitle":[1,"alternative-title"],"type":[513],"wijzigactie":[513]}],[4,"dso-annotation-output",{"identifier":[513],"annotationPrefix":[513,"annotation-prefix"],"open":[516]}],[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.interfaces.js","sourceRoot":"","sources":["../../../src/components/accordion/accordion.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export type AccordionVariant = \"default\" | \"compact\" | \"conclusion\" | \"neutral\";\r\n\r\nexport interface AccordionInternalState {\r\n variant?: AccordionVariant;\r\n reverseAlign?: boolean;\r\n}\r\n
|
|
1
|
+
{"version":3,"file":"accordion.interfaces.js","sourceRoot":"","sources":["../../../src/components/accordion/accordion.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export type AccordionVariant = \"default\" | \"compact\" | \"conclusion\" | \"neutral\";\r\n\r\nexport interface AccordionInternalState {\r\n variant?: AccordionVariant;\r\n reverseAlign?: boolean;\r\n}\r\n"]}
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
margin-left: 16px;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
:host([open]) .dso-section-handle > button .dso-section-handle-chevron:first-child,
|
|
92
|
-
:host([open]) .dso-section-handle > a .dso-section-handle-chevron:first-child {
|
|
91
|
+
:host([open]:not([open=false])) .dso-section-handle > button .dso-section-handle-chevron:first-child,
|
|
92
|
+
:host([open]:not([open=false])) .dso-section-handle > a .dso-section-handle-chevron:first-child {
|
|
93
93
|
transform: rotate(90deg);
|
|
94
94
|
}
|
|
95
|
-
:host([open]) .dso-section-handle > button .dso-section-handle-chevron:last-child,
|
|
96
|
-
:host([open]) .dso-section-handle > a .dso-section-handle-chevron:last-child {
|
|
95
|
+
:host([open]:not([open=false])) .dso-section-handle > button .dso-section-handle-chevron:last-child,
|
|
96
|
+
:host([open]:not([open=false])) .dso-section-handle > a .dso-section-handle-chevron:last-child {
|
|
97
97
|
transform: rotate(-180deg);
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -126,23 +126,23 @@
|
|
|
126
126
|
border-radius: 0 0 4px 4px;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
:host(.dso-accordion-default[open]) > .dso-section-handle {
|
|
129
|
+
:host(.dso-accordion-default[open]:not([open=false])) > .dso-section-handle {
|
|
130
130
|
background-color: #8b4a6a;
|
|
131
131
|
border-radius: 0;
|
|
132
132
|
border-top-left-radius: 4px;
|
|
133
133
|
border-top-right-radius: 4px;
|
|
134
134
|
}
|
|
135
|
-
:host(.dso-accordion-default[open]) > .dso-section-handle a,
|
|
136
|
-
:host(.dso-accordion-default[open]) > .dso-section-handle button {
|
|
135
|
+
:host(.dso-accordion-default[open]:not([open=false])) > .dso-section-handle a,
|
|
136
|
+
:host(.dso-accordion-default[open]:not([open=false])) > .dso-section-handle button {
|
|
137
137
|
color: #fff;
|
|
138
138
|
}
|
|
139
|
-
:host(.dso-accordion-default[open]) > .dso-section-handle a dso-attachments-counter,
|
|
140
|
-
:host(.dso-accordion-default[open]) > .dso-section-handle button dso-attachments-counter {
|
|
139
|
+
:host(.dso-accordion-default[open]:not([open=false])) > .dso-section-handle a dso-attachments-counter,
|
|
140
|
+
:host(.dso-accordion-default[open]:not([open=false])) > .dso-section-handle button dso-attachments-counter {
|
|
141
141
|
--dso-attachments-counter-color: #fff;
|
|
142
142
|
--dso-icon: var(--di-paperclip-wit);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
:host(.dso-accordion-default.dso-nested-accordion[open]) .dso-section-body {
|
|
145
|
+
:host(.dso-accordion-default.dso-nested-accordion[open]:not([open=false])) .dso-section-body {
|
|
146
146
|
background-color: #e5e5e5;
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -178,32 +178,32 @@
|
|
|
178
178
|
padding-right: 0;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle {
|
|
181
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle {
|
|
182
182
|
background-color: transparent;
|
|
183
183
|
}
|
|
184
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle a,
|
|
185
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle button {
|
|
184
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle a,
|
|
185
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle button {
|
|
186
186
|
color: #39870c;
|
|
187
187
|
}
|
|
188
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle a:hover, :host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle a:active, :host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle a.active,
|
|
189
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle button:hover,
|
|
190
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle button:active,
|
|
191
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle button.active {
|
|
188
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle a:hover, :host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle a:active, :host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle a.active,
|
|
189
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle button:hover,
|
|
190
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle button:active,
|
|
191
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle button.active {
|
|
192
192
|
color: #39870c;
|
|
193
193
|
}
|
|
194
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle a dso-attachments-counter,
|
|
195
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-handle button dso-attachments-counter {
|
|
194
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle a dso-attachments-counter,
|
|
195
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle button dso-attachments-counter {
|
|
196
196
|
--dso-attachments-counter-color: #666;
|
|
197
197
|
--dso-icon: var(--di-paperclip-grijs);
|
|
198
198
|
}
|
|
199
|
-
:host(.dso-accordion-compact[open]:not(.dso-nested-accordion)) > .dso-section-body {
|
|
199
|
+
:host(.dso-accordion-compact[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-body {
|
|
200
200
|
border-top: 0;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
:host(.dso-accordion-compact.dso-nested-accordion[open]) > .dso-section-body {
|
|
203
|
+
:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=false])) > .dso-section-body {
|
|
204
204
|
padding-bottom: 0;
|
|
205
205
|
}
|
|
206
|
-
:host(.dso-accordion-compact.dso-nested-accordion[open]) > .dso-section-body dso-accordion-section:last-child {
|
|
206
|
+
:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=false])) > .dso-section-body dso-accordion-section:last-child {
|
|
207
207
|
border-bottom: 0;
|
|
208
208
|
}
|
|
209
209
|
|
|
@@ -230,11 +230,11 @@
|
|
|
230
230
|
border: 2px solid #f2f2f2;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
:host(.dso-accordion-conclusion[open]:not(.dso-nested-accordion)) > .dso-section-handle {
|
|
233
|
+
:host(.dso-accordion-conclusion[open]:not([open=false]):not(.dso-nested-accordion)) > .dso-section-handle {
|
|
234
234
|
background-color: #f2f2f2;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
:host(.dso-accordion-conclusion.dso-nested-accordion[open]) {
|
|
237
|
+
:host(.dso-accordion-conclusion.dso-nested-accordion[open]:not([open=false])) {
|
|
238
238
|
background-color: #fff;
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -273,26 +273,26 @@
|
|
|
273
273
|
padding: 16px 32px 24px 32px;
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
:host(.dso-accordion-neutral[open]) > .dso-section-handle {
|
|
276
|
+
:host(.dso-accordion-neutral[open]:not([open=false])) > .dso-section-handle {
|
|
277
277
|
background-color: transparant;
|
|
278
278
|
border-radius: 0;
|
|
279
279
|
border-top-left-radius: 4px;
|
|
280
280
|
border-top-right-radius: 4px;
|
|
281
281
|
}
|
|
282
|
-
:host(.dso-accordion-neutral[open]) > .dso-section-handle a,
|
|
283
|
-
:host(.dso-accordion-neutral[open]) > .dso-section-handle button {
|
|
282
|
+
:host(.dso-accordion-neutral[open]:not([open=false])) > .dso-section-handle a,
|
|
283
|
+
:host(.dso-accordion-neutral[open]:not([open=false])) > .dso-section-handle button {
|
|
284
284
|
color: #000;
|
|
285
285
|
}
|
|
286
|
-
:host(.dso-accordion-neutral[open]) > .dso-section-handle a dso-attachments-counter,
|
|
287
|
-
:host(.dso-accordion-neutral[open]) > .dso-section-handle button dso-attachments-counter {
|
|
286
|
+
:host(.dso-accordion-neutral[open]:not([open=false])) > .dso-section-handle a dso-attachments-counter,
|
|
287
|
+
:host(.dso-accordion-neutral[open]:not([open=false])) > .dso-section-handle button dso-attachments-counter {
|
|
288
288
|
--dso-attachments-counter-color: #fff;
|
|
289
289
|
--dso-icon: var(--di-paperclip-wit);
|
|
290
290
|
}
|
|
291
|
-
:host(.dso-accordion-neutral[open]) .dso-section-body {
|
|
291
|
+
:host(.dso-accordion-neutral[open]:not([open=false])) .dso-section-body {
|
|
292
292
|
margin-block-end: 16px;
|
|
293
293
|
margin-block-start: 2px;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
:host(.dso-accordion-neutral.dso-nested-accordion[open]) .dso-section-body {
|
|
296
|
+
:host(.dso-accordion-neutral.dso-nested-accordion[open]:not([open=false])) .dso-section-body {
|
|
297
297
|
background-color: #e5e5e5;
|
|
298
298
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-section.interfaces.js","sourceRoot":"","sources":["../../../../src/components/accordion/components/accordion-section.interfaces.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,GAA0C;EAC7D,OAAO,EAAE,SAAS;EAClB,IAAI,EAAE,OAAO;EACb,OAAO,EAAE,eAAe;EACxB,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;CACf,CAAC","sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\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"]}
|
|
1
|
+
{"version":3,"file":"accordion-section.interfaces.js","sourceRoot":"","sources":["../../../../src/components/accordion/components/accordion-section.interfaces.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,GAA0C;EAC7D,OAAO,EAAE,SAAS;EAClB,IAAI,EAAE,OAAO;EACb,OAAO,EAAE,eAAe;EACxB,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;CACf,CAAC","sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\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 AccordionSectionAnimationEndEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(): 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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, forceUpdate, Fragment, Host, } from "@stencil/core";
|
|
2
|
-
import { stateMap } from "./accordion-section.interfaces";
|
|
2
|
+
import { stateMap, } from "./accordion-section.interfaces";
|
|
3
3
|
import { Handle, HandleElement, HandleIcon } from "./handles";
|
|
4
4
|
export class AccordionSection {
|
|
5
5
|
constructor() {
|
|
@@ -265,7 +265,7 @@ export class AccordionSection {
|
|
|
265
265
|
"references": {
|
|
266
266
|
"AccordionSectionToggleClickEvent": {
|
|
267
267
|
"location": "import",
|
|
268
|
-
"path": "
|
|
268
|
+
"path": "./accordion-section.interfaces"
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}
|
|
@@ -285,7 +285,7 @@ export class AccordionSection {
|
|
|
285
285
|
"references": {
|
|
286
286
|
"AccordionSectionAnimationEndEvent": {
|
|
287
287
|
"location": "import",
|
|
288
|
-
"path": "
|
|
288
|
+
"path": "./accordion-section.interfaces"
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-section.js","sourceRoot":"","sources":["../../../../src/components/accordion/components/accordion-section.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EAET,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAK,GAEN,MAAM,eAAe,CAAC;AAOvB,OAAO,EAA2C,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQ9D,MAAM,OAAO,gBAAgB;;IA8GnB,gBAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;MAC1C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;QACvB,aAAa,EAAE,KAAK;QACpB,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI;OACjB,CAAC,CAAC;IACL,CAAC,CAAC;IAEM,iCAA4B,GAAG,CAAC,CAA2C,EAAE,EAAE;MACrF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;OAC/D,CAAC,CAAC;IACL,CAAC,CAAC;;mBAtG0B,IAAI;;;;;;gBAoCzB,KAAK;8BAGS,KAAK;iBAGlB,KAAK;;EAEb,iBAAiB;;IACf,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAE5E,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,GAAG,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;MACzC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;MAE5B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;EACL,CAAC;EAED,IAAI,SAAS;;IACX,OAAO,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n forceUpdate,\r\n Fragment,\r\n Host,\r\n Prop,\r\n State,\r\n EventEmitter,\r\n} from \"@stencil/core\";\r\n\r\nimport {\r\n AccordionInternalState,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionToggleClickEvent,\r\n} from \"../accordion.interfaces\";\r\nimport { AccordionHeading, AccordionSectionState, stateMap } from \"./accordion-section.interfaces\";\r\nimport { Handle, HandleElement, HandleIcon } from \"./handles\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\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?: string;\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 @State()\r\n hasNestedAccordion = false;\r\n\r\n @State()\r\n hover = false;\r\n\r\n componentWillLoad() {\r\n this.hasNestedAccordion = this.host.querySelector(\"dso-accordion\") !== null;\r\n\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): Promise<void> {\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\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 if (sectionBottomY > window.innerHeight) {\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection\r\n ? this.host.offsetTop\r\n : this.host.offsetTop - (window.innerHeight - expandedAccordionHeight),\r\n behavior: \"smooth\",\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n window.scrollTo({\r\n top: this.host.offsetTop,\r\n behavior: \"smooth\",\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 handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: () => this.scrollIntoView(e.detail.bodyHeight),\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 completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\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\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: true,\r\n \"dso-nested-accordion\": this.hasNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\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 handleUrl={this.handleUrl} onClick={this.handleClick} open={this.open}>\r\n {reverseAlign ? (\r\n <Fragment>\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n\r\n <span>{this.handleTitle}</span>\r\n\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n\r\n <span>\r\n {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\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 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"]}
|
|
1
|
+
{"version":3,"file":"accordion-section.js","sourceRoot":"","sources":["../../../../src/components/accordion/components/accordion-section.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EAET,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAK,GAEN,MAAM,eAAe,CAAC;AAGvB,OAAO,EAKL,QAAQ,GACT,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQ9D,MAAM,OAAO,gBAAgB;;IA8GnB,gBAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;MAC1C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;QACvB,aAAa,EAAE,KAAK;QACpB,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI;OACjB,CAAC,CAAC;IACL,CAAC,CAAC;IAEM,iCAA4B,GAAG,CAAC,CAA2C,EAAE,EAAE;MACrF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;OAC/D,CAAC,CAAC;IACL,CAAC,C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CACa,CACT;MACT,sBACE,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,eAAe,QACf,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACrC,2BAA2B,EAAE,IAAI,CAAC,4BAA4B;QAE9D,WAAK,KAAK,EAAC,0BAA0B,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;UAClF,eAAQ,CACJ,CACS,CACZ,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n forceUpdate,\r\n Fragment,\r\n Host,\r\n Prop,\r\n State,\r\n EventEmitter,\r\n} from \"@stencil/core\";\r\n\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\nimport { Handle, HandleElement, HandleIcon } from \"./handles\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\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?: string;\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 @State()\r\n hasNestedAccordion = false;\r\n\r\n @State()\r\n hover = false;\r\n\r\n componentWillLoad() {\r\n this.hasNestedAccordion = this.host.querySelector(\"dso-accordion\") !== null;\r\n\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): Promise<void> {\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\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 if (sectionBottomY > window.innerHeight) {\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection\r\n ? this.host.offsetTop\r\n : this.host.offsetTop - (window.innerHeight - expandedAccordionHeight),\r\n behavior: \"smooth\",\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n window.scrollTo({\r\n top: this.host.offsetTop,\r\n behavior: \"smooth\",\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 handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: () => this.scrollIntoView(e.detail.bodyHeight),\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 completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\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\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: true,\r\n \"dso-nested-accordion\": this.hasNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\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 handleUrl={this.handleUrl} onClick={this.handleClick} open={this.open}>\r\n {reverseAlign ? (\r\n <Fragment>\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n\r\n <span>{this.handleTitle}</span>\r\n\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n\r\n <span>\r\n {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\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 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"]}
|
|
@@ -77,7 +77,7 @@ export class AnnotationButton {
|
|
|
77
77
|
"references": {
|
|
78
78
|
"AnnotationButtonClickEvent": {
|
|
79
79
|
"location": "local",
|
|
80
|
-
"path": "/
|
|
80
|
+
"path": "/usr/src/app/packages/core/src/components/annotation-button/annotation-button.tsx"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -95,7 +95,7 @@ export class AnnotationOutput {
|
|
|
95
95
|
"references": {
|
|
96
96
|
"AnnotationOutputCloseEvent": {
|
|
97
97
|
"location": "local",
|
|
98
|
-
"path": "/
|
|
98
|
+
"path": "/usr/src/app/packages/core/src/components/annotation-output/annotation-output.tsx"
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -56,8 +56,8 @@ export class Expandable {
|
|
|
56
56
|
if (this.bodyHeight !== height) {
|
|
57
57
|
this.bodyHeight = height;
|
|
58
58
|
}
|
|
59
|
+
this.instantiateAnimation();
|
|
59
60
|
}, 150));
|
|
60
|
-
this.instantiateAnimation();
|
|
61
61
|
}
|
|
62
62
|
instantiateAnimation() {
|
|
63
63
|
var _a;
|
|
@@ -203,7 +203,7 @@ export class Expandable {
|
|
|
203
203
|
"references": {
|
|
204
204
|
"ExpandableAnimationEndEvent": {
|
|
205
205
|
"location": "local",
|
|
206
|
-
"path": "/
|
|
206
|
+
"path": "/usr/src/app/packages/core/src/components/expandable/expandable.tsx"
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable.js","sourceRoot":"","sources":["../../../src/components/expandable/expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAwB,MAAM,SAAS,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAWhC,MAAM,OAAO,UAAU;;;2BAoBH,KAAK;;0BASN,KAAK;;EAGtB,UAAU;IACR,IAAI,IAAI,CAAC,eAAe,EAAE;MACxB,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;EACH,CAAC;EAGD,qBAAqB,CAAC,eAAwB;;IAC5C,IAAI,eAAe,EAAE;MACnB,IAAI,CAAC,8BAA8B,EAAE,CAAC;MACtC,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;SAAM;MACL,MAAA,IAAI,CAAC,cAAc,0CAAE,UAAU,EAA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IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;SAC3B;OACF;KACF;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n h,\r\n Host,\r\n Prop,\r\n State,\r\n Watch,\r\n} from \"@stencil/core\";\r\nimport anime, { AnimeInstance } from \"animejs\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nexport interface ExpandableAnimationEndEvent {\r\n bodyHeight: number | undefined;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-expandable\",\r\n styleUrl: \"expandable.scss\",\r\n shadow: true,\r\n})\r\nexport class Expandable implements ComponentInterface {\r\n private resizeObserver?: ResizeObserver;\r\n\r\n private bodyHeight?: number;\r\n\r\n private animeInstance?: AnimeInstance;\r\n\r\n @Element()\r\n host!: HTMLDsoExpandableElement;\r\n\r\n /**\r\n * Set to `true` to expand the content.\r\n */\r\n @Prop({ reflect: true })\r\n open?: boolean;\r\n\r\n /**\r\n * Set to `true` to show the content animated.\r\n */\r\n @Prop()\r\n enableAnimation = false;\r\n\r\n /**\r\n * When enableAnimation is set to `true`, this property specifies the height of this element at which the animation will expand from / collapse to\r\n */\r\n @Prop()\r\n minimumHeight?: number;\r\n\r\n @State()\r\n animationReady = false;\r\n\r\n @Watch(\"open\")\r\n toggleOpen() {\r\n if (this.enableAnimation) {\r\n this.activateAnimation();\r\n }\r\n }\r\n\r\n @Watch(\"enableAnimation\")\r\n toggleEnableAnimation(enableAnimation: boolean) {\r\n if (enableAnimation) {\r\n this.prepareAnimationResizeObserver();\r\n this.activateObserver();\r\n } else {\r\n this.resizeObserver?.disconnect();\r\n delete this.animeInstance;\r\n this.host.removeAttribute(\"style\");\r\n }\r\n }\r\n\r\n /**\r\n * Fired when the animation ends. Only when `enableAnimation = true`.\r\n */\r\n @Event({ bubbles: false })\r\n dsoExpandableAnimationEnd!: EventEmitter<ExpandableAnimationEndEvent>;\r\n\r\n componentDidLoad(): void {\r\n if (this.enableAnimation) {\r\n this.prepareAnimationResizeObserver();\r\n }\r\n\r\n this.activateObserver();\r\n }\r\n\r\n private activateObserver() {\r\n this.resizeObserver?.observe(this.host);\r\n }\r\n\r\n disconnectedCallback() {\r\n this.resizeObserver?.disconnect();\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n aria-hidden={this.open ? \"false\" : \"true\"}\r\n class={clsx({\r\n \"dso-animate-ready\": this.enableAnimation && this.animationReady,\r\n \"dso-hide\": !this.enableAnimation && !this.open,\r\n })}\r\n >\r\n <slot />\r\n </Host>\r\n );\r\n }\r\n\r\n private prepareAnimationResizeObserver(): void {\r\n this.resizeObserver = new ResizeObserver(\r\n debounce(([entry]) => {\r\n if (!entry) {\r\n throw new Error(\"No entry found\");\r\n }\r\n\r\n // entry.contentRect does not include padding, so we use getBoundingClientRect.\r\n const height = entry.target.getBoundingClientRect().height;\r\n\r\n if (this.bodyHeight !== height) {\r\n this.bodyHeight = height;\r\n }\r\n\r\n this.instantiateAnimation();\r\n }, 150)\r\n );\r\n }\r\n\r\n private instantiateAnimation(): void {\r\n this.animeInstance = anime({\r\n targets: this.host,\r\n height: this.minimumHeight ?? 0,\r\n easing: \"cubicBezier(0.4, 0, 0.2, 1)\",\r\n duration: 260,\r\n autoplay: false,\r\n direction: \"normal\",\r\n begin: () => {\r\n if (this.open) {\r\n this.host.style.visibility = \"\";\r\n this.host.style.position = \"\";\r\n this.host.style.bottom = \"\";\r\n }\r\n },\r\n complete: () => {\r\n this.host.style.height = \"\";\r\n\r\n if (!this.open) {\r\n this.host.style.visibility = \"hidden\";\r\n this.host.style.position = \"absolute\";\r\n this.host.style.bottom = \"100%\";\r\n }\r\n },\r\n changeComplete: () => {\r\n this.dsoExpandableAnimationEnd.emit({ bodyHeight: this.bodyHeight });\r\n },\r\n });\r\n\r\n if (!this.open) {\r\n this.animeInstance.reverse();\r\n this.animeInstance.play();\r\n }\r\n\r\n if (this.host) {\r\n this.host.style.height = \"\";\r\n }\r\n\r\n this.animationReady = !!this.animeInstance;\r\n }\r\n\r\n private activateAnimation(): void {\r\n if (this.animeInstance) {\r\n if (this.animeInstance.progress > 0 && this.animeInstance.progress < 100) {\r\n this.animeInstance.reverse();\r\n } else {\r\n if (this.open) {\r\n this.animeInstance.direction = \"reverse\";\r\n this.animeInstance.play();\r\n } else {\r\n this.animeInstance.direction = \"normal\";\r\n this.animeInstance.play();\r\n }\r\n }\r\n }\r\n }\r\n}\r\n"]}
|