@plexui/styles 0.1.21 → 0.1.23
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.
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
display: inline-flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
gap: calc(var(--spacing) * 1);
|
|
7
|
+
max-width: 100%;
|
|
7
8
|
height: var(--badge-size);
|
|
8
9
|
padding: 0 var(--badge-gutter);
|
|
9
10
|
border-radius: var(--badge-radius);
|
|
@@ -185,6 +186,17 @@
|
|
|
185
186
|
--badge-indicator-size: var(--badge-indicator-size-lg);
|
|
186
187
|
}
|
|
187
188
|
|
|
189
|
+
.Badge:where([data-size="xl"]) {
|
|
190
|
+
--badge-size: var(--badge-size-xl);
|
|
191
|
+
--badge-gutter: var(--badge-gutter-xl);
|
|
192
|
+
--badge-font-size: var(--badge-font-size-xl);
|
|
193
|
+
--badge-font-weight: var(--badge-font-weight-xl);
|
|
194
|
+
--badge-tracking: var(--badge-tracking-xl);
|
|
195
|
+
--badge-radius: var(--badge-radius-xl);
|
|
196
|
+
--badge-icon-font-size: var(--badge-icon-font-size-xl);
|
|
197
|
+
--badge-indicator-size: var(--badge-indicator-size-xl);
|
|
198
|
+
}
|
|
199
|
+
|
|
188
200
|
/* =============================================
|
|
189
201
|
Pill
|
|
190
202
|
============================================= */
|
|
@@ -192,5 +204,54 @@
|
|
|
192
204
|
--badge-radius: var(--radius-full);
|
|
193
205
|
|
|
194
206
|
padding: 0 calc(var(--badge-gutter) * var(--control-gutter-pill-scaling));
|
|
207
|
+
}/* =============================================
|
|
208
|
+
Remove
|
|
209
|
+
============================================= */.Badge:has(> .Remove) > span:not(.Remove) {
|
|
210
|
+
min-width: 0;
|
|
211
|
+
overflow: hidden;
|
|
212
|
+
text-overflow: ellipsis;
|
|
213
|
+
}.Remove {
|
|
214
|
+
position: relative;
|
|
215
|
+
display: flex;
|
|
216
|
+
flex: none;
|
|
217
|
+
align-items: center;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
width: 20px;
|
|
220
|
+
height: 20px;
|
|
221
|
+
margin-inline: 2px -6px;
|
|
222
|
+
border-radius: 50%;
|
|
223
|
+
opacity: 0.6;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.Remove svg {
|
|
227
|
+
font-size: 14px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* The press reaches past the mark, more where a finger does the pressing */
|
|
231
|
+
.Remove:where(button)::after {
|
|
232
|
+
content: "";
|
|
233
|
+
position: absolute;
|
|
234
|
+
inset: -2px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@media (hover: none) {
|
|
238
|
+
.Remove:where(button)::after {
|
|
239
|
+
inset: -16px -8px;
|
|
240
|
+
}
|
|
195
241
|
}
|
|
242
|
+
@media (hover: hover) and (pointer: fine) {.Remove:where(button):hover {
|
|
243
|
+
background: color-mix(in srgb, var(--color-text) 8%, transparent);
|
|
244
|
+
opacity: 1;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.Remove:where(button):focus-visible {
|
|
249
|
+
outline: 2px solid var(--color-ring);
|
|
250
|
+
outline-offset: 2px;
|
|
251
|
+
opacity: 1;
|
|
252
|
+
}
|
|
253
|
+
@media (hover: hover) and (pointer: fine) {.Badge[data-variant="solid"] .Remove:where(button):hover {
|
|
254
|
+
background: color-mix(in srgb, currentColor 20%, transparent);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
196
257
|
}
|
|
@@ -199,23 +199,61 @@
|
|
|
199
199
|
justify-self: end;
|
|
200
200
|
min-width: 0;
|
|
201
201
|
max-width: 100%;
|
|
202
|
-
}/* A control that needs the width takes its own line */.Field:where([data-row][data-orientation="vertical"]) {
|
|
202
|
+
}/* A control that needs the width takes its own line, the label goes quiet above it */.Field:where([data-row][data-orientation="vertical"]) {
|
|
203
|
+
--field-label-font-size: var(--field-row-above-font-size);
|
|
204
|
+
--field-label-line-height: var(--field-row-above-line-height);
|
|
205
|
+
--field-label-font-weight: var(--field-row-above-font-weight);
|
|
206
|
+
|
|
203
207
|
grid-template-columns: minmax(0, 1fr);
|
|
208
|
+
row-gap: var(--field-row-above-gap);
|
|
209
|
+
padding-block: var(--field-row-above-padding-block);
|
|
210
|
+
}.Field:where([data-row][data-orientation="vertical"]) .Label {
|
|
211
|
+
color: var(--field-row-above-color);
|
|
204
212
|
}.Field:where([data-row][data-orientation="vertical"]) .Control {
|
|
205
213
|
grid-column: 1;
|
|
206
214
|
grid-row: auto;
|
|
207
215
|
justify-self: stretch;
|
|
208
216
|
}/* A control that fills the row, such as a list of tags: it starts after the label
|
|
209
|
-
and ends at the row's edge, on one line for all the rows of a group.
|
|
217
|
+
and ends at the row's edge, on one line for all the rows of a group. A list can
|
|
218
|
+
wrap: the label and the action stay on its first line. */.Field:where([data-row][data-fill]:not([data-orientation="vertical"])) {
|
|
219
|
+
--field-row-gap: 16px;
|
|
220
|
+
|
|
210
221
|
grid-template-columns: minmax(var(--field-row-label-width), auto) minmax(0, 1fr);
|
|
222
|
+
align-items: start;
|
|
223
|
+
}.Field:where([data-row][data-fill]:not([data-orientation="vertical"])) .LabelGroup > :is(.Label, .LabelRow) {
|
|
224
|
+
padding-block: var(--field-row-list-label-offset);
|
|
211
225
|
}.Field:where([data-row][data-fill]) .Control {
|
|
212
226
|
justify-self: stretch;
|
|
213
|
-
}
|
|
214
|
-
|
|
227
|
+
}.Field:where([data-row][data-fill]:not([data-orientation="vertical"])):has(> .Action) {
|
|
228
|
+
grid-template-columns: minmax(var(--field-row-label-width), auto) minmax(0, 1fr) auto;
|
|
229
|
+
row-gap: var(--field-row-list-row-gap);
|
|
230
|
+
padding-block: var(--field-row-list-padding-block);
|
|
231
|
+
}.Field:where([data-row][data-fill]:has(> .Action)) .Control:is(:empty, :has(> :empty:only-child)) {
|
|
232
|
+
display: none;
|
|
233
|
+
}.Action {
|
|
234
|
+
--control-size-md: var(--field-row-action-size);
|
|
235
|
+
--control-font-size-md: var(--field-row-action-font-size);
|
|
236
|
+
--button-font-weight: var(--field-row-action-font-weight);
|
|
237
|
+
|
|
238
|
+
display: flex;
|
|
239
|
+
grid-column: 3;
|
|
240
|
+
grid-row: 1;
|
|
241
|
+
}/* A framed field in a row: its width cannot follow what is typed, so it has one,
|
|
242
|
+
wider for words than for a number. A ghost has the row for its frame, a Select
|
|
243
|
+
follows its value. */.Field:where([data-row]:not([data-orientation="vertical"])) .Control:has(
|
|
215
244
|
[data-variant]:not([data-variant="ghost"]) > input,
|
|
216
245
|
[data-variant]:not([data-variant="ghost"]) > textarea
|
|
217
246
|
) {
|
|
218
247
|
width: var(--field-row-control-width);
|
|
248
|
+
}.Field:where([data-row]:not([data-orientation="vertical"])) .Control:has(
|
|
249
|
+
[data-variant]:not([data-variant="ghost"]) > input:not([inputmode="decimal"], [inputmode="numeric"], [type="number"]),
|
|
250
|
+
[data-variant]:not([data-variant="ghost"]) > textarea
|
|
251
|
+
) {
|
|
252
|
+
width: var(--field-row-text-width);
|
|
253
|
+
}/* An error in a row is the line of words under it: the field keeps its usual frame */.Field:where([data-row]) .Control {
|
|
254
|
+
--input-border-color-invalid: var(--input-outline-border-color);
|
|
255
|
+
}.Field:where([data-row]) .Control:focus-within {
|
|
256
|
+
--input-border-color-invalid: var(--input-outline-border-color-focus);
|
|
219
257
|
}/* A ghost field in a row: the row is its frame. Beside the label the value takes
|
|
220
258
|
the rest of the line and ends at the row's edge, under it the value starts
|
|
221
259
|
where the label does. An error is the line of words under both, not a frame. */.Field:where([data-row]:not([data-orientation="vertical"])):has(
|
|
@@ -228,6 +266,7 @@
|
|
|
228
266
|
}.Field:where([data-row]) .Control > [data-variant="ghost"]:is(:has(> input), :has(> textarea)) {
|
|
229
267
|
--input-size: var(--field-row-label-line-height);
|
|
230
268
|
--input-gutter: 0px;
|
|
269
|
+
--input-adornment-offset: 0px;
|
|
231
270
|
--textarea-gutter-x: 0px;
|
|
232
271
|
--textarea-gutter-y: 0px;
|
|
233
272
|
|
|
@@ -235,5 +274,66 @@
|
|
|
235
274
|
box-shadow: none;
|
|
236
275
|
}.Field:where([data-row]:not([data-orientation="vertical"])) .Control > [data-variant="ghost"] > input {
|
|
237
276
|
text-align: end;
|
|
277
|
+
}/* On a phone a list takes the width of its own line under the label and the action.
|
|
278
|
+
The row is the frame of every field, as on iOS: the framed fields of the web read
|
|
279
|
+
as the ghost above, with nothing for the author to change. */@media (max-width: 767px) {
|
|
280
|
+
.Field:where([data-row][data-fill]:not([data-orientation="vertical"])):has(> .Action) {
|
|
281
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.Field:where([data-row][data-fill]:has(> .Action)) .Control {
|
|
285
|
+
grid-column: 1 / -1;
|
|
286
|
+
grid-row: 2;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.Action {
|
|
290
|
+
grid-column: 2;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.Field:where([data-row]:not([data-orientation="vertical"])) {
|
|
294
|
+
--field-row-control-width: auto;
|
|
295
|
+
--field-row-text-width: auto;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.Field:where([data-row]:not([data-orientation="vertical"])):has(
|
|
299
|
+
.Control > [data-variant="outline"] > input,
|
|
300
|
+
.Control > [data-variant="outline"] > textarea
|
|
301
|
+
) {
|
|
302
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.Field:where([data-row]:not([data-orientation="vertical"])) .Control:has(
|
|
306
|
+
> [data-variant="outline"] > input,
|
|
307
|
+
> [data-variant="outline"] > textarea
|
|
308
|
+
) {
|
|
309
|
+
justify-self: stretch;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.Field:where([data-row]:not([data-orientation="vertical"])) .Control > [data-variant="outline"]:is(:has(> input), :has(> textarea)),
|
|
313
|
+
.Field:where([data-row]:not([data-orientation="vertical"])) .Control [data-variant="outline"][role="button"] {
|
|
314
|
+
--input-outline-border-color: transparent;
|
|
315
|
+
--input-outline-border-color-hover: transparent;
|
|
316
|
+
--input-outline-border-color-focus: transparent;
|
|
317
|
+
--input-border-color-invalid: transparent;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.Field:where([data-row]:not([data-orientation="vertical"])) .Control > [data-variant="outline"]:is(:has(> input), :has(> textarea)) {
|
|
321
|
+
--input-size: var(--field-row-label-line-height);
|
|
322
|
+
--input-gutter: 0px;
|
|
323
|
+
--input-adornment-offset: 0px;
|
|
324
|
+
--textarea-gutter-x: 0px;
|
|
325
|
+
--textarea-gutter-y: 0px;
|
|
326
|
+
|
|
327
|
+
border-radius: 0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.Field:where([data-row]:not([data-orientation="vertical"])) .Control > [data-variant="outline"] > input {
|
|
331
|
+
text-align: end;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* A Select or a date: its value ends at the row's edge */
|
|
335
|
+
.Field:where([data-row]:not([data-orientation="vertical"])) .Control [data-variant="outline"][role="button"] {
|
|
336
|
+
padding-inline: 0;
|
|
337
|
+
}
|
|
238
338
|
}
|
|
239
339
|
}
|
package/dist/es/styles/touch.css
CHANGED
|
@@ -83,6 +83,18 @@
|
|
|
83
83
|
--field-row-label-font-weight: var(--font-weight-normal);
|
|
84
84
|
--field-row-description-font-size: 15px;
|
|
85
85
|
--field-row-description-line-height: 20px;
|
|
86
|
+
--field-row-above-font-size: 15px;
|
|
87
|
+
--field-row-above-line-height: 20px;
|
|
88
|
+
--field-row-above-font-weight: var(--font-weight-normal);
|
|
89
|
+
--field-row-above-gap: 8px;
|
|
90
|
+
--field-row-above-padding-block: 12px;
|
|
91
|
+
--field-row-list-padding-block: 12px;
|
|
92
|
+
--field-row-list-row-gap: 6px;
|
|
93
|
+
--field-row-action-size: 34px;
|
|
94
|
+
--field-row-action-font-size: 15px;
|
|
95
|
+
--field-row-action-font-weight: var(--font-weight-normal);
|
|
96
|
+
|
|
97
|
+
--badge-size-xl: 36px;
|
|
86
98
|
|
|
87
99
|
--field-group-radius: 26px;
|
|
88
100
|
--field-group-border-width: 0;
|
|
@@ -110,13 +122,17 @@
|
|
|
110
122
|
--segmented-control-font-size: 15px;
|
|
111
123
|
}
|
|
112
124
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
125
|
+
/* In the kit's layer: outside it these beat every kit rule, and the bare field
|
|
126
|
+
of a form row would keep a gutter its label does not have. */
|
|
127
|
+
@layer components {
|
|
128
|
+
html [data-slot="input"] {
|
|
129
|
+
--input-font-size: 17px;
|
|
130
|
+
--input-gutter: 14px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
html [data-slot="input"][data-has-start-adornment] {
|
|
134
|
+
--input-gutter: 11px;
|
|
135
|
+
}
|
|
120
136
|
}
|
|
121
137
|
|
|
122
138
|
html [role="menu"] {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
--badge-gutter-sm: calc(var(--control-gutter-2xs) - 1px);
|
|
39
39
|
--badge-gutter-md: var(--control-gutter-2xs);
|
|
40
40
|
--badge-gutter-lg: var(--control-gutter-xs);
|
|
41
|
+
--badge-gutter-xl: var(--control-gutter-xs);
|
|
41
42
|
--badge-size-2xs: 1rem;
|
|
42
43
|
/* 16px */
|
|
43
44
|
--badge-size-xs: 1.125rem;
|
|
@@ -45,31 +46,38 @@
|
|
|
45
46
|
--badge-size-sm: calc(var(--control-size-3xs) - 2px);
|
|
46
47
|
--badge-size-md: var(--control-size-3xs);
|
|
47
48
|
--badge-size-lg: var(--control-size-2xs);
|
|
49
|
+
--badge-size-xl: 2rem;
|
|
50
|
+
/* 32px */
|
|
48
51
|
--badge-radius-2xs: var(--radius-2xs);
|
|
49
52
|
--badge-radius-xs: var(--radius-2xs);
|
|
50
53
|
--badge-radius-sm: var(--radius-xs);
|
|
51
54
|
--badge-radius-md: var(--radius-xs);
|
|
52
55
|
--badge-radius-lg: var(--radius-sm);
|
|
56
|
+
--badge-radius-xl: var(--radius-md);
|
|
53
57
|
--badge-font-size-2xs: var(--font-text-xs-size);
|
|
54
58
|
--badge-font-size-xs: var(--font-text-xs-size);
|
|
55
59
|
--badge-font-size-sm: var(--font-text-xs-size);
|
|
56
60
|
--badge-font-size-md: var(--font-text-sm-size);
|
|
57
61
|
--badge-font-size-lg: var(--font-text-sm-size);
|
|
62
|
+
--badge-font-size-xl: var(--font-text-sm-size);
|
|
58
63
|
--badge-tracking-2xs: var(--tracking-wide);
|
|
59
64
|
--badge-tracking-xs: var(--tracking-wide);
|
|
60
65
|
--badge-tracking-sm: var(--tracking-wide);
|
|
61
66
|
--badge-tracking-md: var(--tracking-normal);
|
|
62
67
|
--badge-tracking-lg: var(--tracking-normal);
|
|
68
|
+
--badge-tracking-xl: var(--tracking-normal);
|
|
63
69
|
--badge-font-weight-2xs: var(--font-weight-semibold);
|
|
64
70
|
--badge-font-weight-xs: var(--font-weight-semibold);
|
|
65
71
|
--badge-font-weight-sm: var(--font-weight-semibold);
|
|
66
72
|
--badge-font-weight-md: var(--font-weight-semibold);
|
|
67
73
|
--badge-font-weight-lg: var(--font-weight-semibold);
|
|
74
|
+
--badge-font-weight-xl: var(--font-weight-semibold);
|
|
68
75
|
--badge-icon-font-size-2xs: var(--font-text-xs-size);
|
|
69
76
|
--badge-icon-font-size-xs: var(--font-text-xs-size);
|
|
70
77
|
--badge-icon-font-size-sm: var(--font-text-xs-size);
|
|
71
78
|
--badge-icon-font-size-md: var(--font-text-md-size);
|
|
72
79
|
--badge-icon-font-size-lg: var(--font-text-md-size);
|
|
80
|
+
--badge-icon-font-size-xl: var(--font-text-md-size);
|
|
73
81
|
--badge-indicator-size-2xs: 0.625rem;
|
|
74
82
|
/* 10px */
|
|
75
83
|
--badge-indicator-size-xs: 0.625rem;
|
|
@@ -77,6 +85,7 @@
|
|
|
77
85
|
--badge-indicator-size-sm: var(--font-text-xs-size);
|
|
78
86
|
--badge-indicator-size-md: var(--font-text-xs-size);
|
|
79
87
|
--badge-indicator-size-lg: var(--font-text-sm-size);
|
|
88
|
+
--badge-indicator-size-xl: var(--font-text-sm-size);
|
|
80
89
|
|
|
81
90
|
/* =============================================
|
|
82
91
|
Button
|
|
@@ -237,7 +246,8 @@
|
|
|
237
246
|
--field-row-padding-inline: 16px;
|
|
238
247
|
--field-row-gap: 24px;
|
|
239
248
|
--field-row-control-width: 160px;
|
|
240
|
-
--field-row-
|
|
249
|
+
--field-row-text-width: 240px;
|
|
250
|
+
--field-row-label-width: 80px;
|
|
241
251
|
--field-row-row-gap: 2px;
|
|
242
252
|
--field-row-text-display: flex;
|
|
243
253
|
--field-row-label-font-size: var(--font-text-sm-size);
|
|
@@ -245,6 +255,21 @@
|
|
|
245
255
|
--field-row-label-font-weight: var(--font-weight-medium);
|
|
246
256
|
--field-row-description-font-size: var(--font-text-sm-size);
|
|
247
257
|
--field-row-description-line-height: var(--font-text-sm-line-height);
|
|
258
|
+
--field-row-above-font-size: 0.8125rem;
|
|
259
|
+
/* 13px */
|
|
260
|
+
--field-row-above-line-height: 1.125rem;
|
|
261
|
+
/* 18px */
|
|
262
|
+
--field-row-above-font-weight: var(--font-weight-medium);
|
|
263
|
+
--field-row-above-color: var(--color-text-tertiary);
|
|
264
|
+
--field-row-above-gap: 4px;
|
|
265
|
+
--field-row-above-padding-block: 10px;
|
|
266
|
+
--field-row-list-padding-block: 10px;
|
|
267
|
+
--field-row-list-row-gap: 8px;
|
|
268
|
+
--field-row-list-label-offset: 6px;
|
|
269
|
+
--field-row-action-size: 2rem;
|
|
270
|
+
/* 32px */
|
|
271
|
+
--field-row-action-font-size: var(--font-text-sm-size);
|
|
272
|
+
--field-row-action-font-weight: var(--font-weight-medium);
|
|
248
273
|
|
|
249
274
|
/* =============================================
|
|
250
275
|
FieldGroup
|