@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.
Files changed (108) hide show
  1. package/dist/types/components/menubar/menu/menu.d.ts +2 -2
  2. package/dist/types/components/menubar/menubar.d.ts +12 -1
  3. package/dist/types/components/menubar/mobile-menubar/mobile-menubar.d.ts +4 -3
  4. package/dist/types/components.d.ts +18 -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} +54 -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-BBoCOJu1.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-DxgXtXGD.js → zanichelli-it-frontend-kit/zanit-search-form.entry.js} +15 -55
  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} +64 -146
  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/www/build/zanit-search-form.entry.js +95 -0
  45. package/www/build/zanit-search-form.entry.js.map +1 -0
  46. package/www/index.html +185 -37
  47. package/dist/cjs/index-xkrZykI_.js +0 -1532
  48. package/dist/cjs/index-xkrZykI_.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 -631
  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 -156
  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 -143
  68. package/dist/collection/components/menubar/search-form/search-form.js +0 -173
  69. package/dist/collection/components/menubar/search-form/search-form.js.map +0 -1
  70. package/dist/collection/index.js +0 -11
  71. package/dist/collection/index.js.map +0 -1
  72. package/dist/collection/utils/types.js +0 -2
  73. package/dist/collection/utils/types.js.map +0 -1
  74. package/dist/collection/utils/utils.js.map +0 -1
  75. package/dist/components/index.js +0 -1290
  76. package/dist/components/index.js.map +0 -1
  77. package/dist/components/p-BBoCOJu1.js.map +0 -1
  78. package/dist/components/p-DxgXtXGD.js.map +0 -1
  79. package/dist/components/zanit-menubar.js.map +0 -1
  80. package/dist/components/zanit-mobile-menubar.js +0 -9
  81. package/dist/components/zanit-mobile-menubar.js.map +0 -1
  82. package/dist/components/zanit-search-form.js +0 -9
  83. package/dist/components/zanit-search-form.js.map +0 -1
  84. package/dist/esm/index-BWVQ0LD4.js +0 -1504
  85. package/dist/esm/index-BWVQ0LD4.js.map +0 -1
  86. package/dist/esm/index.js +0 -4
  87. package/dist/esm/index.js.map +0 -1
  88. package/dist/esm/loader.js +0 -13
  89. package/dist/esm/loader.js.map +0 -1
  90. package/dist/esm/zanichelli-it-frontend-kit.js +0 -23
  91. package/dist/esm/zanichelli-it-frontend-kit.js.map +0 -1
  92. package/dist/esm/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.js.map +0 -1
  93. package/dist/esm/zanit-menubar_3.entry.js +0 -627
  94. package/dist/esm/zanit-menubar_3.entry.js.map +0 -1
  95. package/dist/index.cjs.js +0 -1
  96. package/dist/index.js +0 -1
  97. package/dist/zanichelli-it-frontend-kit/p-BWVQ0LD4.js +0 -3
  98. package/dist/zanichelli-it-frontend-kit/p-BWVQ0LD4.js.map +0 -1
  99. package/dist/zanichelli-it-frontend-kit/p-e396bda1.entry.js +0 -2
  100. package/dist/zanichelli-it-frontend-kit/p-e396bda1.entry.js.map +0 -1
  101. package/dist/zanichelli-it-frontend-kit/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
  102. package/www/build/p-810fffc3.js +0 -2
  103. package/www/build/p-984b8fa6.css +0 -1
  104. package/www/build/p-BWVQ0LD4.js +0 -3
  105. package/www/build/p-BWVQ0LD4.js.map +0 -1
  106. package/www/build/p-e396bda1.entry.js +0 -2
  107. package/www/build/p-e396bda1.entry.js.map +0 -1
  108. package/www/build/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
