@zanichelli/zanichelli-it-frontend-kit 0.1.1 → 0.1.3
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/dist/types/components/menubar/menu/menu.d.ts +2 -2
- package/dist/types/components/menubar/menubar.d.ts +12 -1
- package/dist/types/components/menubar/mobile-menubar/mobile-menubar.d.ts +4 -3
- package/dist/types/components.d.ts +18 -8
- package/dist/zanichelli-it-frontend-kit/index-BQ_orCyU.js +4170 -0
- package/dist/zanichelli-it-frontend-kit/index-BQ_orCyU.js.map +1 -0
- package/dist/zanichelli-it-frontend-kit/index.esm.js +10 -0
- package/dist/zanichelli-it-frontend-kit/index.esm.js.map +1 -1
- package/dist/zanichelli-it-frontend-kit/menu-Cd2leC2L.js +46 -0
- package/dist/zanichelli-it-frontend-kit/menu-Cd2leC2L.js.map +1 -0
- package/dist/{collection/utils/utils.js → zanichelli-it-frontend-kit/utils-CaxAWyZI.js} +7 -3
- package/dist/zanichelli-it-frontend-kit/utils-CaxAWyZI.js.map +1 -0
- package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.css +993 -1
- package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js +49 -1
- package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js.map +1 -1
- package/dist/zanichelli-it-frontend-kit/zanit-menubar.entry.esm.js.map +1 -0
- package/dist/{components/zanit-menubar.js → zanichelli-it-frontend-kit/zanit-menubar.entry.js} +54 -60
- package/dist/zanichelli-it-frontend-kit/zanit-menubar.entry.js.map +1 -0
- package/dist/zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.esm.js.map +1 -0
- package/dist/{components/p-BBoCOJu1.js → zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.js} +31 -96
- package/dist/zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.js.map +1 -0
- package/dist/zanichelli-it-frontend-kit/zanit-search-form.entry.esm.js.map +1 -0
- package/dist/{components/p-DxgXtXGD.js → zanichelli-it-frontend-kit/zanit-search-form.entry.js} +15 -55
- package/dist/zanichelli-it-frontend-kit/zanit-search-form.entry.js.map +1 -0
- package/package.json +1 -1
- package/www/build/index-BQ_orCyU.js +4170 -0
- package/www/build/index-BQ_orCyU.js.map +1 -0
- package/www/build/index.esm.js +10 -0
- package/www/build/index.esm.js.map +1 -1
- package/www/build/menu-Cd2leC2L.js +46 -0
- package/www/build/menu-Cd2leC2L.js.map +1 -0
- package/www/build/utils-CaxAWyZI.js +21 -0
- package/www/build/utils-CaxAWyZI.js.map +1 -0
- package/www/build/zanichelli-it-frontend-kit.css +993 -1
- package/www/build/zanichelli-it-frontend-kit.esm.js +49 -1
- package/www/build/zanichelli-it-frontend-kit.esm.js.map +1 -1
- package/www/build/zanit-menubar.entry.esm.js.map +1 -0
- package/{dist/collection/components/menubar/menubar.js → www/build/zanit-menubar.entry.js} +64 -146
- package/www/build/zanit-menubar.entry.js.map +1 -0
- package/www/build/zanit-mobile-menubar.entry.esm.js.map +1 -0
- package/www/build/zanit-mobile-menubar.entry.js +159 -0
- package/www/build/zanit-mobile-menubar.entry.js.map +1 -0
- package/www/build/zanit-search-form.entry.esm.js.map +1 -0
- package/www/build/zanit-search-form.entry.js +95 -0
- package/www/build/zanit-search-form.entry.js.map +1 -0
- package/www/index.html +185 -37
- package/dist/cjs/index-xkrZykI_.js +0 -1532
- package/dist/cjs/index-xkrZykI_.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -5
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -15
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/zanichelli-it-frontend-kit.cjs.js +0 -27
- package/dist/cjs/zanichelli-it-frontend-kit.cjs.js.map +0 -1
- package/dist/cjs/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.cjs.js.map +0 -1
- package/dist/cjs/zanit-menubar_3.cjs.entry.js +0 -631
- package/dist/cjs/zanit-menubar_3.cjs.entry.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -14
- package/dist/collection/components/menubar/menu/menu.css +0 -98
- package/dist/collection/components/menubar/menu/menu.js +0 -34
- package/dist/collection/components/menubar/menu/menu.js.map +0 -1
- package/dist/collection/components/menubar/menubar.css +0 -156
- package/dist/collection/components/menubar/menubar.js.map +0 -1
- package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.css +0 -114
- package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js +0 -280
- package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js.map +0 -1
- package/dist/collection/components/menubar/search-form/search-form.css +0 -143
- package/dist/collection/components/menubar/search-form/search-form.js +0 -173
- package/dist/collection/components/menubar/search-form/search-form.js.map +0 -1
- package/dist/collection/index.js +0 -11
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/types.js +0 -2
- package/dist/collection/utils/types.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/index.js +0 -1290
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-BBoCOJu1.js.map +0 -1
- package/dist/components/p-DxgXtXGD.js.map +0 -1
- package/dist/components/zanit-menubar.js.map +0 -1
- package/dist/components/zanit-mobile-menubar.js +0 -9
- package/dist/components/zanit-mobile-menubar.js.map +0 -1
- package/dist/components/zanit-search-form.js +0 -9
- package/dist/components/zanit-search-form.js.map +0 -1
- package/dist/esm/index-BWVQ0LD4.js +0 -1504
- package/dist/esm/index-BWVQ0LD4.js.map +0 -1
- package/dist/esm/index.js +0 -4
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -13
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/zanichelli-it-frontend-kit.js +0 -23
- package/dist/esm/zanichelli-it-frontend-kit.js.map +0 -1
- package/dist/esm/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.js.map +0 -1
- package/dist/esm/zanit-menubar_3.entry.js +0 -627
- package/dist/esm/zanit-menubar_3.entry.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/zanichelli-it-frontend-kit/p-BWVQ0LD4.js +0 -3
- package/dist/zanichelli-it-frontend-kit/p-BWVQ0LD4.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/p-e396bda1.entry.js +0 -2
- package/dist/zanichelli-it-frontend-kit/p-e396bda1.entry.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
- package/www/build/p-810fffc3.js +0 -2
- package/www/build/p-984b8fa6.css +0 -1
- package/www/build/p-BWVQ0LD4.js +0 -3
- package/www/build/p-BWVQ0LD4.js.map +0 -1
- package/www/build/p-e396bda1.entry.js +0 -2
- package/www/build/p-e396bda1.entry.js.map +0 -1
- package/www/build/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
|
@@ -4,13 +4,13 @@ import { MenuItem } from '../../../utils/types';
|
|
|
4
4
|
* Menu of items that can be grouped.
|
|
5
5
|
* @member {string} controlledBy - The HTML id of the element that controls the menu.
|
|
6
6
|
* @member {MenuItem[]} items - The items to show in the menu.
|
|
7
|
-
* @member {string}
|
|
7
|
+
* @member {string[]} currentPath - Path of current item.
|
|
8
8
|
* @member {function} onItemKeyDown - The function to call when a key is pressed from a menuitem.
|
|
9
9
|
*/
|
|
10
10
|
export interface MenuProps {
|
|
11
11
|
controlledBy?: string;
|
|
12
12
|
items?: MenuItem[];
|
|
13
|
-
|
|
13
|
+
currentPath?: string[];
|
|
14
14
|
onItemKeyDown?: (event: KeyboardEvent) => void;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
@@ -12,22 +12,33 @@ export declare class ZanitMenubar {
|
|
|
12
12
|
openMenu: string | undefined;
|
|
13
13
|
/** ID of the item to show the subitems navbar for. */
|
|
14
14
|
openNavbar: string | undefined;
|
|
15
|
+
/** IDs of the current prop */
|
|
16
|
+
currentPath: string[];
|
|
15
17
|
isMobile: boolean;
|
|
16
18
|
loading: boolean;
|
|
17
19
|
/** The data to build the menu (as an array of `MenubarItem` or a JSON array) or the url to fetch to retrieve it. */
|
|
18
20
|
data: Promise<MenubarItem[]> | MenubarItem[] | URL | string;
|
|
19
|
-
/**
|
|
21
|
+
/** Path of the current item. */
|
|
20
22
|
current: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Delay in milliseconds before closing the menu after a mouseout event.
|
|
25
|
+
* Useful to avoid immediate closing when the pointer briefly leaves the component.
|
|
26
|
+
*/
|
|
27
|
+
mouseOutTimeout: number | undefined;
|
|
21
28
|
/** Initial search query. */
|
|
22
29
|
searchQuery: string | undefined;
|
|
30
|
+
private timerId;
|
|
23
31
|
/** Setup the list of items. */
|
|
24
32
|
parseData(data: typeof this.data): Promise<void>;
|
|
25
33
|
onItemsChange(): void;
|
|
34
|
+
onCurrentChange(): void;
|
|
26
35
|
connectedCallback(): Promise<void>;
|
|
27
36
|
/** Close any open menu when clicking outside. */
|
|
28
37
|
handleOutsideClick(event: MouseEvent): void;
|
|
29
38
|
/** Close any open menu when pressing Escape or Tab. */
|
|
30
39
|
handleKeydown(event: KeyboardEvent): void;
|
|
40
|
+
handleMouseover(): void;
|
|
41
|
+
handleMouseout(event: MouseEvent): void;
|
|
31
42
|
/** Close the menu when it loses focus. */
|
|
32
43
|
handleFocusout(event: FocusEvent): void;
|
|
33
44
|
/** Fetch data from passed URL. */
|
|
@@ -2,14 +2,16 @@ import { MenubarItem, MenuItem } from '../../../utils/types';
|
|
|
2
2
|
/** Mobile menubar component. */
|
|
3
3
|
export declare class ZanitMobileMenubar {
|
|
4
4
|
host: HTMLZanitMobileMenubarElement;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/** IDs path of the current item. */
|
|
6
|
+
currentPath: string[];
|
|
7
7
|
/** Menubar items. */
|
|
8
8
|
items: MenubarItem[];
|
|
9
9
|
/** Initial search query. */
|
|
10
10
|
searchQuery: string | undefined;
|
|
11
11
|
/** Whether the menubar is loading the data. */
|
|
12
12
|
loading: boolean;
|
|
13
|
+
/** Last active item ID. */
|
|
14
|
+
lastCurrent: string | undefined;
|
|
13
15
|
parentItem: MenubarItem | undefined;
|
|
14
16
|
menuItems: MenubarItem[] | MenuItem[] | undefined;
|
|
15
17
|
/** Whether the items to render come from a menubar or a menu. */
|
|
@@ -18,7 +20,6 @@ export declare class ZanitMobileMenubar {
|
|
|
18
20
|
onItemsChange(): void;
|
|
19
21
|
/**
|
|
20
22
|
* Find the current item and take its parent, `menuItems` or the `navbarItems`.
|
|
21
|
-
* @returns True if an item matches the `current` prop, false otherwise.
|
|
22
23
|
*/
|
|
23
24
|
private setupData;
|
|
24
25
|
private get menuItemsElement();
|
|
@@ -15,7 +15,7 @@ export namespace Components {
|
|
|
15
15
|
*/
|
|
16
16
|
interface ZanitMenubar {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Path of the current item.
|
|
19
19
|
* @default undefined
|
|
20
20
|
*/
|
|
21
21
|
"current": string | undefined;
|
|
@@ -23,6 +23,11 @@ export namespace Components {
|
|
|
23
23
|
* The data to build the menu (as an array of `MenubarItem` or a JSON array) or the url to fetch to retrieve it.
|
|
24
24
|
*/
|
|
25
25
|
"data": Promise<MenubarItem[]> | MenubarItem[] | URL | string;
|
|
26
|
+
/**
|
|
27
|
+
* Delay in milliseconds before closing the menu after a mouseout event. Useful to avoid immediate closing when the pointer briefly leaves the component.
|
|
28
|
+
* @default 1000
|
|
29
|
+
*/
|
|
30
|
+
"mouseOutTimeout": number | undefined;
|
|
26
31
|
/**
|
|
27
32
|
* Initial search query.
|
|
28
33
|
* @default undefined
|
|
@@ -34,10 +39,10 @@ export namespace Components {
|
|
|
34
39
|
*/
|
|
35
40
|
interface ZanitMobileMenubar {
|
|
36
41
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @default
|
|
42
|
+
* IDs path of the current item.
|
|
43
|
+
* @default []
|
|
39
44
|
*/
|
|
40
|
-
"
|
|
45
|
+
"currentPath": string[];
|
|
41
46
|
/**
|
|
42
47
|
* Menubar items.
|
|
43
48
|
* @default []
|
|
@@ -119,7 +124,7 @@ declare namespace LocalJSX {
|
|
|
119
124
|
*/
|
|
120
125
|
interface ZanitMenubar {
|
|
121
126
|
/**
|
|
122
|
-
*
|
|
127
|
+
* Path of the current item.
|
|
123
128
|
* @default undefined
|
|
124
129
|
*/
|
|
125
130
|
"current"?: string | undefined;
|
|
@@ -127,6 +132,11 @@ declare namespace LocalJSX {
|
|
|
127
132
|
* The data to build the menu (as an array of `MenubarItem` or a JSON array) or the url to fetch to retrieve it.
|
|
128
133
|
*/
|
|
129
134
|
"data"?: Promise<MenubarItem[]> | MenubarItem[] | URL | string;
|
|
135
|
+
/**
|
|
136
|
+
* Delay in milliseconds before closing the menu after a mouseout event. Useful to avoid immediate closing when the pointer briefly leaves the component.
|
|
137
|
+
* @default 1000
|
|
138
|
+
*/
|
|
139
|
+
"mouseOutTimeout"?: number | undefined;
|
|
130
140
|
/**
|
|
131
141
|
* Initial search query.
|
|
132
142
|
* @default undefined
|
|
@@ -138,10 +148,10 @@ declare namespace LocalJSX {
|
|
|
138
148
|
*/
|
|
139
149
|
interface ZanitMobileMenubar {
|
|
140
150
|
/**
|
|
141
|
-
*
|
|
142
|
-
* @default
|
|
151
|
+
* IDs path of the current item.
|
|
152
|
+
* @default []
|
|
143
153
|
*/
|
|
144
|
-
"
|
|
154
|
+
"currentPath"?: string[];
|
|
145
155
|
/**
|
|
146
156
|
* Menubar items.
|
|
147
157
|
* @default []
|