@ds-autonomie/web-components 2.1.0 → 2.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 +13 -0
- package/cdn/chunks/{chunk.ZDLDKWEM.js → chunk.2APAO2OW.js} +1 -1
- package/cdn/chunks/{chunk.JTHUYIYP.js → chunk.2DJERWBI.js} +5 -5
- package/cdn/chunks/{chunk.QCSRN6TI.js → chunk.3JMBGIZN.js} +1 -1
- package/cdn/chunks/{chunk.Z2IR3WWE.js → chunk.4NC4QO64.js} +1 -1
- package/cdn/chunks/{chunk.OZEY33RC.js → chunk.5LXQ3RKQ.js} +2 -22
- package/cdn/chunks/{chunk.JSVJ7J76.js → chunk.6QTMZJGH.js} +1 -1
- package/cdn/chunks/{chunk.6E6G25TQ.js → chunk.A33BZOMA.js} +1 -1
- package/cdn/chunks/{chunk.LRMXGBIU.js → chunk.ATHAYO6A.js} +155 -4
- package/cdn/chunks/{chunk.Z6DEWBVS.js → chunk.C62MMBV4.js} +10 -0
- package/cdn/chunks/{chunk.5AFQZ4HE.js → chunk.CYMM2ZAV.js} +6 -0
- package/cdn/chunks/chunk.F7NUIVDV.js +10 -0
- package/cdn/chunks/{chunk.OVD3Q2LV.js → chunk.FHOCNAJ4.js} +5 -2
- package/cdn/chunks/{chunk.KTAPO27T.js → chunk.HYTYRM6S.js} +1 -1
- package/cdn/chunks/{chunk.S4BW7KNM.js → chunk.J73YJOU4.js} +1 -1
- package/cdn/chunks/chunk.KELDA33H.js +198 -0
- package/cdn/chunks/{chunk.R6BGXKHX.js → chunk.LNBAAP45.js} +1 -1
- package/cdn/chunks/{chunk.MEYHIAQ5.js → chunk.M7QHADJH.js} +5 -1
- package/cdn/chunks/chunk.MJLKYERJ.js +348 -0
- package/cdn/chunks/chunk.PWL7QCVG.js +9 -0
- package/cdn/chunks/{chunk.Y5CXRULD.js → chunk.UAQ7MMLI.js} +1 -1
- package/cdn/chunks/{chunk.PMMQ5QVY.js → chunk.XQAKSW3W.js} +12 -1
- package/cdn/chunks/{chunk.NPJ5ZOJ4.js → chunk.YQQNMFZF.js} +20 -85
- package/cdn/chunks/{chunk.E4GNTJPS.js → chunk.YS6XV3LD.js} +1 -1
- package/cdn/components/checkbox/checkbox.d.ts +1 -0
- package/cdn/components/checkbox/checkbox.js +6 -1
- package/cdn/components/checkbox-button/checkbox-button.d.ts +1 -0
- package/cdn/components/checkbox-button/checkbox-button.js +1 -1
- package/cdn/components/checkbox-group/checkbox-group.d.ts +5 -8
- package/cdn/components/checkbox-group/checkbox-group.js +3 -5
- package/cdn/components/checkbox-group/checkbox-group.styles.js +1 -1
- package/cdn/components/combobox/combobox.d.ts +3 -2
- package/cdn/components/combobox/combobox.js +3 -2
- package/cdn/components/file-upload/file-upload.d.ts +3 -2
- package/cdn/components/filter-base/filter-base-stories.js +1 -1
- package/cdn/components/filter-counter/filter-counter.js +5 -4
- package/cdn/components/filter-date/filter-date.js +1 -1
- package/cdn/components/filter-range/filter-range.js +5 -4
- package/cdn/components/filter-select/filter-select.d.ts +5 -3
- package/cdn/components/filter-select/filter-select.js +8 -7
- package/cdn/components/input/input.js +5 -4
- package/cdn/components/input-date/input-date.js +4 -3
- package/cdn/components/input-mask/input-mask.js +3 -2
- package/cdn/components/input-otp/input-otp.d.ts +90 -0
- package/cdn/components/input-otp/input-otp.js +38 -0
- package/cdn/components/input-otp/input-otp.styles.d.ts +2 -0
- package/cdn/components/input-otp/input-otp.styles.js +11 -0
- package/cdn/components/input-otp/input-otp.utils.d.ts +3 -0
- package/cdn/components/input-otp/input-otp.utils.js +11 -0
- package/cdn/components/input-phone/input-phone.js +7 -6
- package/cdn/components/navbar-link/navbar-link.js +1 -1
- package/cdn/components/pagination/pagination.js +8 -7
- package/cdn/components/radio-button/radio-button.js +4 -4
- package/cdn/components/radio-group/radio-group.d.ts +3 -2
- package/cdn/components/radio-group/radio-group.js +3 -3
- package/cdn/components/select/select.d.ts +4 -2
- package/cdn/components/select/select.js +3 -2
- package/cdn/components/step/step.js +2 -1
- package/cdn/components/tab/tab.js +1 -1
- package/cdn/components/table-body/table-body.js +2 -2
- package/cdn/components/table-header-row/table-header-row.js +8 -5
- package/cdn/components/table-row/table-row.js +6 -1
- package/cdn/components/textarea/textarea.js +3 -2
- package/cdn/components/tree/tree.js +8 -3
- package/cdn/components/tree-item/tree-item.js +6 -1
- package/cdn/custom-elements.json +517 -41
- package/cdn/design-system.d.ts +2 -0
- package/cdn/design-system.js +111 -98
- package/cdn/internal/a11y-warning.d.ts +2 -0
- package/cdn/internal/a11y-warning.js +4 -0
- package/cdn/internal/components/date-field/date-field.js +6 -1
- package/cdn/internal/components/form-control/form-control-layout.js +6 -1
- package/cdn/themes/dsa-wc-theme.css +14 -0
- package/cdn/themes/dsa-wc-theme.min.css +1 -1
- package/cdn/themes/dsa-wc-theme.styles.js +14 -0
- package/cdn/utilities/storybook.js +1 -1
- package/cdn/vscode.html-custom-data.json +76 -7
- package/cdn/web-types.json +314 -35
- package/dist/chunks/chunk.5P2EEOC5.js +196 -0
- package/dist/chunks/{chunk.VOOE2BQV.js → chunk.6HR34L7E.js} +2 -22
- package/dist/chunks/{chunk.Y72CHU6D.js → chunk.6JHM36KH.js} +5 -1
- package/dist/chunks/{chunk.LKCPAJMF.js → chunk.B6LMEZTV.js} +5 -2
- package/dist/chunks/{chunk.OHPSPLZO.js → chunk.DDDHV2NU.js} +5 -5
- package/dist/chunks/{chunk.P4HRQ2D7.js → chunk.DHDRABMZ.js} +1 -1
- package/dist/chunks/chunk.F7NUIVDV.js +10 -0
- package/dist/chunks/{chunk.D3SHMAJT.js → chunk.H3FSR35C.js} +1 -1
- package/dist/chunks/{chunk.T4BUHP4L.js → chunk.I5HR7JYK.js} +10 -1
- package/dist/chunks/{chunk.NCECJWN7.js → chunk.KN6RQWYN.js} +1 -1
- package/dist/chunks/{chunk.JX7OISYA.js → chunk.KUYI27GJ.js} +186 -30
- package/dist/chunks/{chunk.ZGQUBAEK.js → chunk.L3LZ4MKX.js} +1 -1
- package/dist/chunks/{chunk.BXOGG3JO.js → chunk.LTCZARVI.js} +1 -1
- package/dist/chunks/{chunk.AF5WMYR2.js → chunk.MYSJOWY5.js} +1 -1
- package/dist/chunks/chunk.PWL7QCVG.js +9 -0
- package/dist/chunks/chunk.UDJJFUZ3.js +335 -0
- package/dist/chunks/{chunk.YXXLXJPE.js → chunk.UEWG3G4R.js} +6 -0
- package/dist/chunks/{chunk.WWANVBI5.js → chunk.UWGAOHHQ.js} +1 -1
- package/dist/chunks/{chunk.EGH3AVD7.js → chunk.VBW5RZBM.js} +1 -1
- package/dist/chunks/{chunk.XXHMFUD7.js → chunk.WRPRKCVY.js} +1 -1
- package/dist/chunks/{chunk.G422H4DZ.js → chunk.WUOMKASN.js} +10 -0
- package/dist/chunks/{chunk.ZYTDWH4E.js → chunk.XJMGXWLM.js} +20 -85
- package/dist/chunks/{chunk.6GN2WDDT.js → chunk.Y52TCF24.js} +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -0
- package/dist/components/checkbox/checkbox.js +6 -1
- package/dist/components/checkbox-button/checkbox-button.d.ts +1 -0
- package/dist/components/checkbox-button/checkbox-button.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +5 -8
- package/dist/components/checkbox-group/checkbox-group.js +3 -4
- package/dist/components/checkbox-group/checkbox-group.styles.js +1 -1
- package/dist/components/combobox/combobox.d.ts +3 -2
- package/dist/components/combobox/combobox.js +3 -2
- package/dist/components/file-upload/file-upload.d.ts +3 -2
- package/dist/components/filter-base/filter-base-stories.js +1 -1
- package/dist/components/filter-counter/filter-counter.js +5 -4
- package/dist/components/filter-date/filter-date.js +1 -1
- package/dist/components/filter-range/filter-range.js +5 -4
- package/dist/components/filter-select/filter-select.d.ts +5 -3
- package/dist/components/filter-select/filter-select.js +8 -7
- package/dist/components/input/input.js +5 -4
- package/dist/components/input-date/input-date.js +4 -3
- package/dist/components/input-mask/input-mask.js +3 -2
- package/dist/components/input-otp/input-otp.d.ts +90 -0
- package/dist/components/input-otp/input-otp.js +31 -0
- package/dist/components/input-otp/input-otp.styles.d.ts +2 -0
- package/dist/components/input-otp/input-otp.styles.js +9 -0
- package/dist/components/input-otp/input-otp.utils.d.ts +3 -0
- package/dist/components/input-otp/input-otp.utils.js +11 -0
- package/dist/components/input-phone/input-phone.js +7 -6
- package/dist/components/navbar-link/navbar-link.js +1 -1
- package/dist/components/pagination/pagination.js +8 -7
- package/dist/components/radio-button/radio-button.js +4 -4
- package/dist/components/radio-group/radio-group.d.ts +3 -2
- package/dist/components/radio-group/radio-group.js +3 -3
- package/dist/components/select/select.d.ts +4 -2
- package/dist/components/select/select.js +3 -2
- package/dist/components/step/step.js +2 -1
- package/dist/components/tab/tab.js +1 -1
- package/dist/components/table-body/table-body.js +2 -2
- package/dist/components/table-header-row/table-header-row.js +7 -4
- package/dist/components/table-row/table-row.js +6 -1
- package/dist/components/textarea/textarea.js +3 -2
- package/dist/components/tree/tree.js +8 -3
- package/dist/components/tree-item/tree-item.js +6 -1
- package/dist/custom-elements.json +517 -41
- package/dist/design-system.d.ts +2 -0
- package/dist/design-system.js +111 -98
- package/dist/internal/a11y-warning.d.ts +2 -0
- package/dist/internal/a11y-warning.js +4 -0
- package/dist/internal/components/date-field/date-field.js +6 -1
- package/dist/internal/components/form-control/form-control-layout.js +6 -1
- package/dist/themes/dsa-wc-theme.css +14 -0
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +14 -0
- package/dist/utilities/storybook.js +1 -1
- package/dist/vscode.html-custom-data.json +76 -7
- package/dist/web-types.json +314 -35
- package/package.json +1 -1
- package/cdn/chunks/chunk.PS4PM6DJ.js +0 -164
- package/cdn/internal/test/disable-a11y-warnings.d.ts +0 -2
- package/cdn/internal/test/disable-a11y-warnings.js +0 -10
- package/dist/chunks/chunk.AYDVF4T3.js +0 -157
- package/dist/internal/test/disable-a11y-warnings.d.ts +0 -2
- package/dist/internal/test/disable-a11y-warnings.js +0 -10
- package/cdn/chunks/{chunk.PGT2WHXR.js → chunk.BCLU5KXE.js} +3 -3
- package/cdn/chunks/{chunk.COR7P3QG.js → chunk.NSE76EM5.js} +3 -3
- package/cdn/chunks/{chunk.P33HFS7T.js → chunk.V2UYRTUC.js} +3 -3
- package/dist/chunks/{chunk.WOV5QN3O.js → chunk.3OHVWJYG.js} +3 -3
- package/dist/chunks/{chunk.7BFH35RV.js → chunk.63MNXWSY.js} +3 -3
- package/dist/chunks/{chunk.MEPTPSE5.js → chunk.DUTPVTUZ.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ds-autonomie/web-components
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 647d6c9: `input-otp` : ajout de l'élément One Time Password
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 3ba5fee: `checkbox-group` : correction de la largeur maximale en mode horizontal
|
|
12
|
+
- 1643cca: `checkbox-group': changement du timing de l'initialisation
|
|
13
|
+
- 8503289: `input` : correction de la réinitialisation programmatique du type "date"
|
|
14
|
+
- aad602d: `checkbox-group` : amélioration de la structure interne
|
|
15
|
+
|
|
3
16
|
## 2.1.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DSASelect
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.LNBAAP45.js";
|
|
4
|
+
import {
|
|
5
|
+
getPhoneConfig
|
|
6
|
+
} from "./chunk.65HTBW2L.js";
|
|
4
7
|
import {
|
|
5
8
|
input_phone_styles_default
|
|
6
9
|
} from "./chunk.77CWRZEL.js";
|
|
@@ -13,12 +16,9 @@ import {
|
|
|
13
16
|
rawValueToMaskedValue,
|
|
14
17
|
stripSpecialChars
|
|
15
18
|
} from "./chunk.7OLEA3GQ.js";
|
|
16
|
-
import {
|
|
17
|
-
getPhoneConfig
|
|
18
|
-
} from "./chunk.65HTBW2L.js";
|
|
19
19
|
import {
|
|
20
20
|
FormControlLayout
|
|
21
|
-
} from "./chunk.
|
|
21
|
+
} from "./chunk.XQAKSW3W.js";
|
|
22
22
|
import {
|
|
23
23
|
l
|
|
24
24
|
} from "./chunk.7PPSHHT2.js";
|
|
@@ -89,7 +89,7 @@ var DSATab = class extends ShoelaceElement {
|
|
|
89
89
|
part="close-button"
|
|
90
90
|
exportparts="base:close-button__base"
|
|
91
91
|
name="close"
|
|
92
|
-
label=${this.closeButtonLabel !== "" ? this.closeButtonLabel : this.localize.term("close")}
|
|
92
|
+
label=${this.closeButtonLabel && this.closeButtonLabel !== "" ? this.closeButtonLabel : this.localize.term("close")}
|
|
93
93
|
class="tab__close-button"
|
|
94
94
|
@click=${this.handleCloseClick}
|
|
95
95
|
library="system"
|
|
@@ -17,22 +17,6 @@ var checkbox_group_styles_default = i`
|
|
|
17
17
|
display: block;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.visually-hidden {
|
|
21
|
-
position: absolute;
|
|
22
|
-
width: 1px;
|
|
23
|
-
height: 1px;
|
|
24
|
-
padding: 0;
|
|
25
|
-
margin: -1px;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
clip: rect(0, 0, 0, 0);
|
|
28
|
-
white-space: nowrap;
|
|
29
|
-
border: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.checkbox-group__default-slot {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
20
|
.checkbox-group__list-container {
|
|
37
21
|
display: inline-block;
|
|
38
22
|
}
|
|
@@ -40,18 +24,14 @@ var checkbox_group_styles_default = i`
|
|
|
40
24
|
gap: var(--dsa-spacing-8);
|
|
41
25
|
}
|
|
42
26
|
|
|
43
|
-
:not(.form-control--options-horizontal)
|
|
27
|
+
.form-control:not(.form-control--options-horizontal)
|
|
44
28
|
.checkbox-group__list--checkbox-buttons {
|
|
45
29
|
flex-wrap: wrap;
|
|
46
30
|
min-width: 120px;
|
|
47
31
|
max-width: 400px;
|
|
48
32
|
}
|
|
49
33
|
|
|
50
|
-
.checkbox-
|
|
51
|
-
display: contents;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
:not(form-control--options-horizontal) dsa-checkbox-button {
|
|
34
|
+
.form-control:not(.form-control--options-horizontal) dsa-checkbox-button {
|
|
55
35
|
max-width: 400px;
|
|
56
36
|
}
|
|
57
37
|
`;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
radio_group_styles_default
|
|
3
|
+
} from "./chunk.27YR5DC6.js";
|
|
1
4
|
import {
|
|
2
5
|
wrapIndex
|
|
3
6
|
} from "./chunk.HV63L5BF.js";
|
|
4
7
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk.
|
|
8
|
+
a11yWarning
|
|
9
|
+
} from "./chunk.PWL7QCVG.js";
|
|
7
10
|
import {
|
|
8
11
|
renderFormElementErrors
|
|
9
12
|
} from "./chunk.EY4WUNAJ.js";
|
|
@@ -19,6 +22,9 @@ import {
|
|
|
19
22
|
import {
|
|
20
23
|
watch
|
|
21
24
|
} from "./chunk.4FQJ3QJK.js";
|
|
25
|
+
import {
|
|
26
|
+
ifDefinedAndNotEmpty
|
|
27
|
+
} from "./chunk.B6GVVW66.js";
|
|
22
28
|
import {
|
|
23
29
|
e as e2
|
|
24
30
|
} from "./chunk.IKHG7XGO.js";
|
|
@@ -29,6 +35,12 @@ import {
|
|
|
29
35
|
r,
|
|
30
36
|
t
|
|
31
37
|
} from "./chunk.DZB6XUZ7.js";
|
|
38
|
+
import {
|
|
39
|
+
component_styles_default
|
|
40
|
+
} from "./chunk.PSQJDSB2.js";
|
|
41
|
+
import {
|
|
42
|
+
i
|
|
43
|
+
} from "./chunk.4KHZQZ3M.js";
|
|
32
44
|
import {
|
|
33
45
|
x
|
|
34
46
|
} from "./chunk.7HUC6BF3.js";
|
|
@@ -36,6 +48,145 @@ import {
|
|
|
36
48
|
__decorateClass
|
|
37
49
|
} from "./chunk.4ZGVANML.js";
|
|
38
50
|
|
|
51
|
+
// src/internal/components/button-group/button-group.styles.ts
|
|
52
|
+
var button_group_styles_default = i`
|
|
53
|
+
${component_styles_default}
|
|
54
|
+
|
|
55
|
+
:host {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.button-group {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
gap: var(--dsa-spacing-8);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.button-group--squeezed {
|
|
66
|
+
gap: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.button-group--vertical {
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
min-width: 120px;
|
|
72
|
+
max-width: 400px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.button-group--horizontal {
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
// src/internal/components/button-group/button-group.ts
|
|
81
|
+
var DSAInternalButtonGroup = class extends ShoelaceElement {
|
|
82
|
+
constructor() {
|
|
83
|
+
super(...arguments);
|
|
84
|
+
this.disableRole = false;
|
|
85
|
+
this.label = "";
|
|
86
|
+
this.squeezed = false;
|
|
87
|
+
this.horizontal = false;
|
|
88
|
+
}
|
|
89
|
+
handleFocus(event) {
|
|
90
|
+
const button = findButton(event.target);
|
|
91
|
+
button == null ? void 0 : button.classList.add("dsa-button-group__button--focus");
|
|
92
|
+
}
|
|
93
|
+
handleBlur(event) {
|
|
94
|
+
const button = findButton(event.target);
|
|
95
|
+
button == null ? void 0 : button.classList.remove("dsa-button-group__button--focus");
|
|
96
|
+
}
|
|
97
|
+
handleMouseOver(event) {
|
|
98
|
+
const button = findButton(event.target);
|
|
99
|
+
button == null ? void 0 : button.classList.add("dsa-button-group__button--hover");
|
|
100
|
+
}
|
|
101
|
+
handleMouseOut(event) {
|
|
102
|
+
const button = findButton(event.target);
|
|
103
|
+
button == null ? void 0 : button.classList.remove("dsa-button-group__button--hover");
|
|
104
|
+
}
|
|
105
|
+
handleSlotChange() {
|
|
106
|
+
const slottedElements = [
|
|
107
|
+
...this.defaultSlot.assignedElements({ flatten: true })
|
|
108
|
+
];
|
|
109
|
+
slottedElements.forEach((el) => {
|
|
110
|
+
const index = slottedElements.indexOf(el);
|
|
111
|
+
const button = findButton(el);
|
|
112
|
+
if (button !== null) {
|
|
113
|
+
button.classList.add("dsa-button-group__button");
|
|
114
|
+
if (this.squeezed) {
|
|
115
|
+
button.classList.toggle(
|
|
116
|
+
"dsa-button-group__button--first",
|
|
117
|
+
index === 0
|
|
118
|
+
);
|
|
119
|
+
button.classList.toggle(
|
|
120
|
+
"dsa-button-group__button--inner",
|
|
121
|
+
index > 0 && index < slottedElements.length - 1
|
|
122
|
+
);
|
|
123
|
+
button.classList.toggle(
|
|
124
|
+
"dsa-button-group__button--last",
|
|
125
|
+
index === slottedElements.length - 1
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
button.classList.toggle(
|
|
129
|
+
"dsa-button-group__button--radio",
|
|
130
|
+
button.tagName.toLowerCase() === "dsa-radio-button"
|
|
131
|
+
);
|
|
132
|
+
button.classList.toggle(
|
|
133
|
+
"dsa-button-group__button--checkbox",
|
|
134
|
+
button.tagName.toLowerCase() === "dsa-checkbox-button"
|
|
135
|
+
);
|
|
136
|
+
button.classList.toggle(
|
|
137
|
+
"dsa-button-group__button--vertical",
|
|
138
|
+
!this.horizontal
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return x`
|
|
145
|
+
<div
|
|
146
|
+
part="base"
|
|
147
|
+
class=${e2({
|
|
148
|
+
"button-group": true,
|
|
149
|
+
"button-group--squeezed": this.squeezed,
|
|
150
|
+
"button-group--vertical": !this.horizontal,
|
|
151
|
+
"button-group--horizontal": this.horizontal
|
|
152
|
+
})}
|
|
153
|
+
role="${this.disableRole ? "presentation" : "group"}"
|
|
154
|
+
aria-label=${ifDefinedAndNotEmpty(this.label)}
|
|
155
|
+
@focusout=${this.handleBlur}
|
|
156
|
+
@focusin=${this.handleFocus}
|
|
157
|
+
@mouseover=${this.handleMouseOver}
|
|
158
|
+
@mouseout=${this.handleMouseOut}
|
|
159
|
+
>
|
|
160
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
161
|
+
</div>
|
|
162
|
+
`;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
DSAInternalButtonGroup.styles = button_group_styles_default;
|
|
166
|
+
__decorateClass([
|
|
167
|
+
e("slot")
|
|
168
|
+
], DSAInternalButtonGroup.prototype, "defaultSlot", 2);
|
|
169
|
+
__decorateClass([
|
|
170
|
+
r()
|
|
171
|
+
], DSAInternalButtonGroup.prototype, "disableRole", 2);
|
|
172
|
+
__decorateClass([
|
|
173
|
+
n()
|
|
174
|
+
], DSAInternalButtonGroup.prototype, "label", 2);
|
|
175
|
+
__decorateClass([
|
|
176
|
+
n({ type: Boolean })
|
|
177
|
+
], DSAInternalButtonGroup.prototype, "squeezed", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
n({ type: Boolean })
|
|
180
|
+
], DSAInternalButtonGroup.prototype, "horizontal", 2);
|
|
181
|
+
DSAInternalButtonGroup = __decorateClass([
|
|
182
|
+
t("dsa-internal-button-group")
|
|
183
|
+
], DSAInternalButtonGroup);
|
|
184
|
+
function findButton(el) {
|
|
185
|
+
var _a;
|
|
186
|
+
const selector = "dsa-button, dsa-radio-button, dsa-checkbox-button, dsa-pagination-button";
|
|
187
|
+
return (_a = el.closest(selector)) != null ? _a : el.querySelector(selector);
|
|
188
|
+
}
|
|
189
|
+
|
|
39
190
|
// src/components/radio-group/radio-group.ts
|
|
40
191
|
var DSARadioGroup = class extends ShoelaceElement {
|
|
41
192
|
constructor() {
|
|
@@ -314,8 +465,8 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
314
465
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
315
466
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
316
467
|
if (!hasLabel) {
|
|
317
|
-
|
|
318
|
-
"
|
|
468
|
+
a11yWarning(
|
|
469
|
+
"<dsa-radio-group> requires a label attribute or a label slot for accessibility"
|
|
319
470
|
);
|
|
320
471
|
}
|
|
321
472
|
return x`
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
l
|
|
3
3
|
} from "./chunk.7PPSHHT2.js";
|
|
4
|
+
import {
|
|
5
|
+
DSACheckboxGroup
|
|
6
|
+
} from "./chunk.YQQNMFZF.js";
|
|
4
7
|
import {
|
|
5
8
|
defaultValue
|
|
6
9
|
} from "./chunk.YY5FKN3H.js";
|
|
@@ -74,6 +77,13 @@ var DSACheckbox = class extends ShoelaceElement {
|
|
|
74
77
|
get validationMessage() {
|
|
75
78
|
return this.input.validationMessage;
|
|
76
79
|
}
|
|
80
|
+
connectedCallback() {
|
|
81
|
+
super.connectedCallback();
|
|
82
|
+
const parent = this.parentElement;
|
|
83
|
+
if (!this.hasAttribute("role") && parent instanceof DSACheckboxGroup) {
|
|
84
|
+
this.setAttribute("role", "listitem");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
77
87
|
firstUpdated() {
|
|
78
88
|
this.formControlController.updateValidity();
|
|
79
89
|
}
|
|
@@ -17,6 +17,12 @@ var DSACheckboxButton = class extends FormToggleButton {
|
|
|
17
17
|
super(...arguments);
|
|
18
18
|
this.type = "checkbox";
|
|
19
19
|
}
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
super.connectedCallback();
|
|
22
|
+
if (!this.hasAttribute("role")) {
|
|
23
|
+
this.setAttribute("role", "listitem");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
20
26
|
handleClick() {
|
|
21
27
|
this.checked = !this.checked;
|
|
22
28
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/input-otp/input-otp.utils.ts
|
|
2
|
+
var REGEXP_ONLY_DIGITS = "^\\d*$";
|
|
3
|
+
var REGEXP_ONLY_LETTERS = "^[a-zA-Z]*$";
|
|
4
|
+
var REGEXP_ONLY_DIGITS_AND_LETTERS = "^[a-zA-Z0-9]*$";
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
REGEXP_ONLY_DIGITS,
|
|
8
|
+
REGEXP_ONLY_LETTERS,
|
|
9
|
+
REGEXP_ONLY_DIGITS_AND_LETTERS
|
|
10
|
+
};
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getStepIcon
|
|
6
6
|
} from "./chunk.CCTWXABH.js";
|
|
7
|
+
import {
|
|
8
|
+
a11yWarning
|
|
9
|
+
} from "./chunk.PWL7QCVG.js";
|
|
7
10
|
import {
|
|
8
11
|
HasSlotController
|
|
9
12
|
} from "./chunk.YIY5RM53.js";
|
|
@@ -97,8 +100,8 @@ var DSAStep = class extends ShoelaceElement {
|
|
|
97
100
|
const isButton = this.clickable && !this.href;
|
|
98
101
|
const tag = this.getTag();
|
|
99
102
|
if (this.clickable && !hasTitle) {
|
|
100
|
-
|
|
101
|
-
"
|
|
103
|
+
a11yWarning(
|
|
104
|
+
"When clickable, the `dsa-step` element must have either a `step-title` attribute or an elemennt in its `title` slot"
|
|
102
105
|
);
|
|
103
106
|
}
|
|
104
107
|
return u`
|
|
@@ -23,7 +23,7 @@ var errorArgTypes = {
|
|
|
23
23
|
};
|
|
24
24
|
var errorMessageArgTypes = {
|
|
25
25
|
name: "error-message",
|
|
26
|
-
description: '
|
|
26
|
+
description: 'The error message or messages that are shown when \u201Cerror\u201D is set to \u201Ctrue\u201D. To display several messages, they must be separated by a pipe character, e.g. "Error 1|Error 2|Error 3\u201D',
|
|
27
27
|
table: {
|
|
28
28
|
defaultValue: { summary: "''" },
|
|
29
29
|
type: {
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import {
|
|
2
|
+
form_control_styles_default
|
|
3
|
+
} from "./chunk.NC6BC5GU.js";
|
|
4
|
+
import {
|
|
5
|
+
component_styles_default
|
|
6
|
+
} from "./chunk.PSQJDSB2.js";
|
|
7
|
+
import {
|
|
8
|
+
i
|
|
9
|
+
} from "./chunk.4KHZQZ3M.js";
|
|
10
|
+
|
|
11
|
+
// src/components/input-otp/input-otp.styles.ts
|
|
12
|
+
var input_otp_styles_default = i`
|
|
13
|
+
${component_styles_default}
|
|
14
|
+
${form_control_styles_default}
|
|
15
|
+
|
|
16
|
+
:host {
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.input__wrapper {
|
|
21
|
+
position: relative;
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.visible-input {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
flex-wrap: wrap;
|
|
28
|
+
gap: var(--dsa-wc-input-otp-single-fields-gap);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.hidden-input {
|
|
32
|
+
position: absolute;
|
|
33
|
+
inset: 0;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
z-index: -1;
|
|
36
|
+
}
|
|
37
|
+
.hidden-input:focus {
|
|
38
|
+
outline: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.input--focused:not(.input--disabled) {
|
|
42
|
+
outline: var(--dsa-wc-focus-ring);
|
|
43
|
+
outline-offset: var(--dsa-wc-focus-ring-offset);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.fake-caret {
|
|
47
|
+
position: absolute;
|
|
48
|
+
width: 1px;
|
|
49
|
+
height: var(--dsa-wc-input-otp-caret-height);
|
|
50
|
+
background-color: var(--dsa-color-input-cursor-background);
|
|
51
|
+
animation: caret-blink 1.2s ease-out infinite;
|
|
52
|
+
}
|
|
53
|
+
@keyframes caret-blink {
|
|
54
|
+
0%,
|
|
55
|
+
70%,
|
|
56
|
+
100% {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
}
|
|
59
|
+
20%,
|
|
60
|
+
50% {
|
|
61
|
+
opacity: 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Single field */
|
|
66
|
+
.single-field {
|
|
67
|
+
position: relative;
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
flex-direction: row;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
vertical-align: middle;
|
|
73
|
+
font: var(--dsa-wc-input-text-field-font);
|
|
74
|
+
transition: var(--dsa-wc-transition-fast) color,
|
|
75
|
+
var(--dsa-wc-transition-fast) border,
|
|
76
|
+
var(--dsa-wc-transition-fast) box-shadow,
|
|
77
|
+
var(--dsa-wc-transition-fast) background-color;
|
|
78
|
+
border-radius: var(--dsa-wc-input-border-radius);
|
|
79
|
+
cursor: text;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.single-field__placeholder {
|
|
83
|
+
user-select: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.single-field__value {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
width: var(--dsa-wc-input-otp-single-field-width);
|
|
90
|
+
}
|
|
91
|
+
.single-field--active .single-field__value {
|
|
92
|
+
background-color: var(
|
|
93
|
+
--dsa-wc-input-otp-single-field-active-value-background
|
|
94
|
+
);
|
|
95
|
+
border-radius: var(
|
|
96
|
+
--dsa-wc-input-otp-single-field-active-value-border-radius
|
|
97
|
+
);
|
|
98
|
+
color: var(--dsa-wc-input-otp-single-field-active-value-color);
|
|
99
|
+
padding-inline: var(--dsa-wc-input-otp-single-field-active-value-padding);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* On Layer inputs */
|
|
103
|
+
.input--on-layer .single-field {
|
|
104
|
+
background-color: var(--dsa-wc-input-on-layer-background-color);
|
|
105
|
+
border: solid var(--dsa-wc-input-border-width)
|
|
106
|
+
var(--dsa-wc-input-on-layer-border-color);
|
|
107
|
+
color: var(--dsa-wc-input-on-layer-text-field-input-color);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.input--on-layer .single-field__placeholder {
|
|
111
|
+
color: var(--dsa-wc-input-on-layer-text-field-placeholder-color);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.input--on-layer:not(.input--disabled) .single-field:hover,
|
|
115
|
+
.input--on-layer .single-field--active {
|
|
116
|
+
border-color: var(--dsa-wc-input-on-layer-border-color-hover);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.input--on-layer.input--disabled .single-field {
|
|
120
|
+
background-color: var(--dsa-wc-input-on-layer-background-color-disabled);
|
|
121
|
+
border-color: var(--dsa-wc-input-on-layer-border-color-disabled);
|
|
122
|
+
opacity: 0.5;
|
|
123
|
+
cursor: not-allowed;
|
|
124
|
+
color: var(--dsa-wc-input-on-layer-text-field-input-color-disabled);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.input--error.input--on-layer:not(.input--disabled) .single-field {
|
|
128
|
+
background-color: var(--dsa-wc-input-on-layer-background-color-error);
|
|
129
|
+
border-color: var(--dsa-wc-input-on-layer-border-color-error);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.input--error.input--on-layer:not(.input--disabled) .single-field:hover,
|
|
133
|
+
.input--error.input--on-layer:not(.input--disabled) .single-field--active {
|
|
134
|
+
border-color: var(--dsa-wc-input-on-layer-border-color-error-hover);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* On Base inputs */
|
|
138
|
+
|
|
139
|
+
.input--on-base .single-field {
|
|
140
|
+
border: solid var(--dsa-wc-input-border-width)
|
|
141
|
+
var(--dsa-wc-input-on-base-border-color);
|
|
142
|
+
background-color: var(--dsa-wc-input-on-base-background-color);
|
|
143
|
+
color: var(--dsa-wc-input-on-base-text-field-input-color);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.input--on-base .single-field__placeholder {
|
|
147
|
+
color: var(--dsa-wc-input-on-base-text-field-placeholder-color);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.input--on-base:not(.input--disabled) .single-field:hover,
|
|
151
|
+
.input--on-base:not(.input--disabled) .single-field--active {
|
|
152
|
+
border-color: var(--dsa-wc-input-on-base-border-color-hover);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.input--on-base.input--disabled .single-field {
|
|
156
|
+
border-color: var(--dsa-wc-input-on-base-border-color-disabled);
|
|
157
|
+
background-color: var(--dsa-wc-input-on-base-background-color-disabled);
|
|
158
|
+
opacity: 0.5;
|
|
159
|
+
cursor: not-allowed;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.input--error.input--on-base:not(.input--disabled) .single-field {
|
|
163
|
+
background-color: var(--dsa-wc-input-on-base-background-color-error);
|
|
164
|
+
border-color: var(--dsa-wc-input-on-base-border-color-error);
|
|
165
|
+
}
|
|
166
|
+
.input--error.input--on-base:not(.input--disabled) .single-field:hover,
|
|
167
|
+
.input--error.input--on-base:not(.input--disabled) .single-field--active {
|
|
168
|
+
border-color: var(--dsa-wc-input-on-base-border-color-error-hover);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/*
|
|
172
|
+
* Size modifiers
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
.input--small .single-field {
|
|
176
|
+
font: var(--dsa-wc-input-text-field-font-small);
|
|
177
|
+
height: var(--dsa-wc-form-input-height-small);
|
|
178
|
+
width: var(--dsa-wc-input-otp-single-field-width-small);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.input--medium .single-field {
|
|
182
|
+
height: var(--dsa-wc-form-input-height);
|
|
183
|
+
width: var(--dsa-wc-input-otp-single-field-width-medium);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.input--large {
|
|
187
|
+
padding: var(--dsa-spacing-4);
|
|
188
|
+
}
|
|
189
|
+
.input--large .single-field {
|
|
190
|
+
font: var(--dsa-wc-input-text-field-font-large);
|
|
191
|
+
height: var(--dsa-wc-form-input-height-large);
|
|
192
|
+
width: var(--dsa-wc-input-otp-single-field-width-large);
|
|
193
|
+
}
|
|
194
|
+
`;
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
input_otp_styles_default
|
|
198
|
+
};
|
|
@@ -343,7 +343,11 @@ var DSAInternalDateField = class extends ShoelaceElement {
|
|
|
343
343
|
this.formControlController.setValidity(this.disabled);
|
|
344
344
|
}
|
|
345
345
|
async handleValueChange() {
|
|
346
|
-
if (this.value
|
|
346
|
+
if (this.value === "") {
|
|
347
|
+
this.selectedDay = "";
|
|
348
|
+
this.selectedMonth = "";
|
|
349
|
+
this.selectedYear = "";
|
|
350
|
+
} else {
|
|
347
351
|
this.selectedDay = `${new Date(this.value).getDate()}`.padStart(2, "0");
|
|
348
352
|
this.selectedMonth = `${new Date(this.value).getMonth() + 1}`.padStart(
|
|
349
353
|
2,
|