@ds-autonomie/web-components 2.10.0 → 2.11.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 +16 -0
- package/cdn/chunks/{chunk.XCMDCOL6.js → chunk.26AMHY6M.js} +11 -8
- package/cdn/chunks/{chunk.IVJVQAQC.js → chunk.7AU43JKE.js} +4 -1
- package/cdn/chunks/{chunk.32CDX2G7.js → chunk.AYVXBNFN.js} +1 -1
- package/cdn/chunks/{chunk.YTHNA2W4.js → chunk.BUKM2N6B.js} +11 -5
- package/cdn/chunks/{chunk.76P65WVM.js → chunk.CE4QX5GY.js} +5 -0
- package/cdn/chunks/{chunk.RVHELEGN.js → chunk.E7LCBTT5.js} +7 -5
- package/cdn/chunks/{chunk.25TCJH3S.js → chunk.FOB2ZQTP.js} +8 -3
- package/cdn/chunks/{chunk.JITNMLSZ.js → chunk.G6BQ2WKP.js} +11 -5
- package/cdn/chunks/{chunk.JLURATAB.js → chunk.H2VYMPUG.js} +3 -2
- package/cdn/chunks/{chunk.CA44N3RR.js → chunk.IIVSSOAU.js} +1 -1
- package/cdn/chunks/{chunk.UXHX6KTB.js → chunk.JSZ62MET.js} +7 -7
- package/cdn/chunks/{chunk.RIGMCOQV.js → chunk.KNXOB4UE.js} +9 -5
- package/cdn/chunks/{chunk.ANBARN33.js → chunk.LAHTYN7O.js} +8 -2
- package/cdn/chunks/{chunk.HFZHMBO3.js → chunk.MYUDDEC5.js} +8 -3
- package/cdn/chunks/{chunk.22WBEYR5.js → chunk.N5YAEQVH.js} +4 -0
- package/cdn/chunks/{chunk.2L6I3VNO.js → chunk.OJYQEB5J.js} +71 -55
- package/cdn/chunks/{chunk.6BGRXQIW.js → chunk.QNIK7LHK.js} +5 -5
- package/cdn/chunks/{chunk.6KBDSFHY.js → chunk.REWGAX6A.js} +2 -1
- package/cdn/chunks/{chunk.BBXLEST4.js → chunk.RFDWBIL7.js} +5 -0
- package/cdn/chunks/{chunk.ORJKIZAO.js → chunk.SPF4JEAI.js} +8 -7
- package/cdn/chunks/{chunk.4O7VDH44.js → chunk.T7LIPTCL.js} +1 -1
- package/cdn/chunks/{chunk.INYJLKLJ.js → chunk.XCDQSN4K.js} +1 -1
- package/cdn/chunks/{chunk.HH3FXCDW.js → chunk.XFBBCWDH.js} +0 -1
- package/cdn/chunks/{chunk.OFG3L77A.js → chunk.XO5NWJKS.js} +4 -1
- package/cdn/chunks/{chunk.DPVUVRFZ.js → chunk.YVXTJRSI.js} +9 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/alert/alert.d.ts +1 -1
- package/cdn/components/alert/alert.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/combobox/combobox.js +2 -2
- package/cdn/components/copy-button/copy-button.d.ts +1 -2
- package/cdn/components/copy-button/copy-button.js +1 -1
- package/cdn/components/error-text/error-text-stories.d.ts +2 -0
- package/cdn/components/error-text/error-text-stories.js +4 -2
- package/cdn/components/filter-counter/filter-counter.js +7 -7
- package/cdn/components/filter-range/filter-range.js +7 -7
- package/cdn/components/filter-select/filter-select.js +8 -8
- package/cdn/components/header-search/header-search.js +1 -1
- package/cdn/components/input/input.js +6 -6
- package/cdn/components/input-amount/input-amount.js +3 -3
- package/cdn/components/input-date/input-date.js +3 -3
- package/cdn/components/input-mask/input-mask.js +3 -3
- package/cdn/components/input-native/input-native.d.ts +1 -0
- package/cdn/components/input-native/input-native.js +3 -3
- package/cdn/components/input-otp/input-otp.js +3 -3
- package/cdn/components/input-phone/input-phone.d.ts +10 -9
- package/cdn/components/input-phone/input-phone.js +4 -4
- package/cdn/components/input-time/input-time.js +3 -3
- package/cdn/components/menu-accordion/menu-accordion.js +2 -2
- package/cdn/components/menu-accordion/menu-accordion.styles.js +1 -1
- package/cdn/components/menu-item/menu-item.d.ts +1 -0
- package/cdn/components/menu-item/menu-item.js +1 -1
- package/cdn/components/menu-navigation/menu-navigation.d.ts +1 -1
- package/cdn/components/menu-navigation/menu-navigation.js +18 -1
- package/cdn/components/navbar-link/navbar-link.js +14 -1
- package/cdn/components/navbar-menu/navbar-menu.js +8 -1
- package/cdn/components/pagination/pagination.js +6 -6
- package/cdn/components/select/select.js +2 -2
- package/cdn/components/sidenav/sidenav.js +2 -2
- package/cdn/components/sidenav/sidenav.styles.js +1 -1
- package/cdn/components/sidenav-info-accordion/sidenav-info-accordion.js +2 -2
- package/cdn/components/success-text/success-text-stories.d.ts +2 -0
- package/cdn/components/success-text/success-text-stories.js +4 -2
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/table-header-row/table-header-row.js +1 -1
- package/cdn/components/table-row/table-row.js +1 -1
- package/cdn/components/textarea/textarea.js +2 -2
- package/cdn/components/tree/tree.js +1 -1
- package/cdn/components/tree-item/tree-item.js +1 -1
- package/cdn/custom-elements.json +167 -142
- package/cdn/design-system.js +28 -28
- package/cdn/internal/components/form-control/form-control-layout-stories.js +31 -7
- package/cdn/internal/components/form-control/form-control-layout.d.ts +3 -1
- package/cdn/internal/components/form-control/form-control-layout.js +8 -2
- package/cdn/internal/components/input-base/input-base-stories.js +14 -0
- package/cdn/templates/utilities/decorator.d.ts +6 -0
- package/{dist/templates → cdn/templates/utilities}/decorator.js +4 -4
- package/cdn/templates/utilities/header.d.ts +8 -0
- package/cdn/templates/utilities/header.js +114 -0
- package/cdn/templates/utilities/template-story-config.d.ts +16 -0
- package/cdn/templates/utilities/template-story-config.js +20 -0
- package/cdn/vscode.html-custom-data.json +12 -16
- package/cdn/web-types.json +92 -70
- package/dist/chunks/{chunk.YHQQWRGP.js → chunk.3FXWMOTD.js} +11 -5
- package/dist/chunks/{chunk.LNGE6VFS.js → chunk.4FTWYPW3.js} +3 -2
- package/dist/chunks/{chunk.2M6NG4O7.js → chunk.5SU4CCQO.js} +1 -1
- package/dist/chunks/{chunk.75ZNSBG6.js → chunk.7OU2KJ5C.js} +4 -1
- package/dist/chunks/{chunk.TREOZZ7D.js → chunk.C2GI7AW5.js} +2 -1
- package/dist/chunks/{chunk.SAKC6HWD.js → chunk.FGPLOCXU.js} +7 -7
- package/dist/chunks/{chunk.XRLHF7QC.js → chunk.FJUIXT7L.js} +9 -5
- package/dist/chunks/{chunk.JM6QCEPE.js → chunk.HYY7Y4SP.js} +8 -2
- package/dist/chunks/{chunk.QUYAJTQA.js → chunk.MJDFYFBT.js} +1 -1
- package/dist/chunks/{chunk.M2FVFT7D.js → chunk.MONMQF4P.js} +7 -5
- package/dist/chunks/{chunk.27MAGZH3.js → chunk.N6N5PXAU.js} +8 -3
- package/dist/chunks/{chunk.VIAKDLXU.js → chunk.NBBSSAAF.js} +5 -0
- package/dist/chunks/{chunk.HWRZLJQQ.js → chunk.OGLESSI3.js} +4 -0
- package/dist/chunks/{chunk.5ZO4QRKN.js → chunk.OMIL5X3X.js} +1 -1
- package/dist/chunks/{chunk.CIPCYGAB.js → chunk.OUL3HENR.js} +1 -1
- package/dist/chunks/{chunk.PIRJ2ABB.js → chunk.QDXFBING.js} +0 -1
- package/dist/chunks/{chunk.A43SBIER.js → chunk.QQOPMOYX.js} +5 -5
- package/dist/chunks/{chunk.MFAEBC56.js → chunk.SHMCRSQN.js} +8 -3
- package/dist/chunks/{chunk.WTV5HKD2.js → chunk.SQJRLNS2.js} +71 -55
- package/dist/chunks/{chunk.G3ITJBUT.js → chunk.TEHV57S2.js} +5 -0
- package/dist/chunks/{chunk.XUEOWZLQ.js → chunk.UAENT3Y6.js} +9 -1
- package/dist/chunks/{chunk.ONHIOF25.js → chunk.UXNALBWT.js} +11 -5
- package/dist/chunks/{chunk.R4SXN6JP.js → chunk.VQ2ZMSUF.js} +8 -7
- package/dist/chunks/{chunk.JIE46CQ6.js → chunk.Y5BMTMOP.js} +11 -8
- package/dist/chunks/{chunk.CTNXZIBB.js → chunk.YVUJ2MK6.js} +4 -1
- package/dist/components/accordion-group/accordion-group.js +1 -1
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/combobox/combobox.js +2 -2
- package/dist/components/copy-button/copy-button.d.ts +1 -2
- package/dist/components/copy-button/copy-button.js +1 -1
- package/dist/components/error-text/error-text-stories.d.ts +2 -0
- package/dist/components/error-text/error-text-stories.js +4 -2
- package/dist/components/filter-counter/filter-counter.js +7 -7
- package/dist/components/filter-range/filter-range.js +7 -7
- package/dist/components/filter-select/filter-select.js +8 -8
- package/dist/components/header-search/header-search.js +1 -1
- package/dist/components/input/input.js +6 -6
- package/dist/components/input-amount/input-amount.js +3 -3
- package/dist/components/input-date/input-date.js +3 -3
- package/dist/components/input-mask/input-mask.js +3 -3
- package/dist/components/input-native/input-native.d.ts +1 -0
- package/dist/components/input-native/input-native.js +3 -3
- package/dist/components/input-otp/input-otp.js +3 -3
- package/dist/components/input-phone/input-phone.d.ts +10 -9
- package/dist/components/input-phone/input-phone.js +4 -4
- package/dist/components/input-time/input-time.js +3 -3
- package/dist/components/menu-accordion/menu-accordion.js +2 -2
- package/dist/components/menu-accordion/menu-accordion.styles.js +1 -1
- package/dist/components/menu-item/menu-item.d.ts +1 -0
- package/dist/components/menu-item/menu-item.js +1 -1
- package/dist/components/menu-navigation/menu-navigation.d.ts +1 -1
- package/dist/components/menu-navigation/menu-navigation.js +14 -1
- package/dist/components/navbar-link/navbar-link.js +12 -1
- package/dist/components/navbar-menu/navbar-menu.js +6 -1
- package/dist/components/pagination/pagination.js +6 -6
- package/dist/components/select/select.js +2 -2
- package/dist/components/sidenav/sidenav.js +2 -2
- package/dist/components/sidenav/sidenav.styles.js +1 -1
- package/dist/components/sidenav-info-accordion/sidenav-info-accordion.js +2 -2
- package/dist/components/success-text/success-text-stories.d.ts +2 -0
- package/dist/components/success-text/success-text-stories.js +4 -2
- package/dist/components/tab-group/tab-group.js +1 -1
- package/dist/components/table-header-row/table-header-row.js +1 -1
- package/dist/components/table-row/table-row.js +1 -1
- package/dist/components/textarea/textarea.js +2 -2
- package/dist/components/tree/tree.js +1 -1
- package/dist/components/tree-item/tree-item.js +1 -1
- package/dist/custom-elements.json +167 -142
- package/dist/design-system.js +28 -28
- package/dist/internal/components/form-control/form-control-layout-stories.js +31 -7
- package/dist/internal/components/form-control/form-control-layout.d.ts +3 -1
- package/dist/internal/components/form-control/form-control-layout.js +8 -2
- package/dist/internal/components/input-base/input-base-stories.js +14 -0
- package/dist/templates/utilities/decorator.d.ts +6 -0
- package/{cdn/templates → dist/templates/utilities}/decorator.js +4 -4
- package/dist/templates/utilities/header.d.ts +8 -0
- package/dist/templates/utilities/header.js +114 -0
- package/dist/templates/utilities/template-story-config.d.ts +16 -0
- package/dist/templates/utilities/template-story-config.js +20 -0
- package/dist/vscode.html-custom-data.json +12 -16
- package/dist/web-types.json +92 -70
- package/package.json +1 -1
- package/cdn/templates/decorator.d.ts +0 -6
- package/dist/templates/decorator.d.ts +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DSASelect
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.E7LCBTT5.js";
|
|
4
4
|
import {
|
|
5
5
|
input_phone_styles_default
|
|
6
6
|
} from "./chunk.6PLXHBET.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk.7OLEA3GQ.js";
|
|
19
19
|
import {
|
|
20
20
|
InputBase
|
|
21
|
-
} from "./chunk.
|
|
21
|
+
} from "./chunk.AYVXBNFN.js";
|
|
22
22
|
import {
|
|
23
23
|
l
|
|
24
24
|
} from "./chunk.E6U524GP.js";
|
|
@@ -59,6 +59,7 @@ var DSAInputPhone = class extends InputBase {
|
|
|
59
59
|
this.phoneConfig = getPhoneConfig("+33");
|
|
60
60
|
this.placeholder = this.phoneConfig.placeholder;
|
|
61
61
|
this.pattern = this.phoneConfig.pattern;
|
|
62
|
+
this._isSyncing = false;
|
|
62
63
|
this.value = "";
|
|
63
64
|
this.phonePrefix = "+33";
|
|
64
65
|
this.phoneNumber = "";
|
|
@@ -96,6 +97,14 @@ var DSAInputPhone = class extends InputBase {
|
|
|
96
97
|
this.placeholder
|
|
97
98
|
);
|
|
98
99
|
}
|
|
100
|
+
willUpdate(changedProperties) {
|
|
101
|
+
if (changedProperties.has("phonePrefix") && !frenchNumberPrefix.includes(this.phonePrefix)) {
|
|
102
|
+
this.phonePrefix = changedProperties.get("phonePrefix");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/*
|
|
106
|
+
* Event handlers
|
|
107
|
+
*/
|
|
99
108
|
handleDocumentKeyUp() {
|
|
100
109
|
const strippedValue = stripSpecialChars(this.input.value);
|
|
101
110
|
const newValue = maskedValueToRawValue(
|
|
@@ -110,36 +119,7 @@ var DSAInputPhone = class extends InputBase {
|
|
|
110
119
|
this.formControlController.updateValidity();
|
|
111
120
|
this.emit("dsa-input");
|
|
112
121
|
}
|
|
113
|
-
|
|
114
|
-
if (changedProperties.has("phonePrefix") && !frenchNumberPrefix.includes(this.phonePrefix)) {
|
|
115
|
-
this.phonePrefix = changedProperties.get("phonePrefix");
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
setPhoneFromValue(value) {
|
|
119
|
-
const placeholderLength = stripSpecialChars(this.placeholder).length;
|
|
120
|
-
const prefixIndex = frenchNumberPrefix.findIndex(
|
|
121
|
-
(prefix) => value.startsWith(prefix)
|
|
122
|
-
);
|
|
123
|
-
if (prefixIndex >= 0) {
|
|
124
|
-
const prefix = frenchNumberPrefix[prefixIndex];
|
|
125
|
-
const number = value.replace(prefix, "").substring(0, placeholderLength);
|
|
126
|
-
this.phonePrefix = prefix;
|
|
127
|
-
this.phoneNumber = number;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
updateValue() {
|
|
131
|
-
if (this.phoneNumber.length === 0) {
|
|
132
|
-
this.value = "";
|
|
133
|
-
} else {
|
|
134
|
-
const placeholderLength = stripSpecialChars(this.placeholder).length;
|
|
135
|
-
this.value = `${this.phonePrefix}${this.phoneNumber.substring(
|
|
136
|
-
0,
|
|
137
|
-
placeholderLength
|
|
138
|
-
)}`;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
// Select handlers
|
|
142
|
-
handlePhonePrefixChange(event) {
|
|
122
|
+
handlePhonePrefixSelectChange(event) {
|
|
143
123
|
event.stopPropagation();
|
|
144
124
|
const { target } = event;
|
|
145
125
|
if (target instanceof DSASelect) {
|
|
@@ -148,8 +128,7 @@ var DSAInputPhone = class extends InputBase {
|
|
|
148
128
|
this.emit("dsa-change");
|
|
149
129
|
}
|
|
150
130
|
}
|
|
151
|
-
|
|
152
|
-
handleChange(event) {
|
|
131
|
+
handleInputChange(event) {
|
|
153
132
|
const { target } = event;
|
|
154
133
|
if (target instanceof HTMLInputElement) {
|
|
155
134
|
const strippedValue = stripSpecialChars(target.value);
|
|
@@ -158,7 +137,6 @@ var DSAInputPhone = class extends InputBase {
|
|
|
158
137
|
this.emit("dsa-change");
|
|
159
138
|
}
|
|
160
139
|
}
|
|
161
|
-
// Clear Icon handlers
|
|
162
140
|
handleClearIconClick(event) {
|
|
163
141
|
this.phonePrefix = "+33";
|
|
164
142
|
this.phoneNumber = "";
|
|
@@ -168,6 +146,40 @@ var DSAInputPhone = class extends InputBase {
|
|
|
168
146
|
this.input.focus();
|
|
169
147
|
event.stopPropagation();
|
|
170
148
|
}
|
|
149
|
+
/*
|
|
150
|
+
* Internal methods
|
|
151
|
+
*/
|
|
152
|
+
updateValue() {
|
|
153
|
+
if (this._isSyncing) return;
|
|
154
|
+
this._isSyncing = true;
|
|
155
|
+
if (this.phoneNumber.length === 0) {
|
|
156
|
+
this.value = "";
|
|
157
|
+
} else {
|
|
158
|
+
const placeholderLength = stripSpecialChars(this.placeholder).length;
|
|
159
|
+
this.value = `${this.phonePrefix}${this.phoneNumber.substring(
|
|
160
|
+
0,
|
|
161
|
+
placeholderLength
|
|
162
|
+
)}`;
|
|
163
|
+
}
|
|
164
|
+
this._isSyncing = false;
|
|
165
|
+
}
|
|
166
|
+
updatePhoneConfig() {
|
|
167
|
+
this.phoneConfig = getPhoneConfig(this.phonePrefix);
|
|
168
|
+
this.placeholder = this.phoneConfig.placeholder;
|
|
169
|
+
this.pattern = this.phoneConfig.pattern;
|
|
170
|
+
}
|
|
171
|
+
setPhoneFromValue(value) {
|
|
172
|
+
const placeholderLength = stripSpecialChars(this.placeholder).length;
|
|
173
|
+
const prefixIndex = frenchNumberPrefix.findIndex(
|
|
174
|
+
(prefix) => value.startsWith(prefix)
|
|
175
|
+
);
|
|
176
|
+
if (prefixIndex >= 0) {
|
|
177
|
+
const prefix = frenchNumberPrefix[prefixIndex];
|
|
178
|
+
const number = value.replace(prefix, "").substring(0, placeholderLength);
|
|
179
|
+
this.phonePrefix = prefix;
|
|
180
|
+
this.phoneNumber = number;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
171
183
|
getDescriptionIds() {
|
|
172
184
|
let ids = ["input-phone"];
|
|
173
185
|
if (this.error) ids = [...ids, "error-text"];
|
|
@@ -182,12 +194,9 @@ var DSAInputPhone = class extends InputBase {
|
|
|
182
194
|
}
|
|
183
195
|
this.formControlController.setValidity(this.disabled);
|
|
184
196
|
}
|
|
185
|
-
updatePhoneConfig() {
|
|
186
|
-
this.phoneConfig = getPhoneConfig(this.phonePrefix);
|
|
187
|
-
this.placeholder = this.phoneConfig.placeholder;
|
|
188
|
-
this.pattern = this.phoneConfig.pattern;
|
|
189
|
-
}
|
|
190
197
|
async handleValueChange() {
|
|
198
|
+
if (this._isSyncing) return;
|
|
199
|
+
this._isSyncing = true;
|
|
191
200
|
this.setPhoneFromValue(this.value);
|
|
192
201
|
this.maskedNumber = rawValueToMaskedValue(
|
|
193
202
|
this.phoneNumber,
|
|
@@ -195,11 +204,18 @@ var DSAInputPhone = class extends InputBase {
|
|
|
195
204
|
);
|
|
196
205
|
await this.updateComplete;
|
|
197
206
|
this.formControlController.updateValidity();
|
|
207
|
+
this._isSyncing = false;
|
|
208
|
+
}
|
|
209
|
+
handlePhonePrefixChange() {
|
|
210
|
+
this.updatePhoneConfig();
|
|
211
|
+
this.updateValue();
|
|
198
212
|
}
|
|
199
|
-
|
|
213
|
+
handlePhoneNumberChange() {
|
|
200
214
|
this.updateValue();
|
|
201
215
|
}
|
|
202
|
-
|
|
216
|
+
/*
|
|
217
|
+
* Exposed methods
|
|
218
|
+
*/
|
|
203
219
|
checkValidity() {
|
|
204
220
|
var _a;
|
|
205
221
|
const isValidInput = (_a = this.input) == null ? void 0 : _a.checkValidity();
|
|
@@ -210,7 +226,6 @@ var DSAInputPhone = class extends InputBase {
|
|
|
210
226
|
const patternMatch = matches !== null;
|
|
211
227
|
return patternMatch;
|
|
212
228
|
}
|
|
213
|
-
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
214
229
|
reportValidity() {
|
|
215
230
|
var _a;
|
|
216
231
|
const isValidInput = (_a = this.input) == null ? void 0 : _a.reportValidity();
|
|
@@ -222,7 +237,7 @@ var DSAInputPhone = class extends InputBase {
|
|
|
222
237
|
return patternMatch;
|
|
223
238
|
}
|
|
224
239
|
renderInput() {
|
|
225
|
-
var _a;
|
|
240
|
+
var _a, _b, _c;
|
|
226
241
|
const hasLabelSlot = this.hasSlotController.test("label");
|
|
227
242
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
228
243
|
const hasClearIcon = this.clearable && !this.disabled && !this.readonly && (typeof this.phoneNumber === "number" || ((_a = this.phoneNumber) == null ? void 0 : _a.length) > 0);
|
|
@@ -247,7 +262,7 @@ var DSAInputPhone = class extends InputBase {
|
|
|
247
262
|
.placement=${this.placement}
|
|
248
263
|
hoist
|
|
249
264
|
.size=${this.size}
|
|
250
|
-
@dsa-change=${this.
|
|
265
|
+
@dsa-change=${this.handlePhonePrefixSelectChange}
|
|
251
266
|
enterkeyhint="enter"
|
|
252
267
|
display-value
|
|
253
268
|
no-sync-width
|
|
@@ -304,7 +319,9 @@ var DSAInputPhone = class extends InputBase {
|
|
|
304
319
|
"input-phone__control": true
|
|
305
320
|
})}
|
|
306
321
|
type="text"
|
|
307
|
-
title=${ifDefinedAndNotEmpty(
|
|
322
|
+
title=${ifDefinedAndNotEmpty(
|
|
323
|
+
hasLabel ? void 0 : (_b = this.accessibleName) != null ? _b : this.title
|
|
324
|
+
)}
|
|
308
325
|
name=${ifDefinedAndNotEmpty(this.name)}
|
|
309
326
|
?disabled=${this.disabled}
|
|
310
327
|
?readonly=${this.readonly}
|
|
@@ -320,11 +337,11 @@ var DSAInputPhone = class extends InputBase {
|
|
|
320
337
|
enterkeyhint=${o(this.enterkeyhint)}
|
|
321
338
|
inputmode="tel"
|
|
322
339
|
aria-label=${ifDefinedAndNotEmpty(
|
|
323
|
-
hasLabel ? void 0 : this.title
|
|
340
|
+
hasLabel ? void 0 : (_c = this.accessibleName) != null ? _c : this.title
|
|
324
341
|
)}
|
|
325
342
|
aria-describedby=${this.getDescriptionIds()}
|
|
326
343
|
aria-invalid=${o(this.error ? "true" : void 0)}
|
|
327
|
-
@change=${this.
|
|
344
|
+
@change=${this.handleInputChange}
|
|
328
345
|
@keyup=${this.handleDocumentKeyUp}
|
|
329
346
|
@keydown=${this.handleKeyDown}
|
|
330
347
|
@focus=${this.handleFocus}
|
|
@@ -386,15 +403,14 @@ __decorateClass([
|
|
|
386
403
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
387
404
|
], DSAInputPhone.prototype, "handleDisabledChange", 1);
|
|
388
405
|
__decorateClass([
|
|
389
|
-
watch("
|
|
390
|
-
], DSAInputPhone.prototype, "updatePhoneConfig", 1);
|
|
391
|
-
__decorateClass([
|
|
392
|
-
watch("value", { waitUntilFirstUpdate: true })
|
|
406
|
+
watch("value")
|
|
393
407
|
], DSAInputPhone.prototype, "handleValueChange", 1);
|
|
394
408
|
__decorateClass([
|
|
395
|
-
watch("phonePrefix")
|
|
396
|
-
|
|
397
|
-
|
|
409
|
+
watch("phonePrefix", { waitUntilFirstUpdate: true })
|
|
410
|
+
], DSAInputPhone.prototype, "handlePhonePrefixChange", 1);
|
|
411
|
+
__decorateClass([
|
|
412
|
+
watch("phoneNumber", { waitUntilFirstUpdate: true })
|
|
413
|
+
], DSAInputPhone.prototype, "handlePhoneNumberChange", 1);
|
|
398
414
|
DSAInputPhone = __decorateClass([
|
|
399
415
|
t("dsa-input-phone")
|
|
400
416
|
], DSAInputPhone);
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk.FLRB45SF.js";
|
|
4
4
|
import {
|
|
5
5
|
FormControlLayout
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.YVXTJRSI.js";
|
|
7
7
|
import {
|
|
8
8
|
defaultValue
|
|
9
9
|
} from "./chunk.APSWEF5D.js";
|
|
@@ -623,7 +623,7 @@ var DSACombobox = class extends FormControlLayout {
|
|
|
623
623
|
this.displayInput.blur();
|
|
624
624
|
}
|
|
625
625
|
renderInput() {
|
|
626
|
-
var _a, _b;
|
|
626
|
+
var _a, _b, _c, _d;
|
|
627
627
|
const isValueDefined = this.value.length > 0;
|
|
628
628
|
const hasLabelSlot = this.hasSlotController.test("label");
|
|
629
629
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
@@ -693,7 +693,7 @@ var DSACombobox = class extends FormControlLayout {
|
|
|
693
693
|
spellcheck="false"
|
|
694
694
|
autocapitalize="off"
|
|
695
695
|
?readonly=${this.readonly}
|
|
696
|
-
title=${ifDefinedAndNotEmpty(this.title)}
|
|
696
|
+
title=${ifDefinedAndNotEmpty((_a = this.accessibleName) != null ? _a : this.title)}
|
|
697
697
|
aria-controls="listbox"
|
|
698
698
|
aria-autocomplete="list"
|
|
699
699
|
aria-expanded=${this.open ? "true" : "false"}
|
|
@@ -702,11 +702,11 @@ var DSACombobox = class extends FormControlLayout {
|
|
|
702
702
|
hasLabel ? "label" : void 0
|
|
703
703
|
)}
|
|
704
704
|
aria-label=${ifDefinedAndNotEmpty(
|
|
705
|
-
hasLabel ? void 0 : this.title
|
|
705
|
+
hasLabel ? void 0 : (_b = this.accessibleName) != null ? _b : this.title
|
|
706
706
|
)}
|
|
707
707
|
aria-disabled=${isDisabledOrReadonly ? "true" : "false"}
|
|
708
708
|
aria-describedby=${this.getDescriptionIds()}
|
|
709
|
-
aria-activedescendant=${(
|
|
709
|
+
aria-activedescendant=${(_d = (_c = this.currentOption) == null ? void 0 : _c.id) != null ? _d : ""}
|
|
710
710
|
aria-invalid=${o(this.error ? "true" : void 0)}
|
|
711
711
|
aria-required=${o(this.required ? "true" : void 0)}
|
|
712
712
|
role="combobox"
|
|
@@ -195,6 +195,7 @@ var DSAButton = class extends ShoelaceElement {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
render() {
|
|
198
|
+
var _a;
|
|
198
199
|
const isLink = this.isLink();
|
|
199
200
|
const spinnerVariant = this.getSpinnerVariant();
|
|
200
201
|
const tag = isLink ? i`a` : i`button`;
|
|
@@ -237,7 +238,7 @@ var DSAButton = class extends ShoelaceElement {
|
|
|
237
238
|
download=${o(isLink ? this.download : void 0)}
|
|
238
239
|
rel=${o(isLink ? this.rel : void 0)}
|
|
239
240
|
aria-label=${ifDefinedAndNotEmpty(
|
|
240
|
-
this.accessibleName
|
|
241
|
+
(_a = this.accessibleName) != null ? _a : this.ariaLabel
|
|
241
242
|
)}
|
|
242
243
|
aria-describedby="description"
|
|
243
244
|
aria-disabled=${o(this.disabled ? "true" : void 0)}
|
|
@@ -155,6 +155,11 @@ var menu_accordion_styles_default = i`
|
|
|
155
155
|
background-color: var(--dsa-color-primitive-colors-identity-green-800);
|
|
156
156
|
color: var(--dsa-color-text-on-floatting-menu-primary);
|
|
157
157
|
}
|
|
158
|
+
.menu-accordion--sidenav-info
|
|
159
|
+
.menu-accordion__header:focus-within
|
|
160
|
+
:focus:focus-visible {
|
|
161
|
+
outline-offset: -3px;
|
|
162
|
+
}
|
|
158
163
|
.menu-accordion--sidenav-info .menu-accordion__content {
|
|
159
164
|
padding: var(--dsa-wc-menu-item-padding);
|
|
160
165
|
font: var(--dsa-font-small-normal);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DSAInputTime
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.KNXOB4UE.js";
|
|
4
4
|
import {
|
|
5
5
|
DSAInputDate
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.JSZ62MET.js";
|
|
7
7
|
import {
|
|
8
8
|
InputBase
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.AYVXBNFN.js";
|
|
10
10
|
import {
|
|
11
11
|
o
|
|
12
12
|
} from "./chunk.XED65RH5.js";
|
|
@@ -151,6 +151,7 @@ var DSAInput = class extends InputBase {
|
|
|
151
151
|
return await this.inputElement.updateComplete;
|
|
152
152
|
}
|
|
153
153
|
render() {
|
|
154
|
+
var _a, _b, _c, _d;
|
|
154
155
|
if (this.type === "date" || this.type === "time" || this.type === "amount") {
|
|
155
156
|
console.warn(
|
|
156
157
|
`Warning: The use of types "amount", "date", and "time" with dsa-input is deprecated. These types will be removed in the next major release of the design system. Please transition to the dedicated components: dsa-input-amount, dsa-input-date, and dsa-input-time for improved functionality and support.`
|
|
@@ -161,7 +162,7 @@ var DSAInput = class extends InputBase {
|
|
|
161
162
|
<dsa-input-date
|
|
162
163
|
class="input-element"
|
|
163
164
|
name=${o(this.name)}
|
|
164
|
-
|
|
165
|
+
accessible-name=${o((_a = this.accessibleName) != null ? _a : this.title)}
|
|
165
166
|
value=${this.value}
|
|
166
167
|
.defaultValue=${o(this.defaultValue)}
|
|
167
168
|
size=${o(this.size)}
|
|
@@ -202,7 +203,7 @@ var DSAInput = class extends InputBase {
|
|
|
202
203
|
<dsa-input-time
|
|
203
204
|
class="input-element"
|
|
204
205
|
name=${o(this.name)}
|
|
205
|
-
|
|
206
|
+
accessible-name=${o((_b = this.accessibleName) != null ? _b : this.title)}
|
|
206
207
|
value=${this.value}
|
|
207
208
|
.defaultValue=${o(this.defaultValue)}
|
|
208
209
|
size=${o(this.size)}
|
|
@@ -239,7 +240,7 @@ var DSAInput = class extends InputBase {
|
|
|
239
240
|
return x`
|
|
240
241
|
<dsa-input-amount
|
|
241
242
|
class="input-element"
|
|
242
|
-
|
|
243
|
+
accessible-name=${o((_c = this.accessibleName) != null ? _c : this.title)}
|
|
243
244
|
name=${o(this.name)}
|
|
244
245
|
size=${o(this.size)}
|
|
245
246
|
variant=${o(this.variant)}
|
|
@@ -285,7 +286,7 @@ var DSAInput = class extends InputBase {
|
|
|
285
286
|
return x`
|
|
286
287
|
<dsa-input-native
|
|
287
288
|
class="input-element"
|
|
288
|
-
|
|
289
|
+
accessible-name=${o((_d = this.accessibleName) != null ? _d : this.title)}
|
|
289
290
|
name=${o(this.name)}
|
|
290
291
|
size=${o(this.size)}
|
|
291
292
|
variant=${o(this.variant)}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DSAMenuItem
|
|
3
|
+
} from "./chunk.N5YAEQVH.js";
|
|
1
4
|
import {
|
|
2
5
|
menu_navigation_styles_default
|
|
3
6
|
} from "./chunk.WBTHKBRH.js";
|
|
@@ -38,7 +41,7 @@ var DSAMenuNavigation = class extends ShoelaceElement {
|
|
|
38
41
|
this.removeEventListener("keydown", this.handleKeyDown);
|
|
39
42
|
}
|
|
40
43
|
handleKeyDown(event) {
|
|
41
|
-
if (event.key === " ") {
|
|
44
|
+
if (event.key === " " && !(event.target instanceof DSAMenuItem && event.target.type === "button")) {
|
|
42
45
|
event.preventDefault();
|
|
43
46
|
}
|
|
44
47
|
}
|
|
@@ -69,7 +69,12 @@ var FormControlLayout = class extends ShoelaceElement {
|
|
|
69
69
|
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
70
70
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
71
71
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
72
|
-
if (
|
|
72
|
+
if (this.title) {
|
|
73
|
+
console.warn(
|
|
74
|
+
"The `title` attribute is deprecated since it can cause redundant enunciation by screen readers, and will be removed in the next major release. Please use the accessible-name attribute instead."
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
if (!hasLabel && !this.accessibleName && !this.title) {
|
|
73
78
|
a11yWarning(
|
|
74
79
|
"Form controls require a label attribute or a label slot for accessibility"
|
|
75
80
|
);
|
|
@@ -139,6 +144,9 @@ var FormControlLayout = class extends ShoelaceElement {
|
|
|
139
144
|
__decorateClass([
|
|
140
145
|
n()
|
|
141
146
|
], FormControlLayout.prototype, "title", 2);
|
|
147
|
+
__decorateClass([
|
|
148
|
+
n({ attribute: "accessible-name", reflect: true })
|
|
149
|
+
], FormControlLayout.prototype, "accessibleName", 2);
|
|
142
150
|
__decorateClass([
|
|
143
151
|
n()
|
|
144
152
|
], FormControlLayout.prototype, "name", 2);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DSAAccordionGroup
|
|
3
3
|
} from "../../chunks/chunk.GCZKQEK3.js";
|
|
4
|
-
import "../../chunks/chunk.
|
|
4
|
+
import "../../chunks/chunk.REWGAX6A.js";
|
|
5
5
|
import "../../chunks/chunk.JJZU37TO.js";
|
|
6
6
|
import "../../chunks/chunk.KPERDNOW.js";
|
|
7
7
|
import "../../chunks/chunk.LLQW6MLS.js";
|
|
@@ -36,7 +36,7 @@ export default class DSAAlert extends ShoelaceElement {
|
|
|
36
36
|
/** The alert's theme variant. */
|
|
37
37
|
variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger';
|
|
38
38
|
/**
|
|
39
|
-
* The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with
|
|
39
|
+
* (deprecated) The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with
|
|
40
40
|
* the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning
|
|
41
41
|
* the alert will not close on its own.
|
|
42
42
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DSACombobox
|
|
3
|
-
} from "../../chunks/chunk.
|
|
3
|
+
} from "../../chunks/chunk.QNIK7LHK.js";
|
|
4
4
|
import "../../chunks/chunk.KOCETN2L.js";
|
|
5
5
|
import "../../chunks/chunk.WFSNJLGP.js";
|
|
6
6
|
import "../../chunks/chunk.FSMUXFAQ.js";
|
|
7
7
|
import "../../chunks/chunk.FLRB45SF.js";
|
|
8
|
-
import "../../chunks/chunk.
|
|
8
|
+
import "../../chunks/chunk.YVXTJRSI.js";
|
|
9
9
|
import "../../chunks/chunk.KF5PNPQM.js";
|
|
10
10
|
import "../../chunks/chunk.6B5QADAQ.js";
|
|
11
11
|
import "../../chunks/chunk.APSWEF5D.js";
|
|
@@ -41,8 +41,6 @@ export default class DSACopyButton extends ShoelaceElement {
|
|
|
41
41
|
successLabel: string;
|
|
42
42
|
/** A custom label to show in the tooltip when a copy error occurs. */
|
|
43
43
|
errorLabel: string;
|
|
44
|
-
/** The length of time to show feedback before restoring the default trigger. */
|
|
45
|
-
feedbackDuration: number;
|
|
46
44
|
/** The preferred placement of the tooltip. */
|
|
47
45
|
tooltipPlacement: 'top' | 'right' | 'bottom' | 'left';
|
|
48
46
|
/**
|
|
@@ -55,6 +53,7 @@ export default class DSACopyButton extends ShoelaceElement {
|
|
|
55
53
|
size: 'small' | 'medium' | 'large';
|
|
56
54
|
private handleCopy;
|
|
57
55
|
private showStatus;
|
|
56
|
+
private resetStatus;
|
|
58
57
|
render(): import("lit").TemplateResult<1>;
|
|
59
58
|
}
|
|
60
59
|
declare global {
|
|
@@ -8,6 +8,7 @@ export declare const errorArgTypes: {
|
|
|
8
8
|
type: {
|
|
9
9
|
summary: "boolean";
|
|
10
10
|
};
|
|
11
|
+
category: string;
|
|
11
12
|
};
|
|
12
13
|
control: {
|
|
13
14
|
type: "boolean";
|
|
@@ -23,6 +24,7 @@ export declare const errorMessageArgTypes: {
|
|
|
23
24
|
type: {
|
|
24
25
|
summary: string;
|
|
25
26
|
};
|
|
27
|
+
category: string;
|
|
26
28
|
};
|
|
27
29
|
control: {
|
|
28
30
|
type: "text";
|
|
@@ -8,7 +8,8 @@ var errorArgTypes = {
|
|
|
8
8
|
defaultValue: { summary: "false" },
|
|
9
9
|
type: {
|
|
10
10
|
summary: "boolean"
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
category: "Errors"
|
|
12
13
|
},
|
|
13
14
|
control: { type: "boolean" }
|
|
14
15
|
};
|
|
@@ -19,7 +20,8 @@ var errorMessageArgTypes = {
|
|
|
19
20
|
defaultValue: { summary: "''" },
|
|
20
21
|
type: {
|
|
21
22
|
summary: "string"
|
|
22
|
-
}
|
|
23
|
+
},
|
|
24
|
+
category: "Errors"
|
|
23
25
|
},
|
|
24
26
|
control: { type: "text" }
|
|
25
27
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DSAFilterCounter
|
|
3
3
|
} from "../../chunks/chunk.OTEYQ4OU.js";
|
|
4
|
-
import "../../chunks/chunk.
|
|
5
|
-
import "../../chunks/chunk.
|
|
4
|
+
import "../../chunks/chunk.SPF4JEAI.js";
|
|
5
|
+
import "../../chunks/chunk.KNXOB4UE.js";
|
|
6
6
|
import "../../chunks/chunk.5R2EV6NZ.js";
|
|
7
7
|
import "../../chunks/chunk.IONY2GZF.js";
|
|
8
|
-
import "../../chunks/chunk.
|
|
8
|
+
import "../../chunks/chunk.G6BQ2WKP.js";
|
|
9
9
|
import "../../chunks/chunk.UIHXF3PF.js";
|
|
10
10
|
import "../../chunks/chunk.I6S6TC3T.js";
|
|
11
|
-
import "../../chunks/chunk.
|
|
11
|
+
import "../../chunks/chunk.JSZ62MET.js";
|
|
12
12
|
import "../../chunks/chunk.6MHC5DNA.js";
|
|
13
|
-
import "../../chunks/chunk.
|
|
13
|
+
import "../../chunks/chunk.AYVXBNFN.js";
|
|
14
14
|
import "../../chunks/chunk.4WZNGGVH.js";
|
|
15
15
|
import "../../chunks/chunk.DWB4V5OD.js";
|
|
16
16
|
import "../../chunks/chunk.S442ESGW.js";
|
|
@@ -24,7 +24,7 @@ import "../../chunks/chunk.EMIT7S33.js";
|
|
|
24
24
|
import "../../chunks/chunk.E6U524GP.js";
|
|
25
25
|
import "../../chunks/chunk.GI4XTG4I.js";
|
|
26
26
|
import "../../chunks/chunk.RNH6IZWW.js";
|
|
27
|
-
import "../../chunks/chunk.
|
|
27
|
+
import "../../chunks/chunk.YVXTJRSI.js";
|
|
28
28
|
import "../../chunks/chunk.KF5PNPQM.js";
|
|
29
29
|
import "../../chunks/chunk.6B5QADAQ.js";
|
|
30
30
|
import "../../chunks/chunk.APSWEF5D.js";
|
|
@@ -38,7 +38,7 @@ import "../../chunks/chunk.OYVF3HNG.js";
|
|
|
38
38
|
import "../../chunks/chunk.X4MXT6H7.js";
|
|
39
39
|
import "../../chunks/chunk.U3ETB7BS.js";
|
|
40
40
|
import "../../chunks/chunk.MDTUJ5PF.js";
|
|
41
|
-
import "../../chunks/chunk.
|
|
41
|
+
import "../../chunks/chunk.REWGAX6A.js";
|
|
42
42
|
import "../../chunks/chunk.JJZU37TO.js";
|
|
43
43
|
import "../../chunks/chunk.KPERDNOW.js";
|
|
44
44
|
import "../../chunks/chunk.LLQW6MLS.js";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
import "../../chunks/chunk.I5IKEQES.js";
|
|
5
5
|
import "../../chunks/chunk.SC3NB3OV.js";
|
|
6
6
|
import "../../chunks/chunk.LRSBUKH6.js";
|
|
7
|
-
import "../../chunks/chunk.
|
|
8
|
-
import "../../chunks/chunk.
|
|
7
|
+
import "../../chunks/chunk.SPF4JEAI.js";
|
|
8
|
+
import "../../chunks/chunk.KNXOB4UE.js";
|
|
9
9
|
import "../../chunks/chunk.5R2EV6NZ.js";
|
|
10
10
|
import "../../chunks/chunk.IONY2GZF.js";
|
|
11
|
-
import "../../chunks/chunk.
|
|
11
|
+
import "../../chunks/chunk.G6BQ2WKP.js";
|
|
12
12
|
import "../../chunks/chunk.UIHXF3PF.js";
|
|
13
13
|
import "../../chunks/chunk.I6S6TC3T.js";
|
|
14
|
-
import "../../chunks/chunk.
|
|
14
|
+
import "../../chunks/chunk.JSZ62MET.js";
|
|
15
15
|
import "../../chunks/chunk.6MHC5DNA.js";
|
|
16
|
-
import "../../chunks/chunk.
|
|
16
|
+
import "../../chunks/chunk.AYVXBNFN.js";
|
|
17
17
|
import "../../chunks/chunk.4WZNGGVH.js";
|
|
18
18
|
import "../../chunks/chunk.DWB4V5OD.js";
|
|
19
19
|
import "../../chunks/chunk.S442ESGW.js";
|
|
@@ -27,7 +27,7 @@ import "../../chunks/chunk.EMIT7S33.js";
|
|
|
27
27
|
import "../../chunks/chunk.E6U524GP.js";
|
|
28
28
|
import "../../chunks/chunk.GI4XTG4I.js";
|
|
29
29
|
import "../../chunks/chunk.RNH6IZWW.js";
|
|
30
|
-
import "../../chunks/chunk.
|
|
30
|
+
import "../../chunks/chunk.YVXTJRSI.js";
|
|
31
31
|
import "../../chunks/chunk.KF5PNPQM.js";
|
|
32
32
|
import "../../chunks/chunk.6B5QADAQ.js";
|
|
33
33
|
import "../../chunks/chunk.APSWEF5D.js";
|
|
@@ -43,7 +43,7 @@ import "../../chunks/chunk.U3ETB7BS.js";
|
|
|
43
43
|
import "../../chunks/chunk.MDTUJ5PF.js";
|
|
44
44
|
import "../../chunks/chunk.7LJQFNIL.js";
|
|
45
45
|
import "../../chunks/chunk.QRL5IEW6.js";
|
|
46
|
-
import "../../chunks/chunk.
|
|
46
|
+
import "../../chunks/chunk.REWGAX6A.js";
|
|
47
47
|
import "../../chunks/chunk.JJZU37TO.js";
|
|
48
48
|
import "../../chunks/chunk.KPERDNOW.js";
|
|
49
49
|
import "../../chunks/chunk.LLQW6MLS.js";
|