@aurodesignsystem-dev/auro-formkit 0.0.0-pr1514.12 → 0.0.0-pr1514.3
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/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +97 -121
- package/components/combobox/demo/getting-started.min.js +97 -121
- package/components/combobox/demo/index.min.js +97 -121
- package/components/combobox/dist/index.js +96 -120
- package/components/combobox/dist/registered.js +96 -120
- package/components/counter/demo/customize.min.js +3 -11
- package/components/counter/demo/index.min.js +3 -11
- package/components/counter/dist/index.js +3 -11
- package/components/counter/dist/registered.js +3 -11
- package/components/datepicker/demo/customize.min.js +135 -262
- package/components/datepicker/demo/index.min.js +135 -262
- package/components/datepicker/dist/auro-calendar-cell.d.ts +0 -6
- package/components/datepicker/dist/auro-calendar.d.ts +7 -26
- package/components/datepicker/dist/index.js +135 -262
- package/components/datepicker/dist/registered.js +135 -262
- package/components/dropdown/demo/customize.min.js +1 -2
- package/components/dropdown/demo/getting-started.min.js +1 -2
- package/components/dropdown/demo/index.min.js +1 -2
- package/components/dropdown/dist/index.js +1 -2
- package/components/dropdown/dist/registered.js +1 -2
- package/components/form/demo/customize.min.js +394 -700
- package/components/form/demo/getting-started.min.js +394 -700
- package/components/form/demo/index.min.js +394 -700
- package/components/form/demo/registerDemoDeps.min.js +394 -700
- package/components/input/demo/api.md +5 -5
- package/components/input/demo/customize.md +8 -8
- package/components/input/demo/customize.min.js +93 -116
- package/components/input/demo/getting-started.min.js +93 -116
- package/components/input/demo/index.min.js +93 -116
- package/components/input/dist/base-input.d.ts +44 -33
- package/components/input/dist/index.js +94 -129
- package/components/input/dist/registered.js +93 -116
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.md +0 -86
- package/components/select/demo/customize.min.js +63 -187
- package/components/select/demo/getting-started.min.js +110 -189
- package/components/select/demo/index.min.js +63 -187
- package/components/select/demo/keyboard-behavior.md +4 -18
- package/components/select/dist/auro-select.d.ts +8 -20
- package/components/select/dist/index.js +63 -187
- package/components/select/dist/registered.js +63 -187
- package/custom-elements.json +1791 -1997
- package/package.json +1 -1
|
@@ -10385,13 +10385,6 @@ class AuroInputUtilities {
|
|
|
10385
10385
|
* @returns {string | undefined}
|
|
10386
10386
|
*/
|
|
10387
10387
|
toFormattedValue(valueObject, format) {
|
|
10388
|
-
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
10389
|
-
// `format` argument has to fail gracefully rather than throw on
|
|
10390
|
-
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
10391
|
-
// as "no format → no display value".
|
|
10392
|
-
if (!format) {
|
|
10393
|
-
return undefined;
|
|
10394
|
-
}
|
|
10395
10388
|
const normalizedFormat = format.toLowerCase();
|
|
10396
10389
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
10397
10390
|
|
|
@@ -10542,18 +10535,79 @@ class BaseInput extends AuroElement {
|
|
|
10542
10535
|
constructor() {
|
|
10543
10536
|
super();
|
|
10544
10537
|
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10538
|
+
this.appearance = "default";
|
|
10539
|
+
this.disabled = false;
|
|
10540
|
+
this.layout = 'classic';
|
|
10541
|
+
this.locale = 'en-US';
|
|
10542
|
+
this.max = undefined;
|
|
10543
|
+
this._maxObject = undefined;
|
|
10544
|
+
this.maxLength = undefined;
|
|
10545
|
+
this.min = undefined;
|
|
10546
|
+
this._minObject = undefined;
|
|
10547
|
+
this.minLength = undefined;
|
|
10548
|
+
this.required = false;
|
|
10549
|
+
this.onDark = false;
|
|
10550
|
+
this.setCustomValidityForType = undefined;
|
|
10551
|
+
this.size = 'lg';
|
|
10552
|
+
this.shape = 'classic';
|
|
10553
|
+
this.value = undefined;
|
|
10554
|
+
this._valueObject = undefined;
|
|
10555
|
+
|
|
10556
|
+
this._initializePrivateDefaults();
|
|
10557
|
+
}
|
|
10558
|
+
|
|
10559
|
+
/**
|
|
10560
|
+
* Internal Defaults.
|
|
10561
|
+
* @private
|
|
10562
|
+
* @returns {void}
|
|
10563
|
+
*/
|
|
10564
|
+
_initializePrivateDefaults() {
|
|
10555
10565
|
this.activeLabel = false;
|
|
10556
|
-
|
|
10566
|
+
this.appearance = "default";
|
|
10567
|
+
this.icon = false;
|
|
10568
|
+
this.disabled = false;
|
|
10569
|
+
this.dvInputOnly = false;
|
|
10570
|
+
this.hideLabelVisually = false;
|
|
10571
|
+
this.max = undefined;
|
|
10572
|
+
this.maxLength = undefined;
|
|
10573
|
+
this.min = undefined;
|
|
10574
|
+
this.minLength = undefined;
|
|
10575
|
+
this.noValidate = false;
|
|
10576
|
+
this.onDark = false;
|
|
10577
|
+
this.required = false;
|
|
10578
|
+
this.setCustomValidityForType = undefined;
|
|
10579
|
+
|
|
10580
|
+
// Used for storing raw values returned from input mask.
|
|
10581
|
+
this._rawMaskValue = undefined;
|
|
10582
|
+
|
|
10583
|
+
/**
|
|
10584
|
+
* @private
|
|
10585
|
+
*/
|
|
10586
|
+
this.layout = 'classic';
|
|
10587
|
+
|
|
10588
|
+
/**
|
|
10589
|
+
* @private
|
|
10590
|
+
*/
|
|
10591
|
+
this.shape = 'classic';
|
|
10592
|
+
|
|
10593
|
+
/**
|
|
10594
|
+
* @private
|
|
10595
|
+
*/
|
|
10596
|
+
this.size = 'lg';
|
|
10597
|
+
|
|
10598
|
+
this.touched = false;
|
|
10599
|
+
this.util = new AuroInputUtilities({
|
|
10600
|
+
locale: "en-US",
|
|
10601
|
+
format: this.format
|
|
10602
|
+
});
|
|
10603
|
+
this.validation = new AuroFormValidation();
|
|
10604
|
+
this.inputIconName = undefined;
|
|
10605
|
+
this.showPassword = false;
|
|
10606
|
+
this.validationCCLength = undefined;
|
|
10607
|
+
this.hasValue = false;
|
|
10608
|
+
this.label = 'Input label is undefined';
|
|
10609
|
+
|
|
10610
|
+
|
|
10557
10611
|
this.allowedInputTypes = [
|
|
10558
10612
|
"text",
|
|
10559
10613
|
"number",
|
|
@@ -10562,8 +10616,7 @@ class BaseInput extends AuroElement {
|
|
|
10562
10616
|
"credit-card",
|
|
10563
10617
|
"tel"
|
|
10564
10618
|
];
|
|
10565
|
-
this.
|
|
10566
|
-
/** @private */
|
|
10619
|
+
this.icon = false;
|
|
10567
10620
|
this.dateFormatMap = {
|
|
10568
10621
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
10569
10622
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -10580,57 +10633,27 @@ class BaseInput extends AuroElement {
|
|
|
10580
10633
|
'dd/mm': 'dateDDMM',
|
|
10581
10634
|
'mm/dd': 'dateMMDD'
|
|
10582
10635
|
};
|
|
10583
|
-
this.disabled = false;
|
|
10584
|
-
/** @private */
|
|
10585
10636
|
this.domHandler = new DomHandler();
|
|
10586
10637
|
this.dvInputOnly = false;
|
|
10587
10638
|
this.hasValue = false;
|
|
10588
|
-
this.hideLabelVisually = false;
|
|
10589
|
-
this.icon = false;
|
|
10590
|
-
/** @private */
|
|
10591
10639
|
this.inputIconName = undefined;
|
|
10592
|
-
/** @private */
|
|
10593
10640
|
this.label = 'Input label is undefined';
|
|
10594
|
-
this.layout = 'classic';
|
|
10595
|
-
this.locale = 'en-US';
|
|
10596
|
-
this.max = undefined;
|
|
10597
|
-
this._maxObject = undefined;
|
|
10598
|
-
this.maxLength = undefined;
|
|
10599
|
-
this.min = undefined;
|
|
10600
|
-
this._minObject = undefined;
|
|
10601
|
-
this.minLength = undefined;
|
|
10602
10641
|
this.noValidate = false;
|
|
10603
|
-
this.
|
|
10604
|
-
// Raw values returned from the input mask before model normalization.
|
|
10605
|
-
this._rawMaskValue = undefined;
|
|
10606
|
-
this.required = false;
|
|
10607
|
-
this.setCustomValidityForType = undefined;
|
|
10608
|
-
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
10609
|
-
// itself, and listing it here caused cursor placement issues in Safari.
|
|
10610
|
-
/** @private */
|
|
10642
|
+
this._rawMaskValue = undefined; // Used for storing raw values returned from input mask.
|
|
10611
10643
|
this.setSelectionInputTypes = [
|
|
10612
10644
|
"text",
|
|
10613
10645
|
"password",
|
|
10614
10646
|
"email"
|
|
10615
|
-
];
|
|
10616
|
-
this.shape = 'classic';
|
|
10617
|
-
/** @private */
|
|
10647
|
+
]; // Credit Card is not included as this caused cursor placement issues in Safari.
|
|
10618
10648
|
this.showPassword = false;
|
|
10619
|
-
this.size = 'lg';
|
|
10620
10649
|
this.touched = false;
|
|
10621
|
-
/** @private */
|
|
10622
10650
|
this.uniqueId = new UniqueId().create();
|
|
10623
|
-
/** @private */
|
|
10624
10651
|
this.util = new AuroInputUtilities({
|
|
10625
10652
|
locale: this.locale,
|
|
10626
10653
|
format: this.format
|
|
10627
10654
|
});
|
|
10628
|
-
/** @private */
|
|
10629
10655
|
this.validation = new AuroFormValidation();
|
|
10630
|
-
/** @private */
|
|
10631
10656
|
this.validationCCLength = undefined;
|
|
10632
|
-
this.value = undefined;
|
|
10633
|
-
this._valueObject = undefined;
|
|
10634
10657
|
}
|
|
10635
10658
|
|
|
10636
10659
|
// function to define props used within the scope of this component
|
|
@@ -11178,15 +11201,6 @@ class BaseInput extends AuroElement {
|
|
|
11178
11201
|
|
|
11179
11202
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
11180
11203
|
|
|
11181
|
-
// Normalize the format token to lowercase so case-mixed values supplied
|
|
11182
|
-
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
11183
|
-
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
11184
|
-
// format silently misses the map and leaves `setCustomValidityForType`
|
|
11185
|
-
// unset.
|
|
11186
|
-
if (this.format) {
|
|
11187
|
-
this.format = this.format.toLowerCase();
|
|
11188
|
-
}
|
|
11189
|
-
|
|
11190
11204
|
// use validity message override if declared when initializing the component
|
|
11191
11205
|
if (this.hasAttribute('setCustomValidity')) {
|
|
11192
11206
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -11620,38 +11634,6 @@ class BaseInput extends AuroElement {
|
|
|
11620
11634
|
this.touched = true;
|
|
11621
11635
|
this.validation.validate(this);
|
|
11622
11636
|
}
|
|
11623
|
-
|
|
11624
|
-
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
11625
|
-
// update that can re-render the input and reset the native cursor; we
|
|
11626
|
-
// capture the caret position before that update commits and restore it
|
|
11627
|
-
// via `setSelectionRange` once the update has flushed. Gated on
|
|
11628
|
-
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
11629
|
-
// formatter manages the cursor itself) doesn't get a competing write.
|
|
11630
|
-
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
11631
|
-
// on input types that don't support text selection (number, email in
|
|
11632
|
-
// some browsers) throws InvalidStateError, which would crash all input
|
|
11633
|
-
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
11634
|
-
// the gated types currently support it, since the list is a public
|
|
11635
|
-
// property a consumer could mutate.
|
|
11636
|
-
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
11637
|
-
let selectionStart;
|
|
11638
|
-
try {
|
|
11639
|
-
selectionStart = this.inputElement.selectionStart;
|
|
11640
|
-
} catch (error) { // eslint-disable-line no-unused-vars
|
|
11641
|
-
return;
|
|
11642
|
-
}
|
|
11643
|
-
if (typeof selectionStart !== 'number') {
|
|
11644
|
-
return;
|
|
11645
|
-
}
|
|
11646
|
-
this.updateComplete.then(() => {
|
|
11647
|
-
try {
|
|
11648
|
-
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
11649
|
-
} catch (error) { // eslint-disable-line no-unused-vars
|
|
11650
|
-
// Some input types (number/email in certain UAs) throw on
|
|
11651
|
-
// setSelectionRange; swallow and let the native cursor stand.
|
|
11652
|
-
}
|
|
11653
|
-
});
|
|
11654
|
-
}
|
|
11655
11637
|
}
|
|
11656
11638
|
|
|
11657
11639
|
/**
|
|
@@ -12278,7 +12260,7 @@ class AuroHelpText extends i$3 {
|
|
|
12278
12260
|
}
|
|
12279
12261
|
}
|
|
12280
12262
|
|
|
12281
|
-
var formkitVersion = '
|
|
12263
|
+
var formkitVersion = '202606291727';
|
|
12282
12264
|
|
|
12283
12265
|
/**
|
|
12284
12266
|
* @license
|
|
@@ -12793,7 +12775,6 @@ class AuroInput extends BaseInput {
|
|
|
12793
12775
|
<${this.buttonTag}
|
|
12794
12776
|
@click="${this.handleClickShowPassword}"
|
|
12795
12777
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
12796
|
-
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
12797
12778
|
class="notificationBtn passwordBtn"
|
|
12798
12779
|
shape="circle"
|
|
12799
12780
|
size="sm"
|
|
@@ -12867,29 +12848,25 @@ class AuroInput extends BaseInput {
|
|
|
12867
12848
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
12868
12849
|
*/
|
|
12869
12850
|
renderHtmlHelpText() {
|
|
12870
|
-
// Single `<p>` with stable identity across validity transitions —
|
|
12871
|
-
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
12872
|
-
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
12873
|
-
// re-announce because the live-region element it was watching had been
|
|
12874
|
-
// removed and a new one inserted. Keeping one node means the `role`,
|
|
12875
|
-
// `aria-live`, and text content all change in-place, which AT does
|
|
12876
|
-
// observe and announce.
|
|
12877
|
-
const isError = this.validity && this.validity !== 'valid';
|
|
12878
12851
|
return u$4`
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12852
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
12853
|
+
? u$4`
|
|
12854
|
+
<${this.helpTextTag}
|
|
12855
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
12856
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
12857
|
+
<slot name="helpText">${this.getHelpText()}</slot>
|
|
12858
|
+
</p>
|
|
12859
|
+
</${this.helpTextTag}>
|
|
12860
|
+
`
|
|
12861
|
+
: u$4`
|
|
12862
|
+
<${this.helpTextTag} error
|
|
12863
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
12864
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
12865
|
+
${this.errorMessage}
|
|
12866
|
+
</p>
|
|
12867
|
+
</${this.helpTextTag}>
|
|
12868
|
+
`
|
|
12890
12869
|
}
|
|
12891
|
-
</p>
|
|
12892
|
-
</${this.helpTextTag}>
|
|
12893
12870
|
`;
|
|
12894
12871
|
}
|
|
12895
12872
|
|
|
@@ -10385,13 +10385,6 @@ class AuroInputUtilities {
|
|
|
10385
10385
|
* @returns {string | undefined}
|
|
10386
10386
|
*/
|
|
10387
10387
|
toFormattedValue(valueObject, format) {
|
|
10388
|
-
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
10389
|
-
// `format` argument has to fail gracefully rather than throw on
|
|
10390
|
-
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
10391
|
-
// as "no format → no display value".
|
|
10392
|
-
if (!format) {
|
|
10393
|
-
return undefined;
|
|
10394
|
-
}
|
|
10395
10388
|
const normalizedFormat = format.toLowerCase();
|
|
10396
10389
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
10397
10390
|
|
|
@@ -10542,18 +10535,79 @@ class BaseInput extends AuroElement {
|
|
|
10542
10535
|
constructor() {
|
|
10543
10536
|
super();
|
|
10544
10537
|
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10538
|
+
this.appearance = "default";
|
|
10539
|
+
this.disabled = false;
|
|
10540
|
+
this.layout = 'classic';
|
|
10541
|
+
this.locale = 'en-US';
|
|
10542
|
+
this.max = undefined;
|
|
10543
|
+
this._maxObject = undefined;
|
|
10544
|
+
this.maxLength = undefined;
|
|
10545
|
+
this.min = undefined;
|
|
10546
|
+
this._minObject = undefined;
|
|
10547
|
+
this.minLength = undefined;
|
|
10548
|
+
this.required = false;
|
|
10549
|
+
this.onDark = false;
|
|
10550
|
+
this.setCustomValidityForType = undefined;
|
|
10551
|
+
this.size = 'lg';
|
|
10552
|
+
this.shape = 'classic';
|
|
10553
|
+
this.value = undefined;
|
|
10554
|
+
this._valueObject = undefined;
|
|
10555
|
+
|
|
10556
|
+
this._initializePrivateDefaults();
|
|
10557
|
+
}
|
|
10558
|
+
|
|
10559
|
+
/**
|
|
10560
|
+
* Internal Defaults.
|
|
10561
|
+
* @private
|
|
10562
|
+
* @returns {void}
|
|
10563
|
+
*/
|
|
10564
|
+
_initializePrivateDefaults() {
|
|
10555
10565
|
this.activeLabel = false;
|
|
10556
|
-
|
|
10566
|
+
this.appearance = "default";
|
|
10567
|
+
this.icon = false;
|
|
10568
|
+
this.disabled = false;
|
|
10569
|
+
this.dvInputOnly = false;
|
|
10570
|
+
this.hideLabelVisually = false;
|
|
10571
|
+
this.max = undefined;
|
|
10572
|
+
this.maxLength = undefined;
|
|
10573
|
+
this.min = undefined;
|
|
10574
|
+
this.minLength = undefined;
|
|
10575
|
+
this.noValidate = false;
|
|
10576
|
+
this.onDark = false;
|
|
10577
|
+
this.required = false;
|
|
10578
|
+
this.setCustomValidityForType = undefined;
|
|
10579
|
+
|
|
10580
|
+
// Used for storing raw values returned from input mask.
|
|
10581
|
+
this._rawMaskValue = undefined;
|
|
10582
|
+
|
|
10583
|
+
/**
|
|
10584
|
+
* @private
|
|
10585
|
+
*/
|
|
10586
|
+
this.layout = 'classic';
|
|
10587
|
+
|
|
10588
|
+
/**
|
|
10589
|
+
* @private
|
|
10590
|
+
*/
|
|
10591
|
+
this.shape = 'classic';
|
|
10592
|
+
|
|
10593
|
+
/**
|
|
10594
|
+
* @private
|
|
10595
|
+
*/
|
|
10596
|
+
this.size = 'lg';
|
|
10597
|
+
|
|
10598
|
+
this.touched = false;
|
|
10599
|
+
this.util = new AuroInputUtilities({
|
|
10600
|
+
locale: "en-US",
|
|
10601
|
+
format: this.format
|
|
10602
|
+
});
|
|
10603
|
+
this.validation = new AuroFormValidation();
|
|
10604
|
+
this.inputIconName = undefined;
|
|
10605
|
+
this.showPassword = false;
|
|
10606
|
+
this.validationCCLength = undefined;
|
|
10607
|
+
this.hasValue = false;
|
|
10608
|
+
this.label = 'Input label is undefined';
|
|
10609
|
+
|
|
10610
|
+
|
|
10557
10611
|
this.allowedInputTypes = [
|
|
10558
10612
|
"text",
|
|
10559
10613
|
"number",
|
|
@@ -10562,8 +10616,7 @@ class BaseInput extends AuroElement {
|
|
|
10562
10616
|
"credit-card",
|
|
10563
10617
|
"tel"
|
|
10564
10618
|
];
|
|
10565
|
-
this.
|
|
10566
|
-
/** @private */
|
|
10619
|
+
this.icon = false;
|
|
10567
10620
|
this.dateFormatMap = {
|
|
10568
10621
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
10569
10622
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -10580,57 +10633,27 @@ class BaseInput extends AuroElement {
|
|
|
10580
10633
|
'dd/mm': 'dateDDMM',
|
|
10581
10634
|
'mm/dd': 'dateMMDD'
|
|
10582
10635
|
};
|
|
10583
|
-
this.disabled = false;
|
|
10584
|
-
/** @private */
|
|
10585
10636
|
this.domHandler = new DomHandler();
|
|
10586
10637
|
this.dvInputOnly = false;
|
|
10587
10638
|
this.hasValue = false;
|
|
10588
|
-
this.hideLabelVisually = false;
|
|
10589
|
-
this.icon = false;
|
|
10590
|
-
/** @private */
|
|
10591
10639
|
this.inputIconName = undefined;
|
|
10592
|
-
/** @private */
|
|
10593
10640
|
this.label = 'Input label is undefined';
|
|
10594
|
-
this.layout = 'classic';
|
|
10595
|
-
this.locale = 'en-US';
|
|
10596
|
-
this.max = undefined;
|
|
10597
|
-
this._maxObject = undefined;
|
|
10598
|
-
this.maxLength = undefined;
|
|
10599
|
-
this.min = undefined;
|
|
10600
|
-
this._minObject = undefined;
|
|
10601
|
-
this.minLength = undefined;
|
|
10602
10641
|
this.noValidate = false;
|
|
10603
|
-
this.
|
|
10604
|
-
// Raw values returned from the input mask before model normalization.
|
|
10605
|
-
this._rawMaskValue = undefined;
|
|
10606
|
-
this.required = false;
|
|
10607
|
-
this.setCustomValidityForType = undefined;
|
|
10608
|
-
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
10609
|
-
// itself, and listing it here caused cursor placement issues in Safari.
|
|
10610
|
-
/** @private */
|
|
10642
|
+
this._rawMaskValue = undefined; // Used for storing raw values returned from input mask.
|
|
10611
10643
|
this.setSelectionInputTypes = [
|
|
10612
10644
|
"text",
|
|
10613
10645
|
"password",
|
|
10614
10646
|
"email"
|
|
10615
|
-
];
|
|
10616
|
-
this.shape = 'classic';
|
|
10617
|
-
/** @private */
|
|
10647
|
+
]; // Credit Card is not included as this caused cursor placement issues in Safari.
|
|
10618
10648
|
this.showPassword = false;
|
|
10619
|
-
this.size = 'lg';
|
|
10620
10649
|
this.touched = false;
|
|
10621
|
-
/** @private */
|
|
10622
10650
|
this.uniqueId = new UniqueId().create();
|
|
10623
|
-
/** @private */
|
|
10624
10651
|
this.util = new AuroInputUtilities({
|
|
10625
10652
|
locale: this.locale,
|
|
10626
10653
|
format: this.format
|
|
10627
10654
|
});
|
|
10628
|
-
/** @private */
|
|
10629
10655
|
this.validation = new AuroFormValidation();
|
|
10630
|
-
/** @private */
|
|
10631
10656
|
this.validationCCLength = undefined;
|
|
10632
|
-
this.value = undefined;
|
|
10633
|
-
this._valueObject = undefined;
|
|
10634
10657
|
}
|
|
10635
10658
|
|
|
10636
10659
|
// function to define props used within the scope of this component
|
|
@@ -11178,15 +11201,6 @@ class BaseInput extends AuroElement {
|
|
|
11178
11201
|
|
|
11179
11202
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
11180
11203
|
|
|
11181
|
-
// Normalize the format token to lowercase so case-mixed values supplied
|
|
11182
|
-
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
11183
|
-
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
11184
|
-
// format silently misses the map and leaves `setCustomValidityForType`
|
|
11185
|
-
// unset.
|
|
11186
|
-
if (this.format) {
|
|
11187
|
-
this.format = this.format.toLowerCase();
|
|
11188
|
-
}
|
|
11189
|
-
|
|
11190
11204
|
// use validity message override if declared when initializing the component
|
|
11191
11205
|
if (this.hasAttribute('setCustomValidity')) {
|
|
11192
11206
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -11620,38 +11634,6 @@ class BaseInput extends AuroElement {
|
|
|
11620
11634
|
this.touched = true;
|
|
11621
11635
|
this.validation.validate(this);
|
|
11622
11636
|
}
|
|
11623
|
-
|
|
11624
|
-
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
11625
|
-
// update that can re-render the input and reset the native cursor; we
|
|
11626
|
-
// capture the caret position before that update commits and restore it
|
|
11627
|
-
// via `setSelectionRange` once the update has flushed. Gated on
|
|
11628
|
-
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
11629
|
-
// formatter manages the cursor itself) doesn't get a competing write.
|
|
11630
|
-
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
11631
|
-
// on input types that don't support text selection (number, email in
|
|
11632
|
-
// some browsers) throws InvalidStateError, which would crash all input
|
|
11633
|
-
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
11634
|
-
// the gated types currently support it, since the list is a public
|
|
11635
|
-
// property a consumer could mutate.
|
|
11636
|
-
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
11637
|
-
let selectionStart;
|
|
11638
|
-
try {
|
|
11639
|
-
selectionStart = this.inputElement.selectionStart;
|
|
11640
|
-
} catch (error) { // eslint-disable-line no-unused-vars
|
|
11641
|
-
return;
|
|
11642
|
-
}
|
|
11643
|
-
if (typeof selectionStart !== 'number') {
|
|
11644
|
-
return;
|
|
11645
|
-
}
|
|
11646
|
-
this.updateComplete.then(() => {
|
|
11647
|
-
try {
|
|
11648
|
-
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
11649
|
-
} catch (error) { // eslint-disable-line no-unused-vars
|
|
11650
|
-
// Some input types (number/email in certain UAs) throw on
|
|
11651
|
-
// setSelectionRange; swallow and let the native cursor stand.
|
|
11652
|
-
}
|
|
11653
|
-
});
|
|
11654
|
-
}
|
|
11655
11637
|
}
|
|
11656
11638
|
|
|
11657
11639
|
/**
|
|
@@ -12278,7 +12260,7 @@ class AuroHelpText extends i$3 {
|
|
|
12278
12260
|
}
|
|
12279
12261
|
}
|
|
12280
12262
|
|
|
12281
|
-
var formkitVersion = '
|
|
12263
|
+
var formkitVersion = '202606291727';
|
|
12282
12264
|
|
|
12283
12265
|
/**
|
|
12284
12266
|
* @license
|
|
@@ -12793,7 +12775,6 @@ class AuroInput extends BaseInput {
|
|
|
12793
12775
|
<${this.buttonTag}
|
|
12794
12776
|
@click="${this.handleClickShowPassword}"
|
|
12795
12777
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
12796
|
-
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
12797
12778
|
class="notificationBtn passwordBtn"
|
|
12798
12779
|
shape="circle"
|
|
12799
12780
|
size="sm"
|
|
@@ -12867,29 +12848,25 @@ class AuroInput extends BaseInput {
|
|
|
12867
12848
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
12868
12849
|
*/
|
|
12869
12850
|
renderHtmlHelpText() {
|
|
12870
|
-
// Single `<p>` with stable identity across validity transitions —
|
|
12871
|
-
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
12872
|
-
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
12873
|
-
// re-announce because the live-region element it was watching had been
|
|
12874
|
-
// removed and a new one inserted. Keeping one node means the `role`,
|
|
12875
|
-
// `aria-live`, and text content all change in-place, which AT does
|
|
12876
|
-
// observe and announce.
|
|
12877
|
-
const isError = this.validity && this.validity !== 'valid';
|
|
12878
12851
|
return u$4`
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12852
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
12853
|
+
? u$4`
|
|
12854
|
+
<${this.helpTextTag}
|
|
12855
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
12856
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
12857
|
+
<slot name="helpText">${this.getHelpText()}</slot>
|
|
12858
|
+
</p>
|
|
12859
|
+
</${this.helpTextTag}>
|
|
12860
|
+
`
|
|
12861
|
+
: u$4`
|
|
12862
|
+
<${this.helpTextTag} error
|
|
12863
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
12864
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
12865
|
+
${this.errorMessage}
|
|
12866
|
+
</p>
|
|
12867
|
+
</${this.helpTextTag}>
|
|
12868
|
+
`
|
|
12890
12869
|
}
|
|
12891
|
-
</p>
|
|
12892
|
-
</${this.helpTextTag}>
|
|
12893
12870
|
`;
|
|
12894
12871
|
}
|
|
12895
12872
|
|