@plexui/styles 0.14.0 → 0.16.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/Alert/Alert.module.css +28 -8
- package/dist/es/components/Kbd/Kbd.module.css +10 -0
- package/dist/es/components/Progress/Progress.module.css +18 -0
- package/dist/es/components/RollingNumber/RollingNumber.module.css +44 -0
- package/dist/es/components/Stepper/Stepper.module.css +32 -0
- package/dist/es/styles/touch.css +18 -0
- package/dist/es/styles/variables-components.css +23 -0
- package/package.json +1 -1
|
@@ -229,7 +229,13 @@
|
|
|
229
229
|
row-gap: 18px;
|
|
230
230
|
padding: 17px 16px;
|
|
231
231
|
border-radius: 26px;
|
|
232
|
-
|
|
232
|
+
/* TipKit draws the symbol itself 22 wide at tipImageSize 22 (the circle of i); a PlexUI icon draws its circle 20
|
|
233
|
+
of its 24, so the icon's box is 26.4 for a 22px circle (console 15.11, owner: «иконка правильного размера? не
|
|
234
|
+
маленькая?», it was 18.3). The SVG overhangs its 22px place by the inset on each side (negative margins), so the
|
|
235
|
+
layout, a custom indicator's place and the text at 56 stay as they were. */
|
|
236
|
+
--alert-indicator-glyph-size: 22px;
|
|
237
|
+
--alert-indicator-size: calc(var(--alert-indicator-glyph-size) * 24 / 20);
|
|
238
|
+
--alert-indicator-inset: calc((var(--alert-indicator-size) - var(--alert-indicator-glyph-size)) / 2);
|
|
233
239
|
}
|
|
234
240
|
|
|
235
241
|
.Alert:has(> .Content > .Actions > :not(.DismissButton)) {
|
|
@@ -303,13 +309,17 @@
|
|
|
303
309
|
padding-inline: 6px 4px;
|
|
304
310
|
margin-block: 5px;
|
|
305
311
|
/* A smaller custom indicator stands on the middle of the icon's place */
|
|
306
|
-
min-height: var(--alert-indicator-size);
|
|
312
|
+
min-height: var(--alert-indicator-glyph-size);
|
|
307
313
|
}
|
|
308
314
|
|
|
309
315
|
.Indicator::before {
|
|
310
316
|
content: none;
|
|
311
317
|
}
|
|
312
318
|
|
|
319
|
+
.Indicator svg {
|
|
320
|
+
margin: calc(-1 * var(--alert-indicator-inset));
|
|
321
|
+
}
|
|
322
|
+
|
|
313
323
|
/* With a description under it the title's first line stands on the middle of the icon too, as an iOS row centres
|
|
314
324
|
its icon on its first line (owner 15.11: TipKit's lower image read as off centre); the 10px under the icon keep
|
|
315
325
|
the card as tall */
|
|
@@ -326,7 +336,7 @@
|
|
|
326
336
|
of the image, as a title alone does: one line centred on the icon, more lines going on under it (owner 13.11:
|
|
327
337
|
the line sat 6px above the icon's middle) */
|
|
328
338
|
.Indicator + .Content > .Message:not(:has(> .Title)) {
|
|
329
|
-
margin-top: calc(5px + var(--alert-indicator-size) / 2 - 0.5lh);
|
|
339
|
+
margin-top: calc(5px + var(--alert-indicator-glyph-size) / 2 - 0.5lh);
|
|
330
340
|
}
|
|
331
341
|
|
|
332
342
|
.Message {
|
|
@@ -394,7 +404,7 @@
|
|
|
394
404
|
}
|
|
395
405
|
|
|
396
406
|
.Alert[data-mobile-actions="own"]:has(> .Indicator) .Actions {
|
|
397
|
-
padding-inline-start: calc(6px + var(--alert-indicator-size) + 4px + 8px);
|
|
407
|
+
padding-inline-start: calc(6px + var(--alert-indicator-glyph-size) + 4px + 8px);
|
|
398
408
|
}
|
|
399
409
|
|
|
400
410
|
.Alert .Actions > .DismissButton {
|
|
@@ -425,7 +435,13 @@
|
|
|
425
435
|
row-gap: 18px;
|
|
426
436
|
padding: 17px 16px;
|
|
427
437
|
border-radius: 26px;
|
|
428
|
-
|
|
438
|
+
/* TipKit draws the symbol itself 22 wide at tipImageSize 22 (the circle of i); a PlexUI icon draws its circle 20
|
|
439
|
+
of its 24, so the icon's box is 26.4 for a 22px circle (console 15.11, owner: «иконка правильного размера? не
|
|
440
|
+
маленькая?», it was 18.3). The SVG overhangs its 22px place by the inset on each side (negative margins), so the
|
|
441
|
+
layout, a custom indicator's place and the text at 56 stay as they were. */
|
|
442
|
+
--alert-indicator-glyph-size: 22px;
|
|
443
|
+
--alert-indicator-size: calc(var(--alert-indicator-glyph-size) * 24 / 20);
|
|
444
|
+
--alert-indicator-inset: calc((var(--alert-indicator-size) - var(--alert-indicator-glyph-size)) / 2);
|
|
429
445
|
}
|
|
430
446
|
|
|
431
447
|
:where([data-plex-layout="phone"]) .Alert:has(> .Content > .Actions > :not(.DismissButton)) {
|
|
@@ -499,13 +515,17 @@
|
|
|
499
515
|
padding-inline: 6px 4px;
|
|
500
516
|
margin-block: 5px;
|
|
501
517
|
/* A smaller custom indicator stands on the middle of the icon's place */
|
|
502
|
-
min-height: var(--alert-indicator-size);
|
|
518
|
+
min-height: var(--alert-indicator-glyph-size);
|
|
503
519
|
}
|
|
504
520
|
|
|
505
521
|
:where([data-plex-layout="phone"]) .Indicator::before {
|
|
506
522
|
content: none;
|
|
507
523
|
}
|
|
508
524
|
|
|
525
|
+
:where([data-plex-layout="phone"]) .Indicator svg {
|
|
526
|
+
margin: calc(-1 * var(--alert-indicator-inset));
|
|
527
|
+
}
|
|
528
|
+
|
|
509
529
|
/* With a description under it the title's first line stands on the middle of the icon too, as an iOS row centres
|
|
510
530
|
its icon on its first line (owner 15.11: TipKit's lower image read as off centre); the 10px under the icon keep
|
|
511
531
|
the card as tall */
|
|
@@ -522,7 +542,7 @@
|
|
|
522
542
|
of the image, as a title alone does: one line centred on the icon, more lines going on under it (owner 13.11:
|
|
523
543
|
the line sat 6px above the icon's middle) */
|
|
524
544
|
:where([data-plex-layout="phone"]) .Indicator + .Content > .Message:not(:has(> .Title)) {
|
|
525
|
-
margin-top: calc(5px + var(--alert-indicator-size) / 2 - 0.5lh);
|
|
545
|
+
margin-top: calc(5px + var(--alert-indicator-glyph-size) / 2 - 0.5lh);
|
|
526
546
|
}
|
|
527
547
|
|
|
528
548
|
:where([data-plex-layout="phone"]) .Message {
|
|
@@ -590,7 +610,7 @@
|
|
|
590
610
|
}
|
|
591
611
|
|
|
592
612
|
:where([data-plex-layout="phone"]) .Alert[data-mobile-actions="own"]:has(> .Indicator) .Actions {
|
|
593
|
-
padding-inline-start: calc(6px + var(--alert-indicator-size) + 4px + 8px);
|
|
613
|
+
padding-inline-start: calc(6px + var(--alert-indicator-glyph-size) + 4px + 8px);
|
|
594
614
|
}
|
|
595
615
|
|
|
596
616
|
:where([data-plex-layout="phone"]) .Alert .Actions > .DismissButton {
|
|
@@ -43,5 +43,15 @@
|
|
|
43
43
|
display: inline-flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
gap: calc(var(--spacing) * 0.5);
|
|
46
|
+
}/* The name of a modifier printed as a symbol, such as Command for ⌘: read out, not shown */.Name {
|
|
47
|
+
position: absolute;
|
|
48
|
+
width: 1px;
|
|
49
|
+
height: 1px;
|
|
50
|
+
margin: -1px;
|
|
51
|
+
padding: 0;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
clip-path: inset(50%);
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
border: 0;
|
|
46
56
|
}
|
|
47
57
|
}
|
|
@@ -30,5 +30,23 @@
|
|
|
30
30
|
100% {
|
|
31
31
|
transform: translateX(-100%);
|
|
32
32
|
}
|
|
33
|
+
}/* Parts of one bar side by side, such as paid, pending and due, each in its color with a hairline of the track
|
|
34
|
+
between them; the rest of the track is what is left */.Root[data-segmented] {
|
|
35
|
+
display: flex;
|
|
36
|
+
gap: var(--progress-segment-gap);
|
|
37
|
+
}/* A full bar's parts give the gaps back in proportion, so the last one is not cut off at the end */.Segment {
|
|
38
|
+
flex-shrink: 1;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
height: 100%;
|
|
41
|
+
background: var(--progress-segment-color, var(--progress-indicator-color));
|
|
42
|
+
transition: width var(--progress-transition-duration) var(--progress-transition-ease);
|
|
33
43
|
}
|
|
44
|
+
|
|
45
|
+
.Segment[data-color="secondary"] { --progress-segment-color: var(--color-background-secondary-solid); }
|
|
46
|
+
.Segment[data-color="success"] { --progress-segment-color: var(--color-background-success-solid); }
|
|
47
|
+
.Segment[data-color="warning"] { --progress-segment-color: var(--color-background-warning-solid); }
|
|
48
|
+
.Segment[data-color="caution"] { --progress-segment-color: var(--color-background-caution-solid); }
|
|
49
|
+
.Segment[data-color="danger"] { --progress-segment-color: var(--color-background-danger-solid); }
|
|
50
|
+
.Segment[data-color="info"] { --progress-segment-color: var(--color-background-info-solid); }
|
|
51
|
+
.Segment[data-color="discovery"] { --progress-segment-color: var(--color-background-discovery-solid); }
|
|
34
52
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@layer components {/* A number whose digits roll to a new value, as an odometer: each digit is a reel of 0 to 9 behind a window one
|
|
2
|
+
digit tall. The window holds the digit itself, hidden, so it keeps the text's width and baseline and the number
|
|
3
|
+
stands in a sentence; the reel turns over it. Separators, signs and currency stand still. Tabular figures keep
|
|
4
|
+
every digit as wide, so the number does not jitter while it rolls. */.RollingNumber {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
font-variant-numeric: tabular-nums;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
}/* Each digit is a box of its own, which bidi treats as neutral: the number keeps left to right in a right-to-left page,
|
|
9
|
+
as its digits are written */.Visual {
|
|
10
|
+
direction: ltr;
|
|
11
|
+
unicode-bidi: isolate;
|
|
12
|
+
}.Digit {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
/* Clips the reel with a clip path: a clipping box would move the baseline to its bottom edge */
|
|
16
|
+
clip-path: inset(0 -0.1em);
|
|
17
|
+
}.Ghost {
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
}.Reel {
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset-inline: 0;
|
|
22
|
+
top: 0;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
transform: translateY(calc(var(--rolling-number-digit, 0) * -10%));
|
|
27
|
+
transition: transform var(--rolling-number-duration) var(--rolling-number-ease);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion: reduce) {.Reel {
|
|
31
|
+
transition: none
|
|
32
|
+
}
|
|
33
|
+
}/* The number as text for a screen reader; the reels are hidden from it */.Text {
|
|
34
|
+
position: absolute;
|
|
35
|
+
width: 1px;
|
|
36
|
+
height: 1px;
|
|
37
|
+
margin: -1px;
|
|
38
|
+
padding: 0;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
clip-path: inset(50%);
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
border: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -97,5 +97,37 @@
|
|
|
97
97
|
height: var(--stepper-icon-size);
|
|
98
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"]:not([data-remove]) > .Icon {
|
|
99
99
|
scale: var(--stepper-decrement-icon-scale, none);
|
|
100
|
+
}/* With the value: one fill under round segments and the number between them, as a cart's quantity stepper
|
|
101
|
+
(the iOS-style cart in the owner's design, 15.11): a 96 x 36 capsule on a phone, two 36px segments with 20px
|
|
102
|
+
symbols and the value, medium, at least 24 wide. A pressed segment darkens a circle; the separator is gone. */.Stepper[data-show-value] {
|
|
103
|
+
--stepper-height: var(--stepper-value-height);
|
|
104
|
+
--stepper-radius: var(--stepper-value-radius);
|
|
105
|
+
--stepper-segment-width: var(--stepper-value-height);
|
|
106
|
+
--stepper-icon-size: var(--stepper-value-icon-size);
|
|
107
|
+
--stepper-segment-background: transparent;
|
|
108
|
+
--stepper-segment-background-disabled: transparent;
|
|
109
|
+
--stepper-segment-background-hover: var(--stepper-value-segment-background-hover);
|
|
110
|
+
--stepper-segment-background-active: var(--stepper-value-segment-background-active);
|
|
111
|
+
background: var(--stepper-value-background);
|
|
100
112
|
}
|
|
113
|
+
|
|
114
|
+
.Stepper[data-show-value] .Segment {
|
|
115
|
+
border-radius: inherit;
|
|
116
|
+
}.Value {
|
|
117
|
+
display: grid;
|
|
118
|
+
place-items: center;
|
|
119
|
+
flex-shrink: 0;
|
|
120
|
+
min-width: var(--stepper-value-min-width);
|
|
121
|
+
color: var(--stepper-value-color);
|
|
122
|
+
font-size: var(--stepper-value-font-size);
|
|
123
|
+
font-weight: var(--stepper-value-font-weight);
|
|
124
|
+
line-height: var(--stepper-value-line-height);
|
|
125
|
+
font-variant-numeric: tabular-nums;
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.Stepper[data-disabled] > .Value {
|
|
131
|
+
color: var(--stepper-value-disabled-color);
|
|
132
|
+
}
|
|
101
133
|
}
|
package/dist/es/styles/touch.css
CHANGED
|
@@ -440,6 +440,15 @@
|
|
|
440
440
|
--stepper-segment-background-disabled: var(--stepper-mobile-segment-background-disabled);
|
|
441
441
|
--stepper-separator-color: var(--stepper-mobile-separator-color);
|
|
442
442
|
--stepper-icon-disabled-color: var(--mobile-label-tertiary);
|
|
443
|
+
--stepper-value-height: 36px;
|
|
444
|
+
--stepper-value-radius: 18px;
|
|
445
|
+
--stepper-value-icon-size: 20px;
|
|
446
|
+
--stepper-value-background: var(--stepper-mobile-segment-background);
|
|
447
|
+
--stepper-value-segment-background-hover: transparent;
|
|
448
|
+
--stepper-value-segment-background-active: var(--stepper-mobile-segment-background-active);
|
|
449
|
+
--stepper-value-disabled-color: var(--mobile-label-tertiary);
|
|
450
|
+
--stepper-value-font-size: 15px;
|
|
451
|
+
--stepper-value-line-height: 20px;
|
|
443
452
|
--color-picker-width: 100%;
|
|
444
453
|
--color-picker-modes-gap: 15px;
|
|
445
454
|
--color-picker-body-radius: 18px;
|
|
@@ -1137,6 +1146,15 @@ html:root :where([data-plex-layout="phone"]) {
|
|
|
1137
1146
|
--stepper-segment-background-disabled: var(--stepper-mobile-segment-background-disabled);
|
|
1138
1147
|
--stepper-separator-color: var(--stepper-mobile-separator-color);
|
|
1139
1148
|
--stepper-icon-disabled-color: var(--mobile-label-tertiary);
|
|
1149
|
+
--stepper-value-height: 36px;
|
|
1150
|
+
--stepper-value-radius: 18px;
|
|
1151
|
+
--stepper-value-icon-size: 20px;
|
|
1152
|
+
--stepper-value-background: var(--stepper-mobile-segment-background);
|
|
1153
|
+
--stepper-value-segment-background-hover: transparent;
|
|
1154
|
+
--stepper-value-segment-background-active: var(--stepper-mobile-segment-background-active);
|
|
1155
|
+
--stepper-value-disabled-color: var(--mobile-label-tertiary);
|
|
1156
|
+
--stepper-value-font-size: 15px;
|
|
1157
|
+
--stepper-value-line-height: 20px;
|
|
1140
1158
|
--color-picker-width: 100%;
|
|
1141
1159
|
--color-picker-modes-gap: 15px;
|
|
1142
1160
|
--color-picker-body-radius: 18px;
|
|
@@ -139,6 +139,8 @@
|
|
|
139
139
|
--progress-transition-duration: var(--transition-duration-basic);
|
|
140
140
|
--progress-transition-ease: var(--transition-ease-basic);
|
|
141
141
|
--progress-indeterminate-duration: 1.5s;
|
|
142
|
+
/* Between the parts of a segmented bar */
|
|
143
|
+
--progress-segment-gap: 2px;
|
|
142
144
|
|
|
143
145
|
/* =============================================
|
|
144
146
|
Separator
|
|
@@ -914,6 +916,13 @@
|
|
|
914
916
|
control is the enabled one at 50%) */
|
|
915
917
|
--toggle-group-disabled-opacity: 0.5;
|
|
916
918
|
|
|
919
|
+
/* =============================================
|
|
920
|
+
Rolling number
|
|
921
|
+
============================================= */
|
|
922
|
+
/* Long enough to read the digits pass, as an odometer turns */
|
|
923
|
+
--rolling-number-duration: 600ms;
|
|
924
|
+
--rolling-number-ease: var(--cubic-move);
|
|
925
|
+
|
|
917
926
|
/* =============================================
|
|
918
927
|
Stepper
|
|
919
928
|
============================================= */
|
|
@@ -936,6 +945,20 @@
|
|
|
936
945
|
alpha-25. */
|
|
937
946
|
--stepper-mobile-segment-background-disabled: var(--stepper-mobile-segment-background);
|
|
938
947
|
--stepper-mobile-separator-color: var(--alpha-25);
|
|
948
|
+
/* With showValue: the value between round segments on one fill. On a desktop the control size, square segments
|
|
949
|
+
and the stepper's fill; a phone (touch.css) sets the 96 x 36 cart capsule. */
|
|
950
|
+
--stepper-value-height: var(--control-size-md);
|
|
951
|
+
--stepper-value-radius: var(--stepper-radius);
|
|
952
|
+
--stepper-value-icon-size: var(--control-icon-size-md);
|
|
953
|
+
--stepper-value-background: var(--stepper-background);
|
|
954
|
+
--stepper-value-segment-background-hover: var(--alpha-05);
|
|
955
|
+
--stepper-value-segment-background-active: var(--alpha-10);
|
|
956
|
+
--stepper-value-min-width: 24px;
|
|
957
|
+
--stepper-value-color: var(--color-text);
|
|
958
|
+
--stepper-value-disabled-color: var(--color-text-disabled);
|
|
959
|
+
--stepper-value-font-size: var(--font-text-sm-size);
|
|
960
|
+
--stepper-value-line-height: var(--font-text-sm-line-height);
|
|
961
|
+
--stepper-value-font-weight: var(--font-weight-medium);
|
|
939
962
|
|
|
940
963
|
/* =============================================
|
|
941
964
|
Tab bar (phone)
|