@zanichelli/albe-web-components 2.48.0 → 3.1.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/{z-app-switcher_11.cjs.entry.js → z-app-switcher_12.cjs.entry.js} +42 -6
  5. package/dist/cjs/z-cookiebar.cjs.entry.js +3 -3
  6. package/dist/cjs/z-date-picker.cjs.entry.js +104 -4
  7. package/dist/cjs/z-file-upload.cjs.entry.js +14 -11
  8. package/dist/cjs/z-footer.cjs.entry.js +12 -7
  9. package/dist/cjs/z-modal-login.cjs.entry.js +5 -4
  10. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  11. package/dist/cjs/z-myz-topbar.cjs.entry.js +2 -2
  12. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +12 -11
  13. package/dist/cjs/z-navigation-tab.cjs.entry.js +12 -11
  14. package/dist/cjs/z-navigation-tabs.cjs.entry.js +5 -8
  15. package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
  16. package/dist/cjs/z-table-header.cjs.entry.js +1 -1
  17. package/dist/cjs/z-table.cjs.entry.js +2 -2
  18. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/buttons/z-button/index.js +72 -52
  21. package/dist/collection/components/buttons/z-button/styles.css +32 -111
  22. package/dist/collection/components/file-upload/z-file-upload/index.js +13 -10
  23. package/dist/collection/components/file-upload/z-file-upload/styles.css +2 -2
  24. package/dist/collection/components/footer/z-footer/index.js +19 -14
  25. package/dist/collection/components/footer/z-footer/styles.css +2 -2
  26. package/dist/collection/components/modal/z-modal-login/index.js +5 -4
  27. package/dist/collection/components/modal/z-modal-login/styles.css +8 -8
  28. package/dist/collection/components/navigation/tabs/navigation-tab.css +49 -31
  29. package/dist/collection/components/navigation/tabs/z-navigation-tab/index.js +14 -21
  30. package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +14 -21
  31. package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +4 -7
  32. package/dist/collection/components/navigation/tabs/z-navigation-tabs/styles.css +6 -20
  33. package/dist/collection/components/notification/z-cookiebar/index.js +2 -2
  34. package/dist/collection/components/notification/z-cookiebar/styles.css +3 -3
  35. package/dist/collection/components/notification/z-toast-notification/styles.css +4 -2
  36. package/dist/collection/components/z-date-picker/index.js +111 -4
  37. package/dist/collection/components/z-date-picker/styles.css +14 -4
  38. package/dist/collection/components/z-table/z-table/index.js +4 -4
  39. package/dist/collection/components/z-table/z-table-cell/index.js +1 -1
  40. package/dist/collection/components/z-table/z-table-header/index.js +1 -1
  41. package/dist/collection/deprecated/z-button-deprecated/index.js +218 -0
  42. package/dist/collection/deprecated/z-button-deprecated/styles.css +231 -0
  43. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  44. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/styles.css +1 -1
  45. package/dist/collection/snowflakes/myz/topbar/index.js +1 -1
  46. package/dist/collection/snowflakes/myz/topbar/styles.css +8 -8
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm/web-components-library.js +1 -1
  49. package/dist/esm/{z-app-switcher_11.entry.js → z-app-switcher_12.entry.js} +42 -7
  50. package/dist/esm/z-cookiebar.entry.js +3 -3
  51. package/dist/esm/z-date-picker.entry.js +104 -4
  52. package/dist/esm/z-file-upload.entry.js +14 -11
  53. package/dist/esm/z-footer.entry.js +12 -7
  54. package/dist/esm/z-modal-login.entry.js +5 -4
  55. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  56. package/dist/esm/z-myz-topbar.entry.js +2 -2
  57. package/dist/esm/z-navigation-tab-link.entry.js +13 -12
  58. package/dist/esm/z-navigation-tab.entry.js +13 -12
  59. package/dist/esm/z-navigation-tabs.entry.js +5 -8
  60. package/dist/esm/z-table-cell.entry.js +1 -1
  61. package/dist/esm/z-table-header.entry.js +1 -1
  62. package/dist/esm/z-table.entry.js +2 -2
  63. package/dist/esm/z-toast-notification.entry.js +1 -1
  64. package/dist/types/components/buttons/z-button/index.d.ts +13 -7
  65. package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +8 -5
  66. package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +8 -5
  67. package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +2 -0
  68. package/dist/types/components/z-date-picker/index.d.ts +6 -0
  69. package/dist/types/components.d.ts +99 -6
  70. package/dist/types/deprecated/z-button-deprecated/index.d.ts +28 -0
  71. package/dist/web-components-library/p-0b590426.entry.js +1 -0
  72. package/dist/web-components-library/p-2b8975b1.entry.js +1 -0
  73. package/dist/web-components-library/p-2ff952a3.entry.js +1 -0
  74. package/dist/web-components-library/p-393c31c0.entry.js +1 -0
  75. package/dist/web-components-library/p-459dab30.entry.js +1 -0
  76. package/dist/web-components-library/p-709ab23c.entry.js +1 -0
  77. package/dist/web-components-library/p-8b62bd85.entry.js +1 -0
  78. package/dist/web-components-library/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  79. package/{www/build/p-ae2e17b4.entry.js → dist/web-components-library/p-adad78fc.entry.js} +1 -1
  80. package/dist/web-components-library/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  81. package/dist/web-components-library/p-cadcf677.entry.js +1 -0
  82. package/dist/web-components-library/p-cce20009.entry.js +1 -0
  83. package/dist/web-components-library/p-cd2ca92b.entry.js +1 -0
  84. package/dist/web-components-library/p-da7760a3.entry.js +1 -0
  85. package/dist/web-components-library/p-dcf4d1b6.entry.js +1 -0
  86. package/dist/web-components-library/web-components-library.esm.js +1 -1
  87. package/package.json +1 -1
  88. package/react/components.d.ts +1 -0
  89. package/react/components.js +4 -3
  90. package/react/components.js.map +1 -1
  91. package/www/build/p-0b590426.entry.js +1 -0
  92. package/www/build/p-2b8975b1.entry.js +1 -0
  93. package/www/build/p-2ff952a3.entry.js +1 -0
  94. package/www/build/p-393c31c0.entry.js +1 -0
  95. package/www/build/p-459dab30.entry.js +1 -0
  96. package/www/build/p-709ab23c.entry.js +1 -0
  97. package/www/build/p-8b62bd85.entry.js +1 -0
  98. package/www/build/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  99. package/{dist/web-components-library/p-ae2e17b4.entry.js → www/build/p-adad78fc.entry.js} +1 -1
  100. package/www/build/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  101. package/www/build/p-cadcf677.entry.js +1 -0
  102. package/www/build/p-cce20009.entry.js +1 -0
  103. package/www/build/p-cd2ca92b.entry.js +1 -0
  104. package/www/build/p-da7760a3.entry.js +1 -0
  105. package/www/build/p-dcf4d1b6.entry.js +1 -0
  106. package/www/build/web-components-library.esm.js +1 -1
  107. package/www/index.html +2 -2
  108. package/www/pages/notification.html +10 -7
  109. package/dist/web-components-library/p-114f3a85.entry.js +0 -1
  110. package/dist/web-components-library/p-1e1cb4ad.entry.js +0 -1
  111. package/dist/web-components-library/p-29f07a9b.entry.js +0 -1
  112. package/dist/web-components-library/p-3edd463d.entry.js +0 -1
  113. package/dist/web-components-library/p-4b166956.entry.js +0 -1
  114. package/dist/web-components-library/p-6ef6464c.entry.js +0 -1
  115. package/dist/web-components-library/p-8188846a.entry.js +0 -1
  116. package/dist/web-components-library/p-a15db194.entry.js +0 -1
  117. package/dist/web-components-library/p-a2a3a537.entry.js +0 -1
  118. package/dist/web-components-library/p-a6a9be81.entry.js +0 -1
  119. package/dist/web-components-library/p-b60fe58c.entry.js +0 -1
  120. package/dist/web-components-library/p-bea1f6b8.entry.js +0 -1
  121. package/www/build/p-114f3a85.entry.js +0 -1
  122. package/www/build/p-1e1cb4ad.entry.js +0 -1
  123. package/www/build/p-29f07a9b.entry.js +0 -1
  124. package/www/build/p-3edd463d.entry.js +0 -1
  125. package/www/build/p-4b166956.entry.js +0 -1
  126. package/www/build/p-6ef6464c.entry.js +0 -1
  127. package/www/build/p-8188846a.entry.js +0 -1
  128. package/www/build/p-a15db194.entry.js +0 -1
  129. package/www/build/p-a2a3a537.entry.js +0 -1
  130. package/www/build/p-a6a9be81.entry.js +0 -1
  131. package/www/build/p-a9db7c4f.js +0 -129
  132. package/www/build/p-b60fe58c.entry.js +0 -1
  133. package/www/build/p-bea1f6b8.entry.js +0 -1
  134. package/www/build/p-fcff1237.css +0 -812
