@ds-autonomie/web-components 1.0.1 → 1.2.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/CHANGELOG.md +49 -0
- package/dist/chunks/{chunk.HH63FIEF.js → chunk.2DGAEK66.js} +12 -3
- package/dist/chunks/{chunk.O73OYTYJ.js → chunk.2HV2U4RQ.js} +2 -4
- package/dist/chunks/{chunk.EHVJT7BH.js → chunk.2R6P5TGQ.js} +1 -1
- package/dist/chunks/chunk.2WSMYCPC.js +24 -0
- package/dist/chunks/{chunk.LT7JMZ3T.js → chunk.3HI3T5R2.js} +2 -2
- package/dist/chunks/chunk.3I2KXA35.js +126 -0
- package/dist/chunks/{chunk.7NWAYDYI.js → chunk.4DWONP4W.js} +3 -3
- package/dist/chunks/{chunk.BLPP3Q5H.js → chunk.5324JGM4.js} +11 -4
- package/dist/chunks/{chunk.BEB47LM2.js → chunk.5BTJP6HC.js} +2 -2
- package/dist/chunks/{chunk.D7CATJYB.js → chunk.6IH66JBY.js} +1 -1
- package/dist/chunks/chunk.7HGZSZJK.js +409 -0
- package/dist/chunks/{chunk.QKNNLZ2M.js → chunk.AFAQWHMU.js} +3 -3
- package/dist/chunks/{chunk.ODSCDJDO.js → chunk.ARVWTY56.js} +5 -4
- package/dist/chunks/{chunk.KOH5V4C6.js → chunk.B4O7IAPL.js} +21 -17
- package/dist/chunks/chunk.CCTWXABH.js +13 -0
- package/dist/chunks/chunk.CMJ2SRTL.js +26 -0
- package/dist/chunks/{chunk.DURVPB6M.js → chunk.D6DEGG4H.js} +25 -6
- package/dist/chunks/{chunk.UV53JTE3.js → chunk.DOMRNQHQ.js} +1 -1
- package/dist/chunks/{chunk.NDEZEB3Z.js → chunk.EDRQ2QWB.js} +10 -5
- package/dist/chunks/{chunk.XSCX6TC5.js → chunk.EXIGM5NV.js} +4 -1
- package/dist/chunks/{chunk.4A3WMGMZ.js → chunk.FHDPJN6L.js} +1 -1
- package/dist/chunks/{chunk.YS7MY5CH.js → chunk.FHGXKQDW.js} +18 -24
- package/dist/chunks/{chunk.KDAK2GXX.js → chunk.FKIKQX6B.js} +1 -1
- package/dist/chunks/{chunk.ABGBXXKA.js → chunk.FTWZNCEH.js} +1 -1
- package/dist/chunks/{chunk.6FAUBLR3.js → chunk.G3ESG6Q5.js} +1 -1
- package/dist/chunks/{chunk.WHK7EFIM.js → chunk.GP5Z27QB.js} +7 -4
- package/dist/chunks/{chunk.2HUORR44.js → chunk.GRV3MK3D.js} +1 -1
- package/dist/chunks/{chunk.JETXIC4F.js → chunk.HPK6C7NJ.js} +1 -1
- package/dist/chunks/{chunk.UZLQVFDR.js → chunk.IJL7YMFL.js} +2 -2
- package/dist/chunks/{chunk.GYTA2LJC.js → chunk.J6XP4AFN.js} +1 -1
- package/dist/chunks/{chunk.PWWER3ZK.js → chunk.JJ3GF7YP.js} +48 -24
- package/dist/chunks/{chunk.OVK7QCA7.js → chunk.JLMY5OVR.js} +13 -9
- package/dist/chunks/{chunk.N6VVY6XD.js → chunk.K6YLMID4.js} +6 -3
- package/dist/chunks/{chunk.5XUV3SRW.js → chunk.KOZIER6A.js} +11 -6
- package/dist/chunks/{chunk.A2PAK6VF.js → chunk.LUHEO6AS.js} +2 -2
- package/dist/chunks/{chunk.7ZCCXTFG.js → chunk.MDFIMRCC.js} +2 -2
- package/dist/chunks/{chunk.WNHQYL5W.js → chunk.MTZZV3NB.js} +4 -20
- package/dist/chunks/{chunk.5XL2LZLC.js → chunk.NBPVVWJU.js} +14 -0
- package/dist/chunks/{chunk.HC5BO5YV.js → chunk.NHYFVEGM.js} +5 -16
- package/dist/chunks/{chunk.MOWTZFON.js → chunk.NKVYNBAI.js} +1 -1
- package/dist/chunks/{chunk.IRQOFNJE.js → chunk.NQU3YD5L.js} +8 -3
- package/dist/chunks/{chunk.WIEJJS3W.js → chunk.OGQBKAFT.js} +1 -1
- package/dist/chunks/{chunk.WSVP75MH.js → chunk.ORSUTGLR.js} +1 -1
- package/dist/chunks/chunk.OXSDZ5LQ.js +865 -0
- package/dist/chunks/{chunk.MY434P47.js → chunk.P2AJBSND.js} +2 -2
- package/dist/chunks/chunk.QSNJ4FV6.js +54 -0
- package/dist/chunks/{chunk.4XT2OJD2.js → chunk.RDVFMQLV.js} +8 -4
- package/dist/chunks/{chunk.INCGVIAQ.js → chunk.TINRLVWL.js} +1 -1
- package/dist/chunks/{chunk.5LT3B7MI.js → chunk.UQYPPFBJ.js} +1 -1
- package/dist/chunks/{chunk.42W4S2HN.js → chunk.VM355VAS.js} +1 -1
- package/dist/chunks/{chunk.G7AELPSO.js → chunk.VRU3XH45.js} +4 -4
- package/dist/chunks/{chunk.UA32LJYW.js → chunk.WG5VRMQG.js} +2 -2
- package/dist/chunks/{chunk.AR5HJD7F.js → chunk.X6RQ2SQC.js} +1 -1
- package/dist/chunks/{chunk.HLYGKGDG.js → chunk.XJPCULMC.js} +8 -5
- package/dist/chunks/chunk.YRBTSDUN.js +134 -0
- package/dist/chunks/chunk.ZQJVCRB2.js +10 -0
- package/dist/chunks/{chunk.RIJQGADY.js → chunk.ZW4JE66G.js} +11 -4
- package/dist/chunks/{chunk.K6WCEYZI.js → chunk.ZXVIEHXI.js} +1 -1
- package/dist/components/accordion/accordion.js +7 -7
- package/dist/components/alert/alert.js +9 -8
- package/dist/components/animation/animation.js +2 -2
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/avatar.js +7 -6
- package/dist/components/avatar-group/avatar-group.d.ts +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +7 -7
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist/components/button/button.js +9 -8
- package/dist/components/checkbox/checkbox.js +8 -7
- package/dist/components/checkbox-button/checkbox-button.js +6 -6
- package/dist/components/checkbox-group/checkbox-group.d.ts +1 -0
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/combobox/combobox.d.ts +175 -0
- package/dist/components/combobox/combobox.js +37 -0
- package/dist/components/combobox/combobox.styles.d.ts +2 -0
- package/dist/components/combobox/combobox.styles.js +9 -0
- package/dist/components/dialog/dialog.js +9 -8
- package/dist/components/divider/divider.d.ts +1 -1
- package/dist/components/drawer/drawer.js +10 -9
- package/dist/components/dropdown/dropdown.js +3 -3
- package/dist/components/format-bytes/format-bytes.js +2 -2
- package/dist/components/format-date/format-date.js +2 -2
- package/dist/components/format-number/format-number.js +2 -2
- package/dist/components/icon/icon.js +5 -5
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/icon-button/icon-button.js +7 -6
- package/dist/components/include/include.js +2 -2
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.js +10 -9
- package/dist/components/input/input.styles.js +1 -1
- package/dist/components/input-mask/input-mask.d.ts +1 -0
- package/dist/components/input-mask/input-mask.js +6 -5
- package/dist/components/input-mask/input-mask.styles.js +1 -1
- package/dist/components/input-phone/input-phone.d.ts +1 -1
- package/dist/components/input-phone/input-phone.js +24 -23
- package/dist/components/input-phone/input-phone.styles.js +1 -1
- package/dist/components/menu/menu.d.ts +1 -1
- package/dist/components/menu-item/menu-item.d.ts +1 -1
- package/dist/components/menu-item/menu-item.js +6 -6
- package/dist/components/menu-label/menu-label.d.ts +1 -1
- package/dist/components/mutation-observer/mutation-observer.js +2 -2
- package/dist/components/option/option.js +8 -8
- package/dist/components/option/option.styles.js +1 -1
- package/dist/components/progress-bar/progress-bar.d.ts +1 -1
- package/dist/components/progress-bar/progress-bar.js +3 -2
- package/dist/components/progress-ring/progress-ring.d.ts +1 -2
- package/dist/components/progress-ring/progress-ring.js +2 -2
- package/dist/components/radio/radio.js +6 -6
- package/dist/components/radio-button/radio-button.js +2 -2
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/components/relative-time/relative-time.js +2 -2
- package/dist/components/resize-observer/resize-observer.js +2 -2
- package/dist/components/select/select.d.ts +4 -0
- package/dist/components/select/select.js +13 -12
- package/dist/components/select/select.styles.js +1 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/step/step.d.ts +39 -0
- package/dist/components/step/step.js +24 -0
- package/dist/components/step/step.styles.d.ts +2 -0
- package/dist/components/step/step.styles.js +8 -0
- package/dist/components/step/step.utils.d.ts +3 -0
- package/dist/components/step/step.utils.js +7 -0
- package/dist/components/stepper/stepper.d.ts +23 -0
- package/dist/components/stepper/stepper.js +10 -0
- package/dist/components/stepper/stepper.styles.d.ts +2 -0
- package/dist/components/stepper/stepper.styles.js +8 -0
- package/dist/components/tab/tab.d.ts +1 -1
- package/dist/components/tab/tab.js +3 -3
- package/dist/components/tab-group/tab-group.d.ts +1 -1
- package/dist/components/tab-group/tab-group.js +3 -3
- package/dist/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist/components/tab-panel/tab-panel.js +2 -2
- package/dist/components/tag/tag.js +9 -8
- package/dist/components/textarea/textarea.d.ts +1 -0
- package/dist/components/textarea/textarea.js +4 -3
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/components/tree/tree.d.ts +2 -1
- package/dist/components/tree/tree.js +12 -11
- package/dist/components/tree-item/tree-item.d.ts +1 -1
- package/dist/components/tree-item/tree-item.js +11 -10
- package/dist/custom-elements.json +1325 -41
- package/dist/design-system.d.ts +3 -0
- package/dist/design-system.js +112 -95
- package/dist/internal/debounce.d.ts +1 -1
- package/dist/internal/debounce.js +3 -3
- package/dist/internal/default-value.d.ts +1 -1
- package/dist/internal/default-value.js +24 -21
- package/dist/internal/watch.js +1 -1
- package/dist/themes/dsa-wc-theme.css +79 -6
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +85 -6
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/utilities/directives.d.ts +1 -0
- package/dist/utilities/directives.js +7 -0
- package/dist/utilities/localize.d.ts +7 -0
- package/dist/utilities/localize.js +1 -1
- package/dist/vscode.html-custom-data.json +169 -6
- package/dist/web-types.json +737 -9
- package/package.json +2 -2
- package/dist/chunks/chunk.GI7VDIWX.js +0 -24
|
@@ -3,16 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk.VRY3E2XG.js";
|
|
4
4
|
import {
|
|
5
5
|
defaultValue
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.CMJ2SRTL.js";
|
|
7
7
|
import {
|
|
8
8
|
FormControlController
|
|
9
9
|
} from "./chunk.KIFBWPW5.js";
|
|
10
10
|
import {
|
|
11
11
|
HasSlotController
|
|
12
12
|
} from "./chunk.YIY5RM53.js";
|
|
13
|
+
import {
|
|
14
|
+
ifDefinedAndNotEmpty
|
|
15
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
13
16
|
import {
|
|
14
17
|
watch
|
|
15
|
-
} from "./chunk.
|
|
18
|
+
} from "./chunk.6IH66JBY.js";
|
|
16
19
|
import {
|
|
17
20
|
ShoelaceElement
|
|
18
21
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -245,8 +248,8 @@ var DSATextarea = class extends ShoelaceElement {
|
|
|
245
248
|
part="textarea"
|
|
246
249
|
id="input"
|
|
247
250
|
class="textarea__control"
|
|
248
|
-
title=${hasLabel ? void 0 : this.title}
|
|
249
|
-
name=${
|
|
251
|
+
title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
252
|
+
name=${ifDefinedAndNotEmpty(this.name)}
|
|
250
253
|
.value=${live(this.value)}
|
|
251
254
|
?disabled=${this.disabled}
|
|
252
255
|
?readonly=${this.readonly}
|
|
@@ -262,7 +265,9 @@ var DSATextarea = class extends ShoelaceElement {
|
|
|
262
265
|
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
263
266
|
inputmode=${ifDefined(this.inputmode)}
|
|
264
267
|
aria-describedby=${this.error ? "error-text help-text" : "help-text"}
|
|
265
|
-
aria-label=${
|
|
268
|
+
aria-label=${ifDefinedAndNotEmpty(
|
|
269
|
+
hasLabel ? void 0 : this.title
|
|
270
|
+
)}
|
|
266
271
|
@change=${this.handleChange}
|
|
267
272
|
@input=${this.handleInput}
|
|
268
273
|
@invalid=${this.handleInvalid}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
icon_button_styles_default
|
|
3
3
|
} from "./chunk.QFJA3MTV.js";
|
|
4
|
+
import {
|
|
5
|
+
ifDefinedAndNotEmpty
|
|
6
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
4
7
|
import {
|
|
5
8
|
ShoelaceElement
|
|
6
9
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -68,7 +71,7 @@ var DSAIconButton = class extends ShoelaceElement {
|
|
|
68
71
|
)}
|
|
69
72
|
role=${ifDefined(isLink ? void 0 : "button")}
|
|
70
73
|
aria-disabled=${this.disabled ? "true" : "false"}
|
|
71
|
-
aria-label
|
|
74
|
+
aria-label=${ifDefinedAndNotEmpty(this.label)}
|
|
72
75
|
tabindex=${this.disableTabIndex || this.disabled ? "-1" : "0"}
|
|
73
76
|
@blur=${this.handleBlur}
|
|
74
77
|
@focus=${this.handleFocus}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
input_styles_default
|
|
3
|
-
} from "./chunk.WNHQYL5W.js";
|
|
4
1
|
import {
|
|
5
2
|
getOverridenIconDetails,
|
|
6
3
|
isPrefixIconOverriden
|
|
7
4
|
} from "./chunk.KBT2EKLF.js";
|
|
5
|
+
import {
|
|
6
|
+
input_styles_default
|
|
7
|
+
} from "./chunk.MTZZV3NB.js";
|
|
8
8
|
import {
|
|
9
9
|
defaultValue
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.CMJ2SRTL.js";
|
|
11
11
|
import {
|
|
12
12
|
FormControlController
|
|
13
13
|
} from "./chunk.KIFBWPW5.js";
|
|
14
14
|
import {
|
|
15
15
|
HasSlotController
|
|
16
16
|
} from "./chunk.YIY5RM53.js";
|
|
17
|
+
import {
|
|
18
|
+
ifDefinedAndNotEmpty
|
|
19
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
17
20
|
import {
|
|
18
21
|
LocalizeController
|
|
19
|
-
} from "./chunk.
|
|
22
|
+
} from "./chunk.NBPVVWJU.js";
|
|
20
23
|
import {
|
|
21
24
|
watch
|
|
22
|
-
} from "./chunk.
|
|
25
|
+
} from "./chunk.6IH66JBY.js";
|
|
23
26
|
import {
|
|
24
27
|
ShoelaceElement
|
|
25
28
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -141,16 +144,6 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
141
144
|
handlePasswordToggle() {
|
|
142
145
|
this.passwordVisible = !this.passwordVisible;
|
|
143
146
|
}
|
|
144
|
-
getPickerIcon() {
|
|
145
|
-
switch (this.type) {
|
|
146
|
-
case "date":
|
|
147
|
-
return "calendar_today";
|
|
148
|
-
case "time":
|
|
149
|
-
return "schedule";
|
|
150
|
-
default:
|
|
151
|
-
return void 0;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
147
|
handleErrorChange() {
|
|
155
148
|
if (this.error) {
|
|
156
149
|
this.setAttribute("aria-invalid", "true");
|
|
@@ -242,7 +235,6 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
242
235
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
243
236
|
const hasClearIcon = this.clearable && !this.disabled && !this.readonly && (typeof this.value === "number" || this.value.length > 0);
|
|
244
237
|
const hasHideIcon = this.type === "password" && !this.disabled;
|
|
245
|
-
const pickerIcon = this.getPickerIcon();
|
|
246
238
|
return html`
|
|
247
239
|
<div
|
|
248
240
|
part="form-control"
|
|
@@ -303,8 +295,8 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
303
295
|
id="input"
|
|
304
296
|
class="input__control"
|
|
305
297
|
type=${this.type === "password" && this.passwordVisible ? "text" : this.type}
|
|
306
|
-
title=${hasLabel ? void 0 : this.title}
|
|
307
|
-
name=${
|
|
298
|
+
title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
299
|
+
name=${ifDefinedAndNotEmpty(this.name)}
|
|
308
300
|
?disabled=${this.disabled}
|
|
309
301
|
?readonly=${this.readonly}
|
|
310
302
|
?required=${this.required}
|
|
@@ -323,7 +315,9 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
323
315
|
pattern=${ifDefined(this.pattern)}
|
|
324
316
|
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
325
317
|
inputmode=${ifDefined(this.inputmode)}
|
|
326
|
-
aria-label=${
|
|
318
|
+
aria-label=${ifDefinedAndNotEmpty(
|
|
319
|
+
hasLabel ? void 0 : this.title
|
|
320
|
+
)}
|
|
327
321
|
aria-describedby=${this.error ? "error-text help-text" : "help-text"}
|
|
328
322
|
@change=${this.handleChange}
|
|
329
323
|
@input=${this.handleInput}
|
|
@@ -338,7 +332,7 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
338
332
|
part="clear-button"
|
|
339
333
|
class="input__action-button"
|
|
340
334
|
name="clear"
|
|
341
|
-
|
|
335
|
+
label=${this.localize.term("clearEntry")}
|
|
342
336
|
@click=${this.handleClearClick}
|
|
343
337
|
></dsa-icon-button>
|
|
344
338
|
` : ""}
|
|
@@ -351,12 +345,12 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
351
345
|
name=${this.passwordVisible ? "visibility_off" : "visibility"}
|
|
352
346
|
@click=${this.handlePasswordToggle}
|
|
353
347
|
></dsa-icon-button>` : ""}
|
|
354
|
-
${
|
|
348
|
+
${this.type === "time" ? html`
|
|
355
349
|
<dsa-icon-button
|
|
356
350
|
part="picker-button"
|
|
357
351
|
class="input__action-button"
|
|
358
|
-
name
|
|
359
|
-
|
|
352
|
+
name="schedule"
|
|
353
|
+
label=${this.localize.term("selectATime")}
|
|
360
354
|
@click=${this.showPicker}
|
|
361
355
|
></dsa-icon-button>
|
|
362
356
|
` : ""}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultValue
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.CMJ2SRTL.js";
|
|
4
4
|
import {
|
|
5
5
|
FormControlController
|
|
6
6
|
} from "./chunk.KIFBWPW5.js";
|
|
7
7
|
import {
|
|
8
8
|
checkbox_styles_default
|
|
9
9
|
} from "./chunk.WE6IG5XG.js";
|
|
10
|
+
import {
|
|
11
|
+
ifDefinedAndNotEmpty
|
|
12
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
10
13
|
import {
|
|
11
14
|
watch
|
|
12
|
-
} from "./chunk.
|
|
15
|
+
} from "./chunk.6IH66JBY.js";
|
|
13
16
|
import {
|
|
14
17
|
ShoelaceElement
|
|
15
18
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -150,8 +153,8 @@ var DSACheckbox = class extends ShoelaceElement {
|
|
|
150
153
|
<input
|
|
151
154
|
class="checkbox__input"
|
|
152
155
|
type="checkbox"
|
|
153
|
-
title=${this.title}
|
|
154
|
-
name=${this.name}
|
|
156
|
+
title=${ifDefinedAndNotEmpty(this.title)}
|
|
157
|
+
name=${ifDefinedAndNotEmpty(this.name)}
|
|
155
158
|
value=${ifDefined(this.value)}
|
|
156
159
|
.indeterminate=${live(this.indeterminate)}
|
|
157
160
|
.checked=${live(this.checked)}
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk.EMIT7S33.js";
|
|
7
7
|
import {
|
|
8
8
|
LocalizeController
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.NBPVVWJU.js";
|
|
10
10
|
import {
|
|
11
11
|
watch
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.6IH66JBY.js";
|
|
13
13
|
import {
|
|
14
14
|
ShoelaceElement
|
|
15
15
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
select_styles_default
|
|
3
|
-
} from "./chunk.
|
|
4
|
-
import {
|
|
5
|
-
defaultValue
|
|
6
|
-
} from "./chunk.GI7VDIWX.js";
|
|
3
|
+
} from "./chunk.D6DEGG4H.js";
|
|
7
4
|
import {
|
|
8
5
|
scrollIntoView
|
|
9
6
|
} from "./chunk.EMIT7S33.js";
|
|
7
|
+
import {
|
|
8
|
+
defaultValue
|
|
9
|
+
} from "./chunk.CMJ2SRTL.js";
|
|
10
10
|
import {
|
|
11
11
|
FormControlController
|
|
12
12
|
} from "./chunk.KIFBWPW5.js";
|
|
13
13
|
import {
|
|
14
14
|
HasSlotController
|
|
15
15
|
} from "./chunk.YIY5RM53.js";
|
|
16
|
+
import {
|
|
17
|
+
ifDefinedAndNotEmpty
|
|
18
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
16
19
|
import {
|
|
17
20
|
waitForEvent
|
|
18
21
|
} from "./chunk.B4BZKR24.js";
|
|
@@ -26,10 +29,10 @@ import {
|
|
|
26
29
|
} from "./chunk.V7RJROLH.js";
|
|
27
30
|
import {
|
|
28
31
|
LocalizeController
|
|
29
|
-
} from "./chunk.
|
|
32
|
+
} from "./chunk.NBPVVWJU.js";
|
|
30
33
|
import {
|
|
31
34
|
watch
|
|
32
|
-
} from "./chunk.
|
|
35
|
+
} from "./chunk.6IH66JBY.js";
|
|
33
36
|
import {
|
|
34
37
|
ShoelaceElement
|
|
35
38
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -41,6 +44,7 @@ import {
|
|
|
41
44
|
import { html } from "lit";
|
|
42
45
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
43
46
|
import { classMap } from "lit/directives/class-map.js";
|
|
47
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
44
48
|
var DSASelect = class extends ShoelaceElement {
|
|
45
49
|
constructor() {
|
|
46
50
|
super(...arguments);
|
|
@@ -67,6 +71,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
67
71
|
this.variant = "base";
|
|
68
72
|
this.maxOptionsVisible = 3;
|
|
69
73
|
this.disabled = false;
|
|
74
|
+
this.readonly = false;
|
|
70
75
|
this.clearable = false;
|
|
71
76
|
this.open = false;
|
|
72
77
|
this.hoist = false;
|
|
@@ -127,8 +132,10 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
127
132
|
if (isClearButton || isIconButton) {
|
|
128
133
|
return;
|
|
129
134
|
}
|
|
130
|
-
if (event.key === "
|
|
131
|
-
event.
|
|
135
|
+
if (this.open && (event.key === "Tab" || event.key === "Escape")) {
|
|
136
|
+
if (event.key === "Escape") {
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
}
|
|
132
139
|
event.stopPropagation();
|
|
133
140
|
this.hide();
|
|
134
141
|
this.displayInput.focus({ preventScroll: true });
|
|
@@ -229,7 +236,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
229
236
|
const isIconButton = path.some(
|
|
230
237
|
(el) => el instanceof Element && el.tagName.toLowerCase() === "dsa-icon-button"
|
|
231
238
|
);
|
|
232
|
-
if (this.disabled || isIconButton) {
|
|
239
|
+
if (this.readonly || this.disabled || isIconButton) {
|
|
233
240
|
return;
|
|
234
241
|
}
|
|
235
242
|
event.preventDefault();
|
|
@@ -379,6 +386,12 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
379
386
|
this.handleOpenChange();
|
|
380
387
|
}
|
|
381
388
|
}
|
|
389
|
+
handleReadonlyChange() {
|
|
390
|
+
if (this.readonly) {
|
|
391
|
+
this.open = false;
|
|
392
|
+
this.handleOpenChange();
|
|
393
|
+
}
|
|
394
|
+
}
|
|
382
395
|
handleValueChange() {
|
|
383
396
|
const allOptions = this.getAllOptions();
|
|
384
397
|
const value = Array.isArray(this.value) ? this.value : [this.value];
|
|
@@ -387,7 +400,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
387
400
|
);
|
|
388
401
|
}
|
|
389
402
|
async handleOpenChange() {
|
|
390
|
-
if (this.open && !this.disabled) {
|
|
403
|
+
if (this.open && !this.disabled && !this.readonly) {
|
|
391
404
|
this.setCurrentOption(this.selectedOptions[0] || this.getFirstOption());
|
|
392
405
|
this.emit("dsa-show");
|
|
393
406
|
this.addOpenListeners();
|
|
@@ -420,7 +433,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
420
433
|
}
|
|
421
434
|
/** Shows the listbox. */
|
|
422
435
|
async show() {
|
|
423
|
-
if (this.open || this.disabled) {
|
|
436
|
+
if (this.open || this.disabled || this.readonly) {
|
|
424
437
|
this.open = false;
|
|
425
438
|
return void 0;
|
|
426
439
|
}
|
|
@@ -429,7 +442,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
429
442
|
}
|
|
430
443
|
/** Hides the listbox. */
|
|
431
444
|
async hide() {
|
|
432
|
-
if (!this.open || this.disabled) {
|
|
445
|
+
if (!this.open || this.disabled || this.readonly) {
|
|
433
446
|
this.open = false;
|
|
434
447
|
return void 0;
|
|
435
448
|
}
|
|
@@ -467,16 +480,18 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
467
480
|
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
468
481
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
469
482
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
470
|
-
const hasClearIcon = this.clearable && !this.disabled && isValueDefined;
|
|
483
|
+
const hasClearIcon = this.clearable && !this.disabled && !this.readonly && isValueDefined;
|
|
471
484
|
const isPlaceholderVisible = this.placeholder && this.value.length === 0;
|
|
472
485
|
const selectInputWidth = this.displayValue ? isValueDefined ? this.value.length : 1 : void 0;
|
|
486
|
+
const isDisabledOrReadonly = this.disabled || this.readonly;
|
|
473
487
|
return html`
|
|
474
488
|
<div
|
|
475
489
|
part="form-control"
|
|
476
490
|
class=${classMap({
|
|
477
491
|
"form-control": true,
|
|
478
|
-
"form-control--error": this.error,
|
|
492
|
+
"form-control--error": this.error && !isDisabledOrReadonly,
|
|
479
493
|
"form-control--disabled": this.disabled,
|
|
494
|
+
"form-control--readonly": this.readonly,
|
|
480
495
|
"form-control--small": this.size === "small",
|
|
481
496
|
"form-control--medium": this.size === "medium",
|
|
482
497
|
"form-control--large": this.size === "large",
|
|
@@ -506,6 +521,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
506
521
|
"select--error": this.error,
|
|
507
522
|
"select--open": this.open,
|
|
508
523
|
"select--disabled": this.disabled,
|
|
524
|
+
"select--readonly": this.readonly,
|
|
509
525
|
"select--multiple": this.multiple,
|
|
510
526
|
"select--focused": this.hasFocus,
|
|
511
527
|
"select--placeholder-visible": isPlaceholderVisible,
|
|
@@ -546,20 +562,24 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
546
562
|
class="select__display-input"
|
|
547
563
|
type="text"
|
|
548
564
|
placeholder=${this.placeholder}
|
|
549
|
-
.disabled=${
|
|
565
|
+
.disabled=${isDisabledOrReadonly}
|
|
550
566
|
.value=${this.displayValue ? this.value : this.displayLabel}
|
|
551
|
-
size=${selectInputWidth}
|
|
567
|
+
size=${ifDefined(selectInputWidth)}
|
|
552
568
|
autocomplete="off"
|
|
553
569
|
spellcheck="false"
|
|
554
570
|
autocapitalize="off"
|
|
555
571
|
readonly
|
|
556
|
-
title=${hasLabel ? void 0 : this.title}
|
|
572
|
+
title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
557
573
|
aria-controls="listbox"
|
|
558
574
|
aria-expanded=${this.open ? "true" : "false"}
|
|
559
575
|
aria-haspopup="listbox"
|
|
560
|
-
aria-labelledby=${
|
|
561
|
-
|
|
562
|
-
|
|
576
|
+
aria-labelledby=${ifDefinedAndNotEmpty(
|
|
577
|
+
hasLabel ? "label" : void 0
|
|
578
|
+
)}
|
|
579
|
+
aria-label=${ifDefinedAndNotEmpty(
|
|
580
|
+
hasLabel ? void 0 : this.title
|
|
581
|
+
)}
|
|
582
|
+
aria-disabled=${isDisabledOrReadonly ? "true" : "false"}
|
|
563
583
|
aria-describedby="help-text"
|
|
564
584
|
role="combobox"
|
|
565
585
|
tabindex="0"
|
|
@@ -607,7 +627,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
607
627
|
<input
|
|
608
628
|
class="select__value-input"
|
|
609
629
|
type="text"
|
|
610
|
-
?disabled=${
|
|
630
|
+
?disabled=${isDisabledOrReadonly}
|
|
611
631
|
?required=${this.required}
|
|
612
632
|
.value=${Array.isArray(this.value) ? this.value.join(", ") : this.value}
|
|
613
633
|
tabindex="-1"
|
|
@@ -624,12 +644,10 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
624
644
|
aria-label=${this.localize.term("clearEntry")}
|
|
625
645
|
@mousedown=${this.handleClearMouseDown}
|
|
626
646
|
@click=${this.handleClearClick}
|
|
627
|
-
tabindex="-1"
|
|
628
647
|
>
|
|
629
648
|
<dsa-icon name="close"></dsa-icon>
|
|
630
649
|
</button>
|
|
631
650
|
` : ""}
|
|
632
|
-
|
|
633
651
|
<dsa-icon
|
|
634
652
|
class="select__expand-icon"
|
|
635
653
|
name="arrow_drop_down"
|
|
@@ -660,7 +678,7 @@ var DSASelect = class extends ShoelaceElement {
|
|
|
660
678
|
${this.helpText}
|
|
661
679
|
</slot>
|
|
662
680
|
|
|
663
|
-
${this.error && !
|
|
681
|
+
${this.error && !isDisabledOrReadonly ? html`<dsa-error-text
|
|
664
682
|
part="form-control-error-text"
|
|
665
683
|
class="form-control__error-text"
|
|
666
684
|
>${this.errorMessage}</dsa-error-text
|
|
@@ -738,6 +756,9 @@ __decorateClass([
|
|
|
738
756
|
__decorateClass([
|
|
739
757
|
property({ type: Boolean, reflect: true })
|
|
740
758
|
], DSASelect.prototype, "disabled", 2);
|
|
759
|
+
__decorateClass([
|
|
760
|
+
property({ type: Boolean })
|
|
761
|
+
], DSASelect.prototype, "readonly", 2);
|
|
741
762
|
__decorateClass([
|
|
742
763
|
property({ type: Boolean })
|
|
743
764
|
], DSASelect.prototype, "clearable", 2);
|
|
@@ -777,6 +798,9 @@ __decorateClass([
|
|
|
777
798
|
__decorateClass([
|
|
778
799
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
779
800
|
], DSASelect.prototype, "handleDisabledChange", 1);
|
|
801
|
+
__decorateClass([
|
|
802
|
+
watch("readonly", { waitUntilFirstUpdate: true })
|
|
803
|
+
], DSASelect.prototype, "handleReadonlyChange", 1);
|
|
780
804
|
__decorateClass([
|
|
781
805
|
watch("value", { waitUntilFirstUpdate: true })
|
|
782
806
|
], DSASelect.prototype, "handleValueChange", 1);
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
input_mask_styles_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.2HV2U4RQ.js";
|
|
4
4
|
import {
|
|
5
5
|
getMaskedValue,
|
|
6
6
|
stripSpecialChars
|
|
7
7
|
} from "./chunk.SQMWMSBA.js";
|
|
8
8
|
import {
|
|
9
9
|
defaultValue
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.CMJ2SRTL.js";
|
|
11
11
|
import {
|
|
12
12
|
FormControlController
|
|
13
13
|
} from "./chunk.KIFBWPW5.js";
|
|
14
14
|
import {
|
|
15
15
|
HasSlotController
|
|
16
16
|
} from "./chunk.YIY5RM53.js";
|
|
17
|
+
import {
|
|
18
|
+
ifDefinedAndNotEmpty
|
|
19
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
17
20
|
import {
|
|
18
21
|
LocalizeController
|
|
19
|
-
} from "./chunk.
|
|
22
|
+
} from "./chunk.NBPVVWJU.js";
|
|
20
23
|
import {
|
|
21
24
|
watch
|
|
22
|
-
} from "./chunk.
|
|
25
|
+
} from "./chunk.6IH66JBY.js";
|
|
23
26
|
import {
|
|
24
27
|
ShoelaceElement
|
|
25
28
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -277,8 +280,8 @@ var DSAInputMask = class extends ShoelaceElement {
|
|
|
277
280
|
"input-mask__control-with-prefix": hasPrefixIcon
|
|
278
281
|
})}
|
|
279
282
|
type="text"
|
|
280
|
-
title=${hasLabel ? void 0 : this.title}
|
|
281
|
-
name=${
|
|
283
|
+
title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
284
|
+
name=${ifDefinedAndNotEmpty(this.name)}
|
|
282
285
|
?disabled=${this.disabled}
|
|
283
286
|
?readonly=${this.readonly}
|
|
284
287
|
?required=${this.required}
|
|
@@ -294,8 +297,10 @@ var DSAInputMask = class extends ShoelaceElement {
|
|
|
294
297
|
spellcheck=${this.spellcheck}
|
|
295
298
|
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
296
299
|
inputmode=${this.inputmode}
|
|
297
|
-
aria-label=${
|
|
298
|
-
|
|
300
|
+
aria-label=${ifDefinedAndNotEmpty(
|
|
301
|
+
hasLabel ? void 0 : this.title
|
|
302
|
+
)}
|
|
303
|
+
aria-describedby=${this.error ? "input-mask error-text help-text" : "input-mask help-text"}
|
|
299
304
|
@change=${this.handleChange}
|
|
300
305
|
@input=${this.handleInput}
|
|
301
306
|
@invalid=${this.handleInvalid}
|
|
@@ -313,7 +318,6 @@ var DSAInputMask = class extends ShoelaceElement {
|
|
|
313
318
|
type="button"
|
|
314
319
|
aria-label=${this.localize.term("clearEntry")}
|
|
315
320
|
@click=${this.handleClearClick}
|
|
316
|
-
tabindex="-1"
|
|
317
321
|
>
|
|
318
322
|
<slot name="clear-icon">
|
|
319
323
|
<dsa-icon name="close"></dsa-icon>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tag_styles_default
|
|
3
3
|
} from "./chunk.WFHOSUOX.js";
|
|
4
|
+
import {
|
|
5
|
+
ifDefinedAndNotEmpty
|
|
6
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
4
7
|
import {
|
|
5
8
|
LocalizeController
|
|
6
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.NBPVVWJU.js";
|
|
7
10
|
import {
|
|
8
11
|
ShoelaceElement
|
|
9
12
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -43,7 +46,7 @@ var DSATag = class extends ShoelaceElement {
|
|
|
43
46
|
// Modifiers
|
|
44
47
|
"tag--removable": this.removable
|
|
45
48
|
})}
|
|
46
|
-
title=${this.label}
|
|
49
|
+
title=${ifDefinedAndNotEmpty(this.label)}
|
|
47
50
|
>
|
|
48
51
|
<slot part="prefix" name="prefix" class="tag__prefix"></slot>
|
|
49
52
|
|
|
@@ -56,7 +59,7 @@ var DSATag = class extends ShoelaceElement {
|
|
|
56
59
|
part="remove-button"
|
|
57
60
|
exportparts="base:remove-button__base"
|
|
58
61
|
name="close"
|
|
59
|
-
label=${this.localize.term("remove")}
|
|
62
|
+
label=${`${this.localize.term("remove")} ${this.label}`}
|
|
60
63
|
class="tag__remove"
|
|
61
64
|
@click=${this.handleRemoveClick}
|
|
62
65
|
?disable-tab-index=${this.disableRemovableFocus}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
drawer_styles_default
|
|
3
|
-
} from "./chunk.DXVNWE2M.js";
|
|
4
1
|
import {
|
|
5
2
|
Modal
|
|
6
3
|
} from "./chunk.ISAFRNR2.js";
|
|
4
|
+
import {
|
|
5
|
+
drawer_styles_default
|
|
6
|
+
} from "./chunk.DXVNWE2M.js";
|
|
7
7
|
import {
|
|
8
8
|
lockBodyScrolling,
|
|
9
9
|
unlockBodyScrolling
|
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
HasSlotController
|
|
13
13
|
} from "./chunk.YIY5RM53.js";
|
|
14
|
+
import {
|
|
15
|
+
ifDefinedAndNotEmpty
|
|
16
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
14
17
|
import {
|
|
15
18
|
waitForEvent
|
|
16
19
|
} from "./chunk.B4BZKR24.js";
|
|
@@ -24,10 +27,10 @@ import {
|
|
|
24
27
|
} from "./chunk.V7RJROLH.js";
|
|
25
28
|
import {
|
|
26
29
|
LocalizeController
|
|
27
|
-
} from "./chunk.
|
|
30
|
+
} from "./chunk.NBPVVWJU.js";
|
|
28
31
|
import {
|
|
29
32
|
watch
|
|
30
|
-
} from "./chunk.
|
|
33
|
+
} from "./chunk.6IH66JBY.js";
|
|
31
34
|
import {
|
|
32
35
|
ShoelaceElement
|
|
33
36
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -260,7 +263,9 @@ var DSADrawer = class extends ShoelaceElement {
|
|
|
260
263
|
role="dialog"
|
|
261
264
|
aria-modal="true"
|
|
262
265
|
aria-hidden=${this.open ? "false" : "true"}
|
|
263
|
-
aria-label=${
|
|
266
|
+
aria-label=${ifDefinedAndNotEmpty(
|
|
267
|
+
this.noHeader ? this.label : void 0
|
|
268
|
+
)}
|
|
264
269
|
aria-labelledby=${ifDefined(!this.noHeader ? "title" : void 0)}
|
|
265
270
|
tabindex="0"
|
|
266
271
|
>
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
} from "./chunk.V7RJROLH.js";
|
|
12
12
|
import {
|
|
13
13
|
LocalizeController
|
|
14
|
-
} from "./chunk.
|
|
14
|
+
} from "./chunk.NBPVVWJU.js";
|
|
15
15
|
import {
|
|
16
16
|
alert_styles_default
|
|
17
17
|
} from "./chunk.Z6TBD2AC.js";
|
|
18
18
|
import {
|
|
19
19
|
watch
|
|
20
|
-
} from "./chunk.
|
|
20
|
+
} from "./chunk.6IH66JBY.js";
|
|
21
21
|
import {
|
|
22
22
|
ShoelaceElement
|
|
23
23
|
} from "./chunk.YCXTCVAZ.js";
|