@aurodesignsystem/auro-formkit 6.1.0 → 6.2.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 +24 -16
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +11 -0
- package/components/bibtemplate/dist/index.js +17 -4
- package/components/bibtemplate/dist/registered.js +17 -4
- package/components/checkbox/demo/accessibility.md +15 -4
- package/components/checkbox/demo/api.md +20 -13
- package/components/checkbox/demo/customize.md +2 -1
- package/components/checkbox/demo/customize.min.js +129 -29
- package/components/checkbox/demo/getting-started.min.js +129 -29
- package/components/checkbox/demo/index.min.js +129 -29
- package/components/checkbox/demo/styles.min.css +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +33 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +7 -2
- package/components/checkbox/dist/index.js +129 -29
- package/components/checkbox/dist/registered.js +129 -29
- package/components/combobox/demo/api.md +27 -19
- package/components/combobox/demo/customize.min.js +676 -151
- package/components/combobox/demo/getting-started.md +49 -0
- package/components/combobox/demo/getting-started.min.js +695 -151
- package/components/combobox/demo/index.min.js +676 -151
- package/components/combobox/demo/styles.min.css +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +72 -27
- package/components/combobox/dist/index.js +569 -133
- package/components/combobox/dist/registered.js +569 -133
- package/components/counter/demo/api.md +36 -16
- package/components/counter/demo/customize.min.js +692 -105
- package/components/counter/demo/getting-started.html +3 -1
- package/components/counter/demo/getting-started.md +49 -0
- package/components/counter/demo/getting-started.min.js +8808 -0
- package/components/counter/demo/index.min.js +692 -105
- package/components/counter/demo/styles.min.css +1 -1
- package/components/counter/dist/auro-counter-button.d.ts +4 -0
- package/components/counter/dist/auro-counter-group.d.ts +38 -6
- package/components/counter/dist/auro-counter.d.ts +33 -0
- package/components/counter/dist/counterGroupKeyboardStrategy.d.ts +1 -0
- package/components/counter/dist/index.js +691 -104
- package/components/counter/dist/registered.js +691 -104
- package/components/datepicker/demo/api.md +55 -49
- package/components/datepicker/demo/customize.min.js +659 -166
- package/components/datepicker/demo/getting-started.html +3 -1
- package/components/datepicker/demo/getting-started.md +39 -0
- package/components/datepicker/demo/getting-started.min.js +37669 -0
- package/components/datepicker/demo/index.min.js +659 -166
- package/components/datepicker/demo/styles.min.css +1 -1
- package/components/datepicker/dist/auro-calendar-cell.d.ts +58 -4
- package/components/datepicker/dist/auro-calendar-month.d.ts +10 -4
- package/components/datepicker/dist/auro-calendar.d.ts +25 -6
- package/components/datepicker/dist/auro-datepicker.d.ts +75 -24
- package/components/datepicker/dist/index.js +658 -165
- package/components/datepicker/dist/registered.js +658 -165
- package/components/dropdown/demo/api.md +25 -22
- package/components/dropdown/demo/customize.min.js +217 -43
- package/components/dropdown/demo/getting-started.min.js +364 -95
- package/components/dropdown/demo/index.min.js +217 -43
- package/components/dropdown/demo/styles.min.css +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +35 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +17 -5
- package/components/dropdown/dist/index.js +217 -43
- package/components/dropdown/dist/registered.js +217 -43
- package/components/form/demo/customize.min.js +2739 -628
- package/components/form/demo/getting-started.min.js +2739 -628
- package/components/form/demo/index.min.js +2739 -628
- package/components/form/demo/registerDemoDeps.min.js +2733 -627
- package/components/form/demo/styles.min.css +1 -1
- package/components/form/dist/index.js +6 -1
- package/components/form/dist/registered.js +6 -1
- package/components/helptext/dist/auro-helptext.d.ts +9 -7
- package/components/helptext/dist/index.js +9 -3
- package/components/helptext/dist/registered.js +9 -3
- package/components/input/demo/api.md +30 -30
- package/components/input/demo/customize.md +0 -37
- package/components/input/demo/customize.min.js +147 -61
- package/components/input/demo/getting-started.md +33 -0
- package/components/input/demo/getting-started.min.js +167 -52
- package/components/input/demo/index.min.js +147 -52
- package/components/input/demo/styles.min.css +1 -1
- package/components/input/dist/base-input.d.ts +80 -25
- package/components/input/dist/index.js +146 -51
- package/components/input/dist/registered.js +146 -51
- package/components/layoutElement/dist/auroElement.d.ts +10 -17
- package/components/layoutElement/dist/index.js +20 -20
- package/components/layoutElement/dist/registered.js +20 -20
- package/components/menu/demo/api.md +31 -27
- package/components/menu/demo/index.min.js +126 -37
- package/components/menu/demo/styles.min.css +1 -1
- package/components/menu/dist/auro-menu.d.ts +26 -21
- package/components/menu/dist/auro-menuoption.d.ts +27 -1
- package/components/menu/dist/index.js +126 -37
- package/components/menu/dist/registered.js +126 -37
- package/components/radio/demo/accessibility.md +15 -4
- package/components/radio/demo/api.md +10 -9
- package/components/radio/demo/customize.min.js +120 -27
- package/components/radio/demo/getting-started.min.js +120 -27
- package/components/radio/demo/index.min.js +120 -27
- package/components/radio/demo/styles.min.css +1 -1
- package/components/radio/dist/auro-radio-group.d.ts +31 -3
- package/components/radio/dist/auro-radio.d.ts +4 -2
- package/components/radio/dist/index.js +120 -27
- package/components/radio/dist/registered.js +120 -27
- package/components/select/demo/api.md +18 -15
- package/components/select/demo/customize.min.js +396 -94
- package/components/select/demo/getting-started.md +49 -0
- package/components/select/demo/getting-started.min.js +418 -95
- package/components/select/demo/index.min.js +396 -94
- package/components/select/demo/styles.min.css +1 -1
- package/components/select/dist/auro-select.d.ts +18 -0
- package/components/select/dist/index.js +289 -76
- package/components/select/dist/registered.js +289 -76
- package/custom-elements.json +1354 -1404
- package/package.json +11 -11
|
@@ -1,24 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
3
|
+
*
|
|
4
|
+
* It defines the common `layout`, `shape`, `size`, and `ondark` reactive
|
|
5
|
+
* properties and the architecture helpers (`renderLayout`, `resetShapeClasses`,
|
|
6
|
+
* `resetLayoutClasses`) that subclasses use to render a chosen layout and apply
|
|
7
|
+
* the matching `shape-*` / `layout-*` wrapper classes. Subclasses supply their
|
|
8
|
+
* own default and valid value set for `layout`, `shape`, and `size`.
|
|
9
|
+
*/
|
|
1
10
|
export class AuroElement extends LitElement {
|
|
2
11
|
static get properties(): {
|
|
3
12
|
/**
|
|
4
|
-
*
|
|
5
|
-
* @default {'default'}
|
|
13
|
+
* When true, renders the component styled for use on a dark background.
|
|
6
14
|
*/
|
|
7
|
-
layout: {
|
|
8
|
-
type: StringConstructor;
|
|
9
|
-
attribute: string;
|
|
10
|
-
reflect: boolean;
|
|
11
|
-
};
|
|
12
|
-
shape: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
attribute: string;
|
|
15
|
-
reflect: boolean;
|
|
16
|
-
};
|
|
17
|
-
size: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
attribute: string;
|
|
20
|
-
reflect: boolean;
|
|
21
|
-
};
|
|
22
15
|
onDark: {
|
|
23
16
|
type: BooleanConstructor;
|
|
24
17
|
attribute: string;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
5
|
+
*
|
|
6
|
+
* It defines the common `layout`, `shape`, `size`, and `ondark` reactive
|
|
7
|
+
* properties and the architecture helpers (`renderLayout`, `resetShapeClasses`,
|
|
8
|
+
* `resetLayoutClasses`) that subclasses use to render a chosen layout and apply
|
|
9
|
+
* the matching `shape-*` / `layout-*` wrapper classes. Subclasses supply their
|
|
10
|
+
* own default and valid value set for `layout`, `shape`, and `size`.
|
|
11
|
+
*/
|
|
3
12
|
class AuroElement extends LitElement {
|
|
4
13
|
static get properties() {
|
|
5
14
|
return {
|
|
6
15
|
|
|
7
16
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @default {'default'}
|
|
17
|
+
* When true, renders the component styled for use on a dark background.
|
|
10
18
|
*/
|
|
11
|
-
layout: {
|
|
12
|
-
type: String,
|
|
13
|
-
attribute: "layout",
|
|
14
|
-
reflect: true
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
shape: {
|
|
18
|
-
type: String,
|
|
19
|
-
attribute: "shape",
|
|
20
|
-
reflect: true
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
size: {
|
|
24
|
-
type: String,
|
|
25
|
-
attribute: "size",
|
|
26
|
-
reflect: true
|
|
27
|
-
},
|
|
28
|
-
|
|
29
19
|
onDark: {
|
|
30
20
|
type: Boolean,
|
|
31
21
|
attribute: "ondark",
|
|
32
22
|
reflect: true
|
|
33
23
|
}
|
|
24
|
+
|
|
25
|
+
// NOTE: `layout`, `shape`, and `size` are intentionally NOT declared here.
|
|
26
|
+
// Their valid value sets differ per component, and the CEM analyzer roots
|
|
27
|
+
// an inherited property's `type` in the class that declares it — a base
|
|
28
|
+
// declaration would force every subclass's `@type` to be discarded and
|
|
29
|
+
// emitted as plain `string`. Each subclass declares its own `layout` /
|
|
30
|
+
// `shape` / `size` with an exact `@type` union instead. AuroElement still
|
|
31
|
+
// consumes `this.layout` / `this.shape` / `this.size` in its render and
|
|
32
|
+
// architecture helpers below (subclasses guarantee the reactive props).
|
|
33
|
+
// See AlaskaAirlines/discussions#653.
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
5
|
+
*
|
|
6
|
+
* It defines the common `layout`, `shape`, `size`, and `ondark` reactive
|
|
7
|
+
* properties and the architecture helpers (`renderLayout`, `resetShapeClasses`,
|
|
8
|
+
* `resetLayoutClasses`) that subclasses use to render a chosen layout and apply
|
|
9
|
+
* the matching `shape-*` / `layout-*` wrapper classes. Subclasses supply their
|
|
10
|
+
* own default and valid value set for `layout`, `shape`, and `size`.
|
|
11
|
+
*/
|
|
3
12
|
class AuroElement extends LitElement {
|
|
4
13
|
static get properties() {
|
|
5
14
|
return {
|
|
6
15
|
|
|
7
16
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @default {'default'}
|
|
17
|
+
* When true, renders the component styled for use on a dark background.
|
|
10
18
|
*/
|
|
11
|
-
layout: {
|
|
12
|
-
type: String,
|
|
13
|
-
attribute: "layout",
|
|
14
|
-
reflect: true
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
shape: {
|
|
18
|
-
type: String,
|
|
19
|
-
attribute: "shape",
|
|
20
|
-
reflect: true
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
size: {
|
|
24
|
-
type: String,
|
|
25
|
-
attribute: "size",
|
|
26
|
-
reflect: true
|
|
27
|
-
},
|
|
28
|
-
|
|
29
19
|
onDark: {
|
|
30
20
|
type: Boolean,
|
|
31
21
|
attribute: "ondark",
|
|
32
22
|
reflect: true
|
|
33
23
|
}
|
|
24
|
+
|
|
25
|
+
// NOTE: `layout`, `shape`, and `size` are intentionally NOT declared here.
|
|
26
|
+
// Their valid value sets differ per component, and the CEM analyzer roots
|
|
27
|
+
// an inherited property's `type` in the class that declares it — a base
|
|
28
|
+
// declaration would force every subclass's `@type` to be discarded and
|
|
29
|
+
// emitted as plain `string`. Each subclass declares its own `layout` /
|
|
30
|
+
// `shape` / `size` with an exact `@type` union instead. AuroElement still
|
|
31
|
+
// consumes `this.layout` / `this.shape` / `this.size` in its render and
|
|
32
|
+
// architecture helpers below (subclasses guarantee the reactive props).
|
|
33
|
+
// See AlaskaAirlines/discussions#653.
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -7,32 +7,35 @@ The `auro-menu` element provides users a way to select from a list of options.
|
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
|
-
| Property | Attribute | Modifiers | Type
|
|
11
|
-
|
|
12
|
-
| `currentLabel` | | readonly | `string`
|
|
13
|
-
| `disabled` | `disabled` | | `boolean`
|
|
14
|
-
| `hasLoadingPlaceholder` | | readonly | `boolean`
|
|
15
|
-
| `index` | | | `number`
|
|
16
|
-
| `layout` |
|
|
17
|
-
| `loading` | `loading` | | `boolean`
|
|
18
|
-
| `matchWord` | `matchword` | | `string`
|
|
19
|
-
| `multiSelect` | `multiselect` | | `boolean`
|
|
20
|
-
| `noCheckmark` | `nocheckmark` | | `boolean`
|
|
21
|
-
| `optionActive` | | | `
|
|
22
|
-
| `optionSelected` | | | `
|
|
23
|
-
| `options` | | readonly | `HTMLElement[]`
|
|
24
|
-
| `selectedOption` | | readonly | `HTMLElement \| null`
|
|
25
|
-
| `selectedOptions` | | readonly | `HTMLElement[]`
|
|
26
|
-
| `
|
|
10
|
+
| Property | Attribute | Modifiers | Type | Default | Description |
|
|
11
|
+
|-------------------------|---------------|-----------|----------------------------------------|-------------|--------------------------------------------------|
|
|
12
|
+
| `currentLabel` | | readonly | `string` | | |
|
|
13
|
+
| `disabled` | `disabled` | | `boolean` | | When true, the entire menu and all options are disabled. |
|
|
14
|
+
| `hasLoadingPlaceholder` | | readonly | `boolean` | | Getter for loading placeholder state. |
|
|
15
|
+
| `index` | | | `number` | | |
|
|
16
|
+
| `layout` | `layout` | | `string` | | Applies a named layout variant to the menu. Free-form string consumed by the shared architecture helpers; menu defines no closed value set. |
|
|
17
|
+
| `loading` | `loading` | | `boolean` | false | When true, displays a loading state using the loadingIcon and loadingText slots if provided. |
|
|
18
|
+
| `matchWord` | `matchword` | | `string` | "undefined" | Specifies a string used to highlight matched string parts in options. |
|
|
19
|
+
| `multiSelect` | `multiselect` | | `boolean` | false | When true, the selected option can be multiple options. |
|
|
20
|
+
| `noCheckmark` | `nocheckmark` | | `boolean` | false | When true, selected option will not show the checkmark. |
|
|
21
|
+
| `optionActive` | | | `HTMLElement` | "undefined" | Specifies the current active menuOption. |
|
|
22
|
+
| `optionSelected` | | | `HTMLElement \| HTMLElement[]` | "undefined" | The currently selected menu option(s). In single-select mode this is a single `HTMLElement` (or `undefined` when nothing is selected). In multi-select mode this is an array of `HTMLElement`s. |
|
|
23
|
+
| `options` | | readonly | `HTMLElement[]` | | |
|
|
24
|
+
| `selectedOption` | | readonly | `HTMLElement \| null` | | Gets the first selected option, or null if none. |
|
|
25
|
+
| `selectedOptions` | | readonly | `HTMLElement[]` | | Gets the currently selected options as an array. |
|
|
26
|
+
| `shape` | `shape` | | `'box' \| 'pill' \| 'snowflake'` | "'box'" | Sets the shape of the menu options. |
|
|
27
|
+
| `size` | `size` | | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | "'sm'" | Sets the size of the menu options. |
|
|
28
|
+
| `value` | `value` | | `string` | "undefined" | The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.<br />Options marked `disabled` or `static` are not selectable by value; `hidden` options remain selectable. In single-select mode, if the value matches a non-selectable option the selection is cleared (`optionSelected` becomes `undefined`) and `auroMenu-selectValueFailure` is dispatched. In multi-select mode, non-selectable entries are dropped from the value and the remaining selectable entries are selected; `auroMenu-selectValueFailure` is dispatched only when none of the entries match a selectable option. |
|
|
27
29
|
|
|
28
30
|
## Methods
|
|
29
31
|
|
|
30
|
-
| Method
|
|
31
|
-
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
32
|
+
| Method | Type | Description |
|
|
33
|
+
|----------------------------------|--------------------------------------------------|--------------------------------------------------|
|
|
34
|
+
| `initializeArchitectureDefaults` | `(): void` | |
|
|
35
|
+
| `navigateOptions` | `(direction: string): void` | Navigates through options using keyboard.<br /><br />**direction**: 'up' or 'down'. |
|
|
36
|
+
| `reset` | `(): void` | Resets the menu to its initial state.<br />This is the only way to return value to undefined. |
|
|
37
|
+
| `selectByValue` | `(value: string \| string[] \| null \| undefined): void` | Selects options by value. Options marked `disabled` or `static` are not selectable; `hidden` options remain selectable. In single-select mode, if the value matches a non-selectable option the selection is cleared and `auroMenu-selectValueFailure` is dispatched. In multi-select mode, non-selectable entries are dropped and the remaining selectable entries are selected; `auroMenu-selectValueFailure` is dispatched only when none of the entries match a selectable option. Passing `undefined`, `null`, an empty string, or an empty array clears the selection without dispatching a failure.<br /><br />**value**: The value(s) to select. |
|
|
38
|
+
| `updateActiveOption` | `(indexOrOption: number \| HTMLElement): void` | Updates the active option state and dispatches events.<br />Accepts either a numeric index or an HTMLElement option.<br /><br />**indexOrOption**: Index of the option or the option element to make active. |
|
|
36
39
|
|
|
37
40
|
## Events
|
|
38
41
|
|
|
@@ -41,7 +44,7 @@ The `auro-menu` element provides users a way to select from a list of options.
|
|
|
41
44
|
| `auroMenu-activatedOption` | `CustomEvent<Element>` | Notifies that a menuoption has been made `active`. |
|
|
42
45
|
| `auroMenu-customEventFired` | `CustomEvent<any>` | Notifies that a custom event has been fired. |
|
|
43
46
|
| `auroMenu-loadingChange` | `CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>` | Notifies when the loading attribute is changed. |
|
|
44
|
-
| `auroMenu-optionsChange` | `CustomEvent<{ options:
|
|
47
|
+
| `auroMenu-optionsChange` | `CustomEvent<{ options: Array<HTMLElement> }>` | Notifies that the set of available menu options has changed. |
|
|
45
48
|
| `auroMenu-selectValueFailure` | `CustomEvent<any>` | Notifies that an attempt to select a menuoption by matching a value has failed. |
|
|
46
49
|
| `auroMenu-selectValueReset` | `CustomEvent<any>` | Notifies that the component value has been reset. |
|
|
47
50
|
| `auroMenu-selectedOption` | `CustomEvent<any>` | Notifies that a new menuoption selection has been made. |
|
|
@@ -68,15 +71,16 @@ The `auro-menuoption` element provides users a way to define a menu option.
|
|
|
68
71
|
|
|
69
72
|
| Property | Attribute | Modifiers | Type | Default | Description |
|
|
70
73
|
|---------------|---------------|-----------|-----------|---------|--------------------------------------------------|
|
|
71
|
-
| `disabled` | `disabled` | | `boolean` | false |
|
|
74
|
+
| `disabled` | `disabled` | | `boolean` | false | When true, the option is disabled and cannot be selected. |
|
|
75
|
+
| `event` | `event` | | `string` | | When set, selecting this option dispatches a custom event of the given name from the parent `auro-menu` (and an `auroMenu-customEventFired` event) instead of selecting the option. |
|
|
72
76
|
| `iconTag` | | | | | |
|
|
73
77
|
| `isActive` | | readonly | `boolean` | | Returns whether the menu option is currently active and selectable. |
|
|
74
78
|
| `layout` | | | `string` | | |
|
|
75
|
-
| `noCheckmark` | `
|
|
79
|
+
| `noCheckmark` | `nocheckmark` | | `boolean` | false | When true, this option will not show the checkmark when selected. |
|
|
76
80
|
| `noMatch` | `nomatch` | | `boolean` | false | When true, marks this option as the "no matching results" placeholder shown by combobox<br />when the user's input does not match any available options. |
|
|
77
81
|
| `persistent` | `persistent` | | `boolean` | false | When true, this option is excluded from `matchWord` DOM rewriting — useful for utility rows (e.g., "Add new…") that must render identically regardless of the current filter. |
|
|
78
82
|
| `selected` | `selected` | | `boolean` | false | **Deprecated.** Use the `value` attribute on `auro-menu` to set the selected option when the menu renders (or call `menu.selectByValue(value)` programmatically). Support for the child-level `selected` attribute will be removed in a future major release. |
|
|
79
|
-
| `value` | `value` | | `string` | |
|
|
83
|
+
| `value` | `value` | | `string` | | The value associated with this menu option. |
|
|
80
84
|
|
|
81
85
|
## Methods
|
|
82
86
|
|