@plexui/styles 0.5.0 → 0.7.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.
|
@@ -721,6 +721,9 @@
|
|
|
721
721
|
container, as the 370px kit examples do, and its labels shorten instead. */
|
|
722
722
|
.Tabs:where([data-orientation="horizontal"]) {
|
|
723
723
|
--tabs-equal-segments: 1;
|
|
724
|
+
/* Where labels by their widths still overflow, the air beside each narrows (segments.ts), as UIKit narrows a
|
|
725
|
+
squeezed control's to 4pt, before the segments scroll */
|
|
726
|
+
--tabs-fit-segments: 1;
|
|
724
727
|
|
|
725
728
|
display: inline-grid;
|
|
726
729
|
grid-auto-columns: var(--tabs-segment-track, minmax(max-content, auto));
|
|
@@ -729,11 +732,32 @@
|
|
|
729
732
|
|
|
730
733
|
.Tabs:where([data-orientation="horizontal"][data-block]) {
|
|
731
734
|
--tabs-equal-segments: 0;
|
|
735
|
+
--tabs-fit-segments: 0;
|
|
732
736
|
|
|
733
737
|
display: grid;
|
|
734
738
|
grid-auto-columns: minmax(0, 1fr);
|
|
735
739
|
}
|
|
736
740
|
|
|
741
|
+
/* mobileSegmentWidth="content": each segment its label and the same air around it, the compact control of
|
|
742
|
+
apportionsSegmentWidthsByContent (owner 13.11, ref-app segmented-hug: «компактно/не компактно? у нас будут?»). */
|
|
743
|
+
.Tabs:where([data-orientation="horizontal"][data-mobile-segment-width="content"]) {
|
|
744
|
+
--tabs-equal-segments: 0;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/* iOS segments carry a title or a symbol and no badge (owner 13.11: «я с бейджами не встречал сегментед контролов
|
|
748
|
+
на ios»). On a phone a badge is not drawn; its count stays in the segment's name for assistive technology. */
|
|
749
|
+
.Tabs[data-orientation="horizontal"] .TabBadge {
|
|
750
|
+
position: absolute;
|
|
751
|
+
width: 1px;
|
|
752
|
+
height: 1px;
|
|
753
|
+
padding: 0;
|
|
754
|
+
border: 0;
|
|
755
|
+
margin: -1px;
|
|
756
|
+
overflow: hidden;
|
|
757
|
+
clip-path: inset(50%);
|
|
758
|
+
white-space: nowrap;
|
|
759
|
+
}
|
|
760
|
+
|
|
737
761
|
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike, as native
|
|
738
762
|
iOS 27.2 draws it (a disabled SwiftUI Picker: track 246 and labels 127 over white, 14 and 128 over black) and
|
|
739
763
|
kit iOS 27 does (Segmented Controls 10460:145), not its labels alone. */
|
|
@@ -847,7 +871,7 @@
|
|
|
847
871
|
as Calendar does in its sheet header (IMG_5433). No tracking of its own: the label takes --font-sans-tracking at its
|
|
848
872
|
size, as every text (native SF tracks itself: 17pt "All Inboxes" 241 at @3x in Mail). */
|
|
849
873
|
.Tabs[data-orientation="horizontal"] .Tab {
|
|
850
|
-
padding-inline: var(--segmented-control-option-gutter);
|
|
874
|
+
padding-inline: var(--tabs-segment-gutter, var(--segmented-control-option-gutter));
|
|
851
875
|
border-radius: var(--segmented-control-option-radius);
|
|
852
876
|
}
|
|
853
877
|
|
|
@@ -981,6 +1005,9 @@
|
|
|
981
1005
|
container, as the 370px kit examples do, and its labels shorten instead. */
|
|
982
1006
|
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) {
|
|
983
1007
|
--tabs-equal-segments: 1;
|
|
1008
|
+
/* Where labels by their widths still overflow, the air beside each narrows (segments.ts), as UIKit narrows a
|
|
1009
|
+
squeezed control's to 4pt, before the segments scroll */
|
|
1010
|
+
--tabs-fit-segments: 1;
|
|
984
1011
|
|
|
985
1012
|
display: inline-grid;
|
|
986
1013
|
grid-auto-columns: var(--tabs-segment-track, minmax(max-content, auto));
|
|
@@ -989,11 +1016,32 @@
|
|
|
989
1016
|
|
|
990
1017
|
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"][data-block]) {
|
|
991
1018
|
--tabs-equal-segments: 0;
|
|
1019
|
+
--tabs-fit-segments: 0;
|
|
992
1020
|
|
|
993
1021
|
display: grid;
|
|
994
1022
|
grid-auto-columns: minmax(0, 1fr);
|
|
995
1023
|
}
|
|
996
1024
|
|
|
1025
|
+
/* mobileSegmentWidth="content": each segment its label and the same air around it, the compact control of
|
|
1026
|
+
apportionsSegmentWidthsByContent (owner 13.11, ref-app segmented-hug: «компактно/не компактно? у нас будут?»). */
|
|
1027
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"][data-mobile-segment-width="content"]) {
|
|
1028
|
+
--tabs-equal-segments: 0;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/* iOS segments carry a title or a symbol and no badge (owner 13.11: «я с бейджами не встречал сегментед контролов
|
|
1032
|
+
на ios»). On a phone a badge is not drawn; its count stays in the segment's name for assistive technology. */
|
|
1033
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .TabBadge {
|
|
1034
|
+
position: absolute;
|
|
1035
|
+
width: 1px;
|
|
1036
|
+
height: 1px;
|
|
1037
|
+
padding: 0;
|
|
1038
|
+
border: 0;
|
|
1039
|
+
margin: -1px;
|
|
1040
|
+
overflow: hidden;
|
|
1041
|
+
clip-path: inset(50%);
|
|
1042
|
+
white-space: nowrap;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
997
1045
|
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike, as native
|
|
998
1046
|
iOS 27.2 draws it (a disabled SwiftUI Picker: track 246 and labels 127 over white, 14 and 128 over black) and
|
|
999
1047
|
kit iOS 27 does (Segmented Controls 10460:145), not its labels alone. */
|
|
@@ -1107,7 +1155,7 @@
|
|
|
1107
1155
|
as Calendar does in its sheet header (IMG_5433). No tracking of its own: the label takes --font-sans-tracking at its
|
|
1108
1156
|
size, as every text (native SF tracks itself: 17pt "All Inboxes" 241 at @3x in Mail). */
|
|
1109
1157
|
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .Tab {
|
|
1110
|
-
padding-inline: var(--segmented-control-option-gutter);
|
|
1158
|
+
padding-inline: var(--tabs-segment-gutter, var(--segmented-control-option-gutter));
|
|
1111
1159
|
border-radius: var(--segmented-control-option-radius);
|
|
1112
1160
|
}
|
|
1113
1161
|
|
|
@@ -395,8 +395,8 @@
|
|
|
395
395
|
bar's controls, so the bar's background, edge and line take it in. Several rows stand in their order, 10 apart: a
|
|
396
396
|
search field over a segmented control, as iOS 27.2 sets a safeAreaBar under the search field of the bar's drawer
|
|
397
397
|
(ref-app segsearch-inline; owner 13.11 «первый ряд - кнопки и тайтл, второй ряд поиск, третий ряд - сегментед
|
|
398
|
-
контрол»). A SegmentedControl in it is
|
|
399
|
-
the row (its segments share the width, and scroll when they do not fit; a block one shortens its labels instead). */
|
|
398
|
+
контрол»). A SegmentedControl in it is a 40px glass one at its default size, as a chat list draws its folders under
|
|
399
|
+
its bar (touch.css, IMG_5550; owner 13.11 «Да, стекло»), and fills the row (its segments share the width, and scroll when they do not fit; a block one shortens its labels instead). */
|
|
400
400
|
.Row {
|
|
401
401
|
display: flex;
|
|
402
402
|
grid-column: 1 / -1;
|
|
@@ -1217,8 +1217,8 @@
|
|
|
1217
1217
|
bar's controls, so the bar's background, edge and line take it in. Several rows stand in their order, 10 apart: a
|
|
1218
1218
|
search field over a segmented control, as iOS 27.2 sets a safeAreaBar under the search field of the bar's drawer
|
|
1219
1219
|
(ref-app segsearch-inline; owner 13.11 «первый ряд - кнопки и тайтл, второй ряд поиск, третий ряд - сегментед
|
|
1220
|
-
контрол»). A SegmentedControl in it is
|
|
1221
|
-
the row (its segments share the width, and scroll when they do not fit; a block one shortens its labels instead). */
|
|
1220
|
+
контрол»). A SegmentedControl in it is a 40px glass one at its default size, as a chat list draws its folders under
|
|
1221
|
+
its bar (touch.css, IMG_5550; owner 13.11 «Да, стекло»), and fills the row (its segments share the width, and scroll when they do not fit; a block one shortens its labels instead). */
|
|
1222
1222
|
:where([data-plex-layout="phone"]) .Row {
|
|
1223
1223
|
display: flex;
|
|
1224
1224
|
grid-column: 1 / -1;
|
package/dist/es/styles/touch.css
CHANGED
|
@@ -653,7 +653,7 @@
|
|
|
653
653
|
--segmented-control-thumb-outset: 0px;
|
|
654
654
|
--segmented-control-radius: 100px;
|
|
655
655
|
--segmented-control-option-radius: calc(var(--segmented-control-size) / 2 - var(--segmented-control-gutter));
|
|
656
|
-
--segmented-control-option-gutter:
|
|
656
|
+
--segmented-control-option-gutter: 9px;
|
|
657
657
|
--segmented-control-font-size: 13px;
|
|
658
658
|
--segmented-control-line-height: 18px;
|
|
659
659
|
--segmented-control-font-weight: 510;
|
|
@@ -678,7 +678,8 @@
|
|
|
678
678
|
--segmented-control-size: 49px;
|
|
679
679
|
}
|
|
680
680
|
html :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])),
|
|
681
|
-
html [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *)
|
|
681
|
+
html [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *),
|
|
682
|
+
html [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
682
683
|
--segmented-control-size: 48px;
|
|
683
684
|
--segmented-control-gutter: 4px;
|
|
684
685
|
--segmented-control-gap: 8px;
|
|
@@ -701,14 +702,21 @@
|
|
|
701
702
|
--segmented-control-thumb-lens-background: var(--segmented-control-mobile-thumb-lens-background);
|
|
702
703
|
--segmented-control-thumb-lens-shadow: var(--segmented-control-mobile-thumb-lens-shadow);
|
|
703
704
|
}
|
|
705
|
+
html [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
706
|
+
--segmented-control-size: 40px;
|
|
707
|
+
--segmented-control-gutter: 3px;
|
|
708
|
+
--segmented-control-option-gutter: 12px;
|
|
709
|
+
}
|
|
704
710
|
@media (prefers-reduced-motion: no-preference) {
|
|
705
711
|
html :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])),
|
|
706
|
-
html [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *)
|
|
712
|
+
html [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *),
|
|
713
|
+
html [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
707
714
|
--tabs-thumb-transition-duration: 400ms;
|
|
708
715
|
}
|
|
709
716
|
@supports (transition-timing-function: linear(0, 1)) {
|
|
710
717
|
html :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])),
|
|
711
|
-
html [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *)
|
|
718
|
+
html [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *),
|
|
719
|
+
html [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
712
720
|
--tabs-thumb-transition-easing: linear(0, 0.2 3%, 0.33 6.25%, 0.45 10%, 0.538 12.25%, 0.623 16.25%, 0.69 20%, 0.747 24.25%, 0.793 28.75%, 0.83 32.5%, 0.862 36.75%, 0.887 41%, 0.908 45%, 0.925 49.25%, 0.943 53.5%, 0.956 58%, 0.975 66%, 0.981 70%, 0.989 74.75%, 0.994 82.5%, 1);
|
|
713
721
|
}
|
|
714
722
|
}
|
|
@@ -1313,7 +1321,7 @@ html:root:where([data-theme="dark"]) :where([data-plex-layout="phone"]), html:ro
|
|
|
1313
1321
|
--segmented-control-thumb-outset: 0px;
|
|
1314
1322
|
--segmented-control-radius: 100px;
|
|
1315
1323
|
--segmented-control-option-radius: calc(var(--segmented-control-size) / 2 - var(--segmented-control-gutter));
|
|
1316
|
-
--segmented-control-option-gutter:
|
|
1324
|
+
--segmented-control-option-gutter: 9px;
|
|
1317
1325
|
--segmented-control-font-size: 13px;
|
|
1318
1326
|
--segmented-control-line-height: 18px;
|
|
1319
1327
|
--segmented-control-font-weight: 510;
|
|
@@ -1337,7 +1345,7 @@ html:root:where([data-theme="dark"]) :where([data-plex-layout="phone"]), html:ro
|
|
|
1337
1345
|
html :where([data-plex-layout="phone"]) [data-mobile-material="flat"]:is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])) {
|
|
1338
1346
|
--segmented-control-size: 49px;
|
|
1339
1347
|
}
|
|
1340
|
-
html :where([data-plex-layout="phone"]) :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])), html :where([data-plex-layout="phone"]) [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *) {
|
|
1348
|
+
html :where([data-plex-layout="phone"]) :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])), html :where([data-plex-layout="phone"]) [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *), html :where([data-plex-layout="phone"]) [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
1341
1349
|
--segmented-control-size: 48px;
|
|
1342
1350
|
--segmented-control-gutter: 4px;
|
|
1343
1351
|
--segmented-control-gap: 8px;
|
|
@@ -1360,12 +1368,17 @@ html:root:where([data-theme="dark"]) :where([data-plex-layout="phone"]), html:ro
|
|
|
1360
1368
|
--segmented-control-thumb-lens-background: var(--segmented-control-mobile-thumb-lens-background);
|
|
1361
1369
|
--segmented-control-thumb-lens-shadow: var(--segmented-control-mobile-thumb-lens-shadow);
|
|
1362
1370
|
}
|
|
1371
|
+
html :where([data-plex-layout="phone"]) [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
1372
|
+
--segmented-control-size: 40px;
|
|
1373
|
+
--segmented-control-gutter: 3px;
|
|
1374
|
+
--segmented-control-option-gutter: 12px;
|
|
1375
|
+
}
|
|
1363
1376
|
@media (prefers-reduced-motion: no-preference) {
|
|
1364
|
-
html :where([data-plex-layout="phone"]) :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])), html :where([data-plex-layout="phone"]) [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *) {
|
|
1377
|
+
html :where([data-plex-layout="phone"]) :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])), html :where([data-plex-layout="phone"]) [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *), html :where([data-plex-layout="phone"]) [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
1365
1378
|
--tabs-thumb-transition-duration: 400ms;
|
|
1366
1379
|
}
|
|
1367
1380
|
@supports (transition-timing-function: linear(0, 1)) {
|
|
1368
|
-
html :where([data-plex-layout="phone"]) :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])), html :where([data-plex-layout="phone"]) [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *) {
|
|
1381
|
+
html :where([data-plex-layout="phone"]) :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:where(:not([data-mobile-material="flat"], [data-mobile-size="small"], [data-size="3xs"], [data-size="2xs"], [data-size="xs"], [data-size="sm"], [data-toolbar-row] [data-size="md"])), html :where([data-plex-layout="phone"]) [data-toolbar] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"]:not([data-toolbar-row] *), html :where([data-plex-layout="phone"]) [data-toolbar-row] :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"][data-size="md"]:not([data-mobile-material="flat"], [data-mobile-size="small"]) {
|
|
1369
1382
|
--tabs-thumb-transition-easing: linear(0, 0.2 3%, 0.33 6.25%, 0.45 10%, 0.538 12.25%, 0.623 16.25%, 0.69 20%, 0.747 24.25%, 0.793 28.75%, 0.83 32.5%, 0.862 36.75%, 0.887 41%, 0.908 45%, 0.925 49.25%, 0.943 53.5%, 0.956 58%, 0.975 66%, 0.981 70%, 0.989 74.75%, 0.994 82.5%, 1);
|
|
1370
1383
|
}
|
|
1371
1384
|
}
|