@plexui/styles 0.1.34 → 0.1.35
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 +12 -1
- package/dist/es/components/Alert/Alert.module.css +101 -0
- package/dist/es/components/Badge/Badge.module.css +37 -0
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +29 -0
- package/dist/es/components/Button/Button.module.css +53 -0
- package/dist/es/components/Button/NavigationButton.module.css +17 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.module.css +227 -20
- package/dist/es/components/Card/Card.module.css +9 -0
- package/dist/es/components/CodeBlock/CodeBlock.module.css +14 -1
- package/dist/es/components/ColorPicker/ColorPicker.module.css +19 -1
- package/dist/es/components/DatePicker/Calendar.module.css +262 -2
- package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +10 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +207 -3
- package/dist/es/components/DateRangePicker/Trigger.module.css +17 -2
- package/dist/es/components/Dialog/Dialog.module.css +660 -13
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +21 -0
- package/dist/es/components/Field/Field.module.css +387 -2
- package/dist/es/components/FieldGroup/FieldGroup.module.css +129 -3
- package/dist/es/components/FileUpload/FileUpload.module.css +74 -1
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +19 -1
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +12 -1
- package/dist/es/components/IndexBar/IndexBar.module.css +146 -0
- package/dist/es/components/Input/Input.module.css +129 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +18 -0
- package/dist/es/components/Menu/Menu.module.css +267 -7
- package/dist/es/components/OTPInput/OTPInput.module.css +6 -1
- package/dist/es/components/Page/Page.module.css +302 -10
- package/dist/es/components/PhoneLayout/PhoneLayout.module.css +10 -0
- package/dist/es/components/Popover/Popover.module.css +7 -0
- package/dist/es/components/Select/Select.module.css +148 -0
- package/dist/es/components/SelectControl/SelectControl.module.css +113 -1
- package/dist/es/components/Sidebar/Sidebar.module.css +354 -20
- package/dist/es/components/Slider/Slider.module.css +80 -0
- package/dist/es/components/SwipeActions/SwipeActions.module.css +166 -0
- package/dist/es/components/Switch/Switch.module.css +59 -4
- package/dist/es/components/TabBar/TabBar.module.css +255 -10
- package/dist/es/components/Tabs/Tabs.module.css +166 -1
- package/dist/es/components/TagInput/TagInput.module.css +50 -9
- package/dist/es/components/Textarea/Textarea.module.css +6 -0
- package/dist/es/components/Tip/Tip.module.css +456 -0
- package/dist/es/components/Toast/Toast.module.css +148 -5
- package/dist/es/components/Toolbar/Toolbar.module.css +642 -3
- package/dist/es/styles/mobile-materials.css +94 -5
- package/dist/es/styles/mobile-surfaces.css +43 -0
- package/dist/es/styles/touch.css +618 -8
- package/dist/es/styles/variables-components.css +125 -5
- package/package.json +1 -1
- package/postcss/parseLightDark.mjs +20 -2
- package/postcss/phoneLayoutScope.mjs +134 -0
- package/postcss.config.mjs +3 -0
|
@@ -725,6 +725,16 @@
|
|
|
725
725
|
grid-auto-columns: minmax(0, 1fr);
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
+
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike (kit iOS 27
|
|
729
|
+
Segmented Controls 10460:145, where the disabled control is the enabled one at 50%), not its labels alone. */
|
|
730
|
+
.Tabs[data-disabled][data-orientation="horizontal"] {
|
|
731
|
+
opacity: 0.5;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
.Tabs[data-disabled][data-orientation="horizontal"] > .Tab[data-disabled] {
|
|
735
|
+
opacity: 1;
|
|
736
|
+
}
|
|
737
|
+
|
|
728
738
|
.Tabs:where([data-variant="underline"][data-orientation="horizontal"]) {
|
|
729
739
|
--segmented-control-option-radius: calc(var(--segmented-control-radius) - var(--segmented-control-gutter));
|
|
730
740
|
|
|
@@ -855,7 +865,162 @@
|
|
|
855
865
|
.Tabs[data-orientation="vertical"] .Tab[data-state="on"] > .TabCheckmark {
|
|
856
866
|
visibility: visible;
|
|
857
867
|
}
|
|
858
|
-
}
|
|
868
|
+
}
|
|
869
|
+
/* Horizontal tabs of either variant are the segmented control. Its segments share one width, as
|
|
870
|
+
UISegmentedControl divides its width (every kit example is 2 to 5 equal segments); a segment
|
|
871
|
+
never narrows below its content, so tabs that do not fit still scroll. A block control fills its
|
|
872
|
+
container, as the 370px kit examples do, and its labels shorten instead. */
|
|
873
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) {
|
|
874
|
+
display: inline-grid;
|
|
875
|
+
grid-auto-columns: minmax(max-content, 1fr);
|
|
876
|
+
grid-auto-flow: column;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"][data-block]) {
|
|
880
|
+
display: grid;
|
|
881
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/* Disabled as a whole, the control shows at half opacity, its capsule, selection and labels alike (kit iOS 27
|
|
885
|
+
Segmented Controls 10460:145, where the disabled control is the enabled one at 50%), not its labels alone. */
|
|
886
|
+
:where([data-plex-layout="phone"]) .Tabs[data-disabled][data-orientation="horizontal"] {
|
|
887
|
+
opacity: 0.5;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
:where([data-plex-layout="phone"]) .Tabs[data-disabled][data-orientation="horizontal"] > .Tab[data-disabled] {
|
|
891
|
+
opacity: 1;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-variant="underline"][data-orientation="horizontal"]) {
|
|
895
|
+
--segmented-control-option-radius: calc(var(--segmented-control-radius) - var(--segmented-control-gutter));
|
|
896
|
+
|
|
897
|
+
gap: var(--segmented-control-gap);
|
|
898
|
+
padding: var(--segmented-control-gutter);
|
|
899
|
+
border: 0;
|
|
900
|
+
border-radius: var(--segmented-control-radius);
|
|
901
|
+
background: var(--segmented-control-background);
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-variant="underline"][data-orientation="horizontal"]) > .TabsThumb {
|
|
905
|
+
top: var(--segmented-control-gutter);
|
|
906
|
+
bottom: var(--segmented-control-gutter);
|
|
907
|
+
height: auto;
|
|
908
|
+
border-radius: var(--segmented-control-option-radius);
|
|
909
|
+
background: var(--segmented-control-thumb-background);
|
|
910
|
+
box-shadow: var(--segmented-control-thumb-shadow);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/* The capsule's glass and ends (touch.css): the sheen, rim and blur of the shared mobile glass, segments 8px
|
|
914
|
+
from the ends and the selection 4px past its segment toward them, as in the kit. Without touch.css the track
|
|
915
|
+
keeps its fill and the selection its segment. */
|
|
916
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) {
|
|
917
|
+
padding-inline: calc(var(--segmented-control-gutter) + var(--segmented-control-thumb-outset, 0px));
|
|
918
|
+
background-image: var(--segmented-control-sheen, none);
|
|
919
|
+
box-shadow: var(--segmented-control-shadow, none);
|
|
920
|
+
backdrop-filter: var(--segmented-control-backdrop-filter, none);
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/* The script sets the thumb to its segment's box from the left edge, so the outset is physical. */
|
|
924
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="horizontal"]) > .TabsThumb {
|
|
925
|
+
box-sizing: content-box;
|
|
926
|
+
margin-left: calc(-1 * var(--segmented-control-thumb-outset, 0px));
|
|
927
|
+
padding-inline: var(--segmented-control-thumb-outset, 0px);
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/* The native segment already includes its final gutter; pill scaling is desktop-only. */
|
|
931
|
+
/* The selected label is primary and the others secondary, as the kit's glass control draws them (26 and 114)
|
|
932
|
+
and Safari's tab groups show (0 and 109, iOS3 IMG_5562/5566), so the label keeps the base colors (touch.css
|
|
933
|
+
gives secondary the phone role). No tracking: the system font applies its own, as native text widths show
|
|
934
|
+
(17pt "All Inboxes" 241 at @3x in Mail, 242 in Chromium without it). */
|
|
935
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="horizontal"] .Tab {
|
|
936
|
+
padding-inline: var(--segmented-control-option-gutter);
|
|
937
|
+
border-radius: var(--segmented-control-option-radius);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/* Vertical tabs of either variant are an inset grouped list (kit Lists, Row 550:50430): rows of
|
|
941
|
+
52px with 17px text from the 16px margin, a symbol in a 28px column 8px before the text, a
|
|
942
|
+
separator from the text and the 17pt checkmark (22px) at the end of the selected row, as iOS
|
|
943
|
+
marks the one choice of a list. The selection keeps the regular weight. */
|
|
944
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="vertical"]) {
|
|
945
|
+
--segmented-control-icon-size: 22px;
|
|
946
|
+
--segmented-control-icon-offset: 3px;
|
|
947
|
+
--segmented-control-content-gap: 11px;
|
|
948
|
+
--option-badge-size: var(--badge-size-sm);
|
|
949
|
+
--option-badge-gutter: var(--badge-gutter-sm);
|
|
950
|
+
--option-badge-font-size: var(--badge-font-size-sm);
|
|
951
|
+
--option-badge-font-weight: var(--badge-font-weight-sm);
|
|
952
|
+
--option-badge-tracking: var(--badge-tracking-sm);
|
|
953
|
+
--option-badge-radius: var(--badge-radius-sm);
|
|
954
|
+
|
|
955
|
+
width: 100%;
|
|
956
|
+
gap: 0;
|
|
957
|
+
padding: 0;
|
|
958
|
+
border: 0;
|
|
959
|
+
border-radius: var(--field-group-radius, 26px);
|
|
960
|
+
background: var(--mobile-surface-grouped-secondary, var(--color-surface));
|
|
961
|
+
font-size: var(--field-row-label-font-size, 17px);
|
|
962
|
+
font-weight: var(--font-weight-normal);
|
|
963
|
+
line-height: var(--field-row-label-line-height, 22px);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
:where([data-plex-layout="phone"]) .Tabs:where([data-orientation="vertical"]) > .TabsThumb {
|
|
967
|
+
display: none;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab {
|
|
971
|
+
gap: 16px;
|
|
972
|
+
height: auto;
|
|
973
|
+
min-height: var(--field-row-min-height, 52px);
|
|
974
|
+
padding: 0 var(--mobile-layout-margin, 16px);
|
|
975
|
+
border-radius: 0;
|
|
976
|
+
color: var(--color-text);
|
|
977
|
+
font-weight: inherit;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/* The pressed row, clipped by the list's corners */
|
|
981
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab::before {
|
|
982
|
+
position: absolute;
|
|
983
|
+
inset: 0;
|
|
984
|
+
border-radius: 0;
|
|
985
|
+
background: var(--segmented-control-option-highlight-background-color);
|
|
986
|
+
content: "";
|
|
987
|
+
opacity: 0;
|
|
988
|
+
pointer-events: none;
|
|
989
|
+
transform: none;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab:where(:not([data-disabled])):active::before {
|
|
993
|
+
opacity: 1;
|
|
994
|
+
transform: none;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab + .Tab::after {
|
|
998
|
+
position: absolute;
|
|
999
|
+
top: 0;
|
|
1000
|
+
inset-inline: var(--mobile-layout-margin, 16px) 0;
|
|
1001
|
+
height: 1px;
|
|
1002
|
+
background: var(--color-border);
|
|
1003
|
+
content: "";
|
|
1004
|
+
pointer-events: none;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab:has(> .TabContent > svg:first-child:not(:only-child)) + .Tab::after,
|
|
1008
|
+
: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-layout-margin, 16px) + 36px);
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab > .TabCheckmark {
|
|
1013
|
+
display: block;
|
|
1014
|
+
flex: none;
|
|
1015
|
+
width: 22px;
|
|
1016
|
+
height: 22px;
|
|
1017
|
+
margin-inline-start: auto;
|
|
1018
|
+
visibility: hidden;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
:where([data-plex-layout="phone"]) .Tabs[data-orientation="vertical"] .Tab[data-state="on"] > .TabCheckmark {
|
|
1022
|
+
visibility: visible;
|
|
1023
|
+
}@media (prefers-reduced-motion: reduce) {
|
|
859
1024
|
.Tabs {
|
|
860
1025
|
--tabs-thumb-transition-duration: 0ms;
|
|
861
1026
|
}
|
|
@@ -276,24 +276,65 @@ box-shadow: 0 0 0 1px var(--gray-500) inset;
|
|
|
276
276
|
width: 44px;
|
|
277
277
|
height: 44px;
|
|
278
278
|
}
|
|
279
|
-
}
|
|
279
|
+
}
|
|
280
|
+
:where([data-plex-layout="phone"]) .Tag {
|
|
281
|
+
--tag-input-tag-height: 44px;
|
|
282
|
+
|
|
283
|
+
height: 44px;
|
|
284
|
+
max-width: 100%;
|
|
285
|
+
padding-inline-end: 0;
|
|
286
|
+
border-radius: var(--radius-full);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
:where([data-plex-layout="phone"]) .Tag[data-tag] {
|
|
290
|
+
position: relative;
|
|
291
|
+
isolation: isolate;
|
|
292
|
+
background-color: transparent;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
:where([data-plex-layout="phone"]) .Tag[data-tag]::before {
|
|
296
|
+
content: "";
|
|
297
|
+
position: absolute;
|
|
298
|
+
z-index: -1;
|
|
299
|
+
inset: 6px 0;
|
|
300
|
+
border-radius: inherit;
|
|
301
|
+
background-color: var(--tag-input-tag-background);
|
|
302
|
+
pointer-events: none;
|
|
303
|
+
transition: background-color 0.15s ease;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
:where([data-plex-layout="phone"]) .TagRemove {
|
|
307
|
+
width: 44px;
|
|
308
|
+
height: 44px;
|
|
309
|
+
}.TagValue {
|
|
280
310
|
white-space: nowrap;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
|
|
311
|
+
}/* The field is as wide as its text (or hint) and a cursor gutter: a hidden copy of that text sizes the box and
|
|
312
|
+
the input lies over it. The box wraps under the tags when it does not fit after the last one and stretches
|
|
313
|
+
over the rest of the row, in CSS alone, so the server draws the rows the browser does (plan 175.3). */.InputContainer {
|
|
314
|
+
position: relative;
|
|
284
315
|
flex-grow: 1;
|
|
316
|
+
min-width: 0;
|
|
285
317
|
max-width: 100%;
|
|
286
|
-
}
|
|
318
|
+
}/* The row is as tall as its tallest chip (44px on a phone): the field sits in its middle, as the chips' text does */.InputWrapper {
|
|
319
|
+
position: absolute;
|
|
320
|
+
inset: 0;
|
|
321
|
+
display: flex;
|
|
287
322
|
overflow: hidden;
|
|
288
|
-
|
|
323
|
+
align-items: center;
|
|
289
324
|
}.InputMeasure {
|
|
290
|
-
|
|
325
|
+
display: block;
|
|
326
|
+
overflow: hidden;
|
|
327
|
+
min-width: 20px;
|
|
328
|
+
height: var(--tag-input-height);
|
|
329
|
+
/* Room for the cursor, so the field wraps before its text reaches the edge */
|
|
330
|
+
padding-inline-end: 10px;
|
|
291
331
|
font-size: var(--tag-input-font-size);
|
|
332
|
+
line-height: 1.4;
|
|
292
333
|
visibility: hidden;
|
|
293
|
-
white-space:
|
|
334
|
+
white-space: pre;
|
|
294
335
|
}.Input {
|
|
295
336
|
display: block;
|
|
296
|
-
|
|
337
|
+
width: 100%;
|
|
297
338
|
height: var(--tag-input-height);
|
|
298
339
|
padding: 0;
|
|
299
340
|
border: 0;
|
|
@@ -219,6 +219,12 @@
|
|
|
219
219
|
resize: none;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
/* An auto-resizing textarea is as tall as its text from the first frame, between its rows and its maximum rows, as
|
|
223
|
+
the script then keeps it: the server markup already has the height, so the page does not move as it hydrates. */
|
|
224
|
+
[data-auto-resize] > .Textarea {
|
|
225
|
+
field-sizing: content;
|
|
226
|
+
}
|
|
227
|
+
|
|
222
228
|
.Textarea:focus {
|
|
223
229
|
outline: 0;
|
|
224
230
|
}
|