beercss 4.0.6 → 4.0.8
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/README.md +8 -8
- package/dist/cdn/beer.css +49 -33
- package/dist/cdn/beer.custom-element.js +2 -2
- package/dist/cdn/beer.custom-element.min.js +1 -1
- package/dist/cdn/beer.js +10 -2
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/dist/cdn/beer.scoped.css +49 -33
- package/dist/cdn/beer.scoped.min.css +2 -2
- package/dist/cdn/material-symbols-outlined.woff2 +0 -0
- package/dist/cdn/material-symbols-rounded.woff2 +0 -0
- package/dist/cdn/material-symbols-sharp.woff2 +0 -0
- package/dist/cdn/material-symbols-subset.woff2 +0 -0
- package/package.json +1 -1
- package/src/cdn/customElement.js +2 -2
- package/src/cdn/elements/fields.css +29 -24
- package/src/cdn/elements/fields.ts +10 -2
- package/src/cdn/elements/menus.css +15 -1
- package/src/cdn/elements/sliders.css +1 -4
- package/src/cdn/fonts/material-symbols-outlined.woff2 +0 -0
- package/src/cdn/fonts/material-symbols-rounded.woff2 +0 -0
- package/src/cdn/fonts/material-symbols-sharp.woff2 +0 -0
- package/src/cdn/fonts/material-symbols-subset.woff2 +0 -0
- package/src/cdn/settings/fonts.css +4 -4
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
border-radius: 0.25rem;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.field
|
|
41
|
+
.field[class*=round].small {
|
|
42
42
|
border-radius: 1.25rem;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.field
|
|
45
|
+
.field[class*=round] {
|
|
46
46
|
border-radius: 1.5rem;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.field
|
|
49
|
+
.field[class*=round].large {
|
|
50
50
|
border-radius: 1.75rem;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.field
|
|
53
|
+
.field[class*=round].extra {
|
|
54
54
|
border-radius: 2rem;
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -135,8 +135,7 @@ input::-webkit-date-and-time-value {
|
|
|
135
135
|
|
|
136
136
|
input[type=file],
|
|
137
137
|
input[type=color],
|
|
138
|
-
:not(.field) > input[type^=date],
|
|
139
|
-
:not(.field) > input[type^=time],
|
|
138
|
+
:not(.field) > input:is([type^=date], [type^=time], [type=month], [type=week]),
|
|
140
139
|
input::-webkit-calendar-picker-indicator {
|
|
141
140
|
opacity: 0;
|
|
142
141
|
position: absolute;
|
|
@@ -150,6 +149,12 @@ input::-webkit-calendar-picker-indicator {
|
|
|
150
149
|
z-index: 2 !important;
|
|
151
150
|
}
|
|
152
151
|
|
|
152
|
+
@media (pointer: fine) {
|
|
153
|
+
.field > input::-webkit-calendar-picker-indicator {
|
|
154
|
+
z-index: -1 !important;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
153
158
|
input::-webkit-search-decoration,
|
|
154
159
|
input::-webkit-search-cancel-button,
|
|
155
160
|
input::-webkit-search-results-button,
|
|
@@ -171,11 +176,11 @@ input[type=number] {
|
|
|
171
176
|
border-color: var(--primary);
|
|
172
177
|
}
|
|
173
178
|
|
|
174
|
-
.field
|
|
179
|
+
.field[class*=round] > :is(input, textarea, select) {
|
|
175
180
|
padding-inline: 1.4376rem;
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
.field
|
|
183
|
+
.field[class*=round] > :is(input, textarea, select):focus {
|
|
179
184
|
padding-inline: 1.375rem;
|
|
180
185
|
}
|
|
181
186
|
|
|
@@ -203,25 +208,25 @@ input[type=number] {
|
|
|
203
208
|
padding-inline-end: 2.875rem;
|
|
204
209
|
}
|
|
205
210
|
|
|
206
|
-
.field:not(.border,
|
|
211
|
+
.field:not(.border, [class*=round]) > :is(input, textarea, select) {
|
|
207
212
|
border-block-end-color: var(--outline);
|
|
208
213
|
}
|
|
209
214
|
|
|
210
|
-
.field:not(.border,
|
|
215
|
+
.field:not(.border, [class*=round]) > :is(input, textarea, select):focus {
|
|
211
216
|
border-block-end-color: var(--primary);
|
|
212
217
|
}
|
|
213
218
|
|
|
214
|
-
.field
|
|
215
|
-
.field
|
|
219
|
+
.field[class*=round]:not(.border, .fill) > :is(input, textarea, select),
|
|
220
|
+
.field[class*=round]:not(.border) > :is(input, textarea, select):focus {
|
|
216
221
|
box-shadow: var(--elevate1);
|
|
217
222
|
}
|
|
218
223
|
|
|
219
|
-
.field
|
|
224
|
+
.field[class*=round]:not(.border, .fill) > :is(input, textarea, select):focus {
|
|
220
225
|
box-shadow: var(--elevate2);
|
|
221
226
|
}
|
|
222
227
|
|
|
223
|
-
.field.invalid:not(.border,
|
|
224
|
-
.field.invalid:not(.border,
|
|
228
|
+
.field.invalid:not(.border, [class*=round]) > :is(input, textarea, select),
|
|
229
|
+
.field.invalid:not(.border, [class*=round]) > :is(input, textarea, select):focus {
|
|
225
230
|
border-block-end-color: var(--error);
|
|
226
231
|
}
|
|
227
232
|
|
|
@@ -307,11 +312,11 @@ input[type=number] {
|
|
|
307
312
|
inset: -0.5rem var(--_start) 0 1rem;
|
|
308
313
|
}
|
|
309
314
|
|
|
310
|
-
.field.label
|
|
315
|
+
.field.label[class*=round] > label {
|
|
311
316
|
inset: -0.5rem 1.75rem 0 var(--_start);
|
|
312
317
|
}
|
|
313
318
|
|
|
314
|
-
[dir=rtl] .field.
|
|
319
|
+
[dir=rtl] .field.labell[class*=round] > label {
|
|
315
320
|
inset: -0.5rem 1.75rem 0 var(--_start);
|
|
316
321
|
}
|
|
317
322
|
|
|
@@ -319,8 +324,8 @@ input[type=number] {
|
|
|
319
324
|
--_start: 1rem;
|
|
320
325
|
}
|
|
321
326
|
|
|
322
|
-
.field.label
|
|
323
|
-
.field.label.border.prefix
|
|
327
|
+
.field.label[class*=round] > label,
|
|
328
|
+
.field.label.border.prefix[class*=round]:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
|
|
324
329
|
--_start: 1.5rem;
|
|
325
330
|
}
|
|
326
331
|
|
|
@@ -363,13 +368,13 @@ input[type=number] {
|
|
|
363
368
|
clip-path: polygon(-2% -2%, 1rem -2%, 1rem 0.5rem, calc(100% - 0.75rem) 0.5rem, calc(100% - 0.75rem) -2%, 102% -2%, 102% 102%, -2% 102%);
|
|
364
369
|
}
|
|
365
370
|
|
|
366
|
-
.field.label.border
|
|
367
|
-
.field.label.border
|
|
371
|
+
.field.label.border[class*=round]:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
|
|
372
|
+
.field.label.border[class*=round]:not(.fill) > select {
|
|
368
373
|
clip-path: polygon(-2% -2%, 1.25rem -2%, 1.25rem 0.5rem, calc(100% - 1.75rem) 0.5rem, calc(100% - 1.75rem) -2%, 102% -2%, 102% 102%, -2% 102%);
|
|
369
374
|
}
|
|
370
375
|
|
|
371
|
-
[dir=rtl] .field.label.border
|
|
372
|
-
[dir=rtl] .field.label.border
|
|
376
|
+
[dir=rtl] .field.label.border[class*=round]:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
|
|
377
|
+
[dir=rtl] .field.label.border[class*=round]:not(.fill) > select {
|
|
373
378
|
clip-path: polygon(-2% -2%, 1.75rem -2%, 1.75rem 0.5rem, calc(100% - 1.25rem) 0.5rem, calc(100% - 1.25rem) -2%, 102% -2%, 102% 102%, -2% 102%);
|
|
374
379
|
}
|
|
375
380
|
|
|
@@ -410,7 +415,7 @@ input[type=number] {
|
|
|
410
415
|
color: var(--error) !important;
|
|
411
416
|
}
|
|
412
417
|
|
|
413
|
-
.field
|
|
418
|
+
.field[class*=round] > output {
|
|
414
419
|
padding: 0.25rem 1.5rem;
|
|
415
420
|
}
|
|
416
421
|
|
|
@@ -44,7 +44,15 @@ function onKeydownColor(e: KeyboardEvent) {
|
|
|
44
44
|
function onPasswordIconClick(e: Event) {
|
|
45
45
|
const icon = e.currentTarget as HTMLElement;
|
|
46
46
|
const input = query("input", parent(icon)) as HTMLInputElement;
|
|
47
|
-
if (input && icon.textContent?.includes("visibility"))
|
|
47
|
+
if (input && icon.textContent?.includes("visibility")) {
|
|
48
|
+
if (input.type === "password") {
|
|
49
|
+
input.type = "text";
|
|
50
|
+
icon.textContent = "visibility_off";
|
|
51
|
+
} else {
|
|
52
|
+
input.type = "password";
|
|
53
|
+
icon.textContent = "visibility";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
function onInputTextarea(e: Event) {
|
|
@@ -106,7 +114,7 @@ function updateAllTextareas() {
|
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
function updateAllPasswordIcons() {
|
|
109
|
-
const icons = queryAll("input[type=password]
|
|
117
|
+
const icons = queryAll(".field:has(> input[type=password]) > i, a");
|
|
110
118
|
for (let i=0; i<icons.length; i++) onWeak(icons[i], "click", onPasswordIconClick);
|
|
111
119
|
}
|
|
112
120
|
|
|
@@ -103,7 +103,7 @@ menu > li.active {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
menu > li:is(.active, :active) {
|
|
106
|
-
border-radius:
|
|
106
|
+
border-radius: 0.75rem;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
menu > li > :is(.max, .field),
|
|
@@ -221,6 +221,20 @@ menu.transparent > li {
|
|
|
221
221
|
padding: 0;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
menu.transparent > li > menu {
|
|
225
|
+
opacity: 1;
|
|
226
|
+
visibility: visible;
|
|
227
|
+
position: relative;
|
|
228
|
+
inset: 0;
|
|
229
|
+
transform: none;
|
|
230
|
+
max-block-size: none;
|
|
231
|
+
border-radius: 1rem 1rem 0.5rem 0.5rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
menu.transparent > li:last-child > menu {
|
|
235
|
+
border-radius: 0.5rem 0.5rem 1rem 1rem;
|
|
236
|
+
}
|
|
237
|
+
|
|
224
238
|
menu > li:nth-last-child(2) {
|
|
225
239
|
--_child: 2;
|
|
226
240
|
}
|
|
@@ -140,13 +140,11 @@
|
|
|
140
140
|
background: var(--primary);
|
|
141
141
|
color: var(--on-primary);
|
|
142
142
|
z-index: 0;
|
|
143
|
-
inset: calc(50% - (var(--_track, 0) / 2)) var(--_end) auto var(--_start);
|
|
144
|
-
clip-path: polygon(0 0, calc(100% - 0.5rem) 0, calc(100% - 0.5rem) 100%, 0 100%);
|
|
143
|
+
inset: calc(50% - (var(--_track, 0) / 2)) calc(var(--_end) + 0.5rem) auto calc(var(--_start) + 0.5rem);
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
.slider > input[type=range] + input[type=range] ~ span:not([class]) {
|
|
148
147
|
border-radius: 0;
|
|
149
|
-
clip-path: polygon(0.5rem 0, max(0.5rem, calc(100% - 0.5rem)) 0, max(0.5rem, calc(100% - 0.5rem)) 100%, 0.5rem 100%);
|
|
150
148
|
}
|
|
151
149
|
|
|
152
150
|
.field > .slider {
|
|
@@ -316,7 +314,6 @@
|
|
|
316
314
|
.slider.max > span:not([class]) {
|
|
317
315
|
block-size: auto !important;
|
|
318
316
|
inset: 0 var(--_end) 0 var(--_start);
|
|
319
|
-
clip-path: none;
|
|
320
317
|
background: currentcolor;
|
|
321
318
|
color: inherit;
|
|
322
319
|
border-radius: 0;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
font-style: normal;
|
|
5
5
|
font-weight: 400;
|
|
6
6
|
font-display: swap;
|
|
7
|
-
src: url(../fonts/material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
7
|
+
src: url(../fonts/material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.8/dist/cdn/material-symbols-outlined.woff2) format("woff2");
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/* rounded icons */
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
font-style: normal;
|
|
14
14
|
font-weight: 400;
|
|
15
15
|
font-display: swap;
|
|
16
|
-
src: url(../fonts/material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
16
|
+
src: url(../fonts/material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.8/dist/cdn/material-symbols-rounded.woff2) format("woff2");
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/* sharp icons */
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
font-style: normal;
|
|
23
23
|
font-weight: 400;
|
|
24
24
|
font-display: swap;
|
|
25
|
-
src: url(../fonts/material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
25
|
+
src: url(../fonts/material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.8/dist/cdn/material-symbols-sharp.woff2) format("woff2");
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/* subset of only required icons */
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
font-style: normal;
|
|
32
32
|
font-weight: 400;
|
|
33
33
|
font-display: swap;
|
|
34
|
-
src: url(../fonts/material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
34
|
+
src: url(../fonts/material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.8/dist/cdn/material-symbols-subset.woff2) format("woff2");
|
|
35
35
|
}
|