@@ -1,26 +1,22 @@
1
1
  :host {
2
2
  display: inline-block;
3
-
4
3
  --z-icon-width: 16px;
5
4
  --z-icon-height: 16px;
6
- --z-icon-right-margin: var(--space-unit);
7
- --rgb-white: 240, 240, 240
5
+ --z-icon-right-margin: 0;
6
+ --rgb-white: 240, 240, 240;
8
7
  }
9
8
 
10
9
  button:disabled,
11
- ::slotted(button:disabled) {
10
+ a:disabled {
12
11
  pointer-events: none;
13
12
  }
14
13
 
15
14
  button,
16
- ::slotted(button),
17
- ::slotted(a) {
15
+ a {
18
16
  box-sizing: border-box;
19
17
  display: inline-flex;
20
- flex-direction: row;
21
18
  align-items: center;
22
19
  justify-content: center;
23
- width: 100%;
24
20
  font-family: var(--dashboard-font);
25
21
  font-weight: var(--font-sb);
26
22
  font-size: 14px;
@@ -29,67 +25,48 @@ button,
29
25
  border-width: var(--border-size-medium);
30
26
  border-style: solid;
31
27
  border-radius: var(--border-radius);
32
- vertical-align: middle;
33
28
  text-transform: uppercase;
34
29
  text-decoration: none;
35
30
  cursor: pointer;
31
+ width: 100%;
36
32
  white-space: nowrap;
37
33
  outline: none;
38
34
  fill: currentColor;
39
35
  }
40
36
 
41
- button.big,
42
- :host([size="big"]) ::slotted(button),
43
- :host([size="big"]) ::slotted(a) {
44
- height: 44px;
45
- min-width: 44px;
37
+ :host.with-text z-icon {
38
+ --z-icon-right-margin: var(--space-unit);
46
39
  }
47
40
 
48
- button.small,
49
- :host([size="small"]) ::slotted(button),
50
- :host([size="small"]) ::slotted(a) {
51
- height: 36px;
52
- min-width: 36px;
41
+ :host.with-text button,
42
+ :host.with-text a {
43
+ min-width: calc(var(--space-unit) * 8);
44
+ padding: 0 calc(var(--space-unit) * 2);
53
45
  }
54
46
 
55
- button.issmall,
56
- :host([issmall]) ::slotted(button),
57
- :host([issmall]) ::slotted(a) {
47
+ .big {
48
+ height: 44px;
49
+ min-width: 44px;
50
+ }
51
+
52
+ .small {
58
53
  height: 36px;
59
54
  min-width: 36px;
60
55
  }
61
56
 
62
- button.x-small,
63
- :host([size="x-small"]) ::slotted(button),
64
- :host([size="x-small"]) ::slotted(a) {
57
+ .x-small {
65
58
  height: 32px;
66
59
  min-width: 32px;
67
60
  }
68
61
 
69
- button:not(.square),
70
- :host(:not([square])) ::slotted(button),
71
- :host(:not([square])) ::slotted(a) {
72
- min-width: calc(var(--space-unit) * 8);
73
- padding: 0 calc(var(--space-unit) * 2);
74
- }
75
-
76
- button.square,
77
- :host([square]) {
78
- --z-icon-right-margin: 0;
79
- }
80
-
81
- button.primary,
82
- :host([variant="primary"]) ::slotted(button),
83
- :host([variant="primary"]) ::slotted(a) {
62
+ .primary {
84
63
  background-color: var(--color-primary01);
85
64
  border-color: var(--color-primary01);
86
65
  color: var(--color-text-inverse);
87
66
  }
88
67
 
89
68
  @media (hover: hover) {
90
- button.primary:hover,
91
- :host([variant="primary"]) ::slotted(button:hover),
92
- :host([variant="primary"]) ::slotted(a:hover) {
69
+ .primary:hover {
93
70
  background-color: var(--color-hover-primary);
94
71
  border-color: var(--color-hover-primary);
95
72
  color: var(--color-text-inverse);
@@ -97,135 +74,79 @@ button.primary,
97
74
  }
98
75
 
99
76
  button:focus:focus-visible,
100
- ::slotted(button:focus:focus-visible),
101
- ::slotted(a:focus:focus-visible) {
77
+ a:focus:focus-visible {
102
78
  box-shadow: var(--shadow-focus-primary);
103
79
  }
104
80
 
105
- button.primary:active,
106
- :host([variant="primary"]) ::slotted(button:active),
107
- :host([variant="primary"]) ::slotted(a:active) {
81
+ .primary:active {
108
82
  background-color: var(--color-pressed-primary);
109
83
  border-color: var(--color-pressed-primary);
110
84
  color: var(--color-text-inverse);
111
85
  box-shadow: var(--shadow-2);
112
86
  }
113
87
 
114
- button.primary:disabled,
115
- :host([variant="primary"]) ::slotted(button:disabled) {
88
+ .primary:disabled {
116
89
  background-color: var(--color-disabled01);
117
90
  border-color: var(--color-disabled01);
118
91
  color: var(--color-disabled02);
119
92
  }
120
93
 
121
- button.secondary,
122
- :host([variant="secondary"]) ::slotted(button),
123
- :host([variant="secondary"]) ::slotted(a) {
94
+ .secondary {
124
95
  background-color: var(--color-surface01);
125
96
  border-color: var(--color-primary01);
126
97
  color: var(--color-primary01);
127
98
  }
128
99
 
129
100
  @media (hover: hover) {
130
- button.secondary:hover,
131
- :host([variant="secondary"]) ::slotted(button:hover),
132
- :host([variant="secondary"]) ::slotted(a:hover) {
101
+ .secondary:hover {
133
102
  background-color: var(--color-surface01);
134
103
  border-color: var(--color-hover-primary);
135
104
  color: var(--color-hover-primary);
136
105
  }
137
106
  }
138
107
 
139
- button.secondary:active,
140
- :host([variant="secondary"]) ::slotted(button:active),
141
- :host([variant="secondary"]) ::slotted(a:active) {
108
+ .secondary:active {
142
109
  background-color: var(--color-surface01);
143
110
  border-color: var(--color-pressed-primary);
144
111
  color: var(--color-pressed-primary);
145
112
  box-shadow: var(--shadow-2);
146
113
  }
147
114
 
148
- button.secondary:disabled,
149
- :host([variant="secondary"]) ::slotted(button:disabled) {
115
+ .secondary:disabled {
150
116
  background-color: var(--color-surface01);
151
117
  border-color: var(--color-disabled01);
152
118
  color: var(--color-disabled02);
153
119
  }
154
120
 
155
- button.tertiary,
156
- :host([variant="tertiary"]) ::slotted(button),
157
- :host([variant="tertiary"]) ::slotted(a) {
121
+ .tertiary {
158
122
  background-color: transparent;
159
123
  border-color: transparent;
160
124
  color: var(--color-primary01);
161
125
  }
162
126
 
163
- button.tertiary.hasContent {
164
- padding: 0 var(--space-unit);
165
- }
166
-
167
127
  @media (hover: hover) {
168
- button.tertiary:hover,
169
- :host([variant="tertiary"]) ::slotted(button:hover),
170
- :host([variant="tertiary"]) ::slotted(a:hover) {
128
+ .tertiary:hover {
171
129
  background-color: var(--color-primary03);
172
130
  border-color: var(--color-primary03);
173
131
  color: var(--color-hover-primary);
174
132
  }
175
133
  }
176
134
 
177
- button.tertiary:focus:focus-visible,
178
- :host([variant="tertiary"]) ::slotted(button:focus:focus-visible),
179
- :host([variant="tertiary"]) ::slotted(a:focus:focus-visible) {
135
+ .tertiary:focus:focus-visible {
180
136
  background-color: var(--color-surface01);
181
137
  border-color: var(--color-surface01);
182
138
  color: var(--color-primary01);
183
139
  }
184
140
 
185
- button.tertiary:active,
186
- :host([variant="tertiary"]) ::slotted(button:active),
187
- :host([variant="tertiary"]) ::slotted(a:active) {
141
+ .tertiary:active {
188
142
  background-color: var(--color-surface01);
189
143
  border-color: var(--color-surface01);
190
144
  color: var(--color-primary01);
191
145
  box-shadow: var(--shadow-2);
192
146
  }
193
147
 
194
- button.tertiary:disabled,
195
- :host([variant="tertiary"]) ::slotted(button:disabled) {
148
+ .tertiary:disabled {
196
149
  background-color: transparent;
197
150
  border-color: transparent;
198
151
  color: var(--color-disabled02);
199
152
  }
200
-
201
- button.dark-bg,
202
- :host([variant="dark-bg"]) ::slotted(button),
203
- :host([variant="dark-bg"]) ::slotted(a) {
204
- background-color: rgba(var(--rgb-white), 0.2);
205
- border-color: transparent;
206
- color: var(--color-text04);
207
- }
208
-
209
- button.dark-bg.hasContent {
210
- padding: 0 var(--space-unit);
211
- }
212
-
213
- @media (hover: hover) {
214
- button.dark-bg:hover,
215
- :host([variant="dark-bg"]) ::slotted(button:hover),
216
- :host([variant="dark-bg"]) ::slotted(a:hover) {
217
- background-color: rgba(var(--rgb-white), 0.1);
218
- }
219
- }
220
-
221
- button.dark-bg:active,
222
- :host([variant="dark-bg"]) ::slotted(button:active),
223
- :host([variant="dark-bg"]) ::slotted(a:active) {
224
- background-color: rgba(var(--rgb-white), 0.3);
225
- }
226
-
227
- button.dark-bg:disabled,
228
- :host([variant="dark-bg"]) ::slotted(button:disabled) {
229
- color: var(--color-disabled03);
230
- background-color: rgba(var(--rgb-white), 0.05);
231
- }
@@ -39,10 +39,12 @@ export class ZFileUpload {
39
39
  }
40
40
  handleAccessibility() {
41
41
  if (this.filesNumber > 0) {
42
- this.el.querySelector('z-file:last-child z-chip button').focus();
42
+ this.el.querySelector("z-file:last-child z-chip button").focus();
43
43
  }
44
44
  else {
45
- this.type === ZFileUploadTypeEnum.default ? this.button.shadowRoot.querySelector('button').focus() : this.uploadLink.focus();
45
+ this.type === ZFileUploadTypeEnum.default
46
+ ? this.button.shadowRoot.querySelector("button").focus()
47
+ : this.uploadLink.focus();
46
48
  }
47
49
  }
48
50
  checkFiles(files) {
@@ -81,9 +83,10 @@ export class ZFileUpload {
81
83
  let fileFormatString = "";
82
84
  let fileWeightString = "";
83
85
  if (this.acceptedFormat) {
84
- const fileFormat = this.acceptedFormat.split(', ')
86
+ const fileFormat = this.acceptedFormat
87
+ .split(", ")
85
88
  .map((string) => string.substring(1).toUpperCase())
86
- .join(', ');
89
+ .join(", ");
87
90
  fileFormatString = ` nei formati ${fileFormat}`;
88
91
  }
89
92
  if (this.fileMaxSize) {
@@ -105,12 +108,12 @@ export class ZFileUpload {
105
108
  renderUploadButton() {
106
109
  return [
107
110
  this.renderInput(),
108
- h("z-button", { onClick: () => this.input.click(), onKeyPress: (e) => {
109
- if (e.code == 'Space' || e.code == 'Enter') {
111
+ h("z-button-deprecated", { onClick: () => this.input.click(), onKeyPress: (e) => {
112
+ if (e.code == "Space" || e.code == "Enter") {
110
113
  e.preventDefault();
111
114
  this.input.click();
112
115
  }
113
- }, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => this.button = val }, "Allega"),
116
+ }, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => (this.button = val) }, "Allega"),
114
117
  ];
115
118
  }
116
119
  renderUploadLink() {
@@ -120,11 +123,11 @@ export class ZFileUpload {
120
123
  "Trascinalo qui o",
121
124
  " ",
122
125
  h("z-body", { tabIndex: 0, class: "upload-link", onClick: () => this.input.click(), onKeyPress: (e) => {
123
- if (e.code == 'Space' || e.code == 'Enter') {
126
+ if (e.code == "Space" || e.code == "Enter") {
124
127
  e.preventDefault();
125
128
  this.input.click();
126
129
  }
127
- }, variant: "semibold", level: 1, ref: (val) => this.uploadLink = val }, "caricalo"),
130
+ }, variant: "semibold", level: 1, ref: (val) => (this.uploadLink = val) }, "caricalo"),
128
131
  " ",
129
132
  "dal tuo computer"),
130
133
  ];
@@ -166,7 +169,7 @@ export class ZFileUpload {
166
169
  this.type == ZFileUploadTypeEnum.default
167
170
  ? this.renderDefaultMode()
168
171
  : this.renderDragDropMode()),
169
- !!this.invalidFiles.size && (h("z-modal", { tabIndex: 0, ref: (val) => this.errorModal = val, modaltitle: "Attenzione", onModalClose: () => this.invalidFiles = new Map(), onModalBackgroundClick: () => this.invalidFiles = new Map() }, this.handleErrorModalContent()))
172
+ !!this.invalidFiles.size && (h("z-modal", { tabIndex: 0, ref: (val) => (this.errorModal = val), modaltitle: "Attenzione", onModalClose: () => (this.invalidFiles = new Map()), onModalBackgroundClick: () => (this.invalidFiles = new Map()) }, this.handleErrorModalContent())),
170
173
  ];
171
174
  }
172
175
  static get is() { return "z-file-upload"; }
@@ -50,7 +50,7 @@ input#fileElem {
50
50
  margin-bottom: var(--space-unit);
51
51
  }
52
52
 
53
- :host > .container > z-button {
53
+ :host > .container > z-button-deprecated {
54
54
  display: inline-block;
55
55
  margin-top: calc(var(--space-unit) * 3);
56
56
  }
@@ -73,7 +73,7 @@ input#fileElem {
73
73
 
74
74
  /* Tablet breakpoint */
75
75
  @media only screen and (min-width: 768px) {
76
- :host > .container > z-button {
76
+ :host > .container > z-button-deprecated {
77
77
  align-self: flex-start;
78
78
  }
79
79
  }
@@ -8,7 +8,8 @@ import { ButtonSizeEnum, ButtonVariantEnum } from "../../../beans";
8
8
  export class ZFooter {
9
9
  constructor() {
10
10
  this.creditsLinkId = "creditsLinkId";
11
- this.emitReportAProblemButtonClick = this.emitReportAProblemButtonClick.bind(this);
11
+ this.emitReportAProblemButtonClick =
12
+ this.emitReportAProblemButtonClick.bind(this);
12
13
  }
13
14
  componentWillLoad() {
14
15
  if (this.data) {
@@ -81,21 +82,25 @@ export class ZFooter {
81
82
  }
82
83
  renderFooterProductInfo() {
83
84
  var _a;
84
- if (this.productName || this.productVersion || this.productCreditsLink != null || this.showReportAProblemButton) {
85
- const versionString = `${this.productName ? ' versione' : 'Versione'} ${this.productVersion}`;
86
- const creditsObject = h("z-body", { level: 5 },
87
- (this.productName || this.productVersion) && ' - ',
88
- h("z-link", { htmlid: this.creditsLinkId, href: (_a = this.productCreditsLink) === null || _a === void 0 ? void 0 : _a.trim(), target: "_blank", textcolor: "white" }, "Credits"));
85
+ if (this.productName ||
86
+ this.productVersion ||
87
+ this.productCreditsLink != null ||
88
+ this.showReportAProblemButton) {
89
+ const versionString = `${this.productName ? " versione" : "Versione"} ${this.productVersion}`;
90
+ const creditsObject = (h("z-body", { level: 5 },
91
+ (this.productName || this.productVersion) && " - ",
92
+ h("z-link", { htmlid: this.creditsLinkId, href: (_a = this.productCreditsLink) === null || _a === void 0 ? void 0 : _a.trim(), target: "_blank", textcolor: "white" }, "Credits")));
89
93
  return (h("div", { id: "extension" },
90
- h("div", { class: { "limited-width": !!this.contentMaxWidth }, style: this.contentMaxWidth ? { "--mw": `${this.contentMaxWidth}px` } : {} },
94
+ h("div", { class: { "limited-width": !!this.contentMaxWidth }, style: this.contentMaxWidth
95
+ ? { "--mw": `${this.contentMaxWidth}px` }
96
+ : {} },
91
97
  h("span", null,
92
- this.productName && h("z-body", { level: 5, variant: "semibold" }, this.productName),
93
- this.productVersion && h("z-body", { level: 5 }, versionString),
98
+ this.productName && (h("z-body", { level: 5, variant: "semibold" }, this.productName)),
99
+ this.productVersion && (h("z-body", { level: 5 }, versionString)),
94
100
  this.productCreditsLink != null && creditsObject),
95
- this.showReportAProblemButton &&
96
- h("div", null,
97
- h("z-body", { level: 5 }, "Hai bisogno di aiuto?"),
98
- h("z-button", { variant: ButtonVariantEnum["dark-bg"], size: ButtonSizeEnum.small, onClick: this.emitReportAProblemButtonClick }, "SEGNALA UN PROBLEMA")),
101
+ this.showReportAProblemButton && (h("div", null,
102
+ h("z-body", { level: 5 }, "Hai bisogno di aiuto?"),
103
+ h("z-button-deprecated", { variant: ButtonVariantEnum["dark-bg"], size: ButtonSizeEnum.small, onClick: this.emitReportAProblemButtonClick }, "SEGNALA UN PROBLEMA"))),
99
104
  h("z-divider", { color: "gray500" }))));
100
105
  }
101
106
  }
@@ -205,7 +210,7 @@ export class ZFooter {
205
210
  "optional": true,
206
211
  "docs": {
207
212
  "tags": [],
208
- "text": "'undefined' or 'null' means 'don't show Credits',\nempty string means 'emit creditsLinkClick event', \nnot empty string means 'open the url and emit creditsLinkClick event'"
213
+ "text": "'undefined' or 'null' means 'don't show Credits',\nempty string means 'emit creditsLinkClick event',\nnot empty string means 'open the url and emit creditsLinkClick event'"
209
214
  },
210
215
  "attribute": "product-credits-link",
211
216
  "reflect": false
@@ -103,7 +103,7 @@ footer > section > div {
103
103
  margin-top: var(--space-unit);
104
104
  }
105
105
 
106
- #extension z-button {
106
+ #extension z-button-deprecated {
107
107
  margin-left: var(--space-unit);
108
108
  }
109
109
 
@@ -239,4 +239,4 @@ div.limited-width {
239
239
  #extension {
240
240
  padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 4) 0;
241
241
  }
242
- }
242
+ }
@@ -15,7 +15,8 @@ export class zModalLogin {
15
15
  this.externalProviderCheck = false;
16
16
  }
17
17
  componentDidLoad() {
18
- this.externalProviderCheck = !!this.hostElement.querySelectorAll('[slot="provider"]').length;
18
+ this.externalProviderCheck =
19
+ !!this.hostElement.querySelectorAll('[slot="provider"]').length;
19
20
  }
20
21
  emitLoginSubmit() {
21
22
  const usernameInput = this.hostElement.querySelector("z-input#username");
@@ -65,7 +66,7 @@ export class zModalLogin {
65
66
  return username;
66
67
  }
67
68
  renderZainoDigitaleButton() {
68
- return (h("z-button", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitZainoDigitaleClick(), class: "zainoDigitale" },
69
+ return (h("z-button-deprecated", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitZainoDigitaleClick(), class: "zainoDigitale" },
69
70
  h("div", { class: "zd" },
70
71
  h("svg", { width: "18px", height: "24px", viewBox: "0 0 18 24" },
71
72
  h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" },
@@ -91,12 +92,12 @@ export class zModalLogin {
91
92
  h("z-link", { class: "forget", href: this.forgotPasswordUrl }, "Password dimenticata?"),
92
93
  h("div", { class: "login" },
93
94
  h("slot", { name: "login" },
94
- h("z-button", { variant: ButtonVariantEnum.primary, onClick: () => this.emitLoginSubmit() }, "Accedi")))),
95
+ h("z-button-deprecated", { variant: ButtonVariantEnum.primary, onClick: () => this.emitLoginSubmit() }, "Accedi")))),
95
96
  h("hr", null),
96
97
  h("z-body", { class: "signup", level: 4, variant: "semibold" }, "Non hai ancora un account?"),
97
98
  h("div", { class: "signup" },
98
99
  h("slot", { name: "signup" },
99
- h("z-button", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitSignupClick() }, "Registrati"))),
100
+ h("z-button-deprecated", { variant: ButtonVariantEnum.secondary, onClick: () => this.emitSignupClick() }, "Registrati"))),
100
101
  !this.externalProviderCheck && (h("div", { class: "providers" },
101
102
  h("z-body", { class: "provider", level: 5, variant: "regular" }, "OPPURE ACCEDI CON:"),
102
103
  h("slot", { name: "provider" },
@@ -15,9 +15,9 @@
15
15
  align-items: stretch;
16
16
  }
17
17
 
18
- z-button,
18
+ z-button-deprecated,
19
19
  z-input,
20
- ::slotted(z-button),
20
+ ::slotted(z-button-deprecated),
21
21
  ::slotted(z-input) {
22
22
  display: inline-block;
23
23
  width: 100%;
@@ -48,8 +48,8 @@ div.wrapper > form > div.password::slotted(z-input),
48
48
  align-self: flex-end;
49
49
  }
50
50
 
51
- div.wrapper > form > div.login::slotted(z-button),
52
- :host div.wrapper > form > div.login z-button {
51
+ div.wrapper > form > div.login::slotted(z-button-deprecated),
52
+ :host div.wrapper > form > div.login z-button-deprecated {
53
53
  margin: calc(var(--space-unit) * 3) 0;
54
54
  align-self: flex-start;
55
55
  }
@@ -62,8 +62,8 @@ div.wrapper > form > div.login::slotted(z-button),
62
62
  margin-block-start: unset;
63
63
  }
64
64
 
65
- div.wrapper > div.signup::slotted(z-button),
66
- :host div.wrapper > div.signup z-button {
65
+ div.wrapper > div.signup::slotted(z-button-deprecated),
66
+ :host div.wrapper > div.signup z-button-deprecated {
67
67
  display: inline-block;
68
68
  margin: calc(var(--space-unit) * 2) 0;
69
69
  }
@@ -101,8 +101,8 @@ slot-fb[name="provider"] {
101
101
 
102
102
  /* Tablet breakpoint */
103
103
  @media only screen and (min-width: 768px) {
104
- z-button,
105
- ::slotted(z-button) {
104
+ z-button-deprecated,
105
+ ::slotted(z-button-deprecated) {
106
106
  width: initial;
107
107
  }
108
108
 
@@ -1,5 +1,5 @@
1
- :host > button,
2
- :host > a {
1
+ z-navigation-tab > button,
2
+ z-navigation-tab-link > a {
3
3
  position: relative;
4
4
  z-index: 0;
5
5
  display: inline-flex;
@@ -23,38 +23,53 @@
23
23
  cursor: pointer;
24
24
  }
25
25
 
26
- :host > a {
26
+ z-navigation-tab-link > a {
27
27
  text-decoration: none;
28
28
  }
29
29
 
30
- :host *::before,
31
- :host *::after {
30
+ z-navigation-tab *,
31
+ z-navigation-tab-link *,
32
+ z-navigation-tab *::before,
33
+ z-navigation-tab *::after,
34
+ z-navigation-tab-link *::before,
35
+ z-navigation-tab-link *::after {
32
36
  box-sizing: border-box;
33
37
  }
34
38
 
35
- :host(:not([disabled]):hover) > *,
36
- :host([selected]) > * {
39
+ z-navigation-tab > *:focus:focus-visible,
40
+ z-navigation-tab-link > *:focus:focus-visible {
41
+ box-shadow: inset var(--shadow-focus-primary);
42
+ }
43
+
44
+ z-navigation-tab:not([disabled]):hover > *,
45
+ z-navigation-tab[selected] > *,
46
+ z-navigation-tab-link:not([disabled]):hover > *,
47
+ z-navigation-tab-link[selected] > * {
37
48
  color: var(--color-hover-secondary);
38
49
  fill: currentColor;
39
50
  }
40
51
 
41
- :host(:not([disabled]):hover) > *::after,
42
- :host([selected]) > *::after {
43
- content: '';
52
+ z-navigation-tab:not([disabled]):hover > *::after,
53
+ z-navigation-tab[selected] > *::after,
54
+ z-navigation-tab-link:not([disabled]):hover > *::after,
55
+ z-navigation-tab-link[selected] > *::after {
56
+ content: "";
44
57
  position: absolute;
45
58
  background-color: var(--color-hover-secondary);
46
59
  }
47
60
 
48
- :host([orientation='horizontal']:not([disabled]):hover) > *::after,
49
- :host([orientation='horizontal'][selected]) > *::after {
61
+ z-navigation-tab[orientation="horizontal"]:not([disabled]):hover > *::after,
62
+ z-navigation-tab[orientation="horizontal"][selected] > *::after,
63
+ z-navigation-tab-link[orientation="horizontal"]:not([disabled]):hover > *::after,
64
+ z-navigation-tab-link[orientation="horizontal"][selected] > *::after {
50
65
  bottom: 0;
51
66
  left: 0;
52
67
  width: 100%;
53
68
  height: var(--border-size-large);
54
69
  }
55
70
 
56
- slot[name="icon"] z-icon,
57
- ::slotted([slot="icon"]) {
71
+ z-navigation-tab z-icon,
72
+ z-navigation-tab-link z-icon {
58
73
  --z-icon-width: calc(var(--space-unit) * 2);
59
74
  --z-icon-height: calc(var(--space-unit) * 2);
60
75
 
@@ -62,20 +77,16 @@ slot[name="icon"] z-icon,
62
77
  margin: 0;
63
78
  }
64
79
 
65
- :host([orientation='horizontal']) slot[name="icon"] z-icon,
66
- :host([orientation='horizontal']) ::slotted([slot="icon"]) {
80
+ z-navigation-tab[orientation="horizontal"] z-icon,
81
+ z-navigation-tab-link[orientation="horizontal"] z-icon {
67
82
  margin-right: var(--space-unit);
68
83
  }
69
84
 
70
- :host(:not([disabled]):hover) > * {
85
+ z-navigation-tab:not([disabled]):hover > * {
71
86
  background-color: var(--color-background);
72
87
  }
73
88
 
74
- :host > *:focus:focus-visible {
75
- box-shadow: var(--shadow-focus-primary);
76
- }
77
-
78
- :host([disabled]) > * {
89
+ z-navigation-tab[disabled] > * {
79
90
  pointer-events: all;
80
91
  cursor: not-allowed;
81
92
  color: var(--gray500);
@@ -83,34 +94,41 @@ slot[name="icon"] z-icon,
83
94
  }
84
95
 
85
96
  /* Size small (only available for horizontal) */
86
- :host([size='small']) > * {
97
+ z-navigation-tab[size="small"] > *,
98
+ z-navigation-tab-link[size="small"] > * {
87
99
  font-size: var(--font-size-2);
88
100
  line-height: 1.4;
89
101
  letter-spacing: 0.16px;
90
102
  }
91
103
 
92
- :host([size='small'][orientation='horizontal']) > * {
104
+ z-navigation-tab[size="small"][orientation="horizontal"] > *,
105
+ z-navigation-tab-link[size="small"][orientation="horizontal"] > * {
93
106
  padding: var(--space-unit) calc(var(--space-unit) * 2);
94
107
  }
95
108
 
96
- :host([size='small'][orientation='horizontal']:not([disabled]):hover) > *::after,
97
- :host([size='small'][orientation='horizontal'][selected]) > *::after {
109
+ z-navigation-tab[size="small"][orientation="horizontal"]:not([disabled]):hover > *::after,
110
+ z-navigation-tab[size="small"][orientation="horizontal"][selected] > *::after,
111
+ z-navigation-tab-link[size="small"][orientation="horizontal"]:hover > *::after,
112
+ z-navigation-tab-link[size="small"][orientation="horizontal"][selected] > *::after {
98
113
  height: var(--border-size-medium);
99
114
  }
100
115
 
101
- :host([size='small']:not([orientation='vertical'])) slot[name="icon"] z-icon,
102
- :host([size='small']:not([orientation='vertical'])) ::slotted([slot="icon"]) {
116
+ z-navigation-tab[size="small"]:not([orientation="vertical"]) z-icon,
117
+ z-navigation-tab-link[size="small"]:not([orientation="vertical"]) z-icon {
103
118
  --z-icon-width: 14px;
104
119
  --z-icon-height: 14px;
105
120
  }
106
121
 
107
122
  /* Orientation Vertical */
108
- :host([orientation='vertical']) > * {
123
+ z-navigation-tab[orientation="vertical"] > *,
124
+ z-navigation-tab-link[orientation="vertical"] > * {
109
125
  padding: calc(var(--space-unit) * 3) calc(var(--space-unit) * 2);
110
126
  }
111
127
 
112
- :host([orientation='vertical']:hover:not([disabled])) > *::after,
113
- :host([orientation='vertical'][selected]) > *::after {
128
+ z-navigation-tab[orientation="vertical"]:hover:not([disabled]) > *::after,
129
+ z-navigation-tab[orientation="vertical"][selected] > *::after,
130
+ z-navigation-tab-link[orientation="vertical"]:hover > *::after,
131
+ z-navigation-tab-link[orientation="vertical"][selected] > *::after {
114
132
  width: var(--border-size-large);
115
133
  height: 100%;
116
134
  top: 0;