@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,482 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
|
|
3
|
+
* @customElement auro-dropdown
|
|
4
|
+
*
|
|
5
|
+
* @slot - Default slot for the dropdown bib content.
|
|
6
|
+
* @slot helpText - Defines the content of the helpText.
|
|
7
|
+
* @slot trigger - Defines the content of the trigger.
|
|
8
|
+
* @csspart trigger - The trigger content container.
|
|
9
|
+
* @csspart chevron - The collapsed/expanded state icon container.
|
|
10
|
+
* @csspart size - The size of the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
11
|
+
* @csspart helpText - The helpText content container.
|
|
12
|
+
* @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
|
|
13
|
+
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
14
|
+
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
15
|
+
*/
|
|
16
|
+
export class AuroDropdown extends AuroElement {
|
|
17
|
+
static get shadowRootOptions(): {
|
|
18
|
+
delegatesFocus: boolean;
|
|
19
|
+
clonable?: boolean;
|
|
20
|
+
customElementRegistry?: CustomElementRegistry;
|
|
21
|
+
mode: ShadowRootMode;
|
|
22
|
+
serializable?: boolean;
|
|
23
|
+
slotAssignment?: SlotAssignmentMode;
|
|
24
|
+
};
|
|
25
|
+
static get properties(): {
|
|
26
|
+
/**
|
|
27
|
+
* The value for the role attribute of the trigger element.
|
|
28
|
+
*/
|
|
29
|
+
a11yRole: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
attribute: boolean;
|
|
32
|
+
reflect: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Defines whether the component will be on lighter or darker backgrounds.
|
|
36
|
+
* @type {'default' | 'inverse'}
|
|
37
|
+
* @default 'default'
|
|
38
|
+
*/
|
|
39
|
+
appearance: "default" | "inverse";
|
|
40
|
+
/**
|
|
41
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
42
|
+
*/
|
|
43
|
+
autoPlacement: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
reflect: boolean;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
49
|
+
*/
|
|
50
|
+
disableEventShow: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
reflect: boolean;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* If declared, applies a border around the trigger slot.
|
|
56
|
+
*/
|
|
57
|
+
simple: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
reflect: boolean;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
63
|
+
*/
|
|
64
|
+
chevron: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
reflect: boolean;
|
|
67
|
+
attribute: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* If declared, the dropdown is not interactive.
|
|
71
|
+
*/
|
|
72
|
+
disabled: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
reflect: boolean;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
|
|
78
|
+
*/
|
|
79
|
+
disableKeyboardHandling: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
reflect: boolean;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* @private
|
|
85
|
+
*/
|
|
86
|
+
dropdownWidth: {
|
|
87
|
+
type: NumberConstructor;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* The unique ID for the dropdown bib element.
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
dropdownId: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
reflect: boolean;
|
|
96
|
+
attribute: boolean;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* If declared, will apply error UI to the dropdown.
|
|
100
|
+
*/
|
|
101
|
+
error: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
reflect: boolean;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Contains the help text message for the current validity error.
|
|
107
|
+
*/
|
|
108
|
+
errorMessage: {
|
|
109
|
+
type: StringConstructor;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
113
|
+
*/
|
|
114
|
+
focusShow: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
reflect: boolean;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* If true, the dropdown bib is displayed.
|
|
120
|
+
*/
|
|
121
|
+
isPopoverVisible: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
reflect: boolean;
|
|
124
|
+
attribute: string;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
128
|
+
*/
|
|
129
|
+
isBibFullscreen: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
reflect: boolean;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
135
|
+
*/
|
|
136
|
+
hoverToggle: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
reflect: boolean;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
hasTriggerContent: {
|
|
144
|
+
type: BooleanConstructor;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
148
|
+
*
|
|
149
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
150
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
151
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
152
|
+
* @default 'sm'
|
|
153
|
+
*/
|
|
154
|
+
fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
|
|
155
|
+
/**
|
|
156
|
+
* Sets the layout of the dropdown.
|
|
157
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
158
|
+
* @default 'classic'
|
|
159
|
+
*/
|
|
160
|
+
layout: "classic" | "emphasized" | "snowflake";
|
|
161
|
+
/**
|
|
162
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
163
|
+
* @private
|
|
164
|
+
*/
|
|
165
|
+
parentBorder: {
|
|
166
|
+
type: BooleanConstructor;
|
|
167
|
+
reflect: boolean;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
171
|
+
*/
|
|
172
|
+
matchWidth: {
|
|
173
|
+
type: BooleanConstructor;
|
|
174
|
+
reflect: boolean;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
178
|
+
* when there isn't enough space in the specified `placement`.
|
|
179
|
+
*/
|
|
180
|
+
noFlip: {
|
|
181
|
+
type: BooleanConstructor;
|
|
182
|
+
reflect: boolean;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
186
|
+
*/
|
|
187
|
+
shift: {
|
|
188
|
+
type: BooleanConstructor;
|
|
189
|
+
reflect: boolean;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
193
|
+
*/
|
|
194
|
+
noHideOnThisFocusLoss: {
|
|
195
|
+
type: BooleanConstructor;
|
|
196
|
+
reflect: boolean;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
200
|
+
*/
|
|
201
|
+
noToggle: {
|
|
202
|
+
type: BooleanConstructor;
|
|
203
|
+
reflect: boolean;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Gap between the trigger element and bib.
|
|
207
|
+
* @default 0
|
|
208
|
+
*/
|
|
209
|
+
offset: {
|
|
210
|
+
type: NumberConstructor;
|
|
211
|
+
reflect: boolean;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
215
|
+
*/
|
|
216
|
+
onDark: {
|
|
217
|
+
type: BooleanConstructor;
|
|
218
|
+
reflect: boolean;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
222
|
+
*/
|
|
223
|
+
onSlotChange: {
|
|
224
|
+
type: FunctionConstructor;
|
|
225
|
+
reflect: boolean;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Position where the bib should appear relative to the trigger.
|
|
229
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
230
|
+
* @default 'bottom-start'
|
|
231
|
+
*/
|
|
232
|
+
placement: "top" | "right" | "bottom" | "left" | "bottom-start" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "left-start" | "left-end";
|
|
233
|
+
/**
|
|
234
|
+
* @private
|
|
235
|
+
*/
|
|
236
|
+
tabIndex: {
|
|
237
|
+
type: NumberConstructor;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* Accessible label for the dropdown bib dialog element.
|
|
241
|
+
* @private
|
|
242
|
+
*/
|
|
243
|
+
bibDialogLabel: {
|
|
244
|
+
type: StringConstructor;
|
|
245
|
+
attribute: boolean;
|
|
246
|
+
reflect: boolean;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
static get styles(): import("lit").CSSResult[];
|
|
250
|
+
/**
|
|
251
|
+
* This will register this element with the browser.
|
|
252
|
+
* @param {string} [name="auro-dropdown"] - The name of the element that you want to register.
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|
|
256
|
+
*
|
|
257
|
+
*/
|
|
258
|
+
static register(name?: string): void;
|
|
259
|
+
isPopoverVisible: boolean;
|
|
260
|
+
isBibFullscreen: boolean;
|
|
261
|
+
matchWidth: boolean;
|
|
262
|
+
noHideOnThisFocusLoss: boolean;
|
|
263
|
+
errorMessage: any;
|
|
264
|
+
layout: any;
|
|
265
|
+
shape: any;
|
|
266
|
+
size: any;
|
|
267
|
+
parentBorder: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
270
|
+
* @private
|
|
271
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
272
|
+
*/
|
|
273
|
+
private handleDropdownToggle;
|
|
274
|
+
/** @private */
|
|
275
|
+
private bibElement;
|
|
276
|
+
/**
|
|
277
|
+
* @private
|
|
278
|
+
* @returns {object} Class definition for the wrapper element.
|
|
279
|
+
*/
|
|
280
|
+
private get commonWrapperClasses();
|
|
281
|
+
/**
|
|
282
|
+
* @private
|
|
283
|
+
* @returns {void} Internal defaults.
|
|
284
|
+
*/
|
|
285
|
+
private _intializeDefaults;
|
|
286
|
+
appearance: string;
|
|
287
|
+
chevron: boolean;
|
|
288
|
+
disabled: boolean;
|
|
289
|
+
disableKeyboardHandling: boolean;
|
|
290
|
+
error: boolean;
|
|
291
|
+
noToggle: boolean;
|
|
292
|
+
a11yRole: string;
|
|
293
|
+
onDark: boolean;
|
|
294
|
+
showTriggerBorders: boolean;
|
|
295
|
+
triggerContentFocusable: any;
|
|
296
|
+
simple: boolean;
|
|
297
|
+
placement: string;
|
|
298
|
+
offset: number;
|
|
299
|
+
noFlip: boolean;
|
|
300
|
+
shift: boolean;
|
|
301
|
+
autoPlacement: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* @private
|
|
304
|
+
*/
|
|
305
|
+
private hasTriggerContent;
|
|
306
|
+
/**
|
|
307
|
+
* @private
|
|
308
|
+
*/
|
|
309
|
+
private triggerContentSlot;
|
|
310
|
+
/**
|
|
311
|
+
* @private
|
|
312
|
+
*/
|
|
313
|
+
private runtimeUtils;
|
|
314
|
+
/**
|
|
315
|
+
* @private
|
|
316
|
+
*/
|
|
317
|
+
private floater;
|
|
318
|
+
/**
|
|
319
|
+
* @private
|
|
320
|
+
*/
|
|
321
|
+
private iconTag;
|
|
322
|
+
/**
|
|
323
|
+
* @private
|
|
324
|
+
*/
|
|
325
|
+
private dropdownBibTag;
|
|
326
|
+
/**
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
private helpTextTag;
|
|
330
|
+
/**
|
|
331
|
+
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
332
|
+
* @private
|
|
333
|
+
* @param {Event} event - The original focus event.
|
|
334
|
+
*/
|
|
335
|
+
private bindFocusEventToTrigger;
|
|
336
|
+
/**
|
|
337
|
+
* @ignore
|
|
338
|
+
*/
|
|
339
|
+
get floaterConfig(): {
|
|
340
|
+
placement: string;
|
|
341
|
+
flip: boolean;
|
|
342
|
+
shift: boolean;
|
|
343
|
+
autoPlacement: boolean;
|
|
344
|
+
offset: number;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Public method to hide the dropdown.
|
|
348
|
+
* @returns {void}
|
|
349
|
+
*/
|
|
350
|
+
hide(): void;
|
|
351
|
+
/**
|
|
352
|
+
* Public method to show the dropdown.
|
|
353
|
+
* @returns {void}
|
|
354
|
+
*/
|
|
355
|
+
show(): void;
|
|
356
|
+
/**
|
|
357
|
+
* When bib is open, focus on the first element inside of bib.
|
|
358
|
+
* If not, trigger element will get focus.
|
|
359
|
+
*/
|
|
360
|
+
focus(): void;
|
|
361
|
+
/**
|
|
362
|
+
* Sets the active descendant element for accessibility.
|
|
363
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
364
|
+
* This function is used in components that contain `auro-dropdown` to set the active descendant.
|
|
365
|
+
* @private
|
|
366
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
367
|
+
* @returns {void}
|
|
368
|
+
*/
|
|
369
|
+
private setActiveDescendant;
|
|
370
|
+
/**
|
|
371
|
+
* Accessor for reusing the focusable entity query string.
|
|
372
|
+
* @private
|
|
373
|
+
* @returns {string}
|
|
374
|
+
*/
|
|
375
|
+
private get focusableEntityQuery();
|
|
376
|
+
updated(changedProperties: any): void;
|
|
377
|
+
firstUpdated(): void;
|
|
378
|
+
dropdownId: any;
|
|
379
|
+
bibContent: any;
|
|
380
|
+
/**
|
|
381
|
+
* Exposes CSS parts for styling from parent components.
|
|
382
|
+
* @returns {void}
|
|
383
|
+
*/
|
|
384
|
+
exposeCssParts(): void;
|
|
385
|
+
/**
|
|
386
|
+
* Determines if content is within a custom slot.
|
|
387
|
+
* @private
|
|
388
|
+
* @param {HTMLElement} element - The element to check.
|
|
389
|
+
* @returns {Boolean}
|
|
390
|
+
*/
|
|
391
|
+
private isCustomSlotContent;
|
|
392
|
+
/**
|
|
393
|
+
* Function to support @focusin event.
|
|
394
|
+
* @private
|
|
395
|
+
* @return {void}
|
|
396
|
+
*/
|
|
397
|
+
private handleFocusin;
|
|
398
|
+
hasFocus: boolean;
|
|
399
|
+
/**
|
|
400
|
+
* @private
|
|
401
|
+
*/
|
|
402
|
+
private updateFocusTrap;
|
|
403
|
+
focusTrap: any;
|
|
404
|
+
/**
|
|
405
|
+
* Function to support @focusout event.
|
|
406
|
+
* @private
|
|
407
|
+
* @return {void}
|
|
408
|
+
*/
|
|
409
|
+
private handleFocusout;
|
|
410
|
+
/**
|
|
411
|
+
* Sets up event listeners to deliver focus and blur events from nested Auro components within the trigger slot to trigger.
|
|
412
|
+
* This ensures that focus/blur events originating from within these components are propagated to the trigger element itself.
|
|
413
|
+
* @private
|
|
414
|
+
*/
|
|
415
|
+
private setupTriggerFocusEventBinding;
|
|
416
|
+
/**
|
|
417
|
+
* Clears focus and blur event listeners from nested Auro components within the trigger slot.
|
|
418
|
+
* @private
|
|
419
|
+
* @returns {void}
|
|
420
|
+
*/
|
|
421
|
+
private clearTriggerFocusEventBinding;
|
|
422
|
+
clearTriggerA11yAttributes(triggerElement: any): void;
|
|
423
|
+
/**
|
|
424
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
425
|
+
*
|
|
426
|
+
* It first updates the floater settings
|
|
427
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
428
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
429
|
+
*
|
|
430
|
+
* @private
|
|
431
|
+
* @method handleTriggerContentSlotChange
|
|
432
|
+
* @param {Event} event - Native slotchange event.
|
|
433
|
+
* @returns {void}
|
|
434
|
+
*/
|
|
435
|
+
private handleTriggerContentSlotChange;
|
|
436
|
+
triggerNode: EventTarget;
|
|
437
|
+
/**
|
|
438
|
+
* Handles the default slot change event and updates the content.
|
|
439
|
+
*
|
|
440
|
+
* This method retrieves all nodes assigned to the default slot of the event target and appends them
|
|
441
|
+
* to the `bibContent` element. If a callback function `onSlotChange` is defined, it is invoked to
|
|
442
|
+
* notify about the slot change.
|
|
443
|
+
*
|
|
444
|
+
* @private
|
|
445
|
+
* @method handleDefaultSlot
|
|
446
|
+
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
447
|
+
*/
|
|
448
|
+
private handleDefaultSlot;
|
|
449
|
+
/**
|
|
450
|
+
* Returns HTML for the common portion of the layouts.
|
|
451
|
+
* @private
|
|
452
|
+
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
453
|
+
* @returns {html} - Returns HTML.
|
|
454
|
+
*/
|
|
455
|
+
private renderBasicHtml;
|
|
456
|
+
/**
|
|
457
|
+
* Returns HTML for the classic layout. Does not support type="*".
|
|
458
|
+
* @private
|
|
459
|
+
* @returns {html} - Returns HTML for the classic layout.
|
|
460
|
+
*/
|
|
461
|
+
private renderLayoutClassic;
|
|
462
|
+
/**
|
|
463
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
464
|
+
* @private
|
|
465
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
466
|
+
*/
|
|
467
|
+
private renderLayoutSnowflake;
|
|
468
|
+
/**
|
|
469
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
470
|
+
* @private
|
|
471
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
472
|
+
*/
|
|
473
|
+
private renderLayoutEmphasized;
|
|
474
|
+
/**
|
|
475
|
+
* Logic to determine the layout of the component.
|
|
476
|
+
* @private
|
|
477
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
478
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
479
|
+
*/
|
|
480
|
+
private renderLayout;
|
|
481
|
+
}
|
|
482
|
+
import { AuroElement } from '../../layoutElement/src/auroElement.js';
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop { String } fullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
3
|
+
* @csspart bibContainer - Apply css to the bib container.
|
|
4
|
+
*/
|
|
5
|
+
export class AuroDropdownBib extends LitElement {
|
|
6
|
+
static get styles(): import("lit").CSSResult[];
|
|
7
|
+
static get properties(): {
|
|
8
|
+
/**
|
|
9
|
+
* If declared, will take the fullscreen when the bib is displayed.
|
|
10
|
+
*/
|
|
11
|
+
isFullscreen: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
reflect: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* If declared, will apply all styles for the common theme.
|
|
17
|
+
*/
|
|
18
|
+
common: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
reflect: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* If declared, will apply extra padding to bib content.
|
|
24
|
+
*/
|
|
25
|
+
inset: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
reflect: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* If declared, the bib width will match the trigger width.
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
matchWidth: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
reflect: boolean;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* If declared, will apply border-radius to the bib.
|
|
39
|
+
*/
|
|
40
|
+
rounded: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
reflect: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A reference to the associated bib template element.
|
|
46
|
+
*/
|
|
47
|
+
bibTemplate: {
|
|
48
|
+
type: ObjectConstructor;
|
|
49
|
+
};
|
|
50
|
+
shape: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
reflect: boolean;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Accessible label for the dialog element, used when displayed as a modal.
|
|
56
|
+
* Applied via aria-labelledby on a visually hidden element rather than
|
|
57
|
+
* aria-label because iOS VoiceOver does not reliably read aria-label
|
|
58
|
+
* on <dialog> elements.
|
|
59
|
+
* @private
|
|
60
|
+
*/
|
|
61
|
+
dialogLabel: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Overrides the native role of the dialog element.
|
|
66
|
+
* For example, set to `"presentation"` on desktop combobox to prevent
|
|
67
|
+
* VoiceOver from announcing "listbox inside of a dialog".
|
|
68
|
+
* When `undefined`, the dialog keeps its native role.
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
dialogRole: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Tracks whether a menu option is currently highlighted.
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
hasActiveDescendant: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private _mobileBreakpointName;
|
|
86
|
+
shape: string;
|
|
87
|
+
matchWidth: boolean;
|
|
88
|
+
hasActiveDescendant: boolean;
|
|
89
|
+
set mobileFullscreenBreakpoint(value: string);
|
|
90
|
+
get mobileFullscreenBreakpoint(): string;
|
|
91
|
+
updated(changedProperties: any): void;
|
|
92
|
+
bibTemplate: any;
|
|
93
|
+
firstUpdated(changedProperties: any): void;
|
|
94
|
+
/**
|
|
95
|
+
* Forwards the dialog's native `cancel` event (fired on ESC) as
|
|
96
|
+
* an `auro-bib-cancel` custom event so parent components can close.
|
|
97
|
+
* @param {HTMLDialogElement} dialog - The dialog element to attach the cancel listener to.
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
private _setupCancelHandler;
|
|
101
|
+
/**
|
|
102
|
+
* Blocks touch-driven page scroll while a fullscreen modal dialog is open.
|
|
103
|
+
*
|
|
104
|
+
* The showModal() function places the dialog in the browser's **top layer**,
|
|
105
|
+
* which is a separate rendering layer above the normal DOM. On mobile, the
|
|
106
|
+
* compositor processes visual-viewport panning before top-layer touch
|
|
107
|
+
* handling. This means the entire viewport — including the top-layer dialog
|
|
108
|
+
* — can be panned by a touch gesture, causing the page behind the dialog to
|
|
109
|
+
* scroll into view. To prevent this, we add a touchmove listener that cancels
|
|
110
|
+
* the event if the touch started outside the dialog or any scrollable child within it.
|
|
111
|
+
*
|
|
112
|
+
* @private
|
|
113
|
+
*/
|
|
114
|
+
private _lockTouchScroll;
|
|
115
|
+
_touchMoveHandler: (event: any) => void;
|
|
116
|
+
/**
|
|
117
|
+
* Removes the touchmove listener added by _lockTouchScroll().
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
private _unlockTouchScroll;
|
|
121
|
+
open(modal?: boolean): void;
|
|
122
|
+
/**
|
|
123
|
+
* Closes the dialog.
|
|
124
|
+
*/
|
|
125
|
+
close(): void;
|
|
126
|
+
render(): import("lit-html").TemplateResult;
|
|
127
|
+
}
|
|
128
|
+
import { LitElement } from "lit";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a keyboard strategy for dialog-specific key handling.
|
|
3
|
+
* All other keydown behavior is left to the browser's native bubbling path.
|
|
4
|
+
* @param {HTMLElement} bib - The dropdown bib element.
|
|
5
|
+
* @returns {Object} Keyboard handlers keyed by `event.key`.
|
|
6
|
+
*/
|
|
7
|
+
export function createDropdownBibKeyboardStrategy(bib: HTMLElement): any;
|