@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.
Files changed (107) hide show
  1. package/dist/types/components/menubar/menu/menu.d.ts +2 -2
  2. package/dist/types/components/menubar/menubar.d.ts +4 -1
  3. package/dist/types/components/menubar/mobile-menubar/mobile-menubar.d.ts +4 -3
  4. package/dist/types/components.d.ts +8 -8
  5. package/dist/zanichelli-it-frontend-kit/index-BQ_orCyU.js +4170 -0
  6. package/dist/zanichelli-it-frontend-kit/index-BQ_orCyU.js.map +1 -0
  7. package/dist/zanichelli-it-frontend-kit/index.esm.js +10 -0
  8. package/dist/zanichelli-it-frontend-kit/index.esm.js.map +1 -1
  9. package/dist/zanichelli-it-frontend-kit/menu-Cd2leC2L.js +46 -0
  10. package/dist/zanichelli-it-frontend-kit/menu-Cd2leC2L.js.map +1 -0
  11. package/dist/{collection/utils/utils.js → zanichelli-it-frontend-kit/utils-CaxAWyZI.js} +7 -3
  12. package/dist/zanichelli-it-frontend-kit/utils-CaxAWyZI.js.map +1 -0
  13. package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.css +993 -1
  14. package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js +49 -1
  15. package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js.map +1 -1
  16. package/dist/zanichelli-it-frontend-kit/zanit-menubar.entry.esm.js.map +1 -0
  17. package/dist/{components/zanit-menubar.js → zanichelli-it-frontend-kit/zanit-menubar.entry.js} +36 -60
  18. package/dist/zanichelli-it-frontend-kit/zanit-menubar.entry.js.map +1 -0
  19. package/dist/zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.esm.js.map +1 -0
  20. package/dist/{components/p-CWNmI_TK.js → zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.js} +31 -96
  21. package/dist/zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.js.map +1 -0
  22. package/dist/zanichelli-it-frontend-kit/zanit-search-form.entry.esm.js.map +1 -0
  23. package/dist/{components/p-Cphl7FvH.js → zanichelli-it-frontend-kit/zanit-search-form.entry.js} +13 -53
  24. package/dist/zanichelli-it-frontend-kit/zanit-search-form.entry.js.map +1 -0
  25. package/package.json +1 -1
  26. package/www/build/index-BQ_orCyU.js +4170 -0
  27. package/www/build/index-BQ_orCyU.js.map +1 -0
  28. package/www/build/index.esm.js +10 -0
  29. package/www/build/index.esm.js.map +1 -1
  30. package/www/build/menu-Cd2leC2L.js +46 -0
  31. package/www/build/menu-Cd2leC2L.js.map +1 -0
  32. package/www/build/utils-CaxAWyZI.js +21 -0
  33. package/www/build/utils-CaxAWyZI.js.map +1 -0
  34. package/www/build/zanichelli-it-frontend-kit.css +993 -1
  35. package/www/build/zanichelli-it-frontend-kit.esm.js +49 -1
  36. package/www/build/zanichelli-it-frontend-kit.esm.js.map +1 -1
  37. package/www/build/zanit-menubar.entry.esm.js.map +1 -0
  38. package/{dist/collection/components/menubar/menubar.js → www/build/zanit-menubar.entry.js} +46 -177
  39. package/www/build/zanit-menubar.entry.js.map +1 -0
  40. package/www/build/zanit-mobile-menubar.entry.esm.js.map +1 -0
  41. package/www/build/zanit-mobile-menubar.entry.js +159 -0
  42. package/www/build/zanit-mobile-menubar.entry.js.map +1 -0
  43. package/www/build/zanit-search-form.entry.esm.js.map +1 -0
  44. package/{dist/collection/components/menubar/search-form/search-form.js → www/build/zanit-search-form.entry.js} +23 -101
  45. package/www/build/zanit-search-form.entry.js.map +1 -0
  46. package/www/index.html +185 -37
  47. package/dist/cjs/index-C45Wd3rZ.js +0 -1535
  48. package/dist/cjs/index-C45Wd3rZ.js.map +0 -1
  49. package/dist/cjs/index.cjs.js +0 -5
  50. package/dist/cjs/index.cjs.js.map +0 -1
  51. package/dist/cjs/loader.cjs.js +0 -15
  52. package/dist/cjs/loader.cjs.js.map +0 -1
  53. package/dist/cjs/zanichelli-it-frontend-kit.cjs.js +0 -27
  54. package/dist/cjs/zanichelli-it-frontend-kit.cjs.js.map +0 -1
  55. package/dist/cjs/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.cjs.js.map +0 -1
  56. package/dist/cjs/zanit-menubar_3.cjs.entry.js +0 -648
  57. package/dist/cjs/zanit-menubar_3.cjs.entry.js.map +0 -1
  58. package/dist/collection/collection-manifest.json +0 -14
  59. package/dist/collection/components/menubar/menu/menu.css +0 -98
  60. package/dist/collection/components/menubar/menu/menu.js +0 -34
  61. package/dist/collection/components/menubar/menu/menu.js.map +0 -1
  62. package/dist/collection/components/menubar/menubar.css +0 -171
  63. package/dist/collection/components/menubar/menubar.js.map +0 -1
  64. package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.css +0 -114
  65. package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js +0 -280
  66. package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js.map +0 -1
  67. package/dist/collection/components/menubar/search-form/search-form.css +0 -147
  68. package/dist/collection/components/menubar/search-form/search-form.js.map +0 -1
  69. package/dist/collection/index.js +0 -11
  70. package/dist/collection/index.js.map +0 -1
  71. package/dist/collection/utils/types.js +0 -2
  72. package/dist/collection/utils/types.js.map +0 -1
  73. package/dist/collection/utils/utils.js.map +0 -1
  74. package/dist/components/index.js +0 -1293
  75. package/dist/components/index.js.map +0 -1
  76. package/dist/components/p-CWNmI_TK.js.map +0 -1
  77. package/dist/components/p-Cphl7FvH.js.map +0 -1
  78. package/dist/components/zanit-menubar.js.map +0 -1
  79. package/dist/components/zanit-mobile-menubar.js +0 -9
  80. package/dist/components/zanit-mobile-menubar.js.map +0 -1
  81. package/dist/components/zanit-search-form.js +0 -9
  82. package/dist/components/zanit-search-form.js.map +0 -1
  83. package/dist/esm/index-BGwuI2U_.js +0 -1507
  84. package/dist/esm/index-BGwuI2U_.js.map +0 -1
  85. package/dist/esm/index.js +0 -4
  86. package/dist/esm/index.js.map +0 -1
  87. package/dist/esm/loader.js +0 -13
  88. package/dist/esm/loader.js.map +0 -1
  89. package/dist/esm/zanichelli-it-frontend-kit.js +0 -23
  90. package/dist/esm/zanichelli-it-frontend-kit.js.map +0 -1
  91. package/dist/esm/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.js.map +0 -1
  92. package/dist/esm/zanit-menubar_3.entry.js +0 -644
  93. package/dist/esm/zanit-menubar_3.entry.js.map +0 -1
  94. package/dist/index.cjs.js +0 -1
  95. package/dist/index.js +0 -1
  96. package/dist/zanichelli-it-frontend-kit/p-BGwuI2U_.js +0 -3
  97. package/dist/zanichelli-it-frontend-kit/p-BGwuI2U_.js.map +0 -1
  98. package/dist/zanichelli-it-frontend-kit/p-b064a657.entry.js +0 -2
  99. package/dist/zanichelli-it-frontend-kit/p-b064a657.entry.js.map +0 -1
  100. package/dist/zanichelli-it-frontend-kit/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
  101. package/www/build/p-984b8fa6.css +0 -1
  102. package/www/build/p-BGwuI2U_.js +0 -3
  103. package/www/build/p-BGwuI2U_.js.map +0 -1
  104. package/www/build/p-b064a657.entry.js +0 -2
  105. package/www/build/p-b064a657.entry.js.map +0 -1
  106. package/www/build/p-ff7fd122.js +0 -2
  107. 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} current - The id of the current active item.
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
- current?: string;
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
- /** ID of the current active item. */
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
- /** ID of the current active item. */
6
- current: string | undefined;
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
- * ID of the current active item.
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
- * ID of the current active item.
43
- * @default undefined
42
+ * IDs path of the current item.
43
+ * @default []
44
44
  */
45
- "current": string | undefined;
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
- * ID of the current active item.
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
- * ID of the current active item.
152
- * @default undefined
151
+ * IDs path of the current item.
152
+ * @default []
153
153
  */
154
- "current"?: string | undefined;
154
+ "currentPath"?: string[];
155
155
  /**
156
156
  * Menubar items.
157
157
  * @default []