@plexui/styles 0.15.0 → 0.16.1
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/Dialog/Dialog.module.css +39 -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/styles/variables-components.css +9 -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 {
|
|
@@ -361,17 +361,20 @@
|
|
|
361
361
|
--button-size: 2rem;
|
|
362
362
|
--button-uniform-size: 2rem;
|
|
363
363
|
--navigation-button-icon-size: 20px;
|
|
364
|
+
/* The glyph takes the button's own text tokens (a ghost button paints with them), not a bare color */
|
|
365
|
+
--button-text-color: var(--color-text-tertiary);
|
|
366
|
+
--button-text-color-hover: var(--color-text);
|
|
364
367
|
padding: 0;
|
|
365
368
|
border-radius: 0.5rem;
|
|
366
369
|
background: var(--dialog-close-background);
|
|
367
|
-
color: var(--
|
|
370
|
+
color: var(--button-text-color);
|
|
368
371
|
transition: background-color 0.2s var(--cubic-enter), color 0.2s var(--cubic-enter);
|
|
369
372
|
}
|
|
370
373
|
|
|
371
374
|
@media (hover: hover) and (pointer: fine) {
|
|
372
375
|
.Content .CloseButton[data-navigation-action]:hover:where(:not(:root[data-input="touch"] *)) {
|
|
373
376
|
background: var(--dialog-close-background-hover);
|
|
374
|
-
color: var(--color-
|
|
377
|
+
color: var(--button-text-color-hover);
|
|
375
378
|
}
|
|
376
379
|
}
|
|
377
380
|
|
|
@@ -490,9 +493,11 @@
|
|
|
490
493
|
--button-size: var(--dialog-mobile-action-size);
|
|
491
494
|
--button-uniform-size: var(--dialog-mobile-action-size);
|
|
492
495
|
--navigation-button-icon-size: var(--dialog-mobile-close-icon-size);
|
|
496
|
+
--button-text-color: var(--color-text-secondary);
|
|
497
|
+
--button-text-color-hover: var(--color-text-secondary);
|
|
493
498
|
border-radius: var(--radius-full);
|
|
494
499
|
background: transparent;
|
|
495
|
-
color: var(--
|
|
500
|
+
color: var(--button-text-color);
|
|
496
501
|
}
|
|
497
502
|
|
|
498
503
|
@media (hover: hover) and (pointer: fine) {
|
|
@@ -580,9 +585,11 @@
|
|
|
580
585
|
--button-size: var(--dialog-mobile-action-size);
|
|
581
586
|
--button-uniform-size: var(--dialog-mobile-action-size);
|
|
582
587
|
--navigation-button-icon-size: var(--dialog-mobile-close-icon-size);
|
|
588
|
+
--button-text-color: var(--color-text-secondary);
|
|
589
|
+
--button-text-color-hover: var(--color-text-secondary);
|
|
583
590
|
border-radius: var(--radius-full);
|
|
584
591
|
background: transparent;
|
|
585
|
-
color: var(--
|
|
592
|
+
color: var(--button-text-color);
|
|
586
593
|
}
|
|
587
594
|
|
|
588
595
|
@media (hover: hover) and (pointer: fine) {
|
|
@@ -840,8 +847,20 @@
|
|
|
840
847
|
--button-size: var(--dialog-sheet-close-size);
|
|
841
848
|
--button-uniform-size: var(--dialog-sheet-close-size);
|
|
842
849
|
--navigation-button-icon-size: var(--dialog-sheet-close-icon-size);
|
|
843
|
-
/* The glass Close glyph uses the same label role as Page NavigationButton close (IMG_5453)
|
|
844
|
-
|
|
850
|
+
/* The glass Close glyph uses the same label role as Page NavigationButton close (IMG_5453), through the
|
|
851
|
+
button's text tokens: the ghost button paints its glyph with them, so a bare color lost to them */
|
|
852
|
+
--button-text-color: var(--color-text);
|
|
853
|
+
--button-text-color-hover: var(--color-text);
|
|
854
|
+
color: var(--button-text-color);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/* The same for the Close (or a step's Back) at the leading edge of the bar a Dialog.Header becomes: a ghost
|
|
858
|
+
NavigationButton of the secondary color, whose glyph took the secondary ghost token. A disabled one keeps
|
|
859
|
+
the tertiary label of a disabled bar button; a leading action of the app's own (a Confirm, a danger color, a solid fill)
|
|
860
|
+
keeps its colors. */
|
|
861
|
+
.Content[data-mobile-variant="sheet"] .BarClose > :is([data-navigation-action="close"], [data-navigation-action="back"])[data-color="secondary"]:is([data-variant="ghost"], [data-variant="soft"]):not([data-disabled]) {
|
|
862
|
+
--button-text-color: var(--color-text);
|
|
863
|
+
--button-text-color-hover: var(--color-text);
|
|
845
864
|
}
|
|
846
865
|
|
|
847
866
|
/* The glass of a sheet's bar: Close, the header actions and a control in the header, such as a segmented
|
|
@@ -1427,8 +1446,20 @@
|
|
|
1427
1446
|
--button-size: var(--dialog-sheet-close-size);
|
|
1428
1447
|
--button-uniform-size: var(--dialog-sheet-close-size);
|
|
1429
1448
|
--navigation-button-icon-size: var(--dialog-sheet-close-icon-size);
|
|
1430
|
-
/* The glass Close glyph uses the same label role as Page NavigationButton close (IMG_5453)
|
|
1431
|
-
|
|
1449
|
+
/* The glass Close glyph uses the same label role as Page NavigationButton close (IMG_5453), through the
|
|
1450
|
+
button's text tokens: the ghost button paints its glyph with them, so a bare color lost to them */
|
|
1451
|
+
--button-text-color: var(--color-text);
|
|
1452
|
+
--button-text-color-hover: var(--color-text);
|
|
1453
|
+
color: var(--button-text-color);
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
/* The same for the Close (or a step's Back) at the leading edge of the bar a Dialog.Header becomes: a ghost
|
|
1457
|
+
NavigationButton of the secondary color, whose glyph took the secondary ghost token. A disabled one keeps
|
|
1458
|
+
the tertiary label of a disabled bar button; a leading action of the app's own (a Confirm, a danger color, a solid fill)
|
|
1459
|
+
keeps its colors. */
|
|
1460
|
+
:where([data-plex-layout="phone"]) .Content[data-mobile-variant="sheet"] .BarClose > :is([data-navigation-action="close"], [data-navigation-action="back"])[data-color="secondary"]:is([data-variant="ghost"], [data-variant="soft"]):not([data-disabled]) {
|
|
1461
|
+
--button-text-color: var(--color-text);
|
|
1462
|
+
--button-text-color-hover: var(--color-text);
|
|
1432
1463
|
}
|
|
1433
1464
|
|
|
1434
1465
|
/* The glass of a sheet's bar: Close, the header actions and a control in the header, such as a segmented
|
|
@@ -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
|
+
}
|
|
@@ -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
|
============================================= */
|