@zanichelli/albe-web-components 6.1.0 → 6.2.0
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-e3299e0a.js +34 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +53 -0
- package/dist/cjs/z-app-header_2.cjs.entry.js +153 -0
- package/dist/cjs/z-app-switcher.cjs.entry.js +29 -0
- package/dist/cjs/z-app-topbar.cjs.entry.js +41 -0
- package/dist/cjs/z-divider.cjs.entry.js +26 -0
- package/dist/cjs/z-input-label_2.cjs.entry.js +19 -3
- package/dist/cjs/z-input_2.cjs.entry.js +253 -0
- package/dist/cjs/z-link.cjs.entry.js +74 -0
- package/dist/cjs/{z-list_2.cjs.entry.js → z-list_3.cjs.entry.js} +51 -4
- package/dist/cjs/z-logo.cjs.entry.js +26 -0
- package/dist/cjs/{z-app-switcher_9.cjs.entry.js → z-range-picker.cjs.entry.js} +11 -439
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/inputs/z-select/index.js +35 -2
- package/dist/collection/components/inputs/z-select/styles.css +4 -0
- package/dist/collection/components/z-anchor-navigation/index.js +95 -0
- package/dist/collection/components/z-anchor-navigation/styles.css +118 -0
- package/dist/esm/index-a2ca4b97.js +34 -10
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-39ca028c.js → utils-9e81727a.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +49 -0
- package/dist/esm/z-app-header_2.entry.js +148 -0
- package/dist/esm/z-app-switcher.entry.js +25 -0
- package/dist/esm/z-app-topbar.entry.js +37 -0
- package/dist/esm/z-chip.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/z-divider.entry.js +22 -0
- package/dist/esm/z-file-upload.entry.js +1 -1
- package/dist/esm/z-input-deprecated.entry.js +1 -1
- package/dist/esm/z-input-label_2.entry.js +20 -4
- package/dist/esm/z-input_2.entry.js +248 -0
- package/dist/esm/z-link.entry.js +70 -0
- package/dist/esm/{z-list_2.entry.js → z-list_3.entry.js} +51 -5
- package/dist/esm/z-logo.entry.js +22 -0
- package/dist/esm/z-menu-dropdown_2.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-pagination-bar.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +1 -1
- package/dist/esm/z-popover-deprecated.entry.js +1 -1
- package/dist/esm/z-popover.entry.js +1 -1
- package/dist/esm/{z-app-switcher_9.entry.js → z-range-picker.entry.js} +3 -423
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +1 -1
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/types/beans/index.d.ts +1 -0
- package/dist/types/components/inputs/z-select/index.d.ts +3 -0
- package/dist/types/components/z-anchor-navigation/index.d.ts +39 -0
- package/dist/types/components.d.ts +23 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-87fdd14f.js → p-16da5460.js} +1 -1
- package/dist/web-components-library/p-1cb23bbb.entry.js +1 -0
- package/dist/web-components-library/p-2774ab29.entry.js +1 -0
- package/dist/web-components-library/{p-23781e2b.entry.js → p-3ba1b96e.entry.js} +1 -1
- package/{www/build/p-ff18690f.entry.js → dist/web-components-library/p-40e0d384.entry.js} +1 -1
- package/dist/web-components-library/{p-5d4a6659.entry.js → p-41e2bb0f.entry.js} +1 -1
- package/dist/web-components-library/{p-ccf67abf.entry.js → p-4d93268a.entry.js} +1 -1
- package/dist/web-components-library/{p-35ceae27.entry.js → p-5c02e500.entry.js} +1 -1
- package/dist/web-components-library/{p-a6d6178a.entry.js → p-6b11cc16.entry.js} +1 -1
- package/dist/web-components-library/{p-1bd6592f.entry.js → p-7dd5431f.entry.js} +1 -1
- package/dist/web-components-library/{p-10b46635.entry.js → p-7ebdeefa.entry.js} +1 -1
- package/dist/web-components-library/p-9434d80c.entry.js +1 -0
- package/dist/web-components-library/{p-982254e5.entry.js → p-a17b363e.entry.js} +1 -1
- package/dist/web-components-library/p-a329f5ff.entry.js +1 -0
- package/dist/web-components-library/p-ae79573a.entry.js +1 -0
- package/dist/web-components-library/{p-3913bff2.entry.js → p-c3f29701.entry.js} +1 -1
- package/dist/web-components-library/{p-79b8d87e.entry.js → p-c75e80fb.entry.js} +1 -1
- package/dist/web-components-library/p-cea1f402.entry.js +1 -0
- package/dist/web-components-library/p-d572a365.entry.js +1 -0
- package/dist/web-components-library/{p-5c9556e3.entry.js → p-d5f6bf94.entry.js} +1 -1
- package/dist/web-components-library/{p-a79cc147.entry.js → p-db5a98d1.entry.js} +1 -1
- package/dist/web-components-library/{p-3a431f04.entry.js → p-dc2ca41d.entry.js} +1 -1
- package/{www/build/p-d3733579.entry.js → dist/web-components-library/p-e731914a.entry.js} +1 -1
- package/dist/web-components-library/p-e8fbb103.entry.js +1 -0
- package/dist/web-components-library/p-f0653e72.entry.js +1 -0
- package/dist/web-components-library/{p-4e733fbd.entry.js → p-f260c62b.entry.js} +1 -1
- package/dist/web-components-library/p-f8ef69c4.entry.js +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +4 -3
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-87fdd14f.js → p-16da5460.js} +1 -1
- package/www/build/p-1cb23bbb.entry.js +1 -0
- package/www/build/p-2774ab29.entry.js +1 -0
- package/www/build/{p-23781e2b.entry.js → p-3ba1b96e.entry.js} +1 -1
- package/{dist/web-components-library/p-ff18690f.entry.js → www/build/p-40e0d384.entry.js} +1 -1
- package/www/build/{p-5d4a6659.entry.js → p-41e2bb0f.entry.js} +1 -1
- package/www/build/{p-ccf67abf.entry.js → p-4d93268a.entry.js} +1 -1
- package/www/build/p-4d9ae314.js +1 -0
- package/www/build/{p-35ceae27.entry.js → p-5c02e500.entry.js} +1 -1
- package/www/build/{p-a6d6178a.entry.js → p-6b11cc16.entry.js} +1 -1
- package/www/build/{p-1bd6592f.entry.js → p-7dd5431f.entry.js} +1 -1
- package/www/build/{p-10b46635.entry.js → p-7ebdeefa.entry.js} +1 -1
- package/www/build/p-9434d80c.entry.js +1 -0
- package/www/build/{p-982254e5.entry.js → p-a17b363e.entry.js} +1 -1
- package/www/build/p-a329f5ff.entry.js +1 -0
- package/www/build/p-ae79573a.entry.js +1 -0
- package/www/build/{p-3913bff2.entry.js → p-c3f29701.entry.js} +1 -1
- package/www/build/{p-79b8d87e.entry.js → p-c75e80fb.entry.js} +1 -1
- package/www/build/p-cea1f402.entry.js +1 -0
- package/www/build/p-d572a365.entry.js +1 -0
- package/www/build/{p-5c9556e3.entry.js → p-d5f6bf94.entry.js} +1 -1
- package/www/build/{p-a79cc147.entry.js → p-db5a98d1.entry.js} +1 -1
- package/www/build/{p-3a431f04.entry.js → p-dc2ca41d.entry.js} +1 -1
- package/{dist/web-components-library/p-d3733579.entry.js → www/build/p-e731914a.entry.js} +1 -1
- package/www/build/p-e8fbb103.entry.js +1 -0
- package/www/build/p-f0653e72.entry.js +1 -0
- package/www/build/{p-4e733fbd.entry.js → p-f260c62b.entry.js} +1 -1
- package/www/build/p-f8ef69c4.entry.js +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -24
- package/dist/cjs/z-app-header.cjs.entry.js +0 -133
- package/dist/cjs/z-list-group.cjs.entry.js +0 -54
- package/dist/esm/z-app-header.entry.js +0 -129
- package/dist/esm/z-list-group.entry.js +0 -50
- package/dist/web-components-library/p-5f3baf14.entry.js +0 -1
- package/dist/web-components-library/p-bb95b82f.entry.js +0 -1
- package/dist/web-components-library/p-cbb3ea13.entry.js +0 -1
- package/dist/web-components-library/p-edf0195b.entry.js +0 -1
- package/www/build/p-36654297.js +0 -1
- package/www/build/p-5f3baf14.entry.js +0 -1
- package/www/build/p-bb95b82f.entry.js +0 -1
- package/www/build/p-cbb3ea13.entry.js +0 -1
- package/www/build/p-edf0195b.entry.js +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3299e0a.js');
|
|
6
|
+
const index$1 = require('./index-199cd650.js');
|
|
7
|
+
const breakpoints = require('./breakpoints-88c4fd6c.js');
|
|
8
|
+
|
|
9
|
+
const stylesCss = ":host{position:sticky;z-index:99;top:0;display:block;height:calc(var(--space-unit) * 6);box-sizing:border-box;padding:calc(var(--space-unit) / 2) calc(var(--space-unit) * 2);background-color:var(--gray900);border-radius:var(--border-no-radius)}:host(.light){background-color:var(--color-white)}:host>div{display:flex;align-items:center;justify-content:space-between}:host(.limited-width) #content-container{--mw:none;max-width:var(--mw);margin:auto}.content-panel{display:flex;align-items:center}.content-panel>:not(:last-child){margin-right:calc(var(--space-unit) * 2)}#divider-container{display:none}z-link{font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:20px}@media only screen and (min-width: 768px){:host{padding:var(--space-unit) calc(var(--space-unit) * 2) var(--space-unit) var(--space-unit)}:host(.limited-width){padding:var(--space-unit)}#divider-container{display:block;height:calc(var(--space-unit) * 3)}}";
|
|
10
|
+
|
|
11
|
+
const ZAppTopbar = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
/** theme variant, default 'dark' */
|
|
15
|
+
this.theme = index$1.ThemeVariant.DARK;
|
|
16
|
+
this.topbarLinks = [];
|
|
17
|
+
}
|
|
18
|
+
handleResize() {
|
|
19
|
+
this.isMobile = window.innerWidth <= breakpoints.mobileBreakpoint;
|
|
20
|
+
}
|
|
21
|
+
componentWillLoad() {
|
|
22
|
+
this.isMobile = window.screen.width <= breakpoints.mobileBreakpoint || window.innerWidth <= breakpoints.mobileBreakpoint;
|
|
23
|
+
}
|
|
24
|
+
componentWillRender() {
|
|
25
|
+
if (this.topbarContent) {
|
|
26
|
+
this.topbarLinks = typeof this.topbarContent === "string" ? JSON.parse(this.topbarContent) : this.topbarContent;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
renderTopbarLinks() {
|
|
30
|
+
return this.topbarLinks.map((link) => (index.h("z-link", { htmlid: link.id, textcolor: this.theme === index$1.ThemeVariant.LIGHT ? "black" : "white", href: link.link, target: link.target, icon: this.isMobile ? link.icon : undefined }, !this.isMobile && link.label)));
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return (index.h(index.Host, { class: {
|
|
34
|
+
[this.theme]: true,
|
|
35
|
+
"limited-width": !!this.contentMaxWidth,
|
|
36
|
+
} }, index.h("div", { id: "content-container", style: this.contentMaxWidth ? { "--mw": `${this.contentMaxWidth}px` } : {} }, index.h("div", { id: "left-panel", class: "content-panel" }, index.h("z-logo", { mobileLogo: this.isMobile, width: this.isMobile ? 32 : 128, height: this.isMobile ? 40 : 32, imageAlt: "zanichelli-logo", link: this.logoLink, targetBlank: true }), this.isMobile && this.renderTopbarLinks()), index.h("div", { id: "right-panel", class: "content-panel" }, !this.isMobile && this.renderTopbarLinks(), this.showAppSwitcher && index.h("z-app-switcher", { theme: this.theme }), index.h("div", { id: "divider-container" }, index.h("z-divider", { orientation: index$1.DividerOrientation.VERTICAL, color: this.theme === index$1.ThemeVariant.LIGHT ? "gray800" : "color-white" })), index.h("slot", { name: "login" })))));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
ZAppTopbar.style = stylesCss;
|
|
40
|
+
|
|
41
|
+
exports.z_app_topbar = ZAppTopbar;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3299e0a.js');
|
|
6
|
+
const index$1 = require('./index-199cd650.js');
|
|
7
|
+
|
|
8
|
+
const stylesCss = ".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";
|
|
9
|
+
|
|
10
|
+
const ZDivider = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
/** [optional] Divider size */
|
|
14
|
+
this.size = index$1.DividerSize.SMALL;
|
|
15
|
+
/** [optional] Divider color */
|
|
16
|
+
this.color = "gray200";
|
|
17
|
+
/** [optional] Divider orintation */
|
|
18
|
+
this.orientation = index$1.DividerOrientation.HORIZONTAL;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (index.h(index.Host, { class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
ZDivider.style = stylesCss;
|
|
25
|
+
|
|
26
|
+
exports.z_divider = ZDivider;
|
|
@@ -21,7 +21,7 @@ const ZInputLabel = class {
|
|
|
21
21
|
};
|
|
22
22
|
ZInputLabel.style = stylesCss$1;
|
|
23
23
|
|
|
24
|
-
const stylesCss = ".sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select span.sc-z-select{display:block;padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select span.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}";
|
|
24
|
+
const stylesCss = ".sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select span.sc-z-select{display:block;padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select span.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}";
|
|
25
25
|
|
|
26
26
|
const ZSelect = class {
|
|
27
27
|
constructor(hostRef) {
|
|
@@ -220,7 +220,7 @@ const ZSelect = class {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
renderInput() {
|
|
223
|
-
return (index.h("z-input", { id: `${this.htmlid}_input`, htmlid: `${this.htmlid}_input`, placeholder: this.placeholder, value: !this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, "") : null, label: this.label, "aria-label": this.ariaLabel, icon: this.isOpen ? "caret-up" : "caret-down", hasclearicon: this.hasAutocomplete(), message: false, disabled: this.disabled, readonly: this.readonly || (!this.hasAutocomplete() && this.isOpen), status: this.isOpen ? undefined : this.status, onClick: (e) => {
|
|
223
|
+
return (index.h("z-input", { id: `${this.htmlid}_input`, htmlid: `${this.htmlid}_input`, placeholder: this.placeholder, value: !this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, "") : null, label: this.label, "aria-label": this.ariaLabel, icon: this.isOpen ? "caret-up" : "caret-down", hasclearicon: this.hasAutocomplete(), message: false, disabled: this.disabled, readonly: this.readonly || (!this.hasAutocomplete() && this.isOpen), status: this.isOpen ? undefined : this.status, autocomplete: "off", onClick: (e) => {
|
|
224
224
|
this.handleInputClick(e);
|
|
225
225
|
}, onKeyUp: (e) => {
|
|
226
226
|
if (e.keyCode !== 13) {
|
|
@@ -245,7 +245,7 @@ const ZSelect = class {
|
|
|
245
245
|
readonly: this.readonly,
|
|
246
246
|
filled: !!this.selectedItem,
|
|
247
247
|
[`input-${this.status}`]: !this.isOpen && !!this.status,
|
|
248
|
-
} }, this.renderSelectUlItems()))));
|
|
248
|
+
} }, this.hasGroupItems ? this.renderSelectGroupItems() : this.renderSelectUlItems()))));
|
|
249
249
|
}
|
|
250
250
|
renderSelectUlItems() {
|
|
251
251
|
if (!this.itemsList.length) {
|
|
@@ -255,6 +255,22 @@ const ZSelect = class {
|
|
|
255
255
|
return (index.h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: index$1.ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": !!item.selected, id: `${this.htmlid}_${key}`, onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, index.h("span", { class: { selected: !!item.selected }, innerHTML: item.name })));
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
+
renderSelectGroupItems() {
|
|
259
|
+
if (!this.itemsList.length) {
|
|
260
|
+
return this.renderNoSearchResults();
|
|
261
|
+
}
|
|
262
|
+
const newData = this.itemsList.reduce((group, item, index$2) => {
|
|
263
|
+
var _a;
|
|
264
|
+
const { category } = item;
|
|
265
|
+
const zListItem = (index.h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: index$1.ListDividerType.HEADER, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": !!item.selected, id: `${this.htmlid}_${index$2}`, onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, index$2) }, index.h("span", { class: { selected: !!item.selected }, innerHTML: item.name })));
|
|
266
|
+
group[category] = (_a = group[category]) !== null && _a !== void 0 ? _a : [];
|
|
267
|
+
group[category].push(zListItem);
|
|
268
|
+
return group;
|
|
269
|
+
}, {});
|
|
270
|
+
return Object.entries(newData).map(([key, value]) => {
|
|
271
|
+
return (index.h("z-list-group", { "divider-type": index$1.ListDividerType.ELEMENT }, index.h("z-body", { class: "z-list-group-title", level: 3, slot: "header-title", variant: "semibold" }, key), value.map((item) => item)));
|
|
272
|
+
});
|
|
273
|
+
}
|
|
258
274
|
renderNoSearchResults() {
|
|
259
275
|
return (index.h("z-list-element", { color: "blue500", class: "no-results" }, index.h("z-icon", { name: "multiply-circle", fill: "blue500" }), this.noresultslabel));
|
|
260
276
|
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3299e0a.js');
|
|
6
|
+
const index$1 = require('./index-199cd650.js');
|
|
7
|
+
const utils = require('./utils-ce225fb3.js');
|
|
8
|
+
require('./breakpoints-88c4fd6c.js');
|
|
9
|
+
|
|
10
|
+
const stylesCss$1 = ".sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{box-sizing:border-box;border:var(--border-size-small) solid var(--color-surface04);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--color-text02);fill:var(--color-icon02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}input.sc-z-input:focus:focus-visible,.textarea-wrapper.sc-z-input:focus-within{box-shadow:var(--shadow-focus-primary)}input.sc-z-input:focus:focus-visible,textarea.sc-z-input:focus:focus-visible{color:var(--color-primary01)}.filled.sc-z-input{border-color:var(--color-surface05)}.input-success.sc-z-input{border-color:var(--color-success01);background:var(--color-success-inverse);fill:var(--color-success01)}.input-error.sc-z-input{border-color:var(--color-error01);background:var(--color-error-inverse);fill:var(--color-error01)}.input-warning.sc-z-input{border-color:var(--color-warning01);background:var(--color-warning-inverse);fill:var(--color-warning01)}input.sc-z-input:hover,.textarea-wrapper.sc-z-input:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) .textarea-wrapper.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) z-icon.sc-z-input{border-color:var(--color-disabled01);box-shadow:none;color:var(--color-disabled02);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input:hover{border-width:var(--border-size-small)}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input:placeholder{color:var(--color-text05)}label.input-label.sc-z-input{display:block;padding-bottom:var(--space-unit);color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}[disabled].sc-z-input-h:not([disabled=\"false\"]) label.input-label.sc-z-input{color:var(--color-disabled02)}.text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--color-icon02)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:flex;pointer-events:none;transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:hover,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:focus,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:active{background-clip:text !important}.textarea-wrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{width:100%;min-height:132px;padding:0;border:none;margin:0;resize:none}.radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:inline-flex;flex-direction:row;align-items:center;color:var(--color-text01);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:inline-flex;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input{color:var(--color-disabled02)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input>z-icon.sc-z-input{cursor:default;fill:var(--color-disabled01)}";
|
|
11
|
+
|
|
12
|
+
const ZInput = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.inputChange = index.createEvent(this, "inputChange", 7);
|
|
16
|
+
this.startTyping = index.createEvent(this, "startTyping", 7);
|
|
17
|
+
this.stopTyping = index.createEvent(this, "stopTyping", 7);
|
|
18
|
+
this.inputCheck = index.createEvent(this, "inputCheck", 7);
|
|
19
|
+
/** the id of the input element */
|
|
20
|
+
this.htmlid = `id-${utils.randomId()}`;
|
|
21
|
+
/** the input aria-label */
|
|
22
|
+
this.ariaLabel = "";
|
|
23
|
+
/** the input is disabled */
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
/** the input is readonly */
|
|
26
|
+
this.readonly = false;
|
|
27
|
+
/** the input is required (optional): available for text, password, number, email, textarea, checkbox */
|
|
28
|
+
this.required = false;
|
|
29
|
+
/** checked: available for checkbox, radio */
|
|
30
|
+
this.checked = false;
|
|
31
|
+
/** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */
|
|
32
|
+
this.message = true;
|
|
33
|
+
/** the input label position: available for checkbox, radio */
|
|
34
|
+
this.labelPosition = index$1.LabelPosition.RIGHT;
|
|
35
|
+
/** render clear icon when typing (optional): available for text */
|
|
36
|
+
this.hasclearicon = true;
|
|
37
|
+
this.isTyping = false;
|
|
38
|
+
this.passwordHidden = true;
|
|
39
|
+
this.typingtimeout = 300;
|
|
40
|
+
}
|
|
41
|
+
inputCheckListener(e) {
|
|
42
|
+
const data = e.detail;
|
|
43
|
+
switch (this.type) {
|
|
44
|
+
case index$1.InputType.RADIO:
|
|
45
|
+
if (data.type === index$1.InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {
|
|
46
|
+
this.checked = false;
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/** get checked status */
|
|
52
|
+
async isChecked() {
|
|
53
|
+
switch (this.type) {
|
|
54
|
+
case index$1.InputType.CHECKBOX:
|
|
55
|
+
case index$1.InputType.RADIO:
|
|
56
|
+
return this.checked;
|
|
57
|
+
default:
|
|
58
|
+
console.warn("`isChecked` method is only available for type `checkbox` and `radio`");
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
emitInputChange(value) {
|
|
63
|
+
if (!this.isTyping) {
|
|
64
|
+
this.emitStartTyping();
|
|
65
|
+
}
|
|
66
|
+
let validity;
|
|
67
|
+
if (this.type === index$1.InputType.TEXTAREA) {
|
|
68
|
+
validity = this.getValidity("textarea");
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
validity = this.getValidity("input");
|
|
72
|
+
}
|
|
73
|
+
this.value = value;
|
|
74
|
+
this.inputChange.emit({ value, validity });
|
|
75
|
+
clearTimeout(this.timer);
|
|
76
|
+
this.timer = setTimeout(() => {
|
|
77
|
+
this.emitStopTyping(this.value, validity);
|
|
78
|
+
}, this.typingtimeout);
|
|
79
|
+
}
|
|
80
|
+
emitStartTyping() {
|
|
81
|
+
this.isTyping = true;
|
|
82
|
+
this.startTyping.emit();
|
|
83
|
+
}
|
|
84
|
+
emitStopTyping(value, validity) {
|
|
85
|
+
this.isTyping = false;
|
|
86
|
+
this.stopTyping.emit({
|
|
87
|
+
value: value,
|
|
88
|
+
validity: validity,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
emitInputCheck(checked) {
|
|
92
|
+
this.inputCheck.emit({
|
|
93
|
+
id: this.htmlid,
|
|
94
|
+
checked: checked,
|
|
95
|
+
type: this.type,
|
|
96
|
+
name: this.name,
|
|
97
|
+
value: this.value,
|
|
98
|
+
validity: this.getValidity("input"),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getValidity(type) {
|
|
102
|
+
const input = this.hostElement.querySelector(type);
|
|
103
|
+
return input.validity;
|
|
104
|
+
}
|
|
105
|
+
/* START text/password/email/number */
|
|
106
|
+
getTextAttributes() {
|
|
107
|
+
return {
|
|
108
|
+
id: this.htmlid,
|
|
109
|
+
name: this.name,
|
|
110
|
+
placeholder: this.placeholder,
|
|
111
|
+
value: this.value,
|
|
112
|
+
disabled: this.disabled,
|
|
113
|
+
readonly: this.readonly,
|
|
114
|
+
required: this.required,
|
|
115
|
+
title: this.htmltitle,
|
|
116
|
+
class: {
|
|
117
|
+
[`input-${this.status}`]: !!this.status,
|
|
118
|
+
filled: !!this.value,
|
|
119
|
+
},
|
|
120
|
+
autocomplete: this.autocomplete,
|
|
121
|
+
onInput: (e) => this.emitInputChange(e.target.value),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
getNumberAttributes(type) {
|
|
125
|
+
if (type != index$1.InputType.NUMBER) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
min: this.min,
|
|
130
|
+
max: this.max,
|
|
131
|
+
step: this.step,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
getPatternAttribute(type) {
|
|
135
|
+
if (type != index$1.InputType.PASSWORD &&
|
|
136
|
+
type != index$1.InputType.TEXT &&
|
|
137
|
+
type != index$1.InputType.TEL &&
|
|
138
|
+
type != index$1.InputType.SEARCH &&
|
|
139
|
+
type != index$1.InputType.URL &&
|
|
140
|
+
type != index$1.InputType.EMAIL) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
pattern: this.pattern,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
renderInputText(type = index$1.InputType.TEXT) {
|
|
148
|
+
const attr = Object.assign(Object.assign(Object.assign({}, this.getTextAttributes()), this.getNumberAttributes(type)), this.getPatternAttribute(type));
|
|
149
|
+
if (this.icon || type === index$1.InputType.PASSWORD) {
|
|
150
|
+
Object.assign(attr.class, { "has-icon": true });
|
|
151
|
+
}
|
|
152
|
+
if (this.hasclearicon && type != index$1.InputType.NUMBER) {
|
|
153
|
+
Object.assign(attr.class, { "has-clear-icon": true });
|
|
154
|
+
}
|
|
155
|
+
return (index.h("div", { class: "text-wrapper" }, this.renderLabel(), index.h("div", null, index.h("input", Object.assign({ type: type === index$1.InputType.PASSWORD && !this.passwordHidden ? index$1.InputType.TEXT : type }, attr, { "aria-label": this.ariaLabel || this.label })), this.renderIcons()), this.renderMessage()));
|
|
156
|
+
}
|
|
157
|
+
renderLabel() {
|
|
158
|
+
if (!this.label) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
return (index.h("label", { class: "input-label body-5-sb", id: `${this.htmlid}_label`, htmlFor: this.htmlid, "aria-label": this.label }, this.label));
|
|
162
|
+
}
|
|
163
|
+
renderIcons() {
|
|
164
|
+
return (index.h("span", { class: "icons-wrapper" }, this.renderResetIcon(), this.renderIcon()));
|
|
165
|
+
}
|
|
166
|
+
renderIcon() {
|
|
167
|
+
if (this.type === index$1.InputType.PASSWORD) {
|
|
168
|
+
return this.renderShowHidePassword();
|
|
169
|
+
}
|
|
170
|
+
if (!this.icon) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
return (index.h("button", { type: "button", class: "icon-button input-icon", tabIndex: -1 }, index.h("z-icon", { name: this.icon })));
|
|
174
|
+
}
|
|
175
|
+
renderResetIcon() {
|
|
176
|
+
if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == index$1.InputType.NUMBER) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
return (index.h("button", { type: "button", class: "icon-button reset-icon", "aria-label": "cancella il contenuto dell'input", onClick: () => this.emitInputChange("") }, index.h("z-icon", { name: "multiply" })));
|
|
180
|
+
}
|
|
181
|
+
renderShowHidePassword() {
|
|
182
|
+
return (index.h("button", { type: "button", class: "icon-button toggle-password-icon", disabled: this.disabled, "aria-label": this.passwordHidden ? "mostra password" : "nascondi password", onClick: () => (this.passwordHidden = !this.passwordHidden) }, index.h("z-icon", { name: this.passwordHidden ? "view-filled" : "view-off-filled" })));
|
|
183
|
+
}
|
|
184
|
+
renderMessage() {
|
|
185
|
+
if (utils.boolean(this.message) === false) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
return (index.h("z-input-message", { message: utils.boolean(this.message) === true ? undefined : this.message, status: this.status }));
|
|
189
|
+
}
|
|
190
|
+
/* END text/password/email/number */
|
|
191
|
+
/* START textarea */
|
|
192
|
+
renderTextarea() {
|
|
193
|
+
const attributes = this.getTextAttributes();
|
|
194
|
+
return (index.h("div", { class: "text-wrapper" }, this.renderLabel(), index.h("div", { class: Object.assign(Object.assign({}, attributes.class), { "textarea-wrapper": true, "readonly": attributes.readonly }) }, index.h("textarea", Object.assign({}, attributes, { "aria-label": this.ariaLabel || this.label }))), this.renderMessage()));
|
|
195
|
+
}
|
|
196
|
+
/* END textarea */
|
|
197
|
+
handleCheck(ev) {
|
|
198
|
+
this.checked = ev.target.checked;
|
|
199
|
+
this.emitInputCheck(this.checked);
|
|
200
|
+
}
|
|
201
|
+
/* START checkbox */
|
|
202
|
+
renderCheckbox() {
|
|
203
|
+
return (index.h("div", { class: "checkbox-wrapper" }, index.h("input", { id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }), index.h("label", { htmlFor: this.htmlid, class: {
|
|
204
|
+
"checkbox-label": true,
|
|
205
|
+
"after": this.labelPosition === index$1.LabelPosition.RIGHT,
|
|
206
|
+
"before": this.labelPosition === index$1.LabelPosition.LEFT,
|
|
207
|
+
} }, index.h("z-icon", { name: this.checked ? "checkbox-checked" : "checkbox", "aria-hidden": "true" }), this.label && index.h("span", { innerHTML: this.label }))));
|
|
208
|
+
}
|
|
209
|
+
/* END checkbox */
|
|
210
|
+
/* START radio */
|
|
211
|
+
renderRadio() {
|
|
212
|
+
return (index.h("div", { class: "radio-wrapper" }, index.h("input", { id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }), index.h("label", { htmlFor: this.htmlid, class: {
|
|
213
|
+
"radio-label": true,
|
|
214
|
+
"after": this.labelPosition === index$1.LabelPosition.RIGHT,
|
|
215
|
+
"before": this.labelPosition === index$1.LabelPosition.LEFT,
|
|
216
|
+
} }, index.h("z-icon", { name: this.checked ? "radio-button-checked" : "radio-button", "aria-hidden": "true" }), this.label && index.h("span", { innerHTML: this.label }))));
|
|
217
|
+
}
|
|
218
|
+
/* END radio */
|
|
219
|
+
render() {
|
|
220
|
+
switch (this.type) {
|
|
221
|
+
case index$1.InputType.TEXTAREA:
|
|
222
|
+
return this.renderTextarea();
|
|
223
|
+
case index$1.InputType.CHECKBOX:
|
|
224
|
+
return this.renderCheckbox();
|
|
225
|
+
case index$1.InputType.RADIO:
|
|
226
|
+
return this.renderRadio();
|
|
227
|
+
default:
|
|
228
|
+
return this.renderInputText(this.type);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
get hostElement() { return index.getElement(this); }
|
|
232
|
+
};
|
|
233
|
+
ZInput.style = stylesCss$1;
|
|
234
|
+
|
|
235
|
+
const stylesCss = ":host{display:flex;min-height:calc(var(--space-unit) * 2.5);align-items:start;margin-top:var(--space-unit);color:var(--color-text05);fill:currentcolor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host([status=\"success\"]){color:var(--color-text-success)}:host([status=\"error\"]){color:var(--color-text-error)}:host([status=\"warning\"]){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);--z-icon-right-margin:var(--space-unit)}";
|
|
236
|
+
|
|
237
|
+
const ZInputMessage = class {
|
|
238
|
+
constructor(hostRef) {
|
|
239
|
+
index.registerInstance(this, hostRef);
|
|
240
|
+
this.statusIcons = {
|
|
241
|
+
success: "checkmark-circle",
|
|
242
|
+
error: "multiply-circled",
|
|
243
|
+
warning: "exclamation-circle",
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
render() {
|
|
247
|
+
return (index.h(index.Host, { role: "alert", "aria-label": this.message, tabindex: this.message ? 0 : -1 }, this.statusIcons[this.status] && this.message && index.h("z-icon", { name: this.statusIcons[this.status] }), index.h("span", { innerHTML: this.message })));
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
ZInputMessage.style = stylesCss;
|
|
251
|
+
|
|
252
|
+
exports.z_input = ZInput;
|
|
253
|
+
exports.z_input_message = ZInputMessage;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3299e0a.js');
|
|
6
|
+
|
|
7
|
+
const stylesCss = ":host{--font-size-link:inherit;--font-weight-link:inherit;font-family:var(--font-family-sans);font-size:var(--font-size-link);font-weight:var(--font-weight-link);line-height:inherit;outline:none}:host([big]){--font-size-link:16px;--font-weight-link:var(--font-sb)}a{display:inline-flex;align-items:center;padding:calc(var(--space-unit) * 0.5) 0;border-top:var(--border-size-medium) solid transparent;border-bottom:var(--border-size-medium) solid transparent;color:var(--color-link-primary);cursor:pointer;fill:var(--color-link-primary);text-decoration:none}a:hover,a:focus,a:active{text-decoration:underline}a.active{color:var(--color-active-link);fill:var(--color-active-link)}a:hover,a:focus{color:var(--color-hover-link);fill:var(--color-hover-link)}a:active{color:var(--color-pressed-link);fill:var(--color-pressed-link)}a:visited{color:var(--color-visited-link);fill:var(--color-visited-link)}a.disabled,a.inverse.disabled{color:var(--color-disabled03);cursor:default;fill:var(--color-disabled03);pointer-events:none}a.underline,a.underline:active,a.underline:hover,a.underline:visited,a.underline.disabled,a.underline.black,a.underline.white{text-decoration:underline}a.disabled,a.disabled:active,a.disabled:visited,a.disabled:hover{text-decoration:none}a.inverse{color:var(--color-inverse-link);fill:var(--color-inverse-link)}a.inverse.active{color:var(--color-inverse-active-link);fill:var(--color-inverse-active-link)}a.inverse:hover,a.inverse:focus{color:var(--color-inverse-hover-link);fill:var(--color-inverse-hover-link)}a.inverse:active{color:var(--color-inverse-pressed-link);fill:var(--color-inverse-pressed-link)}a.inverse:visited{color:var(--color-inverse-visited-link);fill:var(--color-inverse-visited-link)}a.black{color:var(--gray800);fill:var(--gray800);text-decoration:none}a.black:hover,a.black.active{color:var(--color-black);fill:var(--color-black)}a.black:visited{color:var(--gray800);fill:var(--gray800)}a.black:hover,a.black:focus,a.black:active{text-decoration:underline}a.black:active{color:var(--gray700);fill:var(--gray700)}a.white,a.white:active,a.white:hover,a.white.active{color:var(--bg-white);fill:var(--bg-white);text-decoration:none}a.white:visited{color:var(--bg-white);fill:var(--bg-white)}a.white:hover,a.white:focus,a.white:active{text-decoration:underline}a.white.disabled,a.black.disabled{color:var(--gray500);fill:var(--gray500)}a>z-icon:first-child{margin-right:var(--space-unit)}a>z-icon:last-child{margin-left:var(--space-unit)}";
|
|
8
|
+
|
|
9
|
+
const ZLink = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.zLinkClick = index.createEvent(this, "zLinkClick", 7);
|
|
13
|
+
/** link target (optional) */
|
|
14
|
+
this.target = "_self";
|
|
15
|
+
/** tabindex link attribute (optional) */
|
|
16
|
+
this.htmltabindex = 0;
|
|
17
|
+
/** disable link flag (optional) */
|
|
18
|
+
this.isdisabled = false;
|
|
19
|
+
/** active link flag (optional) */
|
|
20
|
+
this.isactive = false;
|
|
21
|
+
/** white variant flag (optional) */
|
|
22
|
+
this.iswhite = false;
|
|
23
|
+
/** link text variant (optional) */
|
|
24
|
+
this.textcolor = "primary";
|
|
25
|
+
/** big link version */
|
|
26
|
+
this.big = false;
|
|
27
|
+
/** link icon position (optional) */
|
|
28
|
+
this.iconposition = "left";
|
|
29
|
+
/** draw underline on text (optional) */
|
|
30
|
+
this.underline = false;
|
|
31
|
+
this.iconSize = 18;
|
|
32
|
+
this.emitZLinkClick = this.emitZLinkClick.bind(this);
|
|
33
|
+
this.emitZLinkInteraction = this.emitZLinkInteraction.bind(this);
|
|
34
|
+
}
|
|
35
|
+
componentWillLoad() {
|
|
36
|
+
if (this.iswhite) {
|
|
37
|
+
console.warn("z-link iswhite prop is deprecated and will be dropped in a next release, please use textcolor prop instead");
|
|
38
|
+
}
|
|
39
|
+
if (this.big) {
|
|
40
|
+
console.warn("z-link big prop is deprecated and will be dropped in a next release, please override --font-size-link and --font-weight-link variables instead");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
emitZLinkClick(e, linkId) {
|
|
44
|
+
this.emitZLinkInteraction(e, linkId);
|
|
45
|
+
}
|
|
46
|
+
emitZLinkInteraction(e, linkId) {
|
|
47
|
+
this.zLinkClick.emit({ e, linkId });
|
|
48
|
+
}
|
|
49
|
+
componentDidLoad() {
|
|
50
|
+
if (this.icon) {
|
|
51
|
+
const height = parseFloat(window.getComputedStyle(this.hostElement).getPropertyValue("font-size"));
|
|
52
|
+
const currentSize = this.big ? 18 : Math.round(height * 1.125);
|
|
53
|
+
if (!Number.isNaN(currentSize) && this.iconSize !== currentSize) {
|
|
54
|
+
this.iconSize = currentSize;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
return (index.h("a", { id: this.htmlid, href: this.href ? this.href : null, class: {
|
|
60
|
+
disabled: this.isdisabled,
|
|
61
|
+
active: this.isactive,
|
|
62
|
+
white: this.iswhite,
|
|
63
|
+
[this.textcolor || ""]: true,
|
|
64
|
+
underline: this.underline,
|
|
65
|
+
}, target: this.target, role: this.href ? "link" : "button", tabindex: this.isdisabled ? -1 : this.htmltabindex, onClick: (e) => this.emitZLinkClick(e, this.htmlid) }, this.iconposition === "right" && index.h("slot", null), this.icon && (index.h("z-icon", { style: {
|
|
66
|
+
"--z-icon-width": `${this.iconSize}px`,
|
|
67
|
+
"--z-icon-height": `${this.iconSize}px`,
|
|
68
|
+
}, name: this.icon })), this.iconposition === "left" && index.h("slot", null)));
|
|
69
|
+
}
|
|
70
|
+
get hostElement() { return index.getElement(this); }
|
|
71
|
+
};
|
|
72
|
+
ZLink.style = stylesCss;
|
|
73
|
+
|
|
74
|
+
exports.z_link = ZLink;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-e3299e0a.js');
|
|
6
6
|
const index$1 = require('./index-199cd650.js');
|
|
7
7
|
|
|
8
|
-
const stylesCss$
|
|
8
|
+
const stylesCss$2 = ":host{display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";
|
|
9
9
|
|
|
10
10
|
const ZList = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -29,9 +29,9 @@ const ZList = class {
|
|
|
29
29
|
}
|
|
30
30
|
get host() { return index.getElement(this); }
|
|
31
31
|
};
|
|
32
|
-
ZList.style = stylesCss$
|
|
32
|
+
ZList.style = stylesCss$2;
|
|
33
33
|
|
|
34
|
-
const stylesCss = ":host{outline:none}:host>.container,:host>.container-contextual-menu{--background-color-list-element:var(--bg-white);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size=\"small\"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size=\"medium\"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size=\"large\"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size=\"x-large\"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([expandable])>.container-contextual-menu,:host([clickable])>.container,:host([clickable])>.container-contextual-menu{cursor:pointer}:host([expandable]:hover)>.container,:host([expandable]:hover)>.container-contextual-menu,:host([clickable]:hover)>.container,:host([clickable]:hover)>.container-contextual-menu{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([expandable]:focus:focus-visible)>.container-contextual-menu,:host([clickable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container-contextual-menu{box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([expandable]:active)>.container-contextual-menu,:host([clickable]:active)>.container,:host([clickable]:active)>.container-contextual-menu{background-color:var(--background-active-color-list-element)}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container,:host>.container-contextual-menu>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded,:host>.container-contextual-menu>.z-list-element-inner-container.expanded{display:block}:host([clickable]:hover)>.container-contextual-menu{background-color:var(--color-surface03)}.container-contextual-menu:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}";
|
|
34
|
+
const stylesCss$1 = ":host{outline:none}:host>.container,:host>.container-contextual-menu{--background-color-list-element:var(--bg-white);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size=\"small\"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size=\"medium\"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size=\"large\"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size=\"x-large\"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([expandable])>.container-contextual-menu,:host([clickable])>.container,:host([clickable])>.container-contextual-menu{cursor:pointer}:host([expandable]:hover)>.container,:host([expandable]:hover)>.container-contextual-menu,:host([clickable]:hover)>.container,:host([clickable]:hover)>.container-contextual-menu{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([expandable]:focus:focus-visible)>.container-contextual-menu,:host([clickable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container-contextual-menu{box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([expandable]:active)>.container-contextual-menu,:host([clickable]:active)>.container,:host([clickable]:active)>.container-contextual-menu{background-color:var(--background-active-color-list-element)}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container,:host>.container-contextual-menu>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded,:host>.container-contextual-menu>.z-list-element-inner-container.expanded{display:block}:host([clickable]:hover)>.container-contextual-menu{background-color:var(--color-surface03)}.container-contextual-menu:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}";
|
|
35
35
|
|
|
36
36
|
const ZListElement = class {
|
|
37
37
|
/**
|
|
@@ -173,7 +173,54 @@ const ZListElement = class {
|
|
|
173
173
|
}
|
|
174
174
|
get host() { return index.getElement(this); }
|
|
175
175
|
};
|
|
176
|
-
ZListElement.style = stylesCss;
|
|
176
|
+
ZListElement.style = stylesCss$1;
|
|
177
|
+
|
|
178
|
+
const stylesCss = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:var(--space-unit);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}";
|
|
179
|
+
|
|
180
|
+
const ZListGroup = class {
|
|
181
|
+
constructor(hostRef) {
|
|
182
|
+
index.registerInstance(this, hostRef);
|
|
183
|
+
/**
|
|
184
|
+
* [optional] Sets size of inside elements.
|
|
185
|
+
*/
|
|
186
|
+
this.size = index$1.ListSize.MEDIUM;
|
|
187
|
+
/**
|
|
188
|
+
* [optional] Sets the position where to insert the divider.
|
|
189
|
+
*/
|
|
190
|
+
this.dividerType = index$1.ListDividerType.NONE;
|
|
191
|
+
/**
|
|
192
|
+
* [optional] Sets the divider size.
|
|
193
|
+
*/
|
|
194
|
+
this.dividerSize = index$1.DividerSize.SMALL;
|
|
195
|
+
/**
|
|
196
|
+
* [optional] Sets the divider color.
|
|
197
|
+
*/
|
|
198
|
+
this.dividerColor = "gray200";
|
|
199
|
+
}
|
|
200
|
+
componentDidLoad() {
|
|
201
|
+
const children = this.host.children;
|
|
202
|
+
for (let i = 0; i < children.length; i++) {
|
|
203
|
+
if (children.length - 1 > i) {
|
|
204
|
+
children[i].setAttribute("divider-type", this.dividerType);
|
|
205
|
+
children[i].setAttribute("divider-size", this.dividerSize);
|
|
206
|
+
children[i].setAttribute("divider-color", this.dividerColor);
|
|
207
|
+
}
|
|
208
|
+
children[i].setAttribute("size", this.size);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
componentWillLoad() {
|
|
212
|
+
this.hasHeader = !!this.host.querySelector('[slot="header-title"]');
|
|
213
|
+
}
|
|
214
|
+
render() {
|
|
215
|
+
return (index.h(index.Host, { role: "group" }, index.h("div", { class: {
|
|
216
|
+
"z-list-group-header-container": true,
|
|
217
|
+
"has-header": this.hasHeader,
|
|
218
|
+
} }, index.h("slot", { name: "header-title" }), this.dividerType === index$1.ListDividerType.HEADER && (index.h("z-divider", { color: this.dividerColor, size: this.dividerSize }))), index.h("slot", null)));
|
|
219
|
+
}
|
|
220
|
+
get host() { return index.getElement(this); }
|
|
221
|
+
};
|
|
222
|
+
ZListGroup.style = stylesCss;
|
|
177
223
|
|
|
178
224
|
exports.z_list = ZList;
|
|
179
225
|
exports.z_list_element = ZListElement;
|
|
226
|
+
exports.z_list_group = ZListGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3299e0a.js');
|
|
6
|
+
|
|
7
|
+
const stylesCss = ":host{display:inline-block;width:255px;height:64px;vertical-align:top}img{display:block;width:100%;height:100%;margin:auto;content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='255px' height='64px' viewBox='0 0 255 64'%3E%3Cg id='Logo/Zanichelli/Centered-(reworked)' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Group'%3E%3Cpolygon id='Background' fill='%23E2001A' points='1.70530257e-13 64 254.39 64 254.39 0 1.70530257e-13 0'%3E%3C/polygon%3E%3Cpath d='M233.36,51.3553859 L242.390252,51.3553859 L242.390252,12.6427292 L233.36,12.6427292 L233.36,51.3553859 Z M211.120346,51.3553859 L230.477617,51.3553859 L230.477617,44.5040053 L220.685891,44.5040053 L220.685891,12.6427292 L211.120346,12.6427292 L211.120346,51.3553859 Z M188.880124,51.3553859 L208.23551,51.3553859 L208.23551,44.5040053 L198.445669,44.5040053 L198.445669,12.6427292 L188.880124,12.6427292 L188.880124,51.3553859 Z M165.354444,12.6427292 L165.354444,51.3553859 L185.999058,51.3553859 L185.999058,44.5021204 L175.027425,44.5021204 L175.027425,35.1778343 L185.377062,35.1778343 L185.377062,28.2699086 L175.027425,28.2699086 L175.027425,19.4978796 L185.999058,19.4978796 L185.999058,12.6427292 L165.354444,12.6427292 Z M136.666196,51.3553859 L146.239281,51.3553859 L146.239281,35.1778343 L152.902178,35.1778343 L152.902178,51.3553859 L162.473377,51.3553859 L162.473377,12.6427292 L152.902178,12.6427292 L152.902178,28.2717934 L146.239281,28.2717934 L146.239281,12.6427292 L136.666196,12.6427292 L136.666196,51.3553859 Z M96.064744,51.3553859 L105.098765,51.3553859 L105.098765,12.6427292 L96.064744,12.6427292 L96.064744,51.3553859 Z M53.2364527,36.5160682 L50.6824993,19.7429083 L48.0757704,36.5160682 L53.2364527,36.5160682 Z M65.4935444,51.3553859 L56.2710395,51.3553859 L54.9441146,42.5286966 L47.7101121,42.5286966 L46.3304118,51.3553859 L37.1060221,51.3553859 L45.0053718,12.6427292 L57.5960795,12.6427292 L65.4935444,51.3553859 Z M85.0468382,37.7581755 L76.7969089,12.6427292 L67.3764961,12.6427292 L67.3764961,51.3553859 L75.4040147,51.3553859 L75.4040147,26.132504 L83.5955141,51.3553859 L93.1855622,51.3553859 L93.1855622,12.6427292 L85.0468382,12.6427292 L85.0468382,37.7581755 Z M107.977948,32 C107.977948,34.5200264 107.977948,36.7893695 108.187165,39.1246819 C108.396382,41.4713034 108.818585,43.6878711 109.678071,45.6009801 C111.423429,49.487513 114.932995,52 121.708982,52 C129.508435,52 133.787014,48.4753558 133.787014,38.0220526 L133.787014,37.5640373 L124.937707,37.5640373 L124.922628,38.0050891 C124.894356,38.7571388 124.884931,39.6185091 124.826501,40.4855339 C124.769956,41.3431345 124.66629,42.1875412 124.460843,42.9301668 C124.048064,44.3965696 123.279051,45.3559514 121.708982,45.3559514 C117.743286,45.3559514 117.057205,42.0574875 117.057205,32 C117.057205,21.9425125 117.743286,18.6440486 121.708982,18.6440486 C123.605127,18.6440486 124.547546,20.0030157 124.547546,25.1806616 L124.547546,25.6424465 L133.344077,25.6424465 L133.361041,25.1995099 C133.689003,16.7855998 130.235982,12 121.708982,12 C114.934879,12 111.427199,14.4823297 109.678071,18.3594383 C108.818585,20.265008 108.396382,22.4778061 108.187165,24.830082 C107.977948,27.1710489 107.977948,29.4554707 107.977948,32 L107.977948,32 Z M34.9007634,12.6446141 L34.9007634,20.3196683 L21.6051268,44.5040053 L35.2268401,44.5040053 L35.2268401,51.3553859 L12,51.3553859 L12,43.7915371 L25.2975214,19.4997644 L13.683159,19.4997644 L13.683159,12.6446141 L34.9007634,12.6446141 Z' id='Logotipo-(reworked)' fill='%23FFFFFF'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}a{display:block;width:100%;height:100%}:host(.mobile){width:31px;height:40px}:host(.mobile) img{content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='31px' height='40px' viewBox='0 0 31 40'%3E%3Cg id='Symbols' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Topbar/Mobile/Logged' transform='translate(-16.000000, -4.000000)'%3E%3Cg id='Group' transform='translate(16.000000, 4.000000)'%3E%3Cpolygon id='Fill-1' fill='%23E2001A' points='0 40 30.625 40 30.625 0 0 0'%3E%3C/polygon%3E%3Cpolygon id='Fill-2' fill='%23FEFEFE' points='8.17111587 6.20689655 23.4311708 6.20689655 23.4311708 11.671267 13.8691261 28.9163861 23.6647727 28.9163861 23.6647727 33.7931034 6.96022727 33.7931034 6.96022727 28.408218 16.522272 11.0831673 8.17111587 11.0831673'%3E%3C/polygon%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}";
|
|
8
|
+
|
|
9
|
+
const ZLogo = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
const style = {};
|
|
15
|
+
if (this.width) {
|
|
16
|
+
style["width"] = style["max-width"] = `${this.width}px`;
|
|
17
|
+
}
|
|
18
|
+
if (this.height) {
|
|
19
|
+
style["height"] = style["max-height"] = `${this.height}px`;
|
|
20
|
+
}
|
|
21
|
+
return (index.h(index.Host, { style: style, class: { mobile: !!this.mobileLogo } }, this.link ? (index.h("a", { href: this.link, target: this.targetBlank ? "_blank" : "_self" }, index.h("img", { alt: this.imageAlt }))) : (index.h("img", { alt: this.imageAlt }))));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
ZLogo.style = stylesCss;
|
|
25
|
+
|
|
26
|
+
exports.z_logo = ZLogo;
|