@zanichelli/zanichelli-it-frontend-kit 0.1.2 → 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 +4 -1
- package/dist/types/components/menubar/mobile-menubar/mobile-menubar.d.ts +4 -3
- package/dist/types/components.d.ts +8 -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} +36 -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-CWNmI_TK.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-Cphl7FvH.js → zanichelli-it-frontend-kit/zanit-search-form.entry.js} +13 -53
- 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} +46 -177
- 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/{dist/collection/components/menubar/search-form/search-form.js → www/build/zanit-search-form.entry.js} +23 -101
- package/www/build/zanit-search-form.entry.js.map +1 -0
- package/www/index.html +185 -37
- package/dist/cjs/index-C45Wd3rZ.js +0 -1535
- package/dist/cjs/index-C45Wd3rZ.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 -648
- 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 -171
- 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 -147
- 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 -1293
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-CWNmI_TK.js.map +0 -1
- package/dist/components/p-Cphl7FvH.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-BGwuI2U_.js +0 -1507
- package/dist/esm/index-BGwuI2U_.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 -644
- 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-BGwuI2U_.js +0 -3
- package/dist/zanichelli-it-frontend-kit/p-BGwuI2U_.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/p-b064a657.entry.js +0 -2
- package/dist/zanichelli-it-frontend-kit/p-b064a657.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-984b8fa6.css +0 -1
- package/www/build/p-BGwuI2U_.js +0 -3
- package/www/build/p-BGwuI2U_.js.map +0 -1
- package/www/build/p-b064a657.entry.js +0 -2
- package/www/build/p-b064a657.entry.js.map +0 -1
- package/www/build/p-ff7fd122.js +0 -2
- 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,11 +12,13 @@ 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;
|
|
21
23
|
/**
|
|
22
24
|
* Delay in milliseconds before closing the menu after a mouseout event.
|
|
@@ -29,6 +31,7 @@ export declare class ZanitMenubar {
|
|
|
29
31
|
/** Setup the list of items. */
|
|
30
32
|
parseData(data: typeof this.data): Promise<void>;
|
|
31
33
|
onItemsChange(): void;
|
|
34
|
+
onCurrentChange(): void;
|
|
32
35
|
connectedCallback(): Promise<void>;
|
|
33
36
|
/** Close any open menu when clicking outside. */
|
|
34
37
|
handleOutsideClick(event: MouseEvent): void;
|
|
@@ -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;
|
|
@@ -39,10 +39,10 @@ export namespace Components {
|
|
|
39
39
|
*/
|
|
40
40
|
interface ZanitMobileMenubar {
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @default
|
|
42
|
+
* IDs path of the current item.
|
|
43
|
+
* @default []
|
|
44
44
|
*/
|
|
45
|
-
"
|
|
45
|
+
"currentPath": string[];
|
|
46
46
|
/**
|
|
47
47
|
* Menubar items.
|
|
48
48
|
* @default []
|
|
@@ -124,7 +124,7 @@ declare namespace LocalJSX {
|
|
|
124
124
|
*/
|
|
125
125
|
interface ZanitMenubar {
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Path of the current item.
|
|
128
128
|
* @default undefined
|
|
129
129
|
*/
|
|
130
130
|
"current"?: string | undefined;
|
|
@@ -148,10 +148,10 @@ declare namespace LocalJSX {
|
|
|
148
148
|
*/
|
|
149
149
|
interface ZanitMobileMenubar {
|
|
150
150
|
/**
|
|
151
|
-
*
|
|
152
|
-
* @default
|
|
151
|
+
* IDs path of the current item.
|
|
152
|
+
* @default []
|
|
153
153
|
*/
|
|
154
|
-
"
|
|
154
|
+
"currentPath"?: string[];
|
|
155
155
|
/**
|
|
156
156
|
* Menubar items.
|
|
157
157
|
* @default []
|