@zanichelli/albe-web-components 7.1.3 → 7.2.0-offcanvas-RC1
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/CHANGELOG.md +22 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-chip.cjs.entry.js +3 -6
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -13
- 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 +14 -31
- package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-button.cjs.entry.js +2 -4
- 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 +3 -25
- package/dist/collection/components/buttons/z-chip/styles.css +21 -28
- package/dist/collection/components/buttons/z-toggle-button/index.js +1 -21
- package/dist/collection/components/buttons/z-toggle-button/styles.css +3 -1
- package/dist/collection/components/indicators/z-stepper-item/styles.css +1 -1
- package/dist/collection/components/notification/z-toast-notification/index.js +1 -1
- package/dist/collection/components/z-card/index.js +0 -9
- package/dist/collection/components/z-card/styles.css +1 -1
- package/dist/collection/components/z-offcanvas/index.js +31 -30
- package/dist/collection/components/z-offcanvas/styles.css +78 -87
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -13
- 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 +0 -12
- 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/loader.js +1 -1
- package/dist/esm/polyfills/css-shim.js +0 -0
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-button-sort.entry.js +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-chip.entry.js +4 -7
- package/dist/esm/z-myz-card-footer.entry.js +2 -14
- 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 +14 -31
- package/dist/esm/z-stepper-item.entry.js +1 -1
- package/dist/esm/z-toggle-button.entry.js +2 -4
- package/dist/types/beans/index.d.ts +0 -0
- package/dist/types/components/buttons/z-button/index.d.ts +0 -0
- package/dist/types/components/buttons/z-button-sort/index.d.ts +2 -2
- package/dist/types/components/buttons/z-chip/index.d.ts +0 -2
- package/dist/types/components/buttons/z-toggle-button/index.d.ts +0 -2
- package/dist/types/components/buttons/z-toggle-switch/index.d.ts +0 -0
- package/dist/types/components/date-picker/utils.d.ts +0 -0
- package/dist/types/components/date-picker/z-date-picker/index.d.ts +0 -0
- package/dist/types/components/date-picker/z-range-picker/index.d.ts +0 -0
- package/dist/types/components/file-upload/z-dragdrop-area/index.d.ts +0 -0
- package/dist/types/components/file-upload/z-file/index.d.ts +0 -0
- package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -0
- package/dist/types/components/icons/icons.d.ts +0 -0
- package/dist/types/components/icons/z-icon/index.d.ts +0 -0
- package/dist/types/components/index.d.ts +0 -0
- package/dist/types/components/indicators/z-stepper/index.d.ts +0 -0
- package/dist/types/components/indicators/z-stepper-item/index.d.ts +0 -0
- package/dist/types/components/inputs/z-combobox/index.d.ts +0 -0
- package/dist/types/components/inputs/z-input/index.d.ts +0 -0
- package/dist/types/components/inputs/z-input-message/index.d.ts +0 -0
- package/dist/types/components/inputs/z-searchbar/index.d.ts +0 -0
- package/dist/types/components/inputs/z-select/index.d.ts +0 -0
- package/dist/types/components/list/z-list/index.d.ts +0 -0
- package/dist/types/components/list/z-list-element/index.d.ts +0 -0
- package/dist/types/components/list/z-list-group/index.d.ts +0 -0
- package/dist/types/components/list/z-toast-notification-list/index.d.ts +0 -0
- package/dist/types/components/logo/z-logo/index.d.ts +0 -0
- package/dist/types/components/modal/z-modal/index.d.ts +0 -0
- package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +0 -0
- package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +0 -0
- package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +0 -0
- package/dist/types/components/navigation/z-app-header/index.d.ts +0 -0
- package/dist/types/components/navigation/z-link/index.d.ts +0 -0
- package/dist/types/components/navigation/z-menu/index.d.ts +0 -0
- package/dist/types/components/navigation/z-menu-section/index.d.ts +0 -0
- package/dist/types/components/notification/z-info-box/index.d.ts +0 -0
- package/dist/types/components/notification/z-notification/index.d.ts +0 -0
- package/dist/types/components/notification/z-toast-notification/index.d.ts +1 -1
- package/dist/types/components/notification/z-tooltip/index.d.ts +0 -0
- package/dist/types/components/panel/z-panel-elem/index.d.ts +0 -0
- package/dist/types/components/z-anchor-navigation/index.d.ts +0 -0
- package/dist/types/components/z-aria-alert/index.d.ts +0 -0
- package/dist/types/components/z-avatar/index.d.ts +0 -0
- package/dist/types/components/z-card/index.d.ts +0 -9
- package/dist/types/components/z-carousel/index.d.ts +0 -0
- package/dist/types/components/z-contextual-menu/index.d.ts +0 -0
- package/dist/types/components/z-cover-hero/index.d.ts +0 -0
- package/dist/types/components/z-divider/index.d.ts +0 -0
- package/dist/types/components/z-ghost-loading/index.d.ts +0 -0
- package/dist/types/components/z-info-reveal/index.d.ts +0 -0
- package/dist/types/components/z-offcanvas/index.d.ts +4 -4
- package/dist/types/components/z-pagination/index.d.ts +0 -0
- package/dist/types/components/z-popover/index.d.ts +0 -0
- package/dist/types/components/z-section-title/index.d.ts +0 -0
- package/dist/types/components/z-skip-to-content/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-body/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-cell/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-empty-box/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-expanded-row/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-footer/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-head/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-header/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-header-row/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-row/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-sticky-footer/index.d.ts +0 -0
- package/dist/types/components/z-tag/index.d.ts +0 -0
- package/dist/types/components/z-visually-hidden/index.d.ts +0 -0
- package/dist/types/components.d.ts +13 -21
- package/dist/types/constants/breakpoints.d.ts +0 -0
- package/dist/types/constants/icons.d.ts +0 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-alert/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-body/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-cover/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-dictionary/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +0 -2
- package/dist/types/snowflakes/myz/card/z-myz-card-footer-sections/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-header/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-icon/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-info/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-list/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/list/z-myz-list/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/list/z-myz-list-item/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-messages-pocket/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket-body/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket-header/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket-message/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/z-alert/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/z-otp/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/z-slideshow/index.d.ts +0 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -0
- package/dist/types/utils/utils.d.ts +0 -0
- package/dist/web-components-library/index.esm.js +0 -0
- package/dist/web-components-library/{p-f5a99b28.entry.js → p-05ced71c.entry.js} +1 -1
- package/dist/web-components-library/p-19ca449e.entry.js +1 -0
- package/dist/web-components-library/p-3a9cc467.entry.js +1 -0
- package/{www/build/p-10adc1fa.entry.js → dist/web-components-library/p-417b1b6c.entry.js} +1 -1
- package/dist/web-components-library/{p-9db2bf11.entry.js → p-810bd730.entry.js} +1 -1
- package/dist/web-components-library/p-9d03a7d6.entry.js +1 -0
- package/dist/web-components-library/p-b53d81b5.entry.js +1 -0
- package/dist/web-components-library/{p-f9f42d17.entry.js → p-c081e1f4.entry.js} +1 -1
- package/{www/build/p-6736e894.entry.js → dist/web-components-library/p-ede9fbf5.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.css +1 -2
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/loader/cdn.js +0 -0
- package/loader/index.cjs.js +0 -0
- package/loader/index.d.ts +0 -0
- package/loader/index.es2017.js +0 -0
- package/loader/index.js +0 -0
- package/loader/package.json +0 -0
- package/package.json +3 -2
- package/readme.md +1 -0
- package/www/build/index.esm.js +0 -0
- package/www/build/{p-f5a99b28.entry.js → p-05ced71c.entry.js} +1 -1
- package/www/build/p-19ca449e.entry.js +1 -0
- package/www/build/p-3a9cc467.entry.js +1 -0
- package/{dist/web-components-library/p-10adc1fa.entry.js → www/build/p-417b1b6c.entry.js} +1 -1
- package/www/build/{p-9db2bf11.entry.js → p-810bd730.entry.js} +1 -1
- package/www/build/p-9d03a7d6.entry.js +1 -0
- package/www/build/{p-f39bb490.css → p-ab4e13f7.css} +1 -2
- package/www/build/p-b53d81b5.entry.js +1 -0
- package/www/build/{p-f9f42d17.entry.js → p-c081e1f4.entry.js} +1 -1
- package/{dist/web-components-library/p-6736e894.entry.js → www/build/p-ede9fbf5.entry.js} +1 -1
- package/www/build/{p-fcacd67c.js → p-fed5c553.js} +1 -1
- package/www/build/web-components-library.css +1 -2
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.js +0 -0
- package/www/host.config.json +0 -0
- package/www/index.html +1 -1
- package/dist/web-components-library/p-068951a7.entry.js +0 -1
- package/dist/web-components-library/p-06b7dad4.entry.js +0 -1
- package/dist/web-components-library/p-8d134dc4.entry.js +0 -1
- package/dist/web-components-library/p-c722c5a4.entry.js +0 -1
- package/www/build/p-068951a7.entry.js +0 -1
- package/www/build/p-06b7dad4.entry.js +0 -1
- package/www/build/p-8d134dc4.entry.js +0 -1
- package/www/build/p-c722c5a4.entry.js +0 -1
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { Device, ZChipType } from "../../../beans";
|
|
3
|
-
import { getDevice } from "../../../utils/utils";
|
|
3
|
+
import { getDevice, handleKeyboardSubmit } from "../../../utils/utils";
|
|
4
4
|
export class ZChip {
|
|
5
5
|
constructor() {
|
|
6
6
|
/** z-chip size type, can be default, medium or small */
|
|
7
7
|
this.type = ZChipType.DEFAULT;
|
|
8
8
|
/** set z-chip as disabled */
|
|
9
9
|
this.disabled = false;
|
|
10
|
-
/** z-chip aria-label string */
|
|
11
|
-
this.ariaLabel = "";
|
|
12
10
|
}
|
|
13
11
|
emitinteractiveIconClick() {
|
|
14
12
|
this.interactiveIconClick.emit();
|
|
@@ -18,11 +16,9 @@ export class ZChip {
|
|
|
18
16
|
}
|
|
19
17
|
render() {
|
|
20
18
|
if (this.interactiveIcon) {
|
|
21
|
-
return (h("
|
|
22
|
-
() => this.emitinteractiveIconClick();
|
|
23
|
-
}, "aria-label": this.ariaLabel, disabled: this.disabled }, h("z-icon", { name: this.interactiveIcon, width: this.getIconSize(), height: this.getIconSize() }))));
|
|
19
|
+
return (h("button", { class: this.type, disabled: this.disabled, tabindex: "0", type: "button" }, this.icon && (h("z-icon", { class: "icon-sx", name: this.icon, width: this.getIconSize(), height: this.getIconSize() })), h("slot", null), h("z-icon", { tabIndex: this.disabled ? -1 : 0, onClick: () => this.emitinteractiveIconClick(), onKeyUp: (e) => handleKeyboardSubmit(e, this.emitinteractiveIconClick.bind(this)), name: this.interactiveIcon, width: this.getIconSize(), height: this.getIconSize() })));
|
|
24
20
|
}
|
|
25
|
-
return (h("div", { class: `${this.type}
|
|
21
|
+
return (h("div", { class: `${this.type}`, tabindex: "0" }, this.icon && (h("z-icon", { name: this.icon, width: this.getIconSize(), height: this.getIconSize() })), h("slot", null)));
|
|
26
22
|
}
|
|
27
23
|
static get is() { return "z-chip"; }
|
|
28
24
|
static get encapsulation() { return "scoped"; }
|
|
@@ -112,24 +108,6 @@ export class ZChip {
|
|
|
112
108
|
"attribute": "disabled",
|
|
113
109
|
"reflect": true,
|
|
114
110
|
"defaultValue": "false"
|
|
115
|
-
},
|
|
116
|
-
"ariaLabel": {
|
|
117
|
-
"type": "string",
|
|
118
|
-
"mutable": false,
|
|
119
|
-
"complexType": {
|
|
120
|
-
"original": "string",
|
|
121
|
-
"resolved": "string",
|
|
122
|
-
"references": {}
|
|
123
|
-
},
|
|
124
|
-
"required": false,
|
|
125
|
-
"optional": false,
|
|
126
|
-
"docs": {
|
|
127
|
-
"tags": [],
|
|
128
|
-
"text": "z-chip aria-label string"
|
|
129
|
-
},
|
|
130
|
-
"attribute": "aria-label",
|
|
131
|
-
"reflect": false,
|
|
132
|
-
"defaultValue": "\"\""
|
|
133
111
|
}
|
|
134
112
|
};
|
|
135
113
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:host >
|
|
1
|
+
:host > button {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
padding: 0 calc(var(--space-unit) * 1.5);
|
|
@@ -12,53 +12,46 @@
|
|
|
12
12
|
font-weight: var(--font-sb);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
:host >
|
|
15
|
+
:host > button:not(:disabled) > z-icon:last-child:hover {
|
|
16
16
|
color: var(--color-hover-primary);
|
|
17
17
|
fill: var(--color-hover-primary);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
:host >
|
|
20
|
+
:host > button:hover:not(:disabled) > z-icon:first-child {
|
|
21
21
|
fill: var(--color-icon02);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
:host >
|
|
25
|
-
padding: 0;
|
|
26
|
-
border: none;
|
|
27
|
-
margin-left: var(--space-unit);
|
|
28
|
-
background-color: transparent;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host > .z-chip-container > z-icon.icon-sx {
|
|
24
|
+
:host > button > z-icon.icon-sx {
|
|
33
25
|
margin-right: calc(var(--space-unit) / 2);
|
|
34
26
|
}
|
|
35
27
|
|
|
36
|
-
:host >
|
|
28
|
+
:host > button > z-icon:last-child {
|
|
29
|
+
margin-left: var(--space-unit);
|
|
30
|
+
cursor: pointer;
|
|
37
31
|
fill: var(--color-primary01);
|
|
38
32
|
}
|
|
39
33
|
|
|
40
|
-
:host >
|
|
41
|
-
:host >
|
|
42
|
-
:host > .z-chip-container[aria-disabled] > button > z-icon {
|
|
34
|
+
:host > button:disabled,
|
|
35
|
+
:host > button:disabled > z-icon {
|
|
43
36
|
color: var(--color-disabled03);
|
|
44
37
|
fill: var(--color-disabled03);
|
|
45
38
|
}
|
|
46
39
|
|
|
47
|
-
:host >
|
|
40
|
+
:host > button:disabled > z-icon {
|
|
48
41
|
cursor: auto;
|
|
49
42
|
}
|
|
50
43
|
|
|
51
|
-
:host >
|
|
44
|
+
:host > button:disabled {
|
|
52
45
|
border: var(--border-size-small) solid var(--color-disabled01);
|
|
53
46
|
}
|
|
54
47
|
|
|
55
|
-
:host >
|
|
56
|
-
|
|
48
|
+
:host > button:focus:focus-visible,
|
|
49
|
+
:host > div:focus:focus-visible {
|
|
57
50
|
box-shadow: var(--shadow-focus-primary);
|
|
58
51
|
outline: none;
|
|
59
52
|
}
|
|
60
53
|
|
|
61
|
-
:host > button:hover:not(:disabled):active:hover >
|
|
54
|
+
:host > button:hover:not(:disabled):active:hover > z-icon:last-child {
|
|
62
55
|
color: var(--color-primary01);
|
|
63
56
|
fill: var(--color-primary01);
|
|
64
57
|
}
|
|
@@ -83,21 +76,21 @@
|
|
|
83
76
|
}
|
|
84
77
|
|
|
85
78
|
/* :host type */
|
|
86
|
-
:host > .
|
|
79
|
+
:host > button.default,
|
|
87
80
|
:host > div.default {
|
|
88
81
|
min-height: 44px;
|
|
89
82
|
border-radius: 22px;
|
|
90
83
|
line-height: 44px;
|
|
91
84
|
}
|
|
92
85
|
|
|
93
|
-
:host > .
|
|
86
|
+
:host > button.medium,
|
|
94
87
|
:host > div.medium {
|
|
95
88
|
min-height: 40px;
|
|
96
89
|
border-radius: 22px;
|
|
97
90
|
line-height: 40px;
|
|
98
91
|
}
|
|
99
92
|
|
|
100
|
-
:host > .
|
|
93
|
+
:host > button.small,
|
|
101
94
|
:host > div.small {
|
|
102
95
|
min-height: 36px;
|
|
103
96
|
border-radius: 22px;
|
|
@@ -106,7 +99,7 @@
|
|
|
106
99
|
|
|
107
100
|
/* Desktop breakpoint */
|
|
108
101
|
@media only screen and (min-width: 1152px) {
|
|
109
|
-
:host >
|
|
102
|
+
:host > button {
|
|
110
103
|
font-size: 12px;
|
|
111
104
|
}
|
|
112
105
|
|
|
@@ -115,21 +108,21 @@
|
|
|
115
108
|
}
|
|
116
109
|
|
|
117
110
|
/* :host type */
|
|
118
|
-
:host > .
|
|
111
|
+
:host > button.default,
|
|
119
112
|
:host > div.default {
|
|
120
113
|
min-height: 32px;
|
|
121
114
|
border-radius: 16px;
|
|
122
115
|
line-height: 32px;
|
|
123
116
|
}
|
|
124
117
|
|
|
125
|
-
:host > .
|
|
118
|
+
:host > button.medium,
|
|
126
119
|
:host > div.medium {
|
|
127
120
|
min-height: 28px;
|
|
128
121
|
border-radius: 16px;
|
|
129
122
|
line-height: 28px;
|
|
130
123
|
}
|
|
131
124
|
|
|
132
|
-
:host > .
|
|
125
|
+
:host > button.small,
|
|
133
126
|
:host > div.small {
|
|
134
127
|
min-height: 24px;
|
|
135
128
|
border-radius: 16px;
|
|
@@ -5,8 +5,6 @@ export class ZToggleButton {
|
|
|
5
5
|
this.isdisabled = false;
|
|
6
6
|
/** open by default (optional) */
|
|
7
7
|
this.opened = false;
|
|
8
|
-
/** aria-label for the button */
|
|
9
|
-
this.ariaLabel = "";
|
|
10
8
|
}
|
|
11
9
|
emitToggleClick() {
|
|
12
10
|
if (this.isdisabled) {
|
|
@@ -19,7 +17,7 @@ export class ZToggleButton {
|
|
|
19
17
|
return (h("button", { tabindex: this.avoidclick ? "-1" : "0", class: {
|
|
20
18
|
"isopen": this.opened,
|
|
21
19
|
"avoid-clicks": this.avoidclick,
|
|
22
|
-
}, disabled: this.isdisabled,
|
|
20
|
+
}, disabled: this.isdisabled, onClick: () => this.emitToggleClick() }, h("z-icon", { name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
|
|
23
21
|
}
|
|
24
22
|
static get is() { return "z-toggle-button"; }
|
|
25
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -104,24 +102,6 @@ export class ZToggleButton {
|
|
|
104
102
|
"attribute": "opened",
|
|
105
103
|
"reflect": false,
|
|
106
104
|
"defaultValue": "false"
|
|
107
|
-
},
|
|
108
|
-
"ariaLabel": {
|
|
109
|
-
"type": "string",
|
|
110
|
-
"mutable": false,
|
|
111
|
-
"complexType": {
|
|
112
|
-
"original": "string",
|
|
113
|
-
"resolved": "string",
|
|
114
|
-
"references": {}
|
|
115
|
-
},
|
|
116
|
-
"required": false,
|
|
117
|
-
"optional": false,
|
|
118
|
-
"docs": {
|
|
119
|
-
"tags": [],
|
|
120
|
-
"text": "aria-label for the button"
|
|
121
|
-
},
|
|
122
|
-
"attribute": "aria-label",
|
|
123
|
-
"reflect": false,
|
|
124
|
-
"defaultValue": "\"\""
|
|
125
105
|
}
|
|
126
106
|
};
|
|
127
107
|
}
|
|
@@ -15,6 +15,7 @@ button {
|
|
|
15
15
|
font-weight: var(--font-sb);
|
|
16
16
|
outline: none;
|
|
17
17
|
text-transform: uppercase;
|
|
18
|
+
transition: all 200ms linear;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
button::-moz-focus-inner {
|
|
@@ -27,7 +28,8 @@ button:hover {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
button:focus {
|
|
30
|
-
|
|
31
|
+
border-color: var(--myz-blue);
|
|
32
|
+
box-shadow: 0 0 2px 2px var(--accent-dark);
|
|
31
33
|
color: var(--myz-blue);
|
|
32
34
|
fill: var(--myz-blue);
|
|
33
35
|
}
|
|
@@ -295,7 +295,7 @@ export class ZToastNotification {
|
|
|
295
295
|
"optional": true,
|
|
296
296
|
"docs": {
|
|
297
297
|
"tags": [],
|
|
298
|
-
"text": "toast notification type:
|
|
298
|
+
"text": "toast notification type: dark, light, accent, error, success, warning"
|
|
299
299
|
},
|
|
300
300
|
"attribute": "type",
|
|
301
301
|
"reflect": false
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
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
|
-
*/
|
|
12
3
|
export class ZCard {
|
|
13
4
|
constructor() {
|
|
14
5
|
/** Enable click interactions on the card. Default: false */
|
|
@@ -183,7 +183,7 @@ Unfortunately the `aspect-ratio` property is still experimental */
|
|
|
183
183
|
|
|
184
184
|
:host([variant="shadow"][clickable]:focus:focus-visible),
|
|
185
185
|
:host([clickable][showshadow]:focus:focus-visible) {
|
|
186
|
-
box-shadow: var(--shadow-
|
|
186
|
+
box-shadow: var(--shadow-4);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([variant="shadow"][clickable]:active),
|
|
@@ -13,46 +13,29 @@ export class ZOffcanvas {
|
|
|
13
13
|
this.variant = OffCanvasVariant.PUSHCONTENT;
|
|
14
14
|
/** open component. Default: false */
|
|
15
15
|
this.open = false;
|
|
16
|
+
/** allows you to skip the entry animation on page load, to be used with the open prop at true */
|
|
17
|
+
this.skipanimationonload = false;
|
|
16
18
|
/** open content transitioning in a specified direction left | right. Default: left */
|
|
17
19
|
this.transitiondirection = TransitionDirection.LEFT;
|
|
18
20
|
}
|
|
19
|
-
componentWillLoad() {
|
|
20
|
-
this.handleOpenStatus();
|
|
21
|
-
}
|
|
22
21
|
onOpenChanged() {
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
handleOpenStatus() {
|
|
27
|
-
if (this.open) {
|
|
28
|
-
this.hostElement.style.opacity = "0";
|
|
29
|
-
this.hostElement.style.display = "flex";
|
|
30
|
-
if (this.variant === OffCanvasVariant.OVERLAY) {
|
|
31
|
-
document.body.style.overflowY = "hidden";
|
|
32
|
-
}
|
|
22
|
+
if (!this.open && this.skipanimationonload) {
|
|
23
|
+
this.skipanimationonload = false;
|
|
33
24
|
}
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
document.body.style.overflowX = "hidden";
|
|
25
|
+
if (this.open) {
|
|
26
|
+
this.handleOverflowProperty();
|
|
37
27
|
}
|
|
28
|
+
this.canvasOpenStatusChanged.emit(this.open);
|
|
38
29
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
else if (this.variant === OffCanvasVariant.OVERLAY) {
|
|
44
|
-
this.hostElement.style.display = "none";
|
|
45
|
-
document.body.style.overflowX = "initial";
|
|
46
|
-
document.body.style.overflowY = "initial";
|
|
47
|
-
}
|
|
30
|
+
handleOverflowProperty() {
|
|
31
|
+
const overflow = this.variant === OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
|
|
32
|
+
document.body.style[overflow] = this.open ? "hidden" : "";
|
|
48
33
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.hostElement.style.opacity = "1";
|
|
52
|
-
}
|
|
34
|
+
handledTransitionEnd() {
|
|
35
|
+
this.handleOverflowProperty();
|
|
53
36
|
}
|
|
54
37
|
render() {
|
|
55
|
-
return (h(Host,
|
|
38
|
+
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) }))));
|
|
56
39
|
}
|
|
57
40
|
static get is() { return "z-offcanvas"; }
|
|
58
41
|
static get encapsulation() { return "scoped"; }
|
|
@@ -109,6 +92,24 @@ export class ZOffcanvas {
|
|
|
109
92
|
"reflect": true,
|
|
110
93
|
"defaultValue": "false"
|
|
111
94
|
},
|
|
95
|
+
"skipanimationonload": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"mutable": true,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "boolean",
|
|
100
|
+
"resolved": "boolean",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "allows you to skip the entry animation on page load, to be used with the open prop at true"
|
|
108
|
+
},
|
|
109
|
+
"attribute": "skipanimationonload",
|
|
110
|
+
"reflect": false,
|
|
111
|
+
"defaultValue": "false"
|
|
112
|
+
},
|
|
112
113
|
"transitiondirection": {
|
|
113
114
|
"type": "string",
|
|
114
115
|
"mutable": false,
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
--z-offcanvas--container-width: 375px;
|
|
3
3
|
--z-offcanvas--top-space: 0;
|
|
4
4
|
|
|
5
|
-
display: none;
|
|
6
5
|
min-width: 100%;
|
|
7
6
|
height: 100%;
|
|
8
|
-
justify-content: end;
|
|
9
7
|
font-family: var(--font-family-sans);
|
|
10
8
|
font-weight: var(--font-rg);
|
|
9
|
+
visibility: hidden;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
.canvas-container {
|
|
@@ -18,41 +17,15 @@
|
|
|
18
17
|
height: 100%;
|
|
19
18
|
flex-direction: column;
|
|
20
19
|
background: var(--color-surface01);
|
|
21
|
-
transform: translateX(100%);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@keyframes enter-right {
|
|
25
|
-
from {
|
|
26
|
-
transform: translateX(100%);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
to {
|
|
30
|
-
transform: translateX(0);
|
|
31
|
-
}
|
|
32
20
|
}
|
|
33
21
|
|
|
34
|
-
:host([
|
|
35
|
-
|
|
36
|
-
animation-name: enter-right;
|
|
37
|
-
animation-timing-function: ease-out;
|
|
38
|
-
transform: translateX(0);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@keyframes exit-right {
|
|
42
|
-
from {
|
|
43
|
-
transform: translateX(0);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
to {
|
|
47
|
-
transform: translateX(100%);
|
|
48
|
-
}
|
|
22
|
+
:host([variant="pushcontent"]) {
|
|
23
|
+
display: none;
|
|
49
24
|
}
|
|
50
25
|
|
|
51
|
-
:host(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
animation-timing-function: ease-out;
|
|
55
|
-
transform: translateX(100%);
|
|
26
|
+
:host([open]) {
|
|
27
|
+
display: flex;
|
|
28
|
+
visibility: visible;
|
|
56
29
|
}
|
|
57
30
|
|
|
58
31
|
:host([variant="overlay"]) {
|
|
@@ -62,9 +35,14 @@
|
|
|
62
35
|
right: 0;
|
|
63
36
|
bottom: 0;
|
|
64
37
|
left: 0;
|
|
38
|
+
display: flex;
|
|
65
39
|
height: calc(100% - var(--z-offcanvas--top-space));
|
|
66
40
|
}
|
|
67
41
|
|
|
42
|
+
:host([variant="overlay"][transitiondirection="left"]) {
|
|
43
|
+
justify-content: end;
|
|
44
|
+
}
|
|
45
|
+
|
|
68
46
|
:host([variant="overlay"]) > .canvas-container {
|
|
69
47
|
z-index: 1010;
|
|
70
48
|
}
|
|
@@ -78,48 +56,6 @@
|
|
|
78
56
|
opacity: 0.7;
|
|
79
57
|
}
|
|
80
58
|
|
|
81
|
-
:host([transitiondirection="right"]) {
|
|
82
|
-
justify-content: start;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
:host([transitiondirection="right"]) > .canvas-container {
|
|
86
|
-
transform: translateX(-100%);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@keyframes enter-left {
|
|
90
|
-
from {
|
|
91
|
-
transform: translateX(-100%);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
to {
|
|
95
|
-
transform: translateX(0);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host([transitiondirection="right"][open]) > .canvas-container {
|
|
100
|
-
animation-duration: 0.4s;
|
|
101
|
-
animation-name: enter-left;
|
|
102
|
-
animation-timing-function: ease-out;
|
|
103
|
-
transform: translateX(0);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
@keyframes exit-left {
|
|
107
|
-
from {
|
|
108
|
-
transform: translateX(0);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
to {
|
|
112
|
-
transform: translateX(-100%);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:host(:not([open])[variant="overlay"][transitiondirection="right"]) > .canvas-container {
|
|
117
|
-
animation-duration: 0.4s;
|
|
118
|
-
animation-name: exit-left;
|
|
119
|
-
animation-timing-function: ease-out;
|
|
120
|
-
transform: translateX(-100%);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
59
|
.canvas-container > .canvas-content {
|
|
124
60
|
overflow: auto;
|
|
125
61
|
flex: 1 auto;
|
|
@@ -133,6 +69,7 @@
|
|
|
133
69
|
margin: calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0;
|
|
134
70
|
}
|
|
135
71
|
|
|
72
|
+
/* Webkit Scrollbar */
|
|
136
73
|
.canvas-container .canvas-content::-webkit-scrollbar {
|
|
137
74
|
width: 10px;
|
|
138
75
|
background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);
|
|
@@ -158,6 +95,17 @@
|
|
|
158
95
|
scrollbar-color: var(--color-primary01) transparent;
|
|
159
96
|
}
|
|
160
97
|
|
|
98
|
+
/* Mobile */
|
|
99
|
+
@media only screen and (max-width: 768px) {
|
|
100
|
+
:host([open][transitiondirection="left"]:not(.skip-animation)) > .canvas-container {
|
|
101
|
+
animation: enter-right 0.4s ease-out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([open][transitiondirection="right"]:not(.skip-animation)) > .canvas-container {
|
|
105
|
+
animation: enter-left 0.4s ease-out;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
161
109
|
/* Tablet / Desktop */
|
|
162
110
|
@media only screen and (min-width: 768px) {
|
|
163
111
|
:host {
|
|
@@ -172,20 +120,63 @@
|
|
|
172
120
|
min-height: calc(var(--space-unit) * 40);
|
|
173
121
|
}
|
|
174
122
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
123
|
+
:host(:not([variant="overlay"])[open]:not(.skip-animation)) {
|
|
124
|
+
width: auto;
|
|
125
|
+
animation: grow 0.4s ease-out;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ANIMATION */
|
|
179
130
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
131
|
+
@keyframes grow {
|
|
132
|
+
from {
|
|
133
|
+
width: 0;
|
|
183
134
|
}
|
|
184
135
|
|
|
185
|
-
|
|
186
|
-
width:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
136
|
+
to {
|
|
137
|
+
width: max(var(--z-offcanvas--container-width), 375px);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@keyframes enter-left {
|
|
142
|
+
from {
|
|
143
|
+
transform: translateX(-100%);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
to {
|
|
147
|
+
transform: translateX(0);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@keyframes enter-right {
|
|
152
|
+
from {
|
|
153
|
+
transform: translateX(100%);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
to {
|
|
157
|
+
transform: translateX(0);
|
|
190
158
|
}
|
|
191
159
|
}
|
|
160
|
+
|
|
161
|
+
:host([open][variant="overlay"][transitiondirection="left"]:not(.skip-animation)) > .canvas-container {
|
|
162
|
+
animation: enter-right 0.4s ease-out;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:host([open][transitiondirection="right"]:not(.skip-animation)) > .canvas-container {
|
|
166
|
+
animation: enter-left 0.4s ease-out;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host(:not([open])[variant="overlay"][transitiondirection="right"]) > .canvas-container {
|
|
170
|
+
transform: translateX(-100%);
|
|
171
|
+
transition: visibility 0.4s ease-out, transform 0.4s ease-out;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host(:not([open])[variant="overlay"][transitiondirection="left"]) > .canvas-container {
|
|
175
|
+
transform: translateX(100%);
|
|
176
|
+
transition: visibility 0.4s ease-out, transform 0.4s ease-out;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:host(:not([open])[variant="overlay"]) .canvas-background {
|
|
180
|
+
transition: visibility 0.4s ease-out;
|
|
181
|
+
visibility: hidden;
|
|
182
|
+
}
|
|
@@ -15,14 +15,6 @@ export class ZMyzCardFooter {
|
|
|
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
|
-
}
|
|
26
18
|
}
|
|
27
19
|
getTitleAuthors() {
|
|
28
20
|
return this.allowTooltipAuthors ? this.autori : "";
|
|
@@ -52,11 +44,8 @@ export class ZMyzCardFooter {
|
|
|
52
44
|
this.elementsEllipsis();
|
|
53
45
|
}
|
|
54
46
|
}
|
|
55
|
-
getFirstListItem() {
|
|
56
|
-
return this.host.querySelector("[slot=list] > li a");
|
|
57
|
-
}
|
|
58
47
|
render() {
|
|
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", {
|
|
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" })));
|
|
60
49
|
}
|
|
61
50
|
static get is() { return "z-myz-card-footer"; }
|
|
62
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -206,7 +195,6 @@ export class ZMyzCardFooter {
|
|
|
206
195
|
"allowTooltipAuthors": {}
|
|
207
196
|
};
|
|
208
197
|
}
|
|
209
|
-
static get elementRef() { return "host"; }
|
|
210
198
|
static get listeners() {
|
|
211
199
|
return [{
|
|
212
200
|
"name": "toggleClick",
|
|
@@ -27,7 +27,7 @@ export class ZMyzCardHeader {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h("header", { class: this.retrieveClass() }, h("
|
|
30
|
+
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" })));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "z-myz-card-header"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,18 +11,6 @@ header {
|
|
|
11
11
|
border-radius: var(--border-radius) var(--border-radius) var(--border-no-radius) var(--border-no-radius);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
slot[name="aria-heading"]::slotted(*) {
|
|
15
|
-
position: absolute;
|
|
16
|
-
overflow: hidden !important;
|
|
17
|
-
width: 1px !important;
|
|
18
|
-
height: 1px !important;
|
|
19
|
-
padding: 0 !important;
|
|
20
|
-
border: 0 none !important;
|
|
21
|
-
margin: -1px !important;
|
|
22
|
-
clip: rect(0, 0, 0, 0) !important;
|
|
23
|
-
white-space: nowrap !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
14
|
header.real,
|
|
27
15
|
header.trial,
|
|
28
16
|
header.temp {
|