@zanichelli/albe-web-components 15.1.1 → 15.1.3
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 +4 -0
- package/dist/cjs/z-app-header_12.cjs.entry.js +17 -27
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +2 -2
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -1
- package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
- package/dist/collection/components/file-upload/z-dragdrop-area/styles.css +5 -0
- package/dist/collection/components/file-upload/z-file-upload/styles.css +5 -5
- package/dist/collection/components/z-card/styles.css +0 -5
- package/dist/collection/components/z-input/index.js +3 -3
- package/dist/collection/components/z-input/index.js.map +1 -1
- package/dist/collection/components/z-input/styles.css +409 -0
- package/dist/collection/components/z-modal/styles.css +6 -6
- package/dist/collection/components/z-searchbar/styles.css +0 -5
- package/dist/collection/components/z-tag/index.js +3 -4
- package/dist/collection/components/z-tag/index.js.map +1 -1
- package/dist/collection/components/z-tag/index.spec.js +10 -10
- package/dist/collection/components/z-tag/index.spec.js.map +1 -1
- package/dist/collection/components/z-tag/styles.css +9 -12
- package/dist/components/index10.js +4 -13
- package/dist/components/index10.js.map +1 -1
- package/dist/components/index15.js +1 -1
- package/dist/components/index15.js.map +1 -1
- package/dist/components/index26.js +1 -1
- package/dist/components/index26.js.map +1 -1
- package/dist/components/index27.js +4 -5
- package/dist/components/index27.js.map +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/index7.js.map +1 -1
- package/dist/components/z-card.js +1 -1
- package/dist/components/z-card.js.map +1 -1
- package/dist/components/z-file-upload.js +1 -1
- package/dist/components/z-file-upload.js.map +1 -1
- package/dist/esm/z-app-header_12.entry.js +17 -27
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-card.entry.js.map +1 -1
- package/dist/esm/z-dragdrop-area_2.entry.js +2 -2
- package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -1
- package/dist/esm/z-file-upload.entry.js +1 -1
- package/dist/esm/z-file-upload.entry.js.map +1 -1
- package/dist/esm-es5/z-app-header_12.entry.js +1 -1
- package/dist/esm-es5/z-app-header_12.entry.js.map +1 -1
- package/dist/esm-es5/z-card.entry.js +1 -1
- package/dist/esm-es5/z-card.entry.js.map +1 -1
- package/dist/esm-es5/z-dragdrop-area_2.entry.js +1 -1
- package/dist/esm-es5/z-dragdrop-area_2.entry.js.map +1 -1
- package/dist/esm-es5/z-file-upload.entry.js +1 -1
- package/dist/esm-es5/z-file-upload.entry.js.map +1 -1
- package/dist/web-components-library/p-01fa435e.system.entry.js +2 -0
- package/dist/web-components-library/p-01fa435e.system.entry.js.map +1 -0
- package/dist/web-components-library/p-3a0a7625.entry.js +2 -0
- package/dist/web-components-library/p-3a0a7625.entry.js.map +1 -0
- package/dist/web-components-library/p-81bcc748.entry.js +2 -0
- package/dist/web-components-library/p-81bcc748.entry.js.map +1 -0
- package/dist/web-components-library/p-91da40da.system.entry.js +2 -0
- package/dist/web-components-library/p-91da40da.system.entry.js.map +1 -0
- package/{www/build/p-4d0200ca.system.entry.js → dist/web-components-library/p-a0e6fe95.system.entry.js} +2 -2
- package/dist/web-components-library/p-a0e6fe95.system.entry.js.map +1 -0
- package/dist/web-components-library/{p-2df54d7d.entry.js → p-d225d94f.entry.js} +2 -2
- package/dist/web-components-library/p-d225d94f.entry.js.map +1 -0
- package/dist/web-components-library/p-dac6f2cc.entry.js +2 -0
- package/dist/web-components-library/p-dac6f2cc.entry.js.map +1 -0
- package/dist/web-components-library/p-f530271b.system.js +1 -1
- package/dist/web-components-library/p-f61b817e.system.entry.js +2 -0
- package/dist/web-components-library/p-f61b817e.system.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-01fa435e.system.entry.js +2 -0
- package/www/build/p-01fa435e.system.entry.js.map +1 -0
- package/www/build/p-3a0a7625.entry.js +2 -0
- package/www/build/p-3a0a7625.entry.js.map +1 -0
- package/www/build/p-81bcc748.entry.js +2 -0
- package/www/build/p-81bcc748.entry.js.map +1 -0
- package/www/build/p-91da40da.system.entry.js +2 -0
- package/www/build/p-91da40da.system.entry.js.map +1 -0
- package/{dist/web-components-library/p-4d0200ca.system.entry.js → www/build/p-a0e6fe95.system.entry.js} +2 -2
- package/www/build/p-a0e6fe95.system.entry.js.map +1 -0
- package/www/build/{p-2df54d7d.entry.js → p-d225d94f.entry.js} +2 -2
- package/www/build/p-d225d94f.entry.js.map +1 -0
- package/www/build/p-dac6f2cc.entry.js +2 -0
- package/www/build/p-dac6f2cc.entry.js.map +1 -0
- package/www/build/{p-21d22d93.js → p-e04dfd70.js} +1 -1
- package/www/build/p-f530271b.system.js +1 -1
- package/www/build/p-f61b817e.system.entry.js +2 -0
- package/www/build/p-f61b817e.system.entry.js.map +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/collection/components/z-input/styles-checkbox-radio.css +0 -130
- package/dist/collection/components/z-input/styles-general.css +0 -154
- package/dist/collection/components/z-input/styles-text.css +0 -86
- package/dist/collection/components/z-input/styles-textarea.css +0 -35
- package/dist/web-components-library/p-0108191f.system.entry.js +0 -2
- package/dist/web-components-library/p-0108191f.system.entry.js.map +0 -1
- package/dist/web-components-library/p-0bde1f0e.entry.js +0 -2
- package/dist/web-components-library/p-0bde1f0e.entry.js.map +0 -1
- package/dist/web-components-library/p-12008903.system.entry.js +0 -2
- package/dist/web-components-library/p-12008903.system.entry.js.map +0 -1
- package/dist/web-components-library/p-21941767.entry.js +0 -2
- package/dist/web-components-library/p-21941767.entry.js.map +0 -1
- package/dist/web-components-library/p-2df54d7d.entry.js.map +0 -1
- package/dist/web-components-library/p-49256720.system.entry.js +0 -2
- package/dist/web-components-library/p-49256720.system.entry.js.map +0 -1
- package/dist/web-components-library/p-4d0200ca.system.entry.js.map +0 -1
- package/dist/web-components-library/p-a5f739b0.entry.js +0 -2
- package/dist/web-components-library/p-a5f739b0.entry.js.map +0 -1
- package/www/build/p-0108191f.system.entry.js +0 -2
- package/www/build/p-0108191f.system.entry.js.map +0 -1
- package/www/build/p-0bde1f0e.entry.js +0 -2
- package/www/build/p-0bde1f0e.entry.js.map +0 -1
- package/www/build/p-12008903.system.entry.js +0 -2
- package/www/build/p-12008903.system.entry.js.map +0 -1
- package/www/build/p-21941767.entry.js +0 -2
- package/www/build/p-21941767.entry.js.map +0 -1
- package/www/build/p-2df54d7d.entry.js.map +0 -1
- package/www/build/p-49256720.system.entry.js +0 -2
- package/www/build/p-49256720.system.entry.js.map +0 -1
- package/www/build/p-4d0200ca.system.entry.js.map +0 -1
- package/www/build/p-a5f739b0.entry.js +0 -2
- package/www/build/p-a5f739b0.entry.js.map +0 -1
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
width: inherit;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
input::-ms-clear,
|
|
7
|
+
input::-ms-reveal {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* GENERAL */
|
|
12
|
+
:host input::-ms-clear,
|
|
13
|
+
:host input::-ms-reveal {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
input,
|
|
18
|
+
textarea,
|
|
19
|
+
.textarea-wrapper {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
border: var(--border-size-small) solid var(--gray700);
|
|
22
|
+
background: var(--color-input-field01);
|
|
23
|
+
border-radius: var(--border-radius-small);
|
|
24
|
+
color: var(--gray900);
|
|
25
|
+
fill: var(--gray900);
|
|
26
|
+
font-family: var(--font-family-sans);
|
|
27
|
+
font-size: var(--font-size-3);
|
|
28
|
+
font-weight: var(--font-rg);
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([size="small"]) input,
|
|
33
|
+
:host([size="small"]) textarea,
|
|
34
|
+
:host([size="small"]) .textarea-wrapper,
|
|
35
|
+
:host([size="x-small"]) input,
|
|
36
|
+
:host([size="x-small"]) textarea,
|
|
37
|
+
:host([size="x-small"]) .textarea-wrapper {
|
|
38
|
+
font-size: var(--font-size-2);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host.cursor-select input {
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* FOCUS */
|
|
46
|
+
:host:not(.active-select) input:focus:focus-visible,
|
|
47
|
+
:host:not([readonly="true"]) .textarea-wrapper:focus-within {
|
|
48
|
+
box-shadow: var(--shadow-focus-primary);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input:focus:focus-visible,
|
|
52
|
+
textarea:focus:focus-visible {
|
|
53
|
+
color: var(--color-input-field02);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host.active-select input {
|
|
57
|
+
border: var(--border-size-small) solid var(--color-primary01);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host.cursor-select input:focus:focus-visible {
|
|
61
|
+
box-shadow: var(--shadow-focus-primary);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host input[readonly]:focus:focus-visible {
|
|
65
|
+
box-shadow: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* FILLED */
|
|
69
|
+
.filled {
|
|
70
|
+
border-color: var(--color-surface05);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* STATUSES (success, warning, error) */
|
|
74
|
+
.input-success {
|
|
75
|
+
border-color: var(--color-success01);
|
|
76
|
+
background: var(--color-success-inverse);
|
|
77
|
+
fill: var(--color-success01);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.input-error {
|
|
81
|
+
border-color: var(--color-error01);
|
|
82
|
+
background: var(--color-error-inverse);
|
|
83
|
+
fill: var(--color-error01);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.input-warning {
|
|
87
|
+
border-color: var(--color-warning01);
|
|
88
|
+
background: var(--color-warning-inverse);
|
|
89
|
+
fill: var(--color-warning01);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* HOVER */
|
|
93
|
+
input:not([readonly]):hover,
|
|
94
|
+
.textarea-wrapper:hover {
|
|
95
|
+
outline: var(--border-size-medium) solid var(--gray700);
|
|
96
|
+
outline-offset: -2px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* READONLY */
|
|
100
|
+
:host:not(.active-select) input[readonly],
|
|
101
|
+
.readonly {
|
|
102
|
+
border-color: var(--color-disabled01);
|
|
103
|
+
fill: var(--color-disabled01);
|
|
104
|
+
pointer-events: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* DISABLED */
|
|
108
|
+
:host([disabled]:not([disabled="false"])) input,
|
|
109
|
+
:host([disabled]:not([disabled="false"])) .textarea-wrapper,
|
|
110
|
+
:host([disabled]:not([disabled="false"])) z-icon {
|
|
111
|
+
border-color: var(--color-disabled01);
|
|
112
|
+
box-shadow: none;
|
|
113
|
+
color: var(--color-disabled03);
|
|
114
|
+
fill: var(--color-disabled01);
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host([disabled]:not([disabled="false"])) input:hover {
|
|
119
|
+
border-width: var(--border-size-small);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* PLACEHOLDER */
|
|
123
|
+
input::placeholder,
|
|
124
|
+
textarea::placeholder {
|
|
125
|
+
color: var(--color-text05);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
::-webkit-textarea-placeholder {
|
|
129
|
+
color: var(--color-text05);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:-ms-textarea-placeholder {
|
|
133
|
+
color: var(--color-text05);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
::placeholder {
|
|
137
|
+
color: var(--color-text05);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* LABEL */
|
|
141
|
+
label.input-label {
|
|
142
|
+
display: block;
|
|
143
|
+
padding-bottom: var(--space-unit);
|
|
144
|
+
color: var(--color-default-text);
|
|
145
|
+
font-family: var(--font-family-sans);
|
|
146
|
+
font-size: var(--font-size-1);
|
|
147
|
+
font-weight: var(--font-sb);
|
|
148
|
+
text-align: left;
|
|
149
|
+
text-transform: uppercase;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([disabled]:not([disabled="false"])) label.input-label {
|
|
153
|
+
color: var(--color-disabled03);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.text-wrapper > div {
|
|
157
|
+
position: relative;
|
|
158
|
+
z-index: 1;
|
|
159
|
+
fill: var(--gray900);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.text-wrapper > div > input {
|
|
163
|
+
width: 100%;
|
|
164
|
+
height: calc(var(--space-unit) * 5.5);
|
|
165
|
+
box-sizing: border-box;
|
|
166
|
+
padding: 0 calc(var(--space-unit) * 1.5);
|
|
167
|
+
margin: 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([size="small"]) .text-wrapper > div > input {
|
|
171
|
+
height: calc(var(--space-unit) * 4.5);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host([size="x-small"]) .text-wrapper > div > input {
|
|
175
|
+
height: calc(var(--space-unit) * 4);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.text-wrapper > div > input.has-icon,
|
|
179
|
+
.text-wrapper > div > input.has-clear-icon {
|
|
180
|
+
padding-right: calc(var(--space-unit) * 5.25);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.text-wrapper > div > input.has-icon.has-clear-icon {
|
|
184
|
+
padding-right: calc(var(--space-unit) * 8);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.text-wrapper .icons-wrapper {
|
|
188
|
+
position: absolute;
|
|
189
|
+
z-index: 2;
|
|
190
|
+
top: 50%;
|
|
191
|
+
right: calc(var(--space-unit) * 1.5);
|
|
192
|
+
display: flex;
|
|
193
|
+
pointer-events: none;
|
|
194
|
+
transform: translateY(-50%);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.text-wrapper .icons-wrapper > button.icon-button {
|
|
198
|
+
padding: 0;
|
|
199
|
+
border: 0;
|
|
200
|
+
background: none;
|
|
201
|
+
color: inherit;
|
|
202
|
+
font: inherit;
|
|
203
|
+
pointer-events: initial;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.text-wrapper .icons-wrapper > button.icon-button + button.icon-button {
|
|
207
|
+
margin-left: calc(var(--space-unit) * 0.5);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.text-wrapper .icons-wrapper > button.icon-button.hidden {
|
|
211
|
+
display: none;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.text-wrapper .icons-wrapper > button.icon-button.reset-icon,
|
|
215
|
+
.text-wrapper .icons-wrapper > button.icon-button.toggle-password-icon {
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.text-wrapper .icons-wrapper > button.icon-button > z-icon {
|
|
220
|
+
--z-icon-width: 18px;
|
|
221
|
+
--z-icon-height: 18px;
|
|
222
|
+
|
|
223
|
+
display: block;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.text-wrapper .icons-wrapper > button.icon-button > z-icon.small,
|
|
227
|
+
.text-wrapper .icons-wrapper > button.icon-button > z-icon.x-small {
|
|
228
|
+
--z-icon-width: 16px;
|
|
229
|
+
--z-icon-height: 16px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.text-wrapper .icons-wrapper > button.icon-button:focus {
|
|
233
|
+
box-shadow: var(--shadow-focus-primary);
|
|
234
|
+
outline: none !important;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* stylelint-disable property-no-vendor-prefix */
|
|
238
|
+
.text-wrapper > div > input:-webkit-autofill {
|
|
239
|
+
-webkit-box-shadow: 0 0 0 1000px #fff inset;
|
|
240
|
+
-webkit-text-fill-color: currentcolor;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.textarea-wrapper {
|
|
244
|
+
padding: calc(var(--space-unit) * 1.5);
|
|
245
|
+
|
|
246
|
+
/* Firefox scrollbar */
|
|
247
|
+
scrollbar-color: var(--color-primary01) transparent;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
textarea::-webkit-scrollbar {
|
|
251
|
+
width: 10px;
|
|
252
|
+
background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);
|
|
253
|
+
border-radius: var(--border-radius);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
textarea::-webkit-scrollbar-track {
|
|
257
|
+
background-color: transparent;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
textarea::-webkit-scrollbar-thumb {
|
|
261
|
+
width: 10px;
|
|
262
|
+
background-color: var(--color-primary01);
|
|
263
|
+
border-radius: var(--border-radius);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
textarea::-webkit-scrollbar-thumb:hover {
|
|
267
|
+
background-color: var(--color-hover-primary);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
textarea {
|
|
271
|
+
width: 100%;
|
|
272
|
+
min-height: 132px;
|
|
273
|
+
padding: 0;
|
|
274
|
+
border: none;
|
|
275
|
+
margin: 0;
|
|
276
|
+
resize: none;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.radio-wrapper,
|
|
280
|
+
.checkbox-wrapper {
|
|
281
|
+
position: relative;
|
|
282
|
+
display: inline-flex;
|
|
283
|
+
flex-direction: row;
|
|
284
|
+
align-items: center;
|
|
285
|
+
color: var(--color-default-text);
|
|
286
|
+
fill: var(--color-primary01);
|
|
287
|
+
font-family: var(--font-family-sans);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.radio-wrapper:hover,
|
|
291
|
+
.checkbox-wrapper:hover {
|
|
292
|
+
color: var(--color-hover-primary);
|
|
293
|
+
fill: currentcolor;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.radio-wrapper > input,
|
|
297
|
+
.checkbox-wrapper > input {
|
|
298
|
+
position: absolute;
|
|
299
|
+
z-index: -1;
|
|
300
|
+
opacity: 0;
|
|
301
|
+
pointer-events: none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.radio-wrapper .radio-label,
|
|
305
|
+
.checkbox-wrapper .checkbox-label {
|
|
306
|
+
display: inline-flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
margin: 0;
|
|
309
|
+
color: inherit;
|
|
310
|
+
font-family: inherit;
|
|
311
|
+
font-size: inherit;
|
|
312
|
+
font-weight: inherit;
|
|
313
|
+
line-height: 1;
|
|
314
|
+
text-transform: inherit;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.radio-wrapper input:not(:disabled) + .radio-label,
|
|
318
|
+
.checkbox-wrapper input:not(:disabled) + .checkbox-label {
|
|
319
|
+
cursor: pointer;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.radio-wrapper .radio-label z-icon,
|
|
323
|
+
.checkbox-wrapper .checkbox-label z-icon {
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
fill: inherit;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
:host([size="small"]) .radio-wrapper .radio-label z-icon,
|
|
329
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label z-icon {
|
|
330
|
+
--z-icon-width: 16px;
|
|
331
|
+
--z-icon-height: 16px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
:host([size="small"]) .radio-wrapper .radio-label,
|
|
335
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label {
|
|
336
|
+
font-size: var(--font-size-2);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
:host([size="x-small"]) .radio-wrapper .radio-label z-icon,
|
|
340
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label z-icon {
|
|
341
|
+
--z-icon-width: 14px;
|
|
342
|
+
--z-icon-height: 14px;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
:host([size="x-small"]) .radio-wrapper .radio-label,
|
|
346
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label {
|
|
347
|
+
font-size: var(--font-size-1);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.radio-wrapper .radio-label.after,
|
|
351
|
+
.checkbox-wrapper .checkbox-label.after {
|
|
352
|
+
flex-direction: row;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.radio-wrapper .radio-label.before,
|
|
356
|
+
.checkbox-wrapper .checkbox-label.before {
|
|
357
|
+
flex-direction: row-reverse;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.radio-wrapper .radio-label.after > span,
|
|
361
|
+
.checkbox-wrapper .checkbox-label.after > span {
|
|
362
|
+
margin-left: var(--space-unit);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.radio-wrapper .radio-label.before > span,
|
|
366
|
+
.checkbox-wrapper .checkbox-label.before > span {
|
|
367
|
+
margin-right: var(--space-unit);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
:host([size="small"]) .radio-wrapper .radio-label.after > span,
|
|
371
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label.after > span,
|
|
372
|
+
:host([size="x-small"]) .radio-wrapper .radio-label.after > span,
|
|
373
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label.after > span {
|
|
374
|
+
margin-left: calc(var(--space-unit) * 0.5);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
:host([size="small"]) .radio-wrapper .radio-label.before > span,
|
|
378
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label.before > span,
|
|
379
|
+
:host([size="x-small"]) .radio-wrapper .radio-label.before > span,
|
|
380
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label.before > span {
|
|
381
|
+
margin-right: calc(var(--space-unit) * 0.5);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* focus */
|
|
385
|
+
.radio-wrapper > input:focus:focus-visible + .radio-label > z-icon {
|
|
386
|
+
border-radius: 50%;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.checkbox-wrapper > input:focus:focus-visible + .checkbox-label > z-icon {
|
|
390
|
+
border-radius: var(--border-radius-small);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.radio-wrapper > input:focus:focus-visible + .radio-label > z-icon,
|
|
394
|
+
.checkbox-wrapper > input:focus:focus-visible + .checkbox-label > z-icon {
|
|
395
|
+
box-shadow: var(--shadow-focus-primary);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* disabled */
|
|
399
|
+
.radio-wrapper > input:disabled + .radio-label,
|
|
400
|
+
.checkbox-wrapper > input:disabled + .checkbox-label {
|
|
401
|
+
color: var(--color-disabled03);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.radio-wrapper > input:disabled + .radio-label > z-icon,
|
|
405
|
+
.checkbox-wrapper > input:disabled + .checkbox-label > z-icon {
|
|
406
|
+
cursor: default;
|
|
407
|
+
fill: var(--color-disabled01);
|
|
408
|
+
}
|
|
409
|
+
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
*:focus {
|
|
2
|
-
border-radius: 50%;
|
|
3
|
-
box-shadow: var(--shadow-focus-primary);
|
|
4
|
-
outline: none !important;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
1
|
:host {
|
|
8
2
|
font-family: var(--font-family-sans);
|
|
9
3
|
font-weight: var(--font-rg);
|
|
@@ -69,6 +63,12 @@
|
|
|
69
63
|
cursor: pointer;
|
|
70
64
|
}
|
|
71
65
|
|
|
66
|
+
.modal-container > header button:focus-visible {
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
box-shadow: var(--shadow-focus-primary);
|
|
69
|
+
outline: none !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
72
|
.modal-container > header z-icon {
|
|
73
73
|
--z-icon-width: calc(var(--space-unit) * 2.25);
|
|
74
74
|
--z-icon-height: calc(var(--space-unit) * 2.25);
|
|
@@ -11,10 +11,9 @@ export class ZTag {
|
|
|
11
11
|
this.expandable = undefined;
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} }, this.icon && h("z-icon", { key: '1ce99af72a0ee664304ffc0a0fd401e98e043788', name: this.icon }), h("div", { key: 'fb9aee905ab56d5c086ee850eaf7f7cb8fa10dfe' }, h("slot", { key: '8f1d8bb919793b9570fb49a0761be534b6e454ce' }))));
|
|
14
|
+
return (h(Host, { key: '2b457c2a7462afa36499c0991a32436751b2b6d1', class: {
|
|
15
|
+
expandable: this.expandable && !!this.icon,
|
|
16
|
+
} }, this.icon && h("z-icon", { key: '3f6b461a15c9221c658221894f62895bdbd8e108', name: this.icon }), h("div", { key: '0bb11571e1f99587a62e9d345fc731bf795656e5' }, h("slot", { key: '46ccbc8282a3611e7a3188651bbe96df1aacb5b2' }))));
|
|
18
17
|
}
|
|
19
18
|
static get is() { return "z-tag"; }
|
|
20
19
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-tag/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAEvD;;;;;GAKG;AAOH,MAAM,OAAO,IAAI;;;;;IASf,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-tag/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAEvD;;;;;GAKG;AAOH,MAAM,OAAO,IAAI;;;;;IASf,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI;aAC3C;YAEA,IAAI,CAAC,IAAI,IAAI,+DAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;YACzC;gBACE,8DAAQ,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Host, Prop, h} from \"@stencil/core\";\n\n/**\n * Ztag component.\n * @slot - The text of the z-tag.\n * @cssprop --z-tag-text-color - text and icon color using tokens.\n * @cssprop --z-tag-bg - background color of the z-tag.\n */\n@Component({\n tag: \"z-tag\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZTag {\n /** [optional] Tag icon */\n @Prop()\n icon?: string;\n\n /** [optional] Hide the text and show it on hover*/\n @Prop()\n expandable?: boolean;\n\n render(): HTMLZTagElement {\n return (\n <Host\n class={{\n expandable: this.expandable && !!this.icon,\n }}\n >\n {this.icon && <z-icon name={this.icon} />}\n <div>\n <slot />\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -4,17 +4,17 @@ describe("Suite test ZTag", () => {
|
|
|
4
4
|
it("Test render z-tag empty", async () => {
|
|
5
5
|
const page = await newSpecPage({
|
|
6
6
|
components: [ZTag],
|
|
7
|
-
html: `<z-tag
|
|
7
|
+
html: `<z-tag></z-tag>`,
|
|
8
8
|
});
|
|
9
|
-
expect(page.root).toEqualHtml(`<z-tag
|
|
9
|
+
expect(page.root).toEqualHtml(`<z-tag><div></div></z-tag>`);
|
|
10
10
|
});
|
|
11
11
|
it("Test render z-tag with icon", async () => {
|
|
12
12
|
const page = await newSpecPage({
|
|
13
13
|
components: [ZTag],
|
|
14
|
-
html: `<z-tag
|
|
14
|
+
html: `<z-tag icon="gear"></z-tag>`,
|
|
15
15
|
});
|
|
16
16
|
expect(page.root).toEqualHtml(`
|
|
17
|
-
<z-tag
|
|
17
|
+
<z-tag icon="gear">
|
|
18
18
|
<z-icon name="gear"></z-icon>
|
|
19
19
|
<div></div>
|
|
20
20
|
</z-tag>`);
|
|
@@ -22,10 +22,10 @@ describe("Suite test ZTag", () => {
|
|
|
22
22
|
it("Test render z-tag with text", async () => {
|
|
23
23
|
const page = await newSpecPage({
|
|
24
24
|
components: [ZTag],
|
|
25
|
-
html: `<z-tag
|
|
25
|
+
html: `<z-tag>my custom element</z-tag>`,
|
|
26
26
|
});
|
|
27
27
|
expect(page.root).toEqualHtml(`
|
|
28
|
-
<z-tag
|
|
28
|
+
<z-tag>
|
|
29
29
|
<div>my custom element</div>
|
|
30
30
|
</z-tag>
|
|
31
31
|
`);
|
|
@@ -33,10 +33,10 @@ describe("Suite test ZTag", () => {
|
|
|
33
33
|
it("Test render z-tag with icon and text", async () => {
|
|
34
34
|
const page = await newSpecPage({
|
|
35
35
|
components: [ZTag],
|
|
36
|
-
html: `<z-tag
|
|
36
|
+
html: `<z-tag icon="gear">my custom element</z-tag>`,
|
|
37
37
|
});
|
|
38
38
|
expect(page.root).toEqualHtml(`
|
|
39
|
-
<z-tag
|
|
39
|
+
<z-tag icon="gear" >
|
|
40
40
|
<z-icon name="gear"></z-icon>
|
|
41
41
|
<div>my custom element</div>
|
|
42
42
|
</z-tag>
|
|
@@ -45,10 +45,10 @@ describe("Suite test ZTag", () => {
|
|
|
45
45
|
it("Test render z-tag with icon and text with Token", async () => {
|
|
46
46
|
const page = await newSpecPage({
|
|
47
47
|
components: [ZTag],
|
|
48
|
-
html: `<z-tag
|
|
48
|
+
html: `<z-tag icon="gear" style="--z-tag-text-color: var(--color-white); --z-tag-bg: var(--avatar-C19);">my custom element</z-tag>`,
|
|
49
49
|
});
|
|
50
50
|
expect(page.root).toEqualHtml(`
|
|
51
|
-
<z-tag
|
|
51
|
+
<z-tag icon="gear" style="--z-tag-text-color: var(--color-white); --z-tag-bg: var(--avatar-C19);">
|
|
52
52
|
<z-icon name="gear"></z-icon>
|
|
53
53
|
<div>my custom element</div>
|
|
54
54
|
</z-tag>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../src/components/z-tag/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAE7B,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../src/components/z-tag/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAE7B,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,iBAAiB;SACxB,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;QAC3C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,6BAA6B;SACpC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;eAInB,CAAC,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;QAC3C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,kCAAkC;SACzC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;KAI7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,8CAA8C;SACrD,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;KAK7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,6HAA6H;SACpI,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;KAK7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {newSpecPage} from \"@stencil/core/testing\";\n\nimport {ZTag} from \"./index\";\n\ndescribe(\"Suite test ZTag\", () => {\n it(\"Test render z-tag empty\", async () => {\n const page = await newSpecPage({\n components: [ZTag],\n html: `<z-tag></z-tag>`,\n });\n\n expect(page.root).toEqualHtml(`<z-tag><div></div></z-tag>`);\n });\n\n it(\"Test render z-tag with icon\", async () => {\n const page = await newSpecPage({\n components: [ZTag],\n html: `<z-tag icon=\"gear\"></z-tag>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-tag icon=\"gear\">\n <z-icon name=\"gear\"></z-icon>\n <div></div>\n </z-tag>`);\n });\n\n it(\"Test render z-tag with text\", async () => {\n const page = await newSpecPage({\n components: [ZTag],\n html: `<z-tag>my custom element</z-tag>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-tag>\n <div>my custom element</div>\n </z-tag>\n `);\n });\n\n it(\"Test render z-tag with icon and text\", async () => {\n const page = await newSpecPage({\n components: [ZTag],\n html: `<z-tag icon=\"gear\">my custom element</z-tag>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-tag icon=\"gear\" >\n <z-icon name=\"gear\"></z-icon>\n <div>my custom element</div>\n </z-tag>\n `);\n });\n\n it(\"Test render z-tag with icon and text with Token\", async () => {\n const page = await newSpecPage({\n components: [ZTag],\n html: `<z-tag icon=\"gear\" style=\"--z-tag-text-color: var(--color-white); --z-tag-bg: var(--avatar-C19);\">my custom element</z-tag>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-tag icon=\"gear\" style=\"--z-tag-text-color: var(--color-white); --z-tag-bg: var(--avatar-C19);\">\n <z-icon name=\"gear\"></z-icon>\n <div>my custom element</div>\n </z-tag>\n `);\n });\n});\n"]}
|
|
@@ -1,35 +1,32 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
--z-icon-width: 14px;
|
|
3
3
|
--z-icon-height: 14px;
|
|
4
|
-
--z-tag-text-color: var(--color-primary03);
|
|
5
|
-
--z-tag-bg: var(--color-hover-primary);
|
|
6
4
|
|
|
7
5
|
display: flex;
|
|
8
6
|
width: fit-content;
|
|
9
7
|
max-width: inherit;
|
|
10
8
|
height: fit-content;
|
|
11
9
|
max-height: inherit;
|
|
10
|
+
align-items: flex-start;
|
|
12
11
|
padding: calc(var(--space-unit) / 2);
|
|
13
|
-
background-color: var(--z-tag-bg);
|
|
12
|
+
background-color: var(--z-tag-bg, var(--color-hover-primary));
|
|
14
13
|
border-radius: var(--border-radius);
|
|
15
|
-
color: var(--z-tag-text-color);
|
|
16
|
-
fill:
|
|
14
|
+
color: var(--z-tag-text-color, var(--color-text-inverse));
|
|
15
|
+
fill: currentcolor;
|
|
17
16
|
font-family: var(--font-family-sans);
|
|
17
|
+
font-size: var(--font-size-1);
|
|
18
|
+
font-weight: var(--font-sb);
|
|
19
|
+
letter-spacing: 0.32px;
|
|
18
20
|
line-height: 14px;
|
|
19
21
|
text-transform: uppercase;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
:host > z-icon {
|
|
23
|
-
margin-right: var(--space-unit);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
24
|
:host(.expandable) > z-icon {
|
|
27
|
-
margin-right: 0;
|
|
28
25
|
transition: margin-right 0.3s ease-out;
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
:host(:not(.expandable)) > z-icon
|
|
32
|
-
:host(.expandable:hover) > z-icon
|
|
28
|
+
:host(:not(.expandable)) > z-icon,
|
|
29
|
+
:host(.expandable:hover) > z-icon {
|
|
33
30
|
margin-right: var(--space-unit);
|
|
34
31
|
transition: margin-right 0.3s ease-out 0s;
|
|
35
32
|
}
|