@aurodesignsystem-dev/auro-formkit 0.0.0-pr1052.0 → 0.0.0-pr1052.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/combobox/README.md +2 -0
- package/components/combobox/demo/api.md +67 -43
- package/components/combobox/demo/api.min.js +257 -89
- package/components/combobox/demo/index.md +2 -0
- package/components/combobox/demo/index.min.js +247 -82
- package/components/combobox/demo/readme.md +2 -0
- package/components/combobox/dist/auro-combobox.d.ts +42 -2
- package/components/combobox/dist/index.js +221 -68
- package/components/combobox/dist/registered.js +221 -68
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/api.min.js +54 -14
- package/components/datepicker/demo/index.min.js +54 -14
- package/components/datepicker/dist/index.js +54 -14
- package/components/datepicker/dist/registered.js +54 -14
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/input/demo/api.md +48 -46
- package/components/input/demo/api.min.js +52 -12
- package/components/input/demo/index.min.js +52 -12
- package/components/input/dist/auro-input.d.ts +4 -0
- package/components/input/dist/base-input.d.ts +9 -1
- package/components/input/dist/index.js +52 -12
- package/components/input/dist/registered.js +52 -12
- package/components/layoutElement/dist/index.js +1 -1
- package/components/layoutElement/dist/registered.js +1 -1
- package/components/menu/demo/api.min.js +27 -15
- package/components/menu/demo/index.min.js +27 -15
- package/components/menu/dist/auro-menu.d.ts +2 -1
- package/components/menu/dist/index.js +27 -15
- package/components/menu/dist/registered.js +27 -15
- package/components/select/demo/api.min.js +28 -16
- package/components/select/demo/index.min.js +28 -16
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/package.json +1 -1
|
@@ -21,6 +21,8 @@ The following sections are editable by making changes to the following files:
|
|
|
21
21
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
22
22
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
23
23
|
`<auro-combobox>` is the combination of [dropdown](http://auro.alaskaair.com/components/auro/dropdown), [input](http://auro.alaskaair.com/components/auro/input), and [menu](http://auro.alaskaair.com/components/auro/menu) and allows users to filter search results from a predefined list as they type. When the user starts typing in the text input, a dropdown of a menu shows up to display options that match the user’s search.
|
|
24
|
+
|
|
25
|
+
Combobox behaves as a filter of menu options. Typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
|
|
24
26
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
25
27
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
26
28
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
@@ -5,35 +5,38 @@
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
| Property | Attribute | Type
|
|
9
|
-
|
|
10
|
-
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean`
|
|
11
|
-
| [autocomplete](#autocomplete) | `autocomplete` | `string`
|
|
12
|
-
| [checkmark](#checkmark) | `checkmark` | `boolean`
|
|
13
|
-
| [disabled](#disabled) | `disabled` | `boolean`
|
|
14
|
-
| [
|
|
15
|
-
| [
|
|
16
|
-
| [
|
|
17
|
-
| [
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
8
|
+
| Property | Attribute | Modifiers | 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 check marks to selected options. |
|
|
13
|
+
| [disabled](#disabled) | `disabled` | | `boolean` | | If set, disables the combobox. |
|
|
14
|
+
| [dvInputOnly](#dvInputOnly) | `dvInputOnly` | | `boolean` | | If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked. |
|
|
15
|
+
| [error](#error) | `error` | | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
16
|
+
| [format](#format) | `format` | | `string` | | Specifies the input mask format. |
|
|
17
|
+
| [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. |
|
|
18
|
+
| [inputValue](#inputValue) | | readonly | `string \| undefined` | | Returns the current value of the input element within the combobox. |
|
|
19
|
+
| [inputmode](#inputmode) | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
|
|
20
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
|
|
21
|
+
| [layout](#layout) | | | `string` | | |
|
|
22
|
+
| [matchWidth](#matchWidth) | `matchWidth` | | `boolean` | true | If declared, the popover and trigger will be set to the same width. |
|
|
23
|
+
| [noFilter](#noFilter) | `noFilter` | | `boolean` | | If set, combobox will not filter menuoptions based in input. |
|
|
24
|
+
| [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`. |
|
|
25
|
+
| [noValidate](#noValidate) | `noValidate` | | `boolean` | | If set, disables auto-validation on blur. |
|
|
26
|
+
| [offset](#offset) | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
|
|
27
|
+
| [onDark](#onDark) | `onDark` | | `boolean` | | If declared, onDark styles will be applied to the trigger. |
|
|
28
|
+
| [optionSelected](#optionSelected) | `optionSelected` | | `HTMLElement` | | Specifies the current selected option. |
|
|
29
|
+
| [persistInput](#persistInput) | `persistInput` | | `Boolean` | | If declared, selecting a menu option will not change the input value. By doing so,<br />the current menu filter will be preserved and the user can continue from their last<br />filter state. It is recommended to use this in combination with the `displayValue` slot. |
|
|
30
|
+
| [placeholder](#placeholder) | `placeholder` | | `string` | | Define custom placeholder text, only supported by date input formats. |
|
|
31
|
+
| [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" |
|
|
32
|
+
| [required](#required) | `required` | | `boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
33
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
34
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
|
|
35
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
36
|
+
| [triggerIcon](#triggerIcon) | `triggerIcon` | | `boolean` | | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
|
|
37
|
+
| [type](#type) | `type` | | `string` | | Applies the defined value as the type attribute on auro-input. |
|
|
38
|
+
| [validity](#validity) | `validity` | | `string` | | Specifies the `validityState` this element is in. |
|
|
39
|
+
| [value](#value) | `value` | | `string` | | Value selected for the dropdown menu. |
|
|
37
40
|
|
|
38
41
|
## Methods
|
|
39
42
|
|
|
@@ -49,10 +52,12 @@
|
|
|
49
52
|
|
|
50
53
|
## Events
|
|
51
54
|
|
|
52
|
-
| Event | Type
|
|
53
|
-
|
|
54
|
-
| `auroCombobox-valueSet` | `CustomEvent<any>`
|
|
55
|
-
| `auroFormElement-validated` |
|
|
55
|
+
| Event | Type | Description |
|
|
56
|
+
|-----------------------------|------------------------------------------------|--------------------------------------------------|
|
|
57
|
+
| `auroCombobox-valueSet` | `CustomEvent<any>` | (Deprecated) Notifies that the component has a new value set. |
|
|
58
|
+
| `auroFormElement-validated` | | Notifies that the component value(s) have been validated. |
|
|
59
|
+
| [input](#input) | `CustomEvent<any>` | Notifies that the component has a new value set. |
|
|
60
|
+
| [inputValue](#inputValue) | `CustomEvent<{ value: string \| undefined; }>` | Notifies that the components internal HTML5 input value has changed. |
|
|
56
61
|
|
|
57
62
|
## Slots
|
|
58
63
|
|
|
@@ -153,12 +158,20 @@ This example demonstrates a data driven combobox. The data is used to populate t
|
|
|
153
158
|
|
|
154
159
|
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.
|
|
155
160
|
|
|
156
|
-
<div class="exampleWrapper">
|
|
161
|
+
<div class="exampleWrapper--ondark">
|
|
157
162
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dynamicMenu.html) -->
|
|
158
163
|
<!-- The below content is automatically added from ./../apiExamples/dynamicMenu.html -->
|
|
159
164
|
<!-- HTML example file -->
|
|
160
165
|
<!-- ----------------- -->
|
|
161
|
-
<auro-combobox
|
|
166
|
+
<auro-combobox
|
|
167
|
+
id="dynamicMenuExample"
|
|
168
|
+
value="GER"
|
|
169
|
+
layout="snowflake"
|
|
170
|
+
shape="snowflake"
|
|
171
|
+
size="lg"
|
|
172
|
+
ondark
|
|
173
|
+
noFilter
|
|
174
|
+
persistInput>
|
|
162
175
|
<span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
|
|
163
176
|
<span slot="label">Name</span>
|
|
164
177
|
<!--
|
|
@@ -177,7 +190,15 @@ The menu in this example was populated from data from a country/city API. To kee
|
|
|
177
190
|
```html
|
|
178
191
|
<!-- HTML example file -->
|
|
179
192
|
<!-- ----------------- -->
|
|
180
|
-
<auro-combobox
|
|
193
|
+
<auro-combobox
|
|
194
|
+
id="dynamicMenuExample"
|
|
195
|
+
value="GER"
|
|
196
|
+
layout="snowflake"
|
|
197
|
+
shape="snowflake"
|
|
198
|
+
size="lg"
|
|
199
|
+
ondark
|
|
200
|
+
noFilter
|
|
201
|
+
persistInput>
|
|
181
202
|
<span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
|
|
182
203
|
<span slot="label">Name</span>
|
|
183
204
|
<!--
|
|
@@ -211,15 +232,15 @@ export function dynamicMenuExample() {
|
|
|
211
232
|
resetMenu(initialMenu);
|
|
212
233
|
|
|
213
234
|
for (let index = 0; index < data.length; index++) {
|
|
214
|
-
|
|
215
|
-
|
|
235
|
+
const country = data[index]['country'];
|
|
236
|
+
const cities = data[index]['cities'];
|
|
216
237
|
|
|
217
|
-
generateMenuOptionHtml(initialMenu, country, country);
|
|
238
|
+
generateMenuOptionHtml(initialMenu, country, country.substring(0, 3).toUpperCase());
|
|
218
239
|
|
|
219
240
|
for (let indexB = 0; indexB < cities.length; indexB++) {
|
|
220
|
-
|
|
241
|
+
const subMenu = document.createElement('auro-menu');
|
|
221
242
|
|
|
222
|
-
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB]);
|
|
243
|
+
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB].substring(0, 3).toUpperCase());
|
|
223
244
|
|
|
224
245
|
initialMenu.appendChild(subMenu);
|
|
225
246
|
}
|
|
@@ -228,12 +249,15 @@ export function dynamicMenuExample() {
|
|
|
228
249
|
|
|
229
250
|
// Helper function that generates HTML for menuoptions
|
|
230
251
|
function generateMenuOptionHtml(menu, label, value) {
|
|
231
|
-
|
|
252
|
+
const option = document.createElement('auro-menuoption');
|
|
253
|
+
const displayValue = document.createElement('div');
|
|
254
|
+
displayValue.setAttribute("slot", "displayValue");
|
|
255
|
+
displayValue.innerHTML = value;
|
|
232
256
|
|
|
233
257
|
option.value = value;
|
|
234
258
|
option.innerHTML = label;
|
|
235
|
-
|
|
236
259
|
menu.appendChild(option);
|
|
260
|
+
option.appendChild(displayValue);
|
|
237
261
|
}
|
|
238
262
|
|
|
239
263
|
// Main javascript that runs all JS to create example
|