beercss 3.2.13 → 3.3.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.
- package/README.md +6 -6
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/package.json +1 -1
- package/src/cdn/beer.css +1 -2
- package/src/cdn/beer.ts +66 -82
- package/src/cdn/elements/buttons.css +1 -1
- package/src/cdn/elements/chips.css +13 -14
- package/src/cdn/elements/dialogs.css +5 -4
- package/src/cdn/elements/fields.css +25 -21
- package/src/cdn/elements/icons.css +5 -0
- package/src/cdn/elements/layouts.css +1 -1
- package/src/cdn/elements/media.css +5 -5
- package/src/cdn/elements/progress.css +126 -14
- package/src/cdn/elements/sliders.css +54 -7
- package/src/cdn/elements/{toasts.css → snackbars.css} +8 -8
- package/src/cdn/elements/tables.css +1 -1
- package/src/cdn/elements/tabs.css +1 -1
- package/src/cdn/helpers/dividers.css +2 -1
- package/src/cdn/helpers/forms.css +8 -2
- package/src/cdn/helpers/margins.css +47 -8
- package/src/cdn/helpers/opacities.css +14 -2
- package/src/cdn/helpers/paddings.css +47 -8
- package/src/cdn/helpers/reset.css +22 -1
- package/src/cdn/helpers/theme.css +1 -1
- package/src/cdn/helpers/waves.css +5 -3
- package/src/cdn/settings/dark.css +28 -26
- package/src/cdn/settings/light.css +28 -26
- package/src/cdn/elements/loaders.css +0 -156
package/src/cdn/beer.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
let
|
|
1
|
+
let _timeoutSnackbar: ReturnType<typeof setTimeout>;
|
|
2
2
|
let _timeoutMutation: ReturnType<typeof setTimeout>;
|
|
3
|
+
let _timeoutMenu: ReturnType<typeof setTimeout>;
|
|
3
4
|
let _mutation: MutationObserver | null;
|
|
4
5
|
const _lastTheme: IBeerCssTheme = {
|
|
5
6
|
light: "",
|
|
@@ -39,10 +40,6 @@ function queryAll (selector: string | NodeListOf<Element> | null, element?: Elem
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
function hasQuery (selector: string | Element | null, element?: Element | null): boolean {
|
|
43
|
-
return !!(query(selector, element));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
43
|
function hasClass (element: Element | null, name: string): boolean {
|
|
47
44
|
return element?.classList?.contains(name) ?? false;
|
|
48
45
|
}
|
|
@@ -96,20 +93,7 @@ function create (htmlAttributesAsJson: any): HTMLElement {
|
|
|
96
93
|
function updateInput (target: Element): void {
|
|
97
94
|
const input = target as HTMLInputElement;
|
|
98
95
|
if (hasType(input, "number") && !input.value) input.value = "";
|
|
99
|
-
|
|
100
|
-
const parentTarget = parent(target);
|
|
101
|
-
const label = query("label", parentTarget) as HTMLLabelElement;
|
|
102
|
-
const isBorder = hasClass(parentTarget, "border") && !hasClass(parentTarget, "fill");
|
|
103
|
-
const toActive = document.activeElement === target || input.value || hasQuery("[selected]", input) || hasType(input, "date") || hasType(input, "time") || hasType(input, "datetime-local");
|
|
104
|
-
|
|
105
|
-
if (toActive) {
|
|
106
|
-
if (isBorder) addClass(input, "active");
|
|
107
|
-
addClass(label, "active");
|
|
108
|
-
} else {
|
|
109
|
-
if (isBorder) removeClass(input, "active");
|
|
110
|
-
removeClass(label, "active");
|
|
111
|
-
}
|
|
112
|
-
|
|
96
|
+
if (!input.placeholder) input.placeholder = " ";
|
|
113
97
|
if (target.getAttribute("data-ui")) void open(target, null);
|
|
114
98
|
}
|
|
115
99
|
|
|
@@ -141,11 +125,11 @@ function onClickDocument (e: Event): void {
|
|
|
141
125
|
menus.forEach((x: Element) => menu(target, x, e));
|
|
142
126
|
}
|
|
143
127
|
|
|
144
|
-
function
|
|
128
|
+
function onClickSnackbar (e: Event): void {
|
|
145
129
|
const target = e.currentTarget as Element;
|
|
146
130
|
removeClass(target, "active");
|
|
147
131
|
|
|
148
|
-
if (
|
|
132
|
+
if (_timeoutSnackbar) clearTimeout(_timeoutSnackbar);
|
|
149
133
|
}
|
|
150
134
|
|
|
151
135
|
function onChangeFile (e: Event): void {
|
|
@@ -191,33 +175,49 @@ function updateRange (target: Element): void {
|
|
|
191
175
|
const parentTarget = parent(target) as HTMLElement;
|
|
192
176
|
const bar = query("span", parentTarget) as HTMLElement;
|
|
193
177
|
const inputs = queryAll("input", parentTarget) as NodeListOf<HTMLInputElement>;
|
|
194
|
-
const tooltip = query(".tooltip", parentTarget) as HTMLElement;
|
|
195
178
|
if (!inputs.length || !bar) return;
|
|
196
179
|
|
|
180
|
+
const rootSize = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--size")) || 16;
|
|
181
|
+
const thumb = 1.25 * rootSize * 100 / inputs[0].offsetWidth;
|
|
197
182
|
const percents: Array<number> = [];
|
|
198
183
|
const values: Array<number> = [];
|
|
199
184
|
for (let i = 0; i < inputs.length; i++) {
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
const
|
|
185
|
+
const oldMin = parseFloat(inputs[i].min);
|
|
186
|
+
const oldMax = parseFloat(inputs[i].max);
|
|
187
|
+
const oldValue = parseFloat(inputs[i].value);
|
|
188
|
+
const min = oldMin || 0;
|
|
189
|
+
const max = oldMax || 100;
|
|
190
|
+
const value = oldValue || 0;
|
|
203
191
|
const percent = (value - min) * 100 / (max - min);
|
|
204
|
-
|
|
192
|
+
const fix = thumb / 2 - thumb * percent / 100;
|
|
193
|
+
percents.push(percent + fix);
|
|
205
194
|
values.push(value);
|
|
206
|
-
}
|
|
207
195
|
|
|
208
|
-
|
|
196
|
+
if (oldMin !== min) inputs[i].min = `${min}`;
|
|
197
|
+
if (oldMax !== max) inputs[i].max = `${max}`;
|
|
198
|
+
if (oldValue !== value) inputs[i].value = `${value}`;
|
|
199
|
+
}
|
|
209
200
|
|
|
210
201
|
let percent = percents[0];
|
|
211
|
-
let
|
|
212
|
-
let
|
|
202
|
+
let start = 0;
|
|
203
|
+
let end = 100 - start - percent;
|
|
204
|
+
let value1 = values[0];
|
|
205
|
+
let value2 = values[1] || 0;
|
|
213
206
|
if (inputs.length > 1) {
|
|
214
207
|
percent = Math.abs(percents[1] - percents[0]);
|
|
215
|
-
|
|
216
|
-
|
|
208
|
+
start = percents[1] > percents[0] ? percents[0] : percents[1];
|
|
209
|
+
end = 100 - start - percent;
|
|
210
|
+
|
|
211
|
+
if (value2 > value1) {
|
|
212
|
+
value1 = values[1] || 0;
|
|
213
|
+
value2 = values[0];
|
|
214
|
+
}
|
|
217
215
|
}
|
|
218
216
|
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
parentTarget.style.setProperty("---start", `${start}%`);
|
|
218
|
+
parentTarget.style.setProperty("---end", `${end}%`);
|
|
219
|
+
parentTarget.style.setProperty("---value1", `'${value1}'`);
|
|
220
|
+
parentTarget.style.setProperty("---value2", `'${value2}'`);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
async function open (from: Element, to: Element | null, options?: any, e?: Event): Promise<void> {
|
|
@@ -228,9 +228,8 @@ async function open (from: Element, to: Element | null, options?: any, e?: Event
|
|
|
228
228
|
|
|
229
229
|
if (hasTag(to, "dialog")) return await dialog(from, to);
|
|
230
230
|
if (hasTag(to, "menu")) return menu(from, to, e);
|
|
231
|
-
if (hasClass(to, "
|
|
231
|
+
if (hasClass(to, "snackbar")) return snackbar(from, to, options);
|
|
232
232
|
if (hasClass(to, "page")) return page(from, to);
|
|
233
|
-
if (hasClass(to, "progress")) return progress(to, options);
|
|
234
233
|
|
|
235
234
|
tab(from);
|
|
236
235
|
|
|
@@ -255,26 +254,29 @@ function page (from: Element, to: Element): void {
|
|
|
255
254
|
}
|
|
256
255
|
|
|
257
256
|
function menu (from: Element, to: Element, e?: Event): any {
|
|
258
|
-
|
|
259
|
-
e?.stopPropagation();
|
|
260
|
-
tab(from);
|
|
257
|
+
if (_timeoutMenu) clearTimeout(_timeoutMenu);
|
|
261
258
|
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
_timeoutMenu = setTimeout(() => {
|
|
260
|
+
on(document.body, "click", onClickDocument);
|
|
261
|
+
tab(from);
|
|
264
262
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const trustedMenu = trustedFrom.closest("menu");
|
|
268
|
-
const trustedActive = !query("menu", trustedFrom.closest("[data-ui]") ?? undefined);
|
|
263
|
+
if (hasClass(to, "active")) {
|
|
264
|
+
if (!e) return removeClass(to, "active");
|
|
269
265
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
266
|
+
const trustedFrom = e.target as Element;
|
|
267
|
+
const trustedTo = query(trustedFrom.getAttribute("data-ui") ?? "");
|
|
268
|
+
const trustedMenu = trustedFrom.closest("menu");
|
|
269
|
+
const trustedActive = !query("menu", trustedFrom.closest("[data-ui]") ?? undefined);
|
|
274
270
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
271
|
+
if (trustedTo && trustedTo !== trustedMenu) return menu(trustedFrom, trustedTo);
|
|
272
|
+
if (!trustedTo && !trustedActive && trustedMenu) return false;
|
|
273
|
+
return removeClass(to, "active");
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const menus = queryAll("menu.active");
|
|
277
|
+
menus.forEach((x: Element) => removeClass(x, "active"));
|
|
278
|
+
addClass(to, "active");
|
|
279
|
+
}, 90);
|
|
278
280
|
}
|
|
279
281
|
|
|
280
282
|
async function dialog (from: Element, to: Element): Promise<void> {
|
|
@@ -326,44 +328,24 @@ async function dialog (from: Element, to: Element): Promise<void> {
|
|
|
326
328
|
}
|
|
327
329
|
}
|
|
328
330
|
|
|
329
|
-
function
|
|
331
|
+
function snackbar (from: Element, to: Element, milliseconds?: number): void {
|
|
332
|
+
(document.activeElement as HTMLElement)?.blur();
|
|
330
333
|
tab(from);
|
|
331
334
|
|
|
332
|
-
const elements = queryAll(".
|
|
335
|
+
const elements = queryAll(".snackbar.active");
|
|
333
336
|
elements.forEach((x: Element) => removeClass(x, "active"));
|
|
334
337
|
addClass(to, "active");
|
|
335
|
-
on(to, "click",
|
|
338
|
+
on(to, "click", onClickSnackbar);
|
|
336
339
|
|
|
337
|
-
if (
|
|
340
|
+
if (_timeoutSnackbar) clearTimeout(_timeoutSnackbar);
|
|
338
341
|
|
|
339
342
|
if (milliseconds === -1) return;
|
|
340
343
|
|
|
341
|
-
|
|
344
|
+
_timeoutSnackbar = setTimeout(() => {
|
|
342
345
|
removeClass(to, "active");
|
|
343
346
|
}, milliseconds ?? 6000);
|
|
344
347
|
}
|
|
345
348
|
|
|
346
|
-
function progress (to: Element, percentage: number): void {
|
|
347
|
-
const element = to as HTMLElement;
|
|
348
|
-
|
|
349
|
-
if (hasClass(element, "left")) {
|
|
350
|
-
element.style.clipPath = `polygon(0% 0%, 0% 100%, ${percentage}% 100%, ${percentage}% 0%)`;
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
if (hasClass(element, "top")) {
|
|
355
|
-
element.style.clipPath = `polygon(0% 0%, 100% 0%, 100% ${percentage}%, 0% ${percentage}%)`;
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
if (hasClass(element, "right")) {
|
|
360
|
-
element.style.clipPath = `polygon(100% 0%, 100% 100%, ${100 - percentage}% 100%, ${100 - percentage}% 0%)`;
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
if (hasClass(element, "bottom")) element.style.clipPath = `polygon(0% 100%, 100% 100%, 100% ${100 - percentage}%, 0% ${100 - percentage}%)`;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
349
|
function lastTheme (): IBeerCssTheme {
|
|
368
350
|
if (_lastTheme.light && _lastTheme.dark) return _lastTheme;
|
|
369
351
|
|
|
@@ -377,7 +359,7 @@ function lastTheme (): IBeerCssTheme {
|
|
|
377
359
|
|
|
378
360
|
const fromLight = getComputedStyle(light);
|
|
379
361
|
const fromDark = getComputedStyle(dark);
|
|
380
|
-
const variables = ["--primary", "--on-primary", "--primary-container", "--on-primary-container", "--secondary", "--on-secondary", "--secondary-container", "--on-secondary-container", "--tertiary", "--on-tertiary", "--tertiary-container", "--on-tertiary-container", "--error", "--on-error", "--error-container", "--on-error-container", "--background", "--on-background", "--surface", "--on-surface", "--
|
|
362
|
+
const variables = ["--primary", "--on-primary", "--primary-container", "--on-primary-container", "--secondary", "--on-secondary", "--secondary-container", "--on-secondary-container", "--tertiary", "--on-tertiary", "--tertiary-container", "--on-tertiary-container", "--error", "--on-error", "--error-container", "--on-error-container", "--background", "--on-background", "--surface", "--on-surface", "--surface-variant", "--on-surface-variant", "--outline", "--outline-variant", "--shadow", "--scrim", "--inverse-surface", "--inverse-on-surface", "--inverse-primary"];
|
|
381
363
|
for (let i = 0; i < variables.length; i++) {
|
|
382
364
|
_lastTheme.light += variables[i] + ":" + fromLight.getPropertyValue(variables[i]) + ";";
|
|
383
365
|
_lastTheme.dark += variables[i] + ":" + fromDark.getPropertyValue(variables[i]) + ";";
|
|
@@ -429,7 +411,7 @@ function mode (value: string | any): string {
|
|
|
429
411
|
function setup (): void {
|
|
430
412
|
if (_mutation) return;
|
|
431
413
|
_mutation = new MutationObserver(onMutation);
|
|
432
|
-
_mutation.observe(document.body, { childList: true, subtree: true });
|
|
414
|
+
_mutation.observe(document.body, { attributes: true, attributeFilter: ["value", "max", "min"], childList: true, subtree: true });
|
|
433
415
|
onMutation();
|
|
434
416
|
}
|
|
435
417
|
|
|
@@ -451,17 +433,19 @@ function ui (selector?: string | Element, options?: string | number | IBeerCssTh
|
|
|
451
433
|
const labels = queryAll(".field > label");
|
|
452
434
|
labels.forEach((x: Element) => on(x, "click", onClickLabel));
|
|
453
435
|
|
|
454
|
-
const inputs = queryAll(".field > input:not([type=file]), .field > select, .field > textarea");
|
|
436
|
+
const inputs = queryAll(".field > input:not([type=file]):not([type=range]), .field > select, .field > textarea");
|
|
455
437
|
inputs.forEach((x: Element) => {
|
|
456
438
|
on(x, "focus", onFocusInput);
|
|
457
439
|
on(x, "blur", onBlurInput);
|
|
458
440
|
updateInput(x);
|
|
459
441
|
});
|
|
442
|
+
|
|
460
443
|
const files = queryAll(".field > input[type=file]");
|
|
461
444
|
files.forEach((x: Element) => {
|
|
462
445
|
on(x, "change", onChangeFile);
|
|
463
446
|
updateFile(x);
|
|
464
447
|
});
|
|
448
|
+
|
|
465
449
|
const ranges = queryAll(".slider > input[type=range]");
|
|
466
450
|
ranges.forEach((x: Element) => {
|
|
467
451
|
on(x, "input", onInputRange);
|
|
@@ -472,4 +456,4 @@ function ui (selector?: string | Element, options?: string | number | IBeerCssTh
|
|
|
472
456
|
if ((globalThis as any).addEventListener) (globalThis as any).addEventListener("load", async () => await ui("setup"));
|
|
473
457
|
(globalThis as any).beercss = ui;
|
|
474
458
|
(globalThis as any).ui = ui;
|
|
475
|
-
export default ui;
|
|
459
|
+
export default ui;
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
6
|
-
height:
|
|
7
|
-
min-width:
|
|
6
|
+
height: 2rem;
|
|
7
|
+
min-width: 2rem;
|
|
8
8
|
font-size: 0.875rem;
|
|
9
9
|
font-weight: 500;
|
|
10
|
-
color:
|
|
10
|
+
background-color: transparent;
|
|
11
|
+
border: 0.0625rem solid var(--outline);
|
|
12
|
+
color: var(--on-surface-variant);
|
|
11
13
|
padding: 0 1rem;
|
|
12
|
-
background-color: var(--secondary);
|
|
13
14
|
margin: 0 0.5rem;
|
|
14
15
|
text-transform: none;
|
|
15
16
|
border-radius: 0.5rem;
|
|
@@ -19,9 +20,9 @@
|
|
|
19
20
|
line-height: normal;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
.chip.
|
|
23
|
-
height:
|
|
24
|
-
min-width:
|
|
23
|
+
.chip.medium {
|
|
24
|
+
height: 2.5rem;
|
|
25
|
+
min-width: 2.5rem;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.chip.large {
|
|
@@ -29,15 +30,13 @@
|
|
|
29
30
|
min-width: 3rem;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
.chip.border {
|
|
33
|
-
border-color: var(--secondary);
|
|
34
|
-
color: var(--secondary);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
33
|
.chip.fill {
|
|
38
34
|
background-color: var(--secondary-container) !important;
|
|
39
|
-
color:
|
|
40
|
-
|
|
35
|
+
border-color: transparent;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.chip.border {
|
|
39
|
+
border-color: var(--outline);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
.chip.round.small {
|
|
@@ -18,16 +18,13 @@ dialog {
|
|
|
18
18
|
overflow-y: auto;
|
|
19
19
|
transition: var(--speed3) all, 0s background-color;
|
|
20
20
|
transform: translate(-50%, -4rem);
|
|
21
|
+
border-radius: 1rem;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
dialog::backdrop {
|
|
24
25
|
display: none;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
dialog:not(.left, .right, .top, .bottom) {
|
|
28
|
-
border-radius: 0.75rem;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
28
|
dialog.small {
|
|
32
29
|
width: 25%;
|
|
33
30
|
height: 25%;
|
|
@@ -64,6 +61,7 @@ dialog.top {
|
|
|
64
61
|
min-width: auto;
|
|
65
62
|
max-height: 100%;
|
|
66
63
|
transform: translateY(-100%);
|
|
64
|
+
border-radius: 0 0 1rem 1rem;
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
dialog.left {
|
|
@@ -76,6 +74,7 @@ dialog.left {
|
|
|
76
74
|
height: 100%;
|
|
77
75
|
max-height: 100%;
|
|
78
76
|
transform: translateX(-100%);
|
|
77
|
+
border-radius: 0 1rem 1rem 0;
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
dialog.right {
|
|
@@ -88,6 +87,7 @@ dialog.right {
|
|
|
88
87
|
height: 100%;
|
|
89
88
|
max-height: 100%;
|
|
90
89
|
transform: translateX(100%);
|
|
90
|
+
border-radius: 1rem 0 0 1rem;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
dialog.bottom {
|
|
@@ -101,6 +101,7 @@ dialog.bottom {
|
|
|
101
101
|
min-width: auto;
|
|
102
102
|
max-height: 100%;
|
|
103
103
|
transform: translateY(100%);
|
|
104
|
+
border-radius: 1rem 1rem 0 0;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
dialog.max {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/* icon */
|
|
83
|
-
.field > :is(i, img, svg, .
|
|
83
|
+
.field > :is(i, img, svg, progress, a:not(.helper, .error)) {
|
|
84
84
|
position: absolute;
|
|
85
85
|
top: 50%;
|
|
86
86
|
left: auto;
|
|
@@ -88,19 +88,11 @@
|
|
|
88
88
|
transform: translateY(-50%);
|
|
89
89
|
cursor: pointer;
|
|
90
90
|
z-index: 0;
|
|
91
|
+
width: 1.5rem;
|
|
92
|
+
height: 1.5rem;
|
|
91
93
|
}
|
|
92
94
|
|
|
93
|
-
.field
|
|
94
|
-
left: auto;
|
|
95
|
-
right: 1rem;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.field > :is(i, img, svg, .loader):first-child {
|
|
99
|
-
left: 1rem;
|
|
100
|
-
right: auto;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.field:is(.border, .fill, .round) > :is(i, img, svg, .loader):first-child {
|
|
95
|
+
.field > :is(i, img, svg, progress, a:not(.helper, .error)):first-child {
|
|
104
96
|
left: 1rem;
|
|
105
97
|
right: auto;
|
|
106
98
|
}
|
|
@@ -109,8 +101,16 @@
|
|
|
109
101
|
color: var(--error);
|
|
110
102
|
}
|
|
111
103
|
|
|
112
|
-
.field > .
|
|
104
|
+
.field > progress.circle {
|
|
105
|
+
top: calc(50% - 0.75rem);
|
|
113
106
|
border-width: 0.1875rem;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.field > a:not(.helper, .error) {
|
|
110
|
+
z-index: 10;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.field > a > :is(i, img, svg, progress, a:not(.helper, .error)) {
|
|
114
114
|
width: 1.5rem;
|
|
115
115
|
height: 1.5rem;
|
|
116
116
|
}
|
|
@@ -307,22 +307,25 @@ input[type=search]::-webkit-search-results-decoration {
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
.field.small > textarea,
|
|
310
|
+
.field.small:not(.label) > textarea:focus,
|
|
310
311
|
.field.small.border:not(.fill) > textarea {
|
|
311
312
|
padding-top: 0.625rem;
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
.field > textarea,
|
|
315
|
-
.field > textarea:focus,
|
|
316
|
+
.field:not(.label) > textarea:focus,
|
|
316
317
|
.field.border:not(.fill) > textarea {
|
|
317
318
|
padding-top: 0.875rem;
|
|
318
319
|
}
|
|
319
320
|
|
|
320
321
|
.field.large > textarea,
|
|
322
|
+
.field.large:not(.label) > textarea:focus,
|
|
321
323
|
.field.large.border:not(.fill) > textarea {
|
|
322
324
|
padding-top: 1.125rem;
|
|
323
325
|
}
|
|
324
326
|
|
|
325
327
|
.field.extra > textarea,
|
|
328
|
+
.field.extra:not(.label) > textarea:focus,
|
|
326
329
|
.field.extra.border:not(.fill) > textarea {
|
|
327
330
|
padding-top: 1.375rem;
|
|
328
331
|
}
|
|
@@ -352,12 +355,12 @@ input[type=search]::-webkit-search-results-decoration {
|
|
|
352
355
|
line-height: 5rem;
|
|
353
356
|
}
|
|
354
357
|
|
|
355
|
-
.field.label.border.prefix:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label) {
|
|
358
|
+
.field.label.border.prefix:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
|
|
356
359
|
left: 1rem;
|
|
357
360
|
}
|
|
358
361
|
|
|
359
362
|
.field.label.round > label,
|
|
360
|
-
.field.label.border.prefix.round:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label) {
|
|
363
|
+
.field.label.border.prefix.round:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
|
|
361
364
|
left: 1.5rem;
|
|
362
365
|
}
|
|
363
366
|
|
|
@@ -365,12 +368,12 @@ input[type=search]::-webkit-search-results-decoration {
|
|
|
365
368
|
left: 3rem;
|
|
366
369
|
}
|
|
367
370
|
|
|
368
|
-
.field.label > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label) {
|
|
371
|
+
.field.label > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
|
|
369
372
|
line-height: 2.5rem;
|
|
370
373
|
font-size: 0.75rem;
|
|
371
374
|
}
|
|
372
375
|
|
|
373
|
-
.field.label.border:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label) {
|
|
376
|
+
.field.label.border:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
|
|
374
377
|
line-height: 1rem;
|
|
375
378
|
}
|
|
376
379
|
|
|
@@ -379,7 +382,6 @@ input[type=search]::-webkit-search-results-decoration {
|
|
|
379
382
|
display: block;
|
|
380
383
|
margin-top: 0.5rem;
|
|
381
384
|
border-top: 0.0625rem solid var(--outline);
|
|
382
|
-
min-width: 1rem;
|
|
383
385
|
height: 1rem;
|
|
384
386
|
transition: none;
|
|
385
387
|
flex: auto;
|
|
@@ -390,11 +392,13 @@ input[type=search]::-webkit-search-results-decoration {
|
|
|
390
392
|
border-top: 0.125rem solid var(--primary);
|
|
391
393
|
}
|
|
392
394
|
|
|
393
|
-
.field.label.border:not(.fill) > :is(input,
|
|
395
|
+
.field.label.border:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
|
|
396
|
+
.field.label.border:not(.fill) > select {
|
|
394
397
|
clip-path: polygon(-1% -1%, 0.75rem -1%, 0.75rem 0.5rem, calc(100% - 5rem) 0.5rem, calc(100% - 5rem) -1%, 101% -1%, 101% 101%, -1% 101%);
|
|
395
398
|
}
|
|
396
399
|
|
|
397
|
-
.field.label.border.round:not(.fill) > :is(input,
|
|
400
|
+
.field.label.border.round:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
|
|
401
|
+
.field.label.border.round:not(.fill) > select {
|
|
398
402
|
clip-path: polygon(-1% -1%, 1.25rem -1%, 1.25rem 0.5rem, calc(100% - 5rem) 0.5rem, calc(100% - 5rem) -1%, 101% -1%, 101% 101%, -1% 101%);
|
|
399
403
|
}
|
|
400
404
|
|
|
@@ -40,18 +40,18 @@ svg {
|
|
|
40
40
|
margin: 0 auto;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
:is(button, .button, .chip) > .responsive {
|
|
44
|
-
width: 2.5rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
43
|
:is(button, .button, .chip):not(.transparent) > .responsive {
|
|
48
44
|
border: 0.25rem solid transparent;
|
|
49
45
|
}
|
|
50
46
|
|
|
51
|
-
:is(button, .button, .chip)
|
|
47
|
+
:is(button.small, .button.small, .chip) > .responsive {
|
|
52
48
|
width: 2rem;
|
|
53
49
|
}
|
|
54
50
|
|
|
51
|
+
:is(button, .button, .chip.medium) > .responsive {
|
|
52
|
+
width: 2.5rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
55
|
:is(button, .button, .chip).large > .responsive {
|
|
56
56
|
width: 3rem;
|
|
57
57
|
}
|