@aurodesignsystem/auro-formkit 2.0.0-beta.10 → 2.0.0-beta.11
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/.turbo/cache/0c8124a987c1cc05-meta.json +1 -1
- package/.turbo/cache/0cd512cdf86242c7-meta.json +1 -0
- package/.turbo/cache/{ff4dbfffc29255ab.tar.zst → 0cd512cdf86242c7.tar.zst} +0 -0
- package/.turbo/cache/123c83cd8727dff3-meta.json +1 -0
- package/.turbo/cache/123c83cd8727dff3.tar.zst +0 -0
- package/.turbo/cache/18129dba20f51b6b-meta.json +1 -1
- package/.turbo/cache/253e861af7025ed4-meta.json +1 -0
- package/.turbo/cache/253e861af7025ed4.tar.zst +0 -0
- package/.turbo/cache/2787020e69f50af2-meta.json +1 -1
- package/.turbo/cache/2a5295c8f561ed84-meta.json +1 -0
- package/.turbo/cache/2c0d681132c153dd-meta.json +1 -1
- package/.turbo/cache/4006a206400d5c7b-meta.json +1 -1
- package/.turbo/cache/492dda333b8d15f1-meta.json +1 -1
- package/.turbo/cache/4e3619d9dfc86809-meta.json +1 -0
- package/.turbo/cache/4e3619d9dfc86809.tar.zst +0 -0
- package/.turbo/cache/50993de942ec15a9-meta.json +1 -1
- package/.turbo/cache/50cd7dcfc9f820c5-meta.json +1 -0
- package/.turbo/cache/50cd7dcfc9f820c5.tar.zst +0 -0
- package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -1
- package/.turbo/cache/5a0d3e26da304c62-meta.json +1 -0
- package/.turbo/cache/5a0d3e26da304c62.tar.zst +0 -0
- package/.turbo/cache/5c960af698582835-meta.json +1 -0
- package/.turbo/cache/5c960af698582835.tar.zst +0 -0
- package/.turbo/cache/5dbbb71dffc3f542-meta.json +1 -0
- package/.turbo/cache/5dbbb71dffc3f542.tar.zst +0 -0
- package/.turbo/cache/6081837e8943b62e-meta.json +1 -1
- package/.turbo/cache/60ad74320c682a2b-meta.json +1 -1
- package/.turbo/cache/61e218aba69cff58-meta.json +1 -1
- package/.turbo/cache/77da375a012de9d0-meta.json +1 -1
- package/.turbo/cache/7964d1656e9e702a-meta.json +1 -0
- package/.turbo/cache/7964d1656e9e702a.tar.zst +0 -0
- package/.turbo/cache/7bf2b06a479d0b30-meta.json +1 -1
- package/.turbo/cache/7c9ca6163e61285c-meta.json +1 -1
- package/.turbo/cache/80aca269cd346fb4-meta.json +1 -0
- package/.turbo/cache/80aca269cd346fb4.tar.zst +0 -0
- package/.turbo/cache/8602fc2bb737a5cf-meta.json +1 -0
- package/.turbo/cache/89e0e7a6148e854f-meta.json +1 -0
- package/.turbo/cache/89e0e7a6148e854f.tar.zst +0 -0
- package/.turbo/cache/8bb856bd31b5b479-meta.json +1 -1
- package/.turbo/cache/93c887fb93a10daa-meta.json +1 -0
- package/.turbo/cache/93c887fb93a10daa.tar.zst +0 -0
- package/.turbo/cache/94dae2a64e9d8356-meta.json +1 -0
- package/.turbo/cache/97f6fe83b54acf09-meta.json +1 -0
- package/.turbo/cache/{080ca6155e637d5d.tar.zst → 97f6fe83b54acf09.tar.zst} +0 -0
- package/.turbo/cache/98317b0d14d94df7-meta.json +1 -0
- package/.turbo/cache/98317b0d14d94df7.tar.zst +0 -0
- package/.turbo/cache/9ae99e8e7bd83d06-meta.json +1 -1
- package/.turbo/cache/9cbcd13b1d031f63-meta.json +1 -0
- package/.turbo/cache/{8af27c076dc010c3.tar.zst → 9cbcd13b1d031f63.tar.zst} +0 -0
- package/.turbo/cache/afbbd49ed1a558b9-meta.json +1 -0
- package/.turbo/cache/b353ce8f6da43dea-meta.json +1 -0
- package/.turbo/cache/b5e6dc7fb9ae1a2f-meta.json +1 -1
- package/.turbo/cache/b6a202cc85cb61a0-meta.json +1 -1
- package/.turbo/cache/b8db059a9b9ccb5d-meta.json +1 -0
- package/.turbo/cache/bc24a38aa1b1a102-meta.json +1 -0
- package/.turbo/cache/be0b95293ea517cc-meta.json +1 -1
- package/.turbo/cache/c3a4f7a3565d6706-meta.json +1 -0
- package/.turbo/cache/c3a4f7a3565d6706.tar.zst +0 -0
- package/.turbo/cache/c44efc9e4ddd8a0e-meta.json +1 -1
- package/.turbo/cache/c6c6411199b68170-meta.json +1 -1
- package/.turbo/cache/c97b043e748e3580-meta.json +1 -0
- package/.turbo/cache/d5db503b2eaf239c-meta.json +1 -1
- package/.turbo/cache/d775555355d6b8fc-meta.json +1 -1
- package/.turbo/cache/d7c3007be148d2a1-meta.json +1 -1
- package/.turbo/cache/dad3d78b33edd9e4-meta.json +1 -1
- package/.turbo/cache/dc597b3ea4f61ec8-meta.json +1 -0
- package/.turbo/cache/dc597b3ea4f61ec8.tar.zst +0 -0
- package/.turbo/cache/df40b180126e5351-meta.json +1 -0
- package/.turbo/cache/df40b180126e5351.tar.zst +0 -0
- package/.turbo/cache/e5f217f77c32c93b-meta.json +1 -0
- package/.turbo/cache/{c2b51643f886a493.tar.zst → e5f217f77c32c93b.tar.zst} +0 -0
- package/.turbo/cache/e62cfee068e3ef36-meta.json +1 -1
- package/.turbo/cache/e9e36823f6c98f07-meta.json +1 -1
- package/.turbo/cache/ee1a3c1fe389da51-meta.json +1 -0
- package/.turbo/cache/f3c7b40f2c6a4094-meta.json +1 -0
- package/.turbo/cache/{b22ca87b2f7f9cc2.tar.zst → f3c7b40f2c6a4094.tar.zst} +0 -0
- package/.turbo/cache/f5958c3acb889631-meta.json +1 -0
- package/.turbo/cache/fb3809ac3f90e3b2-meta.json +1 -0
- package/.turbo/cache/{eb1dbe885532c1dc.tar.zst → fb3809ac3f90e3b2.tar.zst} +0 -0
- package/.turbo/cache/fd5ddfa43ebd8e5c-meta.json +1 -0
- package/.turbo/cache/fd5ddfa43ebd8e5c.tar.zst +0 -0
- package/CHANGELOG.md +13 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/README.md +1 -1
- package/components/combobox/.turbo/turbo-build.log +3 -3
- package/components/combobox/README.md +4 -4
- package/components/combobox/demo/api.md +9 -9
- package/components/combobox/demo/api.min.js +2508 -642
- package/components/combobox/demo/index.min.js +2505 -639
- package/components/combobox/dist/auro-combobox.d.ts +9 -4
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +1863 -312
- package/components/combobox/src/auro-combobox.js +70 -26
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/counter/README.md +1 -1
- package/components/datepicker/.turbo/turbo-build.log +3 -3
- package/components/datepicker/README.md +4 -4
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +2 -2
- package/components/dropdown/README.md +1 -1
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/form/README.md +1 -1
- package/components/input/.turbo/turbo-build.log +3 -3
- package/components/input/.turbo/turbo-bundler.log +3 -3
- package/components/input/README.md +1 -1
- package/components/menu/.turbo/turbo-build.log +4 -2
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.md +57 -20
- package/components/menu/demo/api.min.js +620 -305
- package/components/menu/demo/index.min.js +618 -303
- package/components/menu/dist/auro-menu-utils.d.ts +43 -0
- package/components/menu/dist/auro-menu-utils.d.ts.map +1 -0
- package/components/menu/dist/auro-menu.d.ts +97 -81
- package/components/menu/dist/auro-menu.d.ts.map +1 -1
- package/components/menu/dist/index.d.ts +1 -0
- package/components/menu/dist/index.js +619 -304
- package/components/menu/src/auro-menu-utils.js +131 -0
- package/components/menu/src/auro-menu.js +493 -303
- package/components/menu/src/index.js +7 -0
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/README.md +1 -1
- package/components/select/.turbo/turbo-build.log +5 -3
- package/components/select/README.md +3 -3
- package/components/select/demo/api.md +46 -11
- package/components/select/demo/api.min.js +2336 -485
- package/components/select/demo/index.min.js +2337 -486
- package/components/select/dist/auro-select.d.ts +17 -6
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +1706 -170
- package/components/select/src/auro-select.js +53 -24
- package/components/select/src/styles/style-css.js +1 -1
- package/components/select/src/styles/style.css +7 -0
- package/components/select/src/styles/style.scss +13 -0
- package/package.json +1 -1
- package/.turbo/cache/026e4d886ba97e63-meta.json +0 -1
- package/.turbo/cache/026e4d886ba97e63.tar.zst +0 -0
- package/.turbo/cache/080ca6155e637d5d-meta.json +0 -1
- package/.turbo/cache/0b115e30ff606299-meta.json +0 -1
- package/.turbo/cache/0b115e30ff606299.tar.zst +0 -0
- package/.turbo/cache/1c630fb3411e4a41-meta.json +0 -1
- package/.turbo/cache/24b19ac5895e5dd6-meta.json +0 -1
- package/.turbo/cache/24b19ac5895e5dd6.tar.zst +0 -0
- package/.turbo/cache/29b72c73cbccb53d-meta.json +0 -1
- package/.turbo/cache/29b72c73cbccb53d.tar.zst +0 -0
- package/.turbo/cache/3e647c5863d32e6f-meta.json +0 -1
- package/.turbo/cache/3e647c5863d32e6f.tar.zst +0 -0
- package/.turbo/cache/43f5206cc4e69b44-meta.json +0 -1
- package/.turbo/cache/4a85ec226b585fd5-meta.json +0 -1
- package/.turbo/cache/50a29c70b93c57dd-meta.json +0 -1
- package/.turbo/cache/50a29c70b93c57dd.tar.zst +0 -0
- package/.turbo/cache/56455145cd768755-meta.json +0 -1
- package/.turbo/cache/56455145cd768755.tar.zst +0 -0
- package/.turbo/cache/5c06332cf9f132da-meta.json +0 -1
- package/.turbo/cache/5e613afc6868d0e2-meta.json +0 -1
- package/.turbo/cache/5e613afc6868d0e2.tar.zst +0 -0
- package/.turbo/cache/639dac15b979bedc-meta.json +0 -1
- package/.turbo/cache/664c2e08614fd212-meta.json +0 -1
- package/.turbo/cache/6c51b0ebfc086faa-meta.json +0 -1
- package/.turbo/cache/6c51b0ebfc086faa.tar.zst +0 -0
- package/.turbo/cache/7216d994164825fb-meta.json +0 -1
- package/.turbo/cache/7216d994164825fb.tar.zst +0 -0
- package/.turbo/cache/83a167e135cb431a-meta.json +0 -1
- package/.turbo/cache/83a167e135cb431a.tar.zst +0 -0
- package/.turbo/cache/8af27c076dc010c3-meta.json +0 -1
- package/.turbo/cache/953c8216249d3509-meta.json +0 -1
- package/.turbo/cache/95a5e76ffd8c5110-meta.json +0 -1
- package/.turbo/cache/95a5e76ffd8c5110.tar.zst +0 -0
- package/.turbo/cache/a8b0fa0a9aa707c5-meta.json +0 -1
- package/.turbo/cache/a8b0fa0a9aa707c5.tar.zst +0 -0
- package/.turbo/cache/b22ca87b2f7f9cc2-meta.json +0 -1
- package/.turbo/cache/b7bbe2e7d44b77f0-meta.json +0 -1
- package/.turbo/cache/b7bbe2e7d44b77f0.tar.zst +0 -0
- package/.turbo/cache/c2b51643f886a493-meta.json +0 -1
- package/.turbo/cache/c74d369a0475b124-meta.json +0 -1
- package/.turbo/cache/c7f5a276ddb73cf7-meta.json +0 -1
- package/.turbo/cache/c96933d40404e4c8-meta.json +0 -1
- package/.turbo/cache/c96933d40404e4c8.tar.zst +0 -0
- package/.turbo/cache/eb1dbe885532c1dc-meta.json +0 -1
- package/.turbo/cache/f1f6744948f1b18f-meta.json +0 -1
- package/.turbo/cache/f1f6744948f1b18f.tar.zst +0 -0
- package/.turbo/cache/feefbc25d550c1cd-meta.json +0 -1
- package/.turbo/cache/ff4dbfffc29255ab-meta.json +0 -1
- /package/.turbo/cache/{639dac15b979bedc.tar.zst → 2a5295c8f561ed84.tar.zst} +0 -0
- /package/.turbo/cache/{1c630fb3411e4a41.tar.zst → 8602fc2bb737a5cf.tar.zst} +0 -0
- /package/.turbo/cache/{664c2e08614fd212.tar.zst → 94dae2a64e9d8356.tar.zst} +0 -0
- /package/.turbo/cache/{c7f5a276ddb73cf7.tar.zst → afbbd49ed1a558b9.tar.zst} +0 -0
- /package/.turbo/cache/{43f5206cc4e69b44.tar.zst → b353ce8f6da43dea.tar.zst} +0 -0
- /package/.turbo/cache/{c74d369a0475b124.tar.zst → b8db059a9b9ccb5d.tar.zst} +0 -0
- /package/.turbo/cache/{4a85ec226b585fd5.tar.zst → bc24a38aa1b1a102.tar.zst} +0 -0
- /package/.turbo/cache/{5c06332cf9f132da.tar.zst → c97b043e748e3580.tar.zst} +0 -0
- /package/.turbo/cache/{953c8216249d3509.tar.zst → ee1a3c1fe389da51.tar.zst} +0 -0
- /package/.turbo/cache/{feefbc25d550c1cd.tar.zst → f5958c3acb889631.tar.zst} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts value to an array.
|
|
3
|
+
* If the value is a JSON string representing an array, it will be parsed.
|
|
4
|
+
* If the value is already an array, it is returned.
|
|
5
|
+
* If the value is undefined, it returns undefined.
|
|
6
|
+
* @private
|
|
7
|
+
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
8
|
+
* @returns {Array|undefined} - The converted array or undefined.
|
|
9
|
+
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
10
|
+
* or if the value cannot be parsed into an array from a JSON string.
|
|
11
|
+
*/
|
|
12
|
+
export function arrayConverter(value: any): any[] | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Compare two arrays for equality.
|
|
15
|
+
* @private
|
|
16
|
+
* @param {Array} arr1 - First array to compare.
|
|
17
|
+
* @param {Array} arr2 - Second array to compare.
|
|
18
|
+
* @returns {boolean} True if arrays are equal.
|
|
19
|
+
*/
|
|
20
|
+
export function arraysAreEqual(arr1: any[], arr2: any[]): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Compares array for changes.
|
|
23
|
+
* @private
|
|
24
|
+
* @param {Array|any} newVal - New value to compare.
|
|
25
|
+
* @param {Array|any} oldVal - Old value to compare.
|
|
26
|
+
* @returns {boolean} True if arrays have changed.
|
|
27
|
+
*/
|
|
28
|
+
export function arrayOrUndefinedHasChanged(newVal: any[] | any, oldVal: any[] | any): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Validates if an option can be interacted with.
|
|
31
|
+
* @private
|
|
32
|
+
* @param {HTMLElement} option - The option to check.
|
|
33
|
+
* @returns {boolean} True if option is interactive.
|
|
34
|
+
*/
|
|
35
|
+
export function isOptionInteractive(option: HTMLElement): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Helper method to dispatch custom events.
|
|
38
|
+
* @param {HTMLElement} element - Element to dispatch event from.
|
|
39
|
+
* @param {string} eventName - Name of the event to dispatch.
|
|
40
|
+
* @param {Object} [detail] - Optional detail object to include with the event.
|
|
41
|
+
*/
|
|
42
|
+
export function dispatchMenuEvent(element: HTMLElement, eventName: string, detail?: any): void;
|
|
43
|
+
//# sourceMappingURL=auro-menu-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auro-menu-utils.d.ts","sourceRoot":"","sources":["../src/auro-menu-utils.js"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,sCALW,GAAG,GACD,QAAM,SAAS,CA+B3B;AAED;;;;;;GAMG;AACH,0DAFa,OAAO,CAoBnB;AAED;;;;;;GAMG;AACH,mDAJW,QAAM,GAAG,UACT,QAAM,GAAG,GACP,OAAO,CAqBnB;AAED;;;;;GAKG;AACH,4CAHW,WAAW,GACT,OAAO,CAMnB;AAED;;;;;GAKG;AACH,2CAJW,WAAW,aACX,MAAM,sBAehB"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The auro-menu element provides users a way to select from a list of options.
|
|
3
|
-
* @attr {
|
|
4
|
-
* @attr {
|
|
5
|
-
* @attr {
|
|
6
|
-
* @attr {
|
|
7
|
-
* @attr {
|
|
8
|
-
* @attr {
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @event auroMenu-
|
|
13
|
-
* @event auroMenu-
|
|
14
|
-
* @event auroMenu-
|
|
15
|
-
* @event auroMenu-
|
|
3
|
+
* @attr {Array<HTMLElement>|undefined} optionselected - An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected.
|
|
4
|
+
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
5
|
+
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
6
|
+
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|
|
7
|
+
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
8
|
+
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
9
|
+
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
10
|
+
* @attr {Array<string>|undefined} value - Value selected for the menu. `undefined` when no selection has been made, otherwise an array of strings. In single-select mode, the array will contain only one value.
|
|
11
|
+
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
12
|
+
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
13
|
+
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
14
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
15
|
+
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
|
|
16
|
+
* @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
17
|
+
* @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
16
18
|
* @slot loadingText - Text to show while loading attribute is set
|
|
17
19
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
18
20
|
* @slot - Slot for insertion of menu options.
|
|
@@ -22,6 +24,7 @@ export class AuroMenu extends LitElement {
|
|
|
22
24
|
noCheckmark: {
|
|
23
25
|
type: BooleanConstructor;
|
|
24
26
|
reflect: boolean;
|
|
27
|
+
attribute: string;
|
|
25
28
|
};
|
|
26
29
|
disabled: {
|
|
27
30
|
type: BooleanConstructor;
|
|
@@ -32,16 +35,26 @@ export class AuroMenu extends LitElement {
|
|
|
32
35
|
reflect: boolean;
|
|
33
36
|
};
|
|
34
37
|
optionSelected: {
|
|
35
|
-
|
|
38
|
+
converter: typeof arrayConverter;
|
|
39
|
+
hasChanged: typeof arrayOrUndefinedHasChanged;
|
|
36
40
|
};
|
|
37
41
|
optionActive: {
|
|
38
42
|
type: ObjectConstructor;
|
|
43
|
+
attribute: string;
|
|
39
44
|
};
|
|
40
45
|
matchWord: {
|
|
41
46
|
type: StringConstructor;
|
|
47
|
+
attribute: string;
|
|
48
|
+
};
|
|
49
|
+
multiSelect: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
reflect: boolean;
|
|
52
|
+
attribute: string;
|
|
42
53
|
};
|
|
43
54
|
value: {
|
|
44
|
-
type:
|
|
55
|
+
type: ObjectConstructor;
|
|
56
|
+
converter: typeof arrayConverter;
|
|
57
|
+
hasChanged: typeof arrayOrUndefinedHasChanged;
|
|
45
58
|
};
|
|
46
59
|
};
|
|
47
60
|
static get styles(): import("lit").CSSResult[];
|
|
@@ -60,131 +73,134 @@ export class AuroMenu extends LitElement {
|
|
|
60
73
|
noCheckmark: boolean;
|
|
61
74
|
optionActive: Element;
|
|
62
75
|
loading: boolean;
|
|
76
|
+
multiSelect: boolean;
|
|
63
77
|
/**
|
|
78
|
+
* Handles keyboard navigation.
|
|
64
79
|
* @private
|
|
80
|
+
* @param {KeyboardEvent} event - Event object from the browser.
|
|
65
81
|
*/
|
|
66
|
-
private
|
|
82
|
+
private handleKeyDown;
|
|
67
83
|
/**
|
|
84
|
+
* Handles option selection via mouse.
|
|
68
85
|
* @private
|
|
86
|
+
* @param {MouseEvent} event - Event object from the browser.
|
|
69
87
|
*/
|
|
70
|
-
private
|
|
88
|
+
private handleMouseSelect;
|
|
71
89
|
/**
|
|
90
|
+
* Handles option hover events.
|
|
72
91
|
* @private
|
|
92
|
+
* @param {CustomEvent} event - Event object from the browser.
|
|
73
93
|
*/
|
|
74
|
-
private
|
|
94
|
+
private handleOptionHover;
|
|
75
95
|
/**
|
|
96
|
+
* Handles slot change events.
|
|
76
97
|
* @private
|
|
77
98
|
*/
|
|
78
|
-
private
|
|
99
|
+
private handleSlotChange;
|
|
100
|
+
firstUpdated(): void;
|
|
101
|
+
loadingSlots: NodeListOf<Element>;
|
|
102
|
+
updated(changedProperties: any): void;
|
|
103
|
+
index: any;
|
|
79
104
|
/**
|
|
80
|
-
*
|
|
105
|
+
* Updates the UI state and appearance of menu items based on changed properties.
|
|
81
106
|
* @private
|
|
82
|
-
* @
|
|
107
|
+
* @param {Map<string, boolean>} changedProperties - LitElement's changed properties map.
|
|
83
108
|
*/
|
|
84
|
-
private
|
|
85
|
-
firstUpdated(): void;
|
|
86
|
-
updated(changedProperties: any): void;
|
|
109
|
+
private updateItemsState;
|
|
87
110
|
/**
|
|
111
|
+
* Initializes the menu's state and structure.
|
|
88
112
|
* @private
|
|
89
|
-
* @param {Object} option - The menuoption to check for interactive state.
|
|
90
|
-
* @returns {Boolean} Returns true if the option is interactive.
|
|
91
113
|
*/
|
|
92
|
-
private
|
|
114
|
+
private initializeMenu;
|
|
93
115
|
/**
|
|
116
|
+
* Initializes menu items and their attributes.
|
|
94
117
|
* @private
|
|
95
|
-
* @returns {void} When called will update the DOM with visible suggest text matches.
|
|
96
118
|
*/
|
|
97
|
-
private
|
|
119
|
+
private initItems;
|
|
120
|
+
items: Element[];
|
|
98
121
|
/**
|
|
99
|
-
*
|
|
122
|
+
* Updates menu state when an option is selected.
|
|
123
|
+
* @private
|
|
124
|
+
* @param {HTMLElement} option - The option element to select.
|
|
100
125
|
*/
|
|
101
|
-
|
|
126
|
+
private handleSelectState;
|
|
102
127
|
/**
|
|
103
|
-
*
|
|
104
|
-
* @param {Object} option - The menuoption to be selected.
|
|
128
|
+
* Deselects a menu option and updates related state.
|
|
105
129
|
* @private
|
|
130
|
+
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
106
131
|
*/
|
|
107
|
-
private
|
|
108
|
-
index: number;
|
|
132
|
+
private handleDeselectState;
|
|
109
133
|
/**
|
|
110
|
-
*
|
|
134
|
+
* Resets all options to their default state.
|
|
111
135
|
* @private
|
|
112
|
-
* @return {void}
|
|
113
136
|
*/
|
|
114
|
-
private
|
|
137
|
+
private clearSelection;
|
|
115
138
|
/**
|
|
116
|
-
*
|
|
139
|
+
* Resets the menu to its initial state.
|
|
140
|
+
* This is the only way to return value to undefined.
|
|
141
|
+
* @public
|
|
117
142
|
*/
|
|
118
|
-
|
|
143
|
+
public reset(): void;
|
|
119
144
|
/**
|
|
120
|
-
*
|
|
145
|
+
* Handles nested menu structure.
|
|
121
146
|
* @private
|
|
122
|
-
* @param {
|
|
147
|
+
* @param {HTMLElement} menu - Root menu element.
|
|
123
148
|
*/
|
|
124
|
-
private
|
|
149
|
+
private handleNestedMenus;
|
|
125
150
|
/**
|
|
126
|
-
*
|
|
151
|
+
* Makes a selection based on the current index or clicked option.
|
|
127
152
|
* @private
|
|
128
153
|
*/
|
|
129
|
-
private
|
|
130
|
-
items: Element[];
|
|
154
|
+
private makeSelection;
|
|
131
155
|
/**
|
|
132
|
-
*
|
|
156
|
+
* Toggle the selection state of the menuoption.
|
|
133
157
|
* @private
|
|
158
|
+
* @param {HTMLElement} option - The menuoption to toggle.
|
|
134
159
|
*/
|
|
135
|
-
private
|
|
160
|
+
private toggleOption;
|
|
161
|
+
rootMenu: boolean;
|
|
136
162
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* The event.target is not used as the function needs to know where to go,
|
|
142
|
-
* versus knowing where it is.
|
|
143
|
-
* @param {String} moveDirection - Up or Down based on keyboard event.
|
|
163
|
+
* Navigates through options using keyboard.
|
|
164
|
+
* @private
|
|
165
|
+
* @param {string} direction - 'up' or 'down'.
|
|
144
166
|
*/
|
|
145
|
-
|
|
167
|
+
private navigateOptions;
|
|
146
168
|
/**
|
|
147
|
-
*
|
|
169
|
+
* Updates the active option state and dispatches events.
|
|
148
170
|
* @private
|
|
149
|
-
* @param {
|
|
171
|
+
* @param {number} index - Index of the option to make active.
|
|
150
172
|
*/
|
|
151
|
-
private
|
|
173
|
+
private updateActiveOption;
|
|
152
174
|
/**
|
|
153
|
-
*
|
|
175
|
+
* Handles custom events defined on options.
|
|
154
176
|
* @private
|
|
155
|
-
* @param {
|
|
177
|
+
* @param {HTMLElement} option - Option with custom event.
|
|
156
178
|
*/
|
|
157
|
-
private
|
|
179
|
+
private handleCustomEvent;
|
|
158
180
|
/**
|
|
159
|
-
*
|
|
160
|
-
* @param {Number} index - Index of the menuoption that will be made active.
|
|
181
|
+
* Notifies selection change to parent components.
|
|
161
182
|
* @private
|
|
162
183
|
*/
|
|
163
|
-
private
|
|
184
|
+
private notifySelectionChange;
|
|
164
185
|
/**
|
|
165
|
-
*
|
|
166
|
-
* @param {Event} evt - Mousedown event.
|
|
186
|
+
* Checks if an option is currently selected.
|
|
167
187
|
* @private
|
|
188
|
+
* @param {HTMLElement} option - The option to check.
|
|
189
|
+
* @returns {boolean}
|
|
168
190
|
*/
|
|
169
|
-
private
|
|
191
|
+
private isOptionSelected;
|
|
170
192
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* This getter evaluates the `loadingSlots` collection to determine if it contains any items.
|
|
174
|
-
* If the size of the collection is greater than zero, it indicates the presence of loading
|
|
175
|
-
* placeholders, returning true; otherwise, it returns false.
|
|
176
|
-
*
|
|
177
|
-
* @getter hasLoadingPlaceholder
|
|
178
|
-
* @type {boolean}
|
|
179
|
-
* @returns {boolean} Returns true if loading placeholders exist; false otherwise.
|
|
193
|
+
* Getter for loading placeholder state.
|
|
194
|
+
* @returns {boolean} - True if loading slots are present and non-empty.
|
|
180
195
|
*/
|
|
181
196
|
get hasLoadingPlaceholder(): boolean;
|
|
182
197
|
/**
|
|
183
|
-
*
|
|
184
|
-
* @
|
|
198
|
+
* Renders the component.
|
|
199
|
+
* @returns {boolean} - True if loading slots are present and non-empty.
|
|
185
200
|
*/
|
|
186
|
-
|
|
187
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
201
|
+
render(): boolean;
|
|
188
202
|
}
|
|
189
203
|
import { LitElement } from "lit";
|
|
204
|
+
import { arrayConverter } from './auro-menu-utils.js';
|
|
205
|
+
import { arrayOrUndefinedHasChanged } from './auro-menu-utils.js';
|
|
190
206
|
//# sourceMappingURL=auro-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auro-menu.d.ts","sourceRoot":"","sources":["../src/auro-menu.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auro-menu.d.ts","sourceRoot":"","sources":["../src/auro-menu.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH;IA8DE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwCC;IAED,+CAMC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IAnHC,WAAsB;IAEtB,oBAA+B;IAE/B,eAA0B;IAE1B,qBAAwB;IAExB,sBAA6B;IAE7B,iBAAoB;IAEpB,qBAAwB;IA8Z1B;;;;OAIG;IACH,sBAeC;IAsDD;;;;OAIG;IACH,0BAUC;IAED;;;;OAIG;IACH,0BAIC;IAED;;;OAGG;IACH,yBAeC;IA1ZD,qBAKC;IAFC,kCAAuF;IAIzF,sCA+CC;IAzCK,WAAe;IA2CrB;;;;OAIG;IACH,yBAgEC;IAID;;;OAGG;IACH,uBAOC;IAED;;;OAGG;IACH,kBAUC;IATC,iBAAoF;IAatF;;;;OAIG;IACH,0BAwBC;IAED;;;;OAIG;IACH,4BAiCC;IAED;;;OAGG;IACH,uBAGC;IAED;;;;OAIG;IACH,qBAgBC;IAED;;;;OAIG;IACH,0BAiBC;IA0BD;;;OAGG;IACH,sBA6BC;IAED;;;;OAIG;IACH,qBAUC;IAoCG,kBAAqB;IAezB;;;;OAIG;IACH,wBA2CC;IAED;;;;OAIG;IACH,2BAUC;IAED;;;;OAIG;IACH,0BAIC;IAED;;;OAGG;IACH,8BAEC;IAED;;;;;OAKG;IACH,yBAMC;IAED;;;OAGG;IACH,6BAFa,OAAO,CAInB;IAED;;;OAGG;IACH,UAFa,OAAO,CAenB;CACF;2BAltBgC,KAAK;+BAY/B,sBAAsB;2CAAtB,sBAAsB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AuroMenu } from './auro-menu.js';
|
|
2
2
|
import { AuroMenuOption } from './auro-menuoption.js';
|
|
3
3
|
export { AuroMenu, AuroMenuOption };
|
|
4
|
+
export { arrayConverter, arrayOrUndefinedHasChanged, isOptionInteractive, dispatchMenuEvent } from "./auro-menu-utils.js";
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|