@plexui/styles 0.1.45 → 0.2.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/dist/es/components/Accordion/Accordion.module.css +54 -1
- package/dist/es/components/Alert/Alert.module.css +75 -37
- package/dist/es/components/Button/Button.module.css +36 -28
- package/dist/es/components/ButtonGroup/ButtonGroup.module.css +15 -3
- package/dist/es/components/ColorPicker/ColorPicker.module.css +42 -70
- package/dist/es/components/ContextMenu/ContextMenu.module.css +1 -1
- package/dist/es/components/DatePicker/Calendar.module.css +16 -14
- package/dist/es/components/DateRangePicker/Calendar.module.css +16 -68
- package/dist/es/components/Dialog/Dialog.module.css +98 -59
- package/dist/es/components/Field/Field.module.css +56 -22
- package/dist/es/components/Input/Input.module.css +100 -18
- package/dist/es/components/Menu/Menu.module.css +30 -34
- package/dist/es/components/Page/Page.module.css +38 -0
- package/dist/es/components/Popover/Popover.module.css +10 -11
- package/dist/es/components/ProgressSteps/ProgressSteps.module.css +17 -0
- package/dist/es/components/RadioGroup/RadioGroup.module.css +7 -3
- package/dist/es/components/Select/Select.module.css +300 -38
- package/dist/es/components/SelectControl/SelectControl.module.css +34 -10
- package/dist/es/components/Sidebar/Sidebar.module.css +4 -2
- package/dist/es/components/Slider/Slider.module.css +86 -4
- package/dist/es/components/Sortable/Sortable.module.css +3 -2
- package/dist/es/components/StatsCard/StatsCard.module.css +269 -0
- package/dist/es/components/Stepper/Stepper.module.css +7 -4
- package/dist/es/components/SwipeActions/SwipeActions.module.css +32 -17
- package/dist/es/components/Switch/Switch.module.css +6 -5
- package/dist/es/components/TabBar/TabBar.module.css +128 -12
- package/dist/es/components/Tabs/Tabs.module.css +238 -43
- package/dist/es/components/Toast/Toast.module.css +4 -3
- package/dist/es/components/Toolbar/Toolbar.module.css +92 -58
- package/dist/es/styles/mobile-materials.css +65 -24
- package/dist/es/styles/touch.css +321 -121
- package/dist/es/styles/variables-components.css +236 -124
- package/package.json +1 -1
- package/dist/es/components/StatCard/StatCard.module.css +0 -234
|
@@ -109,6 +109,20 @@
|
|
|
109
109
|
.Thumb[data-disabled] {
|
|
110
110
|
cursor: default;
|
|
111
111
|
pointer-events: none;
|
|
112
|
+
}/* Disabled, the fill takes the track's color and both lighten to 60% of the track, as the accent leaves a
|
|
113
|
+
disabled macOS slider (macOS 27 kit, Slider, State=Disabled 8536:112: the track and its filled part both
|
|
114
|
+
the label color at 6%, where Idle has the track at 10% and the filled part in the accent; the filled part
|
|
115
|
+
lies over the track, so it stays a shade darker; the knob as Idle). The knob's ring is the fill's color,
|
|
116
|
+
so it lightens with it. On a phone the iOS kit's half opacity stands instead (below). */.Slider[data-disabled] {
|
|
117
|
+
--slider-disabled-color: color-mix(in srgb, var(--slider-track-color) 60%, transparent);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.Slider[data-disabled] :is(.Track, .Range) {
|
|
121
|
+
background: var(--slider-disabled-color);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.Slider[data-disabled] .Thumb {
|
|
125
|
+
box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-disabled-color));
|
|
112
126
|
}.SliderLabel {
|
|
113
127
|
display: flex;
|
|
114
128
|
align-items: center;
|
|
@@ -254,13 +268,35 @@
|
|
|
254
268
|
padding-right: 0;
|
|
255
269
|
}
|
|
256
270
|
|
|
271
|
+
/* An iOS knob stands on the value, where the fill ends, and stops half its width from each end of the track:
|
|
272
|
+
within that half width of an end the knob stands and the fill runs on under it (iPhone, Settings, Display
|
|
273
|
+
& Brightness, the owner's screenshots of 10.11: the fill ends on the lens's centre at 9% and 91%; with the
|
|
274
|
+
lens against an end it ends 8pt from the start, or 8pt short of the end). Radix eases the knob over the
|
|
275
|
+
whole track instead, its centre at p·W + h·(1 − 2p), so the fill ends on the centre only at the middle; each
|
|
276
|
+
knob (its value p from 0 to 1 in --slider-thumb-percent) is moved from there to the iOS place, at once, as
|
|
277
|
+
Radix moves it. The container gives the track's width (cqw); the marks read --slider-thumb-travel to stand
|
|
278
|
+
under the knob. A vertical slider keeps Radix's travel. */
|
|
279
|
+
.SliderWrap[data-orientation="horizontal"] .SliderContainer {
|
|
280
|
+
container-type: inline-size;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.Slider[data-orientation="horizontal"] {
|
|
284
|
+
--slider-thumb-travel: clamped;
|
|
285
|
+
}
|
|
286
|
+
|
|
257
287
|
/* The knob being dragged turns into the lens of glass (mobile-materials.css), on its centre (kit iOS 27
|
|
258
288
|
Sliders 7:53847, State=Pressed); without touch.css it stays as it is. The slider is pressed from the first
|
|
259
289
|
touch, wherever on the track it lands; of a range, the nearest knob, which the press focuses. A vertical
|
|
260
290
|
slider is a web layout with no iOS knob, so it keeps its own. */
|
|
261
291
|
.Slider[data-orientation="horizontal"] .Thumb {
|
|
292
|
+
--slider-thumb-half: calc(var(--slider-thumb-width, 14px) / 2);
|
|
293
|
+
--slider-thumb-at: calc(var(--slider-thumb-percent, 0.5) * 100cqw);
|
|
294
|
+
|
|
295
|
+
inset-inline-start: calc(
|
|
296
|
+
clamp(var(--slider-thumb-half), var(--slider-thumb-at), 100cqw - var(--slider-thumb-half)) -
|
|
297
|
+
var(--slider-thumb-at) - var(--slider-thumb-half) * (1 - 2 * var(--slider-thumb-percent, 0.5))
|
|
298
|
+
);
|
|
262
299
|
transition:
|
|
263
|
-
left var(--slider-duration) var(--cubic-move),
|
|
264
300
|
scale 200ms var(--cubic-enter),
|
|
265
301
|
background-color 200ms var(--cubic-enter),
|
|
266
302
|
box-shadow 200ms var(--cubic-enter);
|
|
@@ -273,10 +309,22 @@
|
|
|
273
309
|
box-shadow: var(--mobile-knob-lens-shadow, var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color)));
|
|
274
310
|
}
|
|
275
311
|
|
|
276
|
-
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled). */
|
|
312
|
+
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled), in their own colors. */
|
|
277
313
|
.Slider[data-disabled] {
|
|
278
314
|
opacity: 0.5;
|
|
279
315
|
}
|
|
316
|
+
|
|
317
|
+
.Slider[data-disabled] .Track {
|
|
318
|
+
background: var(--slider-track-color);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.Slider[data-disabled] .Range {
|
|
322
|
+
background: var(--slider-range-color);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.Slider[data-disabled] .Thumb {
|
|
326
|
+
box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color));
|
|
327
|
+
}
|
|
280
328
|
}
|
|
281
329
|
:where([data-plex-layout="phone"]) .SliderValue {
|
|
282
330
|
height: auto;
|
|
@@ -306,13 +354,35 @@
|
|
|
306
354
|
padding-right: 0;
|
|
307
355
|
}
|
|
308
356
|
|
|
357
|
+
/* An iOS knob stands on the value, where the fill ends, and stops half its width from each end of the track:
|
|
358
|
+
within that half width of an end the knob stands and the fill runs on under it (iPhone, Settings, Display
|
|
359
|
+
& Brightness, the owner's screenshots of 10.11: the fill ends on the lens's centre at 9% and 91%; with the
|
|
360
|
+
lens against an end it ends 8pt from the start, or 8pt short of the end). Radix eases the knob over the
|
|
361
|
+
whole track instead, its centre at p·W + h·(1 − 2p), so the fill ends on the centre only at the middle; each
|
|
362
|
+
knob (its value p from 0 to 1 in --slider-thumb-percent) is moved from there to the iOS place, at once, as
|
|
363
|
+
Radix moves it. The container gives the track's width (cqw); the marks read --slider-thumb-travel to stand
|
|
364
|
+
under the knob. A vertical slider keeps Radix's travel. */
|
|
365
|
+
:where([data-plex-layout="phone"]) .SliderWrap[data-orientation="horizontal"] .SliderContainer {
|
|
366
|
+
container-type: inline-size;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
:where([data-plex-layout="phone"]) .Slider[data-orientation="horizontal"] {
|
|
370
|
+
--slider-thumb-travel: clamped;
|
|
371
|
+
}
|
|
372
|
+
|
|
309
373
|
/* The knob being dragged turns into the lens of glass (mobile-materials.css), on its centre (kit iOS 27
|
|
310
374
|
Sliders 7:53847, State=Pressed); without touch.css it stays as it is. The slider is pressed from the first
|
|
311
375
|
touch, wherever on the track it lands; of a range, the nearest knob, which the press focuses. A vertical
|
|
312
376
|
slider is a web layout with no iOS knob, so it keeps its own. */
|
|
313
377
|
:where([data-plex-layout="phone"]) .Slider[data-orientation="horizontal"] .Thumb {
|
|
378
|
+
--slider-thumb-half: calc(var(--slider-thumb-width, 14px) / 2);
|
|
379
|
+
--slider-thumb-at: calc(var(--slider-thumb-percent, 0.5) * 100cqw);
|
|
380
|
+
|
|
381
|
+
inset-inline-start: calc(
|
|
382
|
+
clamp(var(--slider-thumb-half), var(--slider-thumb-at), 100cqw - var(--slider-thumb-half)) -
|
|
383
|
+
var(--slider-thumb-at) - var(--slider-thumb-half) * (1 - 2 * var(--slider-thumb-percent, 0.5))
|
|
384
|
+
);
|
|
314
385
|
transition:
|
|
315
|
-
left var(--slider-duration) var(--cubic-move),
|
|
316
386
|
scale 200ms var(--cubic-enter),
|
|
317
387
|
background-color 200ms var(--cubic-enter),
|
|
318
388
|
box-shadow 200ms var(--cubic-enter);
|
|
@@ -324,8 +394,20 @@
|
|
|
324
394
|
box-shadow: var(--mobile-knob-lens-shadow, var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color)));
|
|
325
395
|
}
|
|
326
396
|
|
|
327
|
-
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled). */
|
|
397
|
+
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled), in their own colors. */
|
|
328
398
|
:where([data-plex-layout="phone"]) .Slider[data-disabled] {
|
|
329
399
|
opacity: 0.5;
|
|
330
400
|
}
|
|
401
|
+
|
|
402
|
+
:where([data-plex-layout="phone"]) .Slider[data-disabled] .Track {
|
|
403
|
+
background: var(--slider-track-color);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
:where([data-plex-layout="phone"]) .Slider[data-disabled] .Range {
|
|
407
|
+
background: var(--slider-range-color);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
:where([data-plex-layout="phone"]) .Slider[data-disabled] .Thumb {
|
|
411
|
+
box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color));
|
|
412
|
+
}
|
|
331
413
|
}
|
|
@@ -99,9 +99,10 @@
|
|
|
99
99
|
display: var(--sortable-desktop-grip-display, block);
|
|
100
100
|
}.Handle > .PhoneGrip {
|
|
101
101
|
display: var(--sortable-phone-grip-display, none);
|
|
102
|
-
/* Hamburger ink occupies x3…21 of its 24-unit viewBox.
|
|
102
|
+
/* Hamburger ink occupies x3…21 and y5…19 of its 24-unit viewBox. It draws at its own proportions unless a height
|
|
103
|
+
is set; the phone draws it flatter, as iOS draws line.3.horizontal (the svg does not keep its aspect ratio). */
|
|
103
104
|
width: calc(var(--sortable-phone-grip-ink-width, 17px) * 24 / 18);
|
|
104
|
-
height: calc(var(--sortable-phone-grip-ink-width, 17px) *
|
|
105
|
+
height: calc(var(--sortable-phone-grip-ink-height, calc(var(--sortable-phone-grip-ink-width, 17px) * 14 / 18)) * 24 / 14);
|
|
105
106
|
}/* Important: a page's own rule for every button stands outside the layer of this file */.Handle {
|
|
106
107
|
cursor: grab !important;
|
|
107
108
|
}.Sortable[data-disabled] .Handle {
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
@layer components {.StatsCard {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
padding: var(--stats-card-padding);
|
|
8
|
+
border-radius: var(--stats-card-radius);
|
|
9
|
+
background: var(--stats-card-background);
|
|
10
|
+
box-shadow: 0 0 0 1px var(--stats-card-border-color) inset;
|
|
11
|
+
font-size: var(--stats-card-label-font-size);
|
|
12
|
+
line-height: var(--font-text-sm-line-height);
|
|
13
|
+
|
|
14
|
+
/* The accent is a rounded bar inside the card, before its content (Tremor's KPI cards draw a w-1 rounded bar so):
|
|
15
|
+
a border on the card's edge bent along its rounded corners */
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.StatsCard:where([data-size="sm"]) {
|
|
19
|
+
padding: var(--stats-card-sm-padding-block) var(--stats-card-sm-padding-inline);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.StatsCard:where([data-size="sm"]) .Label {
|
|
23
|
+
font-size: var(--stats-card-sm-label-font-size);
|
|
24
|
+
line-height: var(--font-text-xs-line-height);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.StatsCard:where([data-size="sm"]) .InfoIcon svg {
|
|
28
|
+
width: var(--stats-card-sm-info-icon-size);
|
|
29
|
+
height: var(--stats-card-sm-info-icon-size);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.StatsCard:where([data-size="sm"]) .Value {
|
|
33
|
+
font-size: var(--stats-card-sm-value-font-size);
|
|
34
|
+
line-height: var(--font-heading-md-line-height);
|
|
35
|
+
letter-spacing: var(--font-heading-md-tracking);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.StatsCard:where([data-size="sm"]) .Trend {
|
|
39
|
+
font-size: var(--stats-card-sm-trend-font-size);
|
|
40
|
+
line-height: var(--font-text-xs-line-height);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.StatsCard:where([data-size="sm"]) .ValueRow {
|
|
44
|
+
margin-block-start: calc(var(--spacing) * 1.5);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.StatsCard:where([data-size="sm"]) .TrendRow {
|
|
48
|
+
font-size: var(--stats-card-sm-description-font-size);
|
|
49
|
+
line-height: var(--font-text-xs-line-height);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.StatsCard:where([data-size="sm"]) .Description {
|
|
53
|
+
font-size: var(--stats-card-sm-description-font-size);
|
|
54
|
+
line-height: var(--font-text-xs-line-height);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.StatsCard:where([data-size="sm"]) .TrendLabel {
|
|
58
|
+
font-size: var(--stats-card-sm-description-font-size);
|
|
59
|
+
line-height: var(--font-text-xs-line-height);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.StatsCard:where([data-size="sm"]) .IconWrapper {
|
|
63
|
+
width: var(--stats-card-sm-icon-wrapper-size);
|
|
64
|
+
height: var(--stats-card-sm-icon-wrapper-size);
|
|
65
|
+
border-radius: var(--stats-card-sm-icon-wrapper-radius);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.StatsCard:where([data-size="sm"]) .IconWrapper svg {
|
|
69
|
+
width: var(--stats-card-sm-icon-size);
|
|
70
|
+
height: var(--stats-card-sm-icon-size);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.StatsCard:where([data-size="sm"]) .Progress {
|
|
74
|
+
margin-block-start: calc(var(--spacing) * 3);
|
|
75
|
+
}
|
|
76
|
+
/* The progress bar keeps its own fill: in the accent's colour too, it drew a second stripe of it (owner 11.11) */
|
|
77
|
+
.StatsCard:where([data-variant="accent"]) {
|
|
78
|
+
padding-inline-start: calc(var(--stats-card-padding) + var(--stats-card-accent-width) + calc(var(--spacing) * 3));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.StatsCard:where([data-variant="accent"])::before {
|
|
82
|
+
content: "";
|
|
83
|
+
position: absolute;
|
|
84
|
+
inset-block: var(--stats-card-padding);
|
|
85
|
+
inset-inline-start: var(--stats-card-padding);
|
|
86
|
+
width: var(--stats-card-accent-width);
|
|
87
|
+
border-radius: var(--radius-full);
|
|
88
|
+
background: var(--stats-card-accent-color, var(--color-background-primary-solid));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.StatsCard:where([data-variant="accent"]):where([data-size="sm"]) {
|
|
92
|
+
padding-inline-start: calc(var(--stats-card-sm-padding-inline) + var(--stats-card-accent-width) + calc(var(--spacing) * 2.5));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.StatsCard:where([data-variant="accent"]):where([data-size="sm"])::before {
|
|
96
|
+
inset-block: var(--stats-card-sm-padding-block);
|
|
97
|
+
inset-inline-start: var(--stats-card-sm-padding-inline);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="primary"]) {
|
|
101
|
+
--stats-card-accent-color: var(--color-background-primary-solid);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="info"]) {
|
|
105
|
+
--stats-card-accent-color: var(--color-background-info-solid);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="success"]) {
|
|
109
|
+
--stats-card-accent-color: var(--color-background-success-solid);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="warning"]) {
|
|
113
|
+
--stats-card-accent-color: var(--color-background-warning-solid);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="danger"]) {
|
|
117
|
+
--stats-card-accent-color: var(--color-background-danger-solid);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="secondary"]) {
|
|
121
|
+
--stats-card-accent-color: var(--color-background-secondary-solid);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="discovery"]) {
|
|
125
|
+
--stats-card-accent-color: var(--color-background-discovery-solid);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.StatsCard:where([data-variant="accent"]):where([data-accent-color="caution"]) {
|
|
129
|
+
--stats-card-accent-color: var(--color-background-caution-solid);
|
|
130
|
+
}.Header {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: space-between;
|
|
134
|
+
gap: calc(var(--spacing) * 6);
|
|
135
|
+
}.LabelRow {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
gap: calc(var(--spacing) * 1);
|
|
139
|
+
min-width: 0;
|
|
140
|
+
}.Label {
|
|
141
|
+
min-width: 0;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
color: var(--stats-card-label-color);
|
|
144
|
+
font-size: var(--stats-card-label-font-size);
|
|
145
|
+
line-height: var(--font-text-sm-line-height);
|
|
146
|
+
text-overflow: ellipsis;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
}.InfoIcon {
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
flex-shrink: 0;
|
|
151
|
+
color: var(--color-text-tertiary);
|
|
152
|
+
cursor: help;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.InfoIcon svg {
|
|
156
|
+
width: var(--stats-card-info-icon-size);
|
|
157
|
+
height: var(--stats-card-info-icon-size);
|
|
158
|
+
}.IconWrapper {
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
justify-content: center;
|
|
162
|
+
flex-shrink: 0;
|
|
163
|
+
/* A small square at the end of the header (shadcn's metric card with an icon), a soft tint behind the icon */
|
|
164
|
+
width: var(--stats-card-icon-wrapper-size);
|
|
165
|
+
height: var(--stats-card-icon-wrapper-size);
|
|
166
|
+
border-radius: var(--stats-card-icon-wrapper-radius);
|
|
167
|
+
background: var(--stats-card-icon-wrapper-background);
|
|
168
|
+
color: var(--stats-card-icon-color);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.IconWrapper svg {
|
|
172
|
+
width: var(--stats-card-icon-size);
|
|
173
|
+
height: var(--stats-card-icon-size);
|
|
174
|
+
}.HeaderEnd {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: calc(var(--spacing) * 2);
|
|
178
|
+
flex-shrink: 0;
|
|
179
|
+
}.ValueRow {
|
|
180
|
+
display: flex;
|
|
181
|
+
flex-wrap: wrap;
|
|
182
|
+
align-items: baseline;
|
|
183
|
+
-moz-column-gap: calc(var(--spacing) * 2);
|
|
184
|
+
column-gap: calc(var(--spacing) * 2);
|
|
185
|
+
margin-block-start: calc(var(--spacing) * 3);
|
|
186
|
+
}/* A trend and what it compares with, on one line under the value: "↗ +12.5% vs last month" (shadcn's metric card
|
|
187
|
+
with a trend) */.TrendRow {
|
|
188
|
+
display: flex;
|
|
189
|
+
flex-wrap: wrap;
|
|
190
|
+
align-items: center;
|
|
191
|
+
-moz-column-gap: calc(var(--spacing) * 1);
|
|
192
|
+
column-gap: calc(var(--spacing) * 1);
|
|
193
|
+
margin-block-start: calc(var(--spacing) * 1);
|
|
194
|
+
font-size: var(--stats-card-description-font-size);
|
|
195
|
+
line-height: var(--font-text-sm-line-height);
|
|
196
|
+
}.Value {
|
|
197
|
+
min-width: 0;
|
|
198
|
+
color: var(--stats-card-value-color);
|
|
199
|
+
font-size: var(--stats-card-value-font-size);
|
|
200
|
+
font-weight: var(--stats-card-value-font-weight);
|
|
201
|
+
line-height: var(--font-heading-xl-line-height);
|
|
202
|
+
letter-spacing: var(--font-heading-xl-tracking);
|
|
203
|
+
font-variant-numeric: tabular-nums;
|
|
204
|
+
}.Trend {
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
gap: calc(var(--spacing) * 0.5);
|
|
208
|
+
flex-shrink: 0;
|
|
209
|
+
font-size: var(--stats-card-trend-font-size);
|
|
210
|
+
font-weight: var(--stats-card-trend-font-weight);
|
|
211
|
+
line-height: var(--font-text-sm-line-height);
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.Trend svg {
|
|
216
|
+
width: 1.15em;
|
|
217
|
+
height: 1.15em;
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
}.TrendDown {
|
|
220
|
+
transform: scaleY(-1);
|
|
221
|
+
}.TrendPositive {
|
|
222
|
+
color: var(--stats-card-trend-positive-color);
|
|
223
|
+
}.TrendNegative {
|
|
224
|
+
color: var(--stats-card-trend-negative-color);
|
|
225
|
+
}.TrendNeutral {
|
|
226
|
+
color: var(--stats-card-trend-neutral-color);
|
|
227
|
+
}.TrendLabel {
|
|
228
|
+
color: var(--stats-card-description-color);
|
|
229
|
+
font-weight: var(--font-weight-normal);
|
|
230
|
+
}.Description {
|
|
231
|
+
margin-block-start: calc(var(--spacing) * 1);
|
|
232
|
+
color: var(--stats-card-description-color);
|
|
233
|
+
font-size: var(--stats-card-description-font-size);
|
|
234
|
+
line-height: var(--font-text-sm-line-height);
|
|
235
|
+
text-wrap: pretty;
|
|
236
|
+
}.Progress {
|
|
237
|
+
/* The bar spans the card, its label after it (Ant Design's line progress) */
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
gap: calc(var(--spacing) * 3);
|
|
241
|
+
margin-block-start: calc(var(--spacing) * 4);
|
|
242
|
+
}.ProgressTrack {
|
|
243
|
+
flex: 1;
|
|
244
|
+
height: var(--stats-card-progress-height);
|
|
245
|
+
border-radius: var(--stats-card-progress-radius);
|
|
246
|
+
background: var(--stats-card-progress-background);
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
}.ProgressBar {
|
|
249
|
+
height: 100%;
|
|
250
|
+
border-radius: inherit;
|
|
251
|
+
background: var(--stats-card-progress-fill);
|
|
252
|
+
}.ProgressLabel {
|
|
253
|
+
color: var(--stats-card-label-color);
|
|
254
|
+
font-size: var(--stats-card-description-font-size);
|
|
255
|
+
font-weight: var(--font-weight-medium);
|
|
256
|
+
line-height: var(--font-text-sm-line-height);
|
|
257
|
+
font-variant-numeric: tabular-nums;
|
|
258
|
+
white-space: nowrap;
|
|
259
|
+
}.Sparkline {
|
|
260
|
+
margin-block-start: calc(var(--spacing) * 3);
|
|
261
|
+
color: var(--color-text-tertiary);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.Sparkline svg {
|
|
265
|
+
display: block;
|
|
266
|
+
width: 100%;
|
|
267
|
+
height: auto;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@layer components {/* Two segments that decrease and increase a value: a minus and a plus, a short separator between them, a
|
|
2
2
|
segment at the end of the range in the tertiary label. On a desktop one fill lies under both segments and a
|
|
3
|
-
pressed one darkens; on a phone (touch.css) each segment has its own fill, as
|
|
4
|
-
pressed one
|
|
5
|
-
control size on a desktop, the
|
|
3
|
+
pressed one darkens; on a phone (touch.css) each segment has its own fill, as a native iOS 27.2 stepper's, a
|
|
4
|
+
pressed one darkens and one at the end of the range keeps its fill. Sizes and colors are tokens: the PlexUI
|
|
5
|
+
control size on a desktop, the native 93 x 32 capsule on a phone. */.Stepper {
|
|
6
6
|
position: relative;
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
flex-shrink: 0;
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
position: absolute;
|
|
82
82
|
inset: min(0px, calc((var(--stepper-height) - var(--stepper-target-size, 0px)) / 2)) 0;
|
|
83
83
|
content: "";
|
|
84
|
-
}/*
|
|
84
|
+
}/* The separator sits under the two segments at the center and adds no width: on a phone two 46.5px segments put it
|
|
85
|
+
on 46 to 47 of the native 93. */.Separator {
|
|
85
86
|
position: absolute;
|
|
86
87
|
top: var(--stepper-separator-inset);
|
|
87
88
|
left: 50%;
|
|
@@ -94,5 +95,7 @@
|
|
|
94
95
|
}.Icon {
|
|
95
96
|
width: var(--stepper-icon-size);
|
|
96
97
|
height: var(--stepper-icon-size);
|
|
98
|
+
}/* The PlexUI minus is shorter than the plus (12 and 14 of 24); a phone draws it as long, as iOS does (touch.css). */.Segment[data-segment="decrement"] > .Icon {
|
|
99
|
+
scale: var(--stepper-decrement-icon-scale, none);
|
|
97
100
|
}
|
|
98
101
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@layer components {/* Actions behind a row of a list,
|
|
2
|
-
aside and the actions stand behind it
|
|
3
|
-
|
|
1
|
+
@layer components {/* Actions behind a row of a list, as iOS 27.2 draws a list's swipe actions (ref-app swipe-*, measures/swipe.md): the
|
|
2
|
+
content slides aside with its corners rounded and the actions stand behind it, 10px apart, 10px from the edge and
|
|
3
|
+
10px from the content, 4px inside the top and bottom of the row. The colors are PlexUI's solid ones. */.SwipeActions {
|
|
4
4
|
position: relative;
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
isolation: isolate;
|
|
@@ -16,16 +16,17 @@
|
|
|
16
16
|
/* A swipe across the row moves it; a swipe down scrolls the list. */
|
|
17
17
|
touch-action: pan-y;
|
|
18
18
|
transition: translate var(--swipe-actions-duration) var(--ease-cubic-move, ease);
|
|
19
|
-
}/* Moved aside, the content is
|
|
19
|
+
}/* Moved aside, the content is rounded on the side of the actions. */.SwipeActions[data-revealed] > .Content {
|
|
20
20
|
background: var(--swipe-actions-content-background, var(--color-surface));
|
|
21
|
-
}/* On a phone the canvas of the Page (or Dialog)
|
|
22
|
-
|
|
21
|
+
}/* On a phone the canvas of the Page (or Dialog) stands behind the row, and the content moved aside turns gray, as
|
|
22
|
+
iOS fills it with systemGray5 (e5e5ea / 2c2c2e) in a grouped and in a plain list; PlexUI's soft gray is
|
|
23
|
+
ededed / 303030. */@media (max-width: 767.98px) {
|
|
23
24
|
.SwipeActions[data-revealed] {
|
|
24
25
|
background: var(--swipe-actions-background, var(--mobile-surface-primary, var(--mobile-surface-plain-primary, var(--color-surface-secondary))));
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.SwipeActions[data-revealed] > .Content {
|
|
28
|
-
background: var(--swipe-actions-content-background, var(--
|
|
29
|
+
background: var(--swipe-actions-content-background, var(--color-background-secondary-soft));
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
:where([data-plex-layout="phone"]) .SwipeActions[data-revealed] {
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
:where([data-plex-layout="phone"]) .SwipeActions[data-revealed] > .Content {
|
|
36
|
-
background: var(--swipe-actions-content-background, var(--
|
|
37
|
+
background: var(--swipe-actions-content-background, var(--color-background-secondary-soft));
|
|
37
38
|
}.SwipeActions[data-revealed="leading"] > .Content {
|
|
38
39
|
border-start-start-radius: var(--swipe-actions-content-radius);
|
|
39
40
|
border-end-start-radius: var(--swipe-actions-content-radius);
|
|
@@ -49,8 +50,12 @@
|
|
|
49
50
|
position: absolute;
|
|
50
51
|
inset-block: 0;
|
|
51
52
|
display: flex;
|
|
52
|
-
align-items:
|
|
53
|
+
align-items: stretch;
|
|
53
54
|
gap: var(--swipe-actions-gap);
|
|
55
|
+
}/* A label inside: every action of a side takes the width of the widest, as iOS sets them. */.SwipeActions[data-label-placement="inside"] > .Actions {
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-auto-columns: 1fr;
|
|
58
|
+
grid-auto-flow: column;
|
|
54
59
|
}.Actions[data-side="leading"] {
|
|
55
60
|
inset-inline-start: 0;
|
|
56
61
|
padding-inline: var(--swipe-actions-edge-inset) var(--swipe-actions-content-gap);
|
|
@@ -62,12 +67,13 @@
|
|
|
62
67
|
.SwipeActions:not([data-revealed="trailing"]) > .Actions[data-side="trailing"] {
|
|
63
68
|
opacity: 0;
|
|
64
69
|
pointer-events: none;
|
|
65
|
-
}.Action {
|
|
70
|
+
}/* An action fills the height of the row but its insets; a capsule that stops growing stands in its middle. */.Action {
|
|
66
71
|
display: flex;
|
|
67
72
|
flex-direction: column;
|
|
68
73
|
flex-shrink: 0;
|
|
69
74
|
align-items: stretch;
|
|
70
|
-
|
|
75
|
+
justify-content: center;
|
|
76
|
+
padding: var(--swipe-actions-inset-block) 0;
|
|
71
77
|
border: 0;
|
|
72
78
|
background: none;
|
|
73
79
|
color: inherit;
|
|
@@ -85,11 +91,12 @@
|
|
|
85
91
|
outline-offset: 2px;
|
|
86
92
|
}.Capsule {
|
|
87
93
|
display: flex;
|
|
94
|
+
flex: 1 1 0;
|
|
88
95
|
align-items: center;
|
|
89
96
|
justify-content: center;
|
|
90
97
|
gap: var(--swipe-actions-label-gap);
|
|
91
98
|
min-width: var(--swipe-actions-action-min-width);
|
|
92
|
-
height:
|
|
99
|
+
min-height: 0;
|
|
93
100
|
padding-inline: var(--swipe-actions-action-padding-inline);
|
|
94
101
|
border-radius: 9999px;
|
|
95
102
|
background: var(--swipe-action-background);
|
|
@@ -106,16 +113,24 @@
|
|
|
106
113
|
line-height: var(--swipe-actions-label-line-height);
|
|
107
114
|
font-weight: var(--swipe-actions-label-font-weight);
|
|
108
115
|
white-space: nowrap;
|
|
109
|
-
}/*
|
|
110
|
-
|
|
116
|
+
}/* A symbol grows with the row up to the size of a circle; from there it is a circle (the row sets data-round), as iOS
|
|
117
|
+
draws one from a row of 58 (78 with the label under it). */.Action[data-shape="symbol"] > .Capsule {
|
|
118
|
+
max-height: var(--swipe-actions-circle-size);
|
|
119
|
+
}.SwipeActions[data-round] > .Actions:not([data-full]) > .Action[data-shape="symbol"] > .Capsule {
|
|
120
|
+
width: var(--swipe-actions-circle-size);
|
|
121
|
+
min-width: 0;
|
|
122
|
+
padding-inline: 0;
|
|
123
|
+
}/* The label inside the capsule, after a smaller symbol. */.Action[data-shape="label"] > .Capsule {
|
|
111
124
|
--swipe-actions-action-padding-inline: var(--swipe-actions-labeled-padding-inline);
|
|
112
125
|
--swipe-actions-icon-size: var(--swipe-actions-labeled-icon-size);
|
|
113
|
-
}/*
|
|
126
|
+
}/* A label alone stands in a rounded rectangle as wide as its text. */.Action[data-shape="text"] > .Capsule {
|
|
127
|
+
padding-inline: var(--swipe-actions-text-padding-inline);
|
|
128
|
+
border-radius: var(--swipe-actions-text-radius);
|
|
129
|
+
}/* The label under the capsule, for rows of 60 and taller: the capsule takes what the label leaves. */.SwipeActions[data-label-placement="below"] .Action[data-shape="symbol"] {
|
|
114
130
|
gap: var(--swipe-actions-caption-gap);
|
|
115
131
|
padding-block: var(--swipe-actions-tall-padding-top) var(--swipe-actions-tall-padding-bottom);
|
|
116
|
-
}.SwipeActions[data-label-placement="below"] .Capsule {
|
|
117
|
-
--swipe-actions-action-height: var(--swipe-actions-tall-action-height);
|
|
118
132
|
}/* The secondary label of the row (touch.css gives a row the native label roles). */.Caption {
|
|
133
|
+
flex: none;
|
|
119
134
|
color: var(--swipe-actions-caption-color, var(--color-text-secondary));
|
|
120
135
|
font-size: var(--swipe-actions-label-font-size);
|
|
121
136
|
line-height: var(--swipe-actions-label-line-height);
|
|
@@ -126,9 +126,10 @@
|
|
|
126
126
|
|
|
127
127
|
[data-disabled] .Description {
|
|
128
128
|
cursor: not-allowed;
|
|
129
|
-
}/* A phone switch after
|
|
130
|
-
(
|
|
131
|
-
Disabled, the switch keeps its colors and shows
|
|
129
|
+
}/* A phone switch after native iOS 27.2 (its 63 x 28 track and 37 x 24 knob are in touch.css) and the iOS 27 kit
|
|
130
|
+
(Toggles 29:56814). Held down, the knob turns into the lens of glass (mobile-materials.css) over the track, on
|
|
131
|
+
the knob's centre; without touch.css the knob stays as it is. Disabled, the switch keeps its colors and shows
|
|
132
|
+
at half opacity (Is Enabled=False). */@media (max-width: 767px) {
|
|
132
133
|
.Thumb {
|
|
133
134
|
transition:
|
|
134
135
|
translate 200ms var(--cubic-enter),
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
.Track:active:not([data-disabled]) > .Thumb {
|
|
141
|
-
scale: var(--mobile-knob-lens-scale, none);
|
|
142
|
+
scale: var(--mobile-switch-knob-lens-scale, none);
|
|
142
143
|
background-color: var(--mobile-knob-lens-background, var(--switch-thumb-color));
|
|
143
144
|
box-shadow: var(--mobile-knob-lens-shadow, var(--switch-thumb-shadow));
|
|
144
145
|
}
|
|
@@ -165,7 +166,7 @@
|
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
:where([data-plex-layout="phone"]) .Track:active:not([data-disabled]) > .Thumb {
|
|
168
|
-
scale: var(--mobile-knob-lens-scale, none);
|
|
169
|
+
scale: var(--mobile-switch-knob-lens-scale, none);
|
|
169
170
|
background-color: var(--mobile-knob-lens-background, var(--switch-thumb-color));
|
|
170
171
|
box-shadow: var(--mobile-knob-lens-shadow, var(--switch-thumb-shadow));
|
|
171
172
|
}
|