@plexui/styles 0.5.0 → 0.6.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
|
|
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;
|
|
@@ -1313,7 +1313,7 @@ html:root:where([data-theme="dark"]) :where([data-plex-layout="phone"]), html:ro
|
|
|
1313
1313
|
--segmented-control-thumb-outset: 0px;
|
|
1314
1314
|
--segmented-control-radius: 100px;
|
|
1315
1315
|
--segmented-control-option-radius: calc(var(--segmented-control-size) / 2 - var(--segmented-control-gutter));
|
|
1316
|
-
--segmented-control-option-gutter:
|
|
1316
|
+
--segmented-control-option-gutter: 9px;
|
|
1317
1317
|
--segmented-control-font-size: 13px;
|
|
1318
1318
|
--segmented-control-line-height: 18px;
|
|
1319
1319
|
--segmented-control-font-weight: 510;
|