@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
|
@@ -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>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| Property | Attribute | Type | Default | Description |
|
|
9
9
|
|------------|------------|-----------|-------------|--------------------------------------------------|
|
|
10
10
|
| [disabled](#disabled) | `disabled` | `boolean` | false | Indicates if the counter is disabled. |
|
|
11
|
+
| [error](#error) | `error` | `string` | | Error state and message.<br />True if set, value is the error message. |
|
|
11
12
|
| [max](#max) | `max` | `number` | 9 | The maximum value for the counter. |
|
|
12
13
|
| [min](#min) | `min` | `number` | 0 | The minimum value for the counter. |
|
|
13
14
|
| [onDark](#onDark) | `onDark` | `boolean` | false | If declared, the counter will be rendered with onDark styles. |
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
| Property | Attribute | Type | Default | Description |
|
|
43
44
|
|---------------------------|---------------------------|--------------------------|----------------|--------------------------------------------------|
|
|
44
45
|
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
|
|
46
|
+
| [error](#error) | `error` | `string` | | The current error message to display when the component is invalid. |
|
|
45
47
|
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
|
|
46
48
|
| [isDropdown](#isDropdown) | `isDropdown` | `boolean` | false | Indicates if the counter group is displayed as a dropdown. |
|
|
47
49
|
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
|
|
@@ -340,6 +342,131 @@ counter.addEventListener('input', (event) => {
|
|
|
340
342
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
341
343
|
</auro-accordion>
|
|
342
344
|
|
|
345
|
+
### Counter with Custom Error
|
|
346
|
+
|
|
347
|
+
A custom error can be set on the counter by adding the `error` attribute the desired message.
|
|
348
|
+
|
|
349
|
+
<div class="exampleWrapper">
|
|
350
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/counter-error.html) -->
|
|
351
|
+
<!-- The below content is automatically added from ./../apiExamples/counter-error.html -->
|
|
352
|
+
<auro-counter error="There is an error with the counter">
|
|
353
|
+
Adults
|
|
354
|
+
</auro-counter>
|
|
355
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
356
|
+
</div>
|
|
357
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
358
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ondark-counter-error.html) -->
|
|
359
|
+
<!-- The below content is automatically added from ./../apiExamples/ondark-counter-error.html -->
|
|
360
|
+
<auro-counter ondark error="There is an error with the counter">
|
|
361
|
+
Adults
|
|
362
|
+
</auro-counter>
|
|
363
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
364
|
+
</div>
|
|
365
|
+
<auro-accordion alignRight>
|
|
366
|
+
<span slot="trigger">See code</span>
|
|
367
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/counter-error.html) -->
|
|
368
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/counter-error.html -->
|
|
369
|
+
|
|
370
|
+
```html
|
|
371
|
+
<auro-counter error="There is an error with the counter">
|
|
372
|
+
Adults
|
|
373
|
+
</auro-counter>
|
|
374
|
+
```
|
|
375
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
376
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ondark-counter-error.html) -->
|
|
377
|
+
<!-- The below content is automatically added from ./../apiExamples/ondark-counter-error.html -->
|
|
378
|
+
<auro-counter ondark error="There is an error with the counter">
|
|
379
|
+
Adults
|
|
380
|
+
</auro-counter>
|
|
381
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
382
|
+
</auro-accordion>
|
|
383
|
+
|
|
384
|
+
### Counter Dropdown with Errored Counters
|
|
385
|
+
|
|
386
|
+
A counter dropdown with counters in an errored state will display the errors for each errored counter by default
|
|
387
|
+
|
|
388
|
+
<div class="exampleWrapper">
|
|
389
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-error-basic.html) -->
|
|
390
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-error-basic.html -->
|
|
391
|
+
<auro-counter-group isDropdown>
|
|
392
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
393
|
+
<div slot="label">Passengers</div>
|
|
394
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
395
|
+
Adults
|
|
396
|
+
<span slot="description">18 years or older</span>
|
|
397
|
+
</auro-counter>
|
|
398
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
399
|
+
Children
|
|
400
|
+
<span slot="description">2-17 years</span>
|
|
401
|
+
</auro-counter>
|
|
402
|
+
</auro-counter-group>
|
|
403
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
404
|
+
</div>
|
|
405
|
+
<auro-accordion alignRight>
|
|
406
|
+
<span slot="trigger">See code</span>
|
|
407
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-error-basic.html) -->
|
|
408
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-error-basic.html -->
|
|
409
|
+
|
|
410
|
+
```html
|
|
411
|
+
<auro-counter-group isDropdown>
|
|
412
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
413
|
+
<div slot="label">Passengers</div>
|
|
414
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
415
|
+
Adults
|
|
416
|
+
<span slot="description">18 years or older</span>
|
|
417
|
+
</auro-counter>
|
|
418
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
419
|
+
Children
|
|
420
|
+
<span slot="description">2-17 years</span>
|
|
421
|
+
</auro-counter>
|
|
422
|
+
</auro-counter-group>
|
|
423
|
+
```
|
|
424
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
425
|
+
</auro-accordion>
|
|
426
|
+
|
|
427
|
+
### Counter Dropdown with Custom Error
|
|
428
|
+
|
|
429
|
+
The error message for a dropdown counter with errored counters can also be overridden with the `error` attribute.
|
|
430
|
+
|
|
431
|
+
<div class="exampleWrapper">
|
|
432
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-error-custom.html) -->
|
|
433
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-error-custom.html -->
|
|
434
|
+
<auro-counter-group error="Please select the appropriate number of passengers" isDropdown>
|
|
435
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
436
|
+
<div slot="label">Passengers</div>
|
|
437
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
438
|
+
Adults
|
|
439
|
+
<span slot="description">18 years or older</span>
|
|
440
|
+
</auro-counter>
|
|
441
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
442
|
+
Children
|
|
443
|
+
<span slot="description">2-17 years</span>
|
|
444
|
+
</auro-counter>
|
|
445
|
+
</auro-counter-group>
|
|
446
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
447
|
+
</div>
|
|
448
|
+
<auro-accordion alignRight>
|
|
449
|
+
<span slot="trigger">See code</span>
|
|
450
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-error-custom.html) -->
|
|
451
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-error-custom.html -->
|
|
452
|
+
|
|
453
|
+
```html
|
|
454
|
+
<auro-counter-group error="Please select the appropriate number of passengers" isDropdown>
|
|
455
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
456
|
+
<div slot="label">Passengers</div>
|
|
457
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
458
|
+
Adults
|
|
459
|
+
<span slot="description">18 years or older</span>
|
|
460
|
+
</auro-counter>
|
|
461
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
462
|
+
Children
|
|
463
|
+
<span slot="description">2-17 years</span>
|
|
464
|
+
</auro-counter>
|
|
465
|
+
</auro-counter-group>
|
|
466
|
+
```
|
|
467
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
468
|
+
</auro-accordion>
|
|
469
|
+
|
|
343
470
|
### Group Max/Min
|
|
344
471
|
|
|
345
472
|
The group counter max or min property sets the value for all counters in the group. If a counter has a max value set, the group max attribute will override it. All increment buttons as a result will be disabled to prevent the group of counters from exceeding the group max.
|