@zanichelli/albe-web-components 7.2.0 → 7.3.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 +10 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header_2.cjs.entry.js +152 -0
- package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
- package/dist/cjs/z-button.cjs.entry.js +43 -0
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-chip.cjs.entry.js +6 -3
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +25 -4
- package/dist/cjs/z-list_3.cjs.entry.js +1 -1
- package/dist/cjs/z-menu-section.cjs.entry.js +11 -3
- package/dist/cjs/z-menu.cjs.entry.js +26 -14
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +13 -1
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card_4.cjs.entry.js +2 -2
- package/dist/cjs/z-offcanvas.cjs.entry.js +57 -0
- package/dist/cjs/z-searchbar.cjs.entry.js +12 -3
- package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-button.cjs.entry.js +4 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/buttons/z-button-sort/index.js +2 -2
- package/dist/collection/components/buttons/z-button-sort/styles.css +1 -1
- package/dist/collection/components/buttons/z-chip/index.js +25 -3
- package/dist/collection/components/buttons/z-chip/styles.css +28 -21
- package/dist/collection/components/buttons/z-toggle-button/index.js +21 -1
- package/dist/collection/components/buttons/z-toggle-button/styles.css +1 -3
- package/dist/collection/components/indicators/z-stepper-item/styles.css +1 -1
- package/dist/collection/components/inputs/z-searchbar/index.js +76 -3
- package/dist/collection/components/inputs/z-searchbar/styles.css +23 -0
- package/dist/collection/components/list/z-list-element/index.js +1 -1
- package/dist/collection/components/modal/z-modal/index.js +43 -4
- package/dist/collection/components/navigation/z-app-header/index.js +14 -15
- package/dist/collection/components/navigation/z-app-header/styles.css +2 -3
- package/dist/collection/components/navigation/z-menu/index.js +45 -21
- package/dist/collection/components/navigation/z-menu/styles.css +80 -13
- package/dist/collection/components/navigation/z-menu-section/index.js +13 -4
- package/dist/collection/components/navigation/z-menu-section/styles.css +37 -4
- package/dist/collection/components/notification/z-toast-notification/index.js +1 -1
- package/dist/collection/components/z-card/index.js +9 -0
- package/dist/collection/components/z-card/styles.css +1 -1
- package/dist/collection/components/z-offcanvas/index.js +39 -23
- package/dist/collection/components/z-offcanvas/styles.css +5 -5
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +13 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +12 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/styles.css +1 -1
- package/dist/collection/utils/storybook-utils.js +1 -1
- package/dist/esm/index-a2ca4b97.js +10 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_2.entry.js +147 -0
- package/dist/esm/z-button-sort.entry.js +1 -1
- package/dist/esm/z-button.entry.js +39 -0
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-chip.entry.js +7 -4
- package/dist/esm/z-dragdrop-area_2.entry.js +25 -4
- package/dist/esm/z-list_3.entry.js +1 -1
- package/dist/esm/z-menu-section.entry.js +11 -3
- package/dist/esm/z-menu.entry.js +26 -14
- package/dist/esm/z-myz-card-footer.entry.js +14 -2
- package/dist/esm/z-myz-card-icon.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +2 -2
- package/dist/esm/z-offcanvas.entry.js +53 -0
- package/dist/esm/z-searchbar.entry.js +13 -4
- package/dist/esm/z-stepper-item.entry.js +1 -1
- package/dist/esm/z-toggle-button.entry.js +4 -2
- package/dist/types/components/buttons/z-button-sort/index.d.ts +2 -2
- package/dist/types/components/buttons/z-chip/index.d.ts +2 -0
- package/dist/types/components/buttons/z-toggle-button/index.d.ts +2 -0
- package/dist/types/components/inputs/z-searchbar/index.d.ts +7 -1
- package/dist/types/components/modal/z-modal/index.d.ts +4 -0
- package/dist/types/components/navigation/z-app-header/index.d.ts +2 -4
- package/dist/types/components/navigation/z-menu/index.d.ts +13 -5
- package/dist/types/components/navigation/z-menu-section/index.d.ts +9 -3
- package/dist/types/components/notification/z-toast-notification/index.d.ts +1 -1
- package/dist/types/components/z-card/index.d.ts +9 -0
- package/dist/types/components/z-offcanvas/index.d.ts +4 -1
- package/dist/types/components.d.ts +65 -17
- package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +2 -0
- package/dist/web-components-library/p-068951a7.entry.js +1 -0
- package/dist/web-components-library/p-06b7dad4.entry.js +1 -0
- package/dist/web-components-library/{p-417b1b6c.entry.js → p-10adc1fa.entry.js} +1 -1
- package/dist/web-components-library/p-1570917d.entry.js +1 -0
- package/dist/web-components-library/p-157aea3b.entry.js +1 -0
- package/dist/web-components-library/p-1c8e7c24.entry.js +1 -0
- package/dist/web-components-library/p-20682781.entry.js +1 -0
- package/dist/web-components-library/{p-ede9fbf5.entry.js → p-6736e894.entry.js} +1 -1
- package/dist/web-components-library/{p-810bd730.entry.js → p-9db2bf11.entry.js} +1 -1
- package/dist/web-components-library/p-af283478.entry.js +1 -0
- package/dist/web-components-library/p-c722c5a4.entry.js +1 -0
- package/dist/web-components-library/p-d0760bb1.entry.js +1 -0
- package/dist/web-components-library/p-deda8776.entry.js +1 -0
- package/dist/web-components-library/p-f3a8cc14.entry.js +1 -0
- package/dist/web-components-library/{p-05ced71c.entry.js → p-f5a99b28.entry.js} +1 -1
- package/dist/web-components-library/{p-c081e1f4.entry.js → p-f9f42d17.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.css +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +2 -3
- package/readme.md +0 -1
- package/www/build/p-068951a7.entry.js +1 -0
- package/www/build/p-06b7dad4.entry.js +1 -0
- package/www/build/{p-417b1b6c.entry.js → p-10adc1fa.entry.js} +1 -1
- package/www/build/p-1570917d.entry.js +1 -0
- package/www/build/p-157aea3b.entry.js +1 -0
- package/www/build/p-1c8e7c24.entry.js +1 -0
- package/www/build/p-20682781.entry.js +1 -0
- package/www/build/{p-ede9fbf5.entry.js → p-6736e894.entry.js} +1 -1
- package/www/build/p-77d28b14.js +1 -0
- package/www/build/{p-810bd730.entry.js → p-9db2bf11.entry.js} +1 -1
- package/www/build/p-ab4e13f7.css +1 -0
- package/www/build/p-af283478.entry.js +1 -0
- package/www/build/p-c722c5a4.entry.js +1 -0
- package/www/build/p-d0760bb1.entry.js +1 -0
- package/www/build/p-deda8776.entry.js +1 -0
- package/www/build/p-f3a8cc14.entry.js +1 -0
- package/www/build/{p-05ced71c.entry.js → p-f5a99b28.entry.js} +1 -1
- package/www/build/{p-c081e1f4.entry.js → p-f9f42d17.entry.js} +1 -1
- package/www/build/web-components-library.css +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -37
- package/CHANGELOG.md +0 -2337
- package/dist/cjs/z-app-header.cjs.entry.js +0 -133
- package/dist/cjs/z-button_3.cjs.entry.js +0 -108
- package/dist/esm/z-app-header.entry.js +0 -129
- package/dist/esm/z-button_3.entry.js +0 -102
- package/dist/web-components-library/p-029e4fba.entry.js +0 -1
- package/dist/web-components-library/p-14a6abe4.entry.js +0 -1
- package/dist/web-components-library/p-19ca449e.entry.js +0 -1
- package/dist/web-components-library/p-3a9cc467.entry.js +0 -1
- package/dist/web-components-library/p-73d9489b.entry.js +0 -1
- package/dist/web-components-library/p-9d03a7d6.entry.js +0 -1
- package/dist/web-components-library/p-f158d205.entry.js +0 -1
- package/dist/web-components-library/p-f95cc914.entry.js +0 -1
- package/dist/web-components-library/p-fa4c203a.entry.js +0 -1
- package/dist/web-components-library/p-fffb14e1.entry.js +0 -1
- package/src-react/index.ts +0 -1
- package/www/build/p-029e4fba.entry.js +0 -1
- package/www/build/p-14a6abe4.entry.js +0 -1
- package/www/build/p-19ca449e.entry.js +0 -1
- package/www/build/p-275801c6.css +0 -1
- package/www/build/p-3a9cc467.entry.js +0 -1
- package/www/build/p-73d9489b.entry.js +0 -1
- package/www/build/p-811ee64f.js +0 -1
- package/www/build/p-9d03a7d6.entry.js +0 -1
- package/www/build/p-f158d205.entry.js +0 -1
- package/www/build/p-f95cc914.entry.js +0 -1
- package/www/build/p-fa4c203a.entry.js +0 -1
- package/www/build/p-fffb14e1.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
|
|
2
2
|
|
|
3
|
-
const stylesCss = ":host{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host([active]) .label
|
|
3
|
+
const stylesCss = ":host{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host(:is([active],[open])) .label,.label:hover{border-color:var(--color-secondary01)}:is(:host(:is([active],[open])) .label,.label:hover) ::slotted(*){font-weight:var(--font-bd)}.label{display:flex;width:100%;align-items:center;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border:0;border-bottom:var(--border-size-small) solid var(--color-surface05);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-icon02)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) * 0.5);padding-bottom:calc(var(--space-unit) * 2)}.items>::slotted([slot=\"item\"]){display:inline-flex;padding:calc(var(--space-unit) * 0.5);margin:0;font-size:var(--font-size-2);line-height:1.4;outline:none}.items>::slotted([slot=\"item\"]:last-child){padding-bottom:0}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-secondary01)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"][active]){color:var(--color-secondary01);font-weight:var(--font-bd)}";
|
|
4
4
|
|
|
5
5
|
const ZMenuSection = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -27,13 +27,21 @@ const ZMenuSection = class {
|
|
|
27
27
|
* Check if some content slot is set.
|
|
28
28
|
*/
|
|
29
29
|
checkContent() {
|
|
30
|
-
this.hasContent =
|
|
30
|
+
this.hasContent = this.hostElement.querySelectorAll('[slot="item"]').length > 0;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
|
|
34
|
+
* @param ev Slotchange event
|
|
35
|
+
*/
|
|
36
|
+
onLabelSlotChange(ev) {
|
|
37
|
+
const labelElement = ev.target.assignedElements()[0];
|
|
38
|
+
labelElement.dataset.text = (labelElement === null || labelElement === void 0 ? void 0 : labelElement.innerText) || null;
|
|
31
39
|
}
|
|
32
40
|
componentWillLoad() {
|
|
33
41
|
this.checkContent();
|
|
34
42
|
}
|
|
35
43
|
render() {
|
|
36
|
-
return (h(Host, { role: "menu", open: this.open }, h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot",
|
|
44
|
+
return (h(Host, { role: "menu", open: this.open }, h("button", { class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot", { onSlotchange: this.onLabelSlotChange.bind(this) }), this.hasContent && h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })), this.open && (h("div", { class: "items" }, h("slot", { name: "item", onSlotchange: this.checkContent.bind(this) })))));
|
|
37
45
|
}
|
|
38
46
|
get hostElement() { return getElement(this); }
|
|
39
47
|
};
|
package/dist/esm/z-menu.entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
|
|
2
2
|
|
|
3
|
-
const stylesCss = ":host,::slotted(*),*{box-sizing:border-box}:host{position:relative;display:inline-flex;flex-direction:column}::slotted(a){
|
|
3
|
+
const stylesCss = ":host,::slotted(*),*{box-sizing:border-box}:host{position:relative;display:inline-flex;flex-direction:column}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg);letter-spacing:0.36px}.menu-label{padding:0;border:0;margin:0;background:transparent;border-radius:0;color:inherit;outline:none;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-within{z-index:1;padding-right:calc(var(--space-unit) * 0.5);padding-left:calc(var(--space-unit) * 0.5);margin-right:calc(var(--space-unit) * -0.5);margin-left:calc(var(--space-unit) * -0.5);box-shadow:var(--shadow-focus-primary)}.menu-label .menu-label-content{position:relative;display:flex;align-items:center}:host(:is([active],[open])) .menu-label-content,.menu-label .menu-label-content:hover,.menu-label:focus-within .menu-label-content{font-weight:var(--font-bd)}:host(:is([active],[open])) .menu-label-content ::slotted(*),.menu-label .menu-label-content:hover ::slotted(*),.menu-label:focus-within .menu-label-content ::slotted(*){letter-spacing:normal}:host(:is([active],[open],[vertical-context])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{position:absolute;bottom:0;left:0;width:100%;content:\"\";pointer-events:none}:host([vertical-context]) .menu-label-content::after{height:var(--border-size-small);background-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{height:var(--border-size-large);background-color:var(--color-secondary01)}::slotted([data-text])::after{height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}::slotted([data-text]){display:inline-flex;flex-direction:column}.menu-label .menu-label-content ::slotted(*){display:inline-flex;width:100%;margin:0;appearance:none;font-size:var(--font-size-5);font-weight:inherit;line-height:1.2;outline:none}.menu-label .menu-label-content ::slotted(*),.menu-label .menu-label-content z-icon{padding:var(--space-unit) 0}.menu-label .menu-label-content z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:var(--color-icon02)}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot=\"header\"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot=\"header\"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot=\"item\"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25;outline:none}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot=\"item\"]:not(z-menu-section)){padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--color-surface05)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:active){border-color:var(--color-secondary01);font-weight:var(--font-bd)}";
|
|
4
4
|
|
|
5
5
|
const ZMenu = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -11,16 +11,18 @@ const ZMenu = class {
|
|
|
11
11
|
* Flag to set the display mode of the list.
|
|
12
12
|
* If true, the list will be absolutely positioned under the menu label,
|
|
13
13
|
* stacked beneath it otherwise.
|
|
14
|
-
* @default false
|
|
15
14
|
*/
|
|
16
15
|
this.floating = false;
|
|
16
|
+
/** The opening state of the menu. */
|
|
17
|
+
this.open = false;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
* Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).
|
|
20
|
+
* A small border is placed under it as a separator from other elements.
|
|
20
21
|
*/
|
|
21
|
-
this.
|
|
22
|
+
this.verticalContext = false;
|
|
22
23
|
this.toggle = this.toggle.bind(this);
|
|
23
24
|
this.checkContent = this.checkContent.bind(this);
|
|
25
|
+
this.onLabelSlotChange = this.onLabelSlotChange.bind(this);
|
|
24
26
|
this.onItemsChange = this.onItemsChange.bind(this);
|
|
25
27
|
}
|
|
26
28
|
toggle() {
|
|
@@ -50,6 +52,14 @@ const ZMenu = class {
|
|
|
50
52
|
componentWillLoad() {
|
|
51
53
|
this.checkContent();
|
|
52
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
|
|
57
|
+
* @param ev Slotchange event
|
|
58
|
+
*/
|
|
59
|
+
onLabelSlotChange(ev) {
|
|
60
|
+
const labelElement = ev.target.assignedElements()[0];
|
|
61
|
+
labelElement.dataset.text = labelElement === null || labelElement === void 0 ? void 0 : labelElement.textContent;
|
|
62
|
+
}
|
|
53
63
|
/**
|
|
54
64
|
* Correctly set position of the floating menu in order to prevent overflow.
|
|
55
65
|
* @param live Should run the method on every refresh frame.
|
|
@@ -71,27 +81,29 @@ const ZMenu = class {
|
|
|
71
81
|
* Check if some content slot is set.
|
|
72
82
|
*/
|
|
73
83
|
checkContent() {
|
|
74
|
-
this.hasHeader = !!this.hostElement.querySelectorAll(
|
|
75
|
-
this.hasContent = !!this.hostElement.querySelectorAll(
|
|
84
|
+
this.hasHeader = !!this.hostElement.querySelectorAll("[slot=header]").length;
|
|
85
|
+
this.hasContent = !!this.hostElement.querySelectorAll("[slot=item]").length || this.hasHeader;
|
|
76
86
|
}
|
|
77
87
|
/**
|
|
78
88
|
* Set `menuitem` role to all menu items.
|
|
89
|
+
* Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).
|
|
79
90
|
*/
|
|
80
91
|
onItemsChange() {
|
|
81
92
|
this.checkContent();
|
|
82
|
-
const items = this.hostElement.querySelectorAll(
|
|
83
|
-
items
|
|
93
|
+
const items = this.hostElement.querySelectorAll("[slot=item]");
|
|
94
|
+
items.forEach((item) => {
|
|
95
|
+
item.setAttribute("role", "menuitem");
|
|
96
|
+
item.dataset.text = item.textContent;
|
|
97
|
+
});
|
|
84
98
|
}
|
|
85
99
|
renderMenuLabel() {
|
|
86
100
|
if (this.hasContent) {
|
|
87
|
-
return (h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle }, h("div", { class: "menu-label-content" }, h("slot",
|
|
101
|
+
return (h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }), h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" }))));
|
|
88
102
|
}
|
|
89
|
-
return (h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot",
|
|
103
|
+
return (h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }))));
|
|
90
104
|
}
|
|
91
105
|
render() {
|
|
92
|
-
return (h(Host, null, this.renderMenuLabel(), h("div", { class: "content", ref: (el) => {
|
|
93
|
-
this.content = el;
|
|
94
|
-
}, hidden: !this.open }, this.hasHeader && (h("header", { class: "header" }, h("slot", { name: "header", onSlotchange: this.checkContent }))), h("div", { class: "items", role: "menu" }, h("slot", { name: "item", onSlotchange: this.onItemsChange })))));
|
|
106
|
+
return (h(Host, null, this.renderMenuLabel(), this.hasContent && (h("div", { class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { class: "header" }, h("slot", { name: "header", onSlotchange: this.checkContent }))), h("div", { class: "items", role: "menu" }, h("slot", { name: "item", onSlotchange: this.onItemsChange }))))));
|
|
95
107
|
}
|
|
96
108
|
get hostElement() { return getElement(this); }
|
|
97
109
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-a2ca4b97.js';
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-a2ca4b97.js';
|
|
2
2
|
import { L as LicenseType } from './index-e36ec4a4.js';
|
|
3
3
|
|
|
4
4
|
const stylesCss = "footer{position:relative;z-index:5;top:0;width:auto;height:calc(var(--space-unit) * 6);padding:0;border-top:var(--border-size-medium) solid var(--color-surface03);margin:0;background-color:var(--color-surface01);border-radius:0 0 var(--border-radius) var(--border-radius);color:var(--color-surface05);font-family:var(--font-family-sans);font-weight:var(--font-rg);transition:height 500ms ease-in-out, top 500ms ease-in-out}footer.real,footer.trial,footer.temp{border-top:var(--border-size-medium) solid var(--accent)}footer .bold{font-family:var(--font-family-sans);font-weight:var(--font-sb)}footer>p{overflow:hidden;height:40px;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) var(--space-unit) calc(var(--space-unit) * 2);margin:0;background-color:var(--color-surface01);font-family:var(--font-family-sans);font-size:16px;font-weight:var(--font-rg);line-height:22px;transition:all 200ms linear}footer.isopen>p{background-color:var(--bg-neutral-200);font-size:14px;font-weight:var(--font-sb);transition:all 200ms linear}footer.isopen.real>p,footer.isopen.trial>p,footer.isopen.temp>p{background-color:var(--accent)}footer .visible{display:block}footer .hidden{display:none}footer>div.content{overflow:hidden;height:60px}footer>div.content>div:not(.slot-handler){padding:var(--space-unit) calc(var(--space-unit) * 2)}footer>div.content>div>p{overflow:hidden;height:20px;padding:0;margin:0;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}footer>div.content>div>p.year-isbn{display:flex;flex-direction:row;justify-content:space-between;padding-top:var(--space-unit)}footer>div.content>div>p.year-isbn>span.isbn{overflow:hidden;text-overflow:ellipsis}footer.isopen>div.content>div:not(.slot-handler){height:68px}footer.isopen>div.content>div>p.authors{height:40px;text-overflow:initial;white-space:initial}footer.isopen>div.content>div>p.year-isbn{height:50px;flex-direction:column;padding-left:0}footer.isopen>div.content>div>p.year-isbn>span.isbn{display:inline-grid;padding-left:0}footer.isopen{top:-212px;height:295px;transition:height 500ms ease-in-out, top 500ms ease-in-out}footer.isopen.custom-content{top:-292px}footer.isopen>div.content{height:280px;transition:height 500ms ease-in-out, top 500ms ease-in-out}footer.isopen.custom-content>div.content{height:230px}.toggle{position:absolute;z-index:10;top:-24px;left:16px}.faded{opacity:0.3;pointer-events:none}footer>p.custom-content,footer .content.custom-content{display:none}footer.isopen>p.custom-content,footer.isopen .content.custom-content{display:block}div.wrapper{position:relative;height:100%}div.wrapper ::slotted([slot=\"content\"]){position:absolute;z-index:10;top:calc(var(--space-unit) * 2);display:block;width:100%;height:112px;box-sizing:border-box;padding:0 calc(var(--space-unit) * 2);border-top:var(--border-size-medium) solid transparent;background:var(--color-white)}div.wrapper.isopen ::slotted([slot=\"content\"]){top:0;bottom:0;height:128px;padding:calc(var(--space-unit) * 2);border-color:var(--accent)}";
|
|
@@ -15,6 +15,14 @@ const ZMyzCardFooter = class {
|
|
|
15
15
|
}
|
|
16
16
|
handleToggle() {
|
|
17
17
|
this.isOpen = !this.isOpen;
|
|
18
|
+
if (this.isOpen) {
|
|
19
|
+
const firstElem = this.getFirstListItem();
|
|
20
|
+
if (firstElem) {
|
|
21
|
+
requestAnimationFrame(() => {
|
|
22
|
+
firstElem.focus();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
getTitleAuthors() {
|
|
20
28
|
return this.allowTooltipAuthors ? this.autori : "";
|
|
@@ -44,9 +52,13 @@ const ZMyzCardFooter = class {
|
|
|
44
52
|
this.elementsEllipsis();
|
|
45
53
|
}
|
|
46
54
|
}
|
|
55
|
+
getFirstListItem() {
|
|
56
|
+
return this.host.querySelector("[slot=list] > li a");
|
|
57
|
+
}
|
|
47
58
|
render() {
|
|
48
|
-
return (h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { class: "toggle" }, h("slot", { name: "toggle" })), this.titolo && h("p", { class: { "custom-content": this.customContent } }, this.titolo), h("div", { class: { "content": true, "custom-content": this.customContent } }, h("div", null, h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { title: this.getTitleAuthors() }, h("span", { class: "bold" }, this.autori))), h("p", { class: "year-isbn" }, h("span", { class: "isbn" }, h("span", null, h("span", { class: "bold" }, this.isbn), " (ed. cartacea)")))), h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { name: "list" })))), this.customContent && h("slot", { name: "content" })));
|
|
59
|
+
return (h("div", { class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { class: "toggle" }, h("slot", { name: "toggle" })), this.titolo && h("p", { class: { "custom-content": this.customContent } }, this.titolo), h("div", { class: { "content": true, "custom-content": this.customContent } }, h("div", null, h("p", { class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { title: this.getTitleAuthors() }, h("span", { "aria-description": "Autori", class: "bold" }, this.autori))), h("p", { class: "year-isbn" }, h("span", { class: "isbn" }, h("span", null, h("span", { "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), h("div", { class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { name: "list" })))), this.customContent && h("slot", { name: "content" })));
|
|
49
60
|
}
|
|
61
|
+
get host() { return getElement(this); }
|
|
50
62
|
};
|
|
51
63
|
ZMyzCardFooter.style = stylesCss;
|
|
52
64
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-a2ca4b97.js';
|
|
2
2
|
|
|
3
|
-
const stylesCss = "button{display:flex;width:42px;width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 6);align-items:center;justify-content:center;padding:0;border:none;border-left:var(--border-size-medium) solid var(--color-surface03);margin:0;background:none;border-radius:0 var(--border-radius) 0 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01);outline:none}button:active,button:focus{color:var(--blue700);fill:var(--blue700)}button>span{display:flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:var(--border-radius)}button:hover>span{background:var(--color-primary03)}button:focus>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:
|
|
3
|
+
const stylesCss = "button{display:flex;width:42px;width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 6);align-items:center;justify-content:center;padding:0;border:none;border-left:var(--border-size-medium) solid var(--color-surface03);margin:0;background:none;border-radius:0 var(--border-radius) 0 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01);outline:none}button:active,button:focus{color:var(--blue700);fill:var(--blue700)}button>span{display:flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:var(--border-radius)}button:hover>span{background:var(--color-primary03)}button:focus>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-focus-primary)}button:active>span{background:var(--color-surface01);border-radius:var(--border-radius);box-shadow:var(--shadow-2)}button:disabled{cursor:not-allowed}button:disabled>span{background:none;box-shadow:var(--shadow-0);pointer-events:none}button:disabled>span>z-icon{fill:var(--color-surface03)}button::-moz-focus-inner{border:0}";
|
|
4
4
|
|
|
5
5
|
const ZMyzCardIcon = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -66,7 +66,7 @@ const ZMyzCardCover = class {
|
|
|
66
66
|
};
|
|
67
67
|
ZMyzCardCover.style = stylesCss$1;
|
|
68
68
|
|
|
69
|
-
const stylesCss = "header{position:relative;display:flex;width:auto;height:calc(var(--space-unit) * 6);flex-direction:row;align-items:flex-start;justify-content:space-between;border-bottom:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius) var(--border-radius) var(--border-no-radius) var(--border-no-radius)}header.real,header.trial,header.temp{border-bottom:var(--border-size-medium) solid var(--accent);background-color:var(--accent-lighter)}.card-title{overflow:hidden;height:calc(var(--space-unit) * 2);padding:calc(var(--space-unit) * 2);margin:0;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:12px;font-weight:var(--font-sb);letter-spacing:0.22px;line-height:calc(var(--space-unit) * 2);text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.faded{border-bottom:var(--border-size-medium) solid var(--color-surface02)}.faded.real,.faded.trial,.faded.temp{border-top:var(--border-size-medium) solid var(--accent);border-right:var(--border-size-medium) solid var(--accent);border-left:var(--border-size-medium) solid var(--accent)}";
|
|
69
|
+
const stylesCss = "header{position:relative;display:flex;width:auto;height:calc(var(--space-unit) * 6);flex-direction:row;align-items:flex-start;justify-content:space-between;border-bottom:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius) var(--border-radius) var(--border-no-radius) var(--border-no-radius)}slot[name=\"aria-heading\"]::slotted(*){position:absolute;overflow:hidden !important;width:1px !important;height:1px !important;padding:0 !important;border:0 none !important;margin:-1px !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important}header.real,header.trial,header.temp{border-bottom:var(--border-size-medium) solid var(--accent);background-color:var(--accent-lighter)}.card-title{overflow:hidden;height:calc(var(--space-unit) * 2);padding:calc(var(--space-unit) * 2);margin:0;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:12px;font-weight:var(--font-sb);letter-spacing:0.22px;line-height:calc(var(--space-unit) * 2);text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.faded{border-bottom:var(--border-size-medium) solid var(--color-surface02)}.faded.real,.faded.trial,.faded.temp{border-top:var(--border-size-medium) solid var(--accent);border-right:var(--border-size-medium) solid var(--accent);border-left:var(--border-size-medium) solid var(--accent)}";
|
|
70
70
|
|
|
71
71
|
const ZMyzCardHeader = class {
|
|
72
72
|
constructor(hostRef) {
|
|
@@ -93,7 +93,7 @@ const ZMyzCardHeader = class {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
|
-
return (h("header", { class: this.retrieveClass() }, h("span", { class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), h("slot", { name: "icon" })));
|
|
96
|
+
return (h("header", { class: this.retrieveClass() }, h("slot", { name: "aria-heading" }), h("span", { class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), h("slot", { name: "icon" })));
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
ZMyzCardHeader.style = stylesCss;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
|
|
2
|
+
import { O as OffCanvasVariant, v as TransitionDirection } from './index-e36ec4a4.js';
|
|
3
|
+
|
|
4
|
+
const stylesCss = ".sc-z-offcanvas-h{--z-offcanvas--container-width:375px;--z-offcanvas--top-space:0;min-width:100%;height:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg);visibility:hidden}.canvas-container.sc-z-offcanvas{display:flex;overflow:-moz-scrollbars-none;overflow:hidden;min-width:100%;height:100%;flex-direction:column;background:var(--color-surface01)}[variant=\"pushcontent\"].sc-z-offcanvas-h{display:none}[open].sc-z-offcanvas-h{display:flex;visibility:visible}[variant=\"overlay\"].sc-z-offcanvas-h{position:fixed;z-index:1000;top:var(--z-offcanvas--top-space);right:0;bottom:0;left:0;display:flex;height:calc(100% - var(--z-offcanvas--top-space))}[variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h{justify-content:end}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1010}[variant=\"overlay\"].sc-z-offcanvas-h .canvas-background.sc-z-offcanvas{position:absolute;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0;overflow-x:hidden}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{padding:0 calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-track{background-color:transparent}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas{scrollbar-color:var(--color-primary01) transparent}@media only screen and (max-width: 768px){[open][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}}@media only screen and (min-width: 768px){.sc-z-offcanvas-h{min-width:auto}.canvas-container.sc-z-offcanvas{width:auto;min-width:max(var(--z-offcanvas--container-width), 375px);max-width:max(var(--z-offcanvas--container-width), 375px);height:auto;min-height:calc(var(--space-unit) * 40)}.sc-z-offcanvas-h:not([variant=\"overlay\"])[open]:not(.skip-animation){width:auto;animation:grow 0.4s ease-out}}@keyframes grow{from{width:0}to{width:max(var(--z-offcanvas--container-width), 375px)}}@keyframes enter-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes enter-right{from{transform:translateX(100%)}to{transform:translateX(0)}}[open][variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"right\"]>.canvas-container.sc-z-offcanvas{transform:translateX(-100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"left\"]>.canvas-container.sc-z-offcanvas{transform:translateX(100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"] .canvas-background.sc-z-offcanvas{transition:visibility 0.4s ease-out;visibility:hidden}";
|
|
5
|
+
|
|
6
|
+
const ZOffcanvas = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.canvasOpenStatusChanged = createEvent(this, "canvasOpenStatusChanged", 7);
|
|
10
|
+
/**
|
|
11
|
+
* Offcanvas variant.
|
|
12
|
+
* Can be one of "overlay", "pushcontent"
|
|
13
|
+
* Default variant: pushcontent
|
|
14
|
+
*/
|
|
15
|
+
this.variant = OffCanvasVariant.PUSHCONTENT;
|
|
16
|
+
/** open component. Default: false */
|
|
17
|
+
this.open = false;
|
|
18
|
+
/** open content transitioning in a specified direction left | right. Default: left */
|
|
19
|
+
this.transitiondirection = TransitionDirection.LEFT;
|
|
20
|
+
/** manages the skip for the entry animation*/
|
|
21
|
+
this.skipanimationonload = false;
|
|
22
|
+
}
|
|
23
|
+
/** this method allows you to skip the page loading animation, to be used with the prop set to true */
|
|
24
|
+
async setSkipAanimationOnLoad(value) {
|
|
25
|
+
this.skipanimationonload = value;
|
|
26
|
+
}
|
|
27
|
+
onOpenChanged() {
|
|
28
|
+
if (!this.open && this.skipanimationonload) {
|
|
29
|
+
this.skipanimationonload = false;
|
|
30
|
+
}
|
|
31
|
+
if (this.open) {
|
|
32
|
+
this.handleOverflowProperty();
|
|
33
|
+
}
|
|
34
|
+
this.canvasOpenStatusChanged.emit(this.open);
|
|
35
|
+
}
|
|
36
|
+
handleOverflowProperty() {
|
|
37
|
+
const overflow = this.variant === OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
|
|
38
|
+
document.body.style[overflow] = this.open ? "hidden" : "";
|
|
39
|
+
}
|
|
40
|
+
handledTransitionEnd() {
|
|
41
|
+
this.handleOverflowProperty();
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return (h(Host, { class: { "skip-animation": this.skipanimationonload } }, h("div", { role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handledTransitionEnd() }, h("div", { role: "presentation", class: "canvas-content" }, h("slot", { name: "canvasContent" }))), this.variant == OffCanvasVariant.OVERLAY && (h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
|
|
45
|
+
}
|
|
46
|
+
get hostElement() { return getElement(this); }
|
|
47
|
+
static get watchers() { return {
|
|
48
|
+
"open": ["onOpenChanged"]
|
|
49
|
+
}; }
|
|
50
|
+
};
|
|
51
|
+
ZOffcanvas.style = stylesCss;
|
|
52
|
+
|
|
53
|
+
export { ZOffcanvas as z_offcanvas };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a2ca4b97.js';
|
|
2
|
-
import {
|
|
2
|
+
import { d as ControlSize, B as ButtonVariant, l as ListDividerType } from './index-e36ec4a4.js';
|
|
3
3
|
import { r as randomId, a as handleEnterKeydSubmit } from './utils-970ac457.js';
|
|
4
4
|
import './breakpoints-c386984e.js';
|
|
5
5
|
|
|
6
|
-
const stylesCss = ":host{position:relative;z-index:5;display:block;width:inherit;height:44px;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:absolute;z-index:10;display:grid;width:100%;gap:0 calc(var(--space-unit) * 2);grid-template-columns:auto;grid-template-rows:auto}:host>div.has-submit{grid-template-columns:auto min-content}:host>div.has-results{grid-template-rows:auto auto}:host>div>z-input{width:100%;grid-column:1;grid-row:1}:host>div>z-button{grid-column:2;grid-row:1}:host>div>div.results-wrapper{overflow:auto;padding:calc(var(--space-unit) / 4);padding-bottom:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;margin-top:-1px;background:var(--color-surface01);grid-column:1;grid-row:2}:host>div>div.results-wrapper>div.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:var(--space-unit) calc(var(--space-unit) * 1.5);padding-bottom:calc(var(--space-unit) / 2);scrollbar-color:var(--color-primary01) transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-track{background-color:transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .category-heading>*{display:block}:host>div>div.results-wrapper>div.results span.category-heading>span.category{color:var(--color-text05);font-style:italic}:host>div>div.results-wrapper>div.results span.category-heading>span.subcategory{margin-top:8px;color:var(--color-text01);text-transform:uppercase}:host>div>div.results-wrapper>div.results z-list-element{display:block}:host>div>div.results-wrapper>div.results z-list-element:focus{box-shadow:var(--shadow-focus-primary)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;color:var(--color-text01);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>div>div.results-wrapper>div.results .item>span.item-label>mark,:host>div>div.results-wrapper>div.results .item>span.item-label>*>mark{background:var(--color-primary03)}:host>div>div.results-wrapper>div.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:2px 0;margin-right:calc(var(--space-unit) * 1.5)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-right:var(--space-unit)}:host>div>div.results-wrapper>div.results .item-show-all{display:block;text-align:center}:host>div>div.results-wrapper>div.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}:host>div>div.results-wrapper>div.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){:host>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-top:calc(var(--space-unit) / 4)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{height:24px}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:6px 0}}@media (min-width: 1152px){:host>div>div.results-wrapper>div.results .item{cursor:pointer}:host>div>div.results-wrapper>div.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}";
|
|
6
|
+
const stylesCss = ":host{position:relative;z-index:5;display:block;width:inherit;height:44px;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:absolute;z-index:10;display:grid;width:100%;gap:0 calc(var(--space-unit) * 2);grid-template-columns:auto;grid-template-rows:auto}:host>div.has-submit{grid-template-columns:auto min-content}:host>div.has-results{grid-template-rows:auto auto}:host>div>z-input{width:100%;grid-column:1;grid-row:1}:host>div>z-button{grid-column:2;grid-row:1}:host>div>div.results-wrapper{overflow:auto;padding:calc(var(--space-unit) / 4);padding-bottom:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;margin-top:-1px;background:var(--color-surface01);grid-column:1;grid-row:2}:host>div>div.results-wrapper>div.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:var(--space-unit) calc(var(--space-unit) * 1.5);padding-bottom:calc(var(--space-unit) / 2);scrollbar-color:var(--color-primary01) transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-track{background-color:transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .category-heading>*{display:block}:host>div>div.results-wrapper>div.results span.category-heading>span.category{color:var(--color-text05);font-style:italic}:host>div>div.results-wrapper>div.results span.category-heading>span.subcategory{margin-top:8px;color:var(--color-text01);text-transform:uppercase}:host>div>div.results-wrapper>div.results z-list-element{display:block}:host>div>div.results-wrapper>div.results z-list-element:focus{box-shadow:var(--shadow-focus-primary)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;color:var(--color-text01);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>div>div.results-wrapper>div.results .item>span.item-label>mark,:host>div>div.results-wrapper>div.results .item>span.item-label>*>mark{background:var(--color-primary03)}:host>div>div.results-wrapper>div.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:2px 0;margin-right:calc(var(--space-unit) * 1.5)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-right:var(--space-unit)}:host>div>div.results-wrapper>div.results .item-show-all{display:block;text-align:center}:host>div>div.results-wrapper>div.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}:host>div>div.results-wrapper>div.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){:host>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-top:calc(var(--space-unit) / 4)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{height:24px}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:6px 0}}@media (min-width: 1152px){:host>div>div.results-wrapper>div.results .item{cursor:pointer}:host>div>div.results-wrapper>div.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size=\"small\"])>div>div.results-wrapper>div.results .item,:host([size=\"x-small\"])>div>div.results-wrapper>div.results .item,:host([size=\"small\"])>div>div.results-wrapper>div.results .category-heading,:host([size=\"x-small\"])>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-2)}:host([size=\"small\"])>div>div.results-wrapper>div.results .item:not(.has-category),:host([size=\"x-small\"])>div>div.results-wrapper>div.results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size=\"small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size=\"x-small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}";
|
|
7
7
|
|
|
8
8
|
const ZSearchbar = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -27,6 +27,12 @@ const ZSearchbar = class {
|
|
|
27
27
|
this.sortResultsItems = false;
|
|
28
28
|
/** Show submit button */
|
|
29
29
|
this.showSearchButton = false;
|
|
30
|
+
/** Set button icon without label*/
|
|
31
|
+
this.searchButtonIconOnly = false;
|
|
32
|
+
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
33
|
+
this.size = ControlSize.BIG;
|
|
34
|
+
/** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
|
|
35
|
+
this.variant = ButtonVariant.PRIMARY;
|
|
30
36
|
this.searchString = "";
|
|
31
37
|
this.currResultsCount = 0;
|
|
32
38
|
this.showResults = false;
|
|
@@ -139,13 +145,16 @@ const ZSearchbar = class {
|
|
|
139
145
|
renderInput() {
|
|
140
146
|
return (h("z-input", { ref: (val) => {
|
|
141
147
|
this.inputRef = val;
|
|
142
|
-
}, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value }));
|
|
148
|
+
}, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value, size: this.size }));
|
|
143
149
|
}
|
|
144
150
|
renderButton() {
|
|
145
151
|
if (!this.showSearchButton) {
|
|
146
152
|
return null;
|
|
147
153
|
}
|
|
148
|
-
|
|
154
|
+
const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
|
|
155
|
+
const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
|
|
156
|
+
const defaultProps = Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp);
|
|
157
|
+
return h("z-button", Object.assign({}, defaultProps), buttonLabel);
|
|
149
158
|
}
|
|
150
159
|
renderResults() {
|
|
151
160
|
if (!this.showResults ||
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-a2ca4b97.js';
|
|
2
2
|
|
|
3
|
-
const stylesCss = ":host{position:relative;width:calc(var(--space-unit) * 5);font-family:var(--dashboard-font);font-weight:var(--font-rg)}:host(:not(:last-child)){flex:1}:host(:not(:last-child))::after{position:absolute;z-index:1;top:calc(var(--space-unit) * 4);right:calc(var(--space-unit) * 2);left:calc(var(--space-unit) * 3);display:block;width:auto;border-bottom:solid 2px var(--bg-grey-700);margin:0 calc(-1 * calc(var(--space-unit) * 2)) 0 calc(var(--space-unit) * 2);content:\"\"}.stepper-item{display:flex;width:calc(var(--space-unit) * 5);flex-direction:column;align-items:center;padding:0;border:0;appearance:none;background:transparent;color:inherit;font-family:inherit;font-size:18px;line-height:28px;outline:0;text-decoration:none}.stepper-item span{display:none;width:calc(100% + calc(var(--space-unit) * 4));text-align:center}:host(:not([disabled])) .stepper-item{cursor:pointer}:host([disabled]) .stepper-item{pointer-events:none}.indicator{display:flex;width:calc(var(--space-unit) * 4);height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;justify-content:center;border:2px solid var(--myz-blue);margin:calc(var(--space-unit) * 2);background:var(--bg-white);border-radius:50%;color:var(--myz-blue);content:counter(stepper);font-size:14px;font-weight:var(--font-sb);line-height:1}:host([pressed]:not([disabled])) .indicator{border-color:var(--myz-blue-dark);background:var(--myz-blue-dark);color:var(--text-white)}:host(:not([disabled]):focus-within) .indicator{box-shadow:
|
|
3
|
+
const stylesCss = ":host{position:relative;width:calc(var(--space-unit) * 5);font-family:var(--dashboard-font);font-weight:var(--font-rg)}:host(:not(:last-child)){flex:1}:host(:not(:last-child))::after{position:absolute;z-index:1;top:calc(var(--space-unit) * 4);right:calc(var(--space-unit) * 2);left:calc(var(--space-unit) * 3);display:block;width:auto;border-bottom:solid 2px var(--bg-grey-700);margin:0 calc(-1 * calc(var(--space-unit) * 2)) 0 calc(var(--space-unit) * 2);content:\"\"}.stepper-item{display:flex;width:calc(var(--space-unit) * 5);flex-direction:column;align-items:center;padding:0;border:0;appearance:none;background:transparent;color:inherit;font-family:inherit;font-size:18px;line-height:28px;outline:0;text-decoration:none}.stepper-item span{display:none;width:calc(100% + calc(var(--space-unit) * 4));text-align:center}:host(:not([disabled])) .stepper-item{cursor:pointer}:host([disabled]) .stepper-item{pointer-events:none}.indicator{display:flex;width:calc(var(--space-unit) * 4);height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;justify-content:center;border:2px solid var(--myz-blue);margin:calc(var(--space-unit) * 2);background:var(--bg-white);border-radius:50%;color:var(--myz-blue);content:counter(stepper);font-size:14px;font-weight:var(--font-sb);line-height:1}:host([pressed]:not([disabled])) .indicator{border-color:var(--myz-blue-dark);background:var(--myz-blue-dark);color:var(--text-white)}:host(:not([disabled]):focus-within) .indicator{box-shadow:var(--shadow-focus-primary)}:host([disabled]) .indicator{border-color:currentcolor;background:var(--bg-grey-200);color:var(--text-grey-700)}@media only screen and (min-width: 768px){:host{width:calc(var(--space-unit) * 10)}:host(:not(:last-child))::after{top:calc(var(--space-unit) * 5);left:calc(var(--space-unit) * 8)}.stepper-item{width:calc(var(--space-unit) * 10)}.stepper-item span{display:block}.indicator{width:calc(var(--space-unit) * 6);height:calc(var(--space-unit) * 6);font-size:16px}}";
|
|
4
4
|
|
|
5
5
|
const ZStepperItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a2ca4b97.js';
|
|
2
2
|
|
|
3
|
-
const stylesCss = "button{height:36px;padding-right:calc(var(--space-unit) * 2);padding-left:0;border:var(--border-size-medium) solid;border-color:transparent;background-color:var(--bg-white);border-radius:var(--border-radius);box-shadow:0 0 4px 0 rgb(0 0 0 / 20%);color:var(--myz-blue);cursor:pointer;fill:var(--myz-blue);font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb);outline:none;text-transform:uppercase
|
|
3
|
+
const stylesCss = "button{height:36px;padding-right:calc(var(--space-unit) * 2);padding-left:0;border:var(--border-size-medium) solid;border-color:transparent;background-color:var(--bg-white);border-radius:var(--border-radius);box-shadow:0 0 4px 0 rgb(0 0 0 / 20%);color:var(--myz-blue);cursor:pointer;fill:var(--myz-blue);font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb);outline:none;text-transform:uppercase}button::-moz-focus-inner{border:0}button:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}button:focus{box-shadow:var(--shadow-focus-primary);color:var(--myz-blue);fill:var(--myz-blue)}button:active{border-color:var(--myz-blue-light);box-shadow:0 2px 4px 0 rgb(0 0 0 / 40%);color:var(--myz-blue-light);fill:var(--myz-blue-light)}button:disabled{color:var(--text-grey-700);fill:var(--text-grey-700)}z-icon{display:inline-block;margin:0 var(--space-unit) 0 calc(var(--space-unit) * 2);transform:rotate(360deg);transition:all 200ms linear}button.isopen{top:-20px}button.avoid-clicks{pointer-events:none}";
|
|
4
4
|
|
|
5
5
|
const ZToggleButton = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -10,6 +10,8 @@ const ZToggleButton = class {
|
|
|
10
10
|
this.isdisabled = false;
|
|
11
11
|
/** open by default (optional) */
|
|
12
12
|
this.opened = false;
|
|
13
|
+
/** aria-label for the button */
|
|
14
|
+
this.ariaLabel = "";
|
|
13
15
|
}
|
|
14
16
|
emitToggleClick() {
|
|
15
17
|
if (this.isdisabled) {
|
|
@@ -22,7 +24,7 @@ const ZToggleButton = class {
|
|
|
22
24
|
return (h("button", { tabindex: this.avoidclick ? "-1" : "0", class: {
|
|
23
25
|
"isopen": this.opened,
|
|
24
26
|
"avoid-clicks": this.avoidclick,
|
|
25
|
-
}, disabled: this.isdisabled, onClick: () => this.emitToggleClick() }, h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
|
|
27
|
+
}, disabled: this.isdisabled, "aria-expanded": this.opened ? "true" : "false", "aria-label": this.ariaLabel, onClick: () => this.emitToggleClick() }, h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
|
|
26
28
|
}
|
|
27
29
|
};
|
|
28
30
|
ZToggleButton.style = stylesCss;
|
|
@@ -6,7 +6,7 @@ export declare class ZButtonSort {
|
|
|
6
6
|
label: string;
|
|
7
7
|
/** label content (descending) */
|
|
8
8
|
desclabel?: string;
|
|
9
|
-
/**
|
|
9
|
+
/** occurrences counter (optional) */
|
|
10
10
|
counter?: number;
|
|
11
11
|
/** sort label content (ascending) (optional) */
|
|
12
12
|
sortlabelasc?: string;
|
|
@@ -18,7 +18,7 @@ export declare class ZButtonSort {
|
|
|
18
18
|
sortasc?: boolean;
|
|
19
19
|
allowTooltip: boolean;
|
|
20
20
|
private ellipsis?;
|
|
21
|
-
/** sorting direction click event, returns buttonid and sortAsc */
|
|
21
|
+
/** sorting direction click event, returns `buttonid` and `sortAsc` */
|
|
22
22
|
buttonSortClick: EventEmitter;
|
|
23
23
|
private emitButtonSortClick;
|
|
24
24
|
componentDidLoad(): void;
|
|
@@ -10,6 +10,8 @@ export declare class ZChip {
|
|
|
10
10
|
interactiveIcon?: string;
|
|
11
11
|
/** set z-chip as disabled */
|
|
12
12
|
disabled?: boolean;
|
|
13
|
+
/** z-chip aria-label string */
|
|
14
|
+
ariaLabel: string;
|
|
13
15
|
/** click on interactive icon */
|
|
14
16
|
interactiveIconClick: EventEmitter;
|
|
15
17
|
private emitinteractiveIconClick;
|
|
@@ -8,6 +8,8 @@ export declare class ZToggleButton {
|
|
|
8
8
|
avoidclick: boolean;
|
|
9
9
|
/** open by default (optional) */
|
|
10
10
|
opened?: boolean;
|
|
11
|
+
/** aria-label for the button */
|
|
12
|
+
ariaLabel: string;
|
|
11
13
|
/** emitted on toggle button click, returns isOpen */
|
|
12
14
|
toggleClick: EventEmitter;
|
|
13
15
|
private emitToggleClick;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
-
import { SearchbarItem } from "../../../beans";
|
|
2
|
+
import { ButtonVariant, SearchbarItem, ControlSize } from "../../../beans";
|
|
3
3
|
/**
|
|
4
4
|
* @cssprop --z-searchbar-results-height - Max height of the results container (default: 540px)
|
|
5
5
|
*/
|
|
@@ -28,6 +28,12 @@ export declare class ZSearchbar {
|
|
|
28
28
|
sortResultsItems?: boolean;
|
|
29
29
|
/** Show submit button */
|
|
30
30
|
showSearchButton?: boolean;
|
|
31
|
+
/** Set button icon without label*/
|
|
32
|
+
searchButtonIconOnly?: boolean;
|
|
33
|
+
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
34
|
+
size?: ControlSize;
|
|
35
|
+
/** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
|
|
36
|
+
variant?: ButtonVariant;
|
|
31
37
|
searchString: string;
|
|
32
38
|
currResultsCount: number;
|
|
33
39
|
showResults: boolean;
|
|
@@ -14,6 +14,8 @@ export declare class ZModal {
|
|
|
14
14
|
closeButtonLabel: string;
|
|
15
15
|
/** add role "alertdialog" to dialog (optional, default is false) */
|
|
16
16
|
alertdialog?: boolean;
|
|
17
|
+
/** if true, the modal is closable (optional, default is true) */
|
|
18
|
+
closable?: boolean;
|
|
17
19
|
private dialog;
|
|
18
20
|
host: HTMLZModalElement;
|
|
19
21
|
/** emitted on close button click, returns modalid */
|
|
@@ -39,5 +41,7 @@ export declare class ZModal {
|
|
|
39
41
|
*/
|
|
40
42
|
private get focusableElements();
|
|
41
43
|
handleKeyDown(e: KeyboardEvent): void;
|
|
44
|
+
private closeButtonSlot;
|
|
45
|
+
private handleEscape;
|
|
42
46
|
render(): HTMLZModalElement;
|
|
43
47
|
}
|
|
@@ -73,8 +73,6 @@ export declare class ZAppHeader {
|
|
|
73
73
|
* - auto: the menu bar is positioned near the title
|
|
74
74
|
* - stack: the menu bar is positioned below the title
|
|
75
75
|
* - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu
|
|
76
|
-
*
|
|
77
|
-
* **Optional**
|
|
78
76
|
*/
|
|
79
77
|
flow: "auto" | "stack" | "offcanvas";
|
|
80
78
|
/**
|
|
@@ -97,6 +95,8 @@ export declare class ZAppHeader {
|
|
|
97
95
|
private container?;
|
|
98
96
|
private menuElements?;
|
|
99
97
|
private observer?;
|
|
98
|
+
private openDrawer;
|
|
99
|
+
private closeDrawer;
|
|
100
100
|
constructor();
|
|
101
101
|
componentDidLoad(): void;
|
|
102
102
|
private get title();
|
|
@@ -108,6 +108,4 @@ export declare class ZAppHeader {
|
|
|
108
108
|
onStuck(): void;
|
|
109
109
|
setMenuFloatingMode(): void;
|
|
110
110
|
render(): HTMLZAppHeaderElement;
|
|
111
|
-
private openDrawer;
|
|
112
|
-
private closeDrawer;
|
|
113
111
|
}
|
|
@@ -5,24 +5,26 @@ import { EventEmitter } from "../../../stencil-public-runtime";
|
|
|
5
5
|
* @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Use `z-menu-section` for submenus.
|
|
6
6
|
*/
|
|
7
7
|
export declare class ZMenu {
|
|
8
|
+
hostElement: HTMLZMenuElement;
|
|
8
9
|
/** Flag to set the active status of the menu. */
|
|
9
10
|
active?: boolean;
|
|
10
11
|
/**
|
|
11
12
|
* Flag to set the display mode of the list.
|
|
12
13
|
* If true, the list will be absolutely positioned under the menu label,
|
|
13
14
|
* stacked beneath it otherwise.
|
|
14
|
-
* @default false
|
|
15
15
|
*/
|
|
16
16
|
floating?: boolean;
|
|
17
|
+
/** The opening state of the menu. */
|
|
18
|
+
open: boolean;
|
|
17
19
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
+
* Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).
|
|
21
|
+
* A small border is placed under it as a separator from other elements.
|
|
20
22
|
*/
|
|
21
|
-
|
|
23
|
+
verticalContext: boolean;
|
|
22
24
|
hasHeader: boolean;
|
|
23
25
|
hasContent: boolean;
|
|
24
|
-
hostElement: HTMLZMenuElement;
|
|
25
26
|
private content;
|
|
27
|
+
/** Animation frame request id. */
|
|
26
28
|
private raf;
|
|
27
29
|
/** The menu has been opened. */
|
|
28
30
|
opened: EventEmitter;
|
|
@@ -34,6 +36,11 @@ export declare class ZMenu {
|
|
|
34
36
|
onOpenChanged(): void;
|
|
35
37
|
constructor();
|
|
36
38
|
componentWillLoad(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
|
|
41
|
+
* @param ev Slotchange event
|
|
42
|
+
*/
|
|
43
|
+
private onLabelSlotChange;
|
|
37
44
|
/**
|
|
38
45
|
* Correctly set position of the floating menu in order to prevent overflow.
|
|
39
46
|
* @param live Should run the method on every refresh frame.
|
|
@@ -45,6 +52,7 @@ export declare class ZMenu {
|
|
|
45
52
|
private checkContent;
|
|
46
53
|
/**
|
|
47
54
|
* Set `menuitem` role to all menu items.
|
|
55
|
+
* Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).
|
|
48
56
|
*/
|
|
49
57
|
private onItemsChange;
|
|
50
58
|
private renderMenuLabel;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @slot
|
|
3
|
+
* A component to create submenus inside the ZMenu.
|
|
4
|
+
* @slot - Label of the menu section.
|
|
5
|
+
* @slot item - Single entry of the section. Set the same slot name to different items to put many of them. Add the `active` attribute to a slotted item to highlight it.
|
|
5
6
|
*/
|
|
6
7
|
export declare class ZMenuSection {
|
|
8
|
+
hostElement: HTMLZMenuSectionElement;
|
|
7
9
|
/** Active state */
|
|
8
10
|
active?: boolean;
|
|
9
11
|
open: boolean;
|
|
10
12
|
hasContent: boolean;
|
|
11
|
-
hostElement: HTMLZMenuSectionElement;
|
|
12
13
|
/** The section has been opened. */
|
|
13
14
|
opened: EventEmitter;
|
|
14
15
|
/** The section has been closed. */
|
|
@@ -20,6 +21,11 @@ export declare class ZMenuSection {
|
|
|
20
21
|
* Check if some content slot is set.
|
|
21
22
|
*/
|
|
22
23
|
private checkContent;
|
|
24
|
+
/**
|
|
25
|
+
* Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
|
|
26
|
+
* @param ev Slotchange event
|
|
27
|
+
*/
|
|
28
|
+
private onLabelSlotChange;
|
|
23
29
|
componentWillLoad(): void;
|
|
24
30
|
render(): HTMLZMenuSectionElement;
|
|
25
31
|
}
|
|
@@ -12,7 +12,7 @@ export declare class ZToastNotification {
|
|
|
12
12
|
autoclose?: number;
|
|
13
13
|
/** toast notification autoclose can be paused */
|
|
14
14
|
pauseonfocusloss?: boolean;
|
|
15
|
-
/** toast notification type:
|
|
15
|
+
/** toast notification type: dark, light, accent, error, success, warning */
|
|
16
16
|
type?: ToastNotification;
|
|
17
17
|
/** toast notification can be draggable*/
|
|
18
18
|
isdraggable?: boolean;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
2
|
import { CardVariant } from "../../beans";
|
|
3
|
+
/**
|
|
4
|
+
* ZCard component.
|
|
5
|
+
* @cssprop --aspect-ratio - Cover aspect ratio. Default: `1.62`
|
|
6
|
+
* @cssprop --z-card--border-color - Default: `var(--gray200)`
|
|
7
|
+
* @cssprop --z-card--color-cover-background - Cover color. Default: `var(--color-surface01)`
|
|
8
|
+
* @cssprop --z-card--text-background - Background color for the `text` variant. Default: `var(--color-surface01)`
|
|
9
|
+
* @cssprop --z-card--text-border-radius - Default: `none`
|
|
10
|
+
* @cssprop --z-card--text-border - Configure CSS `border`. Default: `none`
|
|
11
|
+
*/
|
|
3
12
|
export declare class ZCard {
|
|
4
13
|
/**
|
|
5
14
|
* Card variant.
|