@aurodesignsystem/auro-formkit 5.9.0 → 5.9.2
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 +13 -4
- package/README.md +4 -4
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +2 -2
- package/components/bibtemplate/dist/registered.js +2 -2
- package/components/checkbox/README.md +62 -62
- package/components/checkbox/demo/api.js +1 -1
- package/components/checkbox/demo/api.md +127 -84
- package/components/checkbox/demo/api.min.js +125 -42
- package/components/checkbox/demo/index.md +9 -281
- package/components/checkbox/demo/index.min.js +125 -42
- package/components/checkbox/demo/readme.html +3 -4
- package/components/checkbox/demo/readme.md +62 -62
- package/components/checkbox/dist/auro-checkbox-group.d.ts +7 -8
- package/components/checkbox/dist/auro-checkbox.d.ts +74 -20
- package/components/checkbox/dist/index.js +125 -42
- package/components/checkbox/dist/registered.js +125 -42
- package/components/combobox/README.md +76 -74
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.js +11 -12
- package/components/combobox/demo/api.md +1302 -875
- package/components/combobox/demo/api.min.js +416 -492
- package/components/combobox/demo/index.html +1 -7
- package/components/combobox/demo/index.js +0 -19
- package/components/combobox/demo/index.md +43 -723
- package/components/combobox/demo/index.min.js +369 -302
- package/components/combobox/demo/readme.html +3 -4
- package/components/combobox/demo/readme.md +76 -74
- package/components/combobox/dist/auro-combobox.d.ts +42 -42
- package/components/combobox/dist/index.js +204 -210
- package/components/combobox/dist/registered.js +204 -210
- package/components/counter/README.md +81 -66
- package/components/counter/demo/api.html +1 -2
- package/components/counter/demo/api.js +2 -2
- package/components/counter/demo/api.md +777 -259
- package/components/counter/demo/api.min.js +119 -171
- package/components/counter/demo/index.html +0 -2
- package/components/counter/demo/index.md +20 -329
- package/components/counter/demo/index.min.js +117 -152
- package/components/counter/demo/readme.html +3 -4
- package/components/counter/demo/readme.md +81 -66
- package/components/counter/dist/auro-counter-group.d.ts +21 -36
- package/components/counter/dist/auro-counter-wrapper.d.ts +1 -6
- package/components/counter/dist/auro-counter.d.ts +5 -8
- package/components/counter/dist/index.js +117 -152
- package/components/counter/dist/registered.js +117 -152
- package/components/datepicker/README.md +57 -61
- package/components/datepicker/demo/api.js +8 -8
- package/components/datepicker/demo/api.md +720 -561
- package/components/datepicker/demo/api.min.js +678 -2769
- package/components/datepicker/demo/index.md +65 -117
- package/components/datepicker/demo/index.min.js +678 -2769
- package/components/datepicker/demo/readme.html +3 -4
- package/components/datepicker/demo/readme.md +57 -61
- package/components/datepicker/dist/auro-calendar.d.ts +60 -34
- package/components/datepicker/dist/auro-datepicker.d.ts +32 -32
- package/components/datepicker/dist/iconVersion.d.ts +1 -1
- package/components/datepicker/dist/index.js +505 -2596
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +505 -2596
- package/components/dropdown/README.md +78 -62
- package/components/dropdown/demo/api.js +4 -4
- package/components/dropdown/demo/api.md +520 -478
- package/components/dropdown/demo/api.min.js +80 -95
- package/components/dropdown/demo/index.md +65 -119
- package/components/dropdown/demo/index.min.js +70 -85
- package/components/dropdown/demo/readme.html +3 -4
- package/components/dropdown/demo/readme.md +78 -62
- package/components/dropdown/dist/auro-dropdown.d.ts +42 -33
- package/components/dropdown/dist/iconVersion.d.ts +1 -1
- package/components/dropdown/dist/index.js +70 -85
- package/components/dropdown/dist/registered.js +70 -85
- package/components/form/README.md +16 -58
- package/components/form/demo/api.md +16 -21
- package/components/form/demo/api.min.js +13 -8
- package/components/form/demo/index.md +38 -39
- package/components/form/demo/index.min.js +13 -8
- package/components/form/demo/readme.md +16 -58
- package/components/form/demo/working.html +1 -1
- package/components/form/dist/auro-form.d.ts +15 -3
- package/components/form/dist/index.js +13 -8
- package/components/form/dist/registered.js +13 -8
- package/components/input/README.md +55 -60
- package/components/input/demo/api.js +3 -5
- package/components/input/demo/api.md +558 -537
- package/components/input/demo/api.min.js +102 -115
- package/components/input/demo/index.js +0 -1
- package/components/input/demo/index.md +90 -203
- package/components/input/demo/index.min.js +87 -99
- package/components/input/demo/readme.html +3 -4
- package/components/input/demo/readme.md +55 -60
- package/components/input/dist/auro-input.d.ts +6 -5
- package/components/input/dist/base-input.d.ts +68 -69
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +87 -82
- package/components/input/dist/registered.js +87 -82
- package/components/menu/README.md +61 -61
- package/components/menu/demo/api.js +6 -8
- package/components/menu/demo/api.md +520 -577
- package/components/menu/demo/api.min.js +199 -97
- package/components/menu/demo/index.js +0 -5
- package/components/menu/demo/index.md +36 -119
- package/components/menu/demo/index.min.js +164 -101
- package/components/menu/demo/readme.html +3 -4
- package/components/menu/demo/readme.md +61 -61
- package/components/menu/dist/auro-menu.context.d.ts +5 -0
- package/components/menu/dist/auro-menu.d.ts +75 -37
- package/components/menu/dist/auro-menuoption.d.ts +38 -13
- package/components/menu/dist/index.js +164 -50
- package/components/menu/dist/registered.js +164 -50
- package/components/radio/README.md +61 -57
- package/components/radio/demo/api.js +2 -2
- package/components/radio/demo/api.md +241 -170
- package/components/radio/demo/api.min.js +154 -77
- package/components/radio/demo/index.md +22 -99
- package/components/radio/demo/index.min.js +145 -68
- package/components/radio/demo/readme.html +3 -4
- package/components/radio/demo/readme.md +61 -57
- package/components/radio/dist/auro-radio-group.d.ts +67 -35
- package/components/radio/dist/auro-radio.d.ts +56 -33
- package/components/radio/dist/index.js +145 -68
- package/components/radio/dist/registered.js +145 -68
- package/components/select/README.md +68 -65
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.js +7 -7
- package/components/select/demo/api.md +1305 -625
- package/components/select/demo/api.min.js +357 -262
- package/components/select/demo/index.html +0 -2
- package/components/select/demo/index.md +25 -833
- package/components/select/demo/index.min.js +356 -230
- package/components/select/demo/readme.html +3 -4
- package/components/select/demo/readme.md +68 -65
- package/components/select/dist/auro-select.d.ts +99 -90
- package/components/select/dist/index.js +192 -180
- package/components/select/dist/registered.js +192 -180
- package/package.json +9 -4
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
*
|
|
5
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
6
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
7
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
8
|
-
* @attr {Boolean} onDark - DEPRECATED - use `appearance` instead.
|
|
9
|
-
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
10
|
-
* @attr {Object} optionSelected - Specifies the current selected radio button.
|
|
2
|
+
* The `auro-radio-group` element is used to group a set `auro-radio` elements.
|
|
3
|
+
* @customElement auro-radio-group
|
|
4
|
+
*
|
|
11
5
|
* @csspart radio-group - Apply css to the fieldset element in the shadow DOM
|
|
12
6
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
13
7
|
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
@@ -20,79 +14,117 @@ export class AuroRadioGroup extends LitElement {
|
|
|
20
14
|
static get properties(): {
|
|
21
15
|
/**
|
|
22
16
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
23
|
-
* @
|
|
17
|
+
* @type {'default' | 'inverse'}
|
|
24
18
|
* @default 'default'
|
|
25
19
|
*/
|
|
26
|
-
appearance:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
appearance: "default" | "inverse";
|
|
21
|
+
/**
|
|
22
|
+
* If true, all radio buttons will be disabled.
|
|
23
|
+
*/
|
|
30
24
|
disabled: {
|
|
31
25
|
type: BooleanConstructor;
|
|
32
26
|
reflect: boolean;
|
|
33
27
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
/**
|
|
29
|
+
* If true, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
30
|
+
*/
|
|
37
31
|
error: {
|
|
38
32
|
type: StringConstructor;
|
|
39
33
|
reflect: boolean;
|
|
40
34
|
};
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Indicates whether the legend slot is set or not.
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
hasLegend: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
reflect: boolean;
|
|
42
|
+
attribute: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* If true, displays radio buttons horizontally.
|
|
46
|
+
*/
|
|
47
|
+
horizontal: {
|
|
48
|
+
type: BooleanConstructor;
|
|
43
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* If true, disables auto-validation on blur.
|
|
52
|
+
*/
|
|
44
53
|
noValidate: {
|
|
45
54
|
type: BooleanConstructor;
|
|
46
55
|
reflect: boolean;
|
|
47
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
59
|
+
*/
|
|
48
60
|
onDark: {
|
|
49
61
|
type: BooleanConstructor;
|
|
50
62
|
reflect: boolean;
|
|
51
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Specifies the current selected radio button.
|
|
66
|
+
*/
|
|
67
|
+
optionSelected: {
|
|
68
|
+
type: ObjectConstructor;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
72
|
+
*/
|
|
52
73
|
required: {
|
|
53
74
|
type: BooleanConstructor;
|
|
54
75
|
reflect: boolean;
|
|
55
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Sets a custom help text message to display for all validityStates.
|
|
79
|
+
*/
|
|
56
80
|
setCustomValidity: {
|
|
57
81
|
type: StringConstructor;
|
|
58
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Custom help text message to display when validity = `customError`.
|
|
85
|
+
*/
|
|
59
86
|
setCustomValidityCustomError: {
|
|
60
87
|
type: StringConstructor;
|
|
61
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
91
|
+
*/
|
|
62
92
|
setCustomValidityValueMissing: {
|
|
63
93
|
type: StringConstructor;
|
|
64
94
|
};
|
|
65
|
-
validity: {
|
|
66
|
-
type: StringConstructor;
|
|
67
|
-
reflect: boolean;
|
|
68
|
-
};
|
|
69
|
-
optionSelected: {
|
|
70
|
-
type: ObjectConstructor;
|
|
71
|
-
};
|
|
72
95
|
/**
|
|
73
96
|
* Indicates whether the radio group is in a dirty state (has been interacted with).
|
|
74
|
-
* @type {boolean}
|
|
75
|
-
* @default false
|
|
76
97
|
* @private
|
|
77
98
|
*/
|
|
78
|
-
touched:
|
|
99
|
+
touched: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
reflect: boolean;
|
|
102
|
+
attribute: boolean;
|
|
103
|
+
};
|
|
79
104
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @type {boolean}
|
|
82
|
-
* @default false
|
|
83
|
-
* @private
|
|
105
|
+
* Specifies the `validityState` this element is in.
|
|
84
106
|
*/
|
|
85
|
-
|
|
107
|
+
validity: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
reflect: boolean;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Specifies the current value of the selected radio button.
|
|
113
|
+
*/
|
|
114
|
+
value: {
|
|
115
|
+
type: StringConstructor;
|
|
116
|
+
};
|
|
86
117
|
};
|
|
87
118
|
/**
|
|
88
119
|
* This will register this element with the browser.
|
|
89
|
-
* @param {string} [name="auro-radio-group"] - The name of element that you want to register
|
|
120
|
+
* @param {string} [name="auro-radio-group"] - The name of the element that you want to register.
|
|
90
121
|
*
|
|
91
122
|
* @example
|
|
92
123
|
* AuroRadioGroup.register("custom-radio-group") // This will register this element to <custom-radio-group/>
|
|
93
124
|
*
|
|
94
125
|
*/
|
|
95
126
|
static register(name?: string): void;
|
|
127
|
+
_initializeDefaults(): void;
|
|
96
128
|
appearance: string;
|
|
97
129
|
disabled: boolean;
|
|
98
130
|
horizontal: boolean;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
* @attr {Boolean} required - Defines element as required.
|
|
5
|
-
* @attr {Boolean} error - If set to true, sets an error state on the radio button.
|
|
6
|
-
* @attr {Boolean} onDark - DEPRECATED - use `appearance` instead.
|
|
7
|
-
* @event toggleSelected - Notifies that the component has toggled the checked/selected state.
|
|
8
|
-
*
|
|
9
|
-
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
10
|
-
* @attr id
|
|
2
|
+
* The `auro-radio` element is used to a button that allows the user to select one option from a set.
|
|
3
|
+
* @customElement auro-radio
|
|
11
4
|
*
|
|
5
|
+
* @event toggleSelected - Notifies that the component has toggled the checked/selected state.
|
|
12
6
|
* @event {CustomEvent<any>} change - (Deprecated) Notifies when checked value is changed.
|
|
13
7
|
* @event {InputEvent} input - Notifies when when checked value is changed by user's interface.
|
|
14
8
|
* @event focusSelected - Notifies that the component has gained focus.
|
|
@@ -25,59 +19,72 @@ export class AuroRadio extends LitElement {
|
|
|
25
19
|
static get properties(): {
|
|
26
20
|
/**
|
|
27
21
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
28
|
-
* @
|
|
22
|
+
* @type {'default' | 'inverse'}
|
|
29
23
|
* @default 'default'
|
|
30
24
|
*/
|
|
31
|
-
appearance:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
appearance: "default" | "inverse";
|
|
26
|
+
/**
|
|
27
|
+
* If set to true, the radio button will be filled.
|
|
28
|
+
*/
|
|
35
29
|
checked: {
|
|
36
30
|
type: BooleanConstructor;
|
|
37
31
|
reflect: boolean;
|
|
38
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* If set to true, the radio button will be non-clickable.
|
|
35
|
+
*/
|
|
39
36
|
disabled: {
|
|
40
37
|
type: BooleanConstructor;
|
|
41
38
|
reflect: boolean;
|
|
42
39
|
};
|
|
43
|
-
|
|
40
|
+
/**
|
|
41
|
+
* If set to true, sets an error state on the radio button.
|
|
42
|
+
*/
|
|
43
|
+
error: {
|
|
44
44
|
type: BooleanConstructor;
|
|
45
45
|
reflect: boolean;
|
|
46
46
|
};
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
49
|
+
*/
|
|
50
|
+
id: {
|
|
51
|
+
type: StringConstructor;
|
|
49
52
|
reflect: boolean;
|
|
50
53
|
};
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
/**
|
|
55
|
+
* ID for input node.
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
inputId: {
|
|
59
|
+
type: StringConstructor;
|
|
53
60
|
reflect: boolean;
|
|
61
|
+
attribute: boolean;
|
|
54
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Label for the radio button.
|
|
65
|
+
*/
|
|
55
66
|
label: {
|
|
56
67
|
type: StringConstructor;
|
|
57
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Name for the radio button group.
|
|
71
|
+
*/
|
|
58
72
|
name: {
|
|
59
73
|
type: StringConstructor;
|
|
60
74
|
};
|
|
61
|
-
value: {
|
|
62
|
-
type: StringConstructor;
|
|
63
|
-
};
|
|
64
75
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @private
|
|
76
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
67
77
|
*/
|
|
68
|
-
|
|
78
|
+
onDark: {
|
|
69
79
|
type: BooleanConstructor;
|
|
70
80
|
reflect: boolean;
|
|
71
|
-
attribute: boolean;
|
|
72
81
|
};
|
|
73
82
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @private
|
|
83
|
+
* Defines element as required.
|
|
76
84
|
*/
|
|
77
|
-
|
|
78
|
-
type:
|
|
85
|
+
required: {
|
|
86
|
+
type: BooleanConstructor;
|
|
79
87
|
reflect: boolean;
|
|
80
|
-
attribute: boolean;
|
|
81
88
|
};
|
|
82
89
|
/**
|
|
83
90
|
* Don't add to api.md since changing of this can easily break a11y.
|
|
@@ -87,18 +94,34 @@ export class AuroRadio extends LitElement {
|
|
|
87
94
|
type: StringConstructor;
|
|
88
95
|
reflect: boolean;
|
|
89
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Whether or not the radio button has been touched by the user.
|
|
99
|
+
* @private
|
|
100
|
+
*/
|
|
101
|
+
touched: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
reflect: boolean;
|
|
104
|
+
attribute: boolean;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* The value of the radio button.
|
|
108
|
+
*/
|
|
109
|
+
value: {
|
|
110
|
+
type: StringConstructor;
|
|
111
|
+
};
|
|
90
112
|
};
|
|
91
113
|
/**
|
|
92
114
|
* This will register this element with the browser.
|
|
93
|
-
* @param {string} [name="auro-radio"] - The name of element that you want to register
|
|
115
|
+
* @param {string} [name="auro-radio"] - The name of the element that you want to register.
|
|
94
116
|
*
|
|
95
117
|
* @example
|
|
96
118
|
* AuroRadio.register("custom-radio") // This will resgiter this element to <custom-radio/>
|
|
97
119
|
*
|
|
98
120
|
*/
|
|
99
121
|
static register(name?: string): void;
|
|
122
|
+
_initializeDefaults(): void;
|
|
100
123
|
appearance: string;
|
|
101
|
-
checked:
|
|
124
|
+
checked: any;
|
|
102
125
|
disabled: boolean;
|
|
103
126
|
required: boolean;
|
|
104
127
|
error: boolean;
|
|
@@ -94,22 +94,16 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
/* eslint-disable max-lines */
|
|
98
|
-
// Copyright (c)
|
|
97
|
+
/* eslint-disable max-lines, no-underscore-dangle */
|
|
98
|
+
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
99
99
|
// See LICENSE in the project root for license information.
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
104
|
-
* @
|
|
105
|
-
* @attr {Boolean} required - Defines element as required.
|
|
106
|
-
* @attr {Boolean} error - If set to true, sets an error state on the radio button.
|
|
107
|
-
* @attr {Boolean} onDark - DEPRECATED - use `appearance` instead.
|
|
108
|
-
* @event toggleSelected - Notifies that the component has toggled the checked/selected state.
|
|
109
|
-
*
|
|
110
|
-
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
111
|
-
* @attr id
|
|
103
|
+
* The `auro-radio` element is used to a button that allows the user to select one option from a set.
|
|
104
|
+
* @customElement auro-radio
|
|
112
105
|
*
|
|
106
|
+
* @event toggleSelected - Notifies that the component has toggled the checked/selected state.
|
|
113
107
|
* @event {CustomEvent<any>} change - (Deprecated) Notifies when checked value is changed.
|
|
114
108
|
* @event {InputEvent} input - Notifies when when checked value is changed by user's interface.
|
|
115
109
|
* @event focusSelected - Notifies that the component has gained focus.
|
|
@@ -121,12 +115,14 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
121
115
|
* @csspart radio-input - apply css to a specific checkbox's input.
|
|
122
116
|
* @csspart radio-label - apply css to a specific checkbox's label.
|
|
123
117
|
*/
|
|
124
|
-
|
|
125
|
-
// build the component class
|
|
126
118
|
class AuroRadio extends LitElement {
|
|
127
119
|
constructor() {
|
|
128
120
|
super();
|
|
129
121
|
|
|
122
|
+
this._initializeDefaults();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
_initializeDefaults() {
|
|
130
126
|
this.appearance = "default";
|
|
131
127
|
this.checked = false;
|
|
132
128
|
this.disabled = false;
|
|
@@ -156,45 +152,44 @@ class AuroRadio extends LitElement {
|
|
|
156
152
|
|
|
157
153
|
/**
|
|
158
154
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
159
|
-
* @
|
|
155
|
+
* @type {'default' | 'inverse'}
|
|
160
156
|
* @default 'default'
|
|
161
157
|
*/
|
|
162
158
|
appearance: {
|
|
163
159
|
type: String,
|
|
164
160
|
reflect: true
|
|
165
161
|
},
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* If set to true, the radio button will be filled.
|
|
165
|
+
*/
|
|
166
166
|
checked: {
|
|
167
167
|
type: Boolean,
|
|
168
168
|
reflect: true
|
|
169
169
|
},
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* If set to true, the radio button will be non-clickable.
|
|
173
|
+
*/
|
|
170
174
|
disabled: {
|
|
171
175
|
type: Boolean,
|
|
172
176
|
reflect: true
|
|
173
177
|
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* If set to true, sets an error state on the radio button.
|
|
181
|
+
*/
|
|
178
182
|
error: {
|
|
179
183
|
type: Boolean,
|
|
180
184
|
reflect: true
|
|
181
185
|
},
|
|
182
|
-
onDark: {
|
|
183
|
-
type: Boolean,
|
|
184
|
-
reflect: true
|
|
185
|
-
},
|
|
186
|
-
label: { type: String },
|
|
187
|
-
name: { type: String },
|
|
188
|
-
value: { type: String },
|
|
189
186
|
|
|
190
187
|
/**
|
|
191
|
-
*
|
|
192
|
-
* @private
|
|
188
|
+
* The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
193
189
|
*/
|
|
194
|
-
|
|
195
|
-
type:
|
|
196
|
-
reflect: true
|
|
197
|
-
attribute: false
|
|
190
|
+
id: {
|
|
191
|
+
type: String,
|
|
192
|
+
reflect: true
|
|
198
193
|
},
|
|
199
194
|
|
|
200
195
|
/**
|
|
@@ -207,6 +202,32 @@ class AuroRadio extends LitElement {
|
|
|
207
202
|
attribute: false
|
|
208
203
|
},
|
|
209
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Label for the radio button.
|
|
207
|
+
*/
|
|
208
|
+
label: { type: String },
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Name for the radio button group.
|
|
212
|
+
*/
|
|
213
|
+
name: { type: String },
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
217
|
+
*/
|
|
218
|
+
onDark: {
|
|
219
|
+
type: Boolean,
|
|
220
|
+
reflect: true
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Defines element as required.
|
|
225
|
+
*/
|
|
226
|
+
required: {
|
|
227
|
+
type: Boolean,
|
|
228
|
+
reflect: true
|
|
229
|
+
},
|
|
230
|
+
|
|
210
231
|
/**
|
|
211
232
|
* Don't add to api.md since changing of this can easily break a11y.
|
|
212
233
|
* @private
|
|
@@ -214,13 +235,28 @@ class AuroRadio extends LitElement {
|
|
|
214
235
|
role: {
|
|
215
236
|
type: String,
|
|
216
237
|
reflect: true
|
|
217
|
-
}
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Whether or not the radio button has been touched by the user.
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
touched: {
|
|
245
|
+
type: Boolean,
|
|
246
|
+
reflect: true,
|
|
247
|
+
attribute: false
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The value of the radio button.
|
|
252
|
+
*/
|
|
253
|
+
value: { type: String }
|
|
218
254
|
};
|
|
219
255
|
}
|
|
220
256
|
|
|
221
257
|
/**
|
|
222
258
|
* This will register this element with the browser.
|
|
223
|
-
* @param {string} [name="auro-radio"] - The name of element that you want to register
|
|
259
|
+
* @param {string} [name="auro-radio"] - The name of the element that you want to register.
|
|
224
260
|
*
|
|
225
261
|
* @example
|
|
226
262
|
* AuroRadio.register("custom-radio") // This will resgiter this element to <custom-radio/>
|
|
@@ -1537,7 +1573,7 @@ class AuroHelpText extends LitElement {
|
|
|
1537
1573
|
}
|
|
1538
1574
|
}
|
|
1539
1575
|
|
|
1540
|
-
var formkitVersion = '
|
|
1576
|
+
var formkitVersion = '202601271813';
|
|
1541
1577
|
|
|
1542
1578
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1543
1579
|
// See LICENSE in the project root for license information.
|
|
@@ -1545,18 +1581,12 @@ var formkitVersion = '202511191711';
|
|
|
1545
1581
|
|
|
1546
1582
|
|
|
1547
1583
|
/* eslint no-magic-numbers: ["error", { "ignore": [0, 1, -1] }] */
|
|
1548
|
-
/* eslint-disable max-lines, lit/binding-positions, lit/no-invalid-html */
|
|
1584
|
+
/* eslint-disable max-lines, lit/binding-positions, lit/no-invalid-html, no-underscore-dangle */
|
|
1549
1585
|
|
|
1550
1586
|
/**
|
|
1551
|
-
*
|
|
1552
|
-
* @
|
|
1553
|
-
*
|
|
1554
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
1555
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
1556
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
1557
|
-
* @attr {Boolean} onDark - DEPRECATED - use `appearance` instead.
|
|
1558
|
-
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
1559
|
-
* @attr {Object} optionSelected - Specifies the current selected radio button.
|
|
1587
|
+
* The `auro-radio-group` element is used to group a set `auro-radio` elements.
|
|
1588
|
+
* @customElement auro-radio-group
|
|
1589
|
+
*
|
|
1560
1590
|
* @csspart radio-group - Apply css to the fieldset element in the shadow DOM
|
|
1561
1591
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
1562
1592
|
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
@@ -1569,6 +1599,10 @@ class AuroRadioGroup extends LitElement {
|
|
|
1569
1599
|
constructor() {
|
|
1570
1600
|
super();
|
|
1571
1601
|
|
|
1602
|
+
this._initializeDefaults();
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
_initializeDefaults() {
|
|
1572
1606
|
this.appearance = "default";
|
|
1573
1607
|
this.disabled = false;
|
|
1574
1608
|
this.horizontal = false;
|
|
@@ -1624,7 +1658,7 @@ class AuroRadioGroup extends LitElement {
|
|
|
1624
1658
|
|
|
1625
1659
|
/**
|
|
1626
1660
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
1627
|
-
* @
|
|
1661
|
+
* @type {'default' | 'inverse'}
|
|
1628
1662
|
* @default 'default'
|
|
1629
1663
|
*/
|
|
1630
1664
|
appearance: {
|
|
@@ -1632,51 +1666,91 @@ class AuroRadioGroup extends LitElement {
|
|
|
1632
1666
|
reflect: true
|
|
1633
1667
|
},
|
|
1634
1668
|
|
|
1635
|
-
|
|
1669
|
+
/**
|
|
1670
|
+
* If true, all radio buttons will be disabled.
|
|
1671
|
+
*/
|
|
1672
|
+
disabled: {
|
|
1636
1673
|
type: Boolean,
|
|
1637
1674
|
reflect: true
|
|
1638
1675
|
},
|
|
1639
|
-
|
|
1640
|
-
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* If true, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
1679
|
+
*/
|
|
1680
|
+
error: {
|
|
1641
1681
|
type: String,
|
|
1642
1682
|
reflect: true
|
|
1643
1683
|
},
|
|
1644
|
-
|
|
1645
|
-
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Indicates whether the legend slot is set or not.
|
|
1687
|
+
* @private
|
|
1688
|
+
*/
|
|
1689
|
+
hasLegend: {
|
|
1690
|
+
type: Boolean,
|
|
1691
|
+
reflect: false,
|
|
1692
|
+
attribute: false
|
|
1646
1693
|
},
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* If true, displays radio buttons horizontally.
|
|
1697
|
+
*/
|
|
1698
|
+
horizontal: { type: Boolean },
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* If true, disables auto-validation on blur.
|
|
1702
|
+
*/
|
|
1647
1703
|
noValidate: {
|
|
1648
1704
|
type: Boolean,
|
|
1649
1705
|
reflect: true
|
|
1650
1706
|
},
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
1710
|
+
*/
|
|
1651
1711
|
onDark: {
|
|
1652
1712
|
type: Boolean,
|
|
1653
1713
|
reflect: true
|
|
1654
1714
|
},
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* Specifies the current selected radio button.
|
|
1718
|
+
*/
|
|
1719
|
+
optionSelected: {
|
|
1720
|
+
type: Object
|
|
1721
|
+
},
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
1725
|
+
*/
|
|
1655
1726
|
required: {
|
|
1656
1727
|
type: Boolean,
|
|
1657
1728
|
reflect: true
|
|
1658
1729
|
},
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* Sets a custom help text message to display for all validityStates.
|
|
1733
|
+
*/
|
|
1659
1734
|
setCustomValidity: {
|
|
1660
1735
|
type: String
|
|
1661
1736
|
},
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* Custom help text message to display when validity = `customError`.
|
|
1740
|
+
*/
|
|
1662
1741
|
setCustomValidityCustomError: {
|
|
1663
1742
|
type: String
|
|
1664
1743
|
},
|
|
1744
|
+
|
|
1745
|
+
/**
|
|
1746
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
1747
|
+
*/
|
|
1665
1748
|
setCustomValidityValueMissing: {
|
|
1666
1749
|
type: String
|
|
1667
1750
|
},
|
|
1668
|
-
validity: {
|
|
1669
|
-
type: String,
|
|
1670
|
-
reflect: true
|
|
1671
|
-
},
|
|
1672
|
-
optionSelected: {
|
|
1673
|
-
type: Object
|
|
1674
|
-
},
|
|
1675
1751
|
|
|
1676
1752
|
/**
|
|
1677
1753
|
* Indicates whether the radio group is in a dirty state (has been interacted with).
|
|
1678
|
-
* @type {boolean}
|
|
1679
|
-
* @default false
|
|
1680
1754
|
* @private
|
|
1681
1755
|
*/
|
|
1682
1756
|
touched: {
|
|
@@ -1686,22 +1760,25 @@ class AuroRadioGroup extends LitElement {
|
|
|
1686
1760
|
},
|
|
1687
1761
|
|
|
1688
1762
|
/**
|
|
1689
|
-
*
|
|
1690
|
-
* @type {boolean}
|
|
1691
|
-
* @default false
|
|
1692
|
-
* @private
|
|
1763
|
+
* Specifies the `validityState` this element is in.
|
|
1693
1764
|
*/
|
|
1694
|
-
|
|
1695
|
-
type:
|
|
1696
|
-
reflect:
|
|
1697
|
-
|
|
1765
|
+
validity: {
|
|
1766
|
+
type: String,
|
|
1767
|
+
reflect: true
|
|
1768
|
+
},
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* Specifies the current value of the selected radio button.
|
|
1772
|
+
*/
|
|
1773
|
+
value: {
|
|
1774
|
+
type: String
|
|
1698
1775
|
}
|
|
1699
1776
|
};
|
|
1700
1777
|
}
|
|
1701
1778
|
|
|
1702
1779
|
/**
|
|
1703
1780
|
* This will register this element with the browser.
|
|
1704
|
-
* @param {string} [name="auro-radio-group"] - The name of element that you want to register
|
|
1781
|
+
* @param {string} [name="auro-radio-group"] - The name of the element that you want to register.
|
|
1705
1782
|
*
|
|
1706
1783
|
* @example
|
|
1707
1784
|
* AuroRadioGroup.register("custom-radio-group") // This will register this element to <custom-radio-group/>
|