@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.50 → 0.0.0-pr624.52
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/api.min.js +5 -5
- package/components/checkbox/demo/index.min.js +5 -5
- package/components/checkbox/dist/index.js +5 -5
- package/components/checkbox/dist/registered.js +5 -5
- package/components/combobox/demo/api.min.js +69 -86
- package/components/combobox/demo/index.min.js +69 -86
- package/components/combobox/dist/index.js +33 -75
- package/components/combobox/dist/registered.js +33 -75
- package/components/counter/demo/api.md +127 -0
- package/components/counter/demo/api.min.js +548 -385
- package/components/counter/demo/index.md +82 -0
- package/components/counter/demo/index.min.js +548 -385
- package/components/counter/dist/auro-counter-group.d.ts +70 -13
- package/components/counter/dist/auro-counter.d.ts +10 -0
- package/components/counter/dist/index.js +548 -385
- package/components/counter/dist/registered.js +548 -385
- package/components/datepicker/demo/api.min.js +54 -81
- package/components/datepicker/demo/index.min.js +54 -81
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
- package/components/datepicker/dist/index.js +54 -81
- package/components/datepicker/dist/registered.js +54 -81
- package/components/dropdown/demo/api.md +59 -265
- package/components/dropdown/demo/api.min.js +22 -64
- package/components/dropdown/demo/index.md +45 -363
- package/components/dropdown/demo/index.min.js +22 -64
- package/components/dropdown/dist/auro-dropdown.d.ts +21 -71
- package/components/dropdown/dist/index.js +22 -64
- package/components/dropdown/dist/registered.js +22 -64
- package/components/input/demo/api.min.js +5 -5
- package/components/input/demo/index.min.js +5 -5
- package/components/input/dist/index.js +5 -5
- package/components/input/dist/registered.js +5 -5
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/api.min.js +36 -11
- package/components/menu/demo/index.min.js +36 -11
- package/components/menu/dist/auro-menu.d.ts +13 -2
- package/components/menu/dist/index.js +36 -11
- package/components/menu/dist/registered.js +36 -11
- package/components/radio/demo/api.min.js +6 -6
- package/components/radio/demo/index.min.js +6 -6
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +6 -6
- package/components/radio/dist/registered.js +6 -6
- package/components/select/demo/api.md +2 -2
- package/components/select/demo/api.min.js +94 -164
- package/components/select/demo/index.min.js +94 -164
- package/components/select/dist/auro-select.d.ts +13 -3
- package/components/select/dist/index.js +58 -153
- package/components/select/dist/registered.js +58 -153
- package/package.json +1 -1
|
@@ -653,19 +653,19 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
653
653
|
{
|
|
654
654
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
655
655
|
validity: 'tooShort',
|
|
656
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
656
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
657
657
|
},
|
|
658
658
|
{
|
|
659
659
|
check: (e) => e.value?.length > e.maxLength,
|
|
660
660
|
validity: 'tooLong',
|
|
661
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
661
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
662
662
|
}
|
|
663
663
|
],
|
|
664
664
|
pattern: [
|
|
665
665
|
{
|
|
666
666
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
667
667
|
validity: 'patternMismatch',
|
|
668
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
668
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
669
669
|
}
|
|
670
670
|
]
|
|
671
671
|
},
|
|
@@ -860,10 +860,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
860
860
|
if (!hasValue && elem.required && elem.touched) {
|
|
861
861
|
elem.validity = 'valueMissing';
|
|
862
862
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
863
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
863
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
864
864
|
this.validateType(elem);
|
|
865
865
|
this.validateElementAttributes(elem);
|
|
866
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
866
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
867
867
|
this.validateElementAttributes(elem);
|
|
868
868
|
}
|
|
869
869
|
}
|
|
@@ -4414,10 +4414,8 @@ let AuroElement$4 = class AuroElement extends i$2 {
|
|
|
4414
4414
|
// See LICENSE in the project root for license information.
|
|
4415
4415
|
|
|
4416
4416
|
|
|
4417
|
-
|
|
4418
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
4417
|
+
/*
|
|
4419
4418
|
* @slot - Default slot for the popover content.
|
|
4420
|
-
* @slot label - Defines the content of the label.
|
|
4421
4419
|
* @slot helpText - Defines the content of the helpText.
|
|
4422
4420
|
* @slot trigger - Defines the content of the trigger.
|
|
4423
4421
|
* @csspart trigger - The trigger content container.
|
|
@@ -4436,18 +4434,22 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4436
4434
|
this.matchWidth = false;
|
|
4437
4435
|
this.noHideOnThisFocusLoss = false;
|
|
4438
4436
|
|
|
4439
|
-
this.errorMessage =
|
|
4437
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4440
4438
|
|
|
4441
4439
|
// Layout Config
|
|
4442
|
-
this.layout =
|
|
4443
|
-
this.shape =
|
|
4444
|
-
this.size =
|
|
4440
|
+
this.layout = undefined;
|
|
4441
|
+
this.shape = undefined;
|
|
4442
|
+
this.size = undefined;
|
|
4445
4443
|
|
|
4446
4444
|
this.parentBorder = false;
|
|
4447
4445
|
|
|
4448
4446
|
this.privateDefaults();
|
|
4449
4447
|
}
|
|
4450
4448
|
|
|
4449
|
+
/**
|
|
4450
|
+
* @private
|
|
4451
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4452
|
+
*/
|
|
4451
4453
|
get commonWrapperClasses() {
|
|
4452
4454
|
return {
|
|
4453
4455
|
'trigger': true,
|
|
@@ -4467,12 +4469,8 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4467
4469
|
this.disabled = false;
|
|
4468
4470
|
this.disableFocusTrap = false;
|
|
4469
4471
|
this.error = false;
|
|
4470
|
-
this.inset = false;
|
|
4471
|
-
this.rounded = false;
|
|
4472
4472
|
this.tabIndex = 0;
|
|
4473
4473
|
this.noToggle = false;
|
|
4474
|
-
this.a11yAutocomplete = 'none';
|
|
4475
|
-
this.labeled = true;
|
|
4476
4474
|
this.a11yRole = 'button';
|
|
4477
4475
|
this.onDark = false;
|
|
4478
4476
|
this.showTriggerBorders = true;
|
|
@@ -4594,26 +4592,27 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4594
4592
|
},
|
|
4595
4593
|
|
|
4596
4594
|
/**
|
|
4597
|
-
* If declared,
|
|
4595
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4596
|
+
* @default false
|
|
4598
4597
|
*/
|
|
4599
|
-
|
|
4598
|
+
disableEventShow: {
|
|
4600
4599
|
type: Boolean,
|
|
4601
4600
|
reflect: true
|
|
4602
4601
|
},
|
|
4603
4602
|
|
|
4604
4603
|
/**
|
|
4605
|
-
* If declared,
|
|
4606
|
-
* @attr {Boolean} chevron
|
|
4604
|
+
* If declared, applies a border around the trigger slot.
|
|
4607
4605
|
*/
|
|
4608
|
-
|
|
4606
|
+
simple: {
|
|
4609
4607
|
type: Boolean,
|
|
4610
4608
|
reflect: true
|
|
4611
4609
|
},
|
|
4612
4610
|
|
|
4613
4611
|
/**
|
|
4614
|
-
* If declared, the dropdown
|
|
4612
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
4613
|
+
* @attr {Boolean} chevron
|
|
4615
4614
|
*/
|
|
4616
|
-
|
|
4615
|
+
chevron: {
|
|
4617
4616
|
type: Boolean,
|
|
4618
4617
|
reflect: true
|
|
4619
4618
|
},
|
|
@@ -4627,7 +4626,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4627
4626
|
},
|
|
4628
4627
|
|
|
4629
4628
|
/**
|
|
4630
|
-
* If
|
|
4629
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4631
4630
|
*/
|
|
4632
4631
|
disableFocusTrap: {
|
|
4633
4632
|
type: Boolean,
|
|
@@ -4674,22 +4673,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4674
4673
|
reflect: true
|
|
4675
4674
|
},
|
|
4676
4675
|
|
|
4677
|
-
/**
|
|
4678
|
-
* Makes the trigger to be full width of its parent container.
|
|
4679
|
-
*/
|
|
4680
|
-
fluid: {
|
|
4681
|
-
type: Boolean,
|
|
4682
|
-
reflect: true
|
|
4683
|
-
},
|
|
4684
|
-
|
|
4685
|
-
/**
|
|
4686
|
-
* If declared, will apply padding around trigger slot content.
|
|
4687
|
-
*/
|
|
4688
|
-
inset: {
|
|
4689
|
-
type: Boolean,
|
|
4690
|
-
reflect: true
|
|
4691
|
-
},
|
|
4692
|
-
|
|
4693
4676
|
/**
|
|
4694
4677
|
* If true, the dropdown bib is displayed.
|
|
4695
4678
|
*/
|
|
@@ -4733,15 +4716,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4733
4716
|
reflect: true
|
|
4734
4717
|
},
|
|
4735
4718
|
|
|
4736
|
-
/**
|
|
4737
|
-
* Defines if there is a label preset.
|
|
4738
|
-
* @private
|
|
4739
|
-
*/
|
|
4740
|
-
labeled: {
|
|
4741
|
-
type: Boolean,
|
|
4742
|
-
reflect: true
|
|
4743
|
-
},
|
|
4744
|
-
|
|
4745
4719
|
/**
|
|
4746
4720
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4747
4721
|
* @private
|
|
@@ -4802,6 +4776,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4802
4776
|
reflect: true
|
|
4803
4777
|
},
|
|
4804
4778
|
|
|
4779
|
+
/**
|
|
4780
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4781
|
+
*/
|
|
4805
4782
|
onSlotChange: {
|
|
4806
4783
|
type: Function,
|
|
4807
4784
|
reflect: false
|
|
@@ -4816,14 +4793,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4816
4793
|
reflect: true
|
|
4817
4794
|
},
|
|
4818
4795
|
|
|
4819
|
-
/**
|
|
4820
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4821
|
-
*/
|
|
4822
|
-
rounded: {
|
|
4823
|
-
type: Boolean,
|
|
4824
|
-
reflect: true
|
|
4825
|
-
},
|
|
4826
|
-
|
|
4827
4796
|
/**
|
|
4828
4797
|
* @private
|
|
4829
4798
|
*/
|
|
@@ -4838,14 +4807,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4838
4807
|
type: String || undefined,
|
|
4839
4808
|
attribute: false,
|
|
4840
4809
|
reflect: false
|
|
4841
|
-
},
|
|
4842
|
-
|
|
4843
|
-
/**
|
|
4844
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4845
|
-
*/
|
|
4846
|
-
a11yAutocomplete: {
|
|
4847
|
-
type: String,
|
|
4848
|
-
attribute: false,
|
|
4849
4810
|
}
|
|
4850
4811
|
};
|
|
4851
4812
|
}
|
|
@@ -5293,10 +5254,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5293
5254
|
id="bib"
|
|
5294
5255
|
shape="${this.shape}"
|
|
5295
5256
|
?data-show="${this.isPopoverVisible}"
|
|
5296
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5297
|
-
?common="${this.common}"
|
|
5298
|
-
?rounded="${this.common || this.rounded}"
|
|
5299
|
-
?inset="${this.common || this.inset}">
|
|
5257
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5300
5258
|
<div class="slotContent">
|
|
5301
5259
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5302
5260
|
</div>
|
|
@@ -9931,19 +9889,19 @@ class AuroFormValidation {
|
|
|
9931
9889
|
{
|
|
9932
9890
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
9933
9891
|
validity: 'tooShort',
|
|
9934
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
9892
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
9935
9893
|
},
|
|
9936
9894
|
{
|
|
9937
9895
|
check: (e) => e.value?.length > e.maxLength,
|
|
9938
9896
|
validity: 'tooLong',
|
|
9939
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
9897
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
9940
9898
|
}
|
|
9941
9899
|
],
|
|
9942
9900
|
pattern: [
|
|
9943
9901
|
{
|
|
9944
9902
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
9945
9903
|
validity: 'patternMismatch',
|
|
9946
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
9904
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
9947
9905
|
}
|
|
9948
9906
|
]
|
|
9949
9907
|
},
|
|
@@ -10138,10 +10096,10 @@ class AuroFormValidation {
|
|
|
10138
10096
|
if (!hasValue && elem.required && elem.touched) {
|
|
10139
10097
|
elem.validity = 'valueMissing';
|
|
10140
10098
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
10141
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
10099
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
10142
10100
|
this.validateType(elem);
|
|
10143
10101
|
this.validateElementAttributes(elem);
|
|
10144
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
10102
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
10145
10103
|
this.validateElementAttributes(elem);
|
|
10146
10104
|
}
|
|
10147
10105
|
}
|
|
@@ -15499,7 +15457,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
15499
15457
|
<div id="bibTemplate" part="bibtemplate">
|
|
15500
15458
|
${this.isFullscreen ? u$2`
|
|
15501
15459
|
<div id="headerContainer">
|
|
15502
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15460
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15503
15461
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
15504
15462
|
</${this.buttonTag}>
|
|
15505
15463
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -16990,7 +16948,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
16990
16948
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
16991
16949
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
16992
16950
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
16993
|
-
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
16994
16951
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
16995
16952
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
16996
16953
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -17103,9 +17060,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17103
17060
|
reflect: true,
|
|
17104
17061
|
attribute: 'multiselect'
|
|
17105
17062
|
},
|
|
17063
|
+
|
|
17064
|
+
/**
|
|
17065
|
+
* Value selected for the component.
|
|
17066
|
+
*/
|
|
17106
17067
|
value: {
|
|
17107
|
-
|
|
17108
|
-
|
|
17068
|
+
type: String,
|
|
17069
|
+
reflect: true,
|
|
17070
|
+
attribute: 'value'
|
|
17109
17071
|
},
|
|
17110
17072
|
|
|
17111
17073
|
/**
|
|
@@ -17140,6 +17102,25 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17140
17102
|
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroMenu);
|
|
17141
17103
|
}
|
|
17142
17104
|
|
|
17105
|
+
/**
|
|
17106
|
+
* Formatted value based on `multiSelect` state.
|
|
17107
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
17108
|
+
* @private
|
|
17109
|
+
* @returns {String|Array<String>}
|
|
17110
|
+
*/
|
|
17111
|
+
get formattedValue() {
|
|
17112
|
+
if (this.multiSelect) {
|
|
17113
|
+
if (!this.value) {
|
|
17114
|
+
return undefined;
|
|
17115
|
+
}
|
|
17116
|
+
if (this.value.startsWith("[")) {
|
|
17117
|
+
return JSON.parse(this.value);
|
|
17118
|
+
}
|
|
17119
|
+
return [this.value];
|
|
17120
|
+
}
|
|
17121
|
+
return this.value;
|
|
17122
|
+
}
|
|
17123
|
+
|
|
17143
17124
|
// Lifecycle Methods
|
|
17144
17125
|
|
|
17145
17126
|
connectedCallback() {
|
|
@@ -17182,7 +17163,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17182
17163
|
updated(changedProperties) {
|
|
17183
17164
|
super.updated(changedProperties);
|
|
17184
17165
|
|
|
17185
|
-
if (changedProperties.has('multiSelect')) {
|
|
17166
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
17186
17167
|
// Reset selection if multiSelect mode changes
|
|
17187
17168
|
this.clearSelection();
|
|
17188
17169
|
}
|
|
@@ -17196,7 +17177,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17196
17177
|
} else {
|
|
17197
17178
|
if (this.multiSelect) {
|
|
17198
17179
|
// In multiselect mode, this.value should be an array of strings
|
|
17199
|
-
const valueArray =
|
|
17180
|
+
const valueArray = this.formattedValue;
|
|
17200
17181
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
17201
17182
|
|
|
17202
17183
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -17363,14 +17344,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17363
17344
|
*/
|
|
17364
17345
|
handleSelectState(option) {
|
|
17365
17346
|
if (this.multiSelect) {
|
|
17366
|
-
const currentValue = this.
|
|
17347
|
+
const currentValue = this.formattedValue || [];
|
|
17367
17348
|
const currentSelected = this.optionSelected || [];
|
|
17368
17349
|
|
|
17369
17350
|
if (!currentValue.includes(option.value)) {
|
|
17370
|
-
this.value = [
|
|
17351
|
+
this.value = JSON.stringify([
|
|
17371
17352
|
...currentValue,
|
|
17372
17353
|
option.value
|
|
17373
|
-
];
|
|
17354
|
+
]);
|
|
17374
17355
|
}
|
|
17375
17356
|
if (!currentSelected.includes(option)) {
|
|
17376
17357
|
this.optionSelected = [
|
|
@@ -17393,13 +17374,15 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17393
17374
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
17394
17375
|
*/
|
|
17395
17376
|
handleDeselectState(option) {
|
|
17396
|
-
if (this.multiSelect
|
|
17377
|
+
if (this.multiSelect) {
|
|
17397
17378
|
// Remove this option from array
|
|
17398
|
-
|
|
17379
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
17399
17380
|
|
|
17400
17381
|
// If array is empty after removal, set back to undefined
|
|
17401
|
-
if (
|
|
17382
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
17402
17383
|
this.value = undefined;
|
|
17384
|
+
} else {
|
|
17385
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
17403
17386
|
}
|
|
17404
17387
|
|
|
17405
17388
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -590,19 +590,19 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
590
590
|
{
|
|
591
591
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
592
592
|
validity: 'tooShort',
|
|
593
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
593
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
594
594
|
},
|
|
595
595
|
{
|
|
596
596
|
check: (e) => e.value?.length > e.maxLength,
|
|
597
597
|
validity: 'tooLong',
|
|
598
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
598
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
599
599
|
}
|
|
600
600
|
],
|
|
601
601
|
pattern: [
|
|
602
602
|
{
|
|
603
603
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
604
604
|
validity: 'patternMismatch',
|
|
605
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
605
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
606
606
|
}
|
|
607
607
|
]
|
|
608
608
|
},
|
|
@@ -797,10 +797,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
797
797
|
if (!hasValue && elem.required && elem.touched) {
|
|
798
798
|
elem.validity = 'valueMissing';
|
|
799
799
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
800
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
800
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
801
801
|
this.validateType(elem);
|
|
802
802
|
this.validateElementAttributes(elem);
|
|
803
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
803
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
804
804
|
this.validateElementAttributes(elem);
|
|
805
805
|
}
|
|
806
806
|
}
|
|
@@ -4345,10 +4345,8 @@ let AuroElement$4 = class AuroElement extends LitElement {
|
|
|
4345
4345
|
// See LICENSE in the project root for license information.
|
|
4346
4346
|
|
|
4347
4347
|
|
|
4348
|
-
|
|
4349
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
4348
|
+
/*
|
|
4350
4349
|
* @slot - Default slot for the popover content.
|
|
4351
|
-
* @slot label - Defines the content of the label.
|
|
4352
4350
|
* @slot helpText - Defines the content of the helpText.
|
|
4353
4351
|
* @slot trigger - Defines the content of the trigger.
|
|
4354
4352
|
* @csspart trigger - The trigger content container.
|
|
@@ -4367,18 +4365,22 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4367
4365
|
this.matchWidth = false;
|
|
4368
4366
|
this.noHideOnThisFocusLoss = false;
|
|
4369
4367
|
|
|
4370
|
-
this.errorMessage =
|
|
4368
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4371
4369
|
|
|
4372
4370
|
// Layout Config
|
|
4373
|
-
this.layout =
|
|
4374
|
-
this.shape =
|
|
4375
|
-
this.size =
|
|
4371
|
+
this.layout = undefined;
|
|
4372
|
+
this.shape = undefined;
|
|
4373
|
+
this.size = undefined;
|
|
4376
4374
|
|
|
4377
4375
|
this.parentBorder = false;
|
|
4378
4376
|
|
|
4379
4377
|
this.privateDefaults();
|
|
4380
4378
|
}
|
|
4381
4379
|
|
|
4380
|
+
/**
|
|
4381
|
+
* @private
|
|
4382
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4383
|
+
*/
|
|
4382
4384
|
get commonWrapperClasses() {
|
|
4383
4385
|
return {
|
|
4384
4386
|
'trigger': true,
|
|
@@ -4398,12 +4400,8 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4398
4400
|
this.disabled = false;
|
|
4399
4401
|
this.disableFocusTrap = false;
|
|
4400
4402
|
this.error = false;
|
|
4401
|
-
this.inset = false;
|
|
4402
|
-
this.rounded = false;
|
|
4403
4403
|
this.tabIndex = 0;
|
|
4404
4404
|
this.noToggle = false;
|
|
4405
|
-
this.a11yAutocomplete = 'none';
|
|
4406
|
-
this.labeled = true;
|
|
4407
4405
|
this.a11yRole = 'button';
|
|
4408
4406
|
this.onDark = false;
|
|
4409
4407
|
this.showTriggerBorders = true;
|
|
@@ -4525,26 +4523,27 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4525
4523
|
},
|
|
4526
4524
|
|
|
4527
4525
|
/**
|
|
4528
|
-
* If declared,
|
|
4526
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4527
|
+
* @default false
|
|
4529
4528
|
*/
|
|
4530
|
-
|
|
4529
|
+
disableEventShow: {
|
|
4531
4530
|
type: Boolean,
|
|
4532
4531
|
reflect: true
|
|
4533
4532
|
},
|
|
4534
4533
|
|
|
4535
4534
|
/**
|
|
4536
|
-
* If declared,
|
|
4537
|
-
* @attr {Boolean} chevron
|
|
4535
|
+
* If declared, applies a border around the trigger slot.
|
|
4538
4536
|
*/
|
|
4539
|
-
|
|
4537
|
+
simple: {
|
|
4540
4538
|
type: Boolean,
|
|
4541
4539
|
reflect: true
|
|
4542
4540
|
},
|
|
4543
4541
|
|
|
4544
4542
|
/**
|
|
4545
|
-
* If declared, the dropdown
|
|
4543
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
4544
|
+
* @attr {Boolean} chevron
|
|
4546
4545
|
*/
|
|
4547
|
-
|
|
4546
|
+
chevron: {
|
|
4548
4547
|
type: Boolean,
|
|
4549
4548
|
reflect: true
|
|
4550
4549
|
},
|
|
@@ -4558,7 +4557,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4558
4557
|
},
|
|
4559
4558
|
|
|
4560
4559
|
/**
|
|
4561
|
-
* If
|
|
4560
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4562
4561
|
*/
|
|
4563
4562
|
disableFocusTrap: {
|
|
4564
4563
|
type: Boolean,
|
|
@@ -4605,22 +4604,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4605
4604
|
reflect: true
|
|
4606
4605
|
},
|
|
4607
4606
|
|
|
4608
|
-
/**
|
|
4609
|
-
* Makes the trigger to be full width of its parent container.
|
|
4610
|
-
*/
|
|
4611
|
-
fluid: {
|
|
4612
|
-
type: Boolean,
|
|
4613
|
-
reflect: true
|
|
4614
|
-
},
|
|
4615
|
-
|
|
4616
|
-
/**
|
|
4617
|
-
* If declared, will apply padding around trigger slot content.
|
|
4618
|
-
*/
|
|
4619
|
-
inset: {
|
|
4620
|
-
type: Boolean,
|
|
4621
|
-
reflect: true
|
|
4622
|
-
},
|
|
4623
|
-
|
|
4624
4607
|
/**
|
|
4625
4608
|
* If true, the dropdown bib is displayed.
|
|
4626
4609
|
*/
|
|
@@ -4664,15 +4647,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4664
4647
|
reflect: true
|
|
4665
4648
|
},
|
|
4666
4649
|
|
|
4667
|
-
/**
|
|
4668
|
-
* Defines if there is a label preset.
|
|
4669
|
-
* @private
|
|
4670
|
-
*/
|
|
4671
|
-
labeled: {
|
|
4672
|
-
type: Boolean,
|
|
4673
|
-
reflect: true
|
|
4674
|
-
},
|
|
4675
|
-
|
|
4676
4650
|
/**
|
|
4677
4651
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4678
4652
|
* @private
|
|
@@ -4733,6 +4707,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4733
4707
|
reflect: true
|
|
4734
4708
|
},
|
|
4735
4709
|
|
|
4710
|
+
/**
|
|
4711
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4712
|
+
*/
|
|
4736
4713
|
onSlotChange: {
|
|
4737
4714
|
type: Function,
|
|
4738
4715
|
reflect: false
|
|
@@ -4747,14 +4724,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4747
4724
|
reflect: true
|
|
4748
4725
|
},
|
|
4749
4726
|
|
|
4750
|
-
/**
|
|
4751
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4752
|
-
*/
|
|
4753
|
-
rounded: {
|
|
4754
|
-
type: Boolean,
|
|
4755
|
-
reflect: true
|
|
4756
|
-
},
|
|
4757
|
-
|
|
4758
4727
|
/**
|
|
4759
4728
|
* @private
|
|
4760
4729
|
*/
|
|
@@ -4769,14 +4738,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4769
4738
|
type: String || undefined,
|
|
4770
4739
|
attribute: false,
|
|
4771
4740
|
reflect: false
|
|
4772
|
-
},
|
|
4773
|
-
|
|
4774
|
-
/**
|
|
4775
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4776
|
-
*/
|
|
4777
|
-
a11yAutocomplete: {
|
|
4778
|
-
type: String,
|
|
4779
|
-
attribute: false,
|
|
4780
4741
|
}
|
|
4781
4742
|
};
|
|
4782
4743
|
}
|
|
@@ -5224,10 +5185,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5224
5185
|
id="bib"
|
|
5225
5186
|
shape="${this.shape}"
|
|
5226
5187
|
?data-show="${this.isPopoverVisible}"
|
|
5227
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5228
|
-
?common="${this.common}"
|
|
5229
|
-
?rounded="${this.common || this.rounded}"
|
|
5230
|
-
?inset="${this.common || this.inset}">
|
|
5188
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5231
5189
|
<div class="slotContent">
|
|
5232
5190
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5233
5191
|
</div>
|
|
@@ -9849,19 +9807,19 @@ class AuroFormValidation {
|
|
|
9849
9807
|
{
|
|
9850
9808
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
9851
9809
|
validity: 'tooShort',
|
|
9852
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
9810
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
9853
9811
|
},
|
|
9854
9812
|
{
|
|
9855
9813
|
check: (e) => e.value?.length > e.maxLength,
|
|
9856
9814
|
validity: 'tooLong',
|
|
9857
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
9815
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
9858
9816
|
}
|
|
9859
9817
|
],
|
|
9860
9818
|
pattern: [
|
|
9861
9819
|
{
|
|
9862
9820
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
9863
9821
|
validity: 'patternMismatch',
|
|
9864
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
9822
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
9865
9823
|
}
|
|
9866
9824
|
]
|
|
9867
9825
|
},
|
|
@@ -10056,10 +10014,10 @@ class AuroFormValidation {
|
|
|
10056
10014
|
if (!hasValue && elem.required && elem.touched) {
|
|
10057
10015
|
elem.validity = 'valueMissing';
|
|
10058
10016
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
10059
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
10017
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
10060
10018
|
this.validateType(elem);
|
|
10061
10019
|
this.validateElementAttributes(elem);
|
|
10062
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
10020
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
10063
10021
|
this.validateElementAttributes(elem);
|
|
10064
10022
|
}
|
|
10065
10023
|
}
|
|
@@ -15417,7 +15375,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
15417
15375
|
<div id="bibTemplate" part="bibtemplate">
|
|
15418
15376
|
${this.isFullscreen ? html`
|
|
15419
15377
|
<div id="headerContainer">
|
|
15420
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15378
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15421
15379
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
15422
15380
|
</${this.buttonTag}>
|
|
15423
15381
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|