@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.
Files changed (231) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +66 -0
  2. package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
  3. package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
  4. package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
  5. package/components/bibtemplate/dist/index.d.ts +2 -0
  6. package/components/bibtemplate/dist/index.js +395 -0
  7. package/components/bibtemplate/dist/registered.js +395 -0
  8. package/components/bibtemplate/dist/styles/color-css.d.ts +2 -0
  9. package/components/bibtemplate/dist/styles/style-css.d.ts +2 -0
  10. package/components/bibtemplate/dist/styles/tokens-css.d.ts +2 -0
  11. package/components/checkbox/demo/api.md +489 -0
  12. package/components/checkbox/demo/api.min.js +2133 -0
  13. package/components/checkbox/demo/index.md +55 -0
  14. package/components/checkbox/demo/index.min.js +2108 -0
  15. package/components/checkbox/demo/keyboardBehavior.md +0 -0
  16. package/components/checkbox/demo/readme.md +142 -0
  17. package/components/checkbox/dist/auro-checkbox-group.d.ts +176 -0
  18. package/components/checkbox/dist/auro-checkbox.d.ts +209 -0
  19. package/components/checkbox/dist/index.d.ts +3 -0
  20. package/components/checkbox/dist/index.js +2057 -0
  21. package/components/checkbox/dist/registered.js +2058 -0
  22. package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +2 -0
  23. package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +2 -0
  24. package/components/checkbox/dist/styles/color-css.d.ts +2 -0
  25. package/components/checkbox/dist/styles/colorGroup-css.d.ts +2 -0
  26. package/components/checkbox/dist/styles/tokens-css.d.ts +2 -0
  27. package/components/combobox/demo/api.md +2287 -0
  28. package/components/combobox/demo/api.min.js +18025 -0
  29. package/components/combobox/demo/index.md +196 -0
  30. package/components/combobox/demo/index.min.js +17930 -0
  31. package/components/combobox/demo/keyboardBehavior.md +281 -0
  32. package/components/combobox/demo/readme.md +158 -0
  33. package/components/combobox/dist/auro-combobox.d.ts +578 -0
  34. package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +9 -0
  35. package/components/combobox/dist/index.d.ts +2 -0
  36. package/components/combobox/dist/index.js +15845 -0
  37. package/components/combobox/dist/registered.js +15847 -0
  38. package/components/combobox/dist/styles/emphasized/style-css.d.ts +2 -0
  39. package/components/combobox/dist/styles/snowflake/style-css.d.ts +2 -0
  40. package/components/combobox/dist/styles/style-css.d.ts +2 -0
  41. package/components/counter/demo/api.md +1285 -0
  42. package/components/counter/demo/api.min.js +8237 -0
  43. package/components/counter/demo/index.md +92 -0
  44. package/components/counter/demo/index.min.js +8218 -0
  45. package/components/counter/demo/keyboardBehavior.md +127 -0
  46. package/components/counter/demo/readme.md +161 -0
  47. package/components/counter/dist/auro-counter-button.d.ts +14 -0
  48. package/components/counter/dist/auro-counter-group.d.ts +390 -0
  49. package/components/counter/dist/auro-counter-wrapper.d.ts +17 -0
  50. package/components/counter/dist/auro-counter.d.ts +136 -0
  51. package/components/counter/dist/buttonVersion.d.ts +2 -0
  52. package/components/counter/dist/iconVersion.d.ts +2 -0
  53. package/components/counter/dist/index.d.ts +3 -0
  54. package/components/counter/dist/index.js +8140 -0
  55. package/components/counter/dist/keyboardStrategy.d.ts +4 -0
  56. package/components/counter/dist/registered.js +8141 -0
  57. package/components/counter/dist/styles/color-css.d.ts +2 -0
  58. package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
  59. package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
  60. package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
  61. package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
  62. package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
  63. package/components/counter/dist/styles/shapeSize-css.d.ts +2 -0
  64. package/components/counter/dist/styles/style-css.d.ts +2 -0
  65. package/components/counter/dist/styles/tokens-css.d.ts +2 -0
  66. package/components/datepicker/demo/api.md +1824 -0
  67. package/components/datepicker/demo/api.min.js +24654 -0
  68. package/components/datepicker/demo/index.md +158 -0
  69. package/components/datepicker/demo/index.min.js +24375 -0
  70. package/components/datepicker/demo/keyboardBehavior.md +19 -0
  71. package/components/datepicker/demo/readme.md +137 -0
  72. package/components/datepicker/dist/auro-calendar-cell.d.ts +169 -0
  73. package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
  74. package/components/datepicker/dist/auro-calendar.d.ts +173 -0
  75. package/components/datepicker/dist/auro-datepicker.d.ts +716 -0
  76. package/components/datepicker/dist/buttonVersion.d.ts +2 -0
  77. package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +1 -0
  78. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  79. package/components/datepicker/dist/index.d.ts +2 -0
  80. package/components/datepicker/dist/index.js +24290 -0
  81. package/components/datepicker/dist/popoverVersion.d.ts +2 -0
  82. package/components/datepicker/dist/registered.js +24290 -0
  83. package/components/datepicker/dist/styles/classic/color-css.d.ts +2 -0
  84. package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
  85. package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
  86. package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
  87. package/components/datepicker/dist/styles/color-css.d.ts +2 -0
  88. package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
  89. package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
  90. package/components/datepicker/dist/styles/snowflake/color-css.d.ts +2 -0
  91. package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
  92. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
  93. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
  94. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
  95. package/components/datepicker/dist/styles/style-css.d.ts +2 -0
  96. package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
  97. package/components/datepicker/dist/utilities.d.ts +78 -0
  98. package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
  99. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
  100. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
  101. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
  102. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
  103. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
  104. package/components/dropdown/demo/api.md +1358 -0
  105. package/components/dropdown/demo/api.min.js +5019 -0
  106. package/components/dropdown/demo/index.md +283 -0
  107. package/components/dropdown/demo/index.min.js +4954 -0
  108. package/components/dropdown/demo/keyboardBehavior.md +77 -0
  109. package/components/dropdown/demo/readme.md +160 -0
  110. package/components/dropdown/dist/auro-dropdown.d.ts +482 -0
  111. package/components/dropdown/dist/auro-dropdownBib.d.ts +128 -0
  112. package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +7 -0
  113. package/components/dropdown/dist/iconVersion.d.ts +2 -0
  114. package/components/dropdown/dist/index.d.ts +2 -0
  115. package/components/dropdown/dist/index.js +4847 -0
  116. package/components/dropdown/dist/registered.js +4847 -0
  117. package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +2 -0
  118. package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +2 -0
  119. package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
  120. package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
  121. package/components/dropdown/dist/styles/color-css.d.ts +2 -0
  122. package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
  123. package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
  124. package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
  125. package/components/dropdown/dist/styles/style-css.d.ts +2 -0
  126. package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
  127. package/components/form/demo/api.md +319 -0
  128. package/components/form/demo/api.min.js +71170 -0
  129. package/components/form/demo/index.md +128 -0
  130. package/components/form/demo/index.min.js +71170 -0
  131. package/components/form/demo/keyboardBehavior.md +0 -0
  132. package/components/form/demo/readme.md +145 -0
  133. package/components/form/dist/auro-form.d.ts +280 -0
  134. package/components/form/dist/index.d.ts +2 -0
  135. package/components/form/dist/index.js +718 -0
  136. package/components/form/dist/registered.d.ts +1 -0
  137. package/components/form/dist/registered.js +718 -0
  138. package/components/form/dist/styles/style-css.d.ts +2 -0
  139. package/components/helptext/dist/auro-helptext.d.ts +69 -0
  140. package/components/helptext/dist/index.d.ts +2 -0
  141. package/components/helptext/dist/index.js +231 -0
  142. package/components/helptext/dist/registered.js +231 -0
  143. package/components/helptext/dist/styles/color-css.d.ts +2 -0
  144. package/components/helptext/dist/styles/style-css.d.ts +2 -0
  145. package/components/helptext/dist/styles/tokens-css.d.ts +2 -0
  146. package/components/input/demo/api.md +1397 -0
  147. package/components/input/demo/api.min.js +7473 -0
  148. package/components/input/demo/index.md +161 -0
  149. package/components/input/demo/index.min.js +7393 -0
  150. package/components/input/demo/keyboardBehavior.md +0 -0
  151. package/components/input/demo/readme.md +134 -0
  152. package/components/input/dist/auro-input.d.ts +207 -0
  153. package/components/input/dist/base-input.d.ts +628 -0
  154. package/components/input/dist/buttonVersion.d.ts +2 -0
  155. package/components/input/dist/i18n.d.ts +18 -0
  156. package/components/input/dist/iconVersion.d.ts +2 -0
  157. package/components/input/dist/index.d.ts +2 -0
  158. package/components/input/dist/index.js +7305 -0
  159. package/components/input/dist/registered.js +7305 -0
  160. package/components/input/dist/styles/classic/color-css.d.ts +2 -0
  161. package/components/input/dist/styles/classic/style-css.d.ts +2 -0
  162. package/components/input/dist/styles/color-css.d.ts +2 -0
  163. package/components/input/dist/styles/default/borders-css.d.ts +2 -0
  164. package/components/input/dist/styles/default/color-css.d.ts +2 -0
  165. package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
  166. package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
  167. package/components/input/dist/styles/default/style-css.d.ts +2 -0
  168. package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
  169. package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
  170. package/components/input/dist/styles/mixins-css.d.ts +2 -0
  171. package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
  172. package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
  173. package/components/input/dist/styles/style-css.d.ts +2 -0
  174. package/components/input/dist/styles/tokens-css.d.ts +2 -0
  175. package/components/input/dist/utilities.d.ts +25 -0
  176. package/components/layoutElement/dist/auroElement.d.ts +40 -0
  177. package/components/layoutElement/dist/index.d.ts +2 -0
  178. package/components/layoutElement/dist/index.js +107 -0
  179. package/components/layoutElement/dist/registered.js +107 -0
  180. package/components/menu/demo/api.md +1201 -0
  181. package/components/menu/demo/api.min.js +2397 -0
  182. package/components/menu/demo/index.md +72 -0
  183. package/components/menu/demo/index.min.js +2290 -0
  184. package/components/menu/demo/keyboardBehavior.md +0 -0
  185. package/components/menu/demo/readme.md +145 -0
  186. package/components/menu/dist/auro-menu-utils.d.ts +34 -0
  187. package/components/menu/dist/auro-menu.context.d.ts +239 -0
  188. package/components/menu/dist/auro-menu.d.ts +317 -0
  189. package/components/menu/dist/auro-menuoption.d.ts +210 -0
  190. package/components/menu/dist/iconVersion.d.ts +2 -0
  191. package/components/menu/dist/index.d.ts +4 -0
  192. package/components/menu/dist/index.js +2253 -0
  193. package/components/menu/dist/registered.js +2201 -0
  194. package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
  195. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
  196. package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
  197. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
  198. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  199. package/components/radio/demo/api.md +675 -0
  200. package/components/radio/demo/api.min.js +2210 -0
  201. package/components/radio/demo/index.md +73 -0
  202. package/components/radio/demo/index.min.js +2167 -0
  203. package/components/radio/demo/keyboardBehavior.md +0 -0
  204. package/components/radio/demo/readme.md +141 -0
  205. package/components/radio/dist/auro-radio-group.d.ts +250 -0
  206. package/components/radio/dist/auro-radio.d.ts +180 -0
  207. package/components/radio/dist/index.d.ts +3 -0
  208. package/components/radio/dist/index.js +2116 -0
  209. package/components/radio/dist/registered.js +2117 -0
  210. package/components/radio/dist/styles/auro-radio-group-css.d.ts +2 -0
  211. package/components/radio/dist/styles/color-css.d.ts +2 -0
  212. package/components/radio/dist/styles/groupColor-css.d.ts +2 -0
  213. package/components/radio/dist/styles/style-css.d.ts +2 -0
  214. package/components/radio/dist/styles/tokens-css.d.ts +2 -0
  215. package/components/select/demo/api.md +2378 -0
  216. package/components/select/demo/api.min.js +10542 -0
  217. package/components/select/demo/index.md +355 -0
  218. package/components/select/demo/index.min.js +10449 -0
  219. package/components/select/demo/keyboardBehavior.md +245 -0
  220. package/components/select/demo/readme.md +148 -0
  221. package/components/select/dist/auro-select.d.ts +553 -0
  222. package/components/select/dist/index.d.ts +2 -0
  223. package/components/select/dist/index.js +8376 -0
  224. package/components/select/dist/registered.js +8376 -0
  225. package/components/select/dist/selectKeyboardStrategy.d.ts +11 -0
  226. package/components/select/dist/styles/emphasized/color-css.d.ts +2 -0
  227. package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
  228. package/components/select/dist/styles/style-css.d.ts +2 -0
  229. package/components/select/dist/styles/tokens-css.d.ts +2 -0
  230. package/custom-elements.json +18806 -0
  231. package/package.json +2 -2
