@aurodesignsystem-dev/auro-formkit 0.0.0-pr1001.0
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/CHANGELOG.md +5 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +314 -0
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +50 -0
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
- package/components/bibtemplate/dist/index.d.ts +2 -0
- package/components/bibtemplate/dist/index.js +1940 -0
- package/components/bibtemplate/dist/registered.js +1940 -0
- package/components/bibtemplate/dist/styles/color-css.d.ts +2 -0
- package/components/bibtemplate/dist/styles/style-css.d.ts +2 -0
- package/components/bibtemplate/dist/styles/tokens-css.d.ts +2 -0
- package/components/checkbox/README.md +142 -0
- package/components/checkbox/demo/api.html +61 -0
- package/components/checkbox/demo/api.js +17 -0
- package/components/checkbox/demo/api.md +436 -0
- package/components/checkbox/demo/api.min.js +1870 -0
- package/components/checkbox/demo/index.html +57 -0
- package/components/checkbox/demo/index.js +8 -0
- package/components/checkbox/demo/index.md +327 -0
- package/components/checkbox/demo/index.min.js +1845 -0
- package/components/checkbox/demo/readme.html +57 -0
- package/components/checkbox/demo/readme.md +142 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts +166 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +136 -0
- package/components/checkbox/dist/helptextVersion.d.ts +2 -0
- package/components/checkbox/dist/index.d.ts +3 -0
- package/components/checkbox/dist/index.js +1794 -0
- package/components/checkbox/dist/registered.js +1795 -0
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +2 -0
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +2 -0
- package/components/checkbox/dist/styles/color-css.d.ts +2 -0
- package/components/checkbox/dist/styles/colorGroup-css.d.ts +2 -0
- package/components/checkbox/dist/styles/tokens-css.d.ts +2 -0
- package/components/combobox/README.md +154 -0
- package/components/combobox/demo/api.html +63 -0
- package/components/combobox/demo/api.js +36 -0
- package/components/combobox/demo/api.md +1326 -0
- package/components/combobox/demo/api.min.js +18691 -0
- package/components/combobox/demo/index.html +63 -0
- package/components/combobox/demo/index.js +26 -0
- package/components/combobox/demo/index.md +725 -0
- package/components/combobox/demo/index.min.js +18545 -0
- package/components/combobox/demo/readme.html +57 -0
- package/components/combobox/demo/readme.md +154 -0
- package/components/combobox/dist/auro-combobox.d.ts +434 -0
- package/components/combobox/dist/bibtemplateVersion.d.ts +2 -0
- package/components/combobox/dist/dropdownVersion.d.ts +2 -0
- package/components/combobox/dist/index.d.ts +2 -0
- package/components/combobox/dist/index.js +16999 -0
- package/components/combobox/dist/inputVersion.d.ts +2 -0
- package/components/combobox/dist/registered.js +17001 -0
- package/components/combobox/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/style-css.d.ts +2 -0
- package/components/counter/README.md +146 -0
- package/components/counter/demo/api.html +61 -0
- package/components/counter/demo/api.js +20 -0
- package/components/counter/demo/api.md +730 -0
- package/components/counter/demo/api.min.js +10406 -0
- package/components/counter/demo/index.html +61 -0
- package/components/counter/demo/index.js +21 -0
- package/components/counter/demo/index.md +401 -0
- package/components/counter/demo/index.min.js +10370 -0
- package/components/counter/demo/readme.html +57 -0
- package/components/counter/demo/readme.md +146 -0
- package/components/counter/dist/auro-counter-button.d.ts +14 -0
- package/components/counter/dist/auro-counter-group.d.ts +386 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts +22 -0
- package/components/counter/dist/auro-counter.d.ts +113 -0
- package/components/counter/dist/bibtemplateVersion.d.ts +2 -0
- package/components/counter/dist/dropdownVersion.d.ts +2 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +2 -0
- package/components/counter/dist/index.d.ts +3 -0
- package/components/counter/dist/index.js +10313 -0
- package/components/counter/dist/registered.js +10314 -0
- package/components/counter/dist/styles/color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
- package/components/counter/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/counter/dist/styles/style-css.d.ts +2 -0
- package/components/counter/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/README.md +141 -0
- package/components/datepicker/demo/api.html +63 -0
- package/components/datepicker/demo/api.js +35 -0
- package/components/datepicker/demo/api.md +1529 -0
- package/components/datepicker/demo/api.min.js +29755 -0
- package/components/datepicker/demo/index.html +62 -0
- package/components/datepicker/demo/index.js +19 -0
- package/components/datepicker/demo/index.md +204 -0
- package/components/datepicker/demo/index.min.js +29476 -0
- package/components/datepicker/demo/readme.html +57 -0
- package/components/datepicker/demo/readme.md +141 -0
- package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
- package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
- package/components/datepicker/dist/auro-calendar.d.ts +133 -0
- package/components/datepicker/dist/auro-datepicker.d.ts +625 -0
- package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
- package/components/datepicker/dist/buttonVersion.d.ts +2 -0
- package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.d.ts +2 -0
- package/components/datepicker/dist/index.js +29406 -0
- package/components/datepicker/dist/inputVersion.d.ts +2 -0
- package/components/datepicker/dist/popoverVersion.d.ts +2 -0
- package/components/datepicker/dist/registered.js +29406 -0
- package/components/datepicker/dist/styles/classic/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/dist/utilities.d.ts +78 -0
- package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
- package/components/dropdown/README.md +144 -0
- package/components/dropdown/demo/api.html +63 -0
- package/components/dropdown/demo/api.js +21 -0
- package/components/dropdown/demo/api.md +1266 -0
- package/components/dropdown/demo/api.min.js +4442 -0
- package/components/dropdown/demo/index.html +61 -0
- package/components/dropdown/demo/index.js +19 -0
- package/components/dropdown/demo/index.md +337 -0
- package/components/dropdown/demo/index.min.js +4405 -0
- package/components/dropdown/demo/readme.html +57 -0
- package/components/dropdown/demo/readme.md +144 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +425 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +68 -0
- package/components/dropdown/dist/dropdownVersion.d.ts +2 -0
- package/components/dropdown/dist/helptextVersion.d.ts +2 -0
- package/components/dropdown/dist/iconVersion.d.ts +2 -0
- package/components/dropdown/dist/index.d.ts +2 -0
- package/components/dropdown/dist/index.js +4350 -0
- package/components/dropdown/dist/registered.js +4350 -0
- package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
- package/components/form/README.md +142 -0
- package/components/form/demo/api.html +56 -0
- package/components/form/demo/api.js +3 -0
- package/components/form/demo/api.md +51 -0
- package/components/form/demo/api.min.js +638 -0
- package/components/form/demo/autocomplete.html +31 -0
- package/components/form/demo/index.html +57 -0
- package/components/form/demo/index.js +4 -0
- package/components/form/demo/index.md +403 -0
- package/components/form/demo/index.min.js +639 -0
- package/components/form/demo/readme.html +57 -0
- package/components/form/demo/readme.md +142 -0
- package/components/form/demo/registerDemoDeps.js +23 -0
- package/components/form/demo/working.html +124 -0
- package/components/form/dist/auro-form.d.ts +223 -0
- package/components/form/dist/index.d.ts +2 -0
- package/components/form/dist/index.js +614 -0
- package/components/form/dist/registered.d.ts +1 -0
- package/components/form/dist/registered.js +614 -0
- package/components/form/dist/styles/style-css.d.ts +2 -0
- package/components/helptext/dist/auro-helptext.d.ts +59 -0
- package/components/helptext/dist/index.d.ts +2 -0
- package/components/helptext/dist/index.js +207 -0
- package/components/helptext/dist/registered.js +207 -0
- package/components/helptext/dist/styles/color-css.d.ts +2 -0
- package/components/helptext/dist/styles/style-css.d.ts +2 -0
- package/components/helptext/dist/styles/tokens-css.d.ts +2 -0
- package/components/input/README.md +139 -0
- package/components/input/demo/api.html +48 -0
- package/components/input/demo/api.js +29 -0
- package/components/input/demo/api.md +1366 -0
- package/components/input/demo/api.min.js +8542 -0
- package/components/input/demo/index.html +49 -0
- package/components/input/demo/index.js +20 -0
- package/components/input/demo/index.md +270 -0
- package/components/input/demo/index.min.js +8461 -0
- package/components/input/demo/readme.html +57 -0
- package/components/input/demo/readme.md +139 -0
- package/components/input/dist/auro-input.d.ts +167 -0
- package/components/input/dist/base-input.d.ts +566 -0
- package/components/input/dist/buttonVersion.d.ts +2 -0
- package/components/input/dist/helptextVersion.d.ts +2 -0
- package/components/input/dist/i18n.d.ts +18 -0
- package/components/input/dist/iconVersion.d.ts +2 -0
- package/components/input/dist/index.d.ts +2 -0
- package/components/input/dist/index.js +8367 -0
- package/components/input/dist/registered.js +8367 -0
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/dist/styles/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/borders-css.d.ts +2 -0
- package/components/input/dist/styles/default/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
- package/components/input/dist/styles/default/style-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/input/dist/styles/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/input/dist/styles/style-css.d.ts +2 -0
- package/components/input/dist/styles/tokens-css.d.ts +2 -0
- package/components/input/dist/utilities.d.ts +25 -0
- package/components/layoutElement/dist/auroElement.d.ts +34 -0
- package/components/layoutElement/dist/index.d.ts +2 -0
- package/components/layoutElement/dist/index.js +98 -0
- package/components/layoutElement/dist/registered.js +98 -0
- package/components/menu/README.md +145 -0
- package/components/menu/demo/api.html +62 -0
- package/components/menu/demo/api.js +27 -0
- package/components/menu/demo/api.md +1011 -0
- package/components/menu/demo/api.min.js +1762 -0
- package/components/menu/demo/index.html +58 -0
- package/components/menu/demo/index.js +28 -0
- package/components/menu/demo/index.md +61 -0
- package/components/menu/demo/index.min.js +1708 -0
- package/components/menu/demo/readme.html +57 -0
- package/components/menu/demo/readme.md +145 -0
- package/components/menu/dist/auro-menu-utils.d.ts +34 -0
- package/components/menu/dist/auro-menu.d.ts +246 -0
- package/components/menu/dist/auro-menuoption.d.ts +81 -0
- package/components/menu/dist/dropdownVersion.d.ts +2 -0
- package/components/menu/dist/iconVersion.d.ts +2 -0
- package/components/menu/dist/index.d.ts +4 -0
- package/components/menu/dist/index.js +1691 -0
- package/components/menu/dist/registered.js +1651 -0
- package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/README.md +137 -0
- package/components/radio/demo/api.html +59 -0
- package/components/radio/demo/api.js +19 -0
- package/components/radio/demo/api.md +602 -0
- package/components/radio/demo/api.min.js +1951 -0
- package/components/radio/demo/index.html +56 -0
- package/components/radio/demo/index.js +8 -0
- package/components/radio/demo/index.md +150 -0
- package/components/radio/demo/index.min.js +1908 -0
- package/components/radio/demo/readme.html +57 -0
- package/components/radio/demo/readme.md +137 -0
- package/components/radio/dist/auro-radio-group.d.ts +194 -0
- package/components/radio/dist/auro-radio.d.ts +147 -0
- package/components/radio/dist/helptextVersion.d.ts +2 -0
- package/components/radio/dist/index.d.ts +3 -0
- package/components/radio/dist/index.js +1857 -0
- package/components/radio/dist/registered.js +1858 -0
- package/components/radio/dist/styles/auro-radio-group-css.d.ts +2 -0
- package/components/radio/dist/styles/color-css.d.ts +2 -0
- package/components/radio/dist/styles/groupColor-css.d.ts +2 -0
- package/components/radio/dist/styles/style-css.d.ts +2 -0
- package/components/radio/dist/styles/tokens-css.d.ts +2 -0
- package/components/select/README.md +145 -0
- package/components/select/demo/api.html +77 -0
- package/components/select/demo/api.js +35 -0
- package/components/select/demo/api.md +1413 -0
- package/components/select/demo/api.min.js +10502 -0
- package/components/select/demo/index.html +73 -0
- package/components/select/demo/index.js +9 -0
- package/components/select/demo/index.md +1151 -0
- package/components/select/demo/index.min.js +10390 -0
- package/components/select/demo/readme.html +57 -0
- package/components/select/demo/readme.md +145 -0
- package/components/select/dist/auro-select.d.ts +512 -0
- package/components/select/dist/bibtemplateVersion.d.ts +2 -0
- package/components/select/dist/dropdownVersion.d.ts +2 -0
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.d.ts +2 -0
- package/components/select/dist/index.js +8898 -0
- package/components/select/dist/registered.js +8898 -0
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/style-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +218 -0
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/api.md) -->
|
|
2
|
+
<!-- The below content is automatically added from ./../docs/api.md -->
|
|
3
|
+
|
|
4
|
+
# auro-counter
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|------------|------------|-----------|-------------|--------------------------------------------------|
|
|
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. |
|
|
12
|
+
| [max](#max) | `max` | `number` | 9 | The maximum value for the counter. |
|
|
13
|
+
| [min](#min) | `min` | `number` | 0 | The minimum value for the counter. |
|
|
14
|
+
| [onDark](#onDark) | `onDark` | `boolean` | false | If declared, the counter will be rendered with onDark styles. |
|
|
15
|
+
| [validity](#validity) | `validity` | `string` | "undefined" | The validity state of the counter. |
|
|
16
|
+
| [value](#value) | `value` | `number` | "undefined" | The current value of the counter. |
|
|
17
|
+
|
|
18
|
+
## Methods
|
|
19
|
+
|
|
20
|
+
| Method | Type | Description |
|
|
21
|
+
|-------------|----------------------------------------|--------------------------------------------------|
|
|
22
|
+
| [decrement](#decrement) | `(value?: number \| undefined): void` | Decrements the value of the counter by 1. If a value is provided, it decrements by that amount.<br /><br />**value**: The amount to decrement by. |
|
|
23
|
+
| [increment](#increment) | `(value?: number \| undefined): void` | Increments the counter value by 1. If a value is provided, it increments by that amount.<br /><br />**value**: The amount to increment by. |
|
|
24
|
+
| [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
25
|
+
|
|
26
|
+
## Events
|
|
27
|
+
|
|
28
|
+
| Event | Type |
|
|
29
|
+
|---------|------------------------------------------------|
|
|
30
|
+
| [input](#input) | `CustomEvent<{ value: number \| undefined; }>` |
|
|
31
|
+
|
|
32
|
+
## Slots
|
|
33
|
+
|
|
34
|
+
| Name | Description |
|
|
35
|
+
|---------------|--------------------------------------|
|
|
36
|
+
| [default](#default) | Main label content for the counter. |
|
|
37
|
+
| [description](#description) | Descriptive content for the counter. |
|
|
38
|
+
|
|
39
|
+
# auro-counter-group
|
|
40
|
+
|
|
41
|
+
## Properties
|
|
42
|
+
|
|
43
|
+
| Property | Attribute | Type | Default | Description |
|
|
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. |
|
|
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. |
|
|
48
|
+
| [isDropdown](#isDropdown) | `isDropdown` | `boolean` | false | Indicates if the counter group is displayed as a dropdown. |
|
|
49
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
|
|
50
|
+
| [layout](#layout) | | `'classic'\|'snowflake'` | | Determines the layout style of the counter group when it is a dropdown. Options are 'classic' or 'snowflake'. Default is 'classic'. |
|
|
51
|
+
| [matchWidth](#matchWidth) | `matchWidth` | `boolean` | false | If declared, the dropdown will expand to the width of its parent container.<br />Otherwise, the dropdown width will be determined by its content. |
|
|
52
|
+
| [max](#max) | `max` | `number` | "undefined" | The maximum value allowed for the whole group of counters. |
|
|
53
|
+
| [min](#min) | `min` | `number` | "undefined" | The minimum value allowed for the whole group of counters. |
|
|
54
|
+
| [noFlip](#noFlip) | `noFlip` | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
|
|
55
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
56
|
+
| [onDark](#onDark) | `onDark` | `boolean` | false | If declared, counters and dropdown will be rendered with onDark styles. |
|
|
57
|
+
| [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end". |
|
|
58
|
+
| [total](#total) | `total` | `number` | "undefined" | The total value of the counters. |
|
|
59
|
+
| [validity](#validity) | `validity` | `string` | "undefined" | Reflects the validity state. |
|
|
60
|
+
| [value](#value) | `value` | `object` | "undefined" | The current individual values of the nested counters. |
|
|
61
|
+
|
|
62
|
+
## Methods
|
|
63
|
+
|
|
64
|
+
| Method | Type | Description |
|
|
65
|
+
|------------|----------------------------------------|--------------------------------------------------|
|
|
66
|
+
| [hideBib](#hideBib) | `(): void` | Hides the dropdown bib if its open. |
|
|
67
|
+
| [showBib](#showBib) | `(): void` | Shows the dropdown bib if there are options to show. |
|
|
68
|
+
| [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
69
|
+
|
|
70
|
+
## Events
|
|
71
|
+
|
|
72
|
+
| Event | Type |
|
|
73
|
+
|---------|--------------------------------------------------|
|
|
74
|
+
| [input](#input) | `CustomEvent<{ total: number \| undefined; value: {} \| undefined; }>` |
|
|
75
|
+
|
|
76
|
+
## Slots
|
|
77
|
+
|
|
78
|
+
| Name | Description |
|
|
79
|
+
|---------------------------|--------------------------------------------------|
|
|
80
|
+
| `ariaLabel.bib.close` | Sets aria-label on close button in fullscreen bib |
|
|
81
|
+
| `bib.fullscreen.footer` | Defines the footer to display at the bottom of fullscreen bib. Only used when `isDropdown` is true. |
|
|
82
|
+
| `bib.fullscreen.headline` | Defines the headline to display above menu-options. Only used when `isDropdown` is true. Required. |
|
|
83
|
+
| [default](#default) | Slot for counter elements. |
|
|
84
|
+
| [helpText](#helpText) | Dropdown help text content. Only used when `isDropdown` is true. |
|
|
85
|
+
| [label](#label) | Dropdown label content. Only used when `isDropdown` is true. |
|
|
86
|
+
| [valueText](#valueText) | Dropdown value text display. Only used when `isDropdown` is true. |
|
|
87
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
88
|
+
|
|
89
|
+
## API Examples
|
|
90
|
+
|
|
91
|
+
### Counter
|
|
92
|
+
|
|
93
|
+
#### Min/Max and Value
|
|
94
|
+
<div class="exampleWrapper">
|
|
95
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/counter-minmax.html) -->
|
|
96
|
+
<!-- The below content is automatically added from ./../apiExamples/counter-minmax.html -->
|
|
97
|
+
<auro-counter min="1" max="5" value="2">
|
|
98
|
+
Adults
|
|
99
|
+
<span slot="description">Min: 1, Max: 5</span>
|
|
100
|
+
</auro-counter>
|
|
101
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
102
|
+
</div>
|
|
103
|
+
<auro-accordion alignRight>
|
|
104
|
+
<span slot="trigger">See code</span>
|
|
105
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/counter-minmax.html) -->
|
|
106
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/counter-minmax.html -->
|
|
107
|
+
|
|
108
|
+
```html
|
|
109
|
+
<auro-counter min="1" max="5" value="2">
|
|
110
|
+
Adults
|
|
111
|
+
<span slot="description">Min: 1, Max: 5</span>
|
|
112
|
+
</auro-counter>
|
|
113
|
+
```
|
|
114
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
115
|
+
</auro-accordion>
|
|
116
|
+
|
|
117
|
+
#### Disabled State
|
|
118
|
+
|
|
119
|
+
<div class="exampleWrapper">
|
|
120
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/counter-disabled.html) -->
|
|
121
|
+
<!-- The below content is automatically added from ./../apiExamples/counter-disabled.html -->
|
|
122
|
+
<auro-counter disabled value="0">
|
|
123
|
+
Disabled counter
|
|
124
|
+
<span slot="description">This counter cannot be modified</span>
|
|
125
|
+
</auro-counter>
|
|
126
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
127
|
+
</div>
|
|
128
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
129
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkDisabled.html) -->
|
|
130
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkDisabled.html -->
|
|
131
|
+
<auro-counter onDark disabled value="0">
|
|
132
|
+
Disabled counter
|
|
133
|
+
<span slot="description">This counter cannot be modified</span>
|
|
134
|
+
</auro-counter>
|
|
135
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
136
|
+
</div>
|
|
137
|
+
<auro-accordion alignRight>
|
|
138
|
+
<span slot="trigger">See code</span>
|
|
139
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/counter-disabled.html) -->
|
|
140
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/counter-disabled.html -->
|
|
141
|
+
|
|
142
|
+
```html
|
|
143
|
+
<auro-counter disabled value="0">
|
|
144
|
+
Disabled counter
|
|
145
|
+
<span slot="description">This counter cannot be modified</span>
|
|
146
|
+
</auro-counter>
|
|
147
|
+
```
|
|
148
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
149
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkDisabled.html) -->
|
|
150
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkDisabled.html -->
|
|
151
|
+
<auro-counter onDark disabled value="0">
|
|
152
|
+
Disabled counter
|
|
153
|
+
<span slot="description">This counter cannot be modified</span>
|
|
154
|
+
</auro-counter>
|
|
155
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
156
|
+
</auro-accordion>
|
|
157
|
+
|
|
158
|
+
### Counter Group
|
|
159
|
+
|
|
160
|
+
#### Group Properties
|
|
161
|
+
All available counter-group properties:
|
|
162
|
+
|
|
163
|
+
<div class="exampleWrapper">
|
|
164
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/api-group-properties.html) -->
|
|
165
|
+
<!-- The below content is automatically added from ./../apiExamples/api-group-properties.html -->
|
|
166
|
+
<!-- Example of counter-group properties -->
|
|
167
|
+
<auro-counter-group max="10" min="2" isDropdown>
|
|
168
|
+
<div slot="bib.fullscreen.headline">Group fullscreen label</div>
|
|
169
|
+
<div slot="label">Group with all properties</div>
|
|
170
|
+
<div slot="helpText">Total must be between 2-10</div>
|
|
171
|
+
<div slot="valueText">Custom total display</div>
|
|
172
|
+
<auro-counter>
|
|
173
|
+
Counter 1
|
|
174
|
+
</auro-counter>
|
|
175
|
+
<auro-counter>
|
|
176
|
+
Counter 2
|
|
177
|
+
</auro-counter>
|
|
178
|
+
</auro-counter-group>
|
|
179
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
180
|
+
</div>
|
|
181
|
+
<auro-accordion alignRight>
|
|
182
|
+
<span slot="trigger">See code</span>
|
|
183
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/api-group-properties.html) -->
|
|
184
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/api-group-properties.html -->
|
|
185
|
+
|
|
186
|
+
```html
|
|
187
|
+
<!-- Example of counter-group properties -->
|
|
188
|
+
<auro-counter-group max="10" min="2" isDropdown>
|
|
189
|
+
<div slot="bib.fullscreen.headline">Group fullscreen label</div>
|
|
190
|
+
<div slot="label">Group with all properties</div>
|
|
191
|
+
<div slot="helpText">Total must be between 2-10</div>
|
|
192
|
+
<div slot="valueText">Custom total display</div>
|
|
193
|
+
<auro-counter>
|
|
194
|
+
Counter 1
|
|
195
|
+
</auro-counter>
|
|
196
|
+
<auro-counter>
|
|
197
|
+
Counter 2
|
|
198
|
+
</auro-counter>
|
|
199
|
+
</auro-counter-group>
|
|
200
|
+
```
|
|
201
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
202
|
+
</auro-accordion>
|
|
203
|
+
|
|
204
|
+
#### Available Slots
|
|
205
|
+
All available slots for both components:
|
|
206
|
+
|
|
207
|
+
<div class="exampleWrapper">
|
|
208
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/api-slots.html) -->
|
|
209
|
+
<!-- The below content is automatically added from ./../apiExamples/api-slots.html -->
|
|
210
|
+
<!-- Example of all available slots -->
|
|
211
|
+
<auro-counter-group isDropdown>
|
|
212
|
+
<!-- Group slots -->
|
|
213
|
+
<div slot="label">Group with all slots</div>
|
|
214
|
+
<div slot="bib.fullscreen.headline">Group fullscreen label</div>
|
|
215
|
+
<div slot="helpText">Help text appears below the group</div>
|
|
216
|
+
<div slot="valueText">Custom value display</div>
|
|
217
|
+
<!-- Counter with all slots -->
|
|
218
|
+
<auro-counter>
|
|
219
|
+
Default slot content
|
|
220
|
+
<span slot="description">Description slot content</span>
|
|
221
|
+
</auro-counter>
|
|
222
|
+
</auro-counter-group>
|
|
223
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
224
|
+
</div>
|
|
225
|
+
<auro-accordion alignRight>
|
|
226
|
+
<span slot="trigger">See code</span>
|
|
227
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/api-slots.html) -->
|
|
228
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/api-slots.html -->
|
|
229
|
+
|
|
230
|
+
```html
|
|
231
|
+
<!-- Example of all available slots -->
|
|
232
|
+
<auro-counter-group isDropdown>
|
|
233
|
+
<!-- Group slots -->
|
|
234
|
+
<div slot="label">Group with all slots</div>
|
|
235
|
+
<div slot="bib.fullscreen.headline">Group fullscreen label</div>
|
|
236
|
+
<div slot="helpText">Help text appears below the group</div>
|
|
237
|
+
<div slot="valueText">Custom value display</div>
|
|
238
|
+
<!-- Counter with all slots -->
|
|
239
|
+
<auro-counter>
|
|
240
|
+
Default slot content
|
|
241
|
+
<span slot="description">Description slot content</span>
|
|
242
|
+
</auro-counter>
|
|
243
|
+
</auro-counter-group>
|
|
244
|
+
```
|
|
245
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
246
|
+
</auro-accordion>
|
|
247
|
+
|
|
248
|
+
### Event Handling
|
|
249
|
+
Listen for `input` events to react to user interactions.
|
|
250
|
+
|
|
251
|
+
<code id="eventOutput">
|
|
252
|
+
Event values will appear here
|
|
253
|
+
</code><br><br>
|
|
254
|
+
<div class="exampleWrapper">
|
|
255
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/events.html) -->
|
|
256
|
+
<!-- The below content is automatically added from ./../apiExamples/events.html -->
|
|
257
|
+
<auro-counter-group id="eventExample">
|
|
258
|
+
<auro-counter>
|
|
259
|
+
Adults
|
|
260
|
+
</auro-counter>
|
|
261
|
+
<auro-counter>
|
|
262
|
+
Children
|
|
263
|
+
</auro-counter>
|
|
264
|
+
</auro-counter-group>
|
|
265
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
266
|
+
</div>
|
|
267
|
+
<auro-accordion alignRight>
|
|
268
|
+
<span slot="trigger">See code</span>
|
|
269
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/events.html) -->
|
|
270
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/events.html -->
|
|
271
|
+
|
|
272
|
+
```html
|
|
273
|
+
<auro-counter-group id="eventExample">
|
|
274
|
+
<auro-counter>
|
|
275
|
+
Adults
|
|
276
|
+
</auro-counter>
|
|
277
|
+
<auro-counter>
|
|
278
|
+
Children
|
|
279
|
+
</auro-counter>
|
|
280
|
+
</auro-counter-group>
|
|
281
|
+
```
|
|
282
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
283
|
+
----
|
|
284
|
+
|
|
285
|
+
```javascript
|
|
286
|
+
const counter = document.getElementById('eventExample');
|
|
287
|
+
counter.addEventListener('input', (event) => {
|
|
288
|
+
console.log(`Values updated: ${JSON.stringify(event.detail)}`);
|
|
289
|
+
});
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
</auro-accordion>
|
|
293
|
+
|
|
294
|
+
#### Custom Value Display
|
|
295
|
+
<div class="exampleWrapper">
|
|
296
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-value-text.html) -->
|
|
297
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-value-text.html -->
|
|
298
|
+
<div style="max-width: 350px;">
|
|
299
|
+
<auro-counter-group isDropdown>
|
|
300
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
301
|
+
<span slot="bib.fullscreen.headline">Passengers</span>
|
|
302
|
+
<div slot="valueText">Custom value text</div>
|
|
303
|
+
<div slot="label"></div>
|
|
304
|
+
<auro-counter>
|
|
305
|
+
Adults
|
|
306
|
+
<span slot="description">18 years or older</span>
|
|
307
|
+
</auro-counter>
|
|
308
|
+
<auro-counter>
|
|
309
|
+
Children
|
|
310
|
+
<span slot="description">Under 17 years old. Restrictions apply if traveling without an adult.</span>
|
|
311
|
+
</auro-counter>
|
|
312
|
+
<auro-counter>
|
|
313
|
+
Lap Infants
|
|
314
|
+
<span slot="description">Under 2 years</span>
|
|
315
|
+
</auro-counter>
|
|
316
|
+
</auro-counter-group>
|
|
317
|
+
</div>
|
|
318
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
319
|
+
</div>
|
|
320
|
+
<auro-accordion alignRight>
|
|
321
|
+
<span slot="trigger">See code</span>
|
|
322
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-value-text.html) -->
|
|
323
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-value-text.html -->
|
|
324
|
+
|
|
325
|
+
```html
|
|
326
|
+
<div style="max-width: 350px;">
|
|
327
|
+
<auro-counter-group isDropdown>
|
|
328
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
329
|
+
<span slot="bib.fullscreen.headline">Passengers</span>
|
|
330
|
+
<div slot="valueText">Custom value text</div>
|
|
331
|
+
<div slot="label"></div>
|
|
332
|
+
<auro-counter>
|
|
333
|
+
Adults
|
|
334
|
+
<span slot="description">18 years or older</span>
|
|
335
|
+
</auro-counter>
|
|
336
|
+
<auro-counter>
|
|
337
|
+
Children
|
|
338
|
+
<span slot="description">Under 17 years old. Restrictions apply if traveling without an adult.</span>
|
|
339
|
+
</auro-counter>
|
|
340
|
+
<auro-counter>
|
|
341
|
+
Lap Infants
|
|
342
|
+
<span slot="description">Under 2 years</span>
|
|
343
|
+
</auro-counter>
|
|
344
|
+
</auro-counter-group>
|
|
345
|
+
</div>
|
|
346
|
+
```
|
|
347
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
348
|
+
</auro-accordion>
|
|
349
|
+
|
|
350
|
+
### Counter with Custom Error
|
|
351
|
+
|
|
352
|
+
A custom error can be set on the counter by adding the `error` attribute the desired message.
|
|
353
|
+
|
|
354
|
+
<div class="exampleWrapper">
|
|
355
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/counter-error.html) -->
|
|
356
|
+
<!-- The below content is automatically added from ./../apiExamples/counter-error.html -->
|
|
357
|
+
<auro-counter error="There is an error with the counter">
|
|
358
|
+
Adults
|
|
359
|
+
</auro-counter>
|
|
360
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
361
|
+
</div>
|
|
362
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
363
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ondark-counter-error.html) -->
|
|
364
|
+
<!-- The below content is automatically added from ./../apiExamples/ondark-counter-error.html -->
|
|
365
|
+
<auro-counter ondark error="There is an error with the counter">
|
|
366
|
+
Adults
|
|
367
|
+
</auro-counter>
|
|
368
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
369
|
+
</div>
|
|
370
|
+
<auro-accordion alignRight>
|
|
371
|
+
<span slot="trigger">See code</span>
|
|
372
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/counter-error.html) -->
|
|
373
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/counter-error.html -->
|
|
374
|
+
|
|
375
|
+
```html
|
|
376
|
+
<auro-counter error="There is an error with the counter">
|
|
377
|
+
Adults
|
|
378
|
+
</auro-counter>
|
|
379
|
+
```
|
|
380
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
381
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ondark-counter-error.html) -->
|
|
382
|
+
<!-- The below content is automatically added from ./../apiExamples/ondark-counter-error.html -->
|
|
383
|
+
<auro-counter ondark error="There is an error with the counter">
|
|
384
|
+
Adults
|
|
385
|
+
</auro-counter>
|
|
386
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
387
|
+
</auro-accordion>
|
|
388
|
+
|
|
389
|
+
### Counter Dropdown with Errored Counters
|
|
390
|
+
|
|
391
|
+
A counter dropdown with counters in an errored state will display the errors for each errored counter by default
|
|
392
|
+
|
|
393
|
+
<div class="exampleWrapper">
|
|
394
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-error-basic.html) -->
|
|
395
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-error-basic.html -->
|
|
396
|
+
<auro-counter-group isDropdown>
|
|
397
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
398
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
399
|
+
<div slot="label">Passengers</div>
|
|
400
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
401
|
+
Adults
|
|
402
|
+
<span slot="description">18 years or older</span>
|
|
403
|
+
</auro-counter>
|
|
404
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
405
|
+
Children
|
|
406
|
+
<span slot="description">2-17 years</span>
|
|
407
|
+
</auro-counter>
|
|
408
|
+
</auro-counter-group>
|
|
409
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
410
|
+
</div>
|
|
411
|
+
<auro-accordion alignRight>
|
|
412
|
+
<span slot="trigger">See code</span>
|
|
413
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-error-basic.html) -->
|
|
414
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-error-basic.html -->
|
|
415
|
+
|
|
416
|
+
```html
|
|
417
|
+
<auro-counter-group isDropdown>
|
|
418
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
419
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
420
|
+
<div slot="label">Passengers</div>
|
|
421
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
422
|
+
Adults
|
|
423
|
+
<span slot="description">18 years or older</span>
|
|
424
|
+
</auro-counter>
|
|
425
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
426
|
+
Children
|
|
427
|
+
<span slot="description">2-17 years</span>
|
|
428
|
+
</auro-counter>
|
|
429
|
+
</auro-counter-group>
|
|
430
|
+
```
|
|
431
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
432
|
+
</auro-accordion>
|
|
433
|
+
|
|
434
|
+
### Counter Dropdown with Custom Error
|
|
435
|
+
|
|
436
|
+
The error message for a dropdown counter with errored counters can also be overridden with the `error` attribute.
|
|
437
|
+
|
|
438
|
+
<div class="exampleWrapper">
|
|
439
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-error-custom.html) -->
|
|
440
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-error-custom.html -->
|
|
441
|
+
<auro-counter-group error="Please select the appropriate number of passengers" isDropdown>
|
|
442
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
443
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
444
|
+
<div slot="label">Passengers</div>
|
|
445
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
446
|
+
Adults
|
|
447
|
+
<span slot="description">18 years or older</span>
|
|
448
|
+
</auro-counter>
|
|
449
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
450
|
+
Children
|
|
451
|
+
<span slot="description">2-17 years</span>
|
|
452
|
+
</auro-counter>
|
|
453
|
+
</auro-counter-group>
|
|
454
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
455
|
+
</div>
|
|
456
|
+
<auro-accordion alignRight>
|
|
457
|
+
<span slot="trigger">See code</span>
|
|
458
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-error-custom.html) -->
|
|
459
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-error-custom.html -->
|
|
460
|
+
|
|
461
|
+
```html
|
|
462
|
+
<auro-counter-group error="Please select the appropriate number of passengers" isDropdown>
|
|
463
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
464
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
465
|
+
<div slot="label">Passengers</div>
|
|
466
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
467
|
+
Adults
|
|
468
|
+
<span slot="description">18 years or older</span>
|
|
469
|
+
</auro-counter>
|
|
470
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
471
|
+
Children
|
|
472
|
+
<span slot="description">2-17 years</span>
|
|
473
|
+
</auro-counter>
|
|
474
|
+
</auro-counter-group>
|
|
475
|
+
```
|
|
476
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
477
|
+
</auro-accordion>
|
|
478
|
+
|
|
479
|
+
### Group Max/Min
|
|
480
|
+
|
|
481
|
+
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.
|
|
482
|
+
|
|
483
|
+
**Example has group max set to 12**
|
|
484
|
+
|
|
485
|
+
<div class="exampleWrapper">
|
|
486
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/group-max.html) -->
|
|
487
|
+
<!-- The below content is automatically added from ./../apiExamples/group-max.html -->
|
|
488
|
+
<auro-counter-group max="12" min="0">
|
|
489
|
+
<auro-counter>
|
|
490
|
+
Short label
|
|
491
|
+
</auro-counter>
|
|
492
|
+
<auro-counter>
|
|
493
|
+
This is an example of the wrapping behavior for a long label
|
|
494
|
+
</auro-counter>
|
|
495
|
+
</auro-counter-group>
|
|
496
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
497
|
+
</div>
|
|
498
|
+
<auro-accordion alignRight>
|
|
499
|
+
<span slot="trigger">See code</span>
|
|
500
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/group-max.html) -->
|
|
501
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/group-max.html -->
|
|
502
|
+
|
|
503
|
+
```html
|
|
504
|
+
<auro-counter-group max="12" min="0">
|
|
505
|
+
<auro-counter>
|
|
506
|
+
Short label
|
|
507
|
+
</auro-counter>
|
|
508
|
+
<auro-counter>
|
|
509
|
+
This is an example of the wrapping behavior for a long label
|
|
510
|
+
</auro-counter>
|
|
511
|
+
</auro-counter-group>
|
|
512
|
+
```
|
|
513
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
514
|
+
</auro-accordion>
|
|
515
|
+
|
|
516
|
+
### Counter Max/Min
|
|
517
|
+
|
|
518
|
+
You can also individually set the max or min value for each counter in a group.
|
|
519
|
+
|
|
520
|
+
**Example has group max set to 12**
|
|
521
|
+
|
|
522
|
+
<div class="exampleWrapper">
|
|
523
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/group-counter-max.html) -->
|
|
524
|
+
<!-- The below content is automatically added from ./../apiExamples/group-counter-max.html -->
|
|
525
|
+
<auro-counter-group max="12" min="0">
|
|
526
|
+
<auro-counter max="5">
|
|
527
|
+
This counter has a max value of 5
|
|
528
|
+
</auro-counter>
|
|
529
|
+
<auro-counter max="8">
|
|
530
|
+
This counter has a max value of 8
|
|
531
|
+
</auro-counter>
|
|
532
|
+
</auro-counter-group>
|
|
533
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
534
|
+
</div>
|
|
535
|
+
<auro-accordion alignRight>
|
|
536
|
+
<span slot="trigger">See code</span>
|
|
537
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/group-counter-max.html) -->
|
|
538
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/group-counter-max.html -->
|
|
539
|
+
|
|
540
|
+
```html
|
|
541
|
+
<auro-counter-group max="12" min="0">
|
|
542
|
+
<auro-counter max="5">
|
|
543
|
+
This counter has a max value of 5
|
|
544
|
+
</auro-counter>
|
|
545
|
+
<auro-counter max="8">
|
|
546
|
+
This counter has a max value of 8
|
|
547
|
+
</auro-counter>
|
|
548
|
+
</auro-counter-group>
|
|
549
|
+
```
|
|
550
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
551
|
+
</auro-accordion>
|
|
552
|
+
|
|
553
|
+
### Customized bib position
|
|
554
|
+
The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
|
|
555
|
+
|
|
556
|
+
- `placement` specifies the preferred position where the bib should appear relative to the trigger.
|
|
557
|
+
- `offset` sets the distance between the trigger and the bib.
|
|
558
|
+
- When `autoPlacement` is enabled, smart positioning logic is applied to determine the best placement for the bib. If all sides have sufficient space, the bib will appear in the position specified by `placement`.
|
|
559
|
+
- Unless `noFlip` is enabled, if there isn't enough space for the preferred `placement`, the bib will automatically flip to an alternative position.
|
|
560
|
+
|
|
561
|
+
<div class="exampleWrapper">
|
|
562
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floaterConfig.html) -->
|
|
563
|
+
<!-- The below content is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
564
|
+
<div style="width: 350px">
|
|
565
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end">
|
|
566
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
567
|
+
<span slot="label">Label</span>
|
|
568
|
+
<span slot="helpText">bottom-end bib with 20px offset</span>
|
|
569
|
+
<auro-counter>
|
|
570
|
+
Adults
|
|
571
|
+
<span slot="description">18 years or older</span>
|
|
572
|
+
</auro-counter>
|
|
573
|
+
<auro-counter>
|
|
574
|
+
Children
|
|
575
|
+
<span slot="description">2-17 years</span>
|
|
576
|
+
</auro-counter>
|
|
577
|
+
</auro-counter-group>
|
|
578
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end" noFlip>
|
|
579
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
580
|
+
<span slot="label">Label</span>
|
|
581
|
+
<span slot="helpText">bottom-end bib with 20px offset and noFlip</span>
|
|
582
|
+
<auro-counter>
|
|
583
|
+
Adults
|
|
584
|
+
<span slot="description">18 years or older</span>
|
|
585
|
+
</auro-counter>
|
|
586
|
+
<auro-counter>
|
|
587
|
+
Children
|
|
588
|
+
<span slot="description">2-17 years</span>
|
|
589
|
+
</auro-counter>
|
|
590
|
+
</auro-counter-group>
|
|
591
|
+
<auro-counter-group isDropdown offset="20" placement="right" noFlip autoPlacement>
|
|
592
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
593
|
+
<span slot="label">Label</span>
|
|
594
|
+
<span slot="helpText">right bib with 20px offset, noFlip and autoPlacement</span>
|
|
595
|
+
<auro-counter>
|
|
596
|
+
Adults
|
|
597
|
+
<span slot="description">18 years or older</span>
|
|
598
|
+
</auro-counter>
|
|
599
|
+
<auro-counter>
|
|
600
|
+
Children
|
|
601
|
+
<span slot="description">2-17 years</span>
|
|
602
|
+
</auro-counter>
|
|
603
|
+
</auro-counter-group>
|
|
604
|
+
</div>
|
|
605
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
606
|
+
</div>
|
|
607
|
+
<auro-accordion alignRight>
|
|
608
|
+
<span slot="trigger">See code</span>
|
|
609
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/floaterConfig.html) -->
|
|
610
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
611
|
+
|
|
612
|
+
```html
|
|
613
|
+
<div style="width: 350px">
|
|
614
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end">
|
|
615
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
616
|
+
<span slot="label">Label</span>
|
|
617
|
+
<span slot="helpText">bottom-end bib with 20px offset</span>
|
|
618
|
+
<auro-counter>
|
|
619
|
+
Adults
|
|
620
|
+
<span slot="description">18 years or older</span>
|
|
621
|
+
</auro-counter>
|
|
622
|
+
<auro-counter>
|
|
623
|
+
Children
|
|
624
|
+
<span slot="description">2-17 years</span>
|
|
625
|
+
</auro-counter>
|
|
626
|
+
</auro-counter-group>
|
|
627
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end" noFlip>
|
|
628
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
629
|
+
<span slot="label">Label</span>
|
|
630
|
+
<span slot="helpText">bottom-end bib with 20px offset and noFlip</span>
|
|
631
|
+
<auro-counter>
|
|
632
|
+
Adults
|
|
633
|
+
<span slot="description">18 years or older</span>
|
|
634
|
+
</auro-counter>
|
|
635
|
+
<auro-counter>
|
|
636
|
+
Children
|
|
637
|
+
<span slot="description">2-17 years</span>
|
|
638
|
+
</auro-counter>
|
|
639
|
+
</auro-counter-group>
|
|
640
|
+
<auro-counter-group isDropdown offset="20" placement="right" noFlip autoPlacement>
|
|
641
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
642
|
+
<span slot="label">Label</span>
|
|
643
|
+
<span slot="helpText">right bib with 20px offset, noFlip and autoPlacement</span>
|
|
644
|
+
<auro-counter>
|
|
645
|
+
Adults
|
|
646
|
+
<span slot="description">18 years or older</span>
|
|
647
|
+
</auro-counter>
|
|
648
|
+
<auro-counter>
|
|
649
|
+
Children
|
|
650
|
+
<span slot="description">2-17 years</span>
|
|
651
|
+
</auro-counter>
|
|
652
|
+
</auro-counter-group>
|
|
653
|
+
</div>
|
|
654
|
+
```
|
|
655
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
656
|
+
</auro-accordion>
|
|
657
|
+
|
|
658
|
+
### Dropdown with fullscreen bib
|
|
659
|
+
|
|
660
|
+
You can make the dropdown open in fullscreen at a specific breakpoint by setting `fullscreenBreakpoint`.
|
|
661
|
+
|
|
662
|
+
The default value of `fullscreenBreakpoint` is `sm`.
|
|
663
|
+
|
|
664
|
+
Breakpoint token can be found [here](https://auro.alaskaair.com/getting-started/developers/design-tokens)
|
|
665
|
+
|
|
666
|
+
To support fullscreen bib, setting the `bib.fullscreen.headline` slot is **REQUIRED**.
|
|
667
|
+
You can also set `bib.fullscreen.footer` slot to add any additional options on fullscreen view.
|
|
668
|
+
|
|
669
|
+
<div class="exampleWrapper">
|
|
670
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-mobile-properties.html) -->
|
|
671
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-mobile-properties.html -->
|
|
672
|
+
<div style="max-width: 350px;">
|
|
673
|
+
<auro-counter-group id="dropdownCouterExample" isDropdown fullscreenBreakpoint="lg">
|
|
674
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
675
|
+
<span slot="label">Passengers</span>
|
|
676
|
+
<span slot="bib.fullscreen.headline">Passengers</span>
|
|
677
|
+
<div slot="helpText">This is help text</div>
|
|
678
|
+
<auro-counter>
|
|
679
|
+
Adults
|
|
680
|
+
<span slot="description">18 years or older</span>
|
|
681
|
+
</auro-counter>
|
|
682
|
+
<auro-counter>
|
|
683
|
+
Children
|
|
684
|
+
<span slot="description">Under 17 years old. Restrictions apply if traveling without an adult.</span>
|
|
685
|
+
</auro-counter>
|
|
686
|
+
<auro-counter>
|
|
687
|
+
Lap Infants
|
|
688
|
+
<span slot="description">Under 2 years</span>
|
|
689
|
+
</auro-counter>
|
|
690
|
+
<div slot="bib.fullscreen.footer" style="display:flex; justify-content: stretch; gap: 1.5rem">
|
|
691
|
+
<auro-button id="dropdownCounterExampleResetbutton" fluid variant="secondary" style="flex: 1 50%">Reset</auro-button>
|
|
692
|
+
<auro-button id="dropdownCounterExampleSavebutton" fluid style="flex: 1 50%">Save</auro-button>
|
|
693
|
+
</div>
|
|
694
|
+
</auro-counter-group>
|
|
695
|
+
</div>
|
|
696
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
697
|
+
</div>
|
|
698
|
+
<auro-accordion alignRight>
|
|
699
|
+
<span slot="trigger">See code</span>
|
|
700
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-mobile-properties.html) -->
|
|
701
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-mobile-properties.html -->
|
|
702
|
+
|
|
703
|
+
```html
|
|
704
|
+
<div style="max-width: 350px;">
|
|
705
|
+
<auro-counter-group id="dropdownCouterExample" isDropdown fullscreenBreakpoint="lg">
|
|
706
|
+
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
707
|
+
<span slot="label">Passengers</span>
|
|
708
|
+
<span slot="bib.fullscreen.headline">Passengers</span>
|
|
709
|
+
<div slot="helpText">This is help text</div>
|
|
710
|
+
<auro-counter>
|
|
711
|
+
Adults
|
|
712
|
+
<span slot="description">18 years or older</span>
|
|
713
|
+
</auro-counter>
|
|
714
|
+
<auro-counter>
|
|
715
|
+
Children
|
|
716
|
+
<span slot="description">Under 17 years old. Restrictions apply if traveling without an adult.</span>
|
|
717
|
+
</auro-counter>
|
|
718
|
+
<auro-counter>
|
|
719
|
+
Lap Infants
|
|
720
|
+
<span slot="description">Under 2 years</span>
|
|
721
|
+
</auro-counter>
|
|
722
|
+
<div slot="bib.fullscreen.footer" style="display:flex; justify-content: stretch; gap: 1.5rem">
|
|
723
|
+
<auro-button id="dropdownCounterExampleResetbutton" fluid variant="secondary" style="flex: 1 50%">Reset</auro-button>
|
|
724
|
+
<auro-button id="dropdownCounterExampleSavebutton" fluid style="flex: 1 50%">Save</auro-button>
|
|
725
|
+
</div>
|
|
726
|
+
</auro-counter-group>
|
|
727
|
+
</div>
|
|
728
|
+
```
|
|
729
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
730
|
+
</auro-accordion>
|