@aurodesignsystem-dev/auro-formkit 0.0.0-pr1422.0 → 0.0.0-pr1422.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/components/bibtemplate/dist/auro-bibtemplate.d.ts +66 -0
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
- package/components/bibtemplate/dist/index.d.ts +2 -0
- package/components/bibtemplate/dist/index.js +395 -0
- package/components/bibtemplate/dist/registered.js +395 -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/demo/api.md +489 -0
- package/components/checkbox/demo/api.min.js +2133 -0
- package/components/checkbox/demo/index.md +55 -0
- package/components/checkbox/demo/index.min.js +2108 -0
- package/components/checkbox/demo/keyboardBehavior.md +0 -0
- package/components/checkbox/demo/readme.md +142 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts +176 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +209 -0
- package/components/checkbox/dist/index.d.ts +3 -0
- package/components/checkbox/dist/index.js +2057 -0
- package/components/checkbox/dist/registered.js +2058 -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/demo/api.md +2287 -0
- package/components/combobox/demo/api.min.js +18025 -0
- package/components/combobox/demo/index.md +196 -0
- package/components/combobox/demo/index.min.js +17930 -0
- package/components/combobox/demo/keyboardBehavior.md +281 -0
- package/components/combobox/demo/readme.md +158 -0
- package/components/combobox/dist/auro-combobox.d.ts +578 -0
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +9 -0
- package/components/combobox/dist/index.d.ts +2 -0
- package/components/combobox/dist/index.js +15845 -0
- package/components/combobox/dist/registered.js +15847 -0
- package/components/combobox/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/style-css.d.ts +2 -0
- package/components/counter/demo/api.md +1285 -0
- package/components/counter/demo/api.min.js +8237 -0
- package/components/counter/demo/index.md +92 -0
- package/components/counter/demo/index.min.js +8218 -0
- package/components/counter/demo/keyboardBehavior.md +127 -0
- package/components/counter/demo/readme.md +161 -0
- package/components/counter/dist/auro-counter-button.d.ts +14 -0
- package/components/counter/dist/auro-counter-group.d.ts +390 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts +17 -0
- package/components/counter/dist/auro-counter.d.ts +136 -0
- package/components/counter/dist/buttonVersion.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 +8140 -0
- package/components/counter/dist/keyboardStrategy.d.ts +4 -0
- package/components/counter/dist/registered.js +8141 -0
- package/components/counter/dist/styles/color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
- package/components/counter/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/counter/dist/styles/style-css.d.ts +2 -0
- package/components/counter/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/demo/api.md +1824 -0
- package/components/datepicker/demo/api.min.js +24654 -0
- package/components/datepicker/demo/index.md +158 -0
- package/components/datepicker/demo/index.min.js +24375 -0
- package/components/datepicker/demo/keyboardBehavior.md +19 -0
- package/components/datepicker/demo/readme.md +137 -0
- package/components/datepicker/dist/auro-calendar-cell.d.ts +169 -0
- package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
- package/components/datepicker/dist/auro-calendar.d.ts +173 -0
- package/components/datepicker/dist/auro-datepicker.d.ts +716 -0
- package/components/datepicker/dist/buttonVersion.d.ts +2 -0
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +1 -0
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.d.ts +2 -0
- package/components/datepicker/dist/index.js +24290 -0
- package/components/datepicker/dist/popoverVersion.d.ts +2 -0
- package/components/datepicker/dist/registered.js +24290 -0
- package/components/datepicker/dist/styles/classic/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/dist/utilities.d.ts +78 -0
- package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
- package/components/dropdown/demo/api.md +1358 -0
- package/components/dropdown/demo/api.min.js +5019 -0
- package/components/dropdown/demo/index.md +283 -0
- package/components/dropdown/demo/index.min.js +4954 -0
- package/components/dropdown/demo/keyboardBehavior.md +77 -0
- package/components/dropdown/demo/readme.md +160 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +482 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +128 -0
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +7 -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 +4847 -0
- package/components/dropdown/dist/registered.js +4847 -0
- package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
- package/components/form/demo/api.md +319 -0
- package/components/form/demo/api.min.js +71170 -0
- package/components/form/demo/index.md +128 -0
- package/components/form/demo/index.min.js +71170 -0
- package/components/form/demo/keyboardBehavior.md +0 -0
- package/components/form/demo/readme.md +145 -0
- package/components/form/dist/auro-form.d.ts +280 -0
- package/components/form/dist/index.d.ts +2 -0
- package/components/form/dist/index.js +718 -0
- package/components/form/dist/registered.d.ts +1 -0
- package/components/form/dist/registered.js +718 -0
- package/components/form/dist/styles/style-css.d.ts +2 -0
- package/components/helptext/dist/auro-helptext.d.ts +69 -0
- package/components/helptext/dist/index.d.ts +2 -0
- package/components/helptext/dist/index.js +231 -0
- package/components/helptext/dist/registered.js +231 -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/demo/api.md +1397 -0
- package/components/input/demo/api.min.js +7473 -0
- package/components/input/demo/index.md +161 -0
- package/components/input/demo/index.min.js +7393 -0
- package/components/input/demo/keyboardBehavior.md +0 -0
- package/components/input/demo/readme.md +134 -0
- package/components/input/dist/auro-input.d.ts +207 -0
- package/components/input/dist/base-input.d.ts +628 -0
- package/components/input/dist/buttonVersion.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 +7305 -0
- package/components/input/dist/registered.js +7305 -0
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/dist/styles/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/borders-css.d.ts +2 -0
- package/components/input/dist/styles/default/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
- package/components/input/dist/styles/default/style-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/input/dist/styles/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/input/dist/styles/style-css.d.ts +2 -0
- package/components/input/dist/styles/tokens-css.d.ts +2 -0
- package/components/input/dist/utilities.d.ts +25 -0
- package/components/layoutElement/dist/auroElement.d.ts +40 -0
- package/components/layoutElement/dist/index.d.ts +2 -0
- package/components/layoutElement/dist/index.js +107 -0
- package/components/layoutElement/dist/registered.js +107 -0
- package/components/menu/demo/api.md +1201 -0
- package/components/menu/demo/api.min.js +2397 -0
- package/components/menu/demo/index.md +72 -0
- package/components/menu/demo/index.min.js +2290 -0
- package/components/menu/demo/keyboardBehavior.md +0 -0
- package/components/menu/demo/readme.md +145 -0
- package/components/menu/dist/auro-menu-utils.d.ts +34 -0
- package/components/menu/dist/auro-menu.context.d.ts +239 -0
- package/components/menu/dist/auro-menu.d.ts +317 -0
- package/components/menu/dist/auro-menuoption.d.ts +210 -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 +2253 -0
- package/components/menu/dist/registered.js +2201 -0
- package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.md +675 -0
- package/components/radio/demo/api.min.js +2210 -0
- package/components/radio/demo/index.md +73 -0
- package/components/radio/demo/index.min.js +2167 -0
- package/components/radio/demo/keyboardBehavior.md +0 -0
- package/components/radio/demo/readme.md +141 -0
- package/components/radio/dist/auro-radio-group.d.ts +250 -0
- package/components/radio/dist/auro-radio.d.ts +180 -0
- package/components/radio/dist/index.d.ts +3 -0
- package/components/radio/dist/index.js +2116 -0
- package/components/radio/dist/registered.js +2117 -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/demo/api.md +2378 -0
- package/components/select/demo/api.min.js +10542 -0
- package/components/select/demo/index.md +355 -0
- package/components/select/demo/index.min.js +10449 -0
- package/components/select/demo/keyboardBehavior.md +245 -0
- package/components/select/demo/readme.md +148 -0
- package/components/select/dist/auro-select.d.ts +553 -0
- package/components/select/dist/index.d.ts +2 -0
- package/components/select/dist/index.js +8376 -0
- package/components/select/dist/registered.js +8376 -0
- package/components/select/dist/selectKeyboardStrategy.d.ts +11 -0
- package/components/select/dist/styles/emphasized/color-css.d.ts +2 -0
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/style-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/custom-elements.json +18806 -0
- package/package.json +2 -2
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `auro-combobox` element provides users with a way to select an option from a list of filtered or suggested options based on user input.
|
|
3
|
+
* @customElement auro-combobox
|
|
4
|
+
*
|
|
5
|
+
* @slot - Default slot for the menu content.
|
|
6
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
7
|
+
* @slot ariaLabel.input.clear - Sets aria-label on clear button
|
|
8
|
+
* @slot ariaLabel.bib.close - Sets aria-label on close button in fullscreen bib
|
|
9
|
+
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
10
|
+
* @slot label - Defines the content of the label.
|
|
11
|
+
* @slot helpText - Defines the content of the helpText.
|
|
12
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts.
|
|
13
|
+
* @event auroCombobox-valueSet - (Deprecated) Notifies that the component has a new value set.
|
|
14
|
+
* @event input - Notifies that the component has a new value set.
|
|
15
|
+
* @event inputValue - Notifies that the components internal HTML5 input value has changed.
|
|
16
|
+
* @event auroFormElement-validated - Notifies that the component value(s) have been validated.
|
|
17
|
+
*/
|
|
18
|
+
export class AuroCombobox extends AuroElement {
|
|
19
|
+
static get properties(): {
|
|
20
|
+
/**
|
|
21
|
+
* Defines whether the component will be on lighter or darker backgrounds.
|
|
22
|
+
* @property {'default' | 'inverse'} appearance - The visual appearance of the component.
|
|
23
|
+
* @default 'default'
|
|
24
|
+
*/
|
|
25
|
+
appearance: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
reflect: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
31
|
+
*/
|
|
32
|
+
autocomplete: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
reflect: boolean;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
38
|
+
*/
|
|
39
|
+
autoPlacement: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
reflect: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Array of available options to display in the dropdown.
|
|
45
|
+
* This array contains all non-hidden options (e.g., hidden by filtering on input value).
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
availableOptions: {
|
|
49
|
+
state: boolean;
|
|
50
|
+
type: ArrayConstructor;
|
|
51
|
+
reflect: boolean;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Sets the behavior of the combobox, "filter" or "suggestion".
|
|
55
|
+
* "filter" requires the user to select an option from the menu.
|
|
56
|
+
* "suggestion" allows the user to enter a value not present in the menu options.
|
|
57
|
+
* @type {'filter' | 'suggestion'}
|
|
58
|
+
* @default 'suggestion'
|
|
59
|
+
*/
|
|
60
|
+
behavior: "filter" | "suggestion";
|
|
61
|
+
/**
|
|
62
|
+
* When attribute is present auro-menu will apply check marks to selected options.
|
|
63
|
+
*/
|
|
64
|
+
checkmark: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
reflect: boolean;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* If set, disables the combobox.
|
|
70
|
+
*/
|
|
71
|
+
disabled: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
reflect: boolean;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* ID for the dropdown.
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
dropdownId: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
reflect: boolean;
|
|
82
|
+
attribute: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Whether or not the dropdown is open.
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
88
|
+
dropdownOpen: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
reflect: boolean;
|
|
91
|
+
attribute: boolean;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
|
|
95
|
+
*/
|
|
96
|
+
dvInputOnly: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
reflect: boolean;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
102
|
+
*/
|
|
103
|
+
error: {
|
|
104
|
+
type: StringConstructor;
|
|
105
|
+
reflect: boolean;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Specifies the input mask format.
|
|
109
|
+
*/
|
|
110
|
+
format: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
reflect: boolean;
|
|
113
|
+
};
|
|
114
|
+
/** Exposes inputmode attribute for input. */
|
|
115
|
+
inputmode: {
|
|
116
|
+
type: StringConstructor;
|
|
117
|
+
attribute: boolean;
|
|
118
|
+
reflect: boolean;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Sets the layout of the combobox.
|
|
122
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
123
|
+
* @default 'classic'
|
|
124
|
+
*/
|
|
125
|
+
layout: "classic" | "emphasized" | "snowflake";
|
|
126
|
+
/**
|
|
127
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
128
|
+
* @private
|
|
129
|
+
*/
|
|
130
|
+
matchWidth: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
reflect: boolean;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* If set, combobox will not filter menuoptions based on input.
|
|
136
|
+
*/
|
|
137
|
+
noFilter: {
|
|
138
|
+
type: BooleanConstructor;
|
|
139
|
+
reflect: boolean;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
143
|
+
* when there isn't enough space in the specified `placement`.
|
|
144
|
+
*/
|
|
145
|
+
noFlip: {
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
reflect: boolean;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
151
|
+
*/
|
|
152
|
+
shift: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
reflect: boolean;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* If set, disables auto-validation on blur.
|
|
158
|
+
*/
|
|
159
|
+
noValidate: {
|
|
160
|
+
type: BooleanConstructor;
|
|
161
|
+
reflect: boolean;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Gap between the trigger element and bib.
|
|
165
|
+
* @default 0
|
|
166
|
+
*/
|
|
167
|
+
offset: {
|
|
168
|
+
type: NumberConstructor;
|
|
169
|
+
reflect: boolean;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
173
|
+
*/
|
|
174
|
+
onDark: {
|
|
175
|
+
type: BooleanConstructor;
|
|
176
|
+
reflect: boolean;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Specifies the current selected option.
|
|
180
|
+
* @type {HTMLElement}
|
|
181
|
+
*/
|
|
182
|
+
optionSelected: HTMLElement;
|
|
183
|
+
/**
|
|
184
|
+
* If declared, selecting a menu option will not change the input value. By doing so,
|
|
185
|
+
* the current menu filter will be preserved and the user can continue from their last
|
|
186
|
+
* filter state. It is recommended to use this in combination with the `displayValue` slot.
|
|
187
|
+
*/
|
|
188
|
+
persistInput: {
|
|
189
|
+
type: BooleanConstructor;
|
|
190
|
+
reflect: boolean;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Position where the bib should appear relative to the trigger.
|
|
194
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
195
|
+
* @default 'bottom-start'
|
|
196
|
+
*/
|
|
197
|
+
placement: "top" | "right" | "bottom" | "left" | "bottom-start" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "left-start" | "left-end";
|
|
198
|
+
/**
|
|
199
|
+
* Define custom placeholder text, only supported by date input formats.
|
|
200
|
+
*/
|
|
201
|
+
placeholder: {
|
|
202
|
+
type: StringConstructor;
|
|
203
|
+
reflect: boolean;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
207
|
+
*/
|
|
208
|
+
required: {
|
|
209
|
+
type: BooleanConstructor;
|
|
210
|
+
reflect: boolean;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Sets a custom help text message to display for all validityStates.
|
|
214
|
+
*/
|
|
215
|
+
setCustomValidity: {
|
|
216
|
+
type: StringConstructor;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Custom help text message to display when validity = `customError`.
|
|
220
|
+
*/
|
|
221
|
+
setCustomValidityCustomError: {
|
|
222
|
+
type: StringConstructor;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
226
|
+
*/
|
|
227
|
+
setCustomValidityValueMissing: {
|
|
228
|
+
type: StringConstructor;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Custom help text message to display when validity = `valueMissing` due to the user not choosing a menu option when behavior = "filter".
|
|
232
|
+
*/
|
|
233
|
+
setCustomValidityValueMissingFilter: {
|
|
234
|
+
type: StringConstructor;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Indicates whether the combobox is in a dirty state (has been interacted with).
|
|
238
|
+
* @private
|
|
239
|
+
*/
|
|
240
|
+
touched: {
|
|
241
|
+
type: BooleanConstructor;
|
|
242
|
+
reflect: boolean;
|
|
243
|
+
attribute: boolean;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* If set, the `icon` attribute will be applied to the trigger `auro-input` element.
|
|
247
|
+
*/
|
|
248
|
+
triggerIcon: {
|
|
249
|
+
type: BooleanConstructor;
|
|
250
|
+
reflect: boolean;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Applies the defined value as the type attribute on `auro-input`.
|
|
254
|
+
*/
|
|
255
|
+
type: {
|
|
256
|
+
type: StringConstructor;
|
|
257
|
+
reflect: boolean;
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Specifies the value of the input element within the combobox.
|
|
261
|
+
*/
|
|
262
|
+
typedValue: {
|
|
263
|
+
type: StringConstructor;
|
|
264
|
+
reflect: boolean;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Specifies the `validityState` this element is in.
|
|
268
|
+
*/
|
|
269
|
+
validity: {
|
|
270
|
+
type: StringConstructor;
|
|
271
|
+
reflect: boolean;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Value selected for the dropdown menu.
|
|
275
|
+
*/
|
|
276
|
+
value: {
|
|
277
|
+
type: StringConstructor;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
281
|
+
* Otherwise, Heading 600
|
|
282
|
+
*/
|
|
283
|
+
largeFullscreenHeadline: {
|
|
284
|
+
type: BooleanConstructor;
|
|
285
|
+
reflect: boolean;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Defines the screen size breakpointat which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
289
|
+
*
|
|
290
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
291
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
292
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
293
|
+
* @default 'sm'
|
|
294
|
+
*/
|
|
295
|
+
fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
|
|
296
|
+
/**
|
|
297
|
+
* Specifies the currently active option.
|
|
298
|
+
* @private
|
|
299
|
+
*/
|
|
300
|
+
optionActive: {
|
|
301
|
+
type: ObjectConstructor;
|
|
302
|
+
reflect: boolean;
|
|
303
|
+
attribute: boolean;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Deferred aria-expanded state for the trigger input.
|
|
307
|
+
* Delays the "true" transition so VoiceOver finishes its character echo
|
|
308
|
+
* before announcing "expanded".
|
|
309
|
+
* @private
|
|
310
|
+
*/
|
|
311
|
+
triggerExpandedState: {
|
|
312
|
+
type: BooleanConstructor;
|
|
313
|
+
reflect: boolean;
|
|
314
|
+
attribute: boolean;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
static get styles(): import("lit").CSSResult[];
|
|
318
|
+
/**
|
|
319
|
+
* This will register this element with the browser.
|
|
320
|
+
* @param {string} [name='auro-combobox'] - The name of the element that you want to register.
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* AuroCombobox.register('custom-combobox') // this will register this element to <custom-combobox/>
|
|
324
|
+
*
|
|
325
|
+
*/
|
|
326
|
+
static register(name?: string): void;
|
|
327
|
+
/**
|
|
328
|
+
* @private
|
|
329
|
+
* @returns {void} Internal defaults.
|
|
330
|
+
*/
|
|
331
|
+
private _initializeDefaults;
|
|
332
|
+
appearance: string;
|
|
333
|
+
disabled: boolean;
|
|
334
|
+
msgSelectionMissing: string;
|
|
335
|
+
noFilter: boolean;
|
|
336
|
+
noValidate: boolean;
|
|
337
|
+
optionActive: any;
|
|
338
|
+
persistInput: boolean;
|
|
339
|
+
required: boolean;
|
|
340
|
+
value: any;
|
|
341
|
+
typedValue: any;
|
|
342
|
+
behavior: string;
|
|
343
|
+
clearBtnFocused: boolean;
|
|
344
|
+
checkmark: boolean;
|
|
345
|
+
dvInputOnly: boolean;
|
|
346
|
+
fullscreenBreakpoint: string;
|
|
347
|
+
matchWidth: boolean;
|
|
348
|
+
shape: string;
|
|
349
|
+
size: string;
|
|
350
|
+
triggerIcon: boolean;
|
|
351
|
+
placement: string;
|
|
352
|
+
offset: number;
|
|
353
|
+
noFlip: boolean;
|
|
354
|
+
shift: boolean;
|
|
355
|
+
autoPlacement: boolean;
|
|
356
|
+
dropdownTag: any;
|
|
357
|
+
bibtemplateTag: any;
|
|
358
|
+
inputTag: any;
|
|
359
|
+
helpTextTag: any;
|
|
360
|
+
availableOptions: any[] | any[];
|
|
361
|
+
dropdownId: any;
|
|
362
|
+
dropdownOpen: any;
|
|
363
|
+
triggerExpandedState: boolean;
|
|
364
|
+
_expandedTimeout: NodeJS.Timeout;
|
|
365
|
+
_inFullscreenTransition: boolean;
|
|
366
|
+
errorMessage: any;
|
|
367
|
+
isHiddenWhileLoading: boolean;
|
|
368
|
+
largeFullscreenHeadline: boolean;
|
|
369
|
+
onDark: boolean;
|
|
370
|
+
optionSelected: any;
|
|
371
|
+
runtimeUtils: any;
|
|
372
|
+
touched: boolean;
|
|
373
|
+
validation: AuroFormValidation;
|
|
374
|
+
validity: any;
|
|
375
|
+
/**
|
|
376
|
+
* Returns the current value of the input element within the combobox.
|
|
377
|
+
* @returns {string|undefined} The value of the input element, or undefined if the input is not present.
|
|
378
|
+
*/
|
|
379
|
+
get inputValue(): string | undefined;
|
|
380
|
+
/**
|
|
381
|
+
* Checks if the element is valid.
|
|
382
|
+
* @returns {boolean} - Returns true if the element is valid, false otherwise.
|
|
383
|
+
*/
|
|
384
|
+
isValid(): boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Mark the first available (non-hidden), enabled option as `active`.
|
|
387
|
+
* @private
|
|
388
|
+
* @returns {void}
|
|
389
|
+
*/
|
|
390
|
+
private activateFirstEnabledAvailableOption;
|
|
391
|
+
/**
|
|
392
|
+
* Mark the last available (non-hidden), enabled option as `active`.
|
|
393
|
+
* @private
|
|
394
|
+
* @returns {void}
|
|
395
|
+
*/
|
|
396
|
+
private activateLastEnabledAvailableOption;
|
|
397
|
+
/**
|
|
398
|
+
* Updates the filter for the available options based on the input value.
|
|
399
|
+
* @private
|
|
400
|
+
*/
|
|
401
|
+
private updateFilter;
|
|
402
|
+
noMatchOption: any;
|
|
403
|
+
/**
|
|
404
|
+
* Syncs the values and states of this component, the input, and the menu, including this.optionSelected and this.menu.optionSelected.
|
|
405
|
+
* @private
|
|
406
|
+
* @returns {void}
|
|
407
|
+
*/
|
|
408
|
+
private syncValuesAndStates;
|
|
409
|
+
/**
|
|
410
|
+
* Update displayValue or input.value, it's called when making a selection.
|
|
411
|
+
* @param {string} label - The label of the selected option.
|
|
412
|
+
* @private
|
|
413
|
+
*/
|
|
414
|
+
private updateTriggerTextDisplay;
|
|
415
|
+
/**
|
|
416
|
+
* Processes hidden state of all menu options and determines if there are any available options not hidden.
|
|
417
|
+
* @private
|
|
418
|
+
* @returns {void}
|
|
419
|
+
*/
|
|
420
|
+
private handleMenuOptions;
|
|
421
|
+
/**
|
|
422
|
+
* Determines the element error state based on the `required` attribute and input value.
|
|
423
|
+
* @private
|
|
424
|
+
* @returns {void}
|
|
425
|
+
*/
|
|
426
|
+
private generateOptionsArray;
|
|
427
|
+
options: any;
|
|
428
|
+
/**
|
|
429
|
+
* Hides the dropdown bib if its open.
|
|
430
|
+
* @returns {void}
|
|
431
|
+
*/
|
|
432
|
+
hideBib(): void;
|
|
433
|
+
/**
|
|
434
|
+
* Shows the dropdown bib if there are options to show.
|
|
435
|
+
* @returns {void}
|
|
436
|
+
*/
|
|
437
|
+
showBib(): void;
|
|
438
|
+
/**
|
|
439
|
+
* Binds all behavior needed to the dropdown after rendering.
|
|
440
|
+
* @private
|
|
441
|
+
* @returns {void}
|
|
442
|
+
*/
|
|
443
|
+
private configureDropdown;
|
|
444
|
+
bibtemplate: any;
|
|
445
|
+
inputInBib: any;
|
|
446
|
+
/**
|
|
447
|
+
* @private
|
|
448
|
+
*/
|
|
449
|
+
private setInputFocus;
|
|
450
|
+
/**
|
|
451
|
+
* @private
|
|
452
|
+
*/
|
|
453
|
+
private setClearBtnFocus;
|
|
454
|
+
/**
|
|
455
|
+
* @private
|
|
456
|
+
*/
|
|
457
|
+
private setTriggerInputFocus;
|
|
458
|
+
/**
|
|
459
|
+
* Suppresses or restores dialog semantics on the bib's dialog element.
|
|
460
|
+
* On desktop (non-fullscreen), VoiceOver verbosely announces "listbox inside
|
|
461
|
+
* of a dialog" which disrupts combobox usage. Setting role="presentation"
|
|
462
|
+
* suppresses this. In fullscreen mode, dialog semantics are restored.
|
|
463
|
+
* @private
|
|
464
|
+
*/
|
|
465
|
+
private updateBibDialogRole;
|
|
466
|
+
/**
|
|
467
|
+
* Update menu to default for fullscreen bib, otherwise to this.size and this.shape.
|
|
468
|
+
* @private
|
|
469
|
+
*/
|
|
470
|
+
private updateMenuShapeSize;
|
|
471
|
+
/**
|
|
472
|
+
* Returns the shadow root containing the live region for screen reader announcements.
|
|
473
|
+
* When the bib is open in fullscreen modal mode, everything outside the <dialog>
|
|
474
|
+
* is inert, so we target the bib's own shadow root instead of the host's.
|
|
475
|
+
* @private
|
|
476
|
+
* @returns {ShadowRoot}
|
|
477
|
+
*/
|
|
478
|
+
private _getAnnouncementRoot;
|
|
479
|
+
/**
|
|
480
|
+
* Binds all behavior needed to the menu after rendering.
|
|
481
|
+
* @private
|
|
482
|
+
* @returns {void}
|
|
483
|
+
*/
|
|
484
|
+
private configureMenu;
|
|
485
|
+
menu: Element;
|
|
486
|
+
defaultMenuShape: string;
|
|
487
|
+
/**
|
|
488
|
+
* Binds all behavior needed to the input after rendering.
|
|
489
|
+
* @private
|
|
490
|
+
* @returns {void}
|
|
491
|
+
*/
|
|
492
|
+
private configureInput;
|
|
493
|
+
/**
|
|
494
|
+
* Manages the visibility of the dropdown based on loading state changes.
|
|
495
|
+
*
|
|
496
|
+
* This method listens for loading state changes and adjusts the visibility of the dropdown accordingly.
|
|
497
|
+
* If the dropdown is visible and loading is true without any loading placeholders, it hides the dropdown
|
|
498
|
+
* and sets a flag to indicate it is hidden while loading. If loading is false and the dropdown was previously
|
|
499
|
+
* hidden, it checks if the active element is within the dropdown and shows it again if true.
|
|
500
|
+
*
|
|
501
|
+
* @private
|
|
502
|
+
* @param {CustomEvent} event - The event object containing details about the loading state change.
|
|
503
|
+
* @param {boolean} event.detail.loading - Indicates whether the menu is currently loading.
|
|
504
|
+
* @param {boolean} event.detail.hasLoadingPlaceholder - Indicates if there are loading placeholders present.
|
|
505
|
+
* @returns {void}
|
|
506
|
+
*/
|
|
507
|
+
private handleMenuLoadingChange;
|
|
508
|
+
/**
|
|
509
|
+
* Handle changes to the input value and trigger changes that should result.
|
|
510
|
+
* @private
|
|
511
|
+
* @param {Event} event - The input event triggered by the input element.
|
|
512
|
+
* @returns {void}
|
|
513
|
+
*/
|
|
514
|
+
private handleInputValueChange;
|
|
515
|
+
_syncingBibValue: boolean;
|
|
516
|
+
/**
|
|
517
|
+
* Binds all behavior needed to the combobox after rendering.
|
|
518
|
+
* @private
|
|
519
|
+
* @returns {void}
|
|
520
|
+
*/
|
|
521
|
+
private configureCombobox;
|
|
522
|
+
menus: Element[];
|
|
523
|
+
firstUpdated(): void;
|
|
524
|
+
dropdown: any;
|
|
525
|
+
input: any;
|
|
526
|
+
/**
|
|
527
|
+
* Focuses the combobox trigger input.
|
|
528
|
+
* @returns {void}
|
|
529
|
+
*/
|
|
530
|
+
focus(): void;
|
|
531
|
+
/**
|
|
532
|
+
* Sets the menu value if menu is available.
|
|
533
|
+
* @param {string} value - The value to set on the menu.
|
|
534
|
+
* @returns {void}
|
|
535
|
+
*/
|
|
536
|
+
setMenuValue(value: string): void;
|
|
537
|
+
/**
|
|
538
|
+
* Resets component to initial state.
|
|
539
|
+
* @returns {void}
|
|
540
|
+
*/
|
|
541
|
+
reset(): void;
|
|
542
|
+
/**
|
|
543
|
+
* Clears the current value of the combobox.
|
|
544
|
+
* @returns {void}
|
|
545
|
+
*/
|
|
546
|
+
clear(): void;
|
|
547
|
+
/**
|
|
548
|
+
* Validates value.
|
|
549
|
+
* @param {boolean} [force=false] - Whether to force validation.
|
|
550
|
+
*/
|
|
551
|
+
validate(force?: boolean): void;
|
|
552
|
+
updated(changedProperties: any): void;
|
|
553
|
+
hasValue: boolean;
|
|
554
|
+
/**
|
|
555
|
+
* Applies slotted nodes to a target element with a new slot name.
|
|
556
|
+
* @private
|
|
557
|
+
* @param {HTMLSlotElement} slot - The slot element containing the nodes to apply.
|
|
558
|
+
* @param {HTMLElement} target - The target element to apply the nodes to.
|
|
559
|
+
* @param {string} newSlotName - The new slot name for the applied nodes.
|
|
560
|
+
* @returns {void}
|
|
561
|
+
*/
|
|
562
|
+
private transportAssignedNodes;
|
|
563
|
+
/**
|
|
564
|
+
* Updates the active option in the menu.
|
|
565
|
+
* @param {number} index - Index of the option to make active.
|
|
566
|
+
*/
|
|
567
|
+
updateActiveOption(index: number): void;
|
|
568
|
+
/**
|
|
569
|
+
* Watch for slot changes and recalculate the menuoptions.
|
|
570
|
+
* @private
|
|
571
|
+
* @param {Event} event - `slotchange` event.
|
|
572
|
+
* @returns {void}
|
|
573
|
+
*/
|
|
574
|
+
private handleSlotChange;
|
|
575
|
+
render(): import("lit-html").TemplateResult;
|
|
576
|
+
}
|
|
577
|
+
import { AuroElement } from '../../layoutElement/src/auroElement.js';
|
|
578
|
+
import AuroFormValidation from '@aurodesignsystem/form-validation';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export namespace comboboxKeyboardStrategy {
|
|
2
|
+
function ArrowDown(component: any, evt: any, ctx: any): void;
|
|
3
|
+
function ArrowUp(component: any, evt: any, ctx: any): void;
|
|
4
|
+
function End(component: any, evt: any, ctx: any): void;
|
|
5
|
+
function Enter(component: any, evt: any, ctx: any): void;
|
|
6
|
+
function Escape(component: any, _evt: any, ctx: any): void;
|
|
7
|
+
function Home(component: any, evt: any, ctx: any): void;
|
|
8
|
+
function Tab(component: any, evt: any, ctx: any): void;
|
|
9
|
+
}
|