@plexui/styles 0.1.46 → 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 +46 -2
- 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
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
min-width: 0;
|
|
15
15
|
padding: var(--tab-bar-padding-top) var(--tab-bar-gutter) var(--tab-bar-padding-bottom);
|
|
16
16
|
color: var(--color-text);
|
|
17
|
-
|
|
18
|
-
/* With a search or a prominent tab, or minimized, the capsule keeps to the leading edge and the circle of
|
|
19
|
-
its own to the trailing one. */
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
/* The soft scroll edge of a bottom Toolbar: the canvas fades out over content under the bar. */
|
|
@@ -67,6 +64,9 @@
|
|
|
67
64
|
.TabBar[data-background="soft"]::before {
|
|
68
65
|
display: none;
|
|
69
66
|
}
|
|
67
|
+
|
|
68
|
+
/* With a search or a prominent tab, or minimized, the capsule keeps to the leading edge and the circle of
|
|
69
|
+
its own to the trailing one. */
|
|
70
70
|
.TabBar[data-search],
|
|
71
71
|
.TabBar[data-prominent],
|
|
72
72
|
.TabBar[data-minimized] {
|
|
@@ -77,10 +77,23 @@
|
|
|
77
77
|
padding: var(--tab-bar-minimized-padding-top) var(--tab-bar-minimized-gutter) var(--tab-bar-minimized-padding-bottom);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
/* A bottom accessory stands above the capsule, so the bar grows by its height and gap (151 in all). */
|
|
81
|
+
.TabBar[data-accessory] {
|
|
82
|
+
padding-top: calc(var(--tab-bar-padding-top) + var(--tab-bar-accessory-height) + var(--tab-bar-accessory-gap));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Minimized, it moves between the circles and the bar keeps its height. */
|
|
86
|
+
.TabBar[data-accessory][data-minimized] {
|
|
87
|
+
gap: var(--tab-bar-minimized-accessory-gap);
|
|
88
|
+
padding-top: calc(var(--tab-bar-minimized-padding-top) + var(--tab-bar-accessory-height) + var(--tab-bar-accessory-gap));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* The glass capsule (Liquid Glass Regular, the shared mobile glass with its raised shadow). Tabs are 85px
|
|
92
|
+
apart at most and share the width when there are more: four or five fill 360px, three take 275, as iOS 27.2
|
|
93
|
+
sets them. The search and prominent circles name both classes to outrank the reset of
|
|
94
|
+
`.Item`; the accessory is the same glass. */
|
|
83
95
|
.Tabs,
|
|
96
|
+
.Accessory,
|
|
84
97
|
.Item:is(.Search, .Prominent) {
|
|
85
98
|
border-radius: var(--radius-full);
|
|
86
99
|
background-color: var(--mobile-glass-background);
|
|
@@ -174,6 +187,38 @@
|
|
|
174
187
|
height: var(--tab-bar-icon-size);
|
|
175
188
|
}
|
|
176
189
|
|
|
190
|
+
/* The bottom accessory: the app's own content, a now playing row or a status, in a capsule across the bar
|
|
191
|
+
above the tabs. */
|
|
192
|
+
.Accessory {
|
|
193
|
+
position: absolute;
|
|
194
|
+
top: var(--tab-bar-padding-top);
|
|
195
|
+
right: var(--tab-bar-gutter);
|
|
196
|
+
left: var(--tab-bar-gutter);
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
min-width: 0;
|
|
200
|
+
height: var(--tab-bar-accessory-height);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* A count or a word on a tab: a red capsule over the symbol's trailing top corner, kept to the tab's middle. */
|
|
204
|
+
.Badge {
|
|
205
|
+
position: absolute;
|
|
206
|
+
top: var(--tab-bar-badge-top);
|
|
207
|
+
left: calc(50% + var(--tab-bar-badge-start));
|
|
208
|
+
min-width: var(--tab-bar-badge-size);
|
|
209
|
+
height: var(--tab-bar-badge-size);
|
|
210
|
+
padding: 0 var(--tab-bar-badge-padding-inline);
|
|
211
|
+
border-radius: var(--radius-full);
|
|
212
|
+
background: var(--tab-bar-badge-background);
|
|
213
|
+
color: var(--tab-bar-badge-color);
|
|
214
|
+
font-size: var(--tab-bar-badge-font-size);
|
|
215
|
+
font-weight: var(--tab-bar-badge-font-weight);
|
|
216
|
+
line-height: var(--tab-bar-badge-size);
|
|
217
|
+
text-align: center;
|
|
218
|
+
white-space: nowrap;
|
|
219
|
+
pointer-events: none;
|
|
220
|
+
}
|
|
221
|
+
|
|
177
222
|
.Label {
|
|
178
223
|
max-width: 100%;
|
|
179
224
|
overflow: hidden;
|
|
@@ -224,6 +269,12 @@
|
|
|
224
269
|
background: transparent;
|
|
225
270
|
}
|
|
226
271
|
|
|
272
|
+
/* The badge stays on the circle, measured from the circle rather than the tab inside it. */
|
|
273
|
+
.TabBar[data-minimized] .Tabs .Badge {
|
|
274
|
+
top: calc(var(--tab-bar-minimized-badge-top) - var(--tab-bar-capsule-padding-block));
|
|
275
|
+
left: calc(50% + var(--tab-bar-minimized-badge-start));
|
|
276
|
+
}
|
|
277
|
+
|
|
227
278
|
/* The label still names the tab for assistive technology. */
|
|
228
279
|
.TabBar[data-minimized] .Tabs .Label {
|
|
229
280
|
position: absolute;
|
|
@@ -238,6 +289,13 @@
|
|
|
238
289
|
width: var(--tab-bar-minimized-size);
|
|
239
290
|
height: var(--tab-bar-minimized-size);
|
|
240
291
|
}
|
|
292
|
+
|
|
293
|
+
/* The accessory between the circles, as tall as they are: the bar puts it there in its order. */
|
|
294
|
+
.TabBar[data-minimized] .Accessory {
|
|
295
|
+
position: static;
|
|
296
|
+
flex: 1 1 0;
|
|
297
|
+
height: var(--tab-bar-minimized-size);
|
|
298
|
+
}
|
|
241
299
|
}
|
|
242
300
|
/* 402 x 95: the capsule 62 tall, 21px from the sides and the bottom, 12px below the top of the bar. */
|
|
243
301
|
:where([data-plex-layout="phone"]) .TabBar {
|
|
@@ -251,9 +309,6 @@
|
|
|
251
309
|
min-width: 0;
|
|
252
310
|
padding: var(--tab-bar-padding-top) var(--tab-bar-gutter) var(--tab-bar-padding-bottom);
|
|
253
311
|
color: var(--color-text);
|
|
254
|
-
|
|
255
|
-
/* With a search or a prominent tab, or minimized, the capsule keeps to the leading edge and the circle of
|
|
256
|
-
its own to the trailing one. */
|
|
257
312
|
}
|
|
258
313
|
|
|
259
314
|
/* The soft scroll edge of a bottom Toolbar: the canvas fades out over content under the bar. */
|
|
@@ -304,6 +359,9 @@
|
|
|
304
359
|
:where([data-plex-layout="phone"]) .TabBar[data-background="soft"]::before {
|
|
305
360
|
display: none;
|
|
306
361
|
}
|
|
362
|
+
|
|
363
|
+
/* With a search or a prominent tab, or minimized, the capsule keeps to the leading edge and the circle of
|
|
364
|
+
its own to the trailing one. */
|
|
307
365
|
:where([data-plex-layout="phone"]) .TabBar[data-search],
|
|
308
366
|
:where([data-plex-layout="phone"]) .TabBar[data-prominent],
|
|
309
367
|
:where([data-plex-layout="phone"]) .TabBar[data-minimized] {
|
|
@@ -314,10 +372,23 @@
|
|
|
314
372
|
padding: var(--tab-bar-minimized-padding-top) var(--tab-bar-minimized-gutter) var(--tab-bar-minimized-padding-bottom);
|
|
315
373
|
}
|
|
316
374
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
375
|
+
/* A bottom accessory stands above the capsule, so the bar grows by its height and gap (151 in all). */
|
|
376
|
+
:where([data-plex-layout="phone"]) .TabBar[data-accessory] {
|
|
377
|
+
padding-top: calc(var(--tab-bar-padding-top) + var(--tab-bar-accessory-height) + var(--tab-bar-accessory-gap));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* Minimized, it moves between the circles and the bar keeps its height. */
|
|
381
|
+
:where([data-plex-layout="phone"]) .TabBar[data-accessory][data-minimized] {
|
|
382
|
+
gap: var(--tab-bar-minimized-accessory-gap);
|
|
383
|
+
padding-top: calc(var(--tab-bar-minimized-padding-top) + var(--tab-bar-accessory-height) + var(--tab-bar-accessory-gap));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* The glass capsule (Liquid Glass Regular, the shared mobile glass with its raised shadow). Tabs are 85px
|
|
387
|
+
apart at most and share the width when there are more: four or five fill 360px, three take 275, as iOS 27.2
|
|
388
|
+
sets them. The search and prominent circles name both classes to outrank the reset of
|
|
389
|
+
`.Item`; the accessory is the same glass. */
|
|
320
390
|
:where([data-plex-layout="phone"]) .Tabs,
|
|
391
|
+
:where([data-plex-layout="phone"]) .Accessory,
|
|
321
392
|
:where([data-plex-layout="phone"]) .Item:is(.Search, .Prominent) {
|
|
322
393
|
border-radius: var(--radius-full);
|
|
323
394
|
background-color: var(--mobile-glass-background);
|
|
@@ -411,6 +482,38 @@
|
|
|
411
482
|
height: var(--tab-bar-icon-size);
|
|
412
483
|
}
|
|
413
484
|
|
|
485
|
+
/* The bottom accessory: the app's own content, a now playing row or a status, in a capsule across the bar
|
|
486
|
+
above the tabs. */
|
|
487
|
+
:where([data-plex-layout="phone"]) .Accessory {
|
|
488
|
+
position: absolute;
|
|
489
|
+
top: var(--tab-bar-padding-top);
|
|
490
|
+
right: var(--tab-bar-gutter);
|
|
491
|
+
left: var(--tab-bar-gutter);
|
|
492
|
+
display: flex;
|
|
493
|
+
align-items: center;
|
|
494
|
+
min-width: 0;
|
|
495
|
+
height: var(--tab-bar-accessory-height);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* A count or a word on a tab: a red capsule over the symbol's trailing top corner, kept to the tab's middle. */
|
|
499
|
+
:where([data-plex-layout="phone"]) .Badge {
|
|
500
|
+
position: absolute;
|
|
501
|
+
top: var(--tab-bar-badge-top);
|
|
502
|
+
left: calc(50% + var(--tab-bar-badge-start));
|
|
503
|
+
min-width: var(--tab-bar-badge-size);
|
|
504
|
+
height: var(--tab-bar-badge-size);
|
|
505
|
+
padding: 0 var(--tab-bar-badge-padding-inline);
|
|
506
|
+
border-radius: var(--radius-full);
|
|
507
|
+
background: var(--tab-bar-badge-background);
|
|
508
|
+
color: var(--tab-bar-badge-color);
|
|
509
|
+
font-size: var(--tab-bar-badge-font-size);
|
|
510
|
+
font-weight: var(--tab-bar-badge-font-weight);
|
|
511
|
+
line-height: var(--tab-bar-badge-size);
|
|
512
|
+
text-align: center;
|
|
513
|
+
white-space: nowrap;
|
|
514
|
+
pointer-events: none;
|
|
515
|
+
}
|
|
516
|
+
|
|
414
517
|
:where([data-plex-layout="phone"]) .Label {
|
|
415
518
|
max-width: 100%;
|
|
416
519
|
overflow: hidden;
|
|
@@ -461,6 +564,12 @@
|
|
|
461
564
|
background: transparent;
|
|
462
565
|
}
|
|
463
566
|
|
|
567
|
+
/* The badge stays on the circle, measured from the circle rather than the tab inside it. */
|
|
568
|
+
:where([data-plex-layout="phone"]) .TabBar[data-minimized] .Tabs .Badge {
|
|
569
|
+
top: calc(var(--tab-bar-minimized-badge-top) - var(--tab-bar-capsule-padding-block));
|
|
570
|
+
left: calc(50% + var(--tab-bar-minimized-badge-start));
|
|
571
|
+
}
|
|
572
|
+
|
|
464
573
|
/* The label still names the tab for assistive technology. */
|
|
465
574
|
:where([data-plex-layout="phone"]) .TabBar[data-minimized] .Tabs .Label {
|
|
466
575
|
position: absolute;
|
|
@@ -475,4 +584,11 @@
|
|
|
475
584
|
width: var(--tab-bar-minimized-size);
|
|
476
585
|
height: var(--tab-bar-minimized-size);
|
|
477
586
|
}
|
|
587
|
+
|
|
588
|
+
/* The accessory between the circles, as tall as they are: the bar puts it there in its order. */
|
|
589
|
+
:where([data-plex-layout="phone"]) .TabBar[data-minimized] .Accessory {
|
|
590
|
+
position: static;
|
|
591
|
+
flex: 1 1 0;
|
|
592
|
+
height: var(--tab-bar-minimized-size);
|
|
593
|
+
}
|
|
478
594
|
}
|
|
@@ -707,8 +707,9 @@
|
|
|
707
707
|
}/* Shown only on a phone, in vertical tabs (below). */.Tab > .TabCheckmark {
|
|
708
708
|
display: none;
|
|
709
709
|
}/* =============================================
|
|
710
|
-
Phone (iOS
|
|
711
|
-
(
|
|
710
|
+
Phone (iOS 27). iOS switches the views of a screen with one control, the segmented control: plain
|
|
711
|
+
in content (SwiftUI Picker .segmented, iOS 27.2) and on glass in a bar (iOS 27.2, Calendar IMG_5433);
|
|
712
|
+
it has no underline tabs and no vertical segments.
|
|
712
713
|
============================================= */@media (max-width: 767px) {
|
|
713
714
|
/* Horizontal tabs of either variant are the segmented control. Its segments share one width, as
|
|
714
715
|
UISegmentedControl divides its width (every kit example is 2 to 5 equal segments); a segment
|
|
@@ -725,8 +726,9 @@
|
|
|
725
726
|
grid-auto-columns: minmax(0, 1fr);
|
|
726
727
|
}
|
|
727
728
|
|
|
728
|
-
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike
|
|
729
|
-
|
|
729
|
+
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike, as native
|
|
730
|
+
iOS 27.2 draws it (a disabled SwiftUI Picker: track 246 and labels 127 over white, 14 and 128 over black) and
|
|
731
|
+
kit iOS 27 does (Segmented Controls 10460:145), not its labels alone. */
|
|
730
732
|
.Tabs[data-disabled][data-orientation="horizontal"] {
|
|
731
733
|
opacity: 0.5;
|
|
732
734
|
}
|
|
@@ -754,9 +756,10 @@
|
|
|
754
756
|
box-shadow: var(--segmented-control-thumb-shadow);
|
|
755
757
|
}
|
|
756
758
|
|
|
757
|
-
/* The capsule's
|
|
758
|
-
|
|
759
|
-
|
|
759
|
+
/* The capsule's material (touch.css): the plain fill of the small control, or the rim, outline and blur of the
|
|
760
|
+
shared mobile glass without its sheen on the large one and in a bar. A selection can reach past its segment by
|
|
761
|
+
the outset, which iOS 27.2 leaves at 0 (Calendar's selection is its segment). Without touch.css the track keeps
|
|
762
|
+
its fill and the selection its segment. */
|
|
760
763
|
.Tabs:where([data-orientation="horizontal"]) {
|
|
761
764
|
padding-inline: calc(var(--segmented-control-gutter) + var(--segmented-control-thumb-outset, 0px));
|
|
762
765
|
background-image: var(--segmented-control-sheen, none);
|
|
@@ -764,6 +767,65 @@
|
|
|
764
767
|
backdrop-filter: var(--segmented-control-backdrop-filter, none);
|
|
765
768
|
}
|
|
766
769
|
|
|
770
|
+
/* Held, a control grows, its glass lightens and the held segment's label fades, by the values touch.css gives the
|
|
771
|
+
large control (iOS 27.2); without them a press changes none of these. Timed to iOS 27.2 held (ref-app
|
|
772
|
+
segmented-bar-text4 recorded 11.11, after the owner's «в iOS анимация более плавная и аккуратная»): pressed, the
|
|
773
|
+
capsule grows at once, half of the way in 60ms, 96% in 130ms and 4% past at 210ms (745 to 793 @3x), its glass
|
|
774
|
+
lightens in 90ms (245 to 253) and the label fades over 430ms; let go, the label is back in a frame, the capsule
|
|
775
|
+
in 170ms a touch under and the glass in 380ms. So a quick tap barely shows the press. The press sets the timing
|
|
776
|
+
of the way in through these properties, so the transitions stay in the one-class rules the reduced-motion reset
|
|
777
|
+
after them overrides. A browser without linear() (Safari before 17.2) would drop a transition that names it, so
|
|
778
|
+
these rules give it cubic Béziers close to the curves, and the measured curves follow under @supports. */
|
|
779
|
+
.Tabs:where([data-orientation="horizontal"]) {
|
|
780
|
+
transition:
|
|
781
|
+
scale var(--segmented-control-press-scale-timing, 300ms cubic-bezier(0.3, 0.8, 0.3, 1.1)),
|
|
782
|
+
background-color var(--segmented-control-press-background-timing, 380ms ease-out);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.Tabs:where([data-orientation="horizontal"]):has(> .Tab:where(:not([disabled])):active) {
|
|
786
|
+
--segmented-control-press-scale-timing: 300ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
|
|
787
|
+
--segmented-control-press-background-timing: 90ms ease-out;
|
|
788
|
+
background-color: var(--segmented-control-pressed-background, var(--segmented-control-background));
|
|
789
|
+
scale: var(--segmented-control-pressed-scale, 1);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/* Kept as light as the reduced-motion reset at the end of the file, which must win */
|
|
793
|
+
:where(.Tabs[data-orientation="horizontal"]) .TabContent {
|
|
794
|
+
transition: opacity var(--segmented-control-press-label-timing, 110ms cubic-bezier(0.1, 0.9, 0.3, 1));
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.Tabs[data-orientation="horizontal"] .Tab[data-state="off"]:where(:not([disabled])):active > .TabContent {
|
|
798
|
+
--segmented-control-press-label-timing: 430ms ease-out;
|
|
799
|
+
opacity: var(--segmented-control-option-pressed-opacity, 1);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
@supports (transition-timing-function: linear(0, 1)) {
|
|
803
|
+
.Tabs:where([data-orientation="horizontal"]) {
|
|
804
|
+
transition:
|
|
805
|
+
scale var(--segmented-control-press-scale-timing, 300ms linear(0, 0.14 10%, 0.37 21%, 0.71 27%, 0.88 38%, 1.04 56%, 1)),
|
|
806
|
+
background-color var(--segmented-control-press-background-timing, 380ms linear(0, 0.09 8%, 0.18 16%, 0.36 22%, 0.55 30%, 0.73 39%, 0.82 56%, 0.91 69%, 1));
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.Tabs:where([data-orientation="horizontal"]):has(> .Tab:where(:not([disabled])):active) {
|
|
810
|
+
--segmented-control-press-scale-timing: 300ms linear(0, 0.08 3.7%, 0.21 10%, 0.33 15%, 0.5 20%, 0.79 32%, 0.96 43%, 1.04 71%, 1);
|
|
811
|
+
--segmented-control-press-background-timing: 90ms linear(0, 0.62 33%, 0.75 50%, 0.87 68%, 1);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
:where(.Tabs[data-orientation="horizontal"]) .TabContent {
|
|
815
|
+
transition: opacity var(--segmented-control-press-label-timing, 110ms linear(0, 0.87 15%, 0.94 50%, 1));
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.Tabs[data-orientation="horizontal"] .Tab[data-state="off"]:where(:not([disabled])):active > .TabContent {
|
|
819
|
+
--segmented-control-press-label-timing: 430ms linear(0, 0.07 2.6%, 0.16 7%, 0.29 14%, 0.47 22%, 0.6 30%, 0.78 46%, 0.9 62%, 0.96 77%, 1);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/* A switch lifts the selection into a lens past the capsule's height (Tabs playThumbLens); a control whose segments
|
|
824
|
+
all fit lets it out while it travels, as iOS 27.2 draws it over the capsule's rim. */
|
|
825
|
+
.Tabs:where([data-orientation="horizontal"])[data-lens] {
|
|
826
|
+
overflow: visible;
|
|
827
|
+
}
|
|
828
|
+
|
|
767
829
|
/* The script sets the thumb to its segment's box from the left edge, so the outset is physical. */
|
|
768
830
|
.Tabs:where([data-orientation="horizontal"]) > .TabsThumb {
|
|
769
831
|
box-sizing: content-box;
|
|
@@ -772,23 +834,54 @@
|
|
|
772
834
|
}
|
|
773
835
|
|
|
774
836
|
/* The native segment already includes its final gutter; pill scaling is desktop-only. */
|
|
775
|
-
/* The
|
|
776
|
-
|
|
777
|
-
|
|
837
|
+
/* The label keeps the base colors, the selected one primary and the others secondary, and touch.css makes the
|
|
838
|
+
secondary role primary: iOS 27.2 draws every label of the control in the label color, in content and in a bar,
|
|
839
|
+
as Calendar does in its sheet header (IMG_5433). No tracking: the system font applies its own, as native text widths show
|
|
778
840
|
(17pt "All Inboxes" 241 at @3x in Mail, 242 in Chromium without it). */
|
|
779
841
|
.Tabs[data-orientation="horizontal"] .Tab {
|
|
780
842
|
padding-inline: var(--segmented-control-option-gutter);
|
|
781
843
|
border-radius: var(--segmented-control-option-radius);
|
|
782
844
|
}
|
|
783
845
|
|
|
846
|
+
/* A symbol in its segment takes the symbol size of iOS 27.2 (touch.css); without it, the icon size. */
|
|
847
|
+
.Tabs[data-orientation="horizontal"] .TabContent > svg:where(:not([data-no-autosize])) {
|
|
848
|
+
width: var(--segmented-control-symbol-size, var(--segmented-control-icon-size));
|
|
849
|
+
height: var(--segmented-control-symbol-size, var(--segmented-control-icon-size));
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/* iOS segments carry a title or a symbol, never both (owner 10.11: «на мобиле либо тексты либо иконки в
|
|
853
|
+
сегментах»). Given both, the segment shows the symbol, as UISegmentedControl draws an action with a title and an
|
|
854
|
+
image in iOS 27.2 (the ref-app's UIKit screens, measures/segmented-variants.md), and the label stays its name for assistive technology. SwiftUI's
|
|
855
|
+
Picker draws the title of a Label instead; the docs' Segmented with icons showed no icons that way (owner 10.11:
|
|
856
|
+
«это icons???»). */
|
|
857
|
+
.Tabs[data-orientation="horizontal"] .TabContent:has(> :not(.TabLabel, .TabBadge)) > .TabLabel {
|
|
858
|
+
position: absolute;
|
|
859
|
+
width: 1px;
|
|
860
|
+
height: 1px;
|
|
861
|
+
margin: -1px;
|
|
862
|
+
padding: 0;
|
|
863
|
+
overflow: hidden;
|
|
864
|
+
clip-path: inset(50%);
|
|
865
|
+
white-space: nowrap;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/* One disabled segment of an enabled control keeps the control's opacity and takes the disabled label of iOS 27.2
|
|
869
|
+
(touch.css), where half opacity left it far darker (119 on the 238 track for native 191). */
|
|
870
|
+
.Tabs:not([data-disabled])[data-orientation="horizontal"] > .Tab[data-disabled] {
|
|
871
|
+
opacity: 1;
|
|
872
|
+
color: var(--segmented-control-option-disabled-color, var(--color-text-disabled));
|
|
873
|
+
}
|
|
874
|
+
|
|
784
875
|
/* Vertical tabs of either variant are an inset grouped list (kit Lists, Row 550:50430): rows of
|
|
785
|
-
52px with 17px text
|
|
786
|
-
|
|
787
|
-
|
|
876
|
+
52px with 17px text 20px inside the list (--mobile-list-inset), a separator from the text and the checkmark at
|
|
877
|
+
the end of the selected row, as iOS marks the one choice of a list. A symbol stands in a 24px column and the
|
|
878
|
+
text 16px after it, 60pt from the cell's edge, as UIListContentConfiguration and SwiftUI's Label place them in
|
|
879
|
+
iOS 27.2 (the symbol centred 31.7pt in, the text and the separator at 60) and as the phone Sidebar list does.
|
|
880
|
+
The selection keeps the regular weight. */
|
|
788
881
|
.Tabs:where([data-orientation="vertical"]) {
|
|
789
|
-
--segmented-control-icon-size:
|
|
790
|
-
--segmented-control-icon-offset:
|
|
791
|
-
--segmented-control-content-gap:
|
|
882
|
+
--segmented-control-icon-size: 24px;
|
|
883
|
+
--segmented-control-icon-offset: 0px;
|
|
884
|
+
--segmented-control-content-gap: 16px;
|
|
792
885
|
--option-badge-size: var(--badge-size-sm);
|
|
793
886
|
--option-badge-gutter: var(--badge-gutter-sm);
|
|
794
887
|
--option-badge-font-size: var(--badge-font-size-sm);
|
|
@@ -815,7 +908,7 @@
|
|
|
815
908
|
gap: 16px;
|
|
816
909
|
height: auto;
|
|
817
910
|
min-height: var(--field-row-min-height, 52px);
|
|
818
|
-
padding: 0 var(--mobile-
|
|
911
|
+
padding: 0 var(--mobile-list-inset, 20px);
|
|
819
912
|
border-radius: 0;
|
|
820
913
|
color: var(--color-text);
|
|
821
914
|
font-weight: inherit;
|
|
@@ -841,7 +934,8 @@
|
|
|
841
934
|
.Tabs[data-orientation="vertical"] .Tab + .Tab::after {
|
|
842
935
|
position: absolute;
|
|
843
936
|
top: 0;
|
|
844
|
-
inset
|
|
937
|
+
/* The line stops at the list inset on both ends, as between iOS 27 list rows (FieldGroup). */
|
|
938
|
+
inset-inline: var(--mobile-list-inset, 20px);
|
|
845
939
|
height: 1px;
|
|
846
940
|
background: var(--color-border);
|
|
847
941
|
content: "";
|
|
@@ -850,15 +944,18 @@
|
|
|
850
944
|
|
|
851
945
|
.Tabs[data-orientation="vertical"] .Tab:has(> .TabContent > svg:first-child:not(:only-child)) + .Tab::after,
|
|
852
946
|
.Tabs[data-orientation="vertical"] .Tab + .Tab:has(> .TabContent > svg:first-child:not(:only-child))::after {
|
|
853
|
-
inset-inline-start: calc(var(--mobile-
|
|
947
|
+
inset-inline-start: calc(var(--mobile-list-inset, 20px) + 40px);
|
|
854
948
|
}
|
|
855
949
|
|
|
950
|
+
/* The checkmark of an iOS 27.2 list row (RadioGroup.module.css): the symbol at 26px, its ink ending 24.3pt from
|
|
951
|
+
the cell's edge, in the row's 22px line. */
|
|
856
952
|
.Tabs[data-orientation="vertical"] .Tab > .TabCheckmark {
|
|
857
953
|
display: block;
|
|
858
954
|
flex: none;
|
|
859
|
-
width:
|
|
860
|
-
height:
|
|
861
|
-
margin-
|
|
955
|
+
width: 26px;
|
|
956
|
+
height: 26px;
|
|
957
|
+
margin-block: -2px;
|
|
958
|
+
margin-inline: auto -2px;
|
|
862
959
|
visibility: hidden;
|
|
863
960
|
}
|
|
864
961
|
|
|
@@ -881,8 +978,9 @@
|
|
|
881
978
|
grid-auto-columns: minmax(0, 1fr);
|
|
882
979
|
}
|
|
883
980
|
|
|
884
|
-
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike
|
|
885
|
-
|
|
981
|
+
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike, as native
|
|
982
|
+
iOS 27.2 draws it (a disabled SwiftUI Picker: track 246 and labels 127 over white, 14 and 128 over black) and
|
|
983
|
+
kit iOS 27 does (Segmented Controls 10460:145), not its labels alone. */
|
|
886
984
|
:where([data-plex-layout="phone"]) .Tabs[data-disabled][data-orientation="horizontal"] {
|
|
887
985
|
opacity: 0.5;
|
|
888
986
|
}
|
|
@@ -910,9 +1008,10 @@
|
|
|
910
1008
|
box-shadow: var(--segmented-control-thumb-shadow);
|
|
911
1009
|
}
|
|
912
1010
|
|
|
913
|
-
/* The capsule's
|
|
914
|
-
|
|
915
|
-
|
|
1011
|
+
/* The capsule's material (touch.css): the plain fill of the small control, or the rim, outline and blur of the
|
|
1012
|
+
shared mobile glass without its sheen on the large one and in a bar. A selection can reach past its segment by
|
|
1013
|
+
the outset, which iOS 27.2 leaves at 0 (Calendar's selection is its segment). Without touch.css the track keeps
|
|
1014
|
+
its fill and the selection its segment. */
|
|
916
1015
|
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) {
|
|
917
1016
|
padding-inline: calc(var(--segmented-control-gutter) + var(--segmented-control-thumb-outset, 0px));
|
|
918
1017
|
background-image: var(--segmented-control-sheen, none);
|
|
@@ -920,6 +1019,65 @@
|
|
|
920
1019
|
backdrop-filter: var(--segmented-control-backdrop-filter, none);
|
|
921
1020
|
}
|
|
922
1021
|
|
|
1022
|
+
/* Held, a control grows, its glass lightens and the held segment's label fades, by the values touch.css gives the
|
|
1023
|
+
large control (iOS 27.2); without them a press changes none of these. Timed to iOS 27.2 held (ref-app
|
|
1024
|
+
segmented-bar-text4 recorded 11.11, after the owner's «в iOS анимация более плавная и аккуратная»): pressed, the
|
|
1025
|
+
capsule grows at once, half of the way in 60ms, 96% in 130ms and 4% past at 210ms (745 to 793 @3x), its glass
|
|
1026
|
+
lightens in 90ms (245 to 253) and the label fades over 430ms; let go, the label is back in a frame, the capsule
|
|
1027
|
+
in 170ms a touch under and the glass in 380ms. So a quick tap barely shows the press. The press sets the timing
|
|
1028
|
+
of the way in through these properties, so the transitions stay in the one-class rules the reduced-motion reset
|
|
1029
|
+
after them overrides. A browser without linear() (Safari before 17.2) would drop a transition that names it, so
|
|
1030
|
+
these rules give it cubic Béziers close to the curves, and the measured curves follow under @supports. */
|
|
1031
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) {
|
|
1032
|
+
transition:
|
|
1033
|
+
scale var(--segmented-control-press-scale-timing, 300ms cubic-bezier(0.3, 0.8, 0.3, 1.1)),
|
|
1034
|
+
background-color var(--segmented-control-press-background-timing, 380ms ease-out);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]):has(> .Tab:where(:not([disabled])):active) {
|
|
1038
|
+
--segmented-control-press-scale-timing: 300ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
|
|
1039
|
+
--segmented-control-press-background-timing: 90ms ease-out;
|
|
1040
|
+
background-color: var(--segmented-control-pressed-background, var(--segmented-control-background));
|
|
1041
|
+
scale: var(--segmented-control-pressed-scale, 1);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/* Kept as light as the reduced-motion reset at the end of the file, which must win */
|
|
1045
|
+
:where([data-plex-layout="phone"]) :where(.Tabs[data-orientation="horizontal"]) .TabContent {
|
|
1046
|
+
transition: opacity var(--segmented-control-press-label-timing, 110ms cubic-bezier(0.1, 0.9, 0.3, 1));
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .Tab[data-state="off"]:where(:not([disabled])):active > .TabContent {
|
|
1050
|
+
--segmented-control-press-label-timing: 430ms ease-out;
|
|
1051
|
+
opacity: var(--segmented-control-option-pressed-opacity, 1);
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
@supports (transition-timing-function: linear(0, 1)) {
|
|
1055
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) {
|
|
1056
|
+
transition:
|
|
1057
|
+
scale var(--segmented-control-press-scale-timing, 300ms linear(0, 0.14 10%, 0.37 21%, 0.71 27%, 0.88 38%, 1.04 56%, 1)),
|
|
1058
|
+
background-color var(--segmented-control-press-background-timing, 380ms linear(0, 0.09 8%, 0.18 16%, 0.36 22%, 0.55 30%, 0.73 39%, 0.82 56%, 0.91 69%, 1));
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]):has(> .Tab:where(:not([disabled])):active) {
|
|
1062
|
+
--segmented-control-press-scale-timing: 300ms linear(0, 0.08 3.7%, 0.21 10%, 0.33 15%, 0.5 20%, 0.79 32%, 0.96 43%, 1.04 71%, 1);
|
|
1063
|
+
--segmented-control-press-background-timing: 90ms linear(0, 0.62 33%, 0.75 50%, 0.87 68%, 1);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
:where([data-plex-layout="phone"]) :where(.Tabs[data-orientation="horizontal"]) .TabContent {
|
|
1067
|
+
transition: opacity var(--segmented-control-press-label-timing, 110ms linear(0, 0.87 15%, 0.94 50%, 1));
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .Tab[data-state="off"]:where(:not([disabled])):active > .TabContent {
|
|
1071
|
+
--segmented-control-press-label-timing: 430ms linear(0, 0.07 2.6%, 0.16 7%, 0.29 14%, 0.47 22%, 0.6 30%, 0.78 46%, 0.9 62%, 0.96 77%, 1);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/* A switch lifts the selection into a lens past the capsule's height (Tabs playThumbLens); a control whose segments
|
|
1076
|
+
all fit lets it out while it travels, as iOS 27.2 draws it over the capsule's rim. */
|
|
1077
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"])[data-lens] {
|
|
1078
|
+
overflow: visible;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
923
1081
|
/* The script sets the thumb to its segment's box from the left edge, so the outset is physical. */
|
|
924
1082
|
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) > .TabsThumb {
|
|
925
1083
|
box-sizing: content-box;
|
|
@@ -928,23 +1086,54 @@
|
|
|
928
1086
|
}
|
|
929
1087
|
|
|
930
1088
|
/* The native segment already includes its final gutter; pill scaling is desktop-only. */
|
|
931
|
-
/* The
|
|
932
|
-
|
|
933
|
-
|
|
1089
|
+
/* The label keeps the base colors, the selected one primary and the others secondary, and touch.css makes the
|
|
1090
|
+
secondary role primary: iOS 27.2 draws every label of the control in the label color, in content and in a bar,
|
|
1091
|
+
as Calendar does in its sheet header (IMG_5433). No tracking: the system font applies its own, as native text widths show
|
|
934
1092
|
(17pt "All Inboxes" 241 at @3x in Mail, 242 in Chromium without it). */
|
|
935
1093
|
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .Tab {
|
|
936
1094
|
padding-inline: var(--segmented-control-option-gutter);
|
|
937
1095
|
border-radius: var(--segmented-control-option-radius);
|
|
938
1096
|
}
|
|
939
1097
|
|
|
1098
|
+
/* A symbol in its segment takes the symbol size of iOS 27.2 (touch.css); without it, the icon size. */
|
|
1099
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .TabContent > svg:where(:not([data-no-autosize])) {
|
|
1100
|
+
width: var(--segmented-control-symbol-size, var(--segmented-control-icon-size));
|
|
1101
|
+
height: var(--segmented-control-symbol-size, var(--segmented-control-icon-size));
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/* iOS segments carry a title or a symbol, never both (owner 10.11: «на мобиле либо тексты либо иконки в
|
|
1105
|
+
сегментах»). Given both, the segment shows the symbol, as UISegmentedControl draws an action with a title and an
|
|
1106
|
+
image in iOS 27.2 (the ref-app's UIKit screens, measures/segmented-variants.md), and the label stays its name for assistive technology. SwiftUI's
|
|
1107
|
+
Picker draws the title of a Label instead; the docs' Segmented with icons showed no icons that way (owner 10.11:
|
|
1108
|
+
«это icons???»). */
|
|
1109
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .TabContent:has(> :not(.TabLabel, .TabBadge)) > .TabLabel {
|
|
1110
|
+
position: absolute;
|
|
1111
|
+
width: 1px;
|
|
1112
|
+
height: 1px;
|
|
1113
|
+
margin: -1px;
|
|
1114
|
+
padding: 0;
|
|
1115
|
+
overflow: hidden;
|
|
1116
|
+
clip-path: inset(50%);
|
|
1117
|
+
white-space: nowrap;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/* One disabled segment of an enabled control keeps the control's opacity and takes the disabled label of iOS 27.2
|
|
1121
|
+
(touch.css), where half opacity left it far darker (119 on the 238 track for native 191). */
|
|
1122
|
+
:where([data-plex-layout="phone"]) .Tabs:not([data-disabled])[data-orientation="horizontal"] > .Tab[data-disabled] {
|
|
1123
|
+
opacity: 1;
|
|
1124
|
+
color: var(--segmented-control-option-disabled-color, var(--color-text-disabled));
|
|
1125
|
+
}
|
|
1126
|
+
|
|
940
1127
|
/* Vertical tabs of either variant are an inset grouped list (kit Lists, Row 550:50430): rows of
|
|
941
|
-
52px with 17px text
|
|
942
|
-
|
|
943
|
-
|
|
1128
|
+
52px with 17px text 20px inside the list (--mobile-list-inset), a separator from the text and the checkmark at
|
|
1129
|
+
the end of the selected row, as iOS marks the one choice of a list. A symbol stands in a 24px column and the
|
|
1130
|
+
text 16px after it, 60pt from the cell's edge, as UIListContentConfiguration and SwiftUI's Label place them in
|
|
1131
|
+
iOS 27.2 (the symbol centred 31.7pt in, the text and the separator at 60) and as the phone Sidebar list does.
|
|
1132
|
+
The selection keeps the regular weight. */
|
|
944
1133
|
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="vertical"]) {
|
|
945
|
-
--segmented-control-icon-size:
|
|
946
|
-
--segmented-control-icon-offset:
|
|
947
|
-
--segmented-control-content-gap:
|
|
1134
|
+
--segmented-control-icon-size: 24px;
|
|
1135
|
+
--segmented-control-icon-offset: 0px;
|
|
1136
|
+
--segmented-control-content-gap: 16px;
|
|
948
1137
|
--option-badge-size: var(--badge-size-sm);
|
|
949
1138
|
--option-badge-gutter: var(--badge-gutter-sm);
|
|
950
1139
|
--option-badge-font-size: var(--badge-font-size-sm);
|
|
@@ -971,7 +1160,7 @@
|
|
|
971
1160
|
gap: 16px;
|
|
972
1161
|
height: auto;
|
|
973
1162
|
min-height: var(--field-row-min-height, 52px);
|
|
974
|
-
padding: 0 var(--mobile-
|
|
1163
|
+
padding: 0 var(--mobile-list-inset, 20px);
|
|
975
1164
|
border-radius: 0;
|
|
976
1165
|
color: var(--color-text);
|
|
977
1166
|
font-weight: inherit;
|
|
@@ -997,7 +1186,8 @@
|
|
|
997
1186
|
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab + .Tab::after {
|
|
998
1187
|
position: absolute;
|
|
999
1188
|
top: 0;
|
|
1000
|
-
inset
|
|
1189
|
+
/* The line stops at the list inset on both ends, as between iOS 27 list rows (FieldGroup). */
|
|
1190
|
+
inset-inline: var(--mobile-list-inset, 20px);
|
|
1001
1191
|
height: 1px;
|
|
1002
1192
|
background: var(--color-border);
|
|
1003
1193
|
content: "";
|
|
@@ -1006,15 +1196,18 @@
|
|
|
1006
1196
|
|
|
1007
1197
|
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab:has(> .TabContent > svg:first-child:not(:only-child)) + .Tab::after,
|
|
1008
1198
|
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab + .Tab:has(> .TabContent > svg:first-child:not(:only-child))::after {
|
|
1009
|
-
inset-inline-start: calc(var(--mobile-
|
|
1199
|
+
inset-inline-start: calc(var(--mobile-list-inset, 20px) + 40px);
|
|
1010
1200
|
}
|
|
1011
1201
|
|
|
1202
|
+
/* The checkmark of an iOS 27.2 list row (RadioGroup.module.css): the symbol at 26px, its ink ending 24.3pt from
|
|
1203
|
+
the cell's edge, in the row's 22px line. */
|
|
1012
1204
|
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab > .TabCheckmark {
|
|
1013
1205
|
display: block;
|
|
1014
1206
|
flex: none;
|
|
1015
|
-
width:
|
|
1016
|
-
height:
|
|
1017
|
-
margin-
|
|
1207
|
+
width: 26px;
|
|
1208
|
+
height: 26px;
|
|
1209
|
+
margin-block: -2px;
|
|
1210
|
+
margin-inline: auto -2px;
|
|
1018
1211
|
visibility: hidden;
|
|
1019
1212
|
}
|
|
1020
1213
|
|
|
@@ -1025,8 +1218,10 @@
|
|
|
1025
1218
|
--tabs-thumb-transition-duration: 0ms;
|
|
1026
1219
|
}
|
|
1027
1220
|
|
|
1221
|
+
.Tabs,
|
|
1028
1222
|
.Tab,
|
|
1029
|
-
.Tab::before
|
|
1223
|
+
.Tab::before,
|
|
1224
|
+
.TabContent {
|
|
1030
1225
|
transition-duration: 0ms;
|
|
1031
1226
|
}
|
|
1032
1227
|
}
|