@zanichelli/albe-web-components 6.5.0-offcanvasTest3 → 6.5.1
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 +15 -0
- package/dist/cjs/index-e3299e0a.js +20 -36
- 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 +153 -0
- package/dist/cjs/z-app-switcher.cjs.entry.js +29 -0
- package/dist/cjs/{z-modal.cjs.entry.js → z-dragdrop-area_3.cjs.entry.js} +43 -0
- package/dist/cjs/z-input_2.cjs.entry.js +1 -1
- package/dist/cjs/{z-app-switcher_2.cjs.entry.js → z-logo.cjs.entry.js} +0 -23
- package/dist/cjs/{z-icon_2.cjs.entry.js → z-offcanvas.cjs.entry.js} +0 -20
- package/dist/cjs/z-table-row.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +0 -4
- package/dist/collection/components/inputs/z-input/styles.css +3 -0
- package/dist/collection/components/z-table/z-table-row/index.js +2 -2
- package/dist/esm/index-a2ca4b97.js +20 -36
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-ccb4d66f.js → utils-6cf7efe2.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_2.entry.js +148 -0
- package/dist/esm/z-app-switcher.entry.js +25 -0
- package/dist/esm/z-chip.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/{z-modal.entry.js → z-dragdrop-area_3.entry.js} +42 -1
- package/dist/esm/z-file-upload.entry.js +1 -1
- package/dist/esm/z-input_2.entry.js +2 -2
- package/dist/esm/{z-app-switcher_2.entry.js → z-logo.entry.js} +2 -24
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/{z-icon_2.entry.js → z-offcanvas.entry.js} +2 -21
- package/dist/esm/z-pocket_3.entry.js +1 -1
- package/dist/esm/z-popover.entry.js +1 -1
- package/dist/esm/z-select.entry.js +1 -1
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +1 -1
- package/dist/esm/z-table-row.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/types/components.d.ts +2 -230
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/p-1cb23bbb.entry.js +1 -0
- package/dist/web-components-library/p-1d66b265.entry.js +1 -0
- package/{www/build/p-9965827d.entry.js → dist/web-components-library/p-26033729.entry.js} +1 -1
- package/dist/web-components-library/{p-8bf0844b.entry.js → p-53065788.entry.js} +1 -1
- package/dist/web-components-library/{p-1b6279a6.entry.js → p-5c62387a.entry.js} +1 -1
- package/dist/web-components-library/{p-20a3247c.entry.js → p-6c163539.entry.js} +1 -1
- package/dist/web-components-library/{p-279655eb.entry.js → p-7b3b99ee.entry.js} +1 -1
- package/{www/build/p-3d9ecc23.entry.js → dist/web-components-library/p-7ea553e9.entry.js} +1 -1
- package/dist/web-components-library/{p-547d3b1f.entry.js → p-8305bbcc.entry.js} +1 -1
- package/dist/web-components-library/{p-cd43f80d.js → p-8ebe4adf.js} +1 -1
- package/dist/web-components-library/{p-98c94e81.entry.js → p-91a74348.entry.js} +1 -1
- package/dist/web-components-library/{p-c25b0b2a.entry.js → p-93142fac.entry.js} +1 -1
- package/dist/web-components-library/p-9a613586.entry.js +1 -0
- package/{www/build/p-411cbcd6.entry.js → dist/web-components-library/p-a05ce0a6.entry.js} +1 -1
- package/{www/build/p-bdc6f2e5.entry.js → dist/web-components-library/p-a6c0f149.entry.js} +1 -1
- package/dist/web-components-library/p-ae79573a.entry.js +1 -0
- package/dist/web-components-library/p-bdefe224.entry.js +1 -0
- package/dist/web-components-library/{p-8980398c.entry.js → p-d2127d84.entry.js} +1 -1
- package/{www/build/p-8b960526.entry.js → dist/web-components-library/p-dd000757.entry.js} +1 -1
- package/dist/web-components-library/p-de55c171.entry.js +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +0 -4
- package/react/components.js +2 -6
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/p-1cb23bbb.entry.js +1 -0
- package/www/build/p-1d66b265.entry.js +1 -0
- package/{dist/web-components-library/p-9965827d.entry.js → www/build/p-26033729.entry.js} +1 -1
- package/www/build/p-4b159cbd.css +1 -0
- package/www/build/{p-8bf0844b.entry.js → p-53065788.entry.js} +1 -1
- package/www/build/{p-1b6279a6.entry.js → p-5c62387a.entry.js} +1 -1
- package/www/build/{p-20a3247c.entry.js → p-6c163539.entry.js} +1 -1
- package/www/build/{p-279655eb.entry.js → p-7b3b99ee.entry.js} +1 -1
- package/{dist/web-components-library/p-3d9ecc23.entry.js → www/build/p-7ea553e9.entry.js} +1 -1
- package/www/build/{p-547d3b1f.entry.js → p-8305bbcc.entry.js} +1 -1
- package/www/build/{p-cd43f80d.js → p-8ebe4adf.js} +1 -1
- package/www/build/{p-98c94e81.entry.js → p-91a74348.entry.js} +1 -1
- package/www/build/{p-c25b0b2a.entry.js → p-93142fac.entry.js} +1 -1
- package/www/build/p-9a613586.entry.js +1 -0
- package/{dist/web-components-library/p-411cbcd6.entry.js → www/build/p-a05ce0a6.entry.js} +1 -1
- package/{dist/web-components-library/p-bdc6f2e5.entry.js → www/build/p-a6c0f149.entry.js} +1 -1
- package/www/build/p-ae79573a.entry.js +1 -0
- package/www/build/p-bdefe224.entry.js +1 -0
- package/www/build/{p-8980398c.entry.js → p-d2127d84.entry.js} +1 -1
- package/www/build/p-dbb8bcb2.js +1 -0
- package/{dist/web-components-library/p-8b960526.entry.js → www/build/p-dd000757.entry.js} +1 -1
- package/www/build/p-de55c171.entry.js +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -8
- package/www/pages/file-upload.html +0 -33
- package/www/pages/notification.html +0 -33
- package/dist/cjs/z-app-header.cjs.entry.js +0 -133
- package/dist/cjs/z-app-topbar.cjs.entry.js +0 -41
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +0 -49
- package/dist/cjs/z-menu-dropdown.cjs.entry.js +0 -59
- package/dist/cjs/z-modal-login.cjs.entry.js +0 -84
- package/dist/cjs/z-user-dropdown.cjs.entry.js +0 -93
- package/dist/collection/components/modal/z-modal-login/index.js +0 -251
- package/dist/collection/components/modal/z-modal-login/styles.css +0 -150
- package/dist/collection/components/navigation/z-app-topbar/index.js +0 -156
- package/dist/collection/components/navigation/z-app-topbar/styles.css +0 -65
- package/dist/collection/components/navigation/z-menu-dropdown/index.js +0 -124
- package/dist/collection/components/navigation/z-menu-dropdown/styles.css +0 -146
- package/dist/collection/components/navigation/z-user-dropdown/index.js +0 -247
- package/dist/collection/components/navigation/z-user-dropdown/styles.css +0 -306
- package/dist/esm/z-app-header.entry.js +0 -129
- package/dist/esm/z-app-topbar.entry.js +0 -37
- package/dist/esm/z-dragdrop-area_2.entry.js +0 -44
- package/dist/esm/z-menu-dropdown.entry.js +0 -55
- package/dist/esm/z-modal-login.entry.js +0 -80
- package/dist/esm/z-user-dropdown.entry.js +0 -89
- package/dist/types/components/modal/z-modal-login/index.d.ts +0 -41
- package/dist/types/components/navigation/z-app-topbar/index.d.ts +0 -20
- package/dist/types/components/navigation/z-menu-dropdown/index.d.ts +0 -19
- package/dist/types/components/navigation/z-user-dropdown/index.d.ts +0 -39
- package/dist/web-components-library/p-1ba8d432.entry.js +0 -1
- package/dist/web-components-library/p-3c2d438b.entry.js +0 -1
- package/dist/web-components-library/p-4cd6c6f4.entry.js +0 -1
- package/dist/web-components-library/p-682528b2.entry.js +0 -1
- package/dist/web-components-library/p-9ed27651.entry.js +0 -1
- package/dist/web-components-library/p-a2b67e2d.entry.js +0 -1
- package/dist/web-components-library/p-b17981a4.entry.js +0 -1
- package/dist/web-components-library/p-d3c72572.entry.js +0 -1
- package/dist/web-components-library/p-edf0195b.entry.js +0 -1
- package/dist/web-components-library/p-f20d1242.entry.js +0 -1
- package/www/build/p-1ba8d432.entry.js +0 -1
- package/www/build/p-3c2d438b.entry.js +0 -1
- package/www/build/p-4cd6c6f4.entry.js +0 -1
- package/www/build/p-682528b2.entry.js +0 -1
- package/www/build/p-99d3834c.js +0 -129
- package/www/build/p-9ed27651.entry.js +0 -1
- package/www/build/p-a2b67e2d.entry.js +0 -1
- package/www/build/p-b17981a4.entry.js +0 -1
- package/www/build/p-d3c72572.entry.js +0 -1
- package/www/build/p-e680285b.css +0 -1636
- package/www/build/p-edf0195b.entry.js +0 -1
- package/www/build/p-f20d1242.entry.js +0 -1
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { DividerOrientation, ThemeVariant } from "../../../beans";
|
|
3
|
-
import { mobileBreakpoint } from "../../../constants/breakpoints";
|
|
4
|
-
export class ZAppTopbar {
|
|
5
|
-
constructor() {
|
|
6
|
-
/** theme variant, default 'dark' */
|
|
7
|
-
this.theme = ThemeVariant.DARK;
|
|
8
|
-
this.topbarLinks = [];
|
|
9
|
-
}
|
|
10
|
-
handleResize() {
|
|
11
|
-
this.isMobile = window.innerWidth <= mobileBreakpoint;
|
|
12
|
-
}
|
|
13
|
-
componentWillLoad() {
|
|
14
|
-
this.isMobile = window.screen.width <= mobileBreakpoint || window.innerWidth <= mobileBreakpoint;
|
|
15
|
-
}
|
|
16
|
-
componentWillRender() {
|
|
17
|
-
if (this.topbarContent) {
|
|
18
|
-
this.topbarLinks = typeof this.topbarContent === "string" ? JSON.parse(this.topbarContent) : this.topbarContent;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
renderTopbarLinks() {
|
|
22
|
-
return this.topbarLinks.map((link) => (h("z-link", { htmlid: link.id, textcolor: this.theme === ThemeVariant.LIGHT ? "black" : "white", href: link.link, target: link.target, icon: this.isMobile ? link.icon : undefined }, !this.isMobile && link.label)));
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return (h(Host, { class: {
|
|
26
|
-
[this.theme]: true,
|
|
27
|
-
"limited-width": !!this.contentMaxWidth,
|
|
28
|
-
} }, h("div", { id: "content-container", style: this.contentMaxWidth ? { "--mw": `${this.contentMaxWidth}px` } : {} }, h("div", { id: "left-panel", class: "content-panel" }, h("z-logo", { mobileLogo: this.isMobile, width: this.isMobile ? 32 : 128, height: this.isMobile ? 40 : 32, imageAlt: "zanichelli-logo", link: this.logoLink, targetBlank: true }), this.isMobile && this.renderTopbarLinks()), h("div", { id: "right-panel", class: "content-panel" }, !this.isMobile && this.renderTopbarLinks(), this.showAppSwitcher && h("z-app-switcher", { theme: this.theme }), h("div", { id: "divider-container" }, h("z-divider", { orientation: DividerOrientation.VERTICAL, color: this.theme === ThemeVariant.LIGHT ? "gray800" : "color-white" })), h("slot", { name: "login" })))));
|
|
29
|
-
}
|
|
30
|
-
static get is() { return "z-app-topbar"; }
|
|
31
|
-
static get encapsulation() { return "shadow"; }
|
|
32
|
-
static get originalStyleUrls() {
|
|
33
|
-
return {
|
|
34
|
-
"$": ["styles.css"]
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
static get styleUrls() {
|
|
38
|
-
return {
|
|
39
|
-
"$": ["styles.css"]
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
static get properties() {
|
|
43
|
-
return {
|
|
44
|
-
"theme": {
|
|
45
|
-
"type": "string",
|
|
46
|
-
"mutable": false,
|
|
47
|
-
"complexType": {
|
|
48
|
-
"original": "ThemeVariant",
|
|
49
|
-
"resolved": "ThemeVariant.DARK | ThemeVariant.LIGHT",
|
|
50
|
-
"references": {
|
|
51
|
-
"ThemeVariant": {
|
|
52
|
-
"location": "import",
|
|
53
|
-
"path": "../../../beans"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"required": false,
|
|
58
|
-
"optional": true,
|
|
59
|
-
"docs": {
|
|
60
|
-
"tags": [],
|
|
61
|
-
"text": "theme variant, default 'dark'"
|
|
62
|
-
},
|
|
63
|
-
"attribute": "theme",
|
|
64
|
-
"reflect": false,
|
|
65
|
-
"defaultValue": "ThemeVariant.DARK"
|
|
66
|
-
},
|
|
67
|
-
"contentMaxWidth": {
|
|
68
|
-
"type": "number",
|
|
69
|
-
"mutable": false,
|
|
70
|
-
"complexType": {
|
|
71
|
-
"original": "number",
|
|
72
|
-
"resolved": "number",
|
|
73
|
-
"references": {}
|
|
74
|
-
},
|
|
75
|
-
"required": false,
|
|
76
|
-
"optional": true,
|
|
77
|
-
"docs": {
|
|
78
|
-
"tags": [],
|
|
79
|
-
"text": "maximum width of topbar content"
|
|
80
|
-
},
|
|
81
|
-
"attribute": "content-max-width",
|
|
82
|
-
"reflect": false
|
|
83
|
-
},
|
|
84
|
-
"topbarContent": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"mutable": false,
|
|
87
|
-
"complexType": {
|
|
88
|
-
"original": "string | MenuItem[]",
|
|
89
|
-
"resolved": "MenuItem[] | string",
|
|
90
|
-
"references": {
|
|
91
|
-
"MenuItem": {
|
|
92
|
-
"location": "import",
|
|
93
|
-
"path": "../../../beans"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"required": false,
|
|
98
|
-
"optional": true,
|
|
99
|
-
"docs": {
|
|
100
|
-
"tags": [],
|
|
101
|
-
"text": "JSON string or MenuItem array to define topbar links"
|
|
102
|
-
},
|
|
103
|
-
"attribute": "topbar-content",
|
|
104
|
-
"reflect": false
|
|
105
|
-
},
|
|
106
|
-
"logoLink": {
|
|
107
|
-
"type": "string",
|
|
108
|
-
"mutable": false,
|
|
109
|
-
"complexType": {
|
|
110
|
-
"original": "string",
|
|
111
|
-
"resolved": "string",
|
|
112
|
-
"references": {}
|
|
113
|
-
},
|
|
114
|
-
"required": false,
|
|
115
|
-
"optional": true,
|
|
116
|
-
"docs": {
|
|
117
|
-
"tags": [],
|
|
118
|
-
"text": "link URL used by z-logo"
|
|
119
|
-
},
|
|
120
|
-
"attribute": "logo-link",
|
|
121
|
-
"reflect": false
|
|
122
|
-
},
|
|
123
|
-
"showAppSwitcher": {
|
|
124
|
-
"type": "boolean",
|
|
125
|
-
"mutable": false,
|
|
126
|
-
"complexType": {
|
|
127
|
-
"original": "boolean",
|
|
128
|
-
"resolved": "boolean",
|
|
129
|
-
"references": {}
|
|
130
|
-
},
|
|
131
|
-
"required": false,
|
|
132
|
-
"optional": false,
|
|
133
|
-
"docs": {
|
|
134
|
-
"tags": [],
|
|
135
|
-
"text": "add app-switcher"
|
|
136
|
-
},
|
|
137
|
-
"attribute": "show-app-switcher",
|
|
138
|
-
"reflect": false
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
static get states() {
|
|
143
|
-
return {
|
|
144
|
-
"isMobile": {}
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
static get listeners() {
|
|
148
|
-
return [{
|
|
149
|
-
"name": "resize",
|
|
150
|
-
"method": "handleResize",
|
|
151
|
-
"target": "window",
|
|
152
|
-
"capture": false,
|
|
153
|
-
"passive": true
|
|
154
|
-
}];
|
|
155
|
-
}
|
|
156
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
position: sticky;
|
|
3
|
-
z-index: 99;
|
|
4
|
-
top: 0;
|
|
5
|
-
display: block;
|
|
6
|
-
height: calc(var(--space-unit) * 6);
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
padding: calc(var(--space-unit) / 2) calc(var(--space-unit) * 2);
|
|
9
|
-
background-color: var(--gray900);
|
|
10
|
-
border-radius: var(--border-no-radius);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host(.light) {
|
|
14
|
-
background-color: var(--color-white);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:host > div {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host(.limited-width) #content-container {
|
|
24
|
-
--mw: none;
|
|
25
|
-
|
|
26
|
-
max-width: var(--mw);
|
|
27
|
-
margin: auto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.content-panel {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.content-panel > :not(:last-child) {
|
|
36
|
-
margin-right: calc(var(--space-unit) * 2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
#divider-container {
|
|
40
|
-
display: none;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
z-link {
|
|
44
|
-
font-family: var(--font-family-sans);
|
|
45
|
-
font-size: 14px;
|
|
46
|
-
font-weight: var(--font-sb);
|
|
47
|
-
letter-spacing: 0.3px;
|
|
48
|
-
line-height: 20px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* Tablet breakpoint */
|
|
52
|
-
@media only screen and (min-width: 768px) {
|
|
53
|
-
:host {
|
|
54
|
-
padding: var(--space-unit) calc(var(--space-unit) * 2) var(--space-unit) var(--space-unit);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host(.limited-width) {
|
|
58
|
-
padding: var(--space-unit);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
#divider-container {
|
|
62
|
-
display: block;
|
|
63
|
-
height: calc(var(--space-unit) * 3);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { KeyboardKeyCode } from "../../../beans/index";
|
|
3
|
-
import { handleKeyboardSubmit, getClickedElement, getElementTree } from "../../../utils/utils";
|
|
4
|
-
export class ZMenuDropdown {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.ismenuopen = false;
|
|
7
|
-
this.handleToggle = this.handleToggle.bind(this);
|
|
8
|
-
this.handleFocus = this.handleFocus.bind(this);
|
|
9
|
-
}
|
|
10
|
-
componentWillRender() {
|
|
11
|
-
this.linkarray = typeof this.menucontent === "string" ? JSON.parse(this.menucontent) : this.menucontent;
|
|
12
|
-
}
|
|
13
|
-
renderMenuOpen() {
|
|
14
|
-
if (this.ismenuopen) {
|
|
15
|
-
return (h("ul", null, this.linkarray.map((bean) => (h("li", null, h("z-link", { htmlid: bean.id, href: bean.link, icon: bean.icon }, bean.label))))));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
renderButtonMenu() {
|
|
19
|
-
return (h("span", { class: "arrow" }, h("z-icon", { name: "caret-down", width: 14, height: 14 })));
|
|
20
|
-
}
|
|
21
|
-
retriveMenuClass() {
|
|
22
|
-
if (this.ismenuopen) {
|
|
23
|
-
return "menu-opened";
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
handleToggle() {
|
|
27
|
-
this.ismenuopen = !this.ismenuopen;
|
|
28
|
-
}
|
|
29
|
-
handleFocus(e) {
|
|
30
|
-
if (e instanceof KeyboardEvent && e.keyCode !== KeyboardKeyCode.TAB) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const tree = getElementTree(getClickedElement());
|
|
34
|
-
const menuParent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-menu-dropdown");
|
|
35
|
-
if (!menuParent) {
|
|
36
|
-
document.removeEventListener("click", this.handleFocus);
|
|
37
|
-
document.removeEventListener("keyup", this.handleFocus);
|
|
38
|
-
this.ismenuopen = false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
return (h("a", { class: this.retriveMenuClass(), role: "button", tabindex: "0", onFocus: () => {
|
|
43
|
-
document.addEventListener("click", this.handleFocus);
|
|
44
|
-
document.addEventListener("keyup", this.handleFocus);
|
|
45
|
-
}, onKeyUp: (e) => handleKeyboardSubmit(e, this.handleToggle) }, h("div", { class: "container", onClick: () => this.handleToggle() }, h("span", { class: "user-wrapper" }, h("z-icon", { name: "user-avatar", width: 14, height: 14 }), h("span", { class: "user" }, this.nomeutente)), this.renderButtonMenu()), this.renderMenuOpen()));
|
|
46
|
-
}
|
|
47
|
-
static get is() { return "z-menu-dropdown"; }
|
|
48
|
-
static get encapsulation() { return "shadow"; }
|
|
49
|
-
static get originalStyleUrls() {
|
|
50
|
-
return {
|
|
51
|
-
"$": ["styles.css"]
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
static get styleUrls() {
|
|
55
|
-
return {
|
|
56
|
-
"$": ["styles.css"]
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
static get properties() {
|
|
60
|
-
return {
|
|
61
|
-
"nomeutente": {
|
|
62
|
-
"type": "string",
|
|
63
|
-
"mutable": false,
|
|
64
|
-
"complexType": {
|
|
65
|
-
"original": "string",
|
|
66
|
-
"resolved": "string",
|
|
67
|
-
"references": {}
|
|
68
|
-
},
|
|
69
|
-
"required": false,
|
|
70
|
-
"optional": false,
|
|
71
|
-
"docs": {
|
|
72
|
-
"tags": [],
|
|
73
|
-
"text": "user name text"
|
|
74
|
-
},
|
|
75
|
-
"attribute": "nomeutente",
|
|
76
|
-
"reflect": false
|
|
77
|
-
},
|
|
78
|
-
"menucontent": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"mutable": false,
|
|
81
|
-
"complexType": {
|
|
82
|
-
"original": "string | MenuItem[]",
|
|
83
|
-
"resolved": "MenuItem[] | string",
|
|
84
|
-
"references": {
|
|
85
|
-
"MenuItem": {
|
|
86
|
-
"location": "import",
|
|
87
|
-
"path": "../../../beans/index"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"required": false,
|
|
92
|
-
"optional": false,
|
|
93
|
-
"docs": {
|
|
94
|
-
"tags": [],
|
|
95
|
-
"text": "Json stringified or array to fill menu dropdown"
|
|
96
|
-
},
|
|
97
|
-
"attribute": "menucontent",
|
|
98
|
-
"reflect": false
|
|
99
|
-
},
|
|
100
|
-
"buttonid": {
|
|
101
|
-
"type": "string",
|
|
102
|
-
"mutable": false,
|
|
103
|
-
"complexType": {
|
|
104
|
-
"original": "string",
|
|
105
|
-
"resolved": "string",
|
|
106
|
-
"references": {}
|
|
107
|
-
},
|
|
108
|
-
"required": false,
|
|
109
|
-
"optional": false,
|
|
110
|
-
"docs": {
|
|
111
|
-
"tags": [],
|
|
112
|
-
"text": "unique button id"
|
|
113
|
-
},
|
|
114
|
-
"attribute": "buttonid",
|
|
115
|
-
"reflect": false
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
static get states() {
|
|
120
|
-
return {
|
|
121
|
-
"ismenuopen": {}
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
width: inherit;
|
|
3
|
-
height: 32px;
|
|
4
|
-
font-family: var(--dashboard-font);
|
|
5
|
-
font-size: 12px;
|
|
6
|
-
font-weight: var(--font-sb);
|
|
7
|
-
letter-spacing: 0.17px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
a,
|
|
11
|
-
a:visited,
|
|
12
|
-
a:active {
|
|
13
|
-
color: inherit;
|
|
14
|
-
text-decoration: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:host > a {
|
|
18
|
-
display: block;
|
|
19
|
-
border: var(--border-size-small) solid transparent;
|
|
20
|
-
background: var(--bg-grey-050);
|
|
21
|
-
border-radius: var(--border-radius);
|
|
22
|
-
color: var(--text-grey-800);
|
|
23
|
-
outline: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host > a::-moz-focus-inner {
|
|
27
|
-
border: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:host > a:hover,
|
|
31
|
-
:host > a.menu-opened:hover {
|
|
32
|
-
color: var(--myz-blue-dark);
|
|
33
|
-
fill: var(--myz-blue-dark);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host > a:focus {
|
|
37
|
-
border: var(--border-size-small) solid var(--myz-blue);
|
|
38
|
-
box-shadow: 0 0 2px 2px var(--myz-blue-light);
|
|
39
|
-
color: var(--myz-blue);
|
|
40
|
-
fill: var(--myz-blue);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:host > a:active {
|
|
44
|
-
border: var(--border-size-small) solid var(--myz-blue-light);
|
|
45
|
-
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 40%);
|
|
46
|
-
color: var(--myz-blue-light);
|
|
47
|
-
fill: var(--myz-blue-light);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
div.container {
|
|
51
|
-
position: relative;
|
|
52
|
-
display: flex;
|
|
53
|
-
height: 32px;
|
|
54
|
-
align-items: center;
|
|
55
|
-
justify-content: space-between;
|
|
56
|
-
padding: 0 var(--basex1);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
div.container > span.user-wrapper {
|
|
60
|
-
display: flex;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
div.container > span.user-wrapper > span.user {
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
width: 30px;
|
|
66
|
-
padding: 0 var(--basex1);
|
|
67
|
-
cursor: pointer;
|
|
68
|
-
text-overflow: ellipsis;
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
div.container > span.arrow {
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
div.container > span.arrow > z-icon {
|
|
79
|
-
transform: rotate(360deg);
|
|
80
|
-
transition: all 200ms linear;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
ul {
|
|
84
|
-
padding: 0 calc(var(--space-unit) * 2);
|
|
85
|
-
margin: 0;
|
|
86
|
-
list-style: none;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
li {
|
|
90
|
-
display: flex;
|
|
91
|
-
width: max-content;
|
|
92
|
-
height: var(--basex3);
|
|
93
|
-
align-items: center;
|
|
94
|
-
padding: calc(var(--space-unit) / 4) 0;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Expanded dropdown menu */
|
|
98
|
-
.menu-opened {
|
|
99
|
-
position: inherit;
|
|
100
|
-
width: auto !important;
|
|
101
|
-
min-width: 147px;
|
|
102
|
-
padding-bottom: calc(var(--space-unit) * 2);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.menu-opened a,
|
|
106
|
-
.menu-opened a:active,
|
|
107
|
-
.menu-opened a:visited {
|
|
108
|
-
color: var(--myz-blue);
|
|
109
|
-
fill: var(--myz-blue);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.menu-opened a:hover {
|
|
113
|
-
color: var(--myz-blue-dark);
|
|
114
|
-
fill: var(--myz-blue-dark);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.menu-opened > div.container {
|
|
118
|
-
margin-bottom: var(--basex1);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.menu-opened > div.container > span.user-wrapper > span.user {
|
|
122
|
-
width: auto;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.menu-opened > div.container > span.arrow > z-icon {
|
|
126
|
-
transform: rotate(180deg);
|
|
127
|
-
transition: all 200ms linear;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* Desktop breakpoint */
|
|
131
|
-
|
|
132
|
-
@media only screen and (min-width: 1152px) {
|
|
133
|
-
:host > a {
|
|
134
|
-
width: 147px;
|
|
135
|
-
padding: 0 calc(var(--space-unit) / 4);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
:host > a.menu-opened {
|
|
139
|
-
width: 147px;
|
|
140
|
-
padding-bottom: calc(var(--space-unit) * 2);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
div.container > span.user-wrapper > span.user {
|
|
144
|
-
width: 80px;
|
|
145
|
-
}
|
|
146
|
-
}
|