@zanichelli/zanichelli-it-frontend-kit 1.4.1-RC1 → 1.4.2
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/cjs/{index-BLzQAHAI.js → index-BKkNg6ed.js} +498 -358
- package/dist/cjs/index.cjs.js +0 -3
- package/dist/cjs/loader.cjs.js +2 -5
- package/dist/cjs/zanichelli-it-frontend-kit.cjs.js +3 -6
- package/dist/cjs/zanit-back-to-top_4.cjs.entry.js +76 -64
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/back-to-top/back-to-top.js +3 -4
- package/dist/collection/components/menubar/menu/menu.js +0 -1
- package/dist/collection/components/menubar/menubar.js +12 -11
- package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js +12 -13
- package/dist/collection/components/menubar/search-form/search-form.js +14 -13
- package/dist/collection/components/menubar/search-form/suggestions.js +1 -2
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/subjects.api.js +0 -1
- package/dist/collection/utils/utils.js +0 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1335
- package/dist/components/p-BMtMaJq9.js +1 -0
- package/dist/components/p-BXeRLfHX.js +1 -0
- package/dist/components/zanit-back-to-top.js +1 -88
- package/dist/components/zanit-menubar.js +1 -455
- package/dist/components/zanit-mobile-menubar.js +1 -9
- package/dist/components/zanit-search-form.js +1 -9
- package/dist/esm/{index-DSdvvVFj.js → index-CFgcJxsy.js} +498 -358
- package/dist/esm/index.js +0 -3
- package/dist/esm/loader.js +3 -6
- package/dist/esm/zanichelli-it-frontend-kit.js +4 -7
- package/dist/esm/zanit-back-to-top_4.entry.js +76 -64
- package/dist/types/components/back-to-top/back-to-top.d.ts +2 -1
- package/dist/types/components/menubar/menubar.d.ts +2 -1
- package/dist/types/components/menubar/mobile-menubar/mobile-menubar.d.ts +2 -1
- package/dist/types/components/menubar/search-form/search-form.d.ts +3 -2
- package/dist/types/components.d.ts +35 -8
- package/dist/types/stencil-public-runtime.d.ts +169 -11
- package/dist/zanichelli-it-frontend-kit/index.esm.js +0 -2
- package/dist/zanichelli-it-frontend-kit/p-93d8b277.entry.js +1 -0
- package/dist/zanichelli-it-frontend-kit/p-CFgcJxsy.js +2 -0
- package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js +1 -2
- package/package.json +17 -15
- package/www/build/index.esm.js +0 -2
- package/www/build/p-93d8b277.entry.js +1 -0
- package/www/build/p-CFgcJxsy.js +2 -0
- package/www/build/p-ec9829f4.js +1 -0
- package/www/build/zanichelli-it-frontend-kit.esm.js +1 -2
- package/www/index.html +3 -2
- package/dist/cjs/index-BLzQAHAI.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/zanichelli-it-frontend-kit.cjs.js.map +0 -1
- package/dist/cjs/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.cjs.js.map +0 -1
- package/dist/cjs/zanit-back-to-top_4.cjs.entry.js.map +0 -1
- package/dist/collection/components/back-to-top/back-to-top.js.map +0 -1
- package/dist/collection/components/menubar/menu/menu.js.map +0 -1
- package/dist/collection/components/menubar/menubar.js.map +0 -1
- package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js.map +0 -1
- package/dist/collection/components/menubar/search-form/search-form.js.map +0 -1
- package/dist/collection/components/menubar/search-form/suggestions.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/index.js.map +0 -1
- package/dist/collection/utils/subjects.api.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-CPhDV9oz.js +0 -246
- package/dist/components/p-CPhDV9oz.js.map +0 -1
- package/dist/components/p-DR2f_bjz.js +0 -387
- package/dist/components/p-DR2f_bjz.js.map +0 -1
- package/dist/components/zanit-back-to-top.js.map +0 -1
- package/dist/components/zanit-menubar.js.map +0 -1
- package/dist/components/zanit-mobile-menubar.js.map +0 -1
- package/dist/components/zanit-search-form.js.map +0 -1
- package/dist/esm/index-DSdvvVFj.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/zanichelli-it-frontend-kit.js.map +0 -1
- package/dist/esm/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.js.map +0 -1
- package/dist/esm/zanit-back-to-top_4.entry.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/index.esm.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/loader.esm.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/p-12c6519e.entry.js +0 -2
- package/dist/zanichelli-it-frontend-kit/p-12c6519e.entry.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/p-DSdvvVFj.js +0 -3
- package/dist/zanichelli-it-frontend-kit/p-DSdvvVFj.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
- package/www/build/index.esm.js.map +0 -1
- package/www/build/loader.esm.js.map +0 -1
- package/www/build/p-12c6519e.entry.js +0 -2
- package/www/build/p-12c6519e.entry.js.map +0 -1
- package/www/build/p-17633e25.js +0 -2
- package/www/build/p-DSdvvVFj.js +0 -3
- package/www/build/p-DSdvvVFj.js.map +0 -1
- package/www/build/zanichelli-it-frontend-kit.esm.js.map +0 -1
- package/www/build/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
package/dist/cjs/index.cjs.js
CHANGED
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BKkNg6ed.js');
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["zanit-back-to-top_4.cjs",[[
|
|
8
|
+
return index.bootstrapLazy([["zanit-back-to-top_4.cjs",[[529,"zanit-menubar",{"data":[1],"current":[1],"searchQuery":[1025,"search-query"],"searchEnv":[1,"search-env"],"searchArea":[1,"search-area"],"items":[32],"openMenu":[32],"openNavbar":[32],"currentPath":[32],"isMobile":[32],"loading":[32]},[[5,"click","handleOutsideClick"],[5,"keydown","handleKeydown"],[1,"mouseover","handleMouseover"],[1,"mouseout","handleMouseout"],[1,"focusout","handleFocusout"]],{"data":[{"parseData":0}],"items":[{"onItemsChange":0}],"current":[{"onCurrentChange":0}]}],[514,"zanit-back-to-top",{"pageMinHeight":[2,"page-min-height"],"scrollMinHeight":[2,"scroll-min-height"],"showFab":[32],"currentPageHeight":[32],"isMobile":[32]},[[9,"scroll","handleScroll"]]],[529,"zanit-mobile-menubar",{"currentPath":[16],"items":[16],"searchQuery":[1025,"search-query"],"loading":[4],"searchEnv":[1,"search-env"],"searchArea":[1,"search-area"],"lastCurrent":[32],"parentItem":[32],"menuItems":[32],"menuType":[32],"open":[32]},[[5,"click","handleOutsideClick"],[1,"keydown","handleKeydown"],[5,"focusin","handleFocusout"]],{"items":[{"onItemsChange":0}],"currentPath":[{"onItemsChange":0}]}],[513,"zanit-search-form",{"searchQuery":[1025,"search-query"],"searchEnv":[1,"search-env"],"searchArea":[1,"search-area"],"showSearchbar":[32],"_searchQuery":[32],"suggestions":[32],"activeSuggestion":[32],"showSuggestions":[32]},[[5,"mousedown","handleOutsideClick"],[1,"keydown","handleEsc"],[5,"keyup","handleTab"]],{"searchQuery":[{"onSearchQueryChange":0}],"searchArea":[{"onSearchAreaChange":0}],"showSearchbar":[{"onShowSearchbarChange":0}],"showSuggestions":[{"onShowSuggestionsChange":0}]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
12
12
|
exports.defineCustomElements = defineCustomElements;
|
|
13
|
-
//# sourceMappingURL=loader.cjs.js.map
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=loader.cjs.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BKkNg6ed.js');
|
|
4
4
|
|
|
5
5
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
6
|
/*
|
|
7
|
-
Stencil Client Patch Browser v4.
|
|
7
|
+
Stencil Client Patch Browser v4.43.4 | MIT Licensed | https://stenciljs.com
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
var patchBrowser = () => {
|
|
@@ -18,10 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy([["zanit-back-to-top_4.cjs",[[
|
|
21
|
+
return index.bootstrapLazy([["zanit-back-to-top_4.cjs",[[529,"zanit-menubar",{"data":[1],"current":[1],"searchQuery":[1025,"search-query"],"searchEnv":[1,"search-env"],"searchArea":[1,"search-area"],"items":[32],"openMenu":[32],"openNavbar":[32],"currentPath":[32],"isMobile":[32],"loading":[32]},[[5,"click","handleOutsideClick"],[5,"keydown","handleKeydown"],[1,"mouseover","handleMouseover"],[1,"mouseout","handleMouseout"],[1,"focusout","handleFocusout"]],{"data":[{"parseData":0}],"items":[{"onItemsChange":0}],"current":[{"onCurrentChange":0}]}],[514,"zanit-back-to-top",{"pageMinHeight":[2,"page-min-height"],"scrollMinHeight":[2,"scroll-min-height"],"showFab":[32],"currentPageHeight":[32],"isMobile":[32]},[[9,"scroll","handleScroll"]]],[529,"zanit-mobile-menubar",{"currentPath":[16],"items":[16],"searchQuery":[1025,"search-query"],"loading":[4],"searchEnv":[1,"search-env"],"searchArea":[1,"search-area"],"lastCurrent":[32],"parentItem":[32],"menuItems":[32],"menuType":[32],"open":[32]},[[5,"click","handleOutsideClick"],[1,"keydown","handleKeydown"],[5,"focusin","handleFocusout"]],{"items":[{"onItemsChange":0}],"currentPath":[{"onItemsChange":0}]}],[513,"zanit-search-form",{"searchQuery":[1025,"search-query"],"searchEnv":[1,"search-env"],"searchArea":[1,"search-area"],"showSearchbar":[32],"_searchQuery":[32],"suggestions":[32],"activeSuggestion":[32],"showSuggestions":[32]},[[5,"mousedown","handleOutsideClick"],[1,"keydown","handleEsc"],[5,"keyup","handleTab"]],{"searchQuery":[{"onSearchQueryChange":0}],"searchArea":[{"onSearchAreaChange":0}],"showSearchbar":[{"onShowSearchbarChange":0}],"showSuggestions":[{"onShowSuggestionsChange":0}]}]]]], options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
|
25
|
-
//# sourceMappingURL=zanichelli-it-frontend-kit.cjs.js.map
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=zanichelli-it-frontend-kit.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BKkNg6ed.js');
|
|
4
4
|
|
|
5
|
-
const backToTopCss =
|
|
5
|
+
const backToTopCss = () => `.sc-zanit-back-to-top-h{opacity:1;transition:all 0.2s linear;visibility:visible}.hidden.sc-zanit-back-to-top-h{opacity:0;visibility:hidden}.sc-zanit-back-to-top-h .z-fab.sc-zanit-back-to-top{--color-primary01:var(--gray950);outline:1px solid var(--color-white)}`;
|
|
6
6
|
|
|
7
7
|
const ZanitBackTop = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -55,10 +55,10 @@ const ZanitBackTop = class {
|
|
|
55
55
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (index.h(index.Host, { key: '
|
|
58
|
+
return (index.h(index.Host, { key: '8db557141277e71d6d2fdaad2e525df03fb78461', class: { hidden: !this.showFab }, "aria-hidden": this.showFab ? 'false' : 'true' }, index.h("button", { key: 'e9a1cfcc75c39e6a5d657712306e331bbfabbcf9', class: { 'z-fab': true, 'z-fab-extended': !this.isMobile }, onClick: () => this.scroll() }, index.h("z-icon", { key: 'c83accba15ee2efbbef5f17cdbb92c57f7aee0a0', name: "back-top" }), index.h("span", { key: '59167788a06ac2b45b4e91c944c0fefd1dc79780' }, "Torna su"))));
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
ZanitBackTop.style = backToTopCss;
|
|
61
|
+
ZanitBackTop.style = backToTopCss();
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Check if an element contains an event target by checking its composedPath.
|
|
@@ -85,6 +85,31 @@ const isTabKey = (event) => event.key === 'Tab';
|
|
|
85
85
|
/** Check if event key is Escape */
|
|
86
86
|
const isEscKey = (event) => event.key === 'Escape';
|
|
87
87
|
|
|
88
|
+
var SearchEnv;
|
|
89
|
+
(function (SearchEnv) {
|
|
90
|
+
SearchEnv["DEV"] = "dev";
|
|
91
|
+
SearchEnv["TEST"] = "test";
|
|
92
|
+
SearchEnv["PROD"] = "prod";
|
|
93
|
+
})(SearchEnv || (SearchEnv = {}));
|
|
94
|
+
const S3_SHOP_URL = {
|
|
95
|
+
dev: 'https://zanichelli-shop-dev.s3.eu-west-1.amazonaws.com',
|
|
96
|
+
test: 'https://zanichelli-shop-test.s3.eu-west-1.amazonaws.com',
|
|
97
|
+
prod: 'https://zanichelli-shop.s3.eu-west-1.amazonaws.com',
|
|
98
|
+
};
|
|
99
|
+
async function getSubjectsByArea(searchEnv) {
|
|
100
|
+
try {
|
|
101
|
+
const response = await fetch(`${S3_SHOP_URL[searchEnv]}/categories.json`);
|
|
102
|
+
if (!response.ok) {
|
|
103
|
+
throw new Error(`HTTP ${response.status}`);
|
|
104
|
+
}
|
|
105
|
+
return await response.json();
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
console.error('Error fetching subjects:', err);
|
|
109
|
+
return {};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
88
113
|
const DEFAULT_GROUP_KEY = 'default';
|
|
89
114
|
const DEFAULT_GROUP = {
|
|
90
115
|
id: DEFAULT_GROUP_KEY,
|
|
@@ -114,45 +139,17 @@ const Menu = ({ controlledBy, items, currentPath = [], onItemKeyDown }) => {
|
|
|
114
139
|
}
|
|
115
140
|
const groups = getGroupedItems(items);
|
|
116
141
|
const isActive = (item) => currentPath.includes(controlledBy) && currentPath.includes(item.id);
|
|
117
|
-
return (index.h("div", { class: "menu-wrapper", role: "none" },
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
'menu-item': true,
|
|
124
|
-
'active': isActive(item),
|
|
125
|
-
}, href: item.href, role: "menuitem", tabIndex: -1, "aria-current": isActive(item) ? 'page' : 'false', onKeyDown: (event) => onItemKeyDown(event), target: item.target }, item.label))))))))))));
|
|
142
|
+
return (index.h("div", { class: "menu-wrapper", role: "none" }, index.h("div", { class: "menu", "aria-labelledby": controlledBy ?? undefined, role: "menu" }, groups.map(({ group, items }) => (index.h("div", { class: { group: true, highlight: items.some((item) => item.highlight) } }, group.id !== DEFAULT_GROUP_KEY ? (index.h("div", { class: "group-name", id: group.id }, group.label)) : groups.length > 1 ? (
|
|
143
|
+
// empty div to keep the same height as the other groups
|
|
144
|
+
index.h("div", { class: "group-name" })) : null, index.h("ul", { class: "menu-list", role: "group", "aria-labelledby": group.id !== DEFAULT_GROUP_KEY ? group.id : undefined }, items.map((item) => (index.h("li", { role: "none" }, item.href && (index.h("a", { class: {
|
|
145
|
+
'menu-item': true,
|
|
146
|
+
'active': isActive(item),
|
|
147
|
+
}, href: item.href, role: "menuitem", tabIndex: -1, "aria-current": isActive(item) ? 'page' : 'false', onKeyDown: (event) => onItemKeyDown(event), target: item.target }, item.label))))))))))));
|
|
126
148
|
};
|
|
127
149
|
|
|
128
|
-
var
|
|
129
|
-
(function (SearchEnv) {
|
|
130
|
-
SearchEnv["DEV"] = "dev";
|
|
131
|
-
SearchEnv["TEST"] = "test";
|
|
132
|
-
SearchEnv["PROD"] = "prod";
|
|
133
|
-
})(SearchEnv || (SearchEnv = {}));
|
|
134
|
-
const S3_SHOP_URL = {
|
|
135
|
-
dev: 'https://zanichelli-shop-dev.s3.eu-west-1.amazonaws.com',
|
|
136
|
-
test: 'https://zanichelli-shop-test.s3.eu-west-1.amazonaws.com',
|
|
137
|
-
prod: 'https://zanichelli-shop.s3.eu-west-1.amazonaws.com',
|
|
138
|
-
};
|
|
139
|
-
async function getSubjectsByArea(searchEnv) {
|
|
140
|
-
try {
|
|
141
|
-
const response = await fetch(`${S3_SHOP_URL[searchEnv]}/categories.json`);
|
|
142
|
-
if (!response.ok) {
|
|
143
|
-
throw new Error(`HTTP ${response.status}`);
|
|
144
|
-
}
|
|
145
|
-
return await response.json();
|
|
146
|
-
}
|
|
147
|
-
catch (err) {
|
|
148
|
-
console.error('Error fetching subjects:', err);
|
|
149
|
-
return {};
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const menubarCss = ":host{position:relative;z-index:2;display:flex;width:100%;background-color:#fff;color:var(--gray900);font-family:var(--font-family-sans)}:host,*,::before,::after{box-sizing:border-box}*:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}ul{padding:0;margin:0;list-style:none}a{color:var(--gray900);cursor:pointer;text-decoration:none}button{all:unset;cursor:pointer}:host nav{width:100%}.shadow-wrapper{position:relative;z-index:1;display:flex;width:100%}.shadow-wrapper::after{position:absolute;top:0;right:0;width:100%;height:100%;background:transparent;box-shadow:var(--shadow-1);content:'';pointer-events:none}.width-limiter{position:relative;display:flex;width:100%;max-width:var(--zanit-menubar-max-width, 1366px);margin:0 auto}.shadow-wrapper+.shadow-wrapper{z-index:0}.sub-menubar>ul{gap:28px}.width-limiter>ul,.sub-menubar>ul{position:relative;z-index:3;display:flex;width:100%;align-items:center;padding:0 var(--grid-margin);margin-right:auto;margin-left:auto;gap:20px}.shadow-wrapper>.width-limiter,.shadow-wrapper>ul{width:100%;max-width:var(--zanit-menubar-max-width, 1366px)}ul.menubar{height:3rem;padding-right:0}.menubar z-ghost-loading{display:block;width:120px;height:1.25rem}.menubar>li[role='separator']{width:1px;height:1.25rem;background-color:#000}.menubar-item{position:relative;display:flex;align-items:center;padding:14px 0;font-size:1rem;gap:8px;line-height:1.25rem}.menubar .menubar-item{text-transform:uppercase}.menubar-item [data-text]{display:flex;flex-direction:column}.menubar-item.active>[data-text],.menubar-item:hover>[data-text],.menubar-item:focus:focus-visible>[data-text]{font-weight:var(--font-bd)}.menubar-item>[data-text]::after{height:0;content:attr(data-text) / '';font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}.sub-menubar .menubar-item.active::after{position:absolute;z-index:-1;bottom:0;left:-4px;width:calc(100% + 8px);height:4px;background-color:var(--red500);content:''}zanit-search-form{margin-left:auto}";
|
|
150
|
+
const menubarCss = () => `:host{position:relative;z-index:2;display:flex;width:100%;background-color:#fff;color:var(--gray900);font-family:var(--font-family-sans)}:host,*,::before,::after{box-sizing:border-box}*:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}ul{padding:0;margin:0;list-style:none}a{color:var(--gray900);cursor:pointer;text-decoration:none}button{all:unset;cursor:pointer}:host nav{width:100%}.shadow-wrapper{position:relative;z-index:1;display:flex;width:100%}.shadow-wrapper::after{position:absolute;top:0;right:0;width:100%;height:100%;background:transparent;box-shadow:var(--shadow-1);content:'';pointer-events:none}.width-limiter{position:relative;display:flex;width:100%;max-width:var(--zanit-menubar-max-width, 1366px);margin:0 auto}.shadow-wrapper+.shadow-wrapper{z-index:0}.sub-menubar>ul{gap:28px}.width-limiter>ul,.sub-menubar>ul{position:relative;z-index:3;display:flex;width:100%;align-items:center;padding:0 var(--grid-margin);margin-right:auto;margin-left:auto;gap:20px}.shadow-wrapper>.width-limiter,.shadow-wrapper>ul{width:100%;max-width:var(--zanit-menubar-max-width, 1366px)}ul.menubar{height:3rem;padding-right:0}.menubar z-ghost-loading{display:block;width:120px;height:1.25rem}.menubar>li[role='separator']{width:1px;height:1.25rem;background-color:#000}.menubar-item{position:relative;display:flex;align-items:center;padding:14px 0;font-size:1rem;gap:8px;line-height:1.25rem}.menubar .menubar-item{text-transform:uppercase}.menubar-item [data-text]{display:flex;flex-direction:column}.menubar-item.active>[data-text],.menubar-item:hover>[data-text],.menubar-item:focus:focus-visible>[data-text]{font-weight:var(--font-bd)}.menubar-item>[data-text]::after{height:0;content:attr(data-text) / '';font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}.sub-menubar .menubar-item.active::after{position:absolute;z-index:-1;bottom:0;left:-4px;width:calc(100% + 8px);height:4px;background-color:var(--red500);content:''}zanit-search-form{margin-left:auto}`;
|
|
154
151
|
|
|
155
|
-
const menuCss$1 =
|
|
152
|
+
const menuCss$1 = () => `.menu-wrapper{width:100%;background-color:#fff}.menu{position:relative;display:flex;width:100%;flex-direction:column;gap:32px 0}.menu .group{display:flex;flex-direction:column}.menu .group .group-name{border-bottom:1px solid currentcolor;margin-bottom:4px;color:var(--red500);font-size:0.875rem;font-weight:var(--font-md)}.menu .group .menu-list{display:flex;flex-direction:column;gap:8px}.menu .group .menu-list .menu-item{display:block;border-bottom:2px solid transparent;font-size:0.875rem;font-weight:var(--font-md)}.menu .menu-list .menu-item.active,.menu .menu-list .menu-item:hover{border-bottom-color:var(--red500)}.menu .group.highlight .menu-list .menu-item{font-size:1rem}@media (width >= 768px){.menu-wrapper{position:absolute;top:100%;left:0;display:flex;justify-content:center;box-shadow:var(--shadow-1)}.menu{display:grid;width:100%;max-width:var(--zanit-menubar-max-width, 1366px);padding:16px var(--grid-margin);gap:0 24px;grid-auto-columns:minmax(0, max-content);grid-auto-flow:column;grid-template-rows:minmax(0, max-content) max-content}.menu .group{display:grid;grid-row:1 / -1;grid-template-columns:1fr;grid-template-rows:subgrid}@supports not (grid-template-rows: subgrid){.menu .group{grid-template-rows:repeat(auto-fit, minmax(0, max-content))}}.menu .group .group-name{border:none;margin-bottom:16px}.menu .group .menu-list .menu-item{font-size:1rem}.menu .group.highlight .menu-list .menu-item{font-size:1.5rem}}`;
|
|
156
153
|
|
|
157
154
|
const ZanitMenubar = class {
|
|
158
155
|
constructor(hostRef) {
|
|
@@ -545,16 +542,22 @@ const ZanitMenubar = class {
|
|
|
545
542
|
}
|
|
546
543
|
static get delegatesFocus() { return true; }
|
|
547
544
|
static get watchers() { return {
|
|
548
|
-
"data": [
|
|
549
|
-
|
|
550
|
-
|
|
545
|
+
"data": [{
|
|
546
|
+
"parseData": 0
|
|
547
|
+
}],
|
|
548
|
+
"items": [{
|
|
549
|
+
"onItemsChange": 0
|
|
550
|
+
}],
|
|
551
|
+
"current": [{
|
|
552
|
+
"onCurrentChange": 0
|
|
553
|
+
}]
|
|
551
554
|
}; }
|
|
552
555
|
};
|
|
553
|
-
ZanitMenubar.style = menubarCss + menuCss$1;
|
|
556
|
+
ZanitMenubar.style = menubarCss() + menuCss$1();
|
|
554
557
|
|
|
555
|
-
const mobileMenubarCss =
|
|
558
|
+
const mobileMenubarCss = () => `:host{position:relative;z-index:2;display:block;width:100%;max-width:100%;height:3rem;background-color:#fff;color:var(--gray900);fill:var(--gray900);font-family:var(--font-family-sans)}:host,*,::before,::after{box-sizing:border-box}*:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}ul{padding:0;margin:0;list-style:none}a{color:var(--gray900);cursor:pointer;text-decoration:none}button{all:unset;cursor:pointer}nav{display:flex;width:100%;align-items:center;padding-left:var(--grid-margin);gap:8px}nav::after{position:absolute;top:0;right:0;width:100%;height:100%;background:transparent;box-shadow:var(--shadow-1);content:'';pointer-events:none}z-logo{margin:8px 0}.mobile-menu{position:absolute;top:100%;left:0;display:flex;overflow:auto;width:100%;max-height:calc(100vh - 48px - var(--zanit-menubar-top-offset, 0px));flex-direction:column;padding:16px var(--grid-margin) 32px;background-color:#fff;box-shadow:var(--shadow-2);gap:8px}.mobile-menu li{width:100%}.mobile-menu .items-container{display:flex;min-height:256px;flex-direction:column;gap:8px}.mobile-menu .items-container z-ghost-loading{width:40%;height:1.2rem}.mobile-menu .items-container .menubar-item{display:block;width:100%;padding:8px 0;font-size:1rem;text-align:left}.mobile-menu .items-container li:not(:last-child) .menubar-item{border-bottom:1px solid #000}[role='menuitem'].parent{display:flex;width:fit-content;align-items:center;padding:0;border:none;font-size:0.875rem;gap:8px}zanit-search-form{margin-left:auto}`;
|
|
556
559
|
|
|
557
|
-
const menuCss =
|
|
560
|
+
const menuCss = () => `.menu-wrapper{width:100%;background-color:#fff}.menu{position:relative;display:flex;width:100%;flex-direction:column;gap:32px 0}.menu .group{display:flex;flex-direction:column}.menu .group .group-name{border-bottom:1px solid currentcolor;margin-bottom:4px;color:var(--red500);font-size:0.875rem;font-weight:var(--font-md)}.menu .group .menu-list{display:flex;flex-direction:column;gap:8px}.menu .group .menu-list .menu-item{display:block;border-bottom:2px solid transparent;font-size:0.875rem;font-weight:var(--font-md)}.menu .menu-list .menu-item.active,.menu .menu-list .menu-item:hover{border-bottom-color:var(--red500)}.menu .group.highlight .menu-list .menu-item{font-size:1rem}@media (width >= 768px){.menu-wrapper{position:absolute;top:100%;left:0;display:flex;justify-content:center;box-shadow:var(--shadow-1)}.menu{display:grid;width:100%;max-width:var(--zanit-menubar-max-width, 1366px);padding:16px var(--grid-margin);gap:0 24px;grid-auto-columns:minmax(0, max-content);grid-auto-flow:column;grid-template-rows:minmax(0, max-content) max-content}.menu .group{display:grid;grid-row:1 / -1;grid-template-columns:1fr;grid-template-rows:subgrid}@supports not (grid-template-rows: subgrid){.menu .group{grid-template-rows:repeat(auto-fit, minmax(0, max-content))}}.menu .group .group-name{border:none;margin-bottom:16px}.menu .group .menu-list .menu-item{font-size:1rem}.menu .group.highlight .menu-list .menu-item{font-size:1.5rem}}`;
|
|
558
561
|
|
|
559
562
|
const ZanitMobileMenubar = class {
|
|
560
563
|
constructor(hostRef) {
|
|
@@ -579,7 +582,7 @@ const ZanitMobileMenubar = class {
|
|
|
579
582
|
menuItems = undefined;
|
|
580
583
|
/** Whether the items to render come from a menubar or a menu. */
|
|
581
584
|
menuType = undefined;
|
|
582
|
-
open;
|
|
585
|
+
open = false;
|
|
583
586
|
onItemsChange() {
|
|
584
587
|
this.lastCurrent = this.currentPath?.length ? this.currentPath[this.currentPath.length - 1] : undefined;
|
|
585
588
|
this.setupData(this.items);
|
|
@@ -702,18 +705,22 @@ const ZanitMobileMenubar = class {
|
|
|
702
705
|
this.open = false;
|
|
703
706
|
}
|
|
704
707
|
render() {
|
|
705
|
-
return (index.h("nav", { key: '
|
|
708
|
+
return (index.h("nav", { key: 'e3c4f8212d54b84206c2d40c9670263dd0f2460a', "aria-label": "Zanichelli.it" }, index.h("button", { key: '8f4600dbb2c530e5901127d556eee94dcd60947a', 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() }, index.h("z-icon", { key: 'aa3d06cca2f2c7e92cb4afb37a5085ea37ec8283', name: this.open ? 'multiply' : 'burger-menu', width: "1.5rem", height: "1.5rem" })), index.h("z-logo", { key: 'af3724fc7f330c7b2f7d826bd0dd2edc2dbb5742', imageAlt: "Logo Zanichelli", link: "/", height: 32, width: 126 }), index.h("zanit-search-form", { key: 'cc3c8e2ece6ac0428864d8affcd567c9a1272824', searchQuery: this.searchQuery, onResetSearch: () => (this.searchQuery = undefined), searchArea: this.searchArea, searchEnv: this.searchEnv }), this.open && (index.h("ul", { key: '0c35b0f4869ae076a1c02f07f1b19e787f4c3780', class: "mobile-menu", role: "menubar" }, !this.loading && this.currentPath && this.currentPath.length > 0 && (index.h("li", { key: 'ff8e9d8871ebea21ba178d1ba9d295d26b018be2', role: "none" }, index.h("a", { key: '4afb5ccda0e206f640f429ecfe7ac1e3491a475d', class: "parent", href: this.parentItem?.href ?? '/', id: this.parentItem?.id ?? undefined, role: "menuitem", tabIndex: -1, onKeyDown: (event) => this.handleItemKeydown(event), target: this.parentItem?.target }, index.h("z-icon", { key: '2db8da21ad88b937d591eac551a3599704e13147', name: "arrow-left", width: "0.5rem", height: "0.5rem" }), index.h("span", { key: 'd285244285ccee5e76db049cb4fba1dd591d7ce1' }, this.parentItem?.label || 'Home')))), this.loading ? (index.h("div", { class: "items-container", role: "none" }, [...new Array(4)].map(() => (index.h("li", { role: "none" }, index.h("div", { class: "menubar-item", role: "none" }, index.h("z-ghost-loading", null))))))) : this.menuType === 'menu' ? (index.h(Menu, { items: this.menuItems, controlledBy: this.parentItem?.id, currentPath: this.currentPath, onItemKeyDown: (event) => this.handleItemKeydown(event) })) : (this.menuItems?.length > 0 && (index.h("div", { class: "items-container", role: "none" }, this.menuItems.map((item) => (index.h("li", { role: "none" }, index.h("a", { class: {
|
|
706
709
|
'menu-item': this.menuType === 'menu',
|
|
707
710
|
'menubar-item': this.menuType === 'menubar',
|
|
708
711
|
}, href: item.href, id: item.id, role: "menuitem", "aria-current": this.lastCurrent === item.id ? 'page' : 'false', tabIndex: -1, onKeyDown: (event) => this.handleItemKeydown(event), target: item.target }, index.h("span", { "data-text": item.label }, item.label))))))))))));
|
|
709
712
|
}
|
|
710
713
|
static get delegatesFocus() { return true; }
|
|
711
714
|
static get watchers() { return {
|
|
712
|
-
"items": [
|
|
713
|
-
|
|
715
|
+
"items": [{
|
|
716
|
+
"onItemsChange": 0
|
|
717
|
+
}],
|
|
718
|
+
"currentPath": [{
|
|
719
|
+
"onItemsChange": 0
|
|
720
|
+
}]
|
|
714
721
|
}; }
|
|
715
722
|
};
|
|
716
|
-
ZanitMobileMenubar.style = mobileMenubarCss + menuCss;
|
|
723
|
+
ZanitMobileMenubar.style = mobileMenubarCss() + menuCss();
|
|
717
724
|
|
|
718
725
|
var AREA_LABELS;
|
|
719
726
|
(function (AREA_LABELS) {
|
|
@@ -773,7 +780,7 @@ const buildId = (string) => string
|
|
|
773
780
|
.map((c) => c.charCodeAt(0).toString(16))
|
|
774
781
|
.join('');
|
|
775
782
|
const buildUrl = (params) => {
|
|
776
|
-
return
|
|
783
|
+
return `/ricerca?${new URLSearchParams(params).toString()}`;
|
|
777
784
|
};
|
|
778
785
|
const buildDetail = (user_query, query, area, subject) => ({
|
|
779
786
|
user_query,
|
|
@@ -800,7 +807,7 @@ const getAreaOrder = (area) => {
|
|
|
800
807
|
return index >= 0 ? index : 100;
|
|
801
808
|
};
|
|
802
809
|
|
|
803
|
-
const searchFormCss =
|
|
810
|
+
const searchFormCss = () => `:host,*,::before,::after{box-sizing:border-box}*:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}button{all:unset;cursor:pointer}.searchbar{--searchbar-button-x-padding:14px;--searchbar-button-icon-width:1.75rem;--closed-searchbar-width:calc((var(--searchbar-button-x-padding) * 2) + var(--searchbar-button-icon-width) + 1px);position:absolute;z-index:5;top:0;right:0;display:flex;width:var(--closed-searchbar-width);height:3rem;justify-content:flex-end;transition:width 0.4s ease-in-out}.searchbar.searchbar-open{width:100%}.searchbar .input-wrapper{display:flex;overflow:hidden;width:100%;align-items:center;padding:8px;padding-left:var(--grid-margin);background-color:#fff;gap:8px;transition-duration:0.4s;transition-property:padding-right, padding-left, width;transition-timing-function:ease-in-out}.searchbar:not(.searchbar-open) .input-wrapper{overflow:hidden;width:0;padding:0}.searchbar button[type='reset']{--z-icon-width:1rem;--z-icon-height:1rem;display:flex;align-items:center;cursor:pointer}.searchbar input{z-index:1;width:100%;height:100%;padding:0;border:none;background-color:#fff;font-family:var(--font-family-sans);font-size:1rem}.searchbar.searchbar-open input:first-child{padding-left:4px;margin-left:-4px;}.searchbar input[type='search']::-webkit-search-cancel-button,.searchbar input[type='search']::-webkit-search-decoration{appearance:none}.searchbar input::placeholder{color:var(--gray500)}.searchbar .searchbar-button{display:flex;align-items:center;justify-content:center;padding:10px var(--searchbar-button-x-padding);border-left:1px solid #000;background:var(--zanit-accent-color);font-family:inherit;font-size:inherit;gap:64px;line-height:1}.searchbar .searchbar-button:focus-visible{z-index:1}.searchbar-button z-icon{--z-icon-width:var(--searchbar-button-icon-width);--z-icon-height:var(--searchbar-button-icon-width)}.suggestions-wrapper{position:absolute;z-index:4;top:3rem;left:50%;width:100vw;border-top:1px solid var(--gray200);margin-left:-50vw;background:#fff;box-shadow:var(--shadow-1)}.suggestions-wrapper.hidden{display:none}.suggestions{display:flex;width:100%;flex-direction:column;align-items:stretch;padding:var(--space-unit);margin:0 auto}.suggestion-head{padding:calc(var(--space-unit) * 0.75) var(--space-unit);color:var(--gray700);font-size:0.875rem;font-weight:var(--font-md);line-height:1.125rem}.suggestion{display:flex;padding:calc(var(--space-unit) * 0.75) var(--space-unit);color:var(--gray900);cursor:pointer;font-size:1rem;gap:var(--space-unit);line-height:1.5rem}.suggestion:hover,.suggestion[aria-selected='true']{background:var(--gray100)}.suggestion strong{font-weight:var(--font-bd)}.suggestion mark{background-color:var(--red50)}.suggestion z-icon{--z-icon-height:1.125rem;margin-top:0.125rem}.suggestions z-divider{margin:var(--space-unit) 0}@media (width < 1152px){.searchbar .searchbar-button>.searchbar-button-label{display:none}}@media (width >= 768px){.searchbar{--searchbar-button-x-padding:16px;--searchbar-button-icon-width:2rem}.searchbar .input-wrapper{gap:14px}.searchbar button[type='reset']{--z-icon-width:1.5rem;--z-icon-height:1.5rem}.searchbar input,.searchbar .searchbar-button{font-size:1.5rem}.searchbar .searchbar-button{padding:8px var(--searchbar-button-x-padding)}.suggestions{padding:var(--space-unit) calc(var(--space-unit) * 2)}}@media (width >= 1152px){.searchbar{--closed-searchbar-width:190px}}@media (width >= 1366px){.searchbar .searchbar-button{border-right:1px solid #000}.suggestions{max-width:1366px;padding:var(--space-unit) calc(var(--space-unit) * 3)}}`;
|
|
804
811
|
|
|
805
812
|
const ZanitSearchForm = class {
|
|
806
813
|
constructor(hostRef) {
|
|
@@ -845,10 +852,10 @@ const ZanitSearchForm = class {
|
|
|
845
852
|
}
|
|
846
853
|
onShowSuggestionsChange() {
|
|
847
854
|
this.activeSuggestion = '';
|
|
848
|
-
document.body.style.overflowX = this.showSuggestions ? 'hidden' : 'initial';
|
|
849
855
|
}
|
|
850
856
|
/** Emitted on search form submission. */
|
|
851
857
|
search;
|
|
858
|
+
/** Emitted when the search query is reset by the user (e.g. by clicking the reset button). */
|
|
852
859
|
resetSearch;
|
|
853
860
|
async connectedCallback() {
|
|
854
861
|
this.subjectsByArea = await getSubjectsByArea(this.searchEnv);
|
|
@@ -999,27 +1006,32 @@ const ZanitSearchForm = class {
|
|
|
999
1006
|
}))));
|
|
1000
1007
|
}
|
|
1001
1008
|
render() {
|
|
1002
|
-
return (index.h(index.Host, { key: '
|
|
1009
|
+
return (index.h(index.Host, { key: 'c87ecbcbff0205ddb35fb96bbfbcca6bb7ac8802' }, index.h("form", { key: '77f2951f88ae0361897161688f3a9875d555b20c', class: { 'searchbar': true, 'searchbar-open': this.showSearchbar }, ref: (el) => (this.formElement = el), role: "search", "aria-label": "Cerca nel sito", method: "get", action: "/ricerca", onSubmit: (event) => this.onSearchSubmit(event), onReset: () => this.resetSearchQuery() }, !!this.searchArea && (index.h("input", { key: '3cf0dceef1acc58c3c0e637f974db6c7587be081', type: "hidden", name: "area", value: this.searchArea })), index.h("div", { key: 'd797f9832f29b723010ca486298f0c4a4aabe3ee', class: "input-wrapper", role: "none" }, this.searchQuery && (index.h("button", { key: '2d5971957d84e83120fc96f49e359635e3792104', type: "reset", "aria-label": "Svuota campo di ricerca", disabled: !this.showSearchbar, "aria-hidden": !this.showSearchbar ? 'true' : undefined, tabIndex: !this.showSearchbar ? -1 : 0 }, index.h("z-icon", { key: '7027abe8c6a2211433048041a4ef2a5e273ca226', name: "multiply-circled" }))), index.h("input", { key: '2184d3fa615d94bf3615606a4624abdbb81cb2ae', id: "searchbar-input", name: "q", type: "search", disabled: !this.showSearchbar, placeholder: "Cerca per parola chiave o ISBN", value: this.searchQuery, required: true, autocomplete: "off", role: "combobox", "aria-autocomplete": "list", "aria-expanded": this.showSuggestions ? 'true' : 'false', "aria-controls": "search-suggestions", "aria-activedescendant": this.activeSuggestion, "aria-label": "Cerca per parola chiave o ISBN", "aria-hidden": !this.showSearchbar ? 'true' : undefined, tabIndex: !this.showSearchbar ? -1 : 0, onInput: (event) => this.handleInputChange(event), onKeyDown: (e) => {
|
|
1003
1010
|
// INFO: prevent ESC from clearing input
|
|
1004
1011
|
if (isEscKey(e)) {
|
|
1005
1012
|
e.preventDefault();
|
|
1006
1013
|
}
|
|
1007
1014
|
this.handleSuggestionsNav(e);
|
|
1008
|
-
} })), index.h("button", { key: '
|
|
1015
|
+
} })), index.h("button", { key: '06a7ad6e3e4c74f2dd3bd56fb6f2da006c8d59c0', class: "searchbar-button", "aria-label": this.showSearchbar ? 'Esegui ricerca' : 'Apri il campo di ricerca', "aria-controls": "searchbar-input", type: this.showSearchbar ? 'submit' : 'button', onClick: () => this.openSearchbar() }, this.showSearchbar ? null : index.h("span", { class: "searchbar-button-label" }, "Cerca"), index.h("z-icon", { key: '72e66f0280f0b835e760c1631076b71fa5dc03fa', name: "search" }))), this.renderSuggestions()));
|
|
1009
1016
|
}
|
|
1010
1017
|
static get watchers() { return {
|
|
1011
|
-
"searchQuery": [
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
"
|
|
1018
|
+
"searchQuery": [{
|
|
1019
|
+
"onSearchQueryChange": 0
|
|
1020
|
+
}],
|
|
1021
|
+
"searchArea": [{
|
|
1022
|
+
"onSearchAreaChange": 0
|
|
1023
|
+
}],
|
|
1024
|
+
"showSearchbar": [{
|
|
1025
|
+
"onShowSearchbarChange": 0
|
|
1026
|
+
}],
|
|
1027
|
+
"showSuggestions": [{
|
|
1028
|
+
"onShowSuggestionsChange": 0
|
|
1029
|
+
}]
|
|
1015
1030
|
}; }
|
|
1016
1031
|
};
|
|
1017
|
-
ZanitSearchForm.style = searchFormCss;
|
|
1032
|
+
ZanitSearchForm.style = searchFormCss();
|
|
1018
1033
|
|
|
1019
1034
|
exports.zanit_back_to_top = ZanitBackTop;
|
|
1020
1035
|
exports.zanit_menubar = ZanitMenubar;
|
|
1021
1036
|
exports.zanit_mobile_menubar = ZanitMobileMenubar;
|
|
1022
1037
|
exports.zanit_search_form = ZanitSearchForm;
|
|
1023
|
-
//# sourceMappingURL=zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.cjs.js.map
|
|
1024
|
-
|
|
1025
|
-
//# sourceMappingURL=zanit-back-to-top_4.cjs.entry.js.map
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
"components/menubar/mobile-menubar/mobile-menubar.js",
|
|
6
6
|
"components/menubar/search-form/search-form.js"
|
|
7
7
|
],
|
|
8
|
+
"mixins": [],
|
|
8
9
|
"compiler": {
|
|
9
10
|
"name": "@stencil/core",
|
|
10
|
-
"version": "4.
|
|
11
|
-
"typescriptVersion": "5.
|
|
11
|
+
"version": "4.43.4",
|
|
12
|
+
"typescriptVersion": "5.8.3"
|
|
12
13
|
},
|
|
13
14
|
"collections": [],
|
|
14
15
|
"bundles": []
|
|
@@ -51,7 +51,7 @@ export class ZanitBackTop {
|
|
|
51
51
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '8db557141277e71d6d2fdaad2e525df03fb78461', class: { hidden: !this.showFab }, "aria-hidden": this.showFab ? 'false' : 'true' }, h("button", { key: 'e9a1cfcc75c39e6a5d657712306e331bbfabbcf9', class: { 'z-fab': true, 'z-fab-extended': !this.isMobile }, onClick: () => this.scroll() }, h("z-icon", { key: 'c83accba15ee2efbbef5f17cdbb92c57f7aee0a0', name: "back-top" }), h("span", { key: '59167788a06ac2b45b4e91c944c0fefd1dc79780' }, "Torna su"))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "zanit-back-to-top"; }
|
|
57
57
|
static get encapsulation() { return "scoped"; }
|
|
@@ -69,7 +69,6 @@ export class ZanitBackTop {
|
|
|
69
69
|
return {
|
|
70
70
|
"pageMinHeight": {
|
|
71
71
|
"type": "number",
|
|
72
|
-
"attribute": "page-min-height",
|
|
73
72
|
"mutable": false,
|
|
74
73
|
"complexType": {
|
|
75
74
|
"original": "number",
|
|
@@ -85,11 +84,11 @@ export class ZanitBackTop {
|
|
|
85
84
|
"getter": false,
|
|
86
85
|
"setter": false,
|
|
87
86
|
"reflect": false,
|
|
87
|
+
"attribute": "page-min-height",
|
|
88
88
|
"defaultValue": "1600"
|
|
89
89
|
},
|
|
90
90
|
"scrollMinHeight": {
|
|
91
91
|
"type": "number",
|
|
92
|
-
"attribute": "scroll-min-height",
|
|
93
92
|
"mutable": false,
|
|
94
93
|
"complexType": {
|
|
95
94
|
"original": "number",
|
|
@@ -105,6 +104,7 @@ export class ZanitBackTop {
|
|
|
105
104
|
"getter": false,
|
|
106
105
|
"setter": false,
|
|
107
106
|
"reflect": false,
|
|
107
|
+
"attribute": "scroll-min-height",
|
|
108
108
|
"defaultValue": "800"
|
|
109
109
|
}
|
|
110
110
|
};
|
|
@@ -127,4 +127,3 @@ export class ZanitBackTop {
|
|
|
127
127
|
}];
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
//# sourceMappingURL=back-to-top.js.map
|
|
@@ -35,4 +35,3 @@ export const Menu = ({ controlledBy, items, currentPath = [], onItemKeyDown }) =
|
|
|
35
35
|
'active': isActive(item),
|
|
36
36
|
}, href: item.href, role: "menuitem", tabIndex: -1, "aria-current": isActive(item) ? 'page' : 'false', onKeyDown: (event) => onItemKeyDown(event), target: item.target }, item.label))))))))))));
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=menu.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, h } from "@stencil/core";
|
|
2
2
|
import { containsTarget, moveFocus } from "../../utils";
|
|
3
|
-
import { Menu } from "./menu/menu";
|
|
4
3
|
import { SearchEnv } from "../../utils/subjects.api";
|
|
4
|
+
import { Menu } from "./menu/menu";
|
|
5
5
|
/**
|
|
6
6
|
* Main menubar component. Each item can have a menu with subitems
|
|
7
7
|
* When a main menubar item is the current active one, a sub-menubar is shown and each subitem can have a menu with subitems.
|
|
@@ -410,7 +410,6 @@ export class ZanitMenubar {
|
|
|
410
410
|
return {
|
|
411
411
|
"data": {
|
|
412
412
|
"type": "string",
|
|
413
|
-
"attribute": "data",
|
|
414
413
|
"mutable": false,
|
|
415
414
|
"complexType": {
|
|
416
415
|
"original": "Promise<MenubarItem[]> | MenubarItem[] | URL | string",
|
|
@@ -423,7 +422,8 @@ export class ZanitMenubar {
|
|
|
423
422
|
"MenubarItem": {
|
|
424
423
|
"location": "import",
|
|
425
424
|
"path": "../../utils",
|
|
426
|
-
"id": "src/utils/index.ts::MenubarItem"
|
|
425
|
+
"id": "src/utils/index.ts::MenubarItem",
|
|
426
|
+
"referenceLocation": "MenubarItem"
|
|
427
427
|
},
|
|
428
428
|
"URL": {
|
|
429
429
|
"location": "global",
|
|
@@ -439,11 +439,11 @@ export class ZanitMenubar {
|
|
|
439
439
|
},
|
|
440
440
|
"getter": false,
|
|
441
441
|
"setter": false,
|
|
442
|
-
"reflect": false
|
|
442
|
+
"reflect": false,
|
|
443
|
+
"attribute": "data"
|
|
443
444
|
},
|
|
444
445
|
"current": {
|
|
445
446
|
"type": "string",
|
|
446
|
-
"attribute": "current",
|
|
447
447
|
"mutable": false,
|
|
448
448
|
"complexType": {
|
|
449
449
|
"original": "string | undefined",
|
|
@@ -459,11 +459,11 @@ export class ZanitMenubar {
|
|
|
459
459
|
"getter": false,
|
|
460
460
|
"setter": false,
|
|
461
461
|
"reflect": false,
|
|
462
|
+
"attribute": "current",
|
|
462
463
|
"defaultValue": "undefined"
|
|
463
464
|
},
|
|
464
465
|
"searchQuery": {
|
|
465
466
|
"type": "string",
|
|
466
|
-
"attribute": "search-query",
|
|
467
467
|
"mutable": true,
|
|
468
468
|
"complexType": {
|
|
469
469
|
"original": "string | undefined",
|
|
@@ -479,11 +479,11 @@ export class ZanitMenubar {
|
|
|
479
479
|
"getter": false,
|
|
480
480
|
"setter": false,
|
|
481
481
|
"reflect": false,
|
|
482
|
+
"attribute": "search-query",
|
|
482
483
|
"defaultValue": "undefined"
|
|
483
484
|
},
|
|
484
485
|
"searchEnv": {
|
|
485
486
|
"type": "string",
|
|
486
|
-
"attribute": "search-env",
|
|
487
487
|
"mutable": false,
|
|
488
488
|
"complexType": {
|
|
489
489
|
"original": "SearchEnv",
|
|
@@ -492,7 +492,8 @@ export class ZanitMenubar {
|
|
|
492
492
|
"SearchEnv": {
|
|
493
493
|
"location": "import",
|
|
494
494
|
"path": "../../utils/subjects.api",
|
|
495
|
-
"id": "src/utils/subjects.api.ts::SearchEnv"
|
|
495
|
+
"id": "src/utils/subjects.api.ts::SearchEnv",
|
|
496
|
+
"referenceLocation": "SearchEnv"
|
|
496
497
|
}
|
|
497
498
|
}
|
|
498
499
|
},
|
|
@@ -505,11 +506,11 @@ export class ZanitMenubar {
|
|
|
505
506
|
"getter": false,
|
|
506
507
|
"setter": false,
|
|
507
508
|
"reflect": false,
|
|
509
|
+
"attribute": "search-env",
|
|
508
510
|
"defaultValue": "SearchEnv.PROD"
|
|
509
511
|
},
|
|
510
512
|
"searchArea": {
|
|
511
513
|
"type": "string",
|
|
512
|
-
"attribute": "search-area",
|
|
513
514
|
"mutable": false,
|
|
514
515
|
"complexType": {
|
|
515
516
|
"original": "string | undefined",
|
|
@@ -524,7 +525,8 @@ export class ZanitMenubar {
|
|
|
524
525
|
},
|
|
525
526
|
"getter": false,
|
|
526
527
|
"setter": false,
|
|
527
|
-
"reflect": false
|
|
528
|
+
"reflect": false,
|
|
529
|
+
"attribute": "search-area"
|
|
528
530
|
}
|
|
529
531
|
};
|
|
530
532
|
}
|
|
@@ -585,4 +587,3 @@ export class ZanitMenubar {
|
|
|
585
587
|
}];
|
|
586
588
|
}
|
|
587
589
|
}
|
|
588
|
-
//# sourceMappingURL=menubar.js.map
|