@aurodesignsystem-dev/auro-formkit 0.0.0-pr593.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 +39 -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 +709 -0
- package/components/bibtemplate/dist/registered.js +709 -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 +55 -0
- package/components/checkbox/demo/api.js +17 -0
- package/components/checkbox/demo/api.md +401 -0
- package/components/checkbox/demo/api.min.js +1833 -0
- package/components/checkbox/demo/index.html +51 -0
- package/components/checkbox/demo/index.js +8 -0
- package/components/checkbox/demo/index.md +327 -0
- package/components/checkbox/demo/index.min.js +1808 -0
- package/components/checkbox/demo/readme.html +50 -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 +129 -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 +1757 -0
- package/components/checkbox/dist/registered.js +1758 -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 +152 -0
- package/components/combobox/demo/api.html +57 -0
- package/components/combobox/demo/api.js +36 -0
- package/components/combobox/demo/api.md +1209 -0
- package/components/combobox/demo/api.min.js +15117 -0
- package/components/combobox/demo/index.html +56 -0
- package/components/combobox/demo/index.js +26 -0
- package/components/combobox/demo/index.md +621 -0
- package/components/combobox/demo/index.min.js +14971 -0
- package/components/combobox/demo/readme.html +50 -0
- package/components/combobox/demo/readme.md +152 -0
- package/components/combobox/dist/auro-combobox.d.ts +384 -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 +13554 -0
- package/components/combobox/dist/inputVersion.d.ts +2 -0
- package/components/combobox/dist/registered.js +13556 -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 +54 -0
- package/components/counter/demo/api.js +20 -0
- package/components/counter/demo/api.md +584 -0
- package/components/counter/demo/api.min.js +7111 -0
- package/components/counter/demo/index.html +54 -0
- package/components/counter/demo/index.js +21 -0
- package/components/counter/demo/index.md +244 -0
- package/components/counter/demo/index.min.js +7075 -0
- package/components/counter/demo/readme.html +50 -0
- package/components/counter/demo/readme.md +146 -0
- package/components/counter/dist/auro-counter-button.d.ts +12 -0
- package/components/counter/dist/auro-counter-group.d.ts +235 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts +22 -0
- package/components/counter/dist/auro-counter.d.ts +97 -0
- package/components/counter/dist/bibtemplateVersion.d.ts +2 -0
- package/components/counter/dist/dropdownVersion.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 +7018 -0
- package/components/counter/dist/registered.js +7019 -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/style-css.d.ts +2 -0
- package/components/counter/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/README.md +140 -0
- package/components/datepicker/demo/api.html +57 -0
- package/components/datepicker/demo/api.js +35 -0
- package/components/datepicker/demo/api.md +1479 -0
- package/components/datepicker/demo/api.min.js +24534 -0
- package/components/datepicker/demo/index.html +56 -0
- package/components/datepicker/demo/index.js +19 -0
- package/components/datepicker/demo/index.md +112 -0
- package/components/datepicker/demo/index.min.js +24255 -0
- package/components/datepicker/demo/readme.html +50 -0
- package/components/datepicker/demo/readme.md +140 -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 +466 -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/index.d.ts +2 -0
- package/components/datepicker/dist/index.js +24185 -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 +24185 -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/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 +57 -0
- package/components/dropdown/demo/api.js +21 -0
- package/components/dropdown/demo/api.md +1434 -0
- package/components/dropdown/demo/api.min.js +3826 -0
- package/components/dropdown/demo/index.html +55 -0
- package/components/dropdown/demo/index.js +19 -0
- package/components/dropdown/demo/index.md +510 -0
- package/components/dropdown/demo/index.min.js +3789 -0
- package/components/dropdown/demo/readme.html +50 -0
- package/components/dropdown/demo/readme.md +144 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +406 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +46 -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 +3734 -0
- package/components/dropdown/dist/registered.js +3734 -0
- package/components/dropdown/dist/styles/bibColors-css.d.ts +2 -0
- package/components/dropdown/dist/styles/bibStyles-css.d.ts +2 -0
- package/components/dropdown/dist/styles/color-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 +49 -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 +15 -0
- package/components/form/demo/index.html +50 -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 +50 -0
- package/components/form/demo/readme.md +142 -0
- package/components/form/demo/registerDemoDeps.js +23 -0
- package/components/form/demo/working.html +118 -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 +61 -0
- package/components/helptext/dist/index.d.ts +2 -0
- package/components/helptext/dist/index.js +209 -0
- package/components/helptext/dist/registered.js +209 -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 +135 -0
- package/components/input/demo/api.html +42 -0
- package/components/input/demo/api.js +29 -0
- package/components/input/demo/api.md +1252 -0
- package/components/input/demo/api.min.js +7238 -0
- package/components/input/demo/index.html +43 -0
- package/components/input/demo/index.js +20 -0
- package/components/input/demo/index.md +202 -0
- package/components/input/demo/index.min.js +7157 -0
- package/components/input/demo/readme.html +50 -0
- package/components/input/demo/readme.md +135 -0
- package/components/input/dist/auro-input.d.ts +31 -0
- package/components/input/dist/base-input.d.ts +512 -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 +7063 -0
- package/components/input/dist/registered.js +7063 -0
- package/components/input/dist/styles/borders-css.d.ts +2 -0
- package/components/input/dist/styles/color-css.d.ts +2 -0
- package/components/input/dist/styles/input-css.d.ts +2 -0
- package/components/input/dist/styles/label-css.d.ts +2 -0
- package/components/input/dist/styles/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/notificationIcons-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/menu/README.md +145 -0
- package/components/menu/demo/api.html +55 -0
- package/components/menu/demo/api.js +27 -0
- package/components/menu/demo/api.md +954 -0
- package/components/menu/demo/api.min.js +1538 -0
- package/components/menu/demo/index.html +52 -0
- package/components/menu/demo/index.js +28 -0
- package/components/menu/demo/index.md +61 -0
- package/components/menu/demo/index.min.js +1484 -0
- package/components/menu/demo/readme.html +50 -0
- package/components/menu/demo/readme.md +145 -0
- package/components/menu/dist/auro-menu-utils.d.ts +42 -0
- package/components/menu/dist/auro-menu.d.ts +205 -0
- package/components/menu/dist/auro-menuoption.d.ts +63 -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 +1426 -0
- package/components/menu/dist/registered.js +1427 -0
- package/components/menu/dist/styles/color-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/tokens-css.d.ts +2 -0
- package/components/radio/README.md +137 -0
- package/components/radio/demo/api.html +53 -0
- package/components/radio/demo/api.js +19 -0
- package/components/radio/demo/api.md +562 -0
- package/components/radio/demo/api.min.js +1944 -0
- package/components/radio/demo/index.html +50 -0
- package/components/radio/demo/index.js +8 -0
- package/components/radio/demo/index.md +150 -0
- package/components/radio/demo/index.min.js +1901 -0
- package/components/radio/demo/readme.html +50 -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 +144 -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 +1850 -0
- package/components/radio/dist/registered.js +1851 -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 +144 -0
- package/components/select/demo/api.html +71 -0
- package/components/select/demo/api.js +35 -0
- package/components/select/demo/api.md +1313 -0
- package/components/select/demo/api.min.js +7763 -0
- package/components/select/demo/index.html +66 -0
- package/components/select/demo/index.js +9 -0
- package/components/select/demo/index.md +815 -0
- package/components/select/demo/index.min.js +7651 -0
- package/components/select/demo/readme.html +50 -0
- package/components/select/demo/readme.md +144 -0
- package/components/select/dist/auro-select.d.ts +359 -0
- package/components/select/dist/bibtemplateVersion.d.ts +2 -0
- package/components/select/dist/dropdownVersion.d.ts +2 -0
- package/components/select/dist/index.d.ts +2 -0
- package/components/select/dist/index.js +6300 -0
- package/components/select/dist/registered.js +6300 -0
- package/components/select/dist/styles/style-css.d.ts +2 -0
- package/package.json +217 -0
- package/packages/build-tools/src/postinstall.mjs +12 -0
|
@@ -0,0 +1,1209 @@
|
|
|
1
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/api.md) -->
|
|
2
|
+
<!-- The below content is automatically added from ./../docs/api.md -->
|
|
3
|
+
|
|
4
|
+
# auro-combobox
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|---------------------------------|---------------------------------|------------------------|----------------|--------------------------------------------------|
|
|
10
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | | If declared, bib's position will be automatically calculated where to appear. |
|
|
11
|
+
| [autocomplete](#autocomplete) | `autocomplete` | `string` | "false" | An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported. |
|
|
12
|
+
| [checkmark](#checkmark) | `checkmark` | `boolean` | | When attribute is present auro-menu will apply checkmarks to selected options. |
|
|
13
|
+
| [disabled](#disabled) | `disabled` | `boolean` | | If set, disables the combobox. |
|
|
14
|
+
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
15
|
+
| [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. |
|
|
16
|
+
| [inputmode](#inputmode) | `inputmode` | `string` | | Exposes inputmode attribute for input. |
|
|
17
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
|
|
18
|
+
| [noFilter](#noFilter) | `noFilter` | `boolean` | | If set, combobox will not filter menuoptions based in input. |
|
|
19
|
+
| [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`. |
|
|
20
|
+
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
21
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
22
|
+
| [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
|
|
23
|
+
| [optionSelected](#optionSelected) | `optionSelected` | `object` | | Specifies the current selected option. |
|
|
24
|
+
| [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" |
|
|
25
|
+
| [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
26
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
27
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
28
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
29
|
+
| [triggerIcon](#triggerIcon) | `triggerIcon` | `boolean` | | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
|
|
30
|
+
| [type](#type) | `type` | `string` | | Applies the defined value as the type attribute on auro-input. |
|
|
31
|
+
| [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
|
|
32
|
+
| [value](#value) | `value` | `Array\|String<Array>` | | Value selected for the dropdown menu. |
|
|
33
|
+
|
|
34
|
+
## Methods
|
|
35
|
+
|
|
36
|
+
| Method | Type | Description |
|
|
37
|
+
|------------|----------------------------------------|--------------------------------------------------|
|
|
38
|
+
| [focus](#focus) | `(): void` | Focuses the combobox trigger input. |
|
|
39
|
+
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
40
|
+
| [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
41
|
+
|
|
42
|
+
## Events
|
|
43
|
+
|
|
44
|
+
| Event | Type | Description |
|
|
45
|
+
|-----------------------------|--------------------|--------------------------------------------------|
|
|
46
|
+
| `auroCombobox-valueSet` | `CustomEvent<any>` | Notifies that the component has a new value set. |
|
|
47
|
+
| `auroFormElement-validated` | | Notifies that the component value(s) have been validated. |
|
|
48
|
+
|
|
49
|
+
## Slots
|
|
50
|
+
|
|
51
|
+
| Name | Description |
|
|
52
|
+
|---------------------------|--------------------------------------------------|
|
|
53
|
+
| | Default slot for the menu content. |
|
|
54
|
+
| `bib.fullscreen.headline` | Defines the headline to display above menu-options |
|
|
55
|
+
| [helpText](#helpText) | Defines the content of the helpText. |
|
|
56
|
+
| [label](#label) | Defines the content of the label. |
|
|
57
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
58
|
+
|
|
59
|
+
## API Examples
|
|
60
|
+
|
|
61
|
+
### Basic
|
|
62
|
+
|
|
63
|
+
<div class="exampleWrapper">
|
|
64
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
65
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
66
|
+
<auro-combobox>
|
|
67
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
68
|
+
<span slot="label">Name</span>
|
|
69
|
+
<auro-menu>
|
|
70
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
71
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
72
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
73
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
74
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
75
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
76
|
+
</auro-menu>
|
|
77
|
+
</auro-combobox>
|
|
78
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
79
|
+
</div>
|
|
80
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
81
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDark.html) -->
|
|
82
|
+
<!-- The below content is automatically added from ./../apiExamples/onDark.html -->
|
|
83
|
+
<auro-combobox onDark>
|
|
84
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
85
|
+
<span slot="label">Name</span>
|
|
86
|
+
<auro-menu>
|
|
87
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
88
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
89
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
90
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
91
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
92
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
93
|
+
</auro-menu>
|
|
94
|
+
</auro-combobox>
|
|
95
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
|
+
</div>
|
|
97
|
+
<auro-accordion alignRight>
|
|
98
|
+
<span slot="trigger">See code</span>
|
|
99
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
100
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
101
|
+
|
|
102
|
+
```html
|
|
103
|
+
<auro-combobox>
|
|
104
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
105
|
+
<span slot="label">Name</span>
|
|
106
|
+
<auro-menu>
|
|
107
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
108
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
109
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
110
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
111
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
112
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
113
|
+
</auro-menu>
|
|
114
|
+
</auro-combobox>
|
|
115
|
+
```
|
|
116
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
117
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDark.html) -->
|
|
118
|
+
<!-- The below content is automatically added from ./../apiExamples/onDark.html -->
|
|
119
|
+
<auro-combobox onDark>
|
|
120
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
121
|
+
<span slot="label">Name</span>
|
|
122
|
+
<auro-menu>
|
|
123
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
124
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
125
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
126
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
127
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
128
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
129
|
+
</auro-menu>
|
|
130
|
+
</auro-combobox>
|
|
131
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
132
|
+
</auro-accordion>
|
|
133
|
+
|
|
134
|
+
### Dynamic Menu
|
|
135
|
+
|
|
136
|
+
This example demonstrates a data driven combobox. The data is used to populate the `auro-menu`. In this example, each time the input's value changes, the data is updated and the menu is recreated.
|
|
137
|
+
|
|
138
|
+
The menu in this example was populated from data from a country/city API. To keep the data set small, the data in the menu is based off an API call that returns all countries and cities that contain the substring "**germ**" (non case-sensitive) in their name.
|
|
139
|
+
|
|
140
|
+
<div class="exampleWrapper">
|
|
141
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dynamicMenu.html) -->
|
|
142
|
+
<!-- The below content is automatically added from ./../apiExamples/dynamicMenu.html -->
|
|
143
|
+
<!-- HTML example file -->
|
|
144
|
+
<!-- ----------------- -->
|
|
145
|
+
<auro-combobox id="dynamicMenuExample" noFilter>
|
|
146
|
+
<span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
|
|
147
|
+
<span slot="label">Name</span>
|
|
148
|
+
<!--
|
|
149
|
+
The auro-combobox element requires an empty auro-menu element
|
|
150
|
+
due to the requirements of auro-dropdown and auro-input
|
|
151
|
+
-->
|
|
152
|
+
<auro-menu id="initMenu"></auro-menu>
|
|
153
|
+
</auro-combobox>
|
|
154
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
155
|
+
</div>
|
|
156
|
+
<auro-accordion alignRight>
|
|
157
|
+
<span slot="trigger">See code</span>
|
|
158
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamicMenu.html) -->
|
|
159
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dynamicMenu.html -->
|
|
160
|
+
|
|
161
|
+
```html
|
|
162
|
+
<!-- HTML example file -->
|
|
163
|
+
<!-- ----------------- -->
|
|
164
|
+
<auro-combobox id="dynamicMenuExample" noFilter>
|
|
165
|
+
<span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
|
|
166
|
+
<span slot="label">Name</span>
|
|
167
|
+
<!--
|
|
168
|
+
The auro-combobox element requires an empty auro-menu element
|
|
169
|
+
due to the requirements of auro-dropdown and auro-input
|
|
170
|
+
-->
|
|
171
|
+
<auro-menu id="initMenu"></auro-menu>
|
|
172
|
+
</auro-combobox>
|
|
173
|
+
```
|
|
174
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
175
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamicMenu.js) -->
|
|
176
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dynamicMenu.js -->
|
|
177
|
+
|
|
178
|
+
```js
|
|
179
|
+
// Javascript example file
|
|
180
|
+
// -----------------------
|
|
181
|
+
import { DynamicData } from './dynamicMenuDataApi';
|
|
182
|
+
|
|
183
|
+
export function dynamicMenuExample() {
|
|
184
|
+
// Resets the root menu
|
|
185
|
+
function resetMenu(root) {
|
|
186
|
+
while (root.firstChild) {
|
|
187
|
+
root.removeChild(root.firstChild);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Generates HTML for menu and submenus using country & city data from an external API
|
|
192
|
+
function generateHtml(data) {
|
|
193
|
+
const initialMenu = document.querySelector('#initMenu');
|
|
194
|
+
|
|
195
|
+
resetMenu(initialMenu);
|
|
196
|
+
|
|
197
|
+
for (let index = 0; index < data.length; index++) {
|
|
198
|
+
let country = data[index]['country'];
|
|
199
|
+
let cities = data[index]['cities'];
|
|
200
|
+
|
|
201
|
+
generateMenuOptionHtml(initialMenu, country, country);
|
|
202
|
+
|
|
203
|
+
for (let indexB = 0; indexB < cities.length; indexB++) {
|
|
204
|
+
let subMenu = document.createElement('auro-menu');
|
|
205
|
+
|
|
206
|
+
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB]);
|
|
207
|
+
|
|
208
|
+
initialMenu.appendChild(subMenu);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Helper function that generates HTML for menuoptions
|
|
214
|
+
function generateMenuOptionHtml(menu, label, value) {
|
|
215
|
+
let option = document.createElement('auro-menuoption');
|
|
216
|
+
|
|
217
|
+
option.value = value;
|
|
218
|
+
option.innerHTML = label;
|
|
219
|
+
|
|
220
|
+
menu.appendChild(option);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Main javascript that runs all JS to create example
|
|
224
|
+
const dynamicData = new DynamicData();
|
|
225
|
+
const dynamicMenuExample = document.querySelector('#dynamicMenuExample');
|
|
226
|
+
const dropdownEl = dynamicMenuExample.shadowRoot.querySelector(dynamicMenuExample.dropdownTag._$litStatic$);
|
|
227
|
+
const inputEl = dropdownEl.querySelector(dynamicMenuExample.inputTag._$litStatic$);
|
|
228
|
+
|
|
229
|
+
inputEl.addEventListener('input', () => {
|
|
230
|
+
let data = dynamicData.getData();
|
|
231
|
+
data = dynamicData.filterData(data, inputEl.value);
|
|
232
|
+
|
|
233
|
+
generateHtml(data);
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
238
|
+
</auro-accordion>
|
|
239
|
+
|
|
240
|
+
### Property Examples
|
|
241
|
+
|
|
242
|
+
#### disabled
|
|
243
|
+
|
|
244
|
+
If set, disables the combobox.
|
|
245
|
+
|
|
246
|
+
<div class="exampleWrapper">
|
|
247
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
|
|
248
|
+
<!-- The below content is automatically added from ./../apiExamples/disabled.html -->
|
|
249
|
+
<auro-combobox disabled>
|
|
250
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
251
|
+
<span slot="label">Name</span>
|
|
252
|
+
<auro-menu>
|
|
253
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
254
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
255
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
256
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
257
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
258
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
259
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
260
|
+
</auro-menu>
|
|
261
|
+
</auro-combobox>
|
|
262
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
263
|
+
</div>
|
|
264
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
265
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkDisabled.html) -->
|
|
266
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkDisabled.html -->
|
|
267
|
+
<auro-combobox onDark disabled>
|
|
268
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
269
|
+
<span slot="label">Name</span>
|
|
270
|
+
<auro-menu>
|
|
271
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
272
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
273
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
274
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
275
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
276
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
277
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
278
|
+
</auro-menu>
|
|
279
|
+
</auro-combobox>
|
|
280
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
281
|
+
</div>
|
|
282
|
+
<auro-accordion alignRight>
|
|
283
|
+
<span slot="trigger">See code</span>
|
|
284
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
|
|
285
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
|
|
286
|
+
|
|
287
|
+
```html
|
|
288
|
+
<auro-combobox disabled>
|
|
289
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
290
|
+
<span slot="label">Name</span>
|
|
291
|
+
<auro-menu>
|
|
292
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
293
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
294
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
295
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
296
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
297
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
298
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
299
|
+
</auro-menu>
|
|
300
|
+
</auro-combobox>
|
|
301
|
+
```
|
|
302
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
303
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkDisabled.html) -->
|
|
304
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkDisabled.html -->
|
|
305
|
+
<auro-combobox onDark disabled>
|
|
306
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
307
|
+
<span slot="label">Name</span>
|
|
308
|
+
<auro-menu>
|
|
309
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
310
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
311
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
312
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
313
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
314
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
315
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
316
|
+
</auro-menu>
|
|
317
|
+
</auro-combobox>
|
|
318
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
319
|
+
</auro-accordion>
|
|
320
|
+
|
|
321
|
+
#### Input Mode
|
|
322
|
+
|
|
323
|
+
You can manually set the input mode for the input.
|
|
324
|
+
|
|
325
|
+
<div class="exampleWrapper">
|
|
326
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/inputmode.html) -->
|
|
327
|
+
<!-- The below content is automatically added from ./../apiExamples/inputmode.html -->
|
|
328
|
+
<auro-combobox inputmode="numeric">
|
|
329
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
330
|
+
<span slot="label">Name</span>
|
|
331
|
+
<auro-menu>
|
|
332
|
+
<auro-menuoption value="1" id="option-0">1</auro-menuoption>
|
|
333
|
+
<auro-menuoption value="2" id="option-1">2</auro-menuoption>
|
|
334
|
+
<auro-menuoption value="3" id="option-2">3</auro-menuoption>
|
|
335
|
+
<auro-menuoption value="4" id="option-3">4</auro-menuoption>
|
|
336
|
+
<auro-menuoption value="5" id="option-4">5</auro-menuoption>
|
|
337
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
338
|
+
</auro-menu>
|
|
339
|
+
</auro-combobox>
|
|
340
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
341
|
+
</div>
|
|
342
|
+
<auro-accordion alignRight>
|
|
343
|
+
<span slot="trigger">See code</span>
|
|
344
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inputmode.html) -->
|
|
345
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/inputmode.html -->
|
|
346
|
+
|
|
347
|
+
```html
|
|
348
|
+
<auro-combobox inputmode="numeric">
|
|
349
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
350
|
+
<span slot="label">Name</span>
|
|
351
|
+
<auro-menu>
|
|
352
|
+
<auro-menuoption value="1" id="option-0">1</auro-menuoption>
|
|
353
|
+
<auro-menuoption value="2" id="option-1">2</auro-menuoption>
|
|
354
|
+
<auro-menuoption value="3" id="option-2">3</auro-menuoption>
|
|
355
|
+
<auro-menuoption value="4" id="option-3">4</auro-menuoption>
|
|
356
|
+
<auro-menuoption value="5" id="option-4">5</auro-menuoption>
|
|
357
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
358
|
+
</auro-menu>
|
|
359
|
+
</auro-combobox>
|
|
360
|
+
```
|
|
361
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
362
|
+
</auro-accordion>
|
|
363
|
+
|
|
364
|
+
#### noFilter
|
|
365
|
+
|
|
366
|
+
If set, combobox will not do suggestion filtering of the menuoptions. This option is useful when the `<auro-menuoption>` elements are being pre-filtered externally to combobox (e.g. using the citysearch API).
|
|
367
|
+
|
|
368
|
+
<div class="exampleWrapper">
|
|
369
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/noFilter.html) -->
|
|
370
|
+
<!-- The below content is automatically added from ./../apiExamples/noFilter.html -->
|
|
371
|
+
<auro-combobox noFilter>
|
|
372
|
+
<span slot="bib.fullscreen.headline">noFilter Combobox Header</span>
|
|
373
|
+
<span slot="label">Name</span>
|
|
374
|
+
<auro-menu>
|
|
375
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
376
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
377
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
378
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
379
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
380
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
381
|
+
</auro-menu>
|
|
382
|
+
</auro-combobox>
|
|
383
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
384
|
+
</div>
|
|
385
|
+
<auro-accordion alignRight>
|
|
386
|
+
<span slot="trigger">See code</span>
|
|
387
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/noFilter.html) -->
|
|
388
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/noFilter.html -->
|
|
389
|
+
|
|
390
|
+
```html
|
|
391
|
+
<auro-combobox noFilter>
|
|
392
|
+
<span slot="bib.fullscreen.headline">noFilter Combobox Header</span>
|
|
393
|
+
<span slot="label">Name</span>
|
|
394
|
+
<auro-menu>
|
|
395
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
396
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
397
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
398
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
399
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
400
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
401
|
+
</auro-menu>
|
|
402
|
+
</auro-combobox>
|
|
403
|
+
```
|
|
404
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
405
|
+
</auro-accordion>
|
|
406
|
+
|
|
407
|
+
#### error
|
|
408
|
+
|
|
409
|
+
Sets a persistent error state (e.g. an error state returned from the server).
|
|
410
|
+
|
|
411
|
+
<div class="exampleWrapper">
|
|
412
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/error.html) -->
|
|
413
|
+
<!-- The below content is automatically added from ./../apiExamples/error.html -->
|
|
414
|
+
<auro-combobox error="Custom error message">
|
|
415
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
416
|
+
<span slot="label">Name</span>
|
|
417
|
+
<auro-menu>
|
|
418
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
419
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
420
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
421
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
422
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
423
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
424
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
425
|
+
</auro-menu>
|
|
426
|
+
</auro-combobox>
|
|
427
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
428
|
+
</div>
|
|
429
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
430
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkError.html) -->
|
|
431
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkError.html -->
|
|
432
|
+
<auro-combobox onDark error="Custom error message">
|
|
433
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
434
|
+
<span slot="label">Name</span>
|
|
435
|
+
<auro-menu>
|
|
436
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
437
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
438
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
439
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
440
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
441
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
442
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
443
|
+
</auro-menu>
|
|
444
|
+
</auro-combobox>
|
|
445
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
446
|
+
</div>
|
|
447
|
+
<auro-accordion alignRight>
|
|
448
|
+
<span slot="trigger">See code</span>
|
|
449
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error.html) -->
|
|
450
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/error.html -->
|
|
451
|
+
|
|
452
|
+
```html
|
|
453
|
+
<auro-combobox error="Custom error message">
|
|
454
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
455
|
+
<span slot="label">Name</span>
|
|
456
|
+
<auro-menu>
|
|
457
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
458
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
459
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
460
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
461
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
462
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
463
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
464
|
+
</auro-menu>
|
|
465
|
+
</auro-combobox>
|
|
466
|
+
```
|
|
467
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
468
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkError.html) -->
|
|
469
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkError.html -->
|
|
470
|
+
<auro-combobox onDark error="Custom error message">
|
|
471
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
472
|
+
<span slot="label">Name</span>
|
|
473
|
+
<auro-menu>
|
|
474
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
475
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
476
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
477
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
478
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
479
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
480
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
481
|
+
</auro-menu>
|
|
482
|
+
</auro-combobox>
|
|
483
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
484
|
+
</auro-accordion>
|
|
485
|
+
|
|
486
|
+
#### noValidate
|
|
487
|
+
|
|
488
|
+
Intended for use with the `required` attribute. If set, disables auto-validation on blur. By using these two attributes in combination the validation for required fields is still computed for forms but no validation messaging will be generated in the UI.
|
|
489
|
+
|
|
490
|
+
<div class="exampleWrapper">
|
|
491
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/noValidate.html) -->
|
|
492
|
+
<!-- The below content is automatically added from ./../apiExamples/noValidate.html -->
|
|
493
|
+
<auro-combobox required noValidate>
|
|
494
|
+
<span slot="bib.fullscreen.headline">noValidate Combobox Header</span>
|
|
495
|
+
<span slot="label">Name</span>
|
|
496
|
+
<auro-menu>
|
|
497
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
498
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
499
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
500
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
501
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
502
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
503
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
504
|
+
</auro-menu>
|
|
505
|
+
</auro-combobox>
|
|
506
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
507
|
+
</div>
|
|
508
|
+
<auro-accordion alignRight>
|
|
509
|
+
<span slot="trigger">See code</span>
|
|
510
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/noValidate.html) -->
|
|
511
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/noValidate.html -->
|
|
512
|
+
|
|
513
|
+
```html
|
|
514
|
+
<auro-combobox required noValidate>
|
|
515
|
+
<span slot="bib.fullscreen.headline">noValidate Combobox Header</span>
|
|
516
|
+
<span slot="label">Name</span>
|
|
517
|
+
<auro-menu>
|
|
518
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
519
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
520
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
521
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
522
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
523
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
524
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
525
|
+
</auro-menu>
|
|
526
|
+
</auro-combobox>
|
|
527
|
+
```
|
|
528
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
529
|
+
</auro-accordion>
|
|
530
|
+
|
|
531
|
+
#### required
|
|
532
|
+
|
|
533
|
+
Populates the `required` attribute on the input. Used for client-side validation.
|
|
534
|
+
|
|
535
|
+
<div class="exampleWrapper">
|
|
536
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/required.html) -->
|
|
537
|
+
<!-- The below content is automatically added from ./../apiExamples/required.html -->
|
|
538
|
+
<auro-combobox required>
|
|
539
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
540
|
+
<span slot="label">Name</span>
|
|
541
|
+
<auro-menu>
|
|
542
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
543
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
544
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
545
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
546
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
547
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
548
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
549
|
+
</auro-menu>
|
|
550
|
+
</auro-combobox>
|
|
551
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
552
|
+
</div>
|
|
553
|
+
<auro-accordion alignRight>
|
|
554
|
+
<span slot="trigger">See code</span>
|
|
555
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/required.html) -->
|
|
556
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/required.html -->
|
|
557
|
+
|
|
558
|
+
```html
|
|
559
|
+
<auro-combobox required>
|
|
560
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
561
|
+
<span slot="label">Name</span>
|
|
562
|
+
<auro-menu>
|
|
563
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
564
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
565
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
566
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
567
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
568
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
569
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
570
|
+
</auro-menu>
|
|
571
|
+
</auro-combobox>
|
|
572
|
+
```
|
|
573
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
574
|
+
</auro-accordion>
|
|
575
|
+
|
|
576
|
+
#### value
|
|
577
|
+
|
|
578
|
+
Use the `value` attribute to programmatically set the value of the combobox.
|
|
579
|
+
|
|
580
|
+
<div class="exampleWrapper">
|
|
581
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/programmaticValue.html) -->
|
|
582
|
+
<!-- The below content is automatically added from ./../apiExamples/programmaticValue.html -->
|
|
583
|
+
<auro-combobox>
|
|
584
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
585
|
+
<span slot="label">Name</span>
|
|
586
|
+
<auro-menu>
|
|
587
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
588
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
589
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
590
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
591
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
592
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
593
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
594
|
+
</auro-menu>
|
|
595
|
+
</auro-combobox>
|
|
596
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
597
|
+
</div>
|
|
598
|
+
<auro-accordion alignRight>
|
|
599
|
+
<span slot="trigger">See code</span>
|
|
600
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/programmaticValue.html) -->
|
|
601
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/programmaticValue.html -->
|
|
602
|
+
|
|
603
|
+
```html
|
|
604
|
+
<auro-combobox>
|
|
605
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
606
|
+
<span slot="label">Name</span>
|
|
607
|
+
<auro-menu>
|
|
608
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
609
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
610
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
611
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
612
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
613
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
614
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
615
|
+
</auro-menu>
|
|
616
|
+
</auro-combobox>
|
|
617
|
+
```
|
|
618
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
619
|
+
</auro-accordion>
|
|
620
|
+
|
|
621
|
+
#### Dynamically Set Value
|
|
622
|
+
|
|
623
|
+
Use the `value` attribute in combination with another element to dynamically set the value of the combobox.
|
|
624
|
+
|
|
625
|
+
Can be used in the following ways:
|
|
626
|
+
* Preset the value of the combobox to valid menu option
|
|
627
|
+
* Set the value of the combobox to invalid menu option
|
|
628
|
+
* Reset the value of the combobox to undefined
|
|
629
|
+
|
|
630
|
+
Note: using a value that does not match a menu option will reset the combobox value to undefined.
|
|
631
|
+
|
|
632
|
+
<div class="exampleWrapper">
|
|
633
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/value.html) -->
|
|
634
|
+
<!-- The below content is automatically added from ./../apiExamples/value.html -->
|
|
635
|
+
<auro-button id="valueValidExampleBtn">Set to an existing option</auro-button>
|
|
636
|
+
<auro-button id="valueInvalidExampleBtn">Set to custom value</auro-button>
|
|
637
|
+
<auro-button id="valueUndefinedExampleBtn">Reset</auro-button>
|
|
638
|
+
<br/><br/>
|
|
639
|
+
<auro-combobox id="valueExample">
|
|
640
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
641
|
+
<span slot="label">Name</span>
|
|
642
|
+
<auro-menu>
|
|
643
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
644
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
645
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
646
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
647
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
648
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
649
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
650
|
+
</auro-menu>
|
|
651
|
+
</auro-combobox>
|
|
652
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
653
|
+
</div>
|
|
654
|
+
<auro-accordion alignRight>
|
|
655
|
+
<span slot="trigger">See code</span>
|
|
656
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/value.html) -->
|
|
657
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/value.html -->
|
|
658
|
+
|
|
659
|
+
```html
|
|
660
|
+
<auro-button id="valueValidExampleBtn">Set to an existing option</auro-button>
|
|
661
|
+
<auro-button id="valueInvalidExampleBtn">Set to custom value</auro-button>
|
|
662
|
+
<auro-button id="valueUndefinedExampleBtn">Reset</auro-button>
|
|
663
|
+
<br/><br/>
|
|
664
|
+
<auro-combobox id="valueExample">
|
|
665
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
666
|
+
<span slot="label">Name</span>
|
|
667
|
+
<auro-menu>
|
|
668
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
669
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
670
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
671
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
672
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
673
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
674
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
675
|
+
</auro-menu>
|
|
676
|
+
</auro-combobox>
|
|
677
|
+
```
|
|
678
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
679
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/value.js) -->
|
|
680
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/value.js -->
|
|
681
|
+
|
|
682
|
+
```js
|
|
683
|
+
export function valueExample() {
|
|
684
|
+
const valueExample = document.querySelector('#valueExample');
|
|
685
|
+
|
|
686
|
+
document.querySelector('#valueValidExampleBtn').addEventListener('click', () => {
|
|
687
|
+
valueExample.value = ['Oranges'];
|
|
688
|
+
});
|
|
689
|
+
|
|
690
|
+
document.querySelector('#valueInvalidExampleBtn').addEventListener('click', () => {
|
|
691
|
+
valueExample.value = ['Dragon Fruit'];
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
document.querySelector('#valueUndefinedExampleBtn').addEventListener('click', () => {
|
|
695
|
+
valueExample.value = undefined;
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
```
|
|
699
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
700
|
+
</auro-accordion>
|
|
701
|
+
|
|
702
|
+
#### type
|
|
703
|
+
|
|
704
|
+
When defined, the `auro-input` in the combobox trigger will use the defined `type` (e.g. `credit-card`).
|
|
705
|
+
|
|
706
|
+
<div class="exampleWrapper">
|
|
707
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/typeMonthDayYear.html) -->
|
|
708
|
+
<!-- The below content is automatically added from ./../apiExamples/typeMonthDayYear.html -->
|
|
709
|
+
<auro-combobox type="date" triggerIcon>
|
|
710
|
+
<span slot="bib.fullscreen.headline">Date Combobox Header</span>
|
|
711
|
+
<span slot="label">Date</span>
|
|
712
|
+
<auro-menu>
|
|
713
|
+
<auro-menuoption value="01/02/2020" id="option-date-0">
|
|
714
|
+
01/02/2020
|
|
715
|
+
</auro-menuoption>
|
|
716
|
+
<auro-menuoption value="05/16/2022" id="option-date-1">
|
|
717
|
+
05/16/2022
|
|
718
|
+
</auro-menuoption>
|
|
719
|
+
</auro-menu>
|
|
720
|
+
</auro-combobox>
|
|
721
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
722
|
+
</div>
|
|
723
|
+
<auro-accordion alignRight>
|
|
724
|
+
<span slot="trigger">See code</span>
|
|
725
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/typeMonthDayYear.html) -->
|
|
726
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/typeMonthDayYear.html -->
|
|
727
|
+
|
|
728
|
+
```html
|
|
729
|
+
<auro-combobox type="date" triggerIcon>
|
|
730
|
+
<span slot="bib.fullscreen.headline">Date Combobox Header</span>
|
|
731
|
+
<span slot="label">Date</span>
|
|
732
|
+
<auro-menu>
|
|
733
|
+
<auro-menuoption value="01/02/2020" id="option-date-0">
|
|
734
|
+
01/02/2020
|
|
735
|
+
</auro-menuoption>
|
|
736
|
+
<auro-menuoption value="05/16/2022" id="option-date-1">
|
|
737
|
+
05/16/2022
|
|
738
|
+
</auro-menuoption>
|
|
739
|
+
</auro-menu>
|
|
740
|
+
</auro-combobox>
|
|
741
|
+
```
|
|
742
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
743
|
+
</auro-accordion>
|
|
744
|
+
|
|
745
|
+
### Method Examples
|
|
746
|
+
|
|
747
|
+
#### focus
|
|
748
|
+
|
|
749
|
+
The focus method will apply focus state to the combobox input field.
|
|
750
|
+
|
|
751
|
+
<div class="exampleWrapper">
|
|
752
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/focus.html) -->
|
|
753
|
+
<!-- The below content is automatically added from ./../apiExamples/focus.html -->
|
|
754
|
+
<auro-button id="focusExampleBtn">Apply focus to combobox</auro-button>
|
|
755
|
+
<br /><br />
|
|
756
|
+
<auro-combobox id="focusExample">
|
|
757
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
758
|
+
<span slot="label">Name</span>
|
|
759
|
+
<auro-menu>
|
|
760
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
761
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
762
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
763
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
764
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
765
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
766
|
+
</auro-menu>
|
|
767
|
+
</auro-combobox>
|
|
768
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
769
|
+
</div>
|
|
770
|
+
<auro-accordion alignRight>
|
|
771
|
+
<span slot="trigger">See code</span>
|
|
772
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/focus.js) -->
|
|
773
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/focus.js -->
|
|
774
|
+
|
|
775
|
+
```js
|
|
776
|
+
export function focusExample() {
|
|
777
|
+
const focusExample = document.querySelector('#focusExample');
|
|
778
|
+
const focusExampleBtnElem = document.querySelector('#focusExampleBtn');
|
|
779
|
+
|
|
780
|
+
focusExampleBtnElem.addEventListener('click', () => {
|
|
781
|
+
focusExample.focus();
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
```
|
|
785
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
786
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/focus.html) -->
|
|
787
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/focus.html -->
|
|
788
|
+
|
|
789
|
+
```html
|
|
790
|
+
<auro-button id="focusExampleBtn">Apply focus to combobox</auro-button>
|
|
791
|
+
<br /><br />
|
|
792
|
+
<auro-combobox id="focusExample">
|
|
793
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
794
|
+
<span slot="label">Name</span>
|
|
795
|
+
<auro-menu>
|
|
796
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
797
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
798
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
799
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
800
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
801
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
802
|
+
</auro-menu>
|
|
803
|
+
</auro-combobox>
|
|
804
|
+
```
|
|
805
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
806
|
+
</auro-accordion>
|
|
807
|
+
|
|
808
|
+
#### reset
|
|
809
|
+
|
|
810
|
+
Use the `reset()` method to reset the `<auro-combobox>`'s `value` and `validity` state. Doing so will preserve all other attributes and properties.
|
|
811
|
+
|
|
812
|
+
<div class="exampleWrapper">
|
|
813
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/resetState.html) -->
|
|
814
|
+
<!-- The below content is automatically added from ./../apiExamples/resetState.html -->
|
|
815
|
+
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
816
|
+
<br /><br />
|
|
817
|
+
<auro-combobox id="resetStateExample" required>
|
|
818
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
819
|
+
<span slot="label">Name</span>
|
|
820
|
+
<auro-menu>
|
|
821
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
822
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
823
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
824
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
825
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
826
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
827
|
+
</auro-menu>
|
|
828
|
+
</auro-combobox>
|
|
829
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
830
|
+
</div>
|
|
831
|
+
<auro-accordion alignRight>
|
|
832
|
+
<span slot="trigger">See code</span>
|
|
833
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.html) -->
|
|
834
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/resetState.html -->
|
|
835
|
+
|
|
836
|
+
```html
|
|
837
|
+
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
838
|
+
<br /><br />
|
|
839
|
+
<auro-combobox id="resetStateExample" required>
|
|
840
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
841
|
+
<span slot="label">Name</span>
|
|
842
|
+
<auro-menu>
|
|
843
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
844
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
845
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
846
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
847
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
848
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
849
|
+
</auro-menu>
|
|
850
|
+
</auro-combobox>
|
|
851
|
+
```
|
|
852
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
853
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.js) -->
|
|
854
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/resetState.js -->
|
|
855
|
+
|
|
856
|
+
```js
|
|
857
|
+
export function resetStateExample() {
|
|
858
|
+
const elem = document.querySelector('#resetStateExample');
|
|
859
|
+
|
|
860
|
+
document.querySelector('#resetStateBtn').addEventListener('click', () => {
|
|
861
|
+
elem.reset();
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
```
|
|
865
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
866
|
+
</auro-accordion>
|
|
867
|
+
|
|
868
|
+
### Slot Examples
|
|
869
|
+
|
|
870
|
+
#### helpText
|
|
871
|
+
|
|
872
|
+
Sets the help text displayed below the trigger. The `helpText` slot can be used to provide additional context for the combobox. When using the `error` property, the `helpText` slot can be used to describe the error.
|
|
873
|
+
|
|
874
|
+
<div class="exampleWrapper">
|
|
875
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/helpText.html) -->
|
|
876
|
+
<!-- The below content is automatically added from ./../apiExamples/helpText.html -->
|
|
877
|
+
<auro-combobox>
|
|
878
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
879
|
+
<span slot="label">Name</span>
|
|
880
|
+
<span slot="helpText">Custom help text</span>
|
|
881
|
+
<auro-menu>
|
|
882
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
883
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
884
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
885
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
886
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
887
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
888
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
889
|
+
</auro-menu>
|
|
890
|
+
</auro-combobox>
|
|
891
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
892
|
+
</div>
|
|
893
|
+
<auro-accordion alignRight>
|
|
894
|
+
<span slot="trigger">See code</span>
|
|
895
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/helpText.html) -->
|
|
896
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/helpText.html -->
|
|
897
|
+
|
|
898
|
+
```html
|
|
899
|
+
<auro-combobox>
|
|
900
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
901
|
+
<span slot="label">Name</span>
|
|
902
|
+
<span slot="helpText">Custom help text</span>
|
|
903
|
+
<auro-menu>
|
|
904
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
905
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
906
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
907
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
908
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
909
|
+
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption>
|
|
910
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
911
|
+
</auro-menu>
|
|
912
|
+
</auro-combobox>
|
|
913
|
+
```
|
|
914
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
915
|
+
</auro-accordion>
|
|
916
|
+
|
|
917
|
+
#### Loading<a name="loading"></a>
|
|
918
|
+
While content is loading, the menu can either remain empty or display a loading placeholder
|
|
919
|
+
|
|
920
|
+
<div class="exampleWrapper">
|
|
921
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/loading.html) -->
|
|
922
|
+
<!-- The below content is automatically added from ./../apiExamples/loading.html -->
|
|
923
|
+
<auro-combobox id="loadingExample">
|
|
924
|
+
<span slot="bib.fullscreen.headline">Loading Combobox Header</span>
|
|
925
|
+
<span slot="label">Please select a preference</span>
|
|
926
|
+
<auro-menu id="loadingExampleComboboxMenu">
|
|
927
|
+
<auro-loader slot="loadingIcon" orbit xs></auro-loader><span slot="loadingText">Loading...</span>
|
|
928
|
+
</auro-menu>
|
|
929
|
+
</auro-combobox>
|
|
930
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
931
|
+
</div>
|
|
932
|
+
<auro-accordion alignRight>
|
|
933
|
+
<span slot="trigger">See code</span>
|
|
934
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/loading.js) -->
|
|
935
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/loading.js -->
|
|
936
|
+
|
|
937
|
+
```js
|
|
938
|
+
export function auroMenuLoadingExample() {
|
|
939
|
+
const combobox = document.querySelector("#loadingExample");
|
|
940
|
+
const menu = document.querySelector("#loadingExampleComboboxMenu");
|
|
941
|
+
|
|
942
|
+
const emptyMenu = () => {
|
|
943
|
+
const menuoptions = menu.querySelectorAll('auro-menuoption');
|
|
944
|
+
menuoptions.forEach(mo => menu.removeChild(mo));
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
const fillMenu = () => {
|
|
948
|
+
menu.innerHTML += `
|
|
949
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
950
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
951
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
952
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
953
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
954
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
955
|
+
`;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
const load = () => {
|
|
959
|
+
clearTimeout(load.id);
|
|
960
|
+
emptyMenu();
|
|
961
|
+
menu.setAttribute('loading', 'loading');
|
|
962
|
+
load.id = setTimeout(() => {
|
|
963
|
+
menu.removeAttribute('loading');
|
|
964
|
+
fillMenu();
|
|
965
|
+
}, 1000);
|
|
966
|
+
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
combobox.addEventListener("input", (e) => {
|
|
970
|
+
if (e.target.value && e.target.value !== e.target.optionSelected?.textContent) {
|
|
971
|
+
load();
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
```
|
|
976
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
977
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/loading.html) -->
|
|
978
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/loading.html -->
|
|
979
|
+
|
|
980
|
+
```html
|
|
981
|
+
<auro-combobox id="loadingExample">
|
|
982
|
+
<span slot="bib.fullscreen.headline">Loading Combobox Header</span>
|
|
983
|
+
<span slot="label">Please select a preference</span>
|
|
984
|
+
<auro-menu id="loadingExampleComboboxMenu">
|
|
985
|
+
<auro-loader slot="loadingIcon" orbit xs></auro-loader><span slot="loadingText">Loading...</span>
|
|
986
|
+
</auro-menu>
|
|
987
|
+
</auro-combobox>
|
|
988
|
+
```
|
|
989
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
990
|
+
</auro-accordion>
|
|
991
|
+
|
|
992
|
+
### Customized bib position
|
|
993
|
+
The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
|
|
994
|
+
|
|
995
|
+
- `placement` specifies the preferred position where the bib should appear relative to the trigger.
|
|
996
|
+
- `offset` sets the distance between the trigger and the bib.
|
|
997
|
+
- 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`.
|
|
998
|
+
- Unless `noFlip` is enabled, if there isn't enough space for the preferred `placement`, the bib will automatically flip to an alternative position.
|
|
999
|
+
|
|
1000
|
+
<div class="exampleWrapper">
|
|
1001
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floaterConfig.html) -->
|
|
1002
|
+
<!-- The below content is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
1003
|
+
<div style="width: 350px">
|
|
1004
|
+
<auro-combobox offset="20" noFlip placement="bottom-end">
|
|
1005
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1006
|
+
<span slot="label">bottom-end bib with 20px offset and noFlip</span>
|
|
1007
|
+
<auro-menu>
|
|
1008
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1009
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1010
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1011
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1012
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1013
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1014
|
+
</auro-menu>
|
|
1015
|
+
</auro-combobox>
|
|
1016
|
+
<auro-combobox offset="20" placement="bottom-end">
|
|
1017
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1018
|
+
<span slot="label">bottom-end bib with 20px offset and flip</span>
|
|
1019
|
+
<auro-menu>
|
|
1020
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1021
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1022
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1023
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1024
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1025
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1026
|
+
</auro-menu>
|
|
1027
|
+
</auro-combobox>
|
|
1028
|
+
<auro-combobox offset="20" noFlip placement="right" autoPlacement>
|
|
1029
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1030
|
+
<span slot="label">right bib with 20px offset, noFlip and autoPlacement</span>
|
|
1031
|
+
<auro-menu>
|
|
1032
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1033
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1034
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1035
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1036
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1037
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1038
|
+
</auro-menu>
|
|
1039
|
+
</auro-combobox>
|
|
1040
|
+
</div>
|
|
1041
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1042
|
+
</div>
|
|
1043
|
+
<auro-accordion alignRight>
|
|
1044
|
+
<span slot="trigger">See code</span>
|
|
1045
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/floaterConfig.html) -->
|
|
1046
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
1047
|
+
|
|
1048
|
+
```html
|
|
1049
|
+
<div style="width: 350px">
|
|
1050
|
+
<auro-combobox offset="20" noFlip placement="bottom-end">
|
|
1051
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1052
|
+
<span slot="label">bottom-end bib with 20px offset and noFlip</span>
|
|
1053
|
+
<auro-menu>
|
|
1054
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1055
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1056
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1057
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1058
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1059
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1060
|
+
</auro-menu>
|
|
1061
|
+
</auro-combobox>
|
|
1062
|
+
<auro-combobox offset="20" placement="bottom-end">
|
|
1063
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1064
|
+
<span slot="label">bottom-end bib with 20px offset and flip</span>
|
|
1065
|
+
<auro-menu>
|
|
1066
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1067
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1068
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1069
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1070
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1071
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1072
|
+
</auro-menu>
|
|
1073
|
+
</auro-combobox>
|
|
1074
|
+
<auro-combobox offset="20" noFlip placement="right" autoPlacement>
|
|
1075
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1076
|
+
<span slot="label">right bib with 20px offset, noFlip and autoPlacement</span>
|
|
1077
|
+
<auro-menu>
|
|
1078
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1079
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1080
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1081
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1082
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1083
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1084
|
+
</auro-menu>
|
|
1085
|
+
</auro-combobox>
|
|
1086
|
+
</div>
|
|
1087
|
+
```
|
|
1088
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1089
|
+
</auro-accordion>
|
|
1090
|
+
|
|
1091
|
+
### Dropdown with fullscreen bib
|
|
1092
|
+
|
|
1093
|
+
You can make the dropdown open in fullscreen at a specific breakpoint by setting `fullscreenBreakpoint`.
|
|
1094
|
+
|
|
1095
|
+
The default value of `fullscreenBreakpoint` is `sm`.
|
|
1096
|
+
|
|
1097
|
+
Breakpoint token can be found [here](https://auro.alaskaair.com/getting-started/developers/design-tokens)
|
|
1098
|
+
|
|
1099
|
+
To support fullcreen bib, setting `bib.fullscreen.headline` is **STRONGLY RECOMMENDED**.
|
|
1100
|
+
|
|
1101
|
+
<div class="exampleWrapper">
|
|
1102
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/fullscreenBreakpoint.html) -->
|
|
1103
|
+
<!-- The below content is automatically added from ./../apiExamples/fullscreenBreakpoint.html -->
|
|
1104
|
+
<auro-combobox fullscreenBreakpoint="lg">
|
|
1105
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1106
|
+
<span slot="label">Name</span>
|
|
1107
|
+
<auro-menu>
|
|
1108
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1109
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1110
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1111
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1112
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1113
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1114
|
+
</auro-menu>
|
|
1115
|
+
</auro-combobox>
|
|
1116
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1117
|
+
</div>
|
|
1118
|
+
<auro-accordion alignRight>
|
|
1119
|
+
<span slot="trigger">See code</span>
|
|
1120
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/fullscreenBreakpoint.html) -->
|
|
1121
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/fullscreenBreakpoint.html -->
|
|
1122
|
+
|
|
1123
|
+
```html
|
|
1124
|
+
<auro-combobox fullscreenBreakpoint="lg">
|
|
1125
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1126
|
+
<span slot="label">Name</span>
|
|
1127
|
+
<auro-menu>
|
|
1128
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1129
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1130
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1131
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1132
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1133
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1134
|
+
</auro-menu>
|
|
1135
|
+
</auro-combobox>
|
|
1136
|
+
```
|
|
1137
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1138
|
+
</auro-accordion>
|
|
1139
|
+
|
|
1140
|
+
#### in Dialog
|
|
1141
|
+
|
|
1142
|
+
The component can be in a dialog.
|
|
1143
|
+
|
|
1144
|
+
<div class="exampleWrapper">
|
|
1145
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/inDialog.html) -->
|
|
1146
|
+
<!-- The below content is automatically added from ./../apiExamples/inDialog.html -->
|
|
1147
|
+
<div>
|
|
1148
|
+
<auro-button id="combobox-dialog-opener">Combobox in Dialog</auro-button>
|
|
1149
|
+
<auro-dialog id="combobox-dialog">
|
|
1150
|
+
<span slot="header">Combobox in Dialog</span>
|
|
1151
|
+
<div slot="content">
|
|
1152
|
+
<auro-combobox id="focusExample">
|
|
1153
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1154
|
+
<span slot="label">Name</span>
|
|
1155
|
+
<auro-menu>
|
|
1156
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1157
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1158
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1159
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1160
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1161
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1162
|
+
</auro-menu>
|
|
1163
|
+
</auro-combobox>
|
|
1164
|
+
</div>
|
|
1165
|
+
</auro-dialog>
|
|
1166
|
+
</div>
|
|
1167
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1168
|
+
</div>
|
|
1169
|
+
<auro-accordion alignRight>
|
|
1170
|
+
<span slot="trigger">See code</span>
|
|
1171
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inDialog.html) -->
|
|
1172
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/inDialog.html -->
|
|
1173
|
+
|
|
1174
|
+
```html
|
|
1175
|
+
<div>
|
|
1176
|
+
<auro-button id="combobox-dialog-opener">Combobox in Dialog</auro-button>
|
|
1177
|
+
<auro-dialog id="combobox-dialog">
|
|
1178
|
+
<span slot="header">Combobox in Dialog</span>
|
|
1179
|
+
<div slot="content">
|
|
1180
|
+
<auro-combobox id="focusExample">
|
|
1181
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1182
|
+
<span slot="label">Name</span>
|
|
1183
|
+
<auro-menu>
|
|
1184
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1185
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1186
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1187
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1188
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1189
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1190
|
+
</auro-menu>
|
|
1191
|
+
</auro-combobox>
|
|
1192
|
+
</div>
|
|
1193
|
+
</auro-dialog>
|
|
1194
|
+
</div>
|
|
1195
|
+
```
|
|
1196
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1197
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inDialog.js) -->
|
|
1198
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/inDialog.js -->
|
|
1199
|
+
|
|
1200
|
+
```js
|
|
1201
|
+
export function inDialogExample() {
|
|
1202
|
+
document.querySelector("#combobox-dialog-opener").addEventListener("click", () => {
|
|
1203
|
+
const dialog = document.querySelector("#combobox-dialog");
|
|
1204
|
+
dialog.open = true;
|
|
1205
|
+
});
|
|
1206
|
+
};
|
|
1207
|
+
```
|
|
1208
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1209
|
+
</auro-accordion>
|