@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
|
@@ -758,7 +758,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
758
758
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
759
759
|
*/
|
|
760
760
|
|
|
761
|
-
let hasValue =
|
|
761
|
+
let hasValue = false;
|
|
762
|
+
|
|
763
|
+
// Check string for having a value
|
|
764
|
+
if (typeof elem.value === "string") {
|
|
765
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
// Check array value types for having a value
|
|
769
|
+
if (Array.isArray(elem.value)) {
|
|
770
|
+
hasValue = Boolean(
|
|
771
|
+
elem.value.length > 0 &&
|
|
772
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
773
|
+
);
|
|
774
|
+
}
|
|
762
775
|
|
|
763
776
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
764
777
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -20736,7 +20749,20 @@ class AuroFormValidation {
|
|
|
20736
20749
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
20737
20750
|
*/
|
|
20738
20751
|
|
|
20739
|
-
let hasValue =
|
|
20752
|
+
let hasValue = false;
|
|
20753
|
+
|
|
20754
|
+
// Check string for having a value
|
|
20755
|
+
if (typeof elem.value === "string") {
|
|
20756
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
20757
|
+
}
|
|
20758
|
+
|
|
20759
|
+
// Check array value types for having a value
|
|
20760
|
+
if (Array.isArray(elem.value)) {
|
|
20761
|
+
hasValue = Boolean(
|
|
20762
|
+
elem.value.length > 0 &&
|
|
20763
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
20764
|
+
);
|
|
20765
|
+
}
|
|
20740
20766
|
|
|
20741
20767
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
20742
20768
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -20850,6 +20876,9 @@ class AuroFormValidation {
|
|
|
20850
20876
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
20851
20877
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
20852
20878
|
*
|
|
20879
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
20880
|
+
* @attr id
|
|
20881
|
+
*
|
|
20853
20882
|
* @slot helptext - Sets the help text displayed below the input.
|
|
20854
20883
|
* @slot label - Sets the label text for the input.
|
|
20855
20884
|
*
|
|
@@ -21040,13 +21069,6 @@ class BaseInput extends i$2 {
|
|
|
21040
21069
|
reflect: true
|
|
21041
21070
|
},
|
|
21042
21071
|
|
|
21043
|
-
/**
|
|
21044
|
-
* Sets the unique ID of the element.
|
|
21045
|
-
*/
|
|
21046
|
-
id: {
|
|
21047
|
-
type: String
|
|
21048
|
-
},
|
|
21049
|
-
|
|
21050
21072
|
/** Exposes inputmode attribute for input. */
|
|
21051
21073
|
inputmode: {
|
|
21052
21074
|
type: String,
|
|
@@ -21267,6 +21289,16 @@ class BaseInput extends i$2 {
|
|
|
21267
21289
|
type: Boolean,
|
|
21268
21290
|
reflect: true,
|
|
21269
21291
|
attribute: false
|
|
21292
|
+
},
|
|
21293
|
+
|
|
21294
|
+
/**
|
|
21295
|
+
* @private
|
|
21296
|
+
* id for input node
|
|
21297
|
+
*/
|
|
21298
|
+
inputId: {
|
|
21299
|
+
type: String,
|
|
21300
|
+
reflect: false,
|
|
21301
|
+
attribute: false
|
|
21270
21302
|
}
|
|
21271
21303
|
};
|
|
21272
21304
|
}
|
|
@@ -21298,6 +21330,7 @@ class BaseInput extends i$2 {
|
|
|
21298
21330
|
if (this.tagName.toLowerCase() !== 'auro-input') {
|
|
21299
21331
|
this.setAttribute('auro-input', true);
|
|
21300
21332
|
}
|
|
21333
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
21301
21334
|
|
|
21302
21335
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
21303
21336
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
@@ -22963,7 +22996,7 @@ class AuroInput extends BaseInput {
|
|
|
22963
22996
|
: undefined
|
|
22964
22997
|
}
|
|
22965
22998
|
</div>
|
|
22966
|
-
<label for=${this.
|
|
22999
|
+
<label for=${this.inputId} class="${e(labelClasses)}" part="label">
|
|
22967
23000
|
<slot name="label">
|
|
22968
23001
|
${this.label}
|
|
22969
23002
|
</slot>
|
|
@@ -22973,7 +23006,7 @@ class AuroInput extends BaseInput {
|
|
|
22973
23006
|
@input="${this.handleInput}"
|
|
22974
23007
|
@focusin="${this.handleFocusin}"
|
|
22975
23008
|
@blur="${this.handleBlur}"
|
|
22976
|
-
id="${this.
|
|
23009
|
+
id="${this.inputId}"
|
|
22977
23010
|
name="${o(this.name)}"
|
|
22978
23011
|
type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}"
|
|
22979
23012
|
pattern="${o(this.definePattern())}"
|
|
@@ -23041,7 +23074,7 @@ class AuroInput extends BaseInput {
|
|
|
23041
23074
|
variant="flat"
|
|
23042
23075
|
?onDark="${this.onDark}"
|
|
23043
23076
|
class="notificationBtn clearBtn"
|
|
23044
|
-
|
|
23077
|
+
arialabel="${i18n(this.lang, 'clearInput')}"
|
|
23045
23078
|
@click="${this.handleClickClear}">
|
|
23046
23079
|
<${this.iconTag}
|
|
23047
23080
|
customColor
|
|
@@ -732,7 +732,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
732
732
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
733
733
|
*/
|
|
734
734
|
|
|
735
|
-
let hasValue =
|
|
735
|
+
let hasValue = false;
|
|
736
|
+
|
|
737
|
+
// Check string for having a value
|
|
738
|
+
if (typeof elem.value === "string") {
|
|
739
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Check array value types for having a value
|
|
743
|
+
if (Array.isArray(elem.value)) {
|
|
744
|
+
hasValue = Boolean(
|
|
745
|
+
elem.value.length > 0 &&
|
|
746
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
747
|
+
);
|
|
748
|
+
}
|
|
736
749
|
|
|
737
750
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
738
751
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -20672,7 +20685,20 @@ class AuroFormValidation {
|
|
|
20672
20685
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
20673
20686
|
*/
|
|
20674
20687
|
|
|
20675
|
-
let hasValue =
|
|
20688
|
+
let hasValue = false;
|
|
20689
|
+
|
|
20690
|
+
// Check string for having a value
|
|
20691
|
+
if (typeof elem.value === "string") {
|
|
20692
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
20693
|
+
}
|
|
20694
|
+
|
|
20695
|
+
// Check array value types for having a value
|
|
20696
|
+
if (Array.isArray(elem.value)) {
|
|
20697
|
+
hasValue = Boolean(
|
|
20698
|
+
elem.value.length > 0 &&
|
|
20699
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
20700
|
+
);
|
|
20701
|
+
}
|
|
20676
20702
|
|
|
20677
20703
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
20678
20704
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -20786,6 +20812,9 @@ class AuroFormValidation {
|
|
|
20786
20812
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
20787
20813
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
20788
20814
|
*
|
|
20815
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
20816
|
+
* @attr id
|
|
20817
|
+
*
|
|
20789
20818
|
* @slot helptext - Sets the help text displayed below the input.
|
|
20790
20819
|
* @slot label - Sets the label text for the input.
|
|
20791
20820
|
*
|
|
@@ -20976,13 +21005,6 @@ class BaseInput extends LitElement {
|
|
|
20976
21005
|
reflect: true
|
|
20977
21006
|
},
|
|
20978
21007
|
|
|
20979
|
-
/**
|
|
20980
|
-
* Sets the unique ID of the element.
|
|
20981
|
-
*/
|
|
20982
|
-
id: {
|
|
20983
|
-
type: String
|
|
20984
|
-
},
|
|
20985
|
-
|
|
20986
21008
|
/** Exposes inputmode attribute for input. */
|
|
20987
21009
|
inputmode: {
|
|
20988
21010
|
type: String,
|
|
@@ -21203,6 +21225,16 @@ class BaseInput extends LitElement {
|
|
|
21203
21225
|
type: Boolean,
|
|
21204
21226
|
reflect: true,
|
|
21205
21227
|
attribute: false
|
|
21228
|
+
},
|
|
21229
|
+
|
|
21230
|
+
/**
|
|
21231
|
+
* @private
|
|
21232
|
+
* id for input node
|
|
21233
|
+
*/
|
|
21234
|
+
inputId: {
|
|
21235
|
+
type: String,
|
|
21236
|
+
reflect: false,
|
|
21237
|
+
attribute: false
|
|
21206
21238
|
}
|
|
21207
21239
|
};
|
|
21208
21240
|
}
|
|
@@ -21234,6 +21266,7 @@ class BaseInput extends LitElement {
|
|
|
21234
21266
|
if (this.tagName.toLowerCase() !== 'auro-input') {
|
|
21235
21267
|
this.setAttribute('auro-input', true);
|
|
21236
21268
|
}
|
|
21269
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
21237
21270
|
|
|
21238
21271
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
21239
21272
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
@@ -22899,7 +22932,7 @@ class AuroInput extends BaseInput {
|
|
|
22899
22932
|
: undefined
|
|
22900
22933
|
}
|
|
22901
22934
|
</div>
|
|
22902
|
-
<label for=${this.
|
|
22935
|
+
<label for=${this.inputId} class="${classMap(labelClasses)}" part="label">
|
|
22903
22936
|
<slot name="label">
|
|
22904
22937
|
${this.label}
|
|
22905
22938
|
</slot>
|
|
@@ -22909,7 +22942,7 @@ class AuroInput extends BaseInput {
|
|
|
22909
22942
|
@input="${this.handleInput}"
|
|
22910
22943
|
@focusin="${this.handleFocusin}"
|
|
22911
22944
|
@blur="${this.handleBlur}"
|
|
22912
|
-
id="${this.
|
|
22945
|
+
id="${this.inputId}"
|
|
22913
22946
|
name="${ifDefined(this.name)}"
|
|
22914
22947
|
type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}"
|
|
22915
22948
|
pattern="${ifDefined(this.definePattern())}"
|
|
@@ -22977,7 +23010,7 @@ class AuroInput extends BaseInput {
|
|
|
22977
23010
|
variant="flat"
|
|
22978
23011
|
?onDark="${this.onDark}"
|
|
22979
23012
|
class="notificationBtn clearBtn"
|
|
22980
|
-
|
|
23013
|
+
arialabel="${i18n(this.lang, 'clearInput')}"
|
|
22981
23014
|
@click="${this.handleClickClear}">
|
|
22982
23015
|
<${this.iconTag}
|
|
22983
23016
|
customColor
|
|
@@ -732,7 +732,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
732
732
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
733
733
|
*/
|
|
734
734
|
|
|
735
|
-
let hasValue =
|
|
735
|
+
let hasValue = false;
|
|
736
|
+
|
|
737
|
+
// Check string for having a value
|
|
738
|
+
if (typeof elem.value === "string") {
|
|
739
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Check array value types for having a value
|
|
743
|
+
if (Array.isArray(elem.value)) {
|
|
744
|
+
hasValue = Boolean(
|
|
745
|
+
elem.value.length > 0 &&
|
|
746
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
747
|
+
);
|
|
748
|
+
}
|
|
736
749
|
|
|
737
750
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
738
751
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -20672,7 +20685,20 @@ class AuroFormValidation {
|
|
|
20672
20685
|
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
20673
20686
|
*/
|
|
20674
20687
|
|
|
20675
|
-
let hasValue =
|
|
20688
|
+
let hasValue = false;
|
|
20689
|
+
|
|
20690
|
+
// Check string for having a value
|
|
20691
|
+
if (typeof elem.value === "string") {
|
|
20692
|
+
hasValue = elem.value && elem.value.length > 0;
|
|
20693
|
+
}
|
|
20694
|
+
|
|
20695
|
+
// Check array value types for having a value
|
|
20696
|
+
if (Array.isArray(elem.value)) {
|
|
20697
|
+
hasValue = Boolean(
|
|
20698
|
+
elem.value.length > 0 &&
|
|
20699
|
+
elem.value.some((value) => typeof value === "string" && value.length > 0)
|
|
20700
|
+
);
|
|
20701
|
+
}
|
|
20676
20702
|
|
|
20677
20703
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
20678
20704
|
if (this.auroInputElements?.length === 2) {
|
|
@@ -20786,6 +20812,9 @@ class AuroFormValidation {
|
|
|
20786
20812
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
20787
20813
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
20788
20814
|
*
|
|
20815
|
+
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
20816
|
+
* @attr id
|
|
20817
|
+
*
|
|
20789
20818
|
* @slot helptext - Sets the help text displayed below the input.
|
|
20790
20819
|
* @slot label - Sets the label text for the input.
|
|
20791
20820
|
*
|
|
@@ -20976,13 +21005,6 @@ class BaseInput extends LitElement {
|
|
|
20976
21005
|
reflect: true
|
|
20977
21006
|
},
|
|
20978
21007
|
|
|
20979
|
-
/**
|
|
20980
|
-
* Sets the unique ID of the element.
|
|
20981
|
-
*/
|
|
20982
|
-
id: {
|
|
20983
|
-
type: String
|
|
20984
|
-
},
|
|
20985
|
-
|
|
20986
21008
|
/** Exposes inputmode attribute for input. */
|
|
20987
21009
|
inputmode: {
|
|
20988
21010
|
type: String,
|
|
@@ -21203,6 +21225,16 @@ class BaseInput extends LitElement {
|
|
|
21203
21225
|
type: Boolean,
|
|
21204
21226
|
reflect: true,
|
|
21205
21227
|
attribute: false
|
|
21228
|
+
},
|
|
21229
|
+
|
|
21230
|
+
/**
|
|
21231
|
+
* @private
|
|
21232
|
+
* id for input node
|
|
21233
|
+
*/
|
|
21234
|
+
inputId: {
|
|
21235
|
+
type: String,
|
|
21236
|
+
reflect: false,
|
|
21237
|
+
attribute: false
|
|
21206
21238
|
}
|
|
21207
21239
|
};
|
|
21208
21240
|
}
|
|
@@ -21234,6 +21266,7 @@ class BaseInput extends LitElement {
|
|
|
21234
21266
|
if (this.tagName.toLowerCase() !== 'auro-input') {
|
|
21235
21267
|
this.setAttribute('auro-input', true);
|
|
21236
21268
|
}
|
|
21269
|
+
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
21237
21270
|
|
|
21238
21271
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
21239
21272
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
@@ -22899,7 +22932,7 @@ class AuroInput extends BaseInput {
|
|
|
22899
22932
|
: undefined
|
|
22900
22933
|
}
|
|
22901
22934
|
</div>
|
|
22902
|
-
<label for=${this.
|
|
22935
|
+
<label for=${this.inputId} class="${classMap(labelClasses)}" part="label">
|
|
22903
22936
|
<slot name="label">
|
|
22904
22937
|
${this.label}
|
|
22905
22938
|
</slot>
|
|
@@ -22909,7 +22942,7 @@ class AuroInput extends BaseInput {
|
|
|
22909
22942
|
@input="${this.handleInput}"
|
|
22910
22943
|
@focusin="${this.handleFocusin}"
|
|
22911
22944
|
@blur="${this.handleBlur}"
|
|
22912
|
-
id="${this.
|
|
22945
|
+
id="${this.inputId}"
|
|
22913
22946
|
name="${ifDefined(this.name)}"
|
|
22914
22947
|
type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}"
|
|
22915
22948
|
pattern="${ifDefined(this.definePattern())}"
|
|
@@ -22977,7 +23010,7 @@ class AuroInput extends BaseInput {
|
|
|
22977
23010
|
variant="flat"
|
|
22978
23011
|
?onDark="${this.onDark}"
|
|
22979
23012
|
class="notificationBtn clearBtn"
|
|
22980
|
-
|
|
23013
|
+
arialabel="${i18n(this.lang, 'clearInput')}"
|
|
22981
23014
|
@click="${this.handleClickClear}">
|
|
22982
23015
|
<${this.iconTag}
|
|
22983
23016
|
customColor
|
|
@@ -19,9 +19,8 @@ The auro-form element provides users a way to ... (it would be great if you fill
|
|
|
19
19
|
| [formState](#formState) | | `FormState` | {} | |
|
|
20
20
|
| [isInitialState](#isInitialState) | readonly | `boolean` | | Mostly internal way to determine if a form is in the initial state. |
|
|
21
21
|
| [mutationEventListener](#mutationEventListener) | | | | |
|
|
22
|
-
| [mutationObservers](#mutationObservers) | | `MutationObserver[]` | [] | |
|
|
23
22
|
| [reset](#reset) | | | | |
|
|
24
|
-
| [resetElements](#resetElements) | readonly | `HTMLButtonElement[]` | |
|
|
23
|
+
| [resetElements](#resetElements) | readonly | `HTMLButtonElement[]` | | Returns a collection of elements that will reset the form |
|
|
25
24
|
| [sharedInputListener](#sharedInputListener) | | | | |
|
|
26
25
|
| [sharedValidationListener](#sharedValidationListener) | | | | |
|
|
27
26
|
| [submit](#submit) | | | | |
|
|
@@ -36,13 +35,10 @@ The auro-form element provides users a way to ... (it would be great if you fill
|
|
|
36
35
|
| [initializeState](#initializeState) | `(): void` | Initialize (or reinitialize) the form state. |
|
|
37
36
|
| [isButtonElement](#isButtonElement) | `(element: HTMLElement): boolean` | Check if the tag name is a button element.<br /><br />**element**: The element to check. |
|
|
38
37
|
| [isFormElement](#isFormElement) | `(element: HTMLElement): boolean` | Check if the tag name is a form element.<br /><br />**element**: The element to check (attr or tag name). |
|
|
39
|
-
| [mutationEventListener](#mutationEventListener) | `(): void` | Mutation observer for form elements. Slot change does not trigger unless<br />root-level elements are added/removed. This is a workaround to ensure<br />nested form elements are also observed. |
|
|
40
38
|
| [onSlotChange](#onSlotChange) | `(event: Event): void` | Slot change event listener. This is the main entry point for the form element.<br /><br />**event**: The slot change event. |
|
|
41
39
|
| [queryAuroElements](#queryAuroElements) | `(): NodeList` | Construct the query strings from elements, append them together, execute, and return the NodeList. |
|
|
42
40
|
| [reset](#reset) | `(): void` | Reset fires an event called `reset` - just as you would expect from a normal form. |
|
|
43
41
|
| [setDisabledStateOnButtons](#setDisabledStateOnButtons) | `(): void` | |
|
|
44
|
-
| [sharedInputListener](#sharedInputListener) | `(event: Event): void` | Shared input listener for all form elements.<br /><br />**event**: The event that is fired from the form element. |
|
|
45
|
-
| [sharedValidationListener](#sharedValidationListener) | `(event: Event): void` | Shared validation listener for all form elements.<br /><br />**event**: The event that is fired from the form element. |
|
|
46
42
|
| [submit](#submit) | `(): void` | Submit fires an event called `submit` - just as you would expect from a normal form. |
|
|
47
43
|
|
|
48
44
|
## Events
|
|
@@ -153,7 +153,10 @@ class AuroForm extends i {
|
|
|
153
153
|
/** @type {HTMLButtonElement[]} */
|
|
154
154
|
this._resetElements = [];
|
|
155
155
|
|
|
156
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* @private
|
|
158
|
+
* @type {MutationObserver[]}
|
|
159
|
+
*/
|
|
157
160
|
this.mutationObservers = [];
|
|
158
161
|
|
|
159
162
|
// Bind listeners
|
|
@@ -268,7 +271,7 @@ class AuroForm extends i {
|
|
|
268
271
|
}
|
|
269
272
|
|
|
270
273
|
/**
|
|
271
|
-
*
|
|
274
|
+
* Returns a collection of elements that will reset the form
|
|
272
275
|
* @returns {HTMLButtonElement[]}
|
|
273
276
|
*/
|
|
274
277
|
get resetElements() {
|
|
@@ -498,6 +501,7 @@ class AuroForm extends i {
|
|
|
498
501
|
|
|
499
502
|
/**
|
|
500
503
|
* Shared input listener for all form elements.
|
|
504
|
+
* @private
|
|
501
505
|
* @param {Event} event - The event that is fired from the form element.
|
|
502
506
|
*/
|
|
503
507
|
sharedInputListener(event) {
|
|
@@ -530,6 +534,7 @@ class AuroForm extends i {
|
|
|
530
534
|
|
|
531
535
|
/**
|
|
532
536
|
* Shared validation listener for all form elements.
|
|
537
|
+
* @private
|
|
533
538
|
* @param {Event} event - The event that is fired from the form element.
|
|
534
539
|
*/
|
|
535
540
|
sharedValidationListener(event) {
|
|
@@ -585,6 +590,7 @@ class AuroForm extends i {
|
|
|
585
590
|
* root-level elements are added/removed. This is a workaround to ensure
|
|
586
591
|
* nested form elements are also observed.
|
|
587
592
|
*
|
|
593
|
+
* @private
|
|
588
594
|
* @returns {void}
|
|
589
595
|
*/
|
|
590
596
|
mutationEventListener() {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
Prism.highlightAll();
|
|
42
42
|
});
|
|
43
43
|
</script>
|
|
44
|
+
<script type="module" data-demo-script="true" src="./registerDemoDeps.js"></script>
|
|
44
45
|
<script type="module" data-demo-script="true" src="./index.min.js"></script>
|
|
45
46
|
|
|
46
47
|
<!-- If additional elements are needed for the demo, add them here. -->
|