@aurodesignsystem/auro-formkit 3.4.1-rc-602.2.1 → 3.5.0-rc-627.1
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/components/checkbox/demo/api.md +1 -1
- package/components/checkbox/demo/api.min.js +31 -8
- package/components/checkbox/demo/index.min.js +31 -8
- package/components/checkbox/dist/auro-checkbox.d.ts +13 -6
- package/components/checkbox/dist/index.js +31 -8
- package/components/checkbox/dist/registered.js +31 -8
- package/components/combobox/demo/api.md +25 -25
- package/components/combobox/demo/api.min.js +48 -13
- package/components/combobox/demo/index.min.js +48 -13
- package/components/combobox/dist/auro-combobox.d.ts +2 -4
- package/components/combobox/dist/index.js +47 -12
- package/components/combobox/dist/registered.js +47 -12
- package/components/counter/demo/api.min.js +14 -1
- package/components/counter/demo/index.min.js +14 -1
- package/components/counter/dist/index.js +14 -1
- package/components/counter/dist/registered.js +14 -1
- package/components/datepicker/demo/api.min.js +45 -12
- package/components/datepicker/demo/index.min.js +45 -12
- package/components/datepicker/dist/index.js +45 -12
- package/components/datepicker/dist/registered.js +45 -12
- package/components/form/demo/api.md +1 -5
- package/components/form/demo/api.min.js +8 -2
- package/components/form/demo/index.html +1 -0
- package/components/form/demo/index.md +321 -27
- package/components/form/demo/index.min.js +8 -2
- package/components/form/demo/registerDemoDeps.js +1 -0
- package/components/form/dist/auro-form.d.ts +12 -6
- package/components/form/dist/index.js +8 -2
- package/components/form/dist/registered.js +8 -2
- package/components/input/demo/api.md +1 -1
- package/components/input/demo/api.min.js +31 -11
- package/components/input/demo/index.min.js +31 -11
- package/components/input/dist/base-input.d.ts +13 -6
- package/components/input/dist/index.js +31 -11
- package/components/input/dist/registered.js +31 -11
- package/components/menu/demo/api.md +11 -17
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/dist/registered.js +1 -1
- package/components/radio/demo/api.md +1 -1
- package/components/radio/demo/api.min.js +32 -4
- package/components/radio/demo/index.min.js +32 -4
- package/components/radio/dist/auro-radio.d.ts +14 -3
- package/components/radio/dist/index.js +32 -4
- package/components/radio/dist/registered.js +32 -4
- package/components/select/demo/api.html +15 -0
- package/components/select/demo/api.md +178 -0
- package/components/select/demo/api.min.js +84 -3
- package/components/select/demo/index.html +15 -0
- package/components/select/demo/index.md +177 -0
- package/components/select/demo/index.min.js +84 -3
- package/components/select/dist/auro-select.d.ts +27 -0
- package/components/select/dist/index.js +84 -2
- package/components/select/dist/registered.js +84 -2
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
53
53
|
| [checked](#checked) | `checked` | `boolean` | false | If set to true, the checkbox will be filled with a checkmark. |
|
|
54
54
|
| [disabled](#disabled) | `disabled` | `boolean` | false | If set to true, the checkbox will not be clickable. |
|
|
55
55
|
| [error](#error) | `error` | `boolean` | false | If set to true, the checkbox will be displayed with an error state. |
|
|
56
|
-
| [id](#id) | `id` | `string` | |
|
|
56
|
+
| [id](#id) | `id` | `string` | | The id global attribute defines an identifier (ID) which must be unique in the whole document. |
|
|
57
57
|
| [name](#name) | `name` | `string` | | Accepts any string and is used to identify related checkboxes when submitting form data. |
|
|
58
58
|
| [onDark](#onDark) | `onDark` | `boolean` | false | Sets onDark styles for component. |
|
|
59
59
|
| [value](#value) | `value` | `string` | | Sets the element's input value. Must be unique within an auro-checkbox-group element. |
|
|
@@ -136,6 +136,9 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
136
136
|
/**
|
|
137
137
|
* Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
138
138
|
*
|
|
139
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
140
|
+
* @attr id
|
|
141
|
+
*
|
|
139
142
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
140
143
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
141
144
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -202,11 +205,6 @@ class AuroCheckbox extends i$2 {
|
|
|
202
205
|
reflect: true
|
|
203
206
|
},
|
|
204
207
|
|
|
205
|
-
/**
|
|
206
|
-
* Sets the individual `id` per element.
|
|
207
|
-
*/
|
|
208
|
-
id: { type: String },
|
|
209
|
-
|
|
210
208
|
/**
|
|
211
209
|
* Accepts any string and is used to identify related checkboxes when submitting form data.
|
|
212
210
|
*/
|
|
@@ -237,6 +235,16 @@ class AuroCheckbox extends i$2 {
|
|
|
237
235
|
type: Boolean,
|
|
238
236
|
reflect: true,
|
|
239
237
|
attribute: false
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @private
|
|
242
|
+
* id for input node
|
|
243
|
+
*/
|
|
244
|
+
inputId: {
|
|
245
|
+
type: String,
|
|
246
|
+
reflect: false,
|
|
247
|
+
attribute: false
|
|
240
248
|
}
|
|
241
249
|
};
|
|
242
250
|
}
|
|
@@ -327,6 +335,8 @@ class AuroCheckbox extends i$2 {
|
|
|
327
335
|
// Add the tag name as an attribute if it is different than the component name
|
|
328
336
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-checkbox');
|
|
329
337
|
|
|
338
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
339
|
+
|
|
330
340
|
this.addEventListener('click', () => {
|
|
331
341
|
this.handleFocusin();
|
|
332
342
|
});
|
|
@@ -361,13 +371,13 @@ class AuroCheckbox extends i$2 {
|
|
|
361
371
|
@input="${this.handleInput}"
|
|
362
372
|
?disabled="${this.disabled}"
|
|
363
373
|
.checked="${this.checked}"
|
|
364
|
-
id="${
|
|
374
|
+
id="${this.inputId}"
|
|
365
375
|
name="${o$1(this.name)}"
|
|
366
376
|
type="checkbox"
|
|
367
377
|
.value="${this.value}"
|
|
368
378
|
/>
|
|
369
379
|
|
|
370
|
-
<label for="${
|
|
380
|
+
<label for="${this.inputId}" class="${e(labelClasses)}" part="checkbox-label">
|
|
371
381
|
${this.checked ? this.generateIconHtml() : undefined}
|
|
372
382
|
<slot></slot>
|
|
373
383
|
</label>
|
|
@@ -1040,7 +1050,20 @@ class AuroFormValidation {
|
|
|
1040
1050
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
1041
1051
|
*/
|
|
1042
1052
|
|
|
1043
|
-
let hasValue =
|
|
1053
|
+
let hasValue = false;
|
|
1054
|
+
|
|
1055
|
+
// Check string for having a value
|
|
1056
|
+
if (typeof elem.value === "string") {
|
|
1057
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
// Check array value types for having a value
|
|
1061
|
+
if (Array.isArray(elem.value)) {
|
|
1062
|
+
hasValue = Boolean(
|
|
1063
|
+
elem.value.length > 0 &&
|
|
1064
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1044
1067
|
|
|
1045
1068
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
1046
1069
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -128,6 +128,9 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
128
128
|
/**
|
|
129
129
|
* Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
130
130
|
*
|
|
131
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
132
|
+
* @attr id
|
|
133
|
+
*
|
|
131
134
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
132
135
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
133
136
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -194,11 +197,6 @@ class AuroCheckbox extends i$2 {
|
|
|
194
197
|
reflect: true
|
|
195
198
|
},
|
|
196
199
|
|
|
197
|
-
/**
|
|
198
|
-
* Sets the individual `id` per element.
|
|
199
|
-
*/
|
|
200
|
-
id: { type: String },
|
|
201
|
-
|
|
202
200
|
/**
|
|
203
201
|
* Accepts any string and is used to identify related checkboxes when submitting form data.
|
|
204
202
|
*/
|
|
@@ -229,6 +227,16 @@ class AuroCheckbox extends i$2 {
|
|
|
229
227
|
type: Boolean,
|
|
230
228
|
reflect: true,
|
|
231
229
|
attribute: false
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @private
|
|
234
|
+
* id for input node
|
|
235
|
+
*/
|
|
236
|
+
inputId: {
|
|
237
|
+
type: String,
|
|
238
|
+
reflect: false,
|
|
239
|
+
attribute: false
|
|
232
240
|
}
|
|
233
241
|
};
|
|
234
242
|
}
|
|
@@ -319,6 +327,8 @@ class AuroCheckbox extends i$2 {
|
|
|
319
327
|
// Add the tag name as an attribute if it is different than the component name
|
|
320
328
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-checkbox');
|
|
321
329
|
|
|
330
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
331
|
+
|
|
322
332
|
this.addEventListener('click', () => {
|
|
323
333
|
this.handleFocusin();
|
|
324
334
|
});
|
|
@@ -353,13 +363,13 @@ class AuroCheckbox extends i$2 {
|
|
|
353
363
|
@input="${this.handleInput}"
|
|
354
364
|
?disabled="${this.disabled}"
|
|
355
365
|
.checked="${this.checked}"
|
|
356
|
-
id="${
|
|
366
|
+
id="${this.inputId}"
|
|
357
367
|
name="${o$1(this.name)}"
|
|
358
368
|
type="checkbox"
|
|
359
369
|
.value="${this.value}"
|
|
360
370
|
/>
|
|
361
371
|
|
|
362
|
-
<label for="${
|
|
372
|
+
<label for="${this.inputId}" class="${e(labelClasses)}" part="checkbox-label">
|
|
363
373
|
${this.checked ? this.generateIconHtml() : undefined}
|
|
364
374
|
<slot></slot>
|
|
365
375
|
</label>
|
|
@@ -1032,7 +1042,20 @@ class AuroFormValidation {
|
|
|
1032
1042
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
1033
1043
|
*/
|
|
1034
1044
|
|
|
1035
|
-
let hasValue =
|
|
1045
|
+
let hasValue = false;
|
|
1046
|
+
|
|
1047
|
+
// Check string for having a value
|
|
1048
|
+
if (typeof elem.value === "string") {
|
|
1049
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
// Check array value types for having a value
|
|
1053
|
+
if (Array.isArray(elem.value)) {
|
|
1054
|
+
hasValue = Boolean(
|
|
1055
|
+
elem.value.length > 0 &&
|
|
1056
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1036
1059
|
|
|
1037
1060
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
1038
1061
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
3
3
|
*
|
|
4
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
5
|
+
* @attr id
|
|
6
|
+
*
|
|
4
7
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
5
8
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
6
9
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -29,12 +32,6 @@ export class AuroCheckbox extends LitElement {
|
|
|
29
32
|
type: BooleanConstructor;
|
|
30
33
|
reflect: boolean;
|
|
31
34
|
};
|
|
32
|
-
/**
|
|
33
|
-
* Sets the individual `id` per element.
|
|
34
|
-
*/
|
|
35
|
-
id: {
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
};
|
|
38
35
|
/**
|
|
39
36
|
* Accepts any string and is used to identify related checkboxes when submitting form data.
|
|
40
37
|
*/
|
|
@@ -61,6 +58,15 @@ export class AuroCheckbox extends LitElement {
|
|
|
61
58
|
* @private
|
|
62
59
|
*/
|
|
63
60
|
touched: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* @private
|
|
63
|
+
* id for input node
|
|
64
|
+
*/
|
|
65
|
+
inputId: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
reflect: boolean;
|
|
68
|
+
attribute: boolean;
|
|
69
|
+
};
|
|
64
70
|
};
|
|
65
71
|
/**
|
|
66
72
|
* This will register this element with the browser.
|
|
@@ -117,6 +123,7 @@ export class AuroCheckbox extends LitElement {
|
|
|
117
123
|
*/
|
|
118
124
|
reset(): void;
|
|
119
125
|
firstUpdated(): void;
|
|
126
|
+
inputId: string;
|
|
120
127
|
render(): import("lit-html").TemplateResult<1>;
|
|
121
128
|
}
|
|
122
129
|
import { LitElement } from "lit";
|
|
@@ -88,6 +88,9 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
88
88
|
/**
|
|
89
89
|
* Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
90
90
|
*
|
|
91
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
92
|
+
* @attr id
|
|
93
|
+
*
|
|
91
94
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
92
95
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
93
96
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -154,11 +157,6 @@ class AuroCheckbox extends LitElement {
|
|
|
154
157
|
reflect: true
|
|
155
158
|
},
|
|
156
159
|
|
|
157
|
-
/**
|
|
158
|
-
* Sets the individual `id` per element.
|
|
159
|
-
*/
|
|
160
|
-
id: { type: String },
|
|
161
|
-
|
|
162
160
|
/**
|
|
163
161
|
* Accepts any string and is used to identify related checkboxes when submitting form data.
|
|
164
162
|
*/
|
|
@@ -189,6 +187,16 @@ class AuroCheckbox extends LitElement {
|
|
|
189
187
|
type: Boolean,
|
|
190
188
|
reflect: true,
|
|
191
189
|
attribute: false
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @private
|
|
194
|
+
* id for input node
|
|
195
|
+
*/
|
|
196
|
+
inputId: {
|
|
197
|
+
type: String,
|
|
198
|
+
reflect: false,
|
|
199
|
+
attribute: false
|
|
192
200
|
}
|
|
193
201
|
};
|
|
194
202
|
}
|
|
@@ -279,6 +287,8 @@ class AuroCheckbox extends LitElement {
|
|
|
279
287
|
// Add the tag name as an attribute if it is different than the component name
|
|
280
288
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-checkbox');
|
|
281
289
|
|
|
290
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
291
|
+
|
|
282
292
|
this.addEventListener('click', () => {
|
|
283
293
|
this.handleFocusin();
|
|
284
294
|
});
|
|
@@ -313,13 +323,13 @@ class AuroCheckbox extends LitElement {
|
|
|
313
323
|
@input="${this.handleInput}"
|
|
314
324
|
?disabled="${this.disabled}"
|
|
315
325
|
.checked="${this.checked}"
|
|
316
|
-
id="${
|
|
326
|
+
id="${this.inputId}"
|
|
317
327
|
name="${ifDefined(this.name)}"
|
|
318
328
|
type="checkbox"
|
|
319
329
|
.value="${this.value}"
|
|
320
330
|
/>
|
|
321
331
|
|
|
322
|
-
<label for="${
|
|
332
|
+
<label for="${this.inputId}" class="${classMap(labelClasses)}" part="checkbox-label">
|
|
323
333
|
${this.checked ? this.generateIconHtml() : undefined}
|
|
324
334
|
<slot></slot>
|
|
325
335
|
</label>
|
|
@@ -985,7 +995,20 @@ class AuroFormValidation {
|
|
|
985
995
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
986
996
|
*/
|
|
987
997
|
|
|
988
|
-
let hasValue =
|
|
998
|
+
let hasValue = false;
|
|
999
|
+
|
|
1000
|
+
// Check string for having a value
|
|
1001
|
+
if (typeof elem.value === "string") {
|
|
1002
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// Check array value types for having a value
|
|
1006
|
+
if (Array.isArray(elem.value)) {
|
|
1007
|
+
hasValue = Boolean(
|
|
1008
|
+
elem.value.length > 0 &&
|
|
1009
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
989
1012
|
|
|
990
1013
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
991
1014
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -88,6 +88,9 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
88
88
|
/**
|
|
89
89
|
* Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
90
90
|
*
|
|
91
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
92
|
+
* @attr id
|
|
93
|
+
*
|
|
91
94
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
92
95
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
93
96
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -154,11 +157,6 @@ class AuroCheckbox extends LitElement {
|
|
|
154
157
|
reflect: true
|
|
155
158
|
},
|
|
156
159
|
|
|
157
|
-
/**
|
|
158
|
-
* Sets the individual `id` per element.
|
|
159
|
-
*/
|
|
160
|
-
id: { type: String },
|
|
161
|
-
|
|
162
160
|
/**
|
|
163
161
|
* Accepts any string and is used to identify related checkboxes when submitting form data.
|
|
164
162
|
*/
|
|
@@ -189,6 +187,16 @@ class AuroCheckbox extends LitElement {
|
|
|
189
187
|
type: Boolean,
|
|
190
188
|
reflect: true,
|
|
191
189
|
attribute: false
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @private
|
|
194
|
+
* id for input node
|
|
195
|
+
*/
|
|
196
|
+
inputId: {
|
|
197
|
+
type: String,
|
|
198
|
+
reflect: false,
|
|
199
|
+
attribute: false
|
|
192
200
|
}
|
|
193
201
|
};
|
|
194
202
|
}
|
|
@@ -279,6 +287,8 @@ class AuroCheckbox extends LitElement {
|
|
|
279
287
|
// Add the tag name as an attribute if it is different than the component name
|
|
280
288
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-checkbox');
|
|
281
289
|
|
|
290
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
291
|
+
|
|
282
292
|
this.addEventListener('click', () => {
|
|
283
293
|
this.handleFocusin();
|
|
284
294
|
});
|
|
@@ -313,13 +323,13 @@ class AuroCheckbox extends LitElement {
|
|
|
313
323
|
@input="${this.handleInput}"
|
|
314
324
|
?disabled="${this.disabled}"
|
|
315
325
|
.checked="${this.checked}"
|
|
316
|
-
id="${
|
|
326
|
+
id="${this.inputId}"
|
|
317
327
|
name="${ifDefined(this.name)}"
|
|
318
328
|
type="checkbox"
|
|
319
329
|
.value="${this.value}"
|
|
320
330
|
/>
|
|
321
331
|
|
|
322
|
-
<label for="${
|
|
332
|
+
<label for="${this.inputId}" class="${classMap(labelClasses)}" part="checkbox-label">
|
|
323
333
|
${this.checked ? this.generateIconHtml() : undefined}
|
|
324
334
|
<slot></slot>
|
|
325
335
|
</label>
|
|
@@ -985,7 +995,20 @@ class AuroFormValidation {
|
|
|
985
995
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
986
996
|
*/
|
|
987
997
|
|
|
988
|
-
let hasValue =
|
|
998
|
+
let hasValue = false;
|
|
999
|
+
|
|
1000
|
+
// Check string for having a value
|
|
1001
|
+
if (typeof elem.value === "string") {
|
|
1002
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// Check array value types for having a value
|
|
1006
|
+
if (Array.isArray(elem.value)) {
|
|
1007
|
+
hasValue = Boolean(
|
|
1008
|
+
elem.value.length > 0 &&
|
|
1009
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
989
1012
|
|
|
990
1013
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
991
1014
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -5,31 +5,31 @@
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
| Property | Attribute | Type
|
|
9
|
-
|
|
10
|
-
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean`
|
|
11
|
-
| [autocomplete](#autocomplete) | `autocomplete` | `string`
|
|
12
|
-
| [checkmark](#checkmark) | `checkmark` | `boolean`
|
|
13
|
-
| [disabled](#disabled) | `disabled` | `boolean`
|
|
14
|
-
| [error](#error) | `error` | `string`
|
|
15
|
-
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string`
|
|
16
|
-
| [inputmode](#inputmode) | `inputmode` | `string`
|
|
17
|
-
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean`
|
|
18
|
-
| [noFilter](#noFilter) | `noFilter` | `boolean`
|
|
19
|
-
| [noFlip](#noFlip) | `noFlip` | `boolean`
|
|
20
|
-
| [noValidate](#noValidate) | `noValidate` | `boolean`
|
|
21
|
-
| [offset](#offset) | `offset` | `number`
|
|
22
|
-
| [onDark](#onDark) | `onDark` | `boolean`
|
|
23
|
-
| [optionSelected](#optionSelected) | `optionSelected` | `object`
|
|
24
|
-
| [placement](#placement) | `placement` | `string`
|
|
25
|
-
| [required](#required) | `required` | `boolean`
|
|
26
|
-
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string`
|
|
27
|
-
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string`
|
|
28
|
-
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string`
|
|
29
|
-
| [triggerIcon](#triggerIcon) | `triggerIcon` | `boolean`
|
|
30
|
-
| [type](#type) | `type` | `string`
|
|
31
|
-
| [validity](#validity) | `validity` | `string`
|
|
32
|
-
| [value](#value) | `value` |
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|---------------------------------|---------------------------------|------------------------|----------------|--------------------------------------------------|
|
|
10
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | | If declared, bib's position will be automatically calculated where to appear. |
|
|
11
|
+
| [autocomplete](#autocomplete) | `autocomplete` | `string` | "false" | An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported. |
|
|
12
|
+
| [checkmark](#checkmark) | `checkmark` | `boolean` | | When attribute is present auro-menu will apply checkmarks to selected options. |
|
|
13
|
+
| [disabled](#disabled) | `disabled` | `boolean` | | If set, disables the combobox. |
|
|
14
|
+
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
15
|
+
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
|
|
16
|
+
| [inputmode](#inputmode) | `inputmode` | `string` | | Exposes inputmode attribute for input. |
|
|
17
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
|
|
18
|
+
| [noFilter](#noFilter) | `noFilter` | `boolean` | | If set, combobox will not filter menuoptions based in input. |
|
|
19
|
+
| [noFlip](#noFlip) | `noFlip` | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
|
|
20
|
+
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
21
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
22
|
+
| [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
|
|
23
|
+
| [optionSelected](#optionSelected) | `optionSelected` | `object` | | Specifies the current selected option. |
|
|
24
|
+
| [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
|
|
25
|
+
| [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
26
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
27
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
28
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
29
|
+
| [triggerIcon](#triggerIcon) | `triggerIcon` | `boolean` | | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
|
|
30
|
+
| [type](#type) | `type` | `string` | | Applies the defined value as the type attribute on auro-input. |
|
|
31
|
+
| [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
|
|
32
|
+
| [value](#value) | `value` | `Array\|String<Array>` | | Value selected for the dropdown menu. |
|
|
33
33
|
|
|
34
34
|
## Methods
|
|
35
35
|
|
|
@@ -963,7 +963,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
963
963
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
964
964
|
*/
|
|
965
965
|
|
|
966
|
-
let hasValue =
|
|
966
|
+
let hasValue = false;
|
|
967
|
+
|
|
968
|
+
// Check string for having a value
|
|
969
|
+
if (typeof elem.value === "string") {
|
|
970
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
// Check array value types for having a value
|
|
974
|
+
if (Array.isArray(elem.value)) {
|
|
975
|
+
hasValue = Boolean(
|
|
976
|
+
elem.value.length > 0 &&
|
|
977
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
978
|
+
);
|
|
979
|
+
}
|
|
967
980
|
|
|
968
981
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
969
982
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -9525,7 +9538,20 @@ class AuroFormValidation {
|
|
|
9525
9538
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
9526
9539
|
*/
|
|
9527
9540
|
|
|
9528
|
-
let hasValue =
|
|
9541
|
+
let hasValue = false;
|
|
9542
|
+
|
|
9543
|
+
// Check string for having a value
|
|
9544
|
+
if (typeof elem.value === "string") {
|
|
9545
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
9546
|
+
}
|
|
9547
|
+
|
|
9548
|
+
// Check array value types for having a value
|
|
9549
|
+
if (Array.isArray(elem.value)) {
|
|
9550
|
+
hasValue = Boolean(
|
|
9551
|
+
elem.value.length > 0 &&
|
|
9552
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
9553
|
+
);
|
|
9554
|
+
}
|
|
9529
9555
|
|
|
9530
9556
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
9531
9557
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -9639,6 +9665,9 @@ class AuroFormValidation {
|
|
|
9639
9665
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
9640
9666
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
9641
9667
|
*
|
|
9668
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
9669
|
+
* @attr id
|
|
9670
|
+
*
|
|
9642
9671
|
* @slot helptext - Sets the help text displayed below the input.
|
|
9643
9672
|
* @slot label - Sets the label text for the input.
|
|
9644
9673
|
*
|
|
@@ -9829,13 +9858,6 @@ class BaseInput extends i$2 {
|
|
|
9829
9858
|
reflect: true
|
|
9830
9859
|
},
|
|
9831
9860
|
|
|
9832
|
-
/**
|
|
9833
|
-
* Sets the unique ID of the element.
|
|
9834
|
-
*/
|
|
9835
|
-
id: {
|
|
9836
|
-
type: String
|
|
9837
|
-
},
|
|
9838
|
-
|
|
9839
9861
|
/** Exposes inputmode attribute for input. */
|
|
9840
9862
|
inputmode: {
|
|
9841
9863
|
type: String,
|
|
@@ -10056,6 +10078,16 @@ class BaseInput extends i$2 {
|
|
|
10056
10078
|
type: Boolean,
|
|
10057
10079
|
reflect: true,
|
|
10058
10080
|
attribute: false
|
|
10081
|
+
},
|
|
10082
|
+
|
|
10083
|
+
/**
|
|
10084
|
+
* @private
|
|
10085
|
+
* id for input node
|
|
10086
|
+
*/
|
|
10087
|
+
inputId: {
|
|
10088
|
+
type: String,
|
|
10089
|
+
reflect: false,
|
|
10090
|
+
attribute: false
|
|
10059
10091
|
}
|
|
10060
10092
|
};
|
|
10061
10093
|
}
|
|
@@ -10087,6 +10119,7 @@ class BaseInput extends i$2 {
|
|
|
10087
10119
|
if (this.tagName.toLowerCase() !== 'auro-input') {
|
|
10088
10120
|
this.setAttribute('auro-input', true);
|
|
10089
10121
|
}
|
|
10122
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
10090
10123
|
|
|
10091
10124
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
10092
10125
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
@@ -11752,7 +11785,7 @@ class AuroInput extends BaseInput {
|
|
|
11752
11785
|
: undefined
|
|
11753
11786
|
}
|
|
11754
11787
|
</div>
|
|
11755
|
-
<label for=${this.
|
|
11788
|
+
<label for=${this.inputId} class="${e(labelClasses)}" part="label">
|
|
11756
11789
|
<slot name="label">
|
|
11757
11790
|
${this.label}
|
|
11758
11791
|
</slot>
|
|
@@ -11762,7 +11795,7 @@ class AuroInput extends BaseInput {
|
|
|
11762
11795
|
@input="${this.handleInput}"
|
|
11763
11796
|
@focusin="${this.handleFocusin}"
|
|
11764
11797
|
@blur="${this.handleBlur}"
|
|
11765
|
-
id="${this.
|
|
11798
|
+
id="${this.inputId}"
|
|
11766
11799
|
name="${o(this.name)}"
|
|
11767
11800
|
type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}"
|
|
11768
11801
|
pattern="${o(this.definePattern())}"
|
|
@@ -11830,7 +11863,7 @@ class AuroInput extends BaseInput {
|
|
|
11830
11863
|
variant="flat"
|
|
11831
11864
|
?onDark="${this.onDark}"
|
|
11832
11865
|
class="notificationBtn clearBtn"
|
|
11833
|
-
|
|
11866
|
+
arialabel="${i18n(this.lang, 'clearInput')}"
|
|
11834
11867
|
@click="${this.handleClickClear}">
|
|
11835
11868
|
<${this.iconTag}
|
|
11836
11869
|
customColor
|
|
@@ -12955,6 +12988,7 @@ class AuroCombobox extends i$2 {
|
|
|
12955
12988
|
|
|
12956
12989
|
/**
|
|
12957
12990
|
* Value selected for the dropdown menu.
|
|
12991
|
+
* @type {Array|String<Array>}
|
|
12958
12992
|
*/
|
|
12959
12993
|
value: {
|
|
12960
12994
|
converter: arrayConverter$1,
|
|
@@ -13336,6 +13370,7 @@ class AuroCombobox extends i$2 {
|
|
|
13336
13370
|
}
|
|
13337
13371
|
});
|
|
13338
13372
|
|
|
13373
|
+
// Handle validation messages from auroFormElement-validated event
|
|
13339
13374
|
this.input.addEventListener('auroFormElement-validated', (evt) => {
|
|
13340
13375
|
this.errorMessage = evt.detail.message;
|
|
13341
13376
|
});
|
|
@@ -13886,7 +13921,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
13886
13921
|
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
13887
13922
|
/**
|
|
13888
13923
|
* The auro-menu element provides users a way to select from a list of options.
|
|
13889
|
-
* @attr {Array<HTMLElement>|undefined}
|
|
13924
|
+
* @attr {Array<HTMLElement>|undefined} optionSelected - An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected.
|
|
13890
13925
|
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
13891
13926
|
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
13892
13927
|
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|