@ds-autonomie/web-components 1.0.1 → 1.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/CHANGELOG.md +38 -0
- package/dist/chunks/{chunk.K6WCEYZI.js → chunk.2CCKS3CP.js} +1 -1
- 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.KOH5V4C6.js → chunk.4MC32HP7.js} +21 -17
- package/dist/chunks/{chunk.BLPP3Q5H.js → chunk.5324JGM4.js} +11 -4
- package/dist/chunks/{chunk.WIEJJS3W.js → chunk.6BJBVSW4.js} +1 -1
- package/dist/chunks/{chunk.D7CATJYB.js → chunk.6IH66JBY.js} +1 -1
- package/dist/chunks/{chunk.YS7MY5CH.js → chunk.7EWUWW3E.js} +18 -24
- package/dist/chunks/chunk.7HGZSZJK.js +409 -0
- package/dist/chunks/{chunk.ODSCDJDO.js → chunk.ARVWTY56.js} +5 -4
- package/dist/chunks/{chunk.KDAK2GXX.js → chunk.AYXPVAYS.js} +1 -1
- package/dist/chunks/{chunk.WSVP75MH.js → chunk.CBMFAOZI.js} +1 -1
- package/dist/chunks/chunk.CMJ2SRTL.js +26 -0
- package/dist/chunks/{chunk.DURVPB6M.js → chunk.D6DEGG4H.js} +25 -6
- package/dist/chunks/{chunk.MY434P47.js → chunk.DFTZEFHF.js} +2 -2
- package/dist/chunks/{chunk.4XT2OJD2.js → chunk.DZWH4V6H.js} +8 -4
- 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.OVK7QCA7.js → chunk.F4XMSVNF.js} +13 -9
- package/dist/chunks/{chunk.4A3WMGMZ.js → chunk.FHDPJN6L.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.PWWER3ZK.js → chunk.GJCVGGCP.js} +48 -24
- package/dist/chunks/{chunk.WHK7EFIM.js → chunk.GP5Z27QB.js} +7 -4
- package/dist/chunks/{chunk.UA32LJYW.js → chunk.HEOTAAPU.js} +2 -2
- package/dist/chunks/{chunk.JETXIC4F.js → chunk.HPK6C7NJ.js} +1 -1
- package/dist/chunks/{chunk.A2PAK6VF.js → chunk.ILUHEJYG.js} +2 -2
- package/dist/chunks/{chunk.5XL2LZLC.js → chunk.IQ7SDYSC.js} +4 -0
- package/dist/chunks/{chunk.GYTA2LJC.js → chunk.J6XP4AFN.js} +1 -1
- package/dist/chunks/{chunk.UZLQVFDR.js → chunk.L6LQN6AI.js} +2 -2
- package/dist/chunks/{chunk.BEB47LM2.js → chunk.LSKBY2HF.js} +2 -2
- package/dist/chunks/{chunk.WNHQYL5W.js → chunk.MTZZV3NB.js} +4 -20
- package/dist/chunks/{chunk.7ZCCXTFG.js → chunk.NBQ3AEK6.js} +2 -2
- package/dist/chunks/{chunk.HC5BO5YV.js → chunk.NHYFVEGM.js} +5 -16
- package/dist/chunks/{chunk.QKNNLZ2M.js → chunk.NKPNQBLW.js} +5 -5
- package/dist/chunks/{chunk.MOWTZFON.js → chunk.NKVYNBAI.js} +1 -1
- package/dist/chunks/{chunk.7NWAYDYI.js → chunk.NOEQVLAW.js} +3 -3
- package/dist/chunks/{chunk.INCGVIAQ.js → chunk.QSPKKO3T.js} +1 -1
- package/dist/chunks/chunk.R37CT3PN.js +865 -0
- package/dist/chunks/{chunk.IRQOFNJE.js → chunk.RSJYKNXT.js} +8 -3
- package/dist/chunks/{chunk.5XUV3SRW.js → chunk.ST2QYN4S.js} +11 -6
- package/dist/chunks/{chunk.LT7JMZ3T.js → chunk.T7JSALXE.js} +2 -2
- package/dist/chunks/{chunk.N6VVY6XD.js → chunk.U5KRBVRP.js} +6 -3
- package/dist/chunks/{chunk.5LT3B7MI.js → chunk.UQYPPFBJ.js} +1 -1
- package/dist/chunks/{chunk.2HUORR44.js → chunk.V6V7AGDB.js} +1 -1
- package/dist/chunks/{chunk.UV53JTE3.js → chunk.VIULAG23.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.HLYGKGDG.js → chunk.W74UQSZJ.js} +8 -5
- package/dist/chunks/{chunk.AR5HJD7F.js → chunk.X6RQ2SQC.js} +1 -1
- package/dist/chunks/chunk.ZQJVCRB2.js +10 -0
- package/dist/chunks/{chunk.RIJQGADY.js → chunk.ZW4JE66G.js} +11 -4
- 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/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 +1104 -74
- package/dist/design-system.d.ts +1 -0
- package/dist/design-system.js +96 -90
- 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 +37 -6
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +43 -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 +2 -0
- package/dist/utilities/localize.js +1 -1
- package/dist/vscode.html-custom-data.json +130 -6
- package/dist/web-types.json +618 -9
- package/package.json +1 -1
- package/dist/chunks/chunk.GI7VDIWX.js +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @ds-autonomie/web-components
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8ee2a50: `combobox`: implementation du composant combobox avec selection simple
|
|
8
|
+
- 8ee2a50: `combobox`: ajout de la selection multiple pour le composant combobox
|
|
9
|
+
- 8ee2a50: `combobox`: ajout du support clavier pour le composant combobox
|
|
10
|
+
- 1454ca4: `tag`: ajustement accessibilité
|
|
11
|
+
- 8e1f790: `option`: Mise à jour graphique du composant option
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- e8223e1: `icon-button`: documentation
|
|
16
|
+
- d0e871e: `checkbox-group`,`textarea`,`input`,`input-mask`,`input-phone`,`select`: documentation du slot tooltip
|
|
17
|
+
- 46e7f52: `tests`: ajout d'un alias pour les fichiers statique dans les tests
|
|
18
|
+
- 98c11b1: `spinner`: documentation
|
|
19
|
+
- 9f8f02c: `input`: le type date utilise maintenant l'icône natif
|
|
20
|
+
- 060a3a5: `input-phone`: mise en conformité d'accessibilité
|
|
21
|
+
- a5079b4: `divider`: documentation
|
|
22
|
+
- e0b265a: `input-mask`: retour d'accessibilité
|
|
23
|
+
- ff81d71: `avatar`: retour d'accessibilité pour le composant avatar
|
|
24
|
+
- 6c2b585: `tokens`: ajustement des tokens interne pour l'état read-only
|
|
25
|
+
- f7926ce: `avatar`,`avatar-group`: documentation
|
|
26
|
+
- 0ec1b1b: `button`, `input`, `checkbox`, `progress-bar`, `textarea`: correction des attributs laissés à vide
|
|
27
|
+
- 9d06b7f: `input`: les icônes héritent la taille
|
|
28
|
+
- 88c6359: `skeleton`: documentation
|
|
29
|
+
- 99239a0: `progress-ring`: documentation
|
|
30
|
+
- 6c2b585: `select`: implémentation de l'état read-only
|
|
31
|
+
- ce2e57f: `card`: ajustement du header dans la story du composant card
|
|
32
|
+
- 9d9d8e6: `progress-ring`,`progress-bar`: mise en conformité d'accessibilité
|
|
33
|
+
- 5c676ec: `select`: retour d'accessibilité
|
|
34
|
+
- 061867c: `progress-bar`: documentation
|
|
35
|
+
- ff6b2e1: `radio-group`: mise en conformité d'accessibilité
|
|
36
|
+
- a5c8c68: `tab`,`tab-group`,`tab-panel`: documentation
|
|
37
|
+
- f1d87fd: `tree`,`tree-item`: documentation
|
|
38
|
+
- 9e87e96: `menu`,`menu-label`,`menu-item`: documentation
|
|
39
|
+
- 5cbf567: `badge`: documentation
|
|
40
|
+
|
|
3
41
|
## 1.0.1
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
|
@@ -55,7 +55,7 @@ var option_styles_default = css`
|
|
|
55
55
|
font-size: var(--dsa-wc-option-large-icon-size);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.option--hover:not(.option--
|
|
58
|
+
.option--hover:not(.option--selected):not(.option--disabled) {
|
|
59
59
|
background-color: var(--dsa-wc-option-hover-color);
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -64,8 +64,12 @@ var option_styles_default = css`
|
|
|
64
64
|
}
|
|
65
65
|
.option--current,
|
|
66
66
|
.option--current.option--disabled {
|
|
67
|
-
background-color: var(--dsa-wc-option-
|
|
68
|
-
|
|
67
|
+
background-color: var(--dsa-wc-option-hover-color);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.option--selected.option--current,
|
|
71
|
+
.option--selected.option--hover {
|
|
72
|
+
background-color: var(--dsa-wc-option-active-hover-background-color);
|
|
69
73
|
opacity: 1;
|
|
70
74
|
}
|
|
71
75
|
|
|
@@ -93,6 +97,11 @@ var option_styles_default = css`
|
|
|
93
97
|
visibility: visible;
|
|
94
98
|
}
|
|
95
99
|
|
|
100
|
+
.option--selected {
|
|
101
|
+
background-color: var(--dsa-wc-option-active-background-color);
|
|
102
|
+
color: var(--dsa-wc-option-active-color);
|
|
103
|
+
}
|
|
104
|
+
|
|
96
105
|
.option__prefix,
|
|
97
106
|
.option__suffix {
|
|
98
107
|
flex: 0 0 auto;
|
|
@@ -121,8 +121,8 @@ var input_mask_styles_default = css`
|
|
|
121
121
|
cursor: not-allowed;
|
|
122
122
|
}
|
|
123
123
|
.input-mask--on-base.input-mask--readonly {
|
|
124
|
-
background-color: var(--dsa-wc-input-on-base-
|
|
125
|
-
border-color: var(--dsa-wc-input-on-base-
|
|
124
|
+
background-color: var(--dsa-wc-input-on-base-read-only-background-color);
|
|
125
|
+
border-color: var(--dsa-wc-input-on-base-read-only-border-color);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.input-mask--on-base .input-mask__placeholder {
|
|
@@ -266,7 +266,6 @@ var input_mask_styles_default = css`
|
|
|
266
266
|
display: inline-flex;
|
|
267
267
|
align-items: center;
|
|
268
268
|
justify-content: center;
|
|
269
|
-
font-size: 1.25rem;
|
|
270
269
|
color: var(--dsa-color-input-icon-on-base-enabled);
|
|
271
270
|
border: none;
|
|
272
271
|
background: none;
|
|
@@ -291,7 +290,6 @@ var input_mask_styles_default = css`
|
|
|
291
290
|
.input-mask__prefix {
|
|
292
291
|
color: var(--dsa-wc-input-icon-color);
|
|
293
292
|
cursor: pointer;
|
|
294
|
-
font-size: 1.25rem;
|
|
295
293
|
}
|
|
296
294
|
|
|
297
295
|
.input-mask--empty .input-mask__clear {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DSASelect
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.GJCVGGCP.js";
|
|
4
|
+
import {
|
|
5
|
+
frenchFlag,
|
|
6
|
+
frenchNumberPrefix,
|
|
7
|
+
phoneInputValidityRegex,
|
|
8
|
+
phonePrefixOptions
|
|
9
|
+
} from "./chunk.6ZQ4OQ2C.js";
|
|
4
10
|
import {
|
|
5
11
|
getMaskedValue,
|
|
6
12
|
stripSpecialChars
|
|
@@ -10,25 +16,22 @@ import {
|
|
|
10
16
|
} from "./chunk.DRGGQ4WL.js";
|
|
11
17
|
import {
|
|
12
18
|
input_phone_styles_default
|
|
13
|
-
} from "./chunk.
|
|
14
|
-
import {
|
|
15
|
-
frenchFlag,
|
|
16
|
-
frenchNumberPrefix,
|
|
17
|
-
phoneInputValidityRegex,
|
|
18
|
-
phonePrefixOptions
|
|
19
|
-
} from "./chunk.6ZQ4OQ2C.js";
|
|
19
|
+
} from "./chunk.NHYFVEGM.js";
|
|
20
20
|
import {
|
|
21
21
|
defaultValue
|
|
22
|
-
} from "./chunk.
|
|
22
|
+
} from "./chunk.CMJ2SRTL.js";
|
|
23
23
|
import {
|
|
24
24
|
FormControlController
|
|
25
25
|
} from "./chunk.KIFBWPW5.js";
|
|
26
26
|
import {
|
|
27
27
|
HasSlotController
|
|
28
28
|
} from "./chunk.YIY5RM53.js";
|
|
29
|
+
import {
|
|
30
|
+
ifDefinedAndNotEmpty
|
|
31
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
29
32
|
import {
|
|
30
33
|
watch
|
|
31
|
-
} from "./chunk.
|
|
34
|
+
} from "./chunk.6IH66JBY.js";
|
|
32
35
|
import {
|
|
33
36
|
ShoelaceElement
|
|
34
37
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -367,7 +370,7 @@ var DSAInputPhone = class extends ShoelaceElement {
|
|
|
367
370
|
"input-phone--empty": this.phoneNumber === ""
|
|
368
371
|
})}
|
|
369
372
|
>
|
|
370
|
-
|
|
373
|
+
|
|
371
374
|
|
|
372
375
|
|
|
373
376
|
|
|
@@ -390,8 +393,8 @@ var DSAInputPhone = class extends ShoelaceElement {
|
|
|
390
393
|
"input-phone__control-with-prefix": hasPrefixIcon
|
|
391
394
|
})}
|
|
392
395
|
type="text"
|
|
393
|
-
title=${this.title}
|
|
394
|
-
name=${
|
|
396
|
+
title=${ifDefinedAndNotEmpty(this.title)}
|
|
397
|
+
name=${ifDefinedAndNotEmpty(this.name)}
|
|
395
398
|
?disabled=${this.disabled}
|
|
396
399
|
?readonly=${this.readonly}
|
|
397
400
|
?required=${this.required}
|
|
@@ -407,8 +410,8 @@ var DSAInputPhone = class extends ShoelaceElement {
|
|
|
407
410
|
spellcheck=${this.spellcheck}
|
|
408
411
|
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
409
412
|
inputmode='tel'
|
|
410
|
-
aria-label=${hasLabel ? this.label : this.title}
|
|
411
|
-
aria-describedby=${this.error ? "error-text help-text" : "help-text"}
|
|
413
|
+
aria-label=${ifDefinedAndNotEmpty(hasLabel ? this.label : this.title)}
|
|
414
|
+
aria-describedby=${this.error ? "input-phone error-text help-text" : "input-phone help-text"}
|
|
412
415
|
@change=${this.handleChange}
|
|
413
416
|
@input=${this.handleInput}
|
|
414
417
|
@keydown=${this.handleKeyDown}
|
|
@@ -422,10 +425,11 @@ var DSAInputPhone = class extends ShoelaceElement {
|
|
|
422
425
|
<dsa-icon-button
|
|
423
426
|
part="clear-button"
|
|
424
427
|
class="input-phone__clear"
|
|
425
|
-
|
|
428
|
+
label=${this.localize.term("clearEntry")}
|
|
426
429
|
@click=${this.handleClearIconClick}
|
|
427
430
|
name="close"
|
|
428
|
-
|
|
431
|
+
>
|
|
432
|
+
</dsa-icon-button>
|
|
429
433
|
` : ""}
|
|
430
434
|
|
|
431
435
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk.YIY5RM53.js";
|
|
13
13
|
import {
|
|
14
14
|
watch
|
|
15
|
-
} from "./chunk.
|
|
15
|
+
} from "./chunk.6IH66JBY.js";
|
|
16
16
|
import {
|
|
17
17
|
ShoelaceElement
|
|
18
18
|
} from "./chunk.YCXTCVAZ.js";
|
|
@@ -340,14 +340,21 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
340
340
|
}
|
|
341
341
|
updateCheckedRadio() {
|
|
342
342
|
const radios = this.getAllRadios();
|
|
343
|
-
radios.forEach((radio) => {
|
|
343
|
+
radios.forEach((radio, index) => {
|
|
344
344
|
radio.checked = radio.value === this.value;
|
|
345
|
+
const shouldFocus = this.value === "" && index === 0;
|
|
345
346
|
if (this.hasRadioButtons) {
|
|
346
347
|
const radioButton = radio;
|
|
347
|
-
radioButton.button.tabIndex = radio.checked ? 0 : -1;
|
|
348
|
+
radioButton.button.tabIndex = shouldFocus || radio.checked ? 0 : -1;
|
|
348
349
|
radio.disabled = this.readonlyRadioButtonValue.get(this.value) || radioButton.readonly;
|
|
350
|
+
if (shouldFocus) {
|
|
351
|
+
radioButton.button.focus();
|
|
352
|
+
}
|
|
349
353
|
} else {
|
|
350
|
-
radio.tabIndex = radio.checked ? 0 : -1;
|
|
354
|
+
radio.tabIndex = shouldFocus || radio.checked ? 0 : -1;
|
|
355
|
+
if (shouldFocus) {
|
|
356
|
+
radio.focus();
|
|
357
|
+
}
|
|
351
358
|
}
|
|
352
359
|
});
|
|
353
360
|
this.formControlController.setValidity(this.validity.valid);
|
|
@@ -10,7 +10,7 @@ function watch(propertyName, options) {
|
|
|
10
10
|
return (proto, decoratedFnName) => {
|
|
11
11
|
const { update } = proto;
|
|
12
12
|
const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
|
|
13
|
-
proto.update = function(changedProps) {
|
|
13
|
+
proto.update = function updateFn(changedProps) {
|
|
14
14
|
watchedProperties.forEach((property) => {
|
|
15
15
|
const key = property;
|
|
16
16
|
if (changedProps.has(key)) {
|
|
@@ -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.IQ7SDYSC.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
|
` : ""}
|