@aurodesignsystem/auro-formkit 2.0.0-beta.31 → 2.0.0-beta.33
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/.turbo/cache/02882630667e46f8-meta.json +1 -0
- package/.turbo/cache/02882630667e46f8.tar.zst +0 -0
- package/.turbo/cache/0899fc2ef909db30-meta.json +1 -0
- package/.turbo/cache/0899fc2ef909db30.tar.zst +0 -0
- package/.turbo/cache/1d4280429ff4222f-meta.json +1 -1
- package/.turbo/cache/1e094164b4932553-meta.json +1 -1
- package/.turbo/cache/1e3f844e58a3d4f2-meta.json +1 -0
- package/.turbo/cache/{cdb0e45299352fce.tar.zst → 1e3f844e58a3d4f2.tar.zst} +0 -0
- package/.turbo/cache/251ba344c6338ba3-meta.json +1 -1
- package/.turbo/cache/28fe2121c9ba81e2-meta.json +1 -0
- package/.turbo/cache/28fe2121c9ba81e2.tar.zst +0 -0
- package/.turbo/cache/298b6ff0272e6226-meta.json +1 -1
- package/.turbo/cache/2abb5400a01a1694-meta.json +1 -1
- package/.turbo/cache/30fda91ef83677e4-meta.json +1 -1
- package/.turbo/cache/317b33937a355f80-meta.json +1 -0
- package/.turbo/cache/317b33937a355f80.tar.zst +0 -0
- package/.turbo/cache/3221d91a94756c26-meta.json +1 -1
- package/.turbo/cache/3ab09fe7cf32b3bf-meta.json +1 -1
- package/.turbo/cache/3c795c4f80600a07-meta.json +1 -0
- package/.turbo/cache/3c795c4f80600a07.tar.zst +0 -0
- package/.turbo/cache/3f1b3db13386acdc-meta.json +1 -1
- package/.turbo/cache/430c124614841675-meta.json +1 -1
- package/.turbo/cache/45bdeb0396723b25-meta.json +1 -1
- package/.turbo/cache/4e8248fc9e1e3e8f-meta.json +1 -1
- package/.turbo/cache/4e8248fc9e1e3e8f.tar.zst +0 -0
- package/.turbo/cache/4e9c9a5dd62c50a4-meta.json +1 -1
- package/.turbo/cache/5326b73ddda05291-meta.json +1 -1
- package/.turbo/cache/5fc9a7a072827b7b-meta.json +1 -1
- package/.turbo/cache/62214e9883afcc4d-meta.json +1 -1
- package/.turbo/cache/6e0b3da6e3ff3718-meta.json +1 -1
- package/.turbo/cache/721262daa6b8164a-meta.json +1 -0
- package/.turbo/cache/721262daa6b8164a.tar.zst +0 -0
- package/.turbo/cache/753b119a389426be-meta.json +1 -1
- package/.turbo/cache/7593109ea54e7505-meta.json +1 -0
- package/.turbo/cache/7629bef0037115af-meta.json +1 -0
- package/.turbo/cache/76667a5d27a45c7a-meta.json +1 -0
- package/.turbo/cache/{c13e85d809af02f6.tar.zst → 76667a5d27a45c7a.tar.zst} +0 -0
- package/.turbo/cache/785960dbbde053b6-meta.json +1 -0
- package/.turbo/cache/785960dbbde053b6.tar.zst +0 -0
- package/.turbo/cache/92b4b6ba93458685-meta.json +1 -1
- package/.turbo/cache/9c15f2276d1905d6-meta.json +1 -0
- package/.turbo/cache/9c15f2276d1905d6.tar.zst +0 -0
- package/.turbo/cache/a263932c5b42ec4f-meta.json +1 -0
- package/.turbo/cache/{4f81392ada08f240.tar.zst → a263932c5b42ec4f.tar.zst} +0 -0
- package/.turbo/cache/b10915c26145587e-meta.json +1 -0
- package/.turbo/cache/b10915c26145587e.tar.zst +0 -0
- package/.turbo/cache/b169402fda42f218-meta.json +1 -1
- package/.turbo/cache/b169402fda42f218.tar.zst +0 -0
- package/.turbo/cache/b32a99cd28bc1388-meta.json +1 -0
- package/.turbo/cache/b32a99cd28bc1388.tar.zst +0 -0
- package/.turbo/cache/bed01678759af66e-meta.json +1 -0
- package/.turbo/cache/{8f94ccea023ee254.tar.zst → bed01678759af66e.tar.zst} +0 -0
- package/.turbo/cache/bf154f26b6bb6f24-meta.json +1 -0
- package/.turbo/cache/{9337429c745d33f9.tar.zst → bf154f26b6bb6f24.tar.zst} +0 -0
- package/.turbo/cache/bf3d1eace5e676f9-meta.json +1 -1
- package/.turbo/cache/c103542625831d7c-meta.json +1 -0
- package/.turbo/cache/c103542625831d7c.tar.zst +0 -0
- package/.turbo/cache/c860cecd25be20af-meta.json +1 -1
- package/.turbo/cache/ca9625ba0a5cd272-meta.json +1 -0
- package/.turbo/cache/ca9625ba0a5cd272.tar.zst +0 -0
- package/.turbo/cache/cbcd9db8ac9a2d52-meta.json +1 -1
- package/.turbo/cache/d3afdb9a7db9eacc-meta.json +1 -1
- package/.turbo/cache/d8ecdff9c663c38e-meta.json +1 -1
- package/.turbo/cache/de494df6a3006101-meta.json +1 -1
- package/.turbo/cache/e56a9865641ec3e8-meta.json +1 -1
- package/.turbo/cache/e7ed9e7056d80938-meta.json +1 -1
- package/.turbo/cache/e837827cd24834c4-meta.json +1 -1
- package/.turbo/cache/e9ff93179777aa26-meta.json +1 -1
- package/.turbo/cache/ed455be2856be7ac-meta.json +1 -0
- package/.turbo/cache/f2e689c8cdd1aafe-meta.json +1 -1
- package/.turbo/cache/f473f3d9902768db-meta.json +1 -0
- package/.turbo/cache/f7ab9a13f9acc0ab-meta.json +1 -1
- package/.turbo/cache/f93a33e9c99af8e4-meta.json +1 -0
- package/.turbo/cache/f93a33e9c99af8e4.tar.zst +0 -0
- package/.turbo/cache/ff3c8a3042cab66e-meta.json +1 -1
- package/CHANGELOG.md +21 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/README.md +1 -1
- package/components/combobox/.turbo/turbo-build.log +2 -2
- package/components/combobox/README.md +4 -4
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/counter/README.md +1 -1
- package/components/datepicker/.turbo/turbo-build.log +1 -1
- package/components/datepicker/README.md +6 -6
- package/components/datepicker/demo/api.min.js +1 -1
- package/components/datepicker/demo/index.min.js +1 -1
- package/components/datepicker/dist/index.js +1 -1
- package/components/datepicker/package.json +2 -2
- package/components/datepicker/src/styles/style-css.js +1 -1
- package/components/datepicker/src/styles/style.css +55 -29
- package/components/datepicker/src/styles/style.scss +45 -7
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/README.md +1 -1
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/form/README.md +1 -1
- package/components/form/demo/api.min.js +75 -33
- package/components/form/demo/index.min.js +75 -33
- package/components/form/demo/registerDemoDeps.js +13 -0
- package/components/form/dist/auro-form.d.ts +18 -0
- package/components/form/dist/auro-form.d.ts.map +1 -1
- package/components/form/dist/index.js +75 -33
- package/components/form/src/auro-form.js +75 -33
- package/components/helptext/.turbo/turbo-build.log +1 -1
- package/components/helptext/.turbo/turbo-bundler.log +1 -1
- package/components/input/.turbo/turbo-build.log +3 -3
- package/components/input/README.md +1 -1
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/README.md +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/README.md +1 -1
- package/components/select/.turbo/turbo-build.log +3 -3
- package/components/select/README.md +3 -3
- package/package.json +1 -1
- package/.turbo/cache/0b59b3b61897d950-meta.json +0 -1
- package/.turbo/cache/1215c5e3dd25e0c3-meta.json +0 -1
- package/.turbo/cache/1215c5e3dd25e0c3.tar.zst +0 -0
- package/.turbo/cache/13ff0d757be18ae9-meta.json +0 -1
- package/.turbo/cache/13ff0d757be18ae9.tar.zst +0 -0
- package/.turbo/cache/1b653bcfa2eef748-meta.json +0 -1
- package/.turbo/cache/1b653bcfa2eef748.tar.zst +0 -0
- package/.turbo/cache/24cb18ffa2f611b1-meta.json +0 -1
- package/.turbo/cache/24cb18ffa2f611b1.tar.zst +0 -0
- package/.turbo/cache/4f81392ada08f240-meta.json +0 -1
- package/.turbo/cache/59481fd7f6f355ed-meta.json +0 -1
- package/.turbo/cache/59481fd7f6f355ed.tar.zst +0 -0
- package/.turbo/cache/79c16437b6eb7e44-meta.json +0 -1
- package/.turbo/cache/79c16437b6eb7e44.tar.zst +0 -0
- package/.turbo/cache/8388331cc15d7fd2-meta.json +0 -1
- package/.turbo/cache/8c637a8d4c2166c5-meta.json +0 -1
- package/.turbo/cache/8c637a8d4c2166c5.tar.zst +0 -0
- package/.turbo/cache/8f94ccea023ee254-meta.json +0 -1
- package/.turbo/cache/9337429c745d33f9-meta.json +0 -1
- package/.turbo/cache/a5717ca784f036bc-meta.json +0 -1
- package/.turbo/cache/a5717ca784f036bc.tar.zst +0 -0
- package/.turbo/cache/a7dea1f1ae1fdc27-meta.json +0 -1
- package/.turbo/cache/a7dea1f1ae1fdc27.tar.zst +0 -0
- package/.turbo/cache/abfc52db26c84ceb-meta.json +0 -1
- package/.turbo/cache/abfc52db26c84ceb.tar.zst +0 -0
- package/.turbo/cache/b7aefb222b98306d-meta.json +0 -1
- package/.turbo/cache/c13e85d809af02f6-meta.json +0 -1
- package/.turbo/cache/c89150633a136dc8-meta.json +0 -1
- package/.turbo/cache/cdb0e45299352fce-meta.json +0 -1
- package/.turbo/cache/df379f765f10ec9c-meta.json +0 -1
- package/.turbo/cache/df379f765f10ec9c.tar.zst +0 -0
- package/.turbo/cache/e95b9e3b7f35e801-meta.json +0 -1
- package/.turbo/cache/e95b9e3b7f35e801.tar.zst +0 -0
- package/.turbo/cache/fb3845d2ca66fee8-meta.json +0 -1
- package/.turbo/cache/fb3845d2ca66fee8.tar.zst +0 -0
- /package/.turbo/cache/{b7aefb222b98306d.tar.zst → 7593109ea54e7505.tar.zst} +0 -0
- /package/.turbo/cache/{8388331cc15d7fd2.tar.zst → 7629bef0037115af.tar.zst} +0 -0
- /package/.turbo/cache/{0b59b3b61897d950.tar.zst → ed455be2856be7ac.tar.zst} +0 -0
- /package/.turbo/cache/{c89150633a136dc8.tar.zst → f473f3d9902768db.tar.zst} +0 -0
|
@@ -155,6 +155,8 @@ class AuroForm extends r {
|
|
|
155
155
|
// Bind listeners
|
|
156
156
|
this.reset = this.reset.bind(this);
|
|
157
157
|
this.submit = this.submit.bind(this);
|
|
158
|
+
this.sharedInputListener = this.sharedInputListener.bind(this);
|
|
159
|
+
this.sharedValidationListener = this.sharedValidationListener.bind(this);
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
// Note: button is NOT considered a form element in this context
|
|
@@ -164,7 +166,12 @@ class AuroForm extends r {
|
|
|
164
166
|
'auro-input',
|
|
165
167
|
'auro-select',
|
|
166
168
|
'auro-datepicker',
|
|
169
|
+
'auro-combobox',
|
|
170
|
+
// checkbox and radio are grouped elements
|
|
167
171
|
'auro-checkbox-group',
|
|
172
|
+
'auro-radio-group',
|
|
173
|
+
// while counter is groupable, the group is for min/max values and not for grouped values
|
|
174
|
+
'auro-counter-group'
|
|
168
175
|
];
|
|
169
176
|
}
|
|
170
177
|
|
|
@@ -199,6 +206,18 @@ class AuroForm extends r {
|
|
|
199
206
|
return this._isInElementCollection(AuroForm.formElementTags, element);
|
|
200
207
|
}
|
|
201
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Validates if an event is from a valid form element with a name.
|
|
211
|
+
* @param {Event} event - The event to validate.
|
|
212
|
+
* @returns {boolean} - True if event is valid for processing.
|
|
213
|
+
* @private
|
|
214
|
+
*/
|
|
215
|
+
_eventIsValidFormEvent(event) {
|
|
216
|
+
const targetName = event.target.getAttribute("name");
|
|
217
|
+
return this.isFormElement(event.target) && targetName;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
|
|
202
221
|
static get buttonElementTags() {
|
|
203
222
|
return [
|
|
204
223
|
'button',
|
|
@@ -358,7 +377,7 @@ class AuroForm extends r {
|
|
|
358
377
|
}
|
|
359
378
|
|
|
360
379
|
this.formState[targetName] = {
|
|
361
|
-
value: element.getAttribute('value'),
|
|
380
|
+
value: element.value || element.getAttribute('value'),
|
|
362
381
|
validity: element.validity || null,
|
|
363
382
|
required: element.hasAttribute('required'),
|
|
364
383
|
// element
|
|
@@ -466,48 +485,69 @@ class AuroForm extends r {
|
|
|
466
485
|
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroForm);
|
|
467
486
|
}
|
|
468
487
|
|
|
469
|
-
|
|
470
|
-
|
|
488
|
+
/**
|
|
489
|
+
* Shared input listener for all form elements.
|
|
490
|
+
* @param {Event} event - The event that is fired from the form element.
|
|
491
|
+
*/
|
|
492
|
+
sharedInputListener(event) {
|
|
493
|
+
const targetName = event.target.getAttribute("name");
|
|
471
494
|
|
|
472
|
-
|
|
495
|
+
// This should only happen if some bubble-up event is fired from inside a form element.
|
|
496
|
+
if (!this._eventIsValidFormEvent(event)) {
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
473
499
|
|
|
474
|
-
//
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
500
|
+
// Occasionally, a form element will emit their event before the form can read data about the form element.
|
|
501
|
+
if (!this.formState[targetName] && this.isFormElement(event.target)) {
|
|
502
|
+
this._addElementToState(event.target);
|
|
503
|
+
}
|
|
480
504
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
505
|
+
// Check special input types and handle their edge cases
|
|
506
|
+
if (this._isElementTag('auro-datepicker', event.target) && event.target.hasAttribute('range')) {
|
|
507
|
+
this.formState[targetName].value = event.target.values;
|
|
508
|
+
this.requestUpdate('formState');
|
|
509
|
+
} else {
|
|
510
|
+
this.formState[targetName].value = event.target.value;
|
|
511
|
+
this.requestUpdate('formState');
|
|
512
|
+
}
|
|
513
|
+
}
|
|
485
514
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
}
|
|
515
|
+
/**
|
|
516
|
+
* Shared validation listener for all form elements.
|
|
517
|
+
* @param {Event} event - The event that is fired from the form element.
|
|
518
|
+
*/
|
|
519
|
+
sharedValidationListener(event) {
|
|
520
|
+
const targetName = event.target.getAttribute("name");
|
|
521
|
+
if (!this._eventIsValidFormEvent(event)) {
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
495
524
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
525
|
+
if (!this.formState[targetName]) {
|
|
526
|
+
this._addElementToState(event.target);
|
|
527
|
+
}
|
|
501
528
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
529
|
+
this.formState[targetName].validity = event.detail.validity;
|
|
530
|
+
this._calculateValidity();
|
|
531
|
+
}
|
|
505
532
|
|
|
506
|
-
|
|
507
|
-
|
|
533
|
+
_attachEventListeners() {
|
|
534
|
+
this.queryAuroElements().forEach((element) => {
|
|
535
|
+
// remove any existing event listeners (in case of re-initialization)
|
|
536
|
+
element.removeEventListener('input', this.sharedInputListener);
|
|
537
|
+
element.removeEventListener('auroFormElement-validated', this.sharedValidationListener);
|
|
538
|
+
|
|
539
|
+
// add new event listeners
|
|
540
|
+
element.addEventListener('input', this.sharedInputListener);
|
|
541
|
+
element.addEventListener('auroFormElement-validated', this.sharedValidationListener);
|
|
508
542
|
});
|
|
509
543
|
}
|
|
510
544
|
|
|
545
|
+
firstUpdated(_changedProperties) {
|
|
546
|
+
super.firstUpdated(_changedProperties);
|
|
547
|
+
|
|
548
|
+
this._attachEventListeners();
|
|
549
|
+
}
|
|
550
|
+
|
|
511
551
|
updated(_changedProperties) {
|
|
512
552
|
super.updated(_changedProperties);
|
|
513
553
|
|
|
@@ -525,6 +565,8 @@ class AuroForm extends r {
|
|
|
525
565
|
|
|
526
566
|
onSlotChange() {
|
|
527
567
|
this.initializeState();
|
|
568
|
+
// Safe to call as we remove and re-add event listeners
|
|
569
|
+
this._attachEventListeners();
|
|
528
570
|
}
|
|
529
571
|
|
|
530
572
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -68,6 +68,8 @@ export class AuroForm extends LitElement {
|
|
|
68
68
|
// Bind listeners
|
|
69
69
|
this.reset = this.reset.bind(this);
|
|
70
70
|
this.submit = this.submit.bind(this);
|
|
71
|
+
this.sharedInputListener = this.sharedInputListener.bind(this);
|
|
72
|
+
this.sharedValidationListener = this.sharedValidationListener.bind(this);
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
// Note: button is NOT considered a form element in this context
|
|
@@ -77,7 +79,12 @@ export class AuroForm extends LitElement {
|
|
|
77
79
|
'auro-input',
|
|
78
80
|
'auro-select',
|
|
79
81
|
'auro-datepicker',
|
|
82
|
+
'auro-combobox',
|
|
83
|
+
// checkbox and radio are grouped elements
|
|
80
84
|
'auro-checkbox-group',
|
|
85
|
+
'auro-radio-group',
|
|
86
|
+
// while counter is groupable, the group is for min/max values and not for grouped values
|
|
87
|
+
'auro-counter-group'
|
|
81
88
|
];
|
|
82
89
|
}
|
|
83
90
|
|
|
@@ -112,6 +119,18 @@ export class AuroForm extends LitElement {
|
|
|
112
119
|
return this._isInElementCollection(AuroForm.formElementTags, element);
|
|
113
120
|
}
|
|
114
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Validates if an event is from a valid form element with a name.
|
|
124
|
+
* @param {Event} event - The event to validate.
|
|
125
|
+
* @returns {boolean} - True if event is valid for processing.
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
_eventIsValidFormEvent(event) {
|
|
129
|
+
const targetName = event.target.getAttribute("name");
|
|
130
|
+
return this.isFormElement(event.target) && targetName;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
115
134
|
static get buttonElementTags() {
|
|
116
135
|
return [
|
|
117
136
|
'button',
|
|
@@ -271,7 +290,7 @@ export class AuroForm extends LitElement {
|
|
|
271
290
|
}
|
|
272
291
|
|
|
273
292
|
this.formState[targetName] = {
|
|
274
|
-
value: element.getAttribute('value'),
|
|
293
|
+
value: element.value || element.getAttribute('value'),
|
|
275
294
|
validity: element.validity || null,
|
|
276
295
|
required: element.hasAttribute('required'),
|
|
277
296
|
// element
|
|
@@ -379,48 +398,69 @@ export class AuroForm extends LitElement {
|
|
|
379
398
|
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroForm);
|
|
380
399
|
}
|
|
381
400
|
|
|
382
|
-
|
|
383
|
-
|
|
401
|
+
/**
|
|
402
|
+
* Shared input listener for all form elements.
|
|
403
|
+
* @param {Event} event - The event that is fired from the form element.
|
|
404
|
+
*/
|
|
405
|
+
sharedInputListener(event) {
|
|
406
|
+
const targetName = event.target.getAttribute("name");
|
|
384
407
|
|
|
385
|
-
|
|
408
|
+
// This should only happen if some bubble-up event is fired from inside a form element.
|
|
409
|
+
if (!this._eventIsValidFormEvent(event)) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
386
412
|
|
|
387
|
-
//
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
413
|
+
// Occasionally, a form element will emit their event before the form can read data about the form element.
|
|
414
|
+
if (!this.formState[targetName] && this.isFormElement(event.target)) {
|
|
415
|
+
this._addElementToState(event.target);
|
|
416
|
+
}
|
|
393
417
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
418
|
+
// Check special input types and handle their edge cases
|
|
419
|
+
if (this._isElementTag('auro-datepicker', event.target) && event.target.hasAttribute('range')) {
|
|
420
|
+
this.formState[targetName].value = event.target.values;
|
|
421
|
+
this.requestUpdate('formState');
|
|
422
|
+
} else {
|
|
423
|
+
this.formState[targetName].value = event.target.value;
|
|
424
|
+
this.requestUpdate('formState');
|
|
425
|
+
}
|
|
426
|
+
}
|
|
398
427
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
428
|
+
/**
|
|
429
|
+
* Shared validation listener for all form elements.
|
|
430
|
+
* @param {Event} event - The event that is fired from the form element.
|
|
431
|
+
*/
|
|
432
|
+
sharedValidationListener(event) {
|
|
433
|
+
const targetName = event.target.getAttribute("name");
|
|
434
|
+
if (!this._eventIsValidFormEvent(event)) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
408
437
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
438
|
+
if (!this.formState[targetName]) {
|
|
439
|
+
this._addElementToState(event.target);
|
|
440
|
+
}
|
|
414
441
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
442
|
+
this.formState[targetName].validity = event.detail.validity;
|
|
443
|
+
this._calculateValidity();
|
|
444
|
+
}
|
|
418
445
|
|
|
419
|
-
|
|
420
|
-
|
|
446
|
+
_attachEventListeners() {
|
|
447
|
+
this.queryAuroElements().forEach((element) => {
|
|
448
|
+
// remove any existing event listeners (in case of re-initialization)
|
|
449
|
+
element.removeEventListener('input', this.sharedInputListener);
|
|
450
|
+
element.removeEventListener('auroFormElement-validated', this.sharedValidationListener);
|
|
451
|
+
|
|
452
|
+
// add new event listeners
|
|
453
|
+
element.addEventListener('input', this.sharedInputListener);
|
|
454
|
+
element.addEventListener('auroFormElement-validated', this.sharedValidationListener);
|
|
421
455
|
});
|
|
422
456
|
}
|
|
423
457
|
|
|
458
|
+
firstUpdated(_changedProperties) {
|
|
459
|
+
super.firstUpdated(_changedProperties);
|
|
460
|
+
|
|
461
|
+
this._attachEventListeners();
|
|
462
|
+
}
|
|
463
|
+
|
|
424
464
|
updated(_changedProperties) {
|
|
425
465
|
super.updated(_changedProperties);
|
|
426
466
|
|
|
@@ -438,6 +478,8 @@ export class AuroForm extends LitElement {
|
|
|
438
478
|
|
|
439
479
|
onSlotChange() {
|
|
440
480
|
this.initializeState();
|
|
481
|
+
// Safe to call as we remove and re-add event listeners
|
|
482
|
+
this._attachEventListeners();
|
|
441
483
|
}
|
|
442
484
|
|
|
443
485
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -42,7 +42,7 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
42
42
|
|
|
43
43
|
[36m
|
|
44
44
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
45
|
-
[32mcreated [1mdist[22m in [
|
|
45
|
+
[32mcreated [1mdist[22m in [1m171ms[22m[39m
|
|
46
46
|
|
|
47
47
|
> @aurodesignsystem/auro-helptext@1.0.0 types
|
|
48
48
|
> tsc --project tsconfig.json
|
|
@@ -206,13 +206,13 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
206
206
|
|
|
207
207
|
[36m
|
|
208
208
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
209
|
-
[32mcreated [1mdist[22m in [1m1.
|
|
209
|
+
[32mcreated [1mdist[22m in [1m1.2s[22m[39m
|
|
210
210
|
[36m
|
|
211
211
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
212
|
-
[32mcreated [1m./demo/[22m in [
|
|
212
|
+
[32mcreated [1m./demo/[22m in [1m775ms[22m[39m
|
|
213
213
|
[36m
|
|
214
214
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
215
|
-
[32mcreated [1m./demo/[22m in [
|
|
215
|
+
[32mcreated [1m./demo/[22m in [1m678ms[22m[39m
|
|
216
216
|
|
|
217
217
|
> @aurodesignsystem/auro-input@4.2.0 build:docs
|
|
218
218
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component input
|
|
@@ -89,7 +89,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
89
89
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
90
90
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
|
|
91
91
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
92
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.
|
|
92
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.32/dist/auro-input__bundled.js" type="module"></script>
|
|
93
93
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
94
94
|
|
|
95
95
|
## auro-input use cases
|
|
@@ -101,13 +101,13 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
101
101
|
|
|
102
102
|
[36m
|
|
103
103
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
104
|
-
[32mcreated [1mdist[22m in [
|
|
104
|
+
[32mcreated [1mdist[22m in [1m292ms[22m[39m
|
|
105
105
|
[36m
|
|
106
106
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
107
|
-
[32mcreated [1m./demo/[22m in [
|
|
107
|
+
[32mcreated [1m./demo/[22m in [1m269ms[22m[39m
|
|
108
108
|
[36m
|
|
109
109
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
110
|
-
[32mcreated [1m./demo/[22m in [
|
|
110
|
+
[32mcreated [1m./demo/[22m in [1m204ms[22m[39m
|
|
111
111
|
|
|
112
112
|
> @aurodesignsystem/auro-menu@4.1.4 build:docs
|
|
113
113
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component menu
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[36m
|
|
6
6
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
7
|
-
[32mcreated [1mdist[22m in [
|
|
7
|
+
[32mcreated [1mdist[22m in [1m726ms[22m[39m
|
|
8
8
|
[36m
|
|
9
9
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
10
|
-
[32mcreated [1m./demo/[22m in [
|
|
10
|
+
[32mcreated [1m./demo/[22m in [1m345ms[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
13
|
-
[32mcreated [1m./demo/[22m in [
|
|
13
|
+
[32mcreated [1m./demo/[22m in [1m242ms[22m[39m
|
|
@@ -100,7 +100,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
100
100
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
101
101
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
|
|
102
102
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
103
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.
|
|
103
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.32/dist/auro-menu__bundled.js" type="module"></script>
|
|
104
104
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
105
|
|
|
106
106
|
## auro-menu use cases
|
|
@@ -138,13 +138,13 @@ Run in verbose mode to see all warnings.
|
|
|
138
138
|
|
|
139
139
|
[36m
|
|
140
140
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
141
|
-
[32mcreated [1mdist[22m in [
|
|
141
|
+
[32mcreated [1mdist[22m in [1m815ms[22m[39m
|
|
142
142
|
[36m
|
|
143
143
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
144
|
-
[32mcreated [1m./demo/[22m in [
|
|
144
|
+
[32mcreated [1m./demo/[22m in [1m741ms[22m[39m
|
|
145
145
|
[36m
|
|
146
146
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
147
|
-
[32mcreated [1m./demo/[22m in [
|
|
147
|
+
[32mcreated [1m./demo/[22m in [1m503ms[22m[39m
|
|
148
148
|
|
|
149
149
|
> @aurodesignsystem/auro-radio@4.1.1 build:docs
|
|
150
150
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component radio
|
|
@@ -90,7 +90,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
90
90
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
91
91
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.9.2/dist/tokens/CSSCustomProperties.css" />
|
|
92
92
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
93
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-radio@2.0.0-beta.
|
|
93
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-radio@2.0.0-beta.32/dist/auro-radio__bundled.js" type="module"></script>
|
|
94
94
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
95
95
|
|
|
96
96
|
## auro-radio use cases
|
|
@@ -137,13 +137,13 @@ More info and automated migrator: https://sass-lang.com/d/import
|
|
|
137
137
|
|
|
138
138
|
[36m
|
|
139
139
|
[1m./src/index.js[22m → [1mdist[22m...[39m
|
|
140
|
-
[32mcreated [1mdist[22m in [
|
|
140
|
+
[32mcreated [1mdist[22m in [1m939ms[22m[39m
|
|
141
141
|
[36m
|
|
142
142
|
[1m./demo/index.js[22m → [1m./demo/[22m...[39m
|
|
143
|
-
[32mcreated [1m./demo/[22m in [
|
|
143
|
+
[32mcreated [1m./demo/[22m in [1m970ms[22m[39m
|
|
144
144
|
[36m
|
|
145
145
|
[1m./demo/api.js[22m → [1m./demo/[22m...[39m
|
|
146
|
-
[32mcreated [1m./demo/[22m in [
|
|
146
|
+
[32mcreated [1m./demo/[22m in [1m874ms[22m[39m
|
|
147
147
|
|
|
148
148
|
> @aurodesignsystem/auro-select@3.3.0 build:docs
|
|
149
149
|
> wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component select
|
|
@@ -99,9 +99,9 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
99
99
|
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
100
100
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
|
|
101
101
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
102
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.
|
|
103
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.
|
|
104
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-select@2.0.0-beta.
|
|
102
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.32/dist/auro-dropdown__bundled.js" type="module"></script>
|
|
103
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.32/dist/auro-menu__bundled.js" type="module"></script>
|
|
104
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-select@2.0.0-beta.32/dist/auro-select__bundled.js" type="module"></script>
|
|
105
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
106
|
|
|
107
107
|
## auro-select use cases
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"0b59b3b61897d950","duration":5706}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"1215c5e3dd25e0c3","duration":4933}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"13ff0d757be18ae9","duration":13673}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"1b653bcfa2eef748","duration":822}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"24cb18ffa2f611b1","duration":1277}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"4f81392ada08f240","duration":1778}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"59481fd7f6f355ed","duration":3037}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"79c16437b6eb7e44","duration":13329}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"8388331cc15d7fd2","duration":6010}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"8c637a8d4c2166c5","duration":2515}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"8f94ccea023ee254","duration":14185}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"9337429c745d33f9","duration":25020}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"a5717ca784f036bc","duration":5937}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"a7dea1f1ae1fdc27","duration":1958}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"abfc52db26c84ceb","duration":14702}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"b7aefb222b98306d","duration":819}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"c13e85d809af02f6","duration":2059}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"c89150633a136dc8","duration":639}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"cdb0e45299352fce","duration":14196}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"df379f765f10ec9c","duration":14632}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"e95b9e3b7f35e801","duration":15202}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"fb3845d2ca66fee8","duration":16012}
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|