@@ -0,0 +1,317 @@
1
+ /**
2
+ * The `auro-menu` element provides users a way to select from a list of options.
3
+ * @customElement auro-menu
4
+ *
5
+ * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
6
+ * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
7
+ * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
8
+ * @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
9
+ * @event {CustomEvent<{ values: HTMLElement[] }>} auroMenu-deselectPrevented - Notifies that deselection was prevented and includes the affected options in `detail.values`.
10
+ * @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
11
+ * @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
12
+ * @slot loadingText - Text to show while loading attribute is set
13
+ * @slot loadingIcon - Icon to show while loading attribute is set
14
+ * @slot - Slot for insertion of menu options.
15
+ */
16
+ export class AuroMenu extends AuroElement {
17
+ static get properties(): {
18
+ /**
19
+ * Allows deselecting an already selected option when clicked again in single-select mode.
20
+ */
21
+ allowDeselect: {
22
+ type: BooleanConstructor;
23
+ reflect: boolean;
24
+ };
25
+ /**
26
+ * When true, the entire menu and all options are disabled.
27
+ */
28
+ disabled: {
29
+ type: BooleanConstructor;
30
+ reflect: boolean;
31
+ };
32
+ /**
33
+ * Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
34
+ */
35
+ hasLoadingPlaceholder: {
36
+ type: BooleanConstructor;
37
+ };
38
+ /**
39
+ * @private
40
+ */
41
+ layout: {
42
+ type: StringConstructor;
43
+ };
44
+ /**
45
+ * Indent level for submenus.
46
+ * @private
47
+ */
48
+ level: {
49
+ type: NumberConstructor;
50
+ reflect: boolean;
51
+ attribute: boolean;
52
+ };
53
+ /**
54
+ * When true, displays a loading state using the loadingIcon and loadingText slots if provided.
55
+ */
56
+ loading: {
57
+ type: BooleanConstructor;
58
+ reflect: boolean;
59
+ };
60
+ /**
61
+ * Specifies a string used to highlight matched string parts in options.
62
+ */
63
+ matchWord: {
64
+ type: StringConstructor;
65
+ attribute: string;
66
+ };
67
+ /**
68
+ * When true, the selected option can be multiple options.
69
+ */
70
+ multiSelect: {
71
+ type: BooleanConstructor;
72
+ reflect: boolean;
73
+ attribute: string;
74
+ };
75
+ /**
76
+ * When true, selected option will not show the checkmark.
77
+ */
78
+ noCheckmark: {
79
+ type: BooleanConstructor;
80
+ reflect: boolean;
81
+ attribute: string;
82
+ };
83
+ /**
84
+ * Specifies the current active menuOption.
85
+ */
86
+ optionActive: {
87
+ type: ObjectConstructor;
88
+ attribute: string;
89
+ };
90
+ /**
91
+ * An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
92
+ */
93
+ optionSelected: {
94
+ type: ObjectConstructor;
95
+ };
96
+ options: {
97
+ type: ArrayConstructor;
98
+ reflect: boolean;
99
+ attribute: boolean;
100
+ };
101
+ /**
102
+ * Sets the size of the menu.
103
+ * @type {'sm' | 'md'}
104
+ * @default 'sm'
105
+ */
106
+ size: "sm" | "md";
107
+ /**
108
+ * When true, selects all options that match the provided value/key when setting value and multiselect is enabled.
109
+ */
110
+ selectAllMatchingOptions: {
111
+ type: BooleanConstructor;
112
+ reflect: boolean;
113
+ };
114
+ /**
115
+ * Sets the shape of the menu.
116
+ * @type {'box' | 'round'}
117
+ * @default 'box'
118
+ */
119
+ shape: "box" | "round";
120
+ /**
121
+ * The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.
122
+ */
123
+ value: {
124
+ type: StringConstructor;
125
+ reflect: boolean;
126
+ attribute: string;
127
+ };
128
+ };
129
+ static get styles(): import("lit").CSSResult[];
130
+ /**
131
+ * This will register this element with the browser.
132
+ * @param {string} [name="auro-menu"] - The name of the element that you want to register.
133
+ *
134
+ * @example
135
+ * AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
136
+ *
137
+ */
138
+ static register(name?: string): void;
139
+ /**
140
+ * @private
141
+ */
142
+ private shape;
143
+ /**
144
+ * @private
145
+ */
146
+ private size;
147
+ value: any;
148
+ optionSelected: any;
149
+ matchWord: any;
150
+ noCheckmark: boolean;
151
+ optionActive: any;
152
+ loading: boolean;
153
+ multiSelect: boolean;
154
+ allowDeselect: boolean;
155
+ selectAllMatchingOptions: boolean;
156
+ /**
157
+ * Handles slot change events.
158
+ * @private
159
+ */
160
+ private handleSlotChange;
161
+ /**
162
+ * @readonly
163
+ * @returns {string} - Returns the label of the currently selected option(s).
164
+ */
165
+ readonly get currentLabel(): string;
166
+ /**
167
+ * @readonly
168
+ * @returns {Array<HTMLElement>} - Returns the array of available menu options.
169
+ * @deprecated Use `options` property instead.
170
+ */
171
+ readonly get items(): Array<HTMLElement>;
172
+ /**
173
+ * @param {number} value - Sets the index of the currently active option.
174
+ */
175
+ set index(value: number);
176
+ /**
177
+ * @returns {number} - Returns the index of the currently active option.
178
+ */
179
+ get index(): number;
180
+ /**
181
+ * Formatted value based on `multiSelect` state.
182
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
183
+ * @private
184
+ * @returns {String|Array<String>}
185
+ */
186
+ private get formattedValue();
187
+ /**
188
+ * Gets the current property values for the menu service.
189
+ * @private
190
+ * @returns {Object}
191
+ */
192
+ private get propertyValues();
193
+ /**
194
+ * Provides the menu context to child components.
195
+ * Initializes the MenuService and subscribes to menu changes.
196
+ * @protected
197
+ */
198
+ protected provideContext(): void;
199
+ rootMenu: boolean;
200
+ menuService: any;
201
+ _contextProvider: any;
202
+ /**
203
+ * Updates the currently active option in the menu.
204
+ * @param {HTMLElement} option - The option to set as active.
205
+ */
206
+ updateActiveOption(option: HTMLElement): void;
207
+ /**
208
+ * Sets the internal value and manages update state.
209
+ * @param {String|Array<String>} value - The value to set.
210
+ * @protected
211
+ */
212
+ protected setInternalValue(value: string | Array<string>): void;
213
+ internalUpdateInProgress: boolean;
214
+ /**
215
+ * Handles changes from the menu service and updates component state.
216
+ * @param {Object} event - The event object from the menu service.
217
+ * @protected
218
+ */
219
+ protected handleMenuChange(event: any): void;
220
+ _index: any;
221
+ options: any;
222
+ /**
223
+ * Gets the currently selected options.
224
+ * @returns {Array<HTMLElement>}
225
+ */
226
+ get selectedOptions(): Array<HTMLElement>;
227
+ /**
228
+ * Gets the first selected option, or null if none.
229
+ * @returns {HTMLElement|null}
230
+ */
231
+ get selectedOption(): HTMLElement | null;
232
+ firstUpdated(): void;
233
+ loadingSlots: NodeListOf<Element>;
234
+ updated(changedProperties: any): void;
235
+ /**
236
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
237
+ * @param {string} tagName - The tag name to set as an attribute.
238
+ * @private
239
+ */
240
+ private setTagAttribute;
241
+ /**
242
+ * Sets the loading state and dispatches a loading change event.
243
+ * @param {boolean} isLoading - Whether the menu is loading.
244
+ * @protected
245
+ */
246
+ protected setLoadingState(isLoading: boolean): void;
247
+ /**
248
+ * Initializes the menu's state and structure.
249
+ * @private
250
+ */
251
+ private initializeMenu;
252
+ /**
253
+ * Selects the currently highlighted option.
254
+ * @protected
255
+ */
256
+ protected makeSelection(): void;
257
+ /**
258
+ * Resets all options to their default state.
259
+ * @private
260
+ */
261
+ private clearSelection;
262
+ /**
263
+ * Resets the menu to its initial state.
264
+ * This is the only way to return value to undefined.
265
+ * @public
266
+ */
267
+ public reset(): void;
268
+ /**
269
+ * Handles nested menu structure.
270
+ * @private
271
+ * @param {HTMLElement} menu - Root menu element.
272
+ */
273
+ private handleNestedMenus;
274
+ /**
275
+ * Navigates the menu options in the specified direction.
276
+ * @param {'up'|'down'} direction - The direction to navigate.
277
+ * @protected
278
+ */
279
+ protected navigateOptions(direction: "up" | "down"): void;
280
+ /**
281
+ * Handles custom events defined on options.
282
+ * @private
283
+ * @param {HTMLElement} option - Option with custom event.
284
+ */
285
+ private handleCustomEvent;
286
+ /**
287
+ * Notifies selection change to parent components.
288
+ * @param {any} source - The source that triggers this event.
289
+ * @private
290
+ */
291
+ private notifySelectionChange;
292
+ /**
293
+ * Checks if an option is currently selected.
294
+ * @private
295
+ * @param {HTMLElement} option - The option to check.
296
+ * @returns {boolean}
297
+ */
298
+ private isOptionSelected;
299
+ /**
300
+ * Getter for loading placeholder state.
301
+ * @returns {boolean} - True if loading slots are present and non-empty.
302
+ */
303
+ get hasLoadingPlaceholder(): boolean;
304
+ /**
305
+ * Getter for wrapper classes based on size.
306
+ * @returns {Object} - Class map for the wrapper element.
307
+ * @private
308
+ */
309
+ private get wrapperClasses();
310
+ /**
311
+ * Logic to determine the layout of the component.
312
+ * @protected
313
+ * @returns {void}
314
+ */
315
+ protected renderLayout(): void;
316
+ }
317
+ import { AuroElement } from "../../layoutElement/src/auroElement.js";
@@ -0,0 +1,210 @@
1
+ /**
2
+ * The `auro-menuoption` element provides users a way to define a menu option.
3
+ * @customElement auro-menuoption
4
+ *
5
+ * @slot default - The default slot for the menu option text.
6
+ *
7
+ * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
8
+ */
9
+ export class AuroMenuOption extends AuroElement {
10
+ /**
11
+ * This will register this element with the browser.
12
+ * @param {string} [name="auro-menuoption"] - The name of the element that you want to register.
13
+ *
14
+ * @example
15
+ * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
16
+ *
17
+ */
18
+ static register(name?: string): void;
19
+ static get properties(): {
20
+ /**
21
+ * When true, disables the menu option.
22
+ */
23
+ disabled: {
24
+ type: BooleanConstructor;
25
+ reflect: boolean;
26
+ };
27
+ /**
28
+ * @private
29
+ */
30
+ event: {
31
+ type: StringConstructor;
32
+ reflect: boolean;
33
+ };
34
+ /**
35
+ * @private
36
+ */
37
+ layout: {
38
+ type: StringConstructor;
39
+ };
40
+ /**
41
+ * Allows users to set a unique key for the menu option for specified option selection. If no key is provided, the value property will be used.
42
+ */
43
+ key: {
44
+ type: StringConstructor;
45
+ reflect: boolean;
46
+ };
47
+ /**
48
+ * @private
49
+ */
50
+ menuService: {
51
+ type: ObjectConstructor;
52
+ state: boolean;
53
+ };
54
+ /**
55
+ * @private
56
+ */
57
+ matchWord: {
58
+ type: StringConstructor;
59
+ state: boolean;
60
+ };
61
+ /**
62
+ * @private
63
+ */
64
+ noCheckmark: {
65
+ type: BooleanConstructor;
66
+ reflect: boolean;
67
+ };
68
+ /**
69
+ * Specifies that an option is selected.
70
+ */
71
+ selected: {
72
+ type: BooleanConstructor;
73
+ reflect: boolean;
74
+ };
75
+ /**
76
+ * Specifies the tab index of the menu option.
77
+ */
78
+ tabIndex: {
79
+ type: NumberConstructor;
80
+ reflect: boolean;
81
+ };
82
+ /**
83
+ * Specifies the value to be sent to a server.
84
+ */
85
+ value: {
86
+ type: StringConstructor;
87
+ reflect: boolean;
88
+ };
89
+ };
90
+ static get styles(): import("lit").CSSResult[];
91
+ /**
92
+ * Returns whether the menu option is currently active and selectable.
93
+ * An option is considered active if it is not hidden, not disabled, and not static.
94
+ * @returns {boolean} True if the option is active, false otherwise.
95
+ */
96
+ get isActive(): boolean;
97
+ /**
98
+ * @private
99
+ */
100
+ private shape;
101
+ /**
102
+ * @private
103
+ */
104
+ private size;
105
+ iconTag: any;
106
+ selected: boolean;
107
+ noCheckmark: boolean;
108
+ disabled: boolean;
109
+ /**
110
+ * @private
111
+ */
112
+ private runtimeUtils;
113
+ menuService: any;
114
+ unsubscribe: any;
115
+ /**
116
+ * Handles changes from the menu service and updates the option's state.
117
+ * This function synchronizes the option's properties and selection/highlight state with menu events.
118
+ * @param {Object} event - The event object from the menu service.
119
+ */
120
+ handleMenuChange(event: any): void;
121
+ _contextConsumer: ContextConsumer<import("@lit/context").Context<"menu-context", any>, this>;
122
+ key: any;
123
+ firstUpdated(): void;
124
+ updated(changedProperties: any): void;
125
+ /**
126
+ * Sets up event listeners for user interaction with the menu option.
127
+ * This function enables click and mouse enter events to trigger selection and highlighting logic.
128
+ */
129
+ bindEvents(): void;
130
+ /**
131
+ * Attaches this menu option to a menu service and subscribes to its events.
132
+ * This method enables the option to participate in menu selection and highlighting logic.
133
+ * @param {Object} service - The menu service instance to attach to.
134
+ */
135
+ attachTo(service: any): void;
136
+ active: boolean;
137
+ /**
138
+ * Updates the internal selected state of the menu option bypassing 'updated' and triggers custom events if selected.
139
+ * This function ensures the option's selection state is synchronized with menu logic and notifies listeners.
140
+ * @param {boolean} isSelected - Whether the option should be marked as selected.
141
+ */
142
+ setInternalSelected(isSelected: boolean): void;
143
+ internalUpdateInProgress: boolean;
144
+ /**
145
+ * Sets the selected state of the menu option.
146
+ * This function updates whether the option is currently selected.
147
+ * @param {boolean} isSelected - Whether the option should be marked as selected.
148
+ * @deprecated Simply modify the `selected` property directly instead.
149
+ */
150
+ setSelected(isSelected: boolean): void;
151
+ /**
152
+ * Updates the active state and visual highlighting of the menu option.
153
+ * This function toggles the option's active status and applies or removes the active CSS class.
154
+ * @param {boolean} isActive - Whether the option should be marked as active.
155
+ * @deprecated Simply modify the `active` property directly instead.
156
+ */
157
+ updateActive(isActive: boolean): void;
158
+ /**
159
+ * Updates the CSS class for the menu option based on its active state.
160
+ * This function adds or removes the 'active' class to visually indicate the option's active status.
161
+ * @private
162
+ */
163
+ private updateActiveClasses;
164
+ /**
165
+ * Updates the visual highlighting of text within the menu option based on the current match word.
166
+ * This function highlights matching text segments and manages nested spacers for display formatting.
167
+ * @private
168
+ */
169
+ private updateTextHighlight;
170
+ /**
171
+ * Handles click events on the menu option, toggling its selected state.
172
+ * This function dispatches a click event and updates selection if the option is not disabled.
173
+ * @private
174
+ */
175
+ private handleClick;
176
+ /**
177
+ * Handles mouse enter events to highlight the menu option.
178
+ * This function updates the menu service to set this option as the currently highlighted item if not disabled.
179
+ * @private
180
+ */
181
+ private handleMouseEnter;
182
+ /**
183
+ * Dispatches custom events defined for this menu option.
184
+ * This function notifies listeners when a custom event is triggered by the option.
185
+ * @private
186
+ */
187
+ private handleCustomEvent;
188
+ /**
189
+ * Dispatches a click event for this menu option.
190
+ * This function notifies listeners that the option has been clicked.
191
+ * @private
192
+ */
193
+ private dispatchClickEvent;
194
+ /**
195
+ * Generates an HTML element containing an SVG icon based on the provided `svgContent`.
196
+ *
197
+ * @private
198
+ * @param {string} svgContent - The SVG content to be embedded.
199
+ * @returns {Element} The HTML element containing the SVG icon.
200
+ */
201
+ private generateIconHtml;
202
+ /**
203
+ * Logic to determine the layout of the component.
204
+ * @protected
205
+ * @returns {void}
206
+ */
207
+ protected renderLayout(): void;
208
+ }
209
+ import { AuroElement } from "../../layoutElement/src/auroElement.js";
210
+ import { ContextConsumer } from '@lit/context';
@@ -0,0 +1,2 @@
1
+ declare const _default: "9.1.2";
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { AuroMenu } from './auro-menu.js';
2
+ import { AuroMenuOption } from './auro-menuoption.js';
3
+ export { AuroMenu, AuroMenuOption };
4
+ export { arrayConverter, isOptionInteractive, dispatchMenuEvent } from "./auro-menu-utils.js";