@dso-toolkit/core 50.0.1 → 51.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 +7 -1
- package/dist/cjs/dso-accordion.cjs.entry.js +10 -3
- package/dist/cjs/dso-card.cjs.entry.js +8 -4
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +3 -6
- package/dist/cjs/dso-list-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +1 -1
- package/dist/cjs/dso-slide-toggle.cjs.entry.js +37 -0
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/accordion.js +50 -5
- package/dist/collection/components/accordion/components/accordion-section.css +1 -1
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js +1 -0
- package/dist/collection/components/accordion/components/accordion-section.js +4 -2
- package/dist/collection/components/accordion/components/handles/state-icon.handle.js +3 -0
- package/dist/collection/components/card/card.js +2 -4
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +3 -6
- package/dist/collection/components/list-button/list-button.css +13 -14
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.css +44 -0
- package/dist/collection/components/slide-toggle/slide-toggle.interfaces.js +1 -0
- package/dist/collection/components/slide-toggle/slide-toggle.js +156 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/is-interactive-element.js +6 -0
- package/dist/components/dropdown-menu.js +3 -6
- package/dist/components/dso-accordion-section.js +7 -1
- package/dist/components/dso-accordion.js +11 -3
- package/dist/components/dso-card.js +8 -4
- package/dist/components/dso-list-button.js +1 -1
- package/dist/components/dso-modal.js +1 -1
- package/dist/components/dso-slide-toggle.d.ts +11 -0
- package/dist/components/dso-slide-toggle.js +57 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-672c8323.entry.js → p-0e5315a3.entry.js} +1 -1
- package/dist/dso-toolkit/p-11176cb8.entry.js +1 -0
- package/dist/dso-toolkit/p-36cd87c4.entry.js +1 -0
- package/dist/dso-toolkit/{p-34a3c0b3.entry.js → p-6080bb9e.entry.js} +1 -1
- package/dist/dso-toolkit/p-6bd8515a.entry.js +1 -0
- package/dist/dso-toolkit/{p-d8ba8db6.entry.js → p-abbcbe6a.entry.js} +1 -1
- package/dist/dso-toolkit/p-ec4501bb.entry.js +1 -0
- package/dist/esm/dso-accordion-section.entry.js +7 -1
- package/dist/esm/dso-accordion.entry.js +10 -3
- package/dist/esm/dso-card.entry.js +8 -4
- package/dist/esm/dso-dropdown-menu.entry.js +3 -6
- package/dist/esm/dso-list-button.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +1 -1
- package/dist/esm/dso-slide-toggle.entry.js +33 -0
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +6 -2
- package/dist/types/components/accordion/accordion.interfaces.d.ts +7 -0
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +1 -1
- package/dist/types/components/slide-toggle/slide-toggle.d.ts +18 -0
- package/dist/types/components/slide-toggle/slide-toggle.interfaces.d.ts +5 -0
- package/dist/types/components.d.ts +53 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/is-interactive-element.d.ts +1 -0
- package/package.json +2 -2
- package/dist/dso-toolkit/p-a608d3bd.entry.js +0 -1
- package/dist/dso-toolkit/p-bcd19ae7.entry.js +0 -1
- package/dist/dso-toolkit/p-c74ac576.entry.js +0 -1
|
@@ -21,7 +21,7 @@ export class Modal {
|
|
|
21
21
|
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate({ onDeactivate: () => undefined }); // override FocusTrap onDeactivate callback to avoid double event emits
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Fragment, null, h("div", { class: "dso-modal-overlay" }), h("div", { class: "dso-modal", role: this.role, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.modalElement = element) }, h("div", { class: "dso-dialog", role: "document", ref: (element) => (this.dialogElement = element) }, this.modalTitle ? (h("div", { class: "dso-header" }, h("h2", { id: this.ariaId }, this.modalTitle), this.showCloseButton && (h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "Sluiten"))))) : (h("span", { class: "sr-only", id: this.ariaId }, "Dialoog")), h("div", { class: "dso-body" }, h("slot", { name: "body" })), this.hasFooter && (h("div", { class: "dso-footer" }, h("slot", { name: "footer" })))))));
|
|
24
|
+
return (h(Fragment, null, h("div", { class: "dso-modal-overlay" }), h("div", { class: "dso-modal", role: this.role, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.modalElement = element) }, h("div", { class: "dso-dialog", role: "document", ref: (element) => (this.dialogElement = element) }, this.modalTitle ? (h("div", { class: "dso-header" }, h("h2", { id: this.ariaId }, this.modalTitle), this.showCloseButton && (h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "Sluiten"))))) : (h("span", { class: "sr-only", id: this.ariaId }, "Dialoog")), h("div", { class: "dso-body", tabIndex: 0 }, h("slot", { name: "body" })), this.hasFooter && (h("div", { class: "dso-footer" }, h("slot", { name: "footer" })))))));
|
|
25
25
|
}
|
|
26
26
|
setFocusTrap() {
|
|
27
27
|
if (this.dialogElement && !this.trap) {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
button.dso-slider {
|
|
2
|
+
border: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
button.dso-slider:focus-visible {
|
|
6
|
+
outline: 2px solid #323232;
|
|
7
|
+
outline-offset: 1px;
|
|
8
|
+
}
|
|
9
|
+
button.dso-slider svg rect {
|
|
10
|
+
fill: #999;
|
|
11
|
+
transition: fill 0.25s;
|
|
12
|
+
}
|
|
13
|
+
button.dso-slider svg circle {
|
|
14
|
+
transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
15
|
+
transform: translateX(10px);
|
|
16
|
+
fill: #fff;
|
|
17
|
+
}
|
|
18
|
+
button.dso-slider[aria-checked=true] svg rect {
|
|
19
|
+
fill: #275937;
|
|
20
|
+
}
|
|
21
|
+
button.dso-slider[aria-checked=true] svg circle {
|
|
22
|
+
transform: translateX(30px);
|
|
23
|
+
fill: #fff;
|
|
24
|
+
}
|
|
25
|
+
button.dso-slider[disabled] svg rect {
|
|
26
|
+
fill: #ccc;
|
|
27
|
+
}
|
|
28
|
+
button.dso-slider[disabled] svg circle {
|
|
29
|
+
fill: #e5e5e5;
|
|
30
|
+
}
|
|
31
|
+
button.dso-slider[disabled][aria-checked=true] svg rect {
|
|
32
|
+
fill: #a8bcaf;
|
|
33
|
+
}
|
|
34
|
+
button.dso-slider[disabled][aria-checked=true] svg circle {
|
|
35
|
+
fill: #e5e5e5;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dso-slider {
|
|
39
|
+
border-radius: 24px;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
}
|
|
42
|
+
.dso-slider:hover {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { h, Fragment } from "@stencil/core";
|
|
2
|
+
import { v4 } from "uuid";
|
|
3
|
+
export class SlideToggle {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.checked = false;
|
|
6
|
+
this.disabled = false;
|
|
7
|
+
this.accessibleLabel = undefined;
|
|
8
|
+
this.labelledbyId = undefined;
|
|
9
|
+
this.hasVisibleLabel = undefined;
|
|
10
|
+
this.identifier = v4();
|
|
11
|
+
}
|
|
12
|
+
handleSwitch(e) {
|
|
13
|
+
this.dsoActiveChange.emit({
|
|
14
|
+
originalEvent: e,
|
|
15
|
+
checked: !this.checked,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
this.hasVisibleLabel = this.host.querySelector("*") !== null;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Fragment, null, h("button", Object.assign({ id: this.identifier, role: "switch", class: "dso-slider", "aria-checked": "" + this.checked, disabled: this.disabled, onClick: (e) => this.handleSwitch(e) }, (this.accessibleLabel ? { "aria-label": this.accessibleLabel } : {}), (this.labelledbyId ? { "aria-labelledby": this.labelledbyId } : {})), h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "40", height: "20", viewBox: "0 0 40 20" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("rect", { width: "40", height: "20", fill: "currentColor", rx: "10" }), h("circle", { cy: "10", r: "8", fill: "currentColor" })))), this.hasVisibleLabel && (h("label", { htmlFor: this.identifier }, h("slot", null)))));
|
|
23
|
+
}
|
|
24
|
+
static get is() { return "dso-slide-toggle"; }
|
|
25
|
+
static get originalStyleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["slide-toggle.scss"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get styleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["slide-toggle.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
"checked": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "boolean",
|
|
42
|
+
"resolved": "boolean",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [],
|
|
49
|
+
"text": ""
|
|
50
|
+
},
|
|
51
|
+
"attribute": "checked",
|
|
52
|
+
"reflect": false,
|
|
53
|
+
"defaultValue": "false"
|
|
54
|
+
},
|
|
55
|
+
"disabled": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "boolean",
|
|
60
|
+
"resolved": "boolean",
|
|
61
|
+
"references": {}
|
|
62
|
+
},
|
|
63
|
+
"required": false,
|
|
64
|
+
"optional": false,
|
|
65
|
+
"docs": {
|
|
66
|
+
"tags": [],
|
|
67
|
+
"text": ""
|
|
68
|
+
},
|
|
69
|
+
"attribute": "disabled",
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"defaultValue": "false"
|
|
72
|
+
},
|
|
73
|
+
"accessibleLabel": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "string",
|
|
78
|
+
"resolved": "string | undefined",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": true,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component"
|
|
86
|
+
},
|
|
87
|
+
"attribute": "accessible-label",
|
|
88
|
+
"reflect": false
|
|
89
|
+
},
|
|
90
|
+
"labelledbyId": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "string",
|
|
95
|
+
"resolved": "string | undefined",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": true,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": "Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button"
|
|
103
|
+
},
|
|
104
|
+
"attribute": "labelledby-id",
|
|
105
|
+
"reflect": false
|
|
106
|
+
},
|
|
107
|
+
"identifier": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "string",
|
|
112
|
+
"resolved": "string",
|
|
113
|
+
"references": {}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": "Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for=\"id\">`"
|
|
120
|
+
},
|
|
121
|
+
"attribute": "identifier",
|
|
122
|
+
"reflect": false,
|
|
123
|
+
"defaultValue": "v4()"
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
static get states() {
|
|
128
|
+
return {
|
|
129
|
+
"hasVisibleLabel": {}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
static get events() {
|
|
133
|
+
return [{
|
|
134
|
+
"method": "dsoActiveChange",
|
|
135
|
+
"name": "dsoActiveChange",
|
|
136
|
+
"bubbles": true,
|
|
137
|
+
"cancelable": true,
|
|
138
|
+
"composed": true,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
},
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "SlideToggleActiveEvent",
|
|
145
|
+
"resolved": "SlideToggleActiveEvent",
|
|
146
|
+
"references": {
|
|
147
|
+
"SlideToggleActiveEvent": {
|
|
148
|
+
"location": "import",
|
|
149
|
+
"path": "./slide-toggle.interfaces"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}];
|
|
154
|
+
}
|
|
155
|
+
static get elementRef() { return "host"; }
|
|
156
|
+
}
|
package/dist/collection/index.js
CHANGED
|
@@ -12,5 +12,6 @@ export * from "./components/ozon-content/ozon-content.interfaces";
|
|
|
12
12
|
export * from "./components/pagination/pagination.interfaces";
|
|
13
13
|
export * from "./components/responsive-element/responsive-element.interfaces";
|
|
14
14
|
export * from "./components/selectable/selectable.interfaces";
|
|
15
|
+
export * from "./components/slide-toggle/slide-toggle.interfaces";
|
|
15
16
|
export * from "./components/tree-view/tree-view.interfaces";
|
|
16
17
|
export * from "./components/viewer-grid/viewer-grid.interfaces";
|
|
@@ -72,7 +72,7 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
72
72
|
options.setAttribute("role", "menu");
|
|
73
73
|
options.setAttribute("aria-labelledby", this.button.id);
|
|
74
74
|
for (const ul of Array.from(this.host.getElementsByTagName("ul"))) {
|
|
75
|
-
ul.setAttribute("role", "
|
|
75
|
+
ul.setAttribute("role", "group");
|
|
76
76
|
for (const li of Array.from(ul.getElementsByTagName("li"))) {
|
|
77
77
|
li.setAttribute("role", "none");
|
|
78
78
|
}
|
|
@@ -82,11 +82,8 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
82
82
|
for (const li of Array.from(this.host.getElementsByTagName("li"))) {
|
|
83
83
|
for (const tab of tabbable(li)) {
|
|
84
84
|
tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
|
|
85
|
-
if (this.checkable
|
|
86
|
-
tab.setAttribute("aria-checked", "
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
tab.removeAttribute("aria-checked");
|
|
85
|
+
if (this.checkable) {
|
|
86
|
+
tab.setAttribute("aria-checked", li.classList.contains("dso-checked").toString());
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
89
|
}
|
|
@@ -1315,6 +1315,7 @@ const stateMap = {
|
|
|
1315
1315
|
info: "info:",
|
|
1316
1316
|
warning: "waarschuwing:",
|
|
1317
1317
|
danger: "fout:",
|
|
1318
|
+
error: "fout:",
|
|
1318
1319
|
};
|
|
1319
1320
|
|
|
1320
1321
|
const HandleElement = ({ handleUrl, onClick, open }, children) => {
|
|
@@ -1339,6 +1340,9 @@ const Handle = ({ heading, ref }, children) => {
|
|
|
1339
1340
|
};
|
|
1340
1341
|
|
|
1341
1342
|
const HandleStateIcon = ({ state }) => {
|
|
1343
|
+
if (state === "error") {
|
|
1344
|
+
return h("dso-icon", { icon: "status-error" });
|
|
1345
|
+
}
|
|
1342
1346
|
if (state === "danger") {
|
|
1343
1347
|
return h("dso-icon", { icon: "status-danger" });
|
|
1344
1348
|
}
|
|
@@ -1365,7 +1369,7 @@ const HandleIcon = ({ state, icon, attachmentCount }) => {
|
|
|
1365
1369
|
}
|
|
1366
1370
|
};
|
|
1367
1371
|
|
|
1368
|
-
const accordionSectionCss = "*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}:host{display:block}:host .dso-section-handle{font-size:1em;font-weight:600;line-height:1.375em;margin:0;position:relative}:host .dso-section-handle>a:active{text-decoration:none}:host .dso-section-handle a{text-decoration:none}:host .dso-section-handle a:hover,:host .dso-section-handle a:focus{text-decoration:none}:host .dso-section-handle a:active{text-decoration:underline}:host .dso-section-handle .dso-status{font-weight:400;text-decoration:underline}:host .dso-section-handle>button,:host .dso-section-handle>a{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;font-family:Asap, sans-serif;font-size:1em;font-weight:600;line-height:1.375em;margin:0;padding:12px 16px 12px;text-align:start;width:100%;word-break:break-word}:host .dso-section-handle>button dso-icon,:host .dso-section-handle>a dso-icon{flex-shrink:0}:host .dso-section-handle>button dso-icon.dso-section-handle-chevron,:host .dso-section-handle>a dso-icon.dso-section-handle-chevron{
|
|
1372
|
+
const accordionSectionCss = "*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}:host{display:block}:host .dso-section-handle{font-size:1em;font-weight:600;line-height:1.375em;margin:0;position:relative}:host .dso-section-handle>a:active{text-decoration:none}:host .dso-section-handle a{text-decoration:none}:host .dso-section-handle a:hover,:host .dso-section-handle a:focus{text-decoration:none}:host .dso-section-handle a:active{text-decoration:underline}:host .dso-section-handle .dso-status{font-weight:400;text-decoration:underline}:host .dso-section-handle>button,:host .dso-section-handle>a{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;font-family:Asap, sans-serif;font-size:1em;font-weight:600;line-height:1.375em;margin:0;padding:12px 16px 12px;text-align:start;width:100%;word-break:break-word}:host .dso-section-handle>button dso-icon,:host .dso-section-handle>a dso-icon{flex-shrink:0}:host .dso-section-handle>button dso-icon.dso-section-handle-chevron,:host .dso-section-handle>a dso-icon.dso-section-handle-chevron{transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transform:rotate(0)}:host .dso-section-handle>button>.dso-section-handle-addons:first-child,:host .dso-section-handle>button>dso-icon:first-child,:host .dso-section-handle>a>.dso-section-handle-addons:first-child,:host .dso-section-handle>a>dso-icon:first-child{margin-right:8px}:host .dso-section-handle>button>dso-icon:last-child,:host .dso-section-handle>a>dso-icon:last-child{margin-left:auto}:host .dso-section-handle>button>.dso-section-handle-addons:last-child,:host .dso-section-handle>a>.dso-section-handle-addons:last-child{margin-left:auto}:host .dso-section-handle>button>.dso-section-handle-addons:last-child dso-attachments-counter,:host .dso-section-handle>button>.dso-section-handle-addons:last-child dso-icon,:host .dso-section-handle>a>.dso-section-handle-addons:last-child dso-attachments-counter,:host .dso-section-handle>a>.dso-section-handle-addons:last-child dso-icon{margin-left:16px}:host([open]) .dso-section-body{position:inherit;visibility:inherit}:host([open]) .dso-section-handle>button .dso-section-handle-chevron:first-child,:host([open]) .dso-section-handle>a .dso-section-handle-chevron:first-child{transform:rotate(90deg)}:host([open]) .dso-section-handle>button .dso-section-handle-chevron:last-child,:host([open]) .dso-section-handle>a .dso-section-handle-chevron:last-child{transform:rotate(-180deg)}.dso-section-body{background-color:#fff;border-top:0;margin-top:-4px;overflow-y:hidden}.dso-section-body:not(.dso-animate-ready){position:absolute;visibility:hidden}.dso-section-body .dso-section-body-content{padding:20px 16px 16px}:host(.dso-accordion-default) .dso-section-handle{background-color:#fff;border:1px solid #8b4a6a;border-radius:4px}:host(.dso-accordion-default) .dso-section-handle a,:host(.dso-accordion-default) .dso-section-handle button{color:#8b4a6a}:host(.dso-accordion-default) .dso-section-handle a:hover,:host(.dso-accordion-default) .dso-section-handle a:active,:host(.dso-accordion-default) .dso-section-handle a.active,:host(.dso-accordion-default) .dso-section-handle button:hover,:host(.dso-accordion-default) .dso-section-handle button:active,:host(.dso-accordion-default) .dso-section-handle button.active{color:#8b4a6a}:host(.dso-accordion-default) .dso-section-body{border:1px solid #8b4a6a;border-radius:0 0 4px 4px}:host(.dso-accordion-default[open])>.dso-section-handle{background-color:#8b4a6a;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}:host(.dso-accordion-default[open])>.dso-section-handle a,:host(.dso-accordion-default[open])>.dso-section-handle button{color:#fff}:host(.dso-accordion-default[open])>.dso-section-handle a dso-attachments-counter,:host(.dso-accordion-default[open])>.dso-section-handle button dso-attachments-counter{--dso-attachments-counter-color:#fff;--dso-icon:var(--di-paperclip-wit)}:host(.dso-accordion-default.dso-nested-accordion[open]) .dso-section-body{background-color:#e5e5e5}:host(.dso-accordion-compact) .dso-section-handle{border-bottom:1px solid transparent;border-top:1px solid #ccc}:host(.dso-accordion-compact) .dso-section-handle a,:host(.dso-accordion-compact) .dso-section-handle button{color:#39870c;padding-bottom:11px;padding-left:0;padding-top:11px}:host(.dso-accordion-compact) .dso-section-handle a:hover,:host(.dso-accordion-compact) .dso-section-handle a:active,:host(.dso-accordion-compact) .dso-section-handle a.active,:host(.dso-accordion-compact) .dso-section-handle button:hover,:host(.dso-accordion-compact) .dso-section-handle button:active,:host(.dso-accordion-compact) .dso-section-handle button.active{color:#39870c}:host(.dso-accordion-compact) .dso-section-body .dso-section-body-content{padding-left:32px;padding-top:0;padding-right:0}:host(.dso-accordion-compact.dso-accordion-reverse-align) .dso-section-handle a,:host(.dso-accordion-compact.dso-accordion-reverse-align) .dso-section-handle button{padding-left:16px}:host(.dso-accordion-compact.dso-accordion-reverse-align) .dso-section-body .dso-section-body-content{padding-left:16px;padding-right:0}:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle{background-color:transparent}:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle a,:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle button{color:#39870c}: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,:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle button:hover,:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle button:active,:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle button.active{color:#39870c}:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle a dso-attachments-counter,:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-handle button dso-attachments-counter{--dso-attachments-counter-color:#666;--dso-icon:var(--di-paperclip-grijs)}:host(.dso-accordion-compact[open]:not(.dso-nested-accordion))>.dso-section-body{border-top:0}:host(.dso-accordion-compact.dso-nested-accordion[open])>.dso-section-body{padding-bottom:0}:host(.dso-accordion-compact.dso-nested-accordion[open])>.dso-section-body dso-accordion-section:last-child{border-bottom:0}:host(.dso-accordion-conclusion) .dso-section-handle{background-color:#f2f2f2;border:1px solid #f2f2f2}:host(.dso-accordion-conclusion) .dso-section-handle a,:host(.dso-accordion-conclusion) .dso-section-handle button{color:#191919}:host(.dso-accordion-conclusion) .dso-section-handle a:hover,:host(.dso-accordion-conclusion) .dso-section-handle a:active,:host(.dso-accordion-conclusion) .dso-section-handle a.active,:host(.dso-accordion-conclusion) .dso-section-handle button:hover,:host(.dso-accordion-conclusion) .dso-section-handle button:active,:host(.dso-accordion-conclusion) .dso-section-handle button.active{background-color:#e5e5e5;color:#191919}:host(.dso-accordion-conclusion) .dso-section-body{border:2px solid #f2f2f2}:host(.dso-accordion-conclusion[open]:not(.dso-nested-accordion))>.dso-section-handle{background-color:#f2f2f2}:host(.dso-accordion-conclusion[open]:not(.dso-nested-accordion))>.dso-section-handle a,:host(.dso-accordion-conclusion[open]:not(.dso-nested-accordion))>.dso-section-handle button{color:#191919}:host(.dso-accordion-conclusion[open]:not(.dso-nested-accordion))>.dso-section-handle a dso-attachments-counter,:host(.dso-accordion-conclusion[open]:not(.dso-nested-accordion))>.dso-section-handle button dso-attachments-counter{--dso-attachments-counter-color:#666;--dso-icon:var(--di-paperclip-grijs)}:host(.dso-accordion-conclusion.dso-nested-accordion[open]){background-color:#fff}";
|
|
1369
1373
|
|
|
1370
1374
|
const AccordionSection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
1371
1375
|
constructor() {
|
|
@@ -1498,6 +1502,8 @@ const AccordionSection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
1498
1502
|
autoplay: false,
|
|
1499
1503
|
direction: "normal",
|
|
1500
1504
|
changeComplete: async () => {
|
|
1505
|
+
var _a;
|
|
1506
|
+
(_a = this.accordion) === null || _a === void 0 ? void 0 : _a.animationEnd(this.host);
|
|
1501
1507
|
if (AccordionSection.scrollCandidate === this.host) {
|
|
1502
1508
|
AccordionSection.scrollCandidate = undefined;
|
|
1503
1509
|
await this.scrollSectionIntoView();
|
|
@@ -199,6 +199,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
199
199
|
this.__registerHost();
|
|
200
200
|
this.__attachShadow();
|
|
201
201
|
this.dsoToggleSection = createEvent(this, "dsoToggleSection", 7);
|
|
202
|
+
this.dsoToggleSectionAnimationEnd = createEvent(this, "dsoToggleSectionAnimationEnd", 7);
|
|
202
203
|
this.variant = "default";
|
|
203
204
|
this.reverseAlign = false;
|
|
204
205
|
this.allowMultipleOpen = false;
|
|
@@ -217,8 +218,6 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
217
218
|
}
|
|
218
219
|
updateAllowMultipleOpen(allowMultipleOpen) {
|
|
219
220
|
this.accordionState.allowMultipleOpen = allowMultipleOpen;
|
|
220
|
-
}
|
|
221
|
-
watchAllowMultiple(allowMultipleOpen) {
|
|
222
221
|
if (!allowMultipleOpen) {
|
|
223
222
|
const openSections = Array.from(this.host.querySelectorAll(":scope > dso-accordion-section[open]"));
|
|
224
223
|
// By removing the first section, it is kept open;
|
|
@@ -257,6 +256,14 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
257
256
|
this.emitToggleEvent(sectionElement, sections, event);
|
|
258
257
|
return true;
|
|
259
258
|
}
|
|
259
|
+
async animationEnd(sectionElement) {
|
|
260
|
+
this.dsoToggleSectionAnimationEnd.emit({
|
|
261
|
+
section: {
|
|
262
|
+
element: sectionElement,
|
|
263
|
+
open: this.isSectionOpen(sectionElement),
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
}
|
|
260
267
|
/** Closes all sections belonging to this accordion. */
|
|
261
268
|
async closeOpenSections() {
|
|
262
269
|
const sections = Array.from(this.host.querySelectorAll(":scope > dso-accordion-section"));
|
|
@@ -305,7 +312,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
305
312
|
static get watchers() { return {
|
|
306
313
|
"variant": ["updateVariant"],
|
|
307
314
|
"reverseAlign": ["updateReverseAlign"],
|
|
308
|
-
"allowMultipleOpen": ["updateAllowMultipleOpen"
|
|
315
|
+
"allowMultipleOpen": ["updateAllowMultipleOpen"]
|
|
309
316
|
}; }
|
|
310
317
|
static get style() { return accordionCss; }
|
|
311
318
|
}, [1, "dso-accordion", {
|
|
@@ -314,6 +321,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
314
321
|
"allowMultipleOpen": [516, "allow-multiple-open"],
|
|
315
322
|
"getState": [64],
|
|
316
323
|
"toggleSection": [64],
|
|
324
|
+
"animationEnd": [64],
|
|
317
325
|
"closeOpenSections": [64]
|
|
318
326
|
}]);
|
|
319
327
|
function defineCustomElement$1() {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { i as isModifiedEvent } from './is-modified-event.js';
|
|
3
3
|
|
|
4
|
+
const isInteractiveElement = (element) => {
|
|
5
|
+
return (element instanceof HTMLButtonElement ||
|
|
6
|
+
element instanceof HTMLAnchorElement ||
|
|
7
|
+
element instanceof HTMLInputElement ||
|
|
8
|
+
element.tagName.startsWith("DSO-TOGGLETIP"));
|
|
9
|
+
};
|
|
10
|
+
|
|
4
11
|
const cardCss = ":host .dso-card-selectable,:host .dso-card-image{grid-row:span 2}*,*::after,*::before{box-sizing:border-box}:host{display:block}:host .dso-card-heading{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}@media screen and (max-width: 480px){:host .dso-card-heading{flex-wrap:wrap}}:host .dso-card-image{margin-right:8px}";
|
|
5
12
|
|
|
6
13
|
const Card = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -18,10 +25,7 @@ const Card = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
18
25
|
}
|
|
19
26
|
let element = e.target;
|
|
20
27
|
while (element !== this.host && element !== null) {
|
|
21
|
-
if (element
|
|
22
|
-
element instanceof HTMLAnchorElement ||
|
|
23
|
-
element instanceof HTMLInputElement ||
|
|
24
|
-
element === null) {
|
|
28
|
+
if (isInteractiveElement(element) || element === null) {
|
|
25
29
|
return;
|
|
26
30
|
}
|
|
27
31
|
if (element.parentNode instanceof ShadowRoot && element.parentNode.host instanceof HTMLElement) {
|
|
@@ -3,7 +3,7 @@ import { c as createFocusTrap } from './focus-trap.esm.js';
|
|
|
3
3
|
import { c as clsx } from './clsx.m.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
5
5
|
|
|
6
|
-
const listButtonCss = "*,\n*::after,\n*::before {\n box-sizing: border-box;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.dso-manual-input-button {\n cursor: text;\n}\n\n.dso-tertiary {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n border: 0;\n color: #39870c;\n line-height: 1;\n padding: 0;\n background-color: transparent;\n cursor: pointer;\n}\n.dso-tertiary:focus, .dso-tertiary:focus-visible {\n outline-offset: 2px;\n}\n.dso-tertiary:active {\n outline: 0;\n}\n.dso-tertiary[disabled] {\n color: #afcf9d;\n}\n.dso-tertiary[disabled].dso-spinner-left, .dso-tertiary[disabled].dso-spinner-right {\n color: #39870c;\n}\n.dso-tertiary:not([disabled]):hover {\n color: #676cb0;\n text-decoration: underline;\n text-underline-position: under;\n}\n.dso-tertiary:not([disabled]):active {\n color: #676cb0;\n}\n.dso-tertiary.btn-align {\n line-height: calc(1.5em - 1px);\n padding: 11px 0;\n position: relative;\n}\n.dso-tertiary.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-right: 8px;\n}\n.dso-tertiary.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-left: 8px;\n}\n.dso-tertiary dso-icon + span:not(.sr-only),\n.dso-tertiary svg.di + span:not(.sr-only),\n.dso-tertiary span:not(.sr-only) + dso-icon,\n.dso-tertiary span:not(.sr-only) + svg.di {\n margin-left: 8px;\n}\n.dso-tertiary svg.di.di-chevron-down + span:not(.sr-only),\n.dso-tertiary svg.di.di-chevron-up + span:not(.sr-only),\n.dso-tertiary span:not(.sr-only) + svg.di.di-chevron-down,\n.dso-tertiary span:not(.sr-only) + svg.di.di-chevron-up {\n margin-left: 4px;\n}\n.dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only),\n.dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only),\n.dso-tertiary svg.di.di-angle-down + span:not(.sr-only),\n.dso-tertiary svg.di.di-angle-up + span:not(.sr-only),\n.dso-tertiary span:not(.sr-only) + svg.di.di-angle-down,\n.dso-tertiary span:not(.sr-only) + svg.di.di-angle-up,\n.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left],\n.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] {\n margin-left: 0;\n}\n.dso-tertiary dso-icon,\n.dso-tertiary svg.di,\n.dso-tertiary span {\n vertical-align: middle;\n}\n\n.dso-input-number:not(.form-group) {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n}\n.dso-input-number label {\n width: 100%;\n}\n.dso-input-number .dso-input-step-counter {\n align-self: center;\n background-color: transparent;\n border: 0;\n display: inline-block;\n height: 1.5rem;\n text-align: center;\n width: 1.5rem;\n}\n.dso-input-number .dso-input-step-counter:focus, .dso-input-number .dso-input-step-counter:active {\n outline: 0;\n}\n.dso-input-number .dso-input-step-counter::-webkit-outer-spin-button, .dso-input-number .dso-input-step-counter::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.dso-input-number .dso-input-step-counter[type=number] {\n -moz-appearance: textfield;\n}\n\n.dso-btn-group {\n display: flex;\n flex-direction: row;\n}\n.dso-btn-group.dso-disabled > * {\n background-color: #fff;\n border-color: #e5e5e5;\n color: #666;\n pointer-events: none;\n}\n.dso-btn-group > * {\n border-radius: 0;\n}\n.dso-btn-group > *:first-child {\n border-radius: 4px 0 0 4px;\n}\n.dso-btn-group > *:not(:first-child) {\n border-left-style: none !important;\n}\n.dso-btn-group > *:last-child {\n border-radius: 0 4px 4px 0;\n}\n.dso-btn-group > *:only-child {\n border-radius: 4px;\n}\n.dso-btn-group > .dso-input-number {\n background-color: #fff;\n border-color: #ccc;\n color: #191919;\n border-style: solid;\n border-width: 1px;\n flex-wrap: nowrap;\n padding: 0 16px;\n}\n@media screen and (max-width: 767px) {\n .dso-btn-group > .dso-input-number {\n justify-content: center;\n }\n}\n.dso-btn-group > *:hover + .dso-input-number,\n.dso-btn-group > *:focus + .dso-input-number {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-btn-group > *.dso-selected + .dso-input-number {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n border-width: 1px;\n outline: 1px solid #39870c;\n}\n.dso-btn-group > *:active + .dso-input-number, .dso-btn-group > *:active + .dso-input-number:hover,\n.dso-btn-group > *.active + .dso-input-number,\n.dso-btn-group > *.active + .dso-input-number:hover {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-btn-group > *.disabled + .dso-input-number, .dso-btn-group > *.disabled + .dso-input-number:hover,\n.dso-btn-group > *[disabled] + .dso-input-number,\n.dso-btn-group > *[disabled] + .dso-input-number:hover {\n background-color: #fff;\n border-color: #ccc;\n color: #666;\n opacity: 1;\n}\n.dso-btn-group .dso-list-button {\n padding-right: 15px;\n}\n@media screen and (max-width: 767px) {\n .dso-btn-group {\n flex-direction: column;\n }\n .dso-btn-group > *:first-child {\n border-radius: 4px 4px 0 0;\n }\n .dso-btn-group > *:not(:first-child) {\n border-left-style: solid !important;\n border-top-style: none !important;\n }\n .dso-btn-group > *:last-child {\n border-radius: 0 0 4px 4px;\n }\n .dso-btn-group > *:only-child {\n border-radius: 4px;\n }\n}\n\n.dso-selectable {\n position: relative;\n padding: 0 0 0 32px;\n}\n.dso-selectable .dso-selectable-options {\n list-style: none;\n margin-top: 8px;\n padding-left: 0;\n}\n.dso-selectable .dso-selectable-options li + li {\n margin-top: 8px;\n}\n.dso-selectable label {\n font-weight: 400;\n line-height: 24px;\n margin: 0;\n}\n.dso-selectable input[type=checkbox][disabled] + label::before, .dso-selectable input[type=checkbox][disabled]:active + label::before, .dso-selectable input[type=checkbox][disabled]:focus + label::before,\n.dso-selectable input[type=radio][disabled] + label::before,\n.dso-selectable input[type=radio][disabled]:active + label::before,\n.dso-selectable input[type=radio][disabled]:focus + label::before {\n background-color: #fff;\n box-shadow: 0 0 0 2px #e5e5e5;\n}\n.dso-selectable input[type=checkbox],\n.dso-selectable input[type=radio] {\n height: 24px;\n left: 0;\n margin: 0;\n opacity: 0;\n position: absolute;\n top: 0;\n width: 24px;\n z-index: 100;\n zoom: 1;\n}\n@media (prefers-contrast: more) {\n .dso-selectable input[type=checkbox],\n.dso-selectable input[type=radio] {\n opacity: 1;\n }\n}\n.dso-selectable input[type=checkbox]:not([disabled]),\n.dso-selectable input[type=radio]:not([disabled]) {\n cursor: pointer;\n}\n.dso-selectable input[type=checkbox] + label,\n.dso-selectable input[type=radio] + label {\n display: inline;\n font-style: normal;\n padding-left: 0;\n}\n.dso-selectable input[type=checkbox] + label::before,\n.dso-selectable input[type=radio] + label::before {\n background: #fff;\n border: 0;\n box-shadow: 0 0 0 2px var(--dso-selectable-color, #275937);\n content: \"\";\n height: 20px;\n left: 2px;\n position: absolute;\n top: 2px;\n width: 20px;\n}\n.dso-selectable input[type=checkbox]:focus,\n.dso-selectable input[type=radio]:focus {\n outline: 0;\n}\n.dso-selectable input[type=checkbox]:focus + label::before,\n.dso-selectable input[type=radio]:focus + label::before {\n box-shadow: 0 0 0 3px var(--dso-selectable-color, #275937);\n height: 18px;\n left: 3px;\n top: 3px;\n width: 18px;\n}\n.dso-selectable input[type=checkbox]:active + label::before, .dso-selectable input[type=checkbox].active + label::before,\n.dso-selectable input[type=radio]:active + label::before,\n.dso-selectable input[type=radio].active + label::before {\n background-color: #ebf3e6;\n box-shadow: 0 0 0 1px #275937;\n height: 22px;\n left: 1px;\n top: 1px;\n width: 22px;\n}\n.dso-selectable input[type=checkbox] + label::before {\n border-radius: 4px;\n}\n.dso-selectable input[type=checkbox] + label::after {\n background: transparent;\n content: \"\";\n left: 6px;\n opacity: 0;\n position: absolute;\n top: 6px;\n zoom: 1;\n}\n.dso-selectable input[type=checkbox]:checked + label::after, .dso-selectable input[type=checkbox]:indeterminate + label::after {\n opacity: 1;\n}\n.dso-selectable input[type=checkbox]:checked + label::after {\n border: solid;\n border-color: var(--dso-selectable-color, #39870c);\n border-top-color: transparent;\n border-width: 0 0 3px 3px;\n height: 8px;\n transform: rotate(-45deg);\n width: 13px;\n}\n.dso-selectable input[type=checkbox]:indeterminate + label::after {\n background-color: var(--dso-selectable-color, #39870c);\n height: 12px;\n width: 12px;\n}\n.dso-selectable input[type=radio] + label::before {\n border-radius: 50%;\n}\n.dso-selectable input[type=radio] + label::after {\n background-color: transparent;\n border-radius: 50%;\n content: \"\";\n height: 12px;\n left: 6px;\n opacity: 0;\n position: absolute;\n top: 6px;\n width: 12px;\n zoom: 1;\n}\n.dso-selectable input[type=radio]:checked + label::after {\n background-color: var(--dso-selectable-color, #39870c);\n opacity: 1;\n}\n.dso-selectable > dso-info {\n float: none;\n margin: 8px 16px 0 -32px;\n width: calc(100% + 32px);\n}\n.dso-selectable label {\n font-weight: 700;\n}\n\n.dso-list-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #ccc;\n color: #191919;\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n font-weight: 600;\n padding: 15px 47px 15px 15px;\n position: relative;\n text-align: left;\n white-space: normal;\n width: 100%;\n}\n.dso-list-button:focus, .dso-list-button:focus-visible {\n outline-offset: 2px;\n}\n.dso-list-button:active {\n outline: 0;\n}\n.dso-list-button:hover, .dso-list-button:focus {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-list-button:active, .dso-list-button:active:hover, .dso-list-button.active, .dso-list-button.active:hover {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-list-button.disabled, .dso-list-button.disabled:hover, .dso-list-button[disabled], .dso-list-button[disabled]:hover {\n background-color: #fff;\n border-color: #ccc;\n color: #666;\n opacity: 1;\n}\n.dso-list-button.dso-selected {\n border-color: #39870c;\n border-width: 1px;\n outline: 1px solid #39870c;\n}\n.dso-list-button.dso-selected.dso-single-count {\n position: relative;\n}\n.dso-list-button.dso-selected.dso-single-count::after {\n background-color: #fff;\n bottom: 0;\n content: \"\";\n display: inline-block;\n position: absolute;\n right: -2px;\n top: 0;\n width: 2px;\n}\n.dso-list-button > span {\n display: block;\n}\n.dso-list-button .dso-sublabel {\n font-weight: 400;\n width: 100%;\n}\n.dso-list-button .dso-subcontent {\n color: #666;\n font-weight: 400;\n padding: 16px 0 0 16px;\n}\n.dso-list-button .dso-subcontent mark {\n background-color: transparent;\n color: #666;\n font-weight: 700;\n padding: 0;\n}\n.dso-list-button dso-icon,\n.dso-list-button svg.di,\n.dso-list-button .dso-count {\n height: 24px;\n position: absolute;\n right: 15px;\n top: 15px;\n width: 24px;\n}\n.dso-list-button dso-icon,\n.dso-list-button svg.di {\n color: #39870c;\n page-break-before: always;\n}\n.dso-list-button .dso-count {\n font-weight: 700;\n}\n@media screen and (max-width: 767px) {\n .dso-list-button.dso-selected.dso-single-count::after {\n width: 0;\n }\n}\n.dso-list-button .dso-sublabel {\n padding-left: 32px;\n}\n.dso-list-button .dso-subcontent {\n padding-left: 48px;\n padding-top: 8px;\n}\n\n.dso-list-button + .dso-list-button,\n.dso-list-button + .dso-btn-group,\n.dso-btn-group + .dso-list-button,\n.dso-btn-group + .dso-btn-group {\n margin-top: 4px;\n}\n\n.dso-input-wrapper {\n position: relative;\n}\n.dso-input-wrapper .form-control {\n width: 9ch;\n}\n\n.form-control {\n display: block;\n width: 100%;\n height: 40px;\n padding: 6px 14px;\n font-size: 1rem;\n line-height: 1.5;\n color: #191919;\n background-color: #fff;\n background-image: none;\n border: 1px solid #275937;\n border-radius: 4px;\n transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n}\n.form-control::-moz-placeholder {\n color: #666;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #666;\n}\n.form-control::-webkit-input-placeholder {\n color: #666;\n}\n.form-control::-ms-expand {\n background-color: transparent;\n border: 0;\n}\n.form-control:focus {\n border-color: #275937;\n outline: 0;\n box-shadow: inset 0 0 0 1px #275937;\n}\n.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {\n background-color: #fff;\n opacity: 1;\n}\n.form-control[disabled], fieldset[disabled] .form-control {\n cursor: default;\n}\n.form-control[disabled] {\n border-color: #e5e5e5;\n color: #999;\n}\n.form-control[readonly] {\n border-width: 1px;\n}\n.form-control[type=text] {\n line-height: 40px;\n}\n.form-control[size] {\n width: auto;\n}\n\n.dso-manual-input-button[type=button] {\n background-color: transparent;\n border: 0;\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.hidden {\n display: none !important;\n}";
|
|
6
|
+
const listButtonCss = "*,\n*::after,\n*::before {\n box-sizing: border-box;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.dso-manual-input-button {\n cursor: text;\n}\n\n.dso-tertiary {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n border: 0;\n color: #39870c;\n line-height: 1;\n padding: 0;\n background-color: transparent;\n cursor: pointer;\n}\n.dso-tertiary:focus, .dso-tertiary:focus-visible {\n outline-offset: 2px;\n}\n.dso-tertiary:active {\n outline: 0;\n}\n.dso-tertiary[disabled] {\n color: #afcf9d;\n}\n.dso-tertiary[disabled].dso-spinner-left, .dso-tertiary[disabled].dso-spinner-right {\n color: #39870c;\n}\n.dso-tertiary:not([disabled]):hover {\n color: #676cb0;\n text-decoration: underline;\n text-underline-position: under;\n}\n.dso-tertiary:not([disabled]):active {\n color: #676cb0;\n}\n.dso-tertiary.btn-align {\n line-height: calc(1.5em - 1px);\n padding: 11px 0;\n position: relative;\n}\n.dso-tertiary.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-right: 8px;\n}\n.dso-tertiary.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-left: 8px;\n}\n.dso-tertiary dso-icon + span:not(.sr-only),\n.dso-tertiary svg.di + span:not(.sr-only),\n.dso-tertiary span:not(.sr-only) + dso-icon,\n.dso-tertiary span:not(.sr-only) + svg.di {\n margin-left: 8px;\n}\n.dso-tertiary svg.di.di-chevron-down + span:not(.sr-only),\n.dso-tertiary svg.di.di-chevron-up + span:not(.sr-only),\n.dso-tertiary span:not(.sr-only) + svg.di.di-chevron-down,\n.dso-tertiary span:not(.sr-only) + svg.di.di-chevron-up {\n margin-left: 4px;\n}\n.dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only),\n.dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only),\n.dso-tertiary svg.di.di-angle-down + span:not(.sr-only),\n.dso-tertiary svg.di.di-angle-up + span:not(.sr-only),\n.dso-tertiary span:not(.sr-only) + svg.di.di-angle-down,\n.dso-tertiary span:not(.sr-only) + svg.di.di-angle-up,\n.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left],\n.dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] {\n margin-left: 0;\n}\n.dso-tertiary dso-icon,\n.dso-tertiary svg.di,\n.dso-tertiary span {\n vertical-align: middle;\n}\n\n.dso-input-number:not(.form-group) {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n}\n.dso-input-number label {\n width: 100%;\n}\n.dso-input-number .dso-input-step-counter {\n align-self: center;\n background-color: transparent;\n border: 0;\n display: inline-block;\n height: 1.5rem;\n text-align: center;\n width: 1.5rem;\n}\n.dso-input-number .dso-input-step-counter:focus, .dso-input-number .dso-input-step-counter:active {\n outline: 0;\n}\n.dso-input-number .dso-input-step-counter::-webkit-outer-spin-button, .dso-input-number .dso-input-step-counter::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.dso-input-number .dso-input-step-counter[type=number] {\n -moz-appearance: textfield;\n}\n\n.dso-btn-group {\n display: flex;\n flex-direction: row;\n}\n.dso-btn-group.dso-disabled > * {\n background-color: #fff;\n border-color: #e5e5e5;\n color: #666;\n pointer-events: none;\n}\n.dso-btn-group > * {\n border-radius: 0;\n}\n.dso-btn-group > *:first-child {\n border-radius: 4px 0 0 4px;\n}\n.dso-btn-group > *:not(:first-child) {\n border-left-style: none !important;\n}\n.dso-btn-group > *:last-child {\n border-radius: 0 4px 4px 0;\n}\n.dso-btn-group > *:only-child {\n border-radius: 4px;\n}\n.dso-btn-group > .dso-input-number {\n background-color: #fff;\n border-color: #ccc;\n color: #191919;\n border-style: solid;\n border-width: 1px;\n flex-wrap: nowrap;\n padding: 0 16px;\n}\n@media screen and (max-width: 767px) {\n .dso-btn-group > .dso-input-number {\n justify-content: center;\n }\n}\n.dso-btn-group > *:hover + .dso-input-number,\n.dso-btn-group > *:focus + .dso-input-number {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-btn-group > *.dso-selected + .dso-input-number {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n@media screen and (max-width: 767px) {\n .dso-btn-group > *.dso-selected + .dso-input-number {\n box-shadow: inset 0 -1px 0 0 #39870c, inset 0 0 0 0 #39870c, inset -1px 0 0 0 #39870c, inset 1px 0 0 0 #39870c;\n }\n}\n@media screen and (min-width: 768px) {\n .dso-btn-group > *.dso-selected + .dso-input-number {\n box-shadow: inset 0 -1px 0 0 #39870c, inset 0 1px 0 0 #39870c, inset -1px 0 0 0 #39870c;\n }\n}\n.dso-btn-group > *:active + .dso-input-number, .dso-btn-group > *:active + .dso-input-number:hover,\n.dso-btn-group > *.active + .dso-input-number,\n.dso-btn-group > *.active + .dso-input-number:hover {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-btn-group > *.disabled + .dso-input-number, .dso-btn-group > *.disabled + .dso-input-number:hover,\n.dso-btn-group > *[disabled] + .dso-input-number,\n.dso-btn-group > *[disabled] + .dso-input-number:hover {\n background-color: #fff;\n border-color: #ccc;\n color: #666;\n opacity: 1;\n}\n.dso-btn-group .dso-list-button {\n padding-right: 15px;\n}\n@media screen and (max-width: 767px) {\n .dso-btn-group {\n flex-direction: column;\n }\n .dso-btn-group > *:first-child {\n border-radius: 4px 4px 0 0;\n }\n .dso-btn-group > *:not(:first-child) {\n border-left-style: solid !important;\n border-top-style: none !important;\n }\n .dso-btn-group > *:last-child {\n border-radius: 0 0 4px 4px;\n }\n .dso-btn-group > *:only-child {\n border-radius: 4px;\n }\n}\n\n.dso-selectable {\n position: relative;\n padding: 0 0 0 32px;\n}\n.dso-selectable .dso-selectable-options {\n list-style: none;\n margin-top: 8px;\n padding-left: 0;\n}\n.dso-selectable .dso-selectable-options li + li {\n margin-top: 8px;\n}\n.dso-selectable label {\n font-weight: 400;\n line-height: 24px;\n margin: 0;\n}\n.dso-selectable input[type=checkbox][disabled] + label::before, .dso-selectable input[type=checkbox][disabled]:active + label::before, .dso-selectable input[type=checkbox][disabled]:focus + label::before,\n.dso-selectable input[type=radio][disabled] + label::before,\n.dso-selectable input[type=radio][disabled]:active + label::before,\n.dso-selectable input[type=radio][disabled]:focus + label::before {\n background-color: #fff;\n box-shadow: 0 0 0 2px #e5e5e5;\n}\n.dso-selectable input[type=checkbox],\n.dso-selectable input[type=radio] {\n height: 24px;\n left: 0;\n margin: 0;\n opacity: 0;\n position: absolute;\n top: 0;\n width: 24px;\n z-index: 100;\n zoom: 1;\n}\n@media (prefers-contrast: more) {\n .dso-selectable input[type=checkbox],\n.dso-selectable input[type=radio] {\n opacity: 1;\n }\n}\n.dso-selectable input[type=checkbox]:not([disabled]),\n.dso-selectable input[type=radio]:not([disabled]) {\n cursor: pointer;\n}\n.dso-selectable input[type=checkbox] + label,\n.dso-selectable input[type=radio] + label {\n display: inline;\n font-style: normal;\n padding-left: 0;\n}\n.dso-selectable input[type=checkbox] + label::before,\n.dso-selectable input[type=radio] + label::before {\n background: #fff;\n border: 0;\n box-shadow: 0 0 0 2px var(--dso-selectable-color, #275937);\n content: \"\";\n height: 20px;\n left: 2px;\n position: absolute;\n top: 2px;\n width: 20px;\n}\n.dso-selectable input[type=checkbox]:focus,\n.dso-selectable input[type=radio]:focus {\n outline: 0;\n}\n.dso-selectable input[type=checkbox]:focus + label::before,\n.dso-selectable input[type=radio]:focus + label::before {\n box-shadow: 0 0 0 3px var(--dso-selectable-color, #275937);\n height: 18px;\n left: 3px;\n top: 3px;\n width: 18px;\n}\n.dso-selectable input[type=checkbox]:active + label::before, .dso-selectable input[type=checkbox].active + label::before,\n.dso-selectable input[type=radio]:active + label::before,\n.dso-selectable input[type=radio].active + label::before {\n background-color: #ebf3e6;\n box-shadow: 0 0 0 1px #275937;\n height: 22px;\n left: 1px;\n top: 1px;\n width: 22px;\n}\n.dso-selectable input[type=checkbox] + label::before {\n border-radius: 4px;\n}\n.dso-selectable input[type=checkbox] + label::after {\n background: transparent;\n content: \"\";\n left: 6px;\n opacity: 0;\n position: absolute;\n top: 6px;\n zoom: 1;\n}\n.dso-selectable input[type=checkbox]:checked + label::after, .dso-selectable input[type=checkbox]:indeterminate + label::after {\n opacity: 1;\n}\n.dso-selectable input[type=checkbox]:checked + label::after {\n border: solid;\n border-color: var(--dso-selectable-color, #39870c);\n border-top-color: transparent;\n border-width: 0 0 3px 3px;\n height: 8px;\n transform: rotate(-45deg);\n width: 13px;\n}\n.dso-selectable input[type=checkbox]:indeterminate + label::after {\n background-color: var(--dso-selectable-color, #39870c);\n height: 12px;\n width: 12px;\n}\n.dso-selectable input[type=radio] + label::before {\n border-radius: 50%;\n}\n.dso-selectable input[type=radio] + label::after {\n background-color: transparent;\n border-radius: 50%;\n content: \"\";\n height: 12px;\n left: 6px;\n opacity: 0;\n position: absolute;\n top: 6px;\n width: 12px;\n zoom: 1;\n}\n.dso-selectable input[type=radio]:checked + label::after {\n background-color: var(--dso-selectable-color, #39870c);\n opacity: 1;\n}\n.dso-selectable > dso-info {\n float: none;\n margin: 8px 16px 0 -32px;\n width: calc(100% + 32px);\n}\n.dso-selectable label {\n font-weight: 700;\n}\n\n.dso-list-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #ccc;\n color: #191919;\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n font-weight: 600;\n padding: 15px 47px 15px 15px;\n position: relative;\n text-align: left;\n white-space: normal;\n width: 100%;\n}\n.dso-list-button:focus, .dso-list-button:focus-visible {\n outline-offset: 2px;\n}\n.dso-list-button:active {\n outline: 0;\n}\n.dso-list-button:hover, .dso-list-button:focus {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-list-button:active, .dso-list-button:active:hover, .dso-list-button.active, .dso-list-button.active:hover {\n background-color: #fff;\n border-color: #39870c;\n color: #191919;\n}\n.dso-list-button.disabled, .dso-list-button.disabled:hover, .dso-list-button[disabled], .dso-list-button[disabled]:hover {\n background-color: #fff;\n border-color: #ccc;\n color: #666;\n opacity: 1;\n}\n.dso-list-button.dso-selected {\n border-color: #39870c;\n border-width: 1px;\n box-shadow: inset 0px 0px 0px 1px #39870c, inset -1px 0px 0px 0px #39870c;\n}\n.dso-list-button.dso-selected.dso-single-count {\n border-right: 0;\n box-shadow: #39870c 0px 1px 0px 0px inset, #39870c 1px 0px 0px 0px inset, #39870c 0px -1px 0px 0px inset;\n}\n.dso-list-button > span {\n display: block;\n}\n.dso-list-button .dso-sublabel {\n font-weight: 400;\n width: 100%;\n}\n.dso-list-button .dso-subcontent {\n color: #666;\n font-weight: 400;\n padding: 16px 0 0 16px;\n}\n.dso-list-button .dso-subcontent mark {\n background-color: transparent;\n color: #666;\n font-weight: 700;\n padding: 0;\n}\n.dso-list-button dso-icon,\n.dso-list-button svg.di,\n.dso-list-button .dso-count {\n height: 24px;\n position: absolute;\n right: 15px;\n top: 15px;\n width: 24px;\n}\n.dso-list-button dso-icon,\n.dso-list-button svg.di {\n color: #39870c;\n page-break-before: always;\n}\n.dso-list-button .dso-count {\n font-weight: 700;\n}\n@media screen and (max-width: 767px) {\n .dso-list-button.dso-selected.dso-single-count::after {\n width: 0;\n }\n}\n.dso-list-button .dso-sublabel {\n padding-left: 32px;\n}\n.dso-list-button .dso-subcontent {\n padding-left: 48px;\n padding-top: 8px;\n}\n\n.dso-list-button + .dso-list-button,\n.dso-list-button + .dso-btn-group,\n.dso-btn-group + .dso-list-button,\n.dso-btn-group + .dso-btn-group {\n margin-top: 4px;\n}\n\n.dso-input-wrapper {\n position: relative;\n}\n.dso-input-wrapper .form-control {\n width: 9ch;\n}\n\n.form-control {\n display: block;\n width: 100%;\n height: 40px;\n padding: 6px 14px;\n font-size: 1rem;\n line-height: 1.5;\n color: #191919;\n background-color: #fff;\n background-image: none;\n border: 1px solid #275937;\n border-radius: 4px;\n transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n}\n.form-control::-moz-placeholder {\n color: #666;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #666;\n}\n.form-control::-webkit-input-placeholder {\n color: #666;\n}\n.form-control::-ms-expand {\n background-color: transparent;\n border: 0;\n}\n.form-control:focus {\n border-color: #275937;\n outline: 0;\n box-shadow: inset 0 0 0 1px #275937;\n}\n.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {\n background-color: #fff;\n opacity: 1;\n}\n.form-control[disabled], fieldset[disabled] .form-control {\n cursor: default;\n}\n.form-control[disabled] {\n border-color: #e5e5e5;\n color: #999;\n}\n.form-control[readonly] {\n border-width: 1px;\n}\n.form-control[type=text] {\n line-height: 40px;\n}\n.form-control[size] {\n width: auto;\n}\n\n.dso-manual-input-button[type=button] {\n background-color: transparent;\n border: 0;\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.hidden {\n display: none !important;\n}";
|
|
7
7
|
|
|
8
8
|
const ListButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
@@ -29,7 +29,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
29
29
|
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate({ onDeactivate: () => undefined }); // override FocusTrap onDeactivate callback to avoid double event emits
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Fragment, null, h("div", { class: "dso-modal-overlay" }), h("div", { class: "dso-modal", role: this.role, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.modalElement = element) }, h("div", { class: "dso-dialog", role: "document", ref: (element) => (this.dialogElement = element) }, this.modalTitle ? (h("div", { class: "dso-header" }, h("h2", { id: this.ariaId }, this.modalTitle), this.showCloseButton && (h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "Sluiten"))))) : (h("span", { class: "sr-only", id: this.ariaId }, "Dialoog")), h("div", { class: "dso-body" }, h("slot", { name: "body" })), this.hasFooter && (h("div", { class: "dso-footer" }, h("slot", { name: "footer" })))))));
|
|
32
|
+
return (h(Fragment, null, h("div", { class: "dso-modal-overlay" }), h("div", { class: "dso-modal", role: this.role, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.modalElement = element) }, h("div", { class: "dso-dialog", role: "document", ref: (element) => (this.dialogElement = element) }, this.modalTitle ? (h("div", { class: "dso-header" }, h("h2", { id: this.ariaId }, this.modalTitle), this.showCloseButton && (h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "Sluiten"))))) : (h("span", { class: "sr-only", id: this.ariaId }, "Dialoog")), h("div", { class: "dso-body", tabIndex: 0 }, h("slot", { name: "body" })), this.hasFooter && (h("div", { class: "dso-footer" }, h("slot", { name: "footer" })))))));
|
|
33
33
|
}
|
|
34
34
|
setFocusTrap() {
|
|
35
35
|
if (this.dialogElement && !this.trap) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoSlideToggle extends Components.DsoSlideToggle, HTMLElement {}
|
|
4
|
+
export const DsoSlideToggle: {
|
|
5
|
+
prototype: DsoSlideToggle;
|
|
6
|
+
new (): DsoSlideToggle;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as v4 } from './v4.js';
|
|
3
|
+
|
|
4
|
+
const slideToggleCss = "button.dso-slider{border:0;padding:0}button.dso-slider:focus-visible{outline:2px solid #323232;outline-offset:1px}button.dso-slider svg rect{fill:#999;transition:fill 0.25s}button.dso-slider svg circle{transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transform:translateX(10px);fill:#fff}button.dso-slider[aria-checked=true] svg rect{fill:#275937}button.dso-slider[aria-checked=true] svg circle{transform:translateX(30px);fill:#fff}button.dso-slider[disabled] svg rect{fill:#ccc}button.dso-slider[disabled] svg circle{fill:#e5e5e5}button.dso-slider[disabled][aria-checked=true] svg rect{fill:#a8bcaf}button.dso-slider[disabled][aria-checked=true] svg circle{fill:#e5e5e5}.dso-slider{border-radius:24px;display:inline-flex}.dso-slider:hover{cursor:pointer}";
|
|
5
|
+
|
|
6
|
+
const SlideToggle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.dsoActiveChange = createEvent(this, "dsoActiveChange", 7);
|
|
11
|
+
this.checked = false;
|
|
12
|
+
this.disabled = false;
|
|
13
|
+
this.accessibleLabel = undefined;
|
|
14
|
+
this.labelledbyId = undefined;
|
|
15
|
+
this.hasVisibleLabel = undefined;
|
|
16
|
+
this.identifier = v4();
|
|
17
|
+
}
|
|
18
|
+
handleSwitch(e) {
|
|
19
|
+
this.dsoActiveChange.emit({
|
|
20
|
+
originalEvent: e,
|
|
21
|
+
checked: !this.checked,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
componentWillLoad() {
|
|
25
|
+
this.hasVisibleLabel = this.host.querySelector("*") !== null;
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return (h(Fragment, null, h("button", Object.assign({ id: this.identifier, role: "switch", class: "dso-slider", "aria-checked": "" + this.checked, disabled: this.disabled, onClick: (e) => this.handleSwitch(e) }, (this.accessibleLabel ? { "aria-label": this.accessibleLabel } : {}), (this.labelledbyId ? { "aria-labelledby": this.labelledbyId } : {})), h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "40", height: "20", viewBox: "0 0 40 20" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("rect", { width: "40", height: "20", fill: "currentColor", rx: "10" }), h("circle", { cy: "10", r: "8", fill: "currentColor" })))), this.hasVisibleLabel && (h("label", { htmlFor: this.identifier }, h("slot", null)))));
|
|
29
|
+
}
|
|
30
|
+
get host() { return this; }
|
|
31
|
+
static get style() { return slideToggleCss; }
|
|
32
|
+
}, [4, "dso-slide-toggle", {
|
|
33
|
+
"checked": [4],
|
|
34
|
+
"disabled": [4],
|
|
35
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
36
|
+
"labelledbyId": [1, "labelledby-id"],
|
|
37
|
+
"identifier": [1],
|
|
38
|
+
"hasVisibleLabel": [32]
|
|
39
|
+
}]);
|
|
40
|
+
function defineCustomElement$1() {
|
|
41
|
+
if (typeof customElements === "undefined") {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const components = ["dso-slide-toggle"];
|
|
45
|
+
components.forEach(tagName => { switch (tagName) {
|
|
46
|
+
case "dso-slide-toggle":
|
|
47
|
+
if (!customElements.get(tagName)) {
|
|
48
|
+
customElements.define(tagName, SlideToggle);
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
} });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const DsoSlideToggle = SlideToggle;
|
|
55
|
+
const defineCustomElement = defineCustomElement$1;
|
|
56
|
+
|
|
57
|
+
export { DsoSlideToggle, defineCustomElement };
|
|
@@ -29,6 +29,7 @@ export { ProgressBar as DsoProgressBar } from '../types/components/progress-bar/
|
|
|
29
29
|
export { Progressindicator as DsoProgressIndicator } from '../types/components/progress-indicator/progress-indicator';
|
|
30
30
|
export { ResponsiveElement as DsoResponsiveElement } from '../types/components/responsive-element/responsive-element';
|
|
31
31
|
export { Selectable as DsoSelectable } from '../types/components/selectable/selectable';
|
|
32
|
+
export { SlideToggle as DsoSlideToggle } from '../types/components/slide-toggle/slide-toggle';
|
|
32
33
|
export { Table as DsoTable } from '../types/components/table/table';
|
|
33
34
|
export { Toggletip as DsoToggletip } from '../types/components/toggletip/toggletip';
|
|
34
35
|
export { Tooltip as DsoTooltip } from '../types/components/tooltip/tooltip';
|
package/dist/components/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export { DsoProgressBar, defineCustomElement as defineCustomElementDsoProgressBa
|
|
|
29
29
|
export { DsoProgressIndicator, defineCustomElement as defineCustomElementDsoProgressIndicator } from './dso-progress-indicator.js';
|
|
30
30
|
export { DsoResponsiveElement, defineCustomElement as defineCustomElementDsoResponsiveElement } from './dso-responsive-element.js';
|
|
31
31
|
export { DsoSelectable, defineCustomElement as defineCustomElementDsoSelectable } from './dso-selectable.js';
|
|
32
|
+
export { DsoSlideToggle, defineCustomElement as defineCustomElementDsoSlideToggle } from './dso-slide-toggle.js';
|
|
32
33
|
export { DsoTable, defineCustomElement as defineCustomElementDsoTable } from './dso-table.js';
|
|
33
34
|
export { DsoToggletip, defineCustomElement as defineCustomElementDsoToggletip } from './dso-toggletip.js';
|
|
34
35
|
export { DsoTooltip, defineCustomElement as defineCustomElementDsoTooltip } from './dso-tooltip.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-8f35c8f8.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((e=>o([["p-55142124",[[1,"dso-icon",{icon:[1]}]]],["p-746dc38a",[[1,"dso-map-base-layers",{group:[1],baseLayers:[16]}]]],["p-76a1428a",[[1,"dso-map-overlays",{group:[1],overlays:[16]}]]],["p-35687d62",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-78ee23c5",[[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"],showDropDown:[32],hasSubLogo:[32],overflowMenuItems:[32]}]]],["p-52bc72d0",[[1,"dso-label",{compact:[4],removable:[4],status:[1],truncate:[4],removeHover:[32],removeFocus:[32],textHover:[32],textFocus:[32],truncatedContent:[32],labelText:[32]}]]],["p-46acc09f",[[1,"dso-pagination",{totalPages:[2,"total-pages"],currentPage:[2,"current-page"],formatHref:[16],availablePositions:[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["p-ff72ee4c",[[1,"dso-tree-view",{collection:[16],focusItem:[64]}]]],["p-
|
|
1
|
+
import{p as e,b as o}from"./p-8f35c8f8.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((e=>o([["p-55142124",[[1,"dso-icon",{icon:[1]}]]],["p-746dc38a",[[1,"dso-map-base-layers",{group:[1],baseLayers:[16]}]]],["p-76a1428a",[[1,"dso-map-overlays",{group:[1],overlays:[16]}]]],["p-35687d62",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-78ee23c5",[[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"],showDropDown:[32],hasSubLogo:[32],overflowMenuItems:[32]}]]],["p-52bc72d0",[[1,"dso-label",{compact:[4],removable:[4],status:[1],truncate:[4],removeHover:[32],removeFocus:[32],textHover:[32],textFocus:[32],truncatedContent:[32],labelText:[32]}]]],["p-46acc09f",[[1,"dso-pagination",{totalPages:[2,"total-pages"],currentPage:[2,"current-page"],formatHref:[16],availablePositions:[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["p-ff72ee4c",[[1,"dso-tree-view",{collection:[16],focusItem:[64]}]]],["p-abbcbe6a",[[1,"dso-accordion-section",{handleTitle:[1,"handle-title"],heading:[1],handleUrl:[1,"handle-url"],state:[1],attachmentCount:[2,"attachment-count"],icon:[1],status:[1],open:[1540],hasNestedSection:[32],toggleSection:[64],scrollSectionIntoView:[64]}]]],["p-8aa39e7f",[[1,"dso-alert",{status:[1],roleAlert:[4,"role-alert"]}]]],["p-2fa96ac0",[[1,"dso-attachments-counter",{count:[2]}]]],["p-655eff47",[[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"]]]]],["p-a8cb2eae",[[2,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],role:[1],direction:[1],required:[4],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"]]]]],["p-67c4987c",[[1,"dso-helpcenter-panel",{label:[1],url:[1],visibility:[32],isOpen:[32],slideState:[32],loadIframe:[32]},[[8,"keydown","keyDownListener"]]]]],["p-d7b2adc3",[[1,"dso-image-overlay",{active:[32],focused:[32],zoomable:[32]},[[2,"load","loadListener"]]]]],["p-6080bb9e",[[1,"dso-list-button",{label:[1],sublabel:[1],subcontent:[1],count:[2],min:[8],max:[8],checked:[516],disabled:[516],manualInputWrapperElement:[32],manualCount:[32]}]]],["p-c2157b55",[[1,"dso-map-controls",{open:[1540],disableZoom:[1,"disable-zoom"],hideContent:[32]}]]],["p-ec4501bb",[[1,"dso-modal",{modalTitle:[1,"modal-title"],role:[1],showCloseButton:[4,"show-close-button"],initialFocus:[1,"initial-focus"],ariaId:[32],hasFooter:[32]}]]],["p-8e9f6355",[[1,"dso-table",{noModal:[516,"no-modal"],isResponsive:[516,"is-responsive"],modalActive:[32],placeholderHeight:[32]}]]],["p-92ad1cdb",[[1,"dso-viewer-grid",{filterpanelOpen:[516,"filterpanel-open"],overlayOpen:[516,"overlay-open"],initialMainSize:[1,"initial-main-size"],mainSize:[32]}]]],["p-36cd87c4",[[1,"dso-accordion",{variant:[513],reverseAlign:[516,"reverse-align"],allowMultipleOpen:[516,"allow-multiple-open"],getState:[64],toggleSection:[64],animationEnd:[64],closeOpenSections:[64]}]]],["p-daba2d98",[[1,"dso-badge",{status:[1]}]]],["p-19323600",[[1,"dso-banner",{status:[513]}]]],["p-6bd8515a",[[1,"dso-card",{isSelectable:[516,"is-selectable"],hasImage:[516,"has-image"]}]]],["p-c846d208",[[1,"dso-card-container",{mode:[513]}]]],["p-c7ec6e6e",[[1,"dso-highlight-box",{yellow:[4],border:[4],white:[4],dropShadow:[4,"drop-shadow"],step:[2]}]]],["p-d31805a9",[[6,"dso-ozon-content",{content:[1],inline:[516],deleted:[516],interactive:[520],state:[32]}]]],["p-3b8cbd05",[[1,"dso-progress-bar",{progress:[2],min:[2],max:[2]}]]],["p-11176cb8",[[4,"dso-slide-toggle",{checked:[4],disabled:[4],accessibleLabel:[1,"accessible-label"],labelledbyId:[1,"labelledby-id"],identifier:[1],hasVisibleLabel:[32]}]]],["p-0e5315a3",[[1,"dso-dropdown-menu",{open:[1540],dropdownAlign:[1,"dropdown-align"],checkable:[4]}]]],["p-ec25868b",[[1,"dso-responsive-element",{sizeAlias:[32],sizeWidth:[32],getSize:[64]}]]],["p-a9baa631",[[1,"dso-progress-indicator",{label:[1],size:[513],block:[4]}]]],["p-06b4f78d",[[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]},[[0,"click","listenClick"]]]]],["p-427f6d90",[[1,"dso-info-button",{active:[1540],secondary:[4],label:[1],hover:[32],setFocus:[64]}]]],["p-04ffcc93",[[6,"dso-selectable",{type:[1],identifier:[1],name:[1],value:[1],invalid:[4],describedById:[1,"described-by-id"],disabled:[4],required:[4],checked:[4],indeterminate:[4],infoFixed:[4,"info-fixed"],infoActive:[32],toggleInfo:[64]}],[1,"dso-info",{fixed:[516],active:[516]}]]]],e)));
|