@zanichelli/albe-web-components 2.18.0 → 2.18.4
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 +18 -0
- package/dist/cjs/{index-156c65fe.js → index-2e494cc2.js} +0 -12
- package/dist/cjs/{index-5c40f36c.js → index-66eb89b1.js} +36 -6
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-2a89d30b.js → utils-2636e75b.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +2 -2
- package/dist/cjs/{contextual-menu_65.cjs.entry.js → z-alert_65.cjs.entry.js} +86 -90
- package/dist/cjs/z-app-header.cjs.entry.js +1 -1
- package/dist/cjs/z-candybar.cjs.entry.js +1 -1
- package/dist/cjs/z-cookiebar.cjs.entry.js +2 -2
- package/dist/cjs/z-header.cjs.entry.js +2 -2
- package/dist/cjs/z-heading.cjs.entry.js +1 -1
- package/dist/cjs/z-messages-pocket.cjs.entry.js +2 -2
- package/dist/cjs/z-modal-login.cjs.entry.js +3 -3
- package/dist/cjs/z-modal.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
- package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
- package/dist/cjs/z-otp.cjs.entry.js +2 -2
- package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
- package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
- package/dist/cjs/z-registro-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +56 -0
- package/dist/cjs/z-toast-notification.cjs.entry.js +202 -0
- package/dist/collection/beans/index.js +36 -6
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/buttons/z-button/index.js +3 -3
- package/dist/collection/components/buttons/z-button/styles.css +33 -0
- package/dist/collection/components/list/z-list-element/index.js +2 -2
- package/dist/collection/components/list/z-toast-notification-list/index.js +97 -0
- package/dist/collection/components/list/z-toast-notification-list/styles.css +107 -0
- package/dist/collection/components/modal/z-modal-login/index.js +20 -3
- package/dist/collection/components/navigation/z-link/index.js +16 -16
- package/dist/collection/components/navigation/z-link/styles.css +10 -11
- package/dist/collection/components/navigation/z-user-dropdown/index.js +5 -7
- package/dist/collection/components/navigation/z-user-dropdown/styles.css +0 -6
- package/dist/collection/components/notification/z-toast-notification/index.js +402 -0
- package/dist/collection/components/notification/z-toast-notification/styles.css +247 -0
- package/dist/collection/components/{contextual-menu → z-contextual-menu}/index.js +9 -9
- package/dist/collection/components/{contextual-menu → z-contextual-menu}/styles.css +8 -14
- package/dist/collection/snowflakes/registro-table/z-registro-table-header/index.js +38 -15
- package/dist/collection/snowflakes/registro-table/z-registro-table-header/styles.css +0 -4
- package/dist/esm/{index-c46a98db.js → index-6eb9a735.js} +1 -12
- package/dist/esm/{index-967c7341.js → index-98ce8389.js} +37 -7
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{utils-a9ad5ffb.js → utils-c7b22832.js} +1 -1
- package/dist/esm/web-components-library.js +2 -2
- package/dist/esm/{contextual-menu_65.entry.js → z-alert_65.entry.js} +86 -90
- package/dist/esm/z-app-header.entry.js +1 -1
- package/dist/esm/z-candybar.entry.js +1 -1
- package/dist/esm/z-cookiebar.entry.js +2 -2
- package/dist/esm/z-header.entry.js +2 -2
- package/dist/esm/z-heading.entry.js +1 -1
- package/dist/esm/z-messages-pocket.entry.js +2 -2
- package/dist/esm/z-modal-login.entry.js +3 -3
- package/dist/esm/z-modal.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
- package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +3 -3
- package/dist/esm/z-navigation-tab.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +2 -2
- package/dist/esm/z-otp.entry.js +2 -2
- package/dist/esm/z-pocket-message.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +3 -3
- package/dist/esm/z-registro-table-footer.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +3 -3
- package/dist/esm/z-toast-notification-list.entry.js +52 -0
- package/dist/esm/z-toast-notification.entry.js +198 -0
- package/dist/types/beans/index.d.ts +33 -2
- package/dist/types/components/buttons/z-button/index.d.ts +1 -1
- package/dist/types/components/list/z-list-element/index.d.ts +1 -1
- package/dist/types/components/list/z-toast-notification-list/index.d.ts +14 -0
- package/dist/types/components/modal/z-modal-login/index.d.ts +2 -0
- package/dist/types/components/navigation/z-link/index.d.ts +1 -2
- package/dist/types/components/navigation/z-user-dropdown/index.d.ts +1 -2
- package/dist/types/components/notification/z-toast-notification/index.d.ts +56 -0
- package/dist/types/components/{contextual-menu → z-contextual-menu}/index.d.ts +4 -4
- package/dist/types/components.d.ts +167 -39
- package/dist/types/snowflakes/registro-table/z-registro-table-header/index.d.ts +2 -2
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-2d372576.entry.js → p-01ebd1c9.entry.js} +1 -1
- package/dist/web-components-library/{p-81aca7f9.entry.js → p-12ce5608.entry.js} +1 -1
- package/dist/web-components-library/{p-57c3d9ff.entry.js → p-2137b1fb.entry.js} +1 -1
- package/dist/web-components-library/{p-74c1c6e0.entry.js → p-251558f4.entry.js} +1 -1
- package/dist/web-components-library/p-26e91915.entry.js +7 -0
- package/dist/web-components-library/{p-e51658e2.entry.js → p-2a5adef6.entry.js} +1 -1
- package/dist/web-components-library/{p-6375145b.entry.js → p-337ace81.entry.js} +1 -1
- package/dist/web-components-library/{p-1cab68e1.entry.js → p-3c9ec157.entry.js} +1 -1
- package/dist/web-components-library/{p-dc5b4723.entry.js → p-40aff614.entry.js} +1 -1
- package/dist/web-components-library/{p-673631bf.entry.js → p-4c255df1.entry.js} +1 -1
- package/dist/web-components-library/p-504ff914.entry.js +1 -0
- package/dist/web-components-library/{p-df7cbc7e.entry.js → p-590be9d2.entry.js} +1 -1
- package/dist/web-components-library/{p-f2689b14.js → p-818c7395.js} +1 -1
- package/dist/web-components-library/p-859f6438.js +1 -0
- package/dist/web-components-library/{p-e32ebd79.entry.js → p-8a7841df.entry.js} +1 -1
- package/dist/web-components-library/{p-640cf406.entry.js → p-8c800c8c.entry.js} +1 -1
- package/dist/web-components-library/{p-e45b780b.entry.js → p-9c17ebe5.entry.js} +1 -1
- package/dist/web-components-library/{p-d9f4bef7.entry.js → p-b11b6985.entry.js} +1 -1
- package/dist/web-components-library/{p-1f02b80f.entry.js → p-b4ceb308.entry.js} +1 -1
- package/dist/web-components-library/{p-e2d6c4ae.entry.js → p-ba896238.entry.js} +1 -1
- package/dist/web-components-library/{p-c007fb63.entry.js → p-d428fe35.entry.js} +1 -1
- package/dist/web-components-library/p-e34dbabe.js +1 -0
- package/dist/web-components-library/{p-195cfc7e.entry.js → p-e7cd27ec.entry.js} +1 -1
- package/dist/web-components-library/p-fd7a7565.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 +3 -1
- package/react/components.js +5 -3
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-2d372576.entry.js → p-01ebd1c9.entry.js} +1 -1
- package/www/build/{p-81aca7f9.entry.js → p-12ce5608.entry.js} +1 -1
- package/www/build/{p-57c3d9ff.entry.js → p-2137b1fb.entry.js} +1 -1
- package/www/build/{p-74c1c6e0.entry.js → p-251558f4.entry.js} +1 -1
- package/www/build/p-26e91915.entry.js +7 -0
- package/www/build/{p-e51658e2.entry.js → p-2a5adef6.entry.js} +1 -1
- package/www/build/{p-6375145b.entry.js → p-337ace81.entry.js} +1 -1
- package/www/build/{p-1cab68e1.entry.js → p-3c9ec157.entry.js} +1 -1
- package/www/build/{p-dc5b4723.entry.js → p-40aff614.entry.js} +1 -1
- package/www/build/{p-673631bf.entry.js → p-4c255df1.entry.js} +1 -1
- package/www/build/p-504ff914.entry.js +1 -0
- package/www/build/{p-df7cbc7e.entry.js → p-590be9d2.entry.js} +1 -1
- package/www/build/{p-f2689b14.js → p-818c7395.js} +1 -1
- package/www/build/p-859f6438.js +1 -0
- package/www/build/p-859fc437.js +1 -0
- package/www/build/{p-e32ebd79.entry.js → p-8a7841df.entry.js} +1 -1
- package/www/build/{p-640cf406.entry.js → p-8c800c8c.entry.js} +1 -1
- package/www/build/{p-e45b780b.entry.js → p-9c17ebe5.entry.js} +1 -1
- package/www/build/{p-d9f4bef7.entry.js → p-b11b6985.entry.js} +1 -1
- package/www/build/{p-1f02b80f.entry.js → p-b4ceb308.entry.js} +1 -1
- package/www/build/{p-e2d6c4ae.entry.js → p-ba896238.entry.js} +1 -1
- package/www/build/{p-c007fb63.entry.js → p-d428fe35.entry.js} +1 -1
- package/www/build/p-e34dbabe.js +1 -0
- package/www/build/p-e55724ae.css +1 -0
- package/www/build/{p-195cfc7e.entry.js → p-e7cd27ec.entry.js} +1 -1
- package/www/build/p-fd7a7565.entry.js +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +34 -28
- package/www/pages/notification.html +247 -0
- package/dist/web-components-library/p-0e91a877.js +0 -1
- package/dist/web-components-library/p-4dbf0b2e.entry.js +0 -7
- package/dist/web-components-library/p-e51276a9.js +0 -1
- package/www/build/p-0e91a877.js +0 -1
- package/www/build/p-4dbf0b2e.entry.js +0 -7
- package/www/build/p-a28aa39d.css +0 -1
- package/www/build/p-e51276a9.js +0 -1
- package/www/build/p-f0b45c9d.js +0 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
min-width: 200px;
|
|
4
|
+
width: 100vw;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host(.slide-in-left) {
|
|
8
|
+
animation: slideinleft 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
9
|
+
animation-fill-mode: forwards;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host(.slide-in-right) {
|
|
13
|
+
animation: slideinright 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
14
|
+
animation-fill-mode: forwards;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(.slide-in-down) {
|
|
18
|
+
animation: slideindown 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
19
|
+
animation-fill-mode: forwards;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host(.slide-in-up) {
|
|
23
|
+
animation: slideinup 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
24
|
+
animation-fill-mode: forwards;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host(.slide-out-left) {
|
|
28
|
+
animation: slideoutleft 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
29
|
+
animation-fill-mode: forwards;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host(.slide-out-right) {
|
|
33
|
+
animation: slideoutright 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
34
|
+
animation-fill-mode: forwards;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host(.slide-out-down) {
|
|
38
|
+
animation: slideoutdown 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
39
|
+
animation-fill-mode: forwards;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host(.slide-out-up) {
|
|
43
|
+
animation: slideoutup 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);
|
|
44
|
+
animation-fill-mode: forwards;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@keyframes slideinleft {
|
|
48
|
+
0% {
|
|
49
|
+
transform: translateX(100%);
|
|
50
|
+
}
|
|
51
|
+
100% {
|
|
52
|
+
transform: translateX(0);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes slideinright {
|
|
57
|
+
0% {
|
|
58
|
+
transform: translateX(-100%);
|
|
59
|
+
}
|
|
60
|
+
100% {
|
|
61
|
+
transform: translateX(0);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes slideinup {
|
|
66
|
+
0% {
|
|
67
|
+
transform: translateY(100%);
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
100% {
|
|
71
|
+
transform: translateY(0);
|
|
72
|
+
opacity: 100%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes slideindown {
|
|
77
|
+
0% {
|
|
78
|
+
transform: translateY(-100%);
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
100% {
|
|
82
|
+
transform: translateY(0);
|
|
83
|
+
opacity: 100%;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes slideoutleft {
|
|
88
|
+
0% {
|
|
89
|
+
transform: translateX(var(--percentuale));
|
|
90
|
+
opacity: calc(100-var(--percentuale));
|
|
91
|
+
}
|
|
92
|
+
100% {
|
|
93
|
+
transform: translateX(-100%);
|
|
94
|
+
opacity: 0%;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes slideoutright {
|
|
99
|
+
0% {
|
|
100
|
+
transform: translateX(var(--percentuale));
|
|
101
|
+
opacity: calc(100-var(--percentuale));
|
|
102
|
+
}
|
|
103
|
+
100% {
|
|
104
|
+
transform: translateX(100%);
|
|
105
|
+
opacity: 0%;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes slideoutup {
|
|
110
|
+
0% {
|
|
111
|
+
transform: translateY(var(--percentuale));
|
|
112
|
+
opacity: 100%;
|
|
113
|
+
}
|
|
114
|
+
100% {
|
|
115
|
+
transform: translateY(-100%);
|
|
116
|
+
opacity: 0;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@keyframes slideoutdown {
|
|
121
|
+
0% {
|
|
122
|
+
transform: translateY(var(--percentuale));
|
|
123
|
+
opacity: 100%;
|
|
124
|
+
}
|
|
125
|
+
100% {
|
|
126
|
+
transform: translateY(100%);
|
|
127
|
+
opacity: 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:host > #external-container {
|
|
132
|
+
font-family: var(--font-family-sans);
|
|
133
|
+
font-weight: var(--font-rg);
|
|
134
|
+
border-radius: 4px;
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
letter-spacing: 0.16px;
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
min-height: 52px;
|
|
139
|
+
padding: calc(var(--space-unit) * 1) calc(var(--space-unit) * 2);
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: space-between;
|
|
143
|
+
box-shadow: var(--shadow-3);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host > #external-container.mobile-wrapped > #icon {
|
|
147
|
+
align-self: flex-start;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:host > #external-container.several-lines-padding {
|
|
151
|
+
padding: calc(var(--space-unit) * 2);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:host > #external-container > #flex-container {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-wrap: wrap;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: space-between;
|
|
159
|
+
width: 100%;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host > #external-container #text {
|
|
163
|
+
color: var(--color-white);
|
|
164
|
+
line-height: 20px;
|
|
165
|
+
margin-right: calc(var(--space-unit) * 2);
|
|
166
|
+
letter-spacing: 0.16px;
|
|
167
|
+
text-align: left;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host > #external-container #text > .title {
|
|
171
|
+
margin-right: 4px;
|
|
172
|
+
font-weight: 600;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host > #external-container.mobile-wrapped #button ::slotted(z-button) {
|
|
176
|
+
margin-top: calc(var(--space-unit) * 2);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:host > #external-container #icon {
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
fill: var(--color-white);
|
|
182
|
+
margin-left: calc(var(--space-unit) * 2);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:host > #external-container.dark {
|
|
186
|
+
background: var(--gray800);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host > #external-container.light {
|
|
190
|
+
background: var(--color-background);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:host > #external-container.light #icon,
|
|
194
|
+
:host > #external-container.warning #text,
|
|
195
|
+
:host > #external-container.warning #icon {
|
|
196
|
+
fill: var(--color-icon01);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:host > #external-container.light #text,
|
|
200
|
+
:host > #external-container.warning #text {
|
|
201
|
+
color: var(--grey800);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:host > #external-container.accent {
|
|
205
|
+
background: var(--color-primary01);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:host > #external-container.error {
|
|
209
|
+
background: var(--color-error-default);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:host > #external-container.success {
|
|
213
|
+
background: var(--color-success-default);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
:host > #external-container.warning {
|
|
217
|
+
background: var(--color-warning-default);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* Tablet breakpoint */
|
|
221
|
+
@media only screen and (min-width: 768px) {
|
|
222
|
+
|
|
223
|
+
:host {
|
|
224
|
+
width: unset;
|
|
225
|
+
max-width: 50vw;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:host > #external-container > #flex-container {
|
|
229
|
+
flex-wrap: nowrap;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host > #external-container #text {
|
|
233
|
+
width: 100%;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Desktop breakpoint */
|
|
238
|
+
@media only screen and (min-width: 1152px) {
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* Wide breakpoint */
|
|
242
|
+
@media only screen and (min-width: 1366px) {
|
|
243
|
+
:host {
|
|
244
|
+
width: unset;
|
|
245
|
+
max-width: 33vw;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Component, Event, Host, Prop, h } from "@stencil/core";
|
|
2
|
-
import {
|
|
3
|
-
export class
|
|
2
|
+
import { PopoverPosition } from "../../beans";
|
|
3
|
+
export class ZContextualMenu {
|
|
4
4
|
constructor() {
|
|
5
5
|
/**
|
|
6
|
-
* [optional] Sets text color of
|
|
6
|
+
* [optional] Sets text color of ZContextualMenu's content
|
|
7
7
|
*/
|
|
8
8
|
this.color = "color-primary01";
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
componentWillRender() {
|
|
11
11
|
if (this.elements) {
|
|
12
12
|
this.jsonElements = JSON.parse(this.elements.replace(/"/g, '"'));
|
|
13
13
|
}
|
|
@@ -22,16 +22,16 @@ export class ContextualMenu {
|
|
|
22
22
|
h("z-icon", { "aria-label": "apri-menu-contestuale", slot: "trigger", name: "contextual-menu", fill: "color-primary01", style: { cursor: "pointer" } }),
|
|
23
23
|
h("div", { class: "popover-content-container", slot: "popover" },
|
|
24
24
|
h("z-list", null,
|
|
25
|
-
h("z-list-group", { "divider-type": "element"
|
|
25
|
+
h("z-list-group", { "divider-type": "element" }, (_a = this.jsonElements) === null || _a === void 0 ? void 0 : _a.map((element, index) => (h("z-list-element", { clickable: !element.disabled, class: "my-z-list-element", "align-button": "left", "expandable-style": "accordion", color: element.disabled ? `color-disabled03` : this.color, isContextualMenu: true, listElementId: index, onClickItem: (event) => this.clickContextualMenu.emit(event.detail) },
|
|
26
26
|
h("div", { class: element.disabled
|
|
27
27
|
? "disabled-element-container"
|
|
28
28
|
: "element-container" },
|
|
29
29
|
this.showIcon() && (h("div", { class: "element-icon" },
|
|
30
|
-
h("z-icon", { name: element.icon }))),
|
|
30
|
+
h("z-icon", { name: element.icon, width: 16, height: 16 }))),
|
|
31
31
|
h("div", { class: "element-text" },
|
|
32
32
|
h("span", null, element.text))))))))))));
|
|
33
33
|
}
|
|
34
|
-
static get is() { return "contextual-menu"; }
|
|
34
|
+
static get is() { return "z-contextual-menu"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
36
36
|
static get originalStyleUrls() { return {
|
|
37
37
|
"$": ["styles.css"]
|
|
@@ -52,7 +52,7 @@ export class ContextualMenu {
|
|
|
52
52
|
"optional": true,
|
|
53
53
|
"docs": {
|
|
54
54
|
"tags": [],
|
|
55
|
-
"text": "elements of
|
|
55
|
+
"text": "elements of ZContextualMenu"
|
|
56
56
|
},
|
|
57
57
|
"attribute": "elements",
|
|
58
58
|
"reflect": false
|
|
@@ -69,7 +69,7 @@ export class ContextualMenu {
|
|
|
69
69
|
"optional": true,
|
|
70
70
|
"docs": {
|
|
71
71
|
"tags": [],
|
|
72
|
-
"text": "[optional] Sets text color of
|
|
72
|
+
"text": "[optional] Sets text color of ZContextualMenu's content"
|
|
73
73
|
},
|
|
74
74
|
"attribute": "color",
|
|
75
75
|
"reflect": false,
|
|
@@ -11,15 +11,7 @@
|
|
|
11
11
|
min-width: 112px;
|
|
12
12
|
max-width: 280px;
|
|
13
13
|
white-space: nowrap;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.sc-z-popover,
|
|
17
|
-
.sc-z-popover-s {
|
|
18
|
-
display: flex;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
align-items: center;
|
|
21
|
-
padding: calc(var(--space-unit) * 0.2);
|
|
22
|
-
outline: none;
|
|
14
|
+
padding: calc(var(--space-unit) / 2) 0;
|
|
23
15
|
}
|
|
24
16
|
|
|
25
17
|
.element-container:hover {
|
|
@@ -30,22 +22,24 @@
|
|
|
30
22
|
.element-text {
|
|
31
23
|
overflow: hidden;
|
|
32
24
|
text-overflow: ellipsis;
|
|
25
|
+
font-size: 14px;
|
|
33
26
|
}
|
|
34
27
|
|
|
35
28
|
.element-container,
|
|
36
29
|
.disabled-element-container {
|
|
37
30
|
display: flex;
|
|
38
|
-
padding: 0 8px;
|
|
39
31
|
align-items: center;
|
|
40
|
-
gap:
|
|
41
|
-
fill: var(--
|
|
42
|
-
padding:
|
|
32
|
+
gap: var(--space-unit);
|
|
33
|
+
fill: var(--color-disabled03);
|
|
34
|
+
padding: calc(var(--space-unit) / 2) var(--space-unit);
|
|
35
|
+
min-height: calc(var(--space-unit) * 4);
|
|
36
|
+
box-sizing: border-box;
|
|
43
37
|
}
|
|
44
38
|
|
|
45
39
|
.element-container {
|
|
46
40
|
fill: var(--color-primary01);
|
|
47
41
|
}
|
|
48
42
|
|
|
49
|
-
.element-
|
|
43
|
+
.element-icon {
|
|
50
44
|
display: flex;
|
|
51
45
|
}
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { Component, Element, Event, h, Host, Listen, Prop, State, } from "@stencil/core";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { ButtonSizeEnum, ButtonVariantEnum, PopoverPosition,
|
|
3
|
+
import { ButtonSizeEnum, ButtonVariantEnum, PopoverPosition, SortDirectionEnum, TableHeaderSize, } from "../../../beans";
|
|
4
4
|
import { getElementTree } from "../../../utils/utils";
|
|
5
5
|
export class ZRegistroTableHeader {
|
|
6
6
|
constructor() {
|
|
7
7
|
/** [Optional] Padding of the header */
|
|
8
8
|
this.size = TableHeaderSize["medium"];
|
|
9
|
+
this.sortDirection = SortDirectionEnum.none;
|
|
9
10
|
this.isMenuOpened = false;
|
|
10
|
-
this.sortingOrientation = SortingOrientation["none"];
|
|
11
11
|
this.emitOnSort = this.emitOnSort.bind(this);
|
|
12
12
|
}
|
|
13
13
|
emitOnSort() {
|
|
14
|
-
this.sort.emit({
|
|
14
|
+
this.sort.emit({
|
|
15
|
+
columnId: this.columnId,
|
|
16
|
+
sortDirection: this.sortDirection
|
|
17
|
+
});
|
|
15
18
|
}
|
|
16
19
|
handleSort() {
|
|
17
20
|
if (!this.sortable) {
|
|
18
21
|
return;
|
|
19
22
|
}
|
|
20
|
-
if (this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
+
if (this.sortDirection === SortDirectionEnum.none ||
|
|
24
|
+
this.sortDirection === SortDirectionEnum.desc) {
|
|
25
|
+
this.sortDirection = SortDirectionEnum.asc;
|
|
23
26
|
}
|
|
24
|
-
else if (this.
|
|
25
|
-
this.
|
|
27
|
+
else if (this.sortDirection === SortDirectionEnum.asc) {
|
|
28
|
+
this.sortDirection = SortDirectionEnum.desc;
|
|
26
29
|
}
|
|
27
30
|
this.emitOnSort();
|
|
28
31
|
}
|
|
@@ -44,7 +47,7 @@ export class ZRegistroTableHeader {
|
|
|
44
47
|
const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-registro-table-header");
|
|
45
48
|
if (parent &&
|
|
46
49
|
parent.attributes.getNamedItem("column-id").value !== this.columnId) {
|
|
47
|
-
this.
|
|
50
|
+
this.sortDirection = SortDirectionEnum.none;
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
componentWillRender() {
|
|
@@ -56,11 +59,9 @@ export class ZRegistroTableHeader {
|
|
|
56
59
|
}), onClick: () => this.handleSort() },
|
|
57
60
|
h("div", { class: classNames("container") },
|
|
58
61
|
h("slot", null),
|
|
59
|
-
this.sortable && (h("z-icon", { name: this.
|
|
62
|
+
this.sortable && this.sortDirection !== SortDirectionEnum.none && (h("z-icon", { name: this.sortDirection === SortDirectionEnum.asc
|
|
60
63
|
? "arrow-up"
|
|
61
|
-
: "arrow-down", class:
|
|
62
|
-
hidden: this.sortingOrientation === SortingOrientation["none"],
|
|
63
|
-
}) }))),
|
|
64
|
+
: "arrow-down", class: "arrow" }))),
|
|
64
65
|
this.showButton && (h("div", { class: classNames("popover-container", {
|
|
65
66
|
visible: this.isMenuOpened,
|
|
66
67
|
}) },
|
|
@@ -151,11 +152,33 @@ export class ZRegistroTableHeader {
|
|
|
151
152
|
},
|
|
152
153
|
"attribute": "show-button",
|
|
153
154
|
"reflect": false
|
|
155
|
+
},
|
|
156
|
+
"sortDirection": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"mutable": true,
|
|
159
|
+
"complexType": {
|
|
160
|
+
"original": "SortDirection",
|
|
161
|
+
"resolved": "SortDirectionEnum.asc | SortDirectionEnum.desc | SortDirectionEnum.none",
|
|
162
|
+
"references": {
|
|
163
|
+
"SortDirection": {
|
|
164
|
+
"location": "import",
|
|
165
|
+
"path": "../../../beans"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": ""
|
|
174
|
+
},
|
|
175
|
+
"attribute": "sort-direction",
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"defaultValue": "SortDirectionEnum.none"
|
|
154
178
|
}
|
|
155
179
|
}; }
|
|
156
180
|
static get states() { return {
|
|
157
|
-
"isMenuOpened": {}
|
|
158
|
-
"sortingOrientation": {}
|
|
181
|
+
"isMenuOpened": {}
|
|
159
182
|
}; }
|
|
160
183
|
static get events() { return [{
|
|
161
184
|
"method": "sort",
|