nve-designsystem 3.12.0 → 3.14.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/chunks/chunk.2PCBEMQZ.js +164 -226
- package/chunks/chunk.36O46B5H.js +15 -15
- package/chunks/chunk.3RPBFEDE.js +137 -161
- package/chunks/chunk.4TUIT776.js +78 -96
- package/chunks/chunk.5JY5FUCG.js +978 -1243
- package/chunks/chunk.5P45LHIX.js +76 -96
- package/chunks/chunk.6CTB5ZDJ.js +95 -100
- package/chunks/chunk.B4BZKR24.js +29 -39
- package/chunks/chunk.D5YQDJ7X.js +123 -166
- package/chunks/chunk.EA437WHD.js +5 -5
- package/chunks/chunk.GI7VDIWX.js +14 -15
- package/chunks/chunk.GMYPQTFK.js +18 -20
- package/chunks/chunk.HVTXQL7M.js +191 -215
- package/chunks/chunk.IKV4VH3T.js +18 -16
- package/chunks/chunk.IVVHNXMC.js +26 -27
- package/chunks/chunk.JCXLDPQF.js +141 -211
- package/chunks/chunk.JHOXTQXA.js +65 -74
- package/chunks/chunk.JXOKFADN.js +63 -90
- package/chunks/chunk.K7JGTRV7.js +24 -23
- package/chunks/chunk.KPLQLAWP.js +132 -147
- package/chunks/chunk.LD4M4QGE.js +61 -74
- package/chunks/chunk.MAQXLKQ7.js +5 -5
- package/chunks/chunk.MSKEYBDI.js +53 -71
- package/chunks/chunk.NYIIDP5N.js +39 -45
- package/chunks/chunk.RWUUFNUL.js +91 -114
- package/chunks/chunk.SAPQLUO4.js +249 -228
- package/chunks/chunk.SI4ACBFK.js +5 -5
- package/chunks/chunk.TP2GB2HO.js +361 -460
- package/chunks/chunk.UDWRA64J.js +185 -223
- package/chunks/chunk.URTPIBTY.js +119 -151
- package/chunks/chunk.VESXC477.js +63 -66
- package/chunks/chunk.XA43ZQPC.js +199 -313
- package/chunks/chunk.XQ2OKYYA.js +25 -26
- package/chunks/chunk.XZNBUGX7.js +6 -6
- package/chunks/chunk.YHLNUJ7P.js +93 -116
- package/chunks/chunk.ZH2AND3P.js +339 -399
- package/chunks/chunk.ZL53POKZ.js +61 -156
- package/chunks/chunk.js +20 -0
- package/chunks/class-map.js +49 -45
- package/chunks/decorate.js +105 -0
- package/chunks/directive-helpers.js +5 -7
- package/chunks/if-defined.js +5 -5
- package/chunks/lit.js +523 -0
- package/chunks/live.js +24 -24
- package/chunks/nve-alert.component.js +162 -0
- package/chunks/nve-button.component.js +26 -0
- package/chunks/nve-carousel-item.component.js +35 -0
- package/chunks/nve-carousel.component.js +38 -0
- package/chunks/nve-checkbox-group.component.js +113 -0
- package/chunks/nve-checkbox.component.js +24 -0
- package/chunks/nve-dialog.component.js +35 -0
- package/chunks/nve-divider.component.js +22 -0
- package/chunks/nve-drawer.component.js +36 -0
- package/chunks/nve-dropdown.component.js +80 -0
- package/chunks/nve-input.component.js +75 -0
- package/chunks/nve-label.component.js +87 -0
- package/chunks/nve-menu-item.component.js +30 -0
- package/chunks/nve-menu.component.js +16 -0
- package/chunks/nve-option.component.js +24 -0
- package/chunks/nve-popup.component.js +12 -0
- package/chunks/nve-radio-button.component.js +19 -0
- package/chunks/nve-radio-group.component.js +76 -0
- package/chunks/nve-radio.component.js +16 -0
- package/chunks/nve-select.component.js +52 -0
- package/chunks/nve-skeleton.component.js +19 -0
- package/chunks/nve-spinner.component.js +20 -0
- package/chunks/nve-tooltip.component.js +16 -0
- package/chunks/nve-warning-level.component.js +57 -0
- package/chunks/ref.js +75 -84
- package/chunks/shoelace.js +9859 -0
- package/chunks/static-html.js +24 -0
- package/chunks/unsafe-html.js +24 -20
- package/chunks/updateInvalidProperty.js +7 -7
- package/chunks/watch.js +20 -20
- package/components/nve-accordion/nve-accordion.component.js +24 -30
- package/components/nve-accordion-item/nve-accordion-item.component.js +51 -47
- package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
- package/components/nve-alert/nve-alert.component.js +7 -227
- package/components/nve-alert/nve-alert.styles.js +5 -5
- package/components/nve-badge/nve-badge.component.js +41 -45
- package/components/nve-badge/nve-badge.styles.js +5 -5
- package/components/nve-button/nve-button.component.js +13 -38
- package/components/nve-button/nve-button.styles.js +5 -5
- package/components/nve-carousel/nve-carousel.component.js +9 -46
- package/components/nve-carousel/nve-carousel.styles.js +5 -5
- package/components/nve-carousel-item/nve-carousel-item.component.js +5 -39
- package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
- package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
- package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
- package/components/nve-checkbox/nve-checkbox.component.js +12 -32
- package/components/nve-checkbox/nve-checkbox.styles.js +5 -5
- package/components/nve-checkbox-group/nve-checkbox-group.component.js +13 -152
- package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
- package/components/nve-combobox/nve-combobox.component.js +237 -440
- package/components/nve-combobox/nve-combobox.styles.js +5 -5
- package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +31 -38
- package/components/nve-dialog/nve-dialog-styles.js +5 -5
- package/components/nve-dialog/nve-dialog.component.js +12 -53
- package/components/nve-divider/nve-divider.component.js +5 -29
- package/components/nve-drawer/nve-drawer.component.js +12 -43
- package/components/nve-drawer/nve-drawer.styles.js +5 -5
- package/components/nve-dropdown/nve-dropdown.component.js +9 -68
- package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
- package/components/nve-icon/nve-icon.component.js +145 -164
- package/components/nve-icon/nve-icon.styles.js +5 -5
- package/components/nve-icon/offline-icons.js +15 -13
- package/components/nve-input/nve-input.component.js +13 -98
- package/components/nve-input/nve-input.styles.js +5 -5
- package/components/nve-label/nve-label.component.js +12 -115
- package/components/nve-label/nve-label.styles.js +5 -5
- package/components/nve-link-card/nve-link-card.component.js +45 -80
- package/components/nve-link-card/nve-link-card.styles.js +5 -5
- package/components/nve-menu/nve-menu.component.js +5 -21
- package/components/nve-menu/nve-menu.styles.js +5 -5
- package/components/nve-menu-item/nve-menu-item.component.js +11 -41
- package/components/nve-menu-item/nve-menu-item.styles.js +5 -5
- package/components/nve-message-card/nve-message-card.component.js +63 -91
- package/components/nve-message-card/nve-message-card.styles.js +5 -5
- package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
- package/components/nve-navigation-card/nve-navigation-card.component.js +62 -0
- package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
- package/components/nve-navigation-card/nve-navigation-card.styles.js +111 -0
- package/components/nve-option/nve-option.component.js +9 -40
- package/components/nve-option/nve-option.styles.js +5 -5
- package/components/nve-popup/nve-popup.component.js +8 -21
- package/components/nve-radio/nve-radio.component.js +8 -22
- package/components/nve-radio/nve-radio.styles.js +5 -5
- package/components/nve-radio-button/nve-radio-button.component.js +9 -24
- package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
- package/components/nve-radio-group/nve-radio-group.component.js +8 -118
- package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
- package/components/nve-relative-time/nve-relative-time.component.js +42 -39
- package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
- package/components/nve-select/nve-select.component.js +14 -77
- package/components/nve-select/nve-select.styles.js +5 -5
- package/components/nve-skeleton/nve-skeleton.component.js +6 -26
- package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
- package/components/nve-spinner/nve-spinner.component.js +6 -29
- package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
- package/components/nve-stepper/nve-step/nve-step.styles.js +5 -5
- package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
- package/components/nve-stepper/nve-stepper-mobile.styles.js +5 -5
- package/components/nve-stepper/nve-stepper.component.js +91 -136
- package/components/nve-stepper/nve-stepper.styles.js +5 -5
- package/components/nve-switch/nve-switch.component.js +76 -107
- package/components/nve-switch/nve-switch.styles.js +5 -5
- package/components/nve-tab/nve-tab.component.js +30 -42
- package/components/nve-tab/nve-tab.styles.js +5 -5
- package/components/nve-tab-group/nve-tab-group.component.js +185 -257
- package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
- package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
- package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
- package/components/nve-tag/nve-tag.component.js +67 -70
- package/components/nve-tag/nve-tag.styles.js +5 -5
- package/components/nve-textarea/nve-textarea.component.js +114 -170
- package/components/nve-textarea/nve-textarea.styles.js +5 -5
- package/components/nve-tooltip/nve-tooltip.component.js +10 -29
- package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
- package/components/nve-warning-level/nve-warning-level.component.js +6 -78
- package/components/nve-warning-level/nve-warning-level.styles.js +5 -5
- package/css/global.css +3 -2
- package/css/nve.css +8 -1
- package/css/rme.css +8 -1
- package/css/varsom.css +8 -1
- package/custom-elements.json +166 -0
- package/interfaces/NveComponent.interface.js +0 -1
- package/nve-designsystem.d.ts +1 -0
- package/nve-designsystem.js +84 -86
- package/package.json +1 -1
- package/registerIcons/systemLibraryCustomization.js +23 -91
- package/vite-env.d.js +0 -1
- package/vscode.css-custom-data.json +11 -0
- package/vscode.html-custom-data.json +46 -0
- package/chunks/chunk.JQBT7BOV.js +0 -8446
- package/chunks/lit-element.js +0 -508
- package/chunks/property.js +0 -37
- package/chunks/query.js +0 -13
- package/chunks/state.js +0 -7
- package/chunks/static.js +0 -26
package/chunks/chunk.2PCBEMQZ.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var k = g`
|
|
1
|
+
import { s as e, u as t } from "./lit.js";
|
|
2
|
+
import { a as n, o as r, r as i } from "./decorate.js";
|
|
3
|
+
import { n as a, r as o, t as s } from "./chunk.4TUIT776.js";
|
|
4
|
+
import { i as c, n as l, r as u, t as d } from "./chunk.3RPBFEDE.js";
|
|
5
|
+
import { t as f } from "./chunk.SI4ACBFK.js";
|
|
6
|
+
import { t as p } from "./chunk.NYIIDP5N.js";
|
|
7
|
+
import { t as m } from "./chunk.GMYPQTFK.js";
|
|
8
|
+
import { t as h } from "./class-map.js";
|
|
9
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B63YXDJO.js
|
|
10
|
+
var g = t`
|
|
12
11
|
:host {
|
|
13
12
|
display: block;
|
|
14
13
|
}
|
|
@@ -40,7 +39,7 @@ var k = g`
|
|
|
40
39
|
white-space: nowrap;
|
|
41
40
|
border: 0;
|
|
42
41
|
}
|
|
43
|
-
`,
|
|
42
|
+
`, _ = t`
|
|
44
43
|
:host {
|
|
45
44
|
display: inline-block;
|
|
46
45
|
}
|
|
@@ -49,38 +48,31 @@ var k = g`
|
|
|
49
48
|
display: flex;
|
|
50
49
|
flex-wrap: nowrap;
|
|
51
50
|
}
|
|
52
|
-
`,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"data-sl-button-group__button--radio",
|
|
78
|
-
s.tagName.toLowerCase() === "sl-radio-button"
|
|
79
|
-
));
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
return p`
|
|
51
|
+
`, v = class extends s {
|
|
52
|
+
constructor() {
|
|
53
|
+
super(...arguments), this.disableRole = !1, this.label = "";
|
|
54
|
+
}
|
|
55
|
+
handleFocus(e) {
|
|
56
|
+
y(e.target)?.toggleAttribute("data-sl-button-group__button--focus", !0);
|
|
57
|
+
}
|
|
58
|
+
handleBlur(e) {
|
|
59
|
+
y(e.target)?.toggleAttribute("data-sl-button-group__button--focus", !1);
|
|
60
|
+
}
|
|
61
|
+
handleMouseOver(e) {
|
|
62
|
+
y(e.target)?.toggleAttribute("data-sl-button-group__button--hover", !0);
|
|
63
|
+
}
|
|
64
|
+
handleMouseOut(e) {
|
|
65
|
+
y(e.target)?.toggleAttribute("data-sl-button-group__button--hover", !1);
|
|
66
|
+
}
|
|
67
|
+
handleSlotChange() {
|
|
68
|
+
let e = [...this.defaultSlot.assignedElements({ flatten: !0 })];
|
|
69
|
+
e.forEach((t) => {
|
|
70
|
+
let n = e.indexOf(t), r = y(t);
|
|
71
|
+
r && (r.toggleAttribute("data-sl-button-group__button", !0), r.toggleAttribute("data-sl-button-group__button--first", n === 0), r.toggleAttribute("data-sl-button-group__button--inner", n > 0 && n < e.length - 1), r.toggleAttribute("data-sl-button-group__button--last", n === e.length - 1), r.toggleAttribute("data-sl-button-group__button--radio", r.tagName.toLowerCase() === "sl-radio-button"));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return e`
|
|
84
76
|
<div
|
|
85
77
|
part="base"
|
|
86
78
|
class="button-group"
|
|
@@ -94,140 +86,122 @@ var k = g`
|
|
|
94
86
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
95
87
|
</div>
|
|
96
88
|
`;
|
|
97
|
-
|
|
89
|
+
}
|
|
98
90
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
l([
|
|
104
|
-
f()
|
|
105
|
-
], c.prototype, "disableRole", 2);
|
|
106
|
-
l([
|
|
107
|
-
n()
|
|
108
|
-
], c.prototype, "label", 2);
|
|
109
|
-
function h(t) {
|
|
110
|
-
var e;
|
|
111
|
-
const o = "sl-button, sl-radio-button";
|
|
112
|
-
return (e = t.closest(o)) != null ? e : t.querySelector(o);
|
|
91
|
+
v.styles = [a, _], o([i("slot")], v.prototype, "defaultSlot", 2), o([n()], v.prototype, "disableRole", 2), o([r()], v.prototype, "label", 2);
|
|
92
|
+
function y(e) {
|
|
93
|
+
let t = "sl-button, sl-radio-button";
|
|
94
|
+
return e.closest(t) ?? e.querySelector(t);
|
|
113
95
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
/** Sets focus on the radio-group. */
|
|
211
|
-
focus(t) {
|
|
212
|
-
const e = this.getAllRadios(), o = e.find((d) => d.checked), s = e.find((d) => !d.disabled), a = o || s;
|
|
213
|
-
a && a.focus(t);
|
|
214
|
-
}
|
|
215
|
-
render() {
|
|
216
|
-
const t = this.hasSlotController.test("label"), e = this.hasSlotController.test("help-text"), o = this.label ? !0 : !!t, s = this.helpText ? !0 : !!e, a = p`
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZJNIZFRS.js
|
|
98
|
+
var b = class extends s {
|
|
99
|
+
constructor() {
|
|
100
|
+
super(...arguments), this.formControlController = new d(this), this.hasSlotController = new p(this, "help-text", "label"), this.customValidityMessage = "", this.hasButtonGroup = !1, this.errorMessage = "", this.defaultValue = "", this.label = "", this.helpText = "", this.name = "option", this.value = "", this.size = "medium", this.form = "", this.required = !1;
|
|
101
|
+
}
|
|
102
|
+
get validity() {
|
|
103
|
+
let e = this.required && !this.value;
|
|
104
|
+
return this.customValidityMessage === "" ? e ? c : u : l;
|
|
105
|
+
}
|
|
106
|
+
get validationMessage() {
|
|
107
|
+
let e = this.required && !this.value;
|
|
108
|
+
return this.customValidityMessage === "" ? e ? this.validationInput.validationMessage : "" : this.customValidityMessage;
|
|
109
|
+
}
|
|
110
|
+
connectedCallback() {
|
|
111
|
+
super.connectedCallback(), this.defaultValue = this.value;
|
|
112
|
+
}
|
|
113
|
+
firstUpdated() {
|
|
114
|
+
this.formControlController.updateValidity();
|
|
115
|
+
}
|
|
116
|
+
getAllRadios() {
|
|
117
|
+
return [...this.querySelectorAll("sl-radio, sl-radio-button")];
|
|
118
|
+
}
|
|
119
|
+
handleRadioClick(e) {
|
|
120
|
+
let t = e.target.closest("sl-radio, sl-radio-button"), n = this.getAllRadios(), r = this.value;
|
|
121
|
+
!t || t.disabled || (this.value = t.value, n.forEach((e) => e.checked = e === t), this.value !== r && (this.emit("sl-change"), this.emit("sl-input")));
|
|
122
|
+
}
|
|
123
|
+
handleKeyDown(e) {
|
|
124
|
+
if (![
|
|
125
|
+
"ArrowUp",
|
|
126
|
+
"ArrowDown",
|
|
127
|
+
"ArrowLeft",
|
|
128
|
+
"ArrowRight",
|
|
129
|
+
" "
|
|
130
|
+
].includes(e.key)) return;
|
|
131
|
+
let t = this.getAllRadios().filter((e) => !e.disabled), n = t.find((e) => e.checked) ?? t[0], r = e.key === " " ? 0 : ["ArrowUp", "ArrowLeft"].includes(e.key) ? -1 : 1, i = this.value, a = t.indexOf(n) + r;
|
|
132
|
+
a < 0 && (a = t.length - 1), a > t.length - 1 && (a = 0), this.getAllRadios().forEach((e) => {
|
|
133
|
+
e.checked = !1, this.hasButtonGroup || e.setAttribute("tabindex", "-1");
|
|
134
|
+
}), this.value = t[a].value, t[a].checked = !0, this.hasButtonGroup ? t[a].shadowRoot.querySelector("button").focus() : (t[a].setAttribute("tabindex", "0"), t[a].focus()), this.value !== i && (this.emit("sl-change"), this.emit("sl-input")), e.preventDefault();
|
|
135
|
+
}
|
|
136
|
+
handleLabelClick() {
|
|
137
|
+
this.focus();
|
|
138
|
+
}
|
|
139
|
+
handleInvalid(e) {
|
|
140
|
+
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
|
|
141
|
+
}
|
|
142
|
+
async syncRadioElements() {
|
|
143
|
+
let e = this.getAllRadios();
|
|
144
|
+
if (await Promise.all(e.map(async (e) => {
|
|
145
|
+
await e.updateComplete, e.checked = e.value === this.value, e.size = this.size;
|
|
146
|
+
})), this.hasButtonGroup = e.some((e) => e.tagName.toLowerCase() === "sl-radio-button"), e.length > 0 && !e.some((e) => e.checked)) if (this.hasButtonGroup) {
|
|
147
|
+
let t = e[0].shadowRoot?.querySelector("button");
|
|
148
|
+
t && t.setAttribute("tabindex", "0");
|
|
149
|
+
} else e[0].setAttribute("tabindex", "0");
|
|
150
|
+
if (this.hasButtonGroup) {
|
|
151
|
+
let e = this.shadowRoot?.querySelector("sl-button-group");
|
|
152
|
+
e && (e.disableRole = !0);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
syncRadios() {
|
|
156
|
+
if (customElements.get("sl-radio") && customElements.get("sl-radio-button")) {
|
|
157
|
+
this.syncRadioElements();
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
customElements.get("sl-radio") ? this.syncRadioElements() : customElements.whenDefined("sl-radio").then(() => this.syncRadios()), customElements.get("sl-radio-button") ? this.syncRadioElements() : customElements.whenDefined("sl-radio-button").then(() => this.syncRadios());
|
|
161
|
+
}
|
|
162
|
+
updateCheckedRadio() {
|
|
163
|
+
this.getAllRadios().forEach((e) => e.checked = e.value === this.value), this.formControlController.setValidity(this.validity.valid);
|
|
164
|
+
}
|
|
165
|
+
handleSizeChange() {
|
|
166
|
+
this.syncRadios();
|
|
167
|
+
}
|
|
168
|
+
handleValueChange() {
|
|
169
|
+
this.hasUpdated && this.updateCheckedRadio();
|
|
170
|
+
}
|
|
171
|
+
checkValidity() {
|
|
172
|
+
let e = this.required && !this.value, t = this.customValidityMessage !== "";
|
|
173
|
+
return e || t ? (this.formControlController.emitInvalidEvent(), !1) : !0;
|
|
174
|
+
}
|
|
175
|
+
getForm() {
|
|
176
|
+
return this.formControlController.getForm();
|
|
177
|
+
}
|
|
178
|
+
reportValidity() {
|
|
179
|
+
let e = this.validity.valid;
|
|
180
|
+
return this.errorMessage = this.customValidityMessage || e ? "" : this.validationInput.validationMessage, this.formControlController.setValidity(e), this.validationInput.hidden = !0, clearTimeout(this.validationTimeout), e || (this.validationInput.hidden = !1, this.validationInput.reportValidity(), this.validationTimeout = setTimeout(() => this.validationInput.hidden = !0, 1e4)), e;
|
|
181
|
+
}
|
|
182
|
+
setCustomValidity(e = "") {
|
|
183
|
+
this.customValidityMessage = e, this.errorMessage = e, this.validationInput.setCustomValidity(e), this.formControlController.updateValidity();
|
|
184
|
+
}
|
|
185
|
+
focus(e) {
|
|
186
|
+
let t = this.getAllRadios(), n = t.find((e) => e.checked), r = t.find((e) => !e.disabled), i = n || r;
|
|
187
|
+
i && i.focus(e);
|
|
188
|
+
}
|
|
189
|
+
render() {
|
|
190
|
+
let t = this.hasSlotController.test("label"), n = this.hasSlotController.test("help-text"), r = this.label ? !0 : !!t, i = this.helpText ? !0 : !!n, a = e`
|
|
217
191
|
<slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>
|
|
218
192
|
`;
|
|
219
|
-
|
|
193
|
+
return e`
|
|
220
194
|
<fieldset
|
|
221
195
|
part="form-control"
|
|
222
|
-
class=${
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
196
|
+
class=${h({
|
|
197
|
+
"form-control": !0,
|
|
198
|
+
"form-control--small": this.size === "small",
|
|
199
|
+
"form-control--medium": this.size === "medium",
|
|
200
|
+
"form-control--large": this.size === "large",
|
|
201
|
+
"form-control--radio-group": !0,
|
|
202
|
+
"form-control--has-label": r,
|
|
203
|
+
"form-control--has-help-text": i
|
|
204
|
+
})}
|
|
231
205
|
role="radiogroup"
|
|
232
206
|
aria-labelledby="label"
|
|
233
207
|
aria-describedby="help-text"
|
|
@@ -237,7 +211,7 @@ var i = class extends v {
|
|
|
237
211
|
part="form-control-label"
|
|
238
212
|
id="label"
|
|
239
213
|
class="form-control__label"
|
|
240
|
-
aria-hidden=${
|
|
214
|
+
aria-hidden=${r ? "false" : "true"}
|
|
241
215
|
@click=${this.handleLabelClick}
|
|
242
216
|
>
|
|
243
217
|
<slot name="label">${this.label}</slot>
|
|
@@ -258,7 +232,7 @@ var i = class extends v {
|
|
|
258
232
|
</label>
|
|
259
233
|
</div>
|
|
260
234
|
|
|
261
|
-
${this.hasButtonGroup ?
|
|
235
|
+
${this.hasButtonGroup ? e`
|
|
262
236
|
<sl-button-group part="button-group" exportparts="base:button-group__base" role="presentation">
|
|
263
237
|
${a}
|
|
264
238
|
</sl-button-group>
|
|
@@ -269,61 +243,25 @@ var i = class extends v {
|
|
|
269
243
|
part="form-control-help-text"
|
|
270
244
|
id="help-text"
|
|
271
245
|
class="form-control__help-text"
|
|
272
|
-
aria-hidden=${
|
|
246
|
+
aria-hidden=${i ? "false" : "true"}
|
|
273
247
|
>
|
|
274
248
|
<slot name="help-text">${this.helpText}</slot>
|
|
275
249
|
</div>
|
|
276
250
|
</fieldset>
|
|
277
251
|
`;
|
|
278
|
-
|
|
279
|
-
};
|
|
280
|
-
i.styles = [b, _, k];
|
|
281
|
-
i.dependencies = { "sl-button-group": c };
|
|
282
|
-
l([
|
|
283
|
-
m("slot:not([name])")
|
|
284
|
-
], i.prototype, "defaultSlot", 2);
|
|
285
|
-
l([
|
|
286
|
-
m(".radio-group__validation-input")
|
|
287
|
-
], i.prototype, "validationInput", 2);
|
|
288
|
-
l([
|
|
289
|
-
f()
|
|
290
|
-
], i.prototype, "hasButtonGroup", 2);
|
|
291
|
-
l([
|
|
292
|
-
f()
|
|
293
|
-
], i.prototype, "errorMessage", 2);
|
|
294
|
-
l([
|
|
295
|
-
f()
|
|
296
|
-
], i.prototype, "defaultValue", 2);
|
|
297
|
-
l([
|
|
298
|
-
n()
|
|
299
|
-
], i.prototype, "label", 2);
|
|
300
|
-
l([
|
|
301
|
-
n({ attribute: "help-text" })
|
|
302
|
-
], i.prototype, "helpText", 2);
|
|
303
|
-
l([
|
|
304
|
-
n()
|
|
305
|
-
], i.prototype, "name", 2);
|
|
306
|
-
l([
|
|
307
|
-
n({ reflect: !0 })
|
|
308
|
-
], i.prototype, "value", 2);
|
|
309
|
-
l([
|
|
310
|
-
n({ reflect: !0 })
|
|
311
|
-
], i.prototype, "size", 2);
|
|
312
|
-
l([
|
|
313
|
-
n({ reflect: !0 })
|
|
314
|
-
], i.prototype, "form", 2);
|
|
315
|
-
l([
|
|
316
|
-
n({ type: Boolean, reflect: !0 })
|
|
317
|
-
], i.prototype, "required", 2);
|
|
318
|
-
l([
|
|
319
|
-
y("size", { waitUntilFirstUpdate: !0 })
|
|
320
|
-
], i.prototype, "handleSizeChange", 1);
|
|
321
|
-
l([
|
|
322
|
-
y("value")
|
|
323
|
-
], i.prototype, "handleValueChange", 1);
|
|
324
|
-
var L = i;
|
|
325
|
-
i.define("sl-radio-group");
|
|
326
|
-
export {
|
|
327
|
-
c as S,
|
|
328
|
-
L as r
|
|
252
|
+
}
|
|
329
253
|
};
|
|
254
|
+
b.styles = [
|
|
255
|
+
a,
|
|
256
|
+
f,
|
|
257
|
+
g
|
|
258
|
+
], b.dependencies = { "sl-button-group": v }, o([i("slot:not([name])")], b.prototype, "defaultSlot", 2), o([i(".radio-group__validation-input")], b.prototype, "validationInput", 2), o([n()], b.prototype, "hasButtonGroup", 2), o([n()], b.prototype, "errorMessage", 2), o([n()], b.prototype, "defaultValue", 2), o([r()], b.prototype, "label", 2), o([r({ attribute: "help-text" })], b.prototype, "helpText", 2), o([r()], b.prototype, "name", 2), o([r({ reflect: !0 })], b.prototype, "value", 2), o([r({ reflect: !0 })], b.prototype, "size", 2), o([r({ reflect: !0 })], b.prototype, "form", 2), o([r({
|
|
259
|
+
type: Boolean,
|
|
260
|
+
reflect: !0
|
|
261
|
+
})], b.prototype, "required", 2), o([m("size", { waitUntilFirstUpdate: !0 })], b.prototype, "handleSizeChange", 1), o([m("value")], b.prototype, "handleValueChange", 1);
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2PCBEMQZ.js
|
|
264
|
+
var x = b;
|
|
265
|
+
b.define("sl-radio-group");
|
|
266
|
+
//#endregion
|
|
267
|
+
export { v as n, x as t };
|
package/chunks/chunk.36O46B5H.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { s as e, u as t } from "./lit.js";
|
|
2
|
+
import { n, t as r } from "./chunk.4TUIT776.js";
|
|
3
|
+
import { t as i } from "./chunk.6CTB5ZDJ.js";
|
|
4
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7DUCI5S4.js
|
|
5
|
+
var a = t`
|
|
5
6
|
:host {
|
|
6
7
|
--track-width: 2px;
|
|
7
8
|
--track-color: rgb(128 128 128 / 25%);
|
|
@@ -58,20 +59,19 @@ var i = r`
|
|
|
58
59
|
stroke-dasharray: 0.05em, 3em;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
`, o = class extends
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
`, o = class extends r {
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments), this.localize = new i(this);
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return e`
|
|
67
68
|
<svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
|
|
68
69
|
<circle class="spinner__track"></circle>
|
|
69
70
|
<circle class="spinner__indicator"></circle>
|
|
70
71
|
</svg>
|
|
71
72
|
`;
|
|
72
|
-
|
|
73
|
-
};
|
|
74
|
-
o.styles = [t, i];
|
|
75
|
-
export {
|
|
76
|
-
o as S
|
|
73
|
+
}
|
|
77
74
|
};
|
|
75
|
+
o.styles = [n, a];
|
|
76
|
+
//#endregion
|
|
77
|
+
export { o as t };
|