@@ -1,114 +0,0 @@
1
- :host {
2
- position: relative;
3
- z-index: 2;
4
- display: block;
5
- width: 100%;
6
- max-width: 100%;
7
- background-color: #fff;
8
- color: var(--gray900);
9
- fill: var(--gray900);
10
- font-family: var(--font-family-sans);
11
- }
12
-
13
- :host,
14
- *,
15
- ::before,
16
- ::after {
17
- box-sizing: border-box;
18
- }
19
-
20
- *:focus:focus-visible {
21
- box-shadow: var(--shadow-focus-primary);
22
- outline: none;
23
- }
24
-
25
- ul {
26
- padding: 0;
27
- margin: 0;
28
- list-style: none;
29
- }
30
-
31
- a {
32
- color: var(--gray900);
33
- cursor: pointer;
34
- text-decoration: none;
35
- }
36
-
37
- button {
38
- all: unset;
39
- cursor: pointer;
40
- }
41
-
42
- nav {
43
- display: flex;
44
- width: 100%;
45
- align-items: center;
46
- padding: 8px var(--grid-margin);
47
- }
48
-
49
- nav::after {
50
- position: absolute;
51
- top: 0;
52
- right: 0;
53
- width: 100%;
54
- height: 100%;
55
- background: transparent;
56
- box-shadow: var(--shadow-1);
57
- content: '';
58
- pointer-events: none;
59
- }
60
-
61
- .burger-button {
62
- margin-left: auto;
63
- }
64
-
65
- .mobile-menu {
66
- position: absolute;
67
- top: 100%;
68
- left: 0;
69
- display: flex;
70
- width: 100%;
71
- flex-direction: column;
72
- padding: 16px var(--grid-margin) 32px;
73
- background-color: #fff;
74
- box-shadow: var(--shadow-2);
75
- gap: 8px;
76
- }
77
-
78
- .mobile-menu li {
79
- width: 100%;
80
- }
81
-
82
- .mobile-menu .items-container {
83
- display: flex;
84
- min-height: 256px;
85
- flex-direction: column;
86
- gap: 8px;
87
- }
88
-
89
- .mobile-menu .items-container z-ghost-loading {
90
- width: 40%;
91
- height: 1.2rem;
92
- }
93
-
94
- .mobile-menu .items-container .menubar-item {
95
- display: block;
96
- width: 100%;
97
- padding: 8px 0;
98
- font-size: 1rem;
99
- text-align: left;
100
- }
101
-
102
- .mobile-menu .items-container li:not(:last-child) .menubar-item {
103
- border-bottom: 1px solid #000;
104
- }
105
-
106
- [role='menuitem'].parent {
107
- display: flex;
108
- width: fit-content;
109
- align-items: center;
110
- padding: 0;
111
- border: none;
112
- font-size: 0.875rem;
113
- gap: 8px;
114
- }
@@ -1,280 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { containsTarget, moveFocus } from "../../../utils/utils";
3
- import { Menu } from "../menu/menu";
4
- /** Mobile menubar component. */
5
- export class ZanitMobileMenubar {
6
- host;
7
- /** ID of the current active item. */
8
- current = undefined;
9
- /** Menubar items. */
10
- items = [];
11
- /** Initial search query. */
12
- searchQuery = undefined;
13
- /** Whether the menubar is loading the data. */
14
- loading = false;
15
- parentItem = undefined;
16
- menuItems = undefined;
17
- /** Whether the items to render come from a menubar or a menu. */
18
- menuType = undefined;
19
- open;
20
- onItemsChange() {
21
- this.setupData(this.items);
22
- }
23
- /**
24
- * Find the current item and take its parent, `menuItems` or the `navbarItems`.
25
- * @returns True if an item matches the `current` prop, false otherwise.
26
- */
27
- setupData(items, parent) {
28
- for (const item of items) {
29
- if (item.id === this.current) {
30
- const type = item.menuItems?.length ? 'menu' : 'menubar';
31
- this.parentItem = parent;
32
- this.menuType = type;
33
- this.menuItems = item.menuItems || item.navbarItems;
34
- return true;
35
- }
36
- if (item.menuItems?.some(({ id }) => id === this.current)) {
37
- this.parentItem = parent;
38
- this.menuType = 'menu';
39
- this.menuItems = item.menuItems;
40
- return true;
41
- }
42
- if (item.navbarItems?.length) {
43
- return this.setupData(item.navbarItems, item);
44
- }
45
- }
46
- return false;
47
- }
48
- get menuItemsElement() {
49
- return Array.from(this.host.shadowRoot.querySelectorAll('[role="menuitem"]'));
50
- }
51
- /** Initialize tabindex on menuitems, setting -1 to all but the first one. */
52
- initTabindex() {
53
- this.menuItemsElement.forEach((item, index) => item.setAttribute('tabindex', index === 0 ? '0' : '-1'));
54
- }
55
- toggleMenu() {
56
- if (this.open) {
57
- this.open = false;
58
- }
59
- else {
60
- this.open = true;
61
- setTimeout(() => {
62
- this.initTabindex();
63
- this.menuItemsElement[0]?.focus();
64
- }, 200);
65
- }
66
- }
67
- /** Handles keyboard navigation on mobile menu. */
68
- handleItemKeydown(event) {
69
- switch (event.key) {
70
- case 'ArrowUp': {
71
- event.preventDefault();
72
- event.stopPropagation();
73
- const items = this.menuItemsElement;
74
- const currentIndex = items.indexOf(event.target);
75
- const prevItem = items[(currentIndex - 1 + items.length) % items.length];
76
- moveFocus(items[currentIndex], prevItem);
77
- break;
78
- }
79
- case 'ArrowDown': {
80
- event.preventDefault();
81
- event.stopPropagation();
82
- const items = this.menuItemsElement;
83
- const currentIndex = items.indexOf(event.target);
84
- const nextItem = items[(currentIndex + 1) % items.length];
85
- moveFocus(items[currentIndex], nextItem);
86
- break;
87
- }
88
- case 'Home': {
89
- event.preventDefault();
90
- event.stopPropagation();
91
- moveFocus(event.target, this.menuItemsElement[0]);
92
- break;
93
- }
94
- case 'End': {
95
- event.preventDefault();
96
- event.stopPropagation();
97
- moveFocus(event.target, this.menuItemsElement.pop());
98
- break;
99
- }
100
- }
101
- }
102
- connectedCallback() {
103
- this.setupData(this.items);
104
- }
105
- /** Close the menu when clicking outside. */
106
- handleOutsideClick(event) {
107
- if (containsTarget(this.host, event)) {
108
- return;
109
- }
110
- this.open = false;
111
- }
112
- /** Close the menu when pressing Escape or Tab. */
113
- handleKeydown(event) {
114
- switch (event.key) {
115
- case 'Escape':
116
- this.open = false;
117
- break;
118
- case 'Tab':
119
- if (containsTarget(this.host, event)) {
120
- break;
121
- }
122
- this.open = false;
123
- break;
124
- }
125
- }
126
- /** Close the menu when the focus goes out. */
127
- handleFocusout(event) {
128
- if (containsTarget(this.host, event)) {
129
- return;
130
- }
131
- this.open = false;
132
- }
133
- render() {
134
- return (h("nav", { key: 'df6d04c4bb8343ec62fe69df3f01f6f47b4367cf', "aria-label": "Zanichelli.it" }, h("z-logo", { key: 'e837d49cfe0076e98cc137d8b124a15145c7efe8', link: "/", height: 32, width: 126 }), h("button", { key: 'e3a1bf4100114d201e0bf10c2c0b59f93cce6f94', class: "burger-button", type: "button", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": "mobile-menu", "aria-label": this.open ? 'Chiudi menù' : 'Apri menù', onClick: () => this.toggleMenu() }, h("z-icon", { key: '3eb050cd5e264df005a0f62cad45c16a190a2e9a', name: this.open ? 'multiply' : 'burger-menu', width: "1.5rem", height: "1.5rem" })), this.open && (h("ul", { key: 'ba97f02094674ccfff3b984dde341a63991590b8', class: "mobile-menu", role: "menubar" }, h("li", { key: '55dc248f23ea242f9cc8d3682c6aaa44484c8cfa', role: "none" }, h("zanit-search-form", { key: '065da5fec5e9eb34958c7d0824d2a8430ab4c01b', searchQuery: this.searchQuery, onResetSearch: () => (this.searchQuery = undefined) })), !this.loading && this.current && (h("li", { key: '4246e8673055fb86743d4b182456936d1de5fd84', role: "none" }, h("a", { key: '8681ac3870380b16f475ea201f57f970679f6e92', class: "parent", href: this.parentItem?.href ?? '/', id: this.parentItem?.id ?? undefined, role: "menuitem", tabIndex: -1, onKeyDown: (event) => this.handleItemKeydown(event) }, h("z-icon", { key: '87bed51b9ad80269fedc81f64c7412df1191e55e', name: "arrow-left", width: "0.5rem", height: "0.5rem" }), h("span", { key: 'e7f19c9b707c1e3f14a4a583b86093213807ba2a' }, this.parentItem?.label ?? 'Home')))), this.loading && (h("div", { key: '2e1e53699630bde2fc6a87ec2b2fcad3cbdfb87a', class: "items-container", role: "none" }, [...new Array(4)].map(() => (h("li", { role: "none" }, h("div", { class: "menubar-item", role: "none" }, h("z-ghost-loading", null))))))), this.menuType === 'menu' ? (h(Menu, { items: this.menuItems, current: this.current, onItemKeyDown: (event) => this.handleItemKeydown(event) })) : (this.menuItems?.length && (h("div", { class: "items-container", role: "none" }, this.menuItems.map((item) => (h("li", { role: "none" }, h("a", { class: {
135
- 'menu-item': this.menuType === 'menu',
136
- 'menubar-item': this.menuType === 'menubar',
137
- }, href: item.href, id: item.id, role: "menuitem", "aria-current": this.current === item.id ? 'page' : 'false', tabIndex: -1, onKeyDown: (event) => this.handleItemKeydown(event) }, h("span", { "data-text": item.label }, item.label))))))))))));
138
- }
139
- static get is() { return "zanit-mobile-menubar"; }
140
- static get encapsulation() { return "shadow"; }
141
- static get originalStyleUrls() {
142
- return {
143
- "$": ["mobile-menubar.css", "../menu/menu.css"]
144
- };
145
- }
146
- static get styleUrls() {
147
- return {
148
- "$": ["mobile-menubar.css", "../menu/menu.css"]
149
- };
150
- }
151
- static get properties() {
152
- return {
153
- "current": {
154
- "type": "string",
155
- "attribute": "current",
156
- "mutable": false,
157
- "complexType": {
158
- "original": "string | undefined",
159
- "resolved": "string",
160
- "references": {}
161
- },
162
- "required": false,
163
- "optional": false,
164
- "docs": {
165
- "tags": [],
166
- "text": "ID of the current active item."
167
- },
168
- "getter": false,
169
- "setter": false,
170
- "reflect": false,
171
- "defaultValue": "undefined"
172
- },
173
- "items": {
174
- "type": "unknown",
175
- "attribute": "items",
176
- "mutable": false,
177
- "complexType": {
178
- "original": "MenubarItem[]",
179
- "resolved": "MenubarItem[]",
180
- "references": {
181
- "MenubarItem": {
182
- "location": "import",
183
- "path": "../../../utils/types",
184
- "id": "src/utils/types.ts::MenubarItem"
185
- }
186
- }
187
- },
188
- "required": false,
189
- "optional": false,
190
- "docs": {
191
- "tags": [],
192
- "text": "Menubar items."
193
- },
194
- "getter": false,
195
- "setter": false,
196
- "defaultValue": "[]"
197
- },
198
- "searchQuery": {
199
- "type": "string",
200
- "attribute": "search-query",
201
- "mutable": true,
202
- "complexType": {
203
- "original": "string | undefined",
204
- "resolved": "string",
205
- "references": {}
206
- },
207
- "required": false,
208
- "optional": false,
209
- "docs": {
210
- "tags": [],
211
- "text": "Initial search query."
212
- },
213
- "getter": false,
214
- "setter": false,
215
- "reflect": false,
216
- "defaultValue": "undefined"
217
- },
218
- "loading": {
219
- "type": "boolean",
220
- "attribute": "loading",
221
- "mutable": false,
222
- "complexType": {
223
- "original": "boolean",
224
- "resolved": "boolean",
225
- "references": {}
226
- },
227
- "required": false,
228
- "optional": false,
229
- "docs": {
230
- "tags": [],
231
- "text": "Whether the menubar is loading the data."
232
- },
233
- "getter": false,
234
- "setter": false,
235
- "reflect": false,
236
- "defaultValue": "false"
237
- }
238
- };
239
- }
240
- static get states() {
241
- return {
242
- "parentItem": {},
243
- "menuItems": {},
244
- "menuType": {},
245
- "open": {}
246
- };
247
- }
248
- static get elementRef() { return "host"; }
249
- static get watchers() {
250
- return [{
251
- "propName": "items",
252
- "methodName": "onItemsChange"
253
- }, {
254
- "propName": "current",
255
- "methodName": "onItemsChange"
256
- }];
257
- }
258
- static get listeners() {
259
- return [{
260
- "name": "click",
261
- "method": "handleOutsideClick",
262
- "target": "document",
263
- "capture": false,
264
- "passive": true
265
- }, {
266
- "name": "keydown",
267
- "method": "handleKeydown",
268
- "target": undefined,
269
- "capture": false,
270
- "passive": true
271
- }, {
272
- "name": "focusin",
273
- "method": "handleFocusout",
274
- "target": "document",
275
- "capture": false,
276
- "passive": true
277
- }];
278
- }
279
- }
280
- //# sourceMappingURL=mobile-menubar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mobile-menubar.js","sourceRoot":"","sources":["../../../../src/components/menubar/mobile-menubar/mobile-menubar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,gCAAgC;AAMhC,MAAM,OAAO,kBAAkB;IAClB,IAAI,CAAgC;IAE/C,qCAAqC;IAC7B,OAAO,GAAuB,SAAS,CAAC;IAEhD,qBAAqB;IACb,KAAK,GAAkB,EAAE,CAAC;IAElC,4BAA4B;IACH,WAAW,GAAuB,SAAS,CAAC;IAErE,+CAA+C;IACvC,OAAO,GAAY,KAAK,CAAC;IAExB,UAAU,GAA4B,SAAS,CAAC;IAChD,SAAS,GAA2C,SAAS,CAAC;IACvE,iEAAiE;IACxD,QAAQ,GAAmC,SAAS,CAAC;IACrD,IAAI,CAAU;IAIvB,aAAa;QACX,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,SAAS,CAAC,KAAoB,EAAE,MAAoB;QAC1D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC7B,MAAM,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I,EAAC,UAAU,kBACD,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EACzD,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;wBAEnD,yBAAiB,IAAI,CAAC,KAAK,IAAG,IAAI,CAAC,KAAK,CAAQ,CAC9C,CACD,CACN,CAAC,CACE,CACP,CACF,CACE,CACN,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Listen, Prop, State, Watch } from '@stencil/core';\nimport { MenubarItem, MenuItem } from '../../../utils/types';\nimport { containsTarget, moveFocus } from '../../../utils/utils';\nimport { Menu } from '../menu/menu';\n\n/** Mobile menubar component. */\n@Component({\n tag: 'zanit-mobile-menubar',\n styleUrls: ['mobile-menubar.css', '../menu/menu.css'],\n shadow: true,\n})\nexport class ZanitMobileMenubar {\n @Element() host: HTMLZanitMobileMenubarElement;\n\n /** ID of the current active item. */\n @Prop() current: string | undefined = undefined;\n\n /** Menubar items. */\n @Prop() items: MenubarItem[] = [];\n\n /** Initial search query. */\n @Prop({ mutable: true }) searchQuery: string | undefined = undefined;\n\n /** Whether the menubar is loading the data. */\n @Prop() loading: boolean = false;\n\n @State() parentItem: MenubarItem | undefined = undefined;\n @State() menuItems: MenubarItem[] | MenuItem[] | undefined = undefined;\n /** Whether the items to render come from a menubar or a menu. */\n @State() menuType: 'menubar' | 'menu' | undefined = undefined;\n @State() open: boolean;\n\n @Watch('items')\n @Watch('current')\n onItemsChange() {\n this.setupData(this.items);\n }\n\n /**\n * Find the current item and take its parent, `menuItems` or the `navbarItems`.\n * @returns True if an item matches the `current` prop, false otherwise.\n */\n private setupData(items: MenubarItem[], parent?: MenubarItem): boolean {\n for (const item of items) {\n if (item.id === this.current) {\n const type = item.menuItems?.length ? 'menu' : 'menubar';\n this.parentItem = parent;\n this.menuType = type;\n this.menuItems = item.menuItems || item.navbarItems;\n return true;\n }\n\n if (item.menuItems?.some(({ id }) => id === this.current)) {\n this.parentItem = parent;\n this.menuType = 'menu';\n this.menuItems = item.menuItems;\n return true;\n }\n\n if (item.navbarItems?.length) {\n return this.setupData(item.navbarItems, item);\n }\n }\n\n return false;\n }\n\n private get menuItemsElement() {\n return Array.from(this.host.shadowRoot.querySelectorAll('[role=\"menuitem\"]')) as HTMLElement[];\n }\n\n /** Initialize tabindex on menuitems, setting -1 to all but the first one. */\n private initTabindex() {\n this.menuItemsElement.forEach((item, index) => item.setAttribute('tabindex', index === 0 ? '0' : '-1'));\n }\n\n private toggleMenu() {\n if (this.open) {\n this.open = false;\n } else {\n this.open = true;\n setTimeout(() => {\n this.initTabindex();\n this.menuItemsElement[0]?.focus();\n }, 200);\n }\n }\n\n /** Handles keyboard navigation on mobile menu. */\n private handleItemKeydown(event: KeyboardEvent) {\n switch (event.key) {\n case 'ArrowUp': {\n event.preventDefault();\n event.stopPropagation();\n const items = this.menuItemsElement;\n const currentIndex = items.indexOf(event.target as HTMLElement);\n const prevItem = items[(currentIndex - 1 + items.length) % items.length];\n moveFocus(items[currentIndex], prevItem);\n break;\n }\n case 'ArrowDown': {\n event.preventDefault();\n event.stopPropagation();\n const items = this.menuItemsElement;\n const currentIndex = items.indexOf(event.target as HTMLElement);\n const nextItem = items[(currentIndex + 1) % items.length];\n moveFocus(items[currentIndex], nextItem);\n break;\n }\n case 'Home': {\n event.preventDefault();\n event.stopPropagation();\n moveFocus(event.target as HTMLElement, this.menuItemsElement[0]);\n break;\n }\n case 'End': {\n event.preventDefault();\n event.stopPropagation();\n moveFocus(event.target as HTMLElement, this.menuItemsElement.pop());\n break;\n }\n }\n }\n\n connectedCallback() {\n this.setupData(this.items);\n }\n\n /** Close the menu when clicking outside. */\n @Listen('click', { target: 'document', passive: true })\n handleOutsideClick(event: MouseEvent) {\n if (containsTarget(this.host, event)) {\n return;\n }\n\n this.open = false;\n }\n\n /** Close the menu when pressing Escape or Tab. */\n @Listen('keydown', { passive: true })\n handleKeydown(event: KeyboardEvent) {\n switch (event.key) {\n case 'Escape':\n this.open = false;\n break;\n case 'Tab':\n if (containsTarget(this.host, event)) {\n break;\n }\n\n this.open = false;\n break;\n }\n }\n\n /** Close the menu when the focus goes out. */\n @Listen('focusin', { target: 'document', passive: true })\n handleFocusout(event: FocusEvent) {\n if (containsTarget(this.host, event)) {\n return;\n }\n\n this.open = false;\n }\n\n render() {\n return (\n <nav aria-label=\"Zanichelli.it\">\n <z-logo\n link=\"/\"\n height={32}\n width={126}\n ></z-logo>\n <button\n class=\"burger-button\"\n type=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls=\"mobile-menu\"\n aria-label={this.open ? 'Chiudi menù' : 'Apri menù'}\n onClick={() => this.toggleMenu()}\n >\n <z-icon\n name={this.open ? 'multiply' : 'burger-menu'}\n width=\"1.5rem\"\n height=\"1.5rem\"\n ></z-icon>\n </button>\n {this.open && (\n <ul\n class=\"mobile-menu\"\n role=\"menubar\"\n >\n <li role=\"none\">\n <zanit-search-form\n searchQuery={this.searchQuery}\n onResetSearch={() => (this.searchQuery = undefined)}\n />\n </li>\n\n {!this.loading && this.current && (\n <li role=\"none\">\n <a\n class=\"parent\"\n href={this.parentItem?.href ?? '/'}\n id={this.parentItem?.id ?? undefined}\n role=\"menuitem\"\n tabIndex={-1}\n onKeyDown={(event) => this.handleItemKeydown(event)}\n >\n <z-icon\n name=\"arrow-left\"\n width=\"0.5rem\"\n height=\"0.5rem\"\n ></z-icon>\n <span>\n {/* Show the 'Home' label if the current item is a root child. */}\n {this.parentItem?.label ?? 'Home'}\n </span>\n </a>\n </li>\n )}\n\n {this.loading && (\n <div\n class=\"items-container\"\n role=\"none\"\n >\n {[...new Array(4)].map(() => (\n <li role=\"none\">\n <div\n class=\"menubar-item\"\n role=\"none\"\n >\n <z-ghost-loading></z-ghost-loading>\n </div>\n </li>\n ))}\n </div>\n )}\n\n {this.menuType === 'menu' ? (\n <Menu\n items={this.menuItems}\n current={this.current}\n onItemKeyDown={(event) => this.handleItemKeydown(event)}\n />\n ) : (\n this.menuItems?.length && (\n <div\n class=\"items-container\"\n role=\"none\"\n >\n {this.menuItems.map((item) => (\n <li role=\"none\">\n <a\n class={{\n 'menu-item': this.menuType === 'menu',\n 'menubar-item': this.menuType === 'menubar',\n }}\n href={item.href}\n id={item.id}\n role=\"menuitem\"\n aria-current={this.current === item.id ? 'page' : 'false'}\n tabIndex={-1}\n onKeyDown={(event) => this.handleItemKeydown(event)}\n >\n <span data-text={item.label}>{item.label}</span>\n </a>\n </li>\n ))}\n </div>\n )\n )}\n </ul>\n )}\n </nav>\n );\n }\n}\n"]}
@@ -1,143 +0,0 @@
1
- :host,
2
- *,
3
- ::before,
4
- ::after {
5
- box-sizing: border-box;
6
- }
7
-
8
- *:focus:focus-visible {
9
- box-shadow: var(--shadow-focus-primary);
10
- outline: none;
11
- }
12
-
13
- button {
14
- all: unset;
15
- cursor: pointer;
16
- }
17
-
18
- @media (width < 768px) {
19
- .searchbar {
20
- display: flex;
21
- align-items: center;
22
- border: 1px solid #000;
23
- border-radius: 4px;
24
- }
25
-
26
- .searchbar > *:first-child {
27
- /* To have a seamless appearance of the border radius of an internal child element nested within a parent element with rounded borders, we need to subtract the parent's border thickness from the child's border radius. Inner Radius = Outer Radius - Border Thickness */
28
- border-bottom-left-radius: 3px;
29
- border-top-left-radius: 3px;
30
- }
31
-
32
- .searchbar button[type='reset'] {
33
- display: flex;
34
- padding: 0 0 0 8px;
35
- cursor: pointer;
36
- }
37
-
38
- .searchbar input {
39
- width: 100%;
40
- height: 100%;
41
- padding: 4px 8px;
42
- border: none;
43
- background-color: #fff;
44
- font-family: var(--font-family-sans);
45
- font-size: 1rem;
46
- }
47
-
48
- .searchbar input[type='search']::-webkit-search-cancel-button,
49
- .searchbar input[type='search']::-webkit-search-decoration {
50
- appearance: none;
51
- }
52
-
53
- .searchbar input::placeholder {
54
- color: var(--gray500);
55
- }
56
-
57
- .searchbar .searchbar-button {
58
- padding: 4px 8px;
59
- border-left: 1px solid #000;
60
- background: var(--zanit-accent-color);
61
- border-bottom-right-radius: 3px;
62
- border-top-right-radius: 3px;
63
- }
64
-
65
- .searchbar input:focus:focus-visible,
66
- .searchbar .searchbar-button:focus:focus-visible {
67
- z-index: 1;
68
- }
69
- }
70
-
71
- @media (width >= 768px) {
72
- .searchbar {
73
- display: flex;
74
- font-size: 1.5rem;
75
- }
76
-
77
- .searchbar.searchbar-open {
78
- position: absolute;
79
- width: 100%;
80
- height: 100%;
81
- inset: 0;
82
- }
83
-
84
- .searchbar .input-wrapper {
85
- display: flex;
86
- width: 100%;
87
- align-items: center;
88
- padding: 0 0 0 var(--grid-margin);
89
- background-color: #fff;
90
- gap: 14px;
91
- }
92
-
93
- .searchbar button[type='reset'] {
94
- display: flex;
95
- align-items: center;
96
- border-radius: 4px;
97
- cursor: pointer;
98
- }
99
-
100
- .searchbar input {
101
- z-index: 1;
102
- width: 100%;
103
- height: 100%;
104
- padding: 8px 14px 8px 0;
105
- border: none;
106
- background-color: #fff;
107
- font-family: var(--font-family-sans);
108
- font-size: inherit;
109
- }
110
-
111
- .searchbar input[type='search']::-webkit-search-cancel-button,
112
- .searchbar input[type='search']::-webkit-search-decoration {
113
- appearance: none;
114
- }
115
-
116
- .searchbar input::placeholder {
117
- color: var(--gray500);
118
- }
119
-
120
- .searchbar .searchbar-button {
121
- display: flex;
122
- align-items: center;
123
- padding: 8px 16px;
124
- border-right: 1px solid #000;
125
- border-left: 1px solid #000;
126
- background: var(--zanit-accent-color);
127
- font-family: inherit;
128
- font-size: inherit;
129
- gap: 64px;
130
- line-height: 1;
131
- }
132
-
133
- .searchbar input:focus:focus-visible,
134
- .searchbar .searchbar-button:focus:focus-visible {
135
- z-index: 1;
136
- }
137
- }
138
-
139
- @media (width >= 768px) and (width < 1152px) {
140
- .searchbar .searchbar-button > .searchbar-button-label {
141
- display: none;
142
- }
143
- }