@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.
Files changed (50) hide show
  1. package/dist/es/components/Accordion/Accordion.module.css +12 -1
  2. package/dist/es/components/Alert/Alert.module.css +101 -0
  3. package/dist/es/components/Badge/Badge.module.css +37 -0
  4. package/dist/es/components/Breadcrumb/Breadcrumb.module.css +29 -0
  5. package/dist/es/components/Button/Button.module.css +53 -0
  6. package/dist/es/components/Button/NavigationButton.module.css +17 -0
  7. package/dist/es/components/ButtonGroup/ButtonGroup.module.css +227 -20
  8. package/dist/es/components/Card/Card.module.css +9 -0
  9. package/dist/es/components/CodeBlock/CodeBlock.module.css +14 -1
  10. package/dist/es/components/ColorPicker/ColorPicker.module.css +19 -1
  11. package/dist/es/components/DatePicker/Calendar.module.css +262 -2
  12. package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +10 -0
  13. package/dist/es/components/DateRangePicker/Calendar.module.css +207 -3
  14. package/dist/es/components/DateRangePicker/Trigger.module.css +17 -2
  15. package/dist/es/components/Dialog/Dialog.module.css +660 -13
  16. package/dist/es/components/EmptyMessage/EmptyMessage.module.css +21 -0
  17. package/dist/es/components/Field/Field.module.css +387 -2
  18. package/dist/es/components/FieldGroup/FieldGroup.module.css +129 -3
  19. package/dist/es/components/FileUpload/FileUpload.module.css +74 -1
  20. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +19 -1
  21. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +12 -1
  22. package/dist/es/components/IndexBar/IndexBar.module.css +146 -0
  23. package/dist/es/components/Input/Input.module.css +129 -1
  24. package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +18 -0
  25. package/dist/es/components/Menu/Menu.module.css +267 -7
  26. package/dist/es/components/OTPInput/OTPInput.module.css +6 -1
  27. package/dist/es/components/Page/Page.module.css +302 -10
  28. package/dist/es/components/PhoneLayout/PhoneLayout.module.css +10 -0
  29. package/dist/es/components/Popover/Popover.module.css +7 -0
  30. package/dist/es/components/Select/Select.module.css +148 -0
  31. package/dist/es/components/SelectControl/SelectControl.module.css +113 -1
  32. package/dist/es/components/Sidebar/Sidebar.module.css +354 -20
  33. package/dist/es/components/Slider/Slider.module.css +80 -0
  34. package/dist/es/components/SwipeActions/SwipeActions.module.css +166 -0
  35. package/dist/es/components/Switch/Switch.module.css +59 -4
  36. package/dist/es/components/TabBar/TabBar.module.css +255 -10
  37. package/dist/es/components/Tabs/Tabs.module.css +166 -1
  38. package/dist/es/components/TagInput/TagInput.module.css +50 -9
  39. package/dist/es/components/Textarea/Textarea.module.css +6 -0
  40. package/dist/es/components/Tip/Tip.module.css +456 -0
  41. package/dist/es/components/Toast/Toast.module.css +148 -5
  42. package/dist/es/components/Toolbar/Toolbar.module.css +642 -3
  43. package/dist/es/styles/mobile-materials.css +94 -5
  44. package/dist/es/styles/mobile-surfaces.css +43 -0
  45. package/dist/es/styles/touch.css +618 -8
  46. package/dist/es/styles/variables-components.css +125 -5
  47. package/package.json +1 -1
  48. package/postcss/parseLightDark.mjs +20 -2
  49. package/postcss/phoneLayoutScope.mjs +134 -0
  50. package/postcss.config.mjs +3 -0
@@ -8,7 +8,8 @@
8
8
  }.MenuList {
9
9
  z-index: 50;
10
10
  overflow: auto;
11
- width: var(--menu-width, auto);
11
+ /* A width of its own only with touch.css: the 250px panel of an iOS menu, in which a long label wraps */
12
+ width: var(--menu-width, var(--menu-default-width, auto));
12
13
  min-width: var(--menu-min-width, var(--menu-default-min-width, 300px));
13
14
  max-width: var(--radix-dropdown-menu-content-available-width);
14
15
  max-height: min(
@@ -214,7 +215,19 @@
214
215
  height: var(--button-size);
215
216
  margin: auto;
216
217
  }
217
- }.Separator {
218
+ }
219
+ :where([data-plex-layout="phone"]) .ItemActions > button {
220
+ min-width: 44px;
221
+ min-height: 44px;
222
+ margin: calc((var(--button-size) - 44px) / 2);
223
+ }
224
+
225
+ :where([data-plex-layout="phone"]) .ItemActions > button::before,
226
+ :where([data-plex-layout="phone"]) .ItemActions > button::after {
227
+ width: var(--button-size);
228
+ height: var(--button-size);
229
+ margin: auto;
230
+ }.Separator {
218
231
  height: 1px;
219
232
  margin: var(--menu-separator-gutter);
220
233
  background: var(--menu-separator-background-color);
@@ -298,7 +311,20 @@
298
311
  height: var(--button-size);
299
312
  margin: auto;
300
313
  }
301
- }.SubMenuItem {
314
+ }
315
+ /* Under the header, so the face's size outranks Button's own surface rule whatever order the sheets load in. */
316
+ :where([data-plex-layout="phone"]) .MenuHeader .MenuHeaderAction {
317
+ min-width: 44px;
318
+ min-height: 44px;
319
+ margin: calc((var(--button-size) - 44px) / 2);
320
+ }
321
+
322
+ :where([data-plex-layout="phone"]) .MenuHeader .MenuHeaderAction::before,
323
+ :where([data-plex-layout="phone"]) .MenuHeader .MenuHeaderAction::after {
324
+ width: var(--button-size);
325
+ height: var(--button-size);
326
+ margin: auto;
327
+ }.SubMenuItem {
302
328
  justify-content: space-between;
303
329
  }.SubTriggerIcon {
304
330
  /* The chevron takes the free space, so a label stays beside its icon rather than between it and the chevron */
@@ -470,7 +496,10 @@
470
496
  animation-duration: 0s;
471
497
  }/* A horizontal list, or a horizontal radio group at the top of a list: the mode switch of an iOS menu, one mode of several
472
498
  with the chosen one on a fill (iOS-menu IMG_5665 and IMG_5666, Added and Captured over the rows of Photos; iOS 27 kit
473
- Menu 492:52296, Control Group; Apps 2.4 Menu 40125:198566, Quick Actions). */:is(.MenuList, .RadioGroup)[data-layout="horizontal"] {
499
+ Menu 492:52296, Control Group; Apps 2.4 Menu 40125:198566, Quick Actions). *//* A horizontal list is as wide as its actions: equal columns, each as wide as its widest label, never less than a menu
500
+ (--menu-horizontal-min-width), not the fixed width of a list of rows. */.MenuList[data-layout="horizontal"] {
501
+ width: var(--menu-width, auto);
502
+ }:is(.MenuList, .RadioGroup)[data-layout="horizontal"] {
474
503
  --h-icon-size: var(--menu-horizontal-icon-size, 20px);
475
504
  --h-padding: var(--menu-horizontal-item-padding, calc(var(--spacing) * 2));
476
505
  --h-gap: var(--menu-horizontal-item-gap, calc(var(--spacing) * 1));
@@ -716,15 +745,165 @@
716
745
  height: var(--menu-check-size, 18px);
717
746
  color: inherit;
718
747
  }
719
- }/* Phone submenu geometry is solved against the whole viewport/footer boundary.
748
+ }
749
+ :where([data-plex-layout="phone"]) .MenuList {
750
+ background: var(--menu-mobile-background, var(--color-surface-elevated));
751
+ }
752
+
753
+ :where([data-plex-layout="phone"]) :where([data-theme="dark"]) .MenuList {
754
+ backdrop-filter: var(--menu-mobile-backdrop-filter, none);
755
+ }
756
+
757
+ /* No tracking of its own: the system font tracks the labels. Nine labels of native iOS 26 menus
758
+ (iOS2 IMG_5524, 5525, 17/400) measure within 2px at @3x without it and 7 to 16px short with -0.43px. */
759
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) :is(.MenuItem, .MenuItemContent):not(:where(.RadioGroup[data-layout="horizontal"] *)) {
760
+ letter-spacing: var(--menu-letter-spacing, normal);
761
+ overflow-wrap: anywhere;
762
+ }
763
+
764
+ /* A row is 42pt, as native iOS 26 menus space them (iOS-menu IMG_5676 and IMG_5690: labels 125 to 127px apart at
765
+ @3x; the iOS 27 kit draws 40), with a full-row pressed surface. */
766
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem:not(:where(.RadioGroup[data-layout="horizontal"] *)) {
767
+ display: grid;
768
+ grid-template-columns: minmax(0, 1fr);
769
+ align-content: center;
770
+ min-height: 42px;
771
+ padding-block: 0;
772
+ }
773
+
774
+ /* A row's press is its own (the capsule, a tile's fill): Safari's gray tap rectangle would stack on it */
775
+ :where([data-plex-layout="phone"]) .MenuItem {
776
+ -webkit-tap-highlight-color: transparent;
777
+ }
778
+
779
+ /* The pressed surface is the capsule iOS 26 draws under the finger (Files, the owner's shots of 08.11, @3x: 535 to
780
+ 1224 in a 504 to 1255 panel, the whole 42pt row): 10pt from the panel's edges, not the row's 16, and round at its
781
+ ends (the menu's corner less the gutter, 24px, comes to a half circle on a row). iOS lights it under the finger and
782
+ darkens it away from it, 7 to 8% black on average (Files: 252 under the finger, 217 to 228 at the far end on the
783
+ 255 panel); one even fill of that strength, as the owner proposed (08.11), --menu-press-background in touch.css. Every
784
+ row presses the same gray, a destructive one too. Without touch.css it is the highlight color. */
785
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem:not(:where(.RadioGroup[data-layout="horizontal"] *))::before {
786
+ position: absolute;
787
+ inset-block: 0;
788
+ inset-inline: calc(var(--menu-gutter) - var(--menu-padding-inline, var(--menu-gutter)));
789
+ background: var(--menu-press-background, var(--menu-item-background-color));
790
+ }
791
+
792
+ /* It shows the moment the finger lands and fades when it lifts. */
793
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem:not(:where(.RadioGroup[data-layout="horizontal"] *)):not(:has(.ItemActions:active)):active::before {
794
+ opacity: 1;
795
+ transform: scale(var(--menu-item-press-scale, var(--scale, 0.98)));
796
+ transition-duration: 0s;
797
+ }
798
+
799
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem:not(:where(.RadioGroup[data-layout="horizontal"] *)) > .PressableInner {
800
+ grid-area: 1 / 1;
801
+ min-width: 0;
802
+ padding-block: 10px;
803
+ }
804
+
805
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem:has(.ItemDescription),
806
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItemContent:has(.ItemDescription) {
807
+ font-weight: var(--font-weight-normal);
808
+ }
809
+
810
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .ItemLeading {
811
+ gap: 2px;
812
+ }
813
+
814
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .ItemDescription {
815
+ font-size: 13px;
816
+ line-height: 18px;
817
+ letter-spacing: normal;
818
+ color: var(--menu-description-color, var(--color-text-secondary));
819
+ }
820
+
821
+ /* The native text subtitle is one line; rich description slots retain their layout. */
822
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .ItemDescription:not(:has(*)) {
823
+ overflow: hidden;
824
+ text-overflow: ellipsis;
825
+ white-space: nowrap;
826
+ }
827
+
828
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem[data-disabled] {
829
+ color: var(--menu-disabled-label-color, var(--color-text-tertiary));
830
+ opacity: 1;
831
+ }
832
+
833
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem[data-disabled] .ItemDescription {
834
+ color: var(--menu-disabled-description-color, var(--color-text-tertiary));
835
+ }
836
+
837
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .MenuItem[data-disabled] :is(.RadioIndicator, .CheckboxIndicator) {
838
+ color: var(--color-text);
839
+ }
840
+
841
+ /* The checkmark column of native iOS 26 menus (iOS-menu IMG_5666 Photos, IMG_5687 and IMG_5688 Files, the owner's
842
+ Files shots of 08.11, at @3x): 10.3 to 10.7pt of ink centred 28pt from the panel's edge, labels from 43.5pt. A row's
843
+ content starts 22px in, so the column is 13px and the label follows 8.5px after it (touch.css tokens). The iOS 27
844
+ kit draws a 15pt checkmark centred at 34 and labels from 52; the device wins. */
845
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) :is(.RadioItem, .CheckboxItem) {
846
+ gap: var(--menu-check-gap, 8.5px);
847
+ }
848
+
849
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) :is(.RadioIndicator, .CheckboxIndicator) {
850
+ width: var(--menu-check-column, 13px);
851
+ height: 22px;
852
+ /* A 22px selection slot beside the 20px label line. */
853
+ border-radius: 0;
854
+ box-shadow: none;
855
+ }
856
+
857
+ /* A menu with a checkmark column keeps it on every row: a row without a checkmark and a section title start at the
858
+ label column too (IMG_5666: View Options, Report a Concern and Filter:; Files: Select, New Folder, Name, Kind). */
859
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]):has(:is(.RadioItem, .CheckboxItem):not(:where(.RadioGroup[data-layout="horizontal"] *))) .MenuItem:not(.RadioItem, .CheckboxItem, [data-submenu-collapse]):not(:where(.RadioGroup[data-layout="horizontal"] *)), :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]):has(:is(.RadioItem, .CheckboxItem):not(:where(.RadioGroup[data-layout="horizontal"] *))) .MenuItemContent, :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]):has(:is(.RadioItem, .CheckboxItem):not(:where(.RadioGroup[data-layout="horizontal"] *))) .MenuLabel {
860
+ padding-inline-start: var(--menu-check-label-inset, calc(8px + 13px + 8.5px));
861
+ }
862
+
863
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .RadioIndicatorActive::before,
864
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .RadioIndicatorActive::after {
865
+ display: none;
866
+ }
867
+
868
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .CheckboxCircle {
869
+ width: var(--menu-check-column, 13px);
870
+ height: 22px;
871
+ border-radius: 0;
872
+ background: none;
873
+ color: inherit;
874
+ animation: none;
875
+ }
876
+
877
+ /* iOS 26 kit Menu Items (Menu has Selection): the checkmark leads the row, so the desktop end
878
+ position moves to the start on a phone. */
879
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .CheckboxItem[data-indicator-position="end"],
880
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) [data-indicator-position="end"] .RadioItem {
881
+ justify-content: flex-start;
882
+ }
883
+
884
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) [data-indicator-position="end"] :is(.RadioIndicator, .RadioIndicatorActive, .CheckboxIndicator) {
885
+ order: -1;
886
+ margin-inline-start: 0;
887
+ }
888
+
889
+ /* The native checkmark: 10.3 to 10.7pt of ink (IMG_5666, 5687, 5688); the 18px Check icon draws 10.6 by 9.9, centred
890
+ in its column with the overflow on both sides. */
891
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .SelectionCheck {
892
+ display: block;
893
+ flex-shrink: 0;
894
+ width: var(--menu-check-size, 18px);
895
+ height: var(--menu-check-size, 18px);
896
+ color: inherit;
897
+ }/* Phone submenu geometry is solved against the whole viewport/footer boundary.
720
898
  Retain the primitive's collection and focus behavior, not its side-space width. */@media (max-width: 767px) {
721
899
  .MenuList[data-submenu]:not([data-submenu-positioned]) {
722
900
  visibility: hidden;
723
901
  }
724
902
 
725
903
  .MenuList[data-submenu-phone] {
726
- width: var(--menu-phone-width, -moz-max-content);
727
- width: var(--menu-phone-width, max-content);
904
+ /* The width of the menu it opens over, which it covers (iOS-menu IMG_5677) */
905
+ width: var(--menu-phone-width, var(--menu-default-width, -moz-max-content));
906
+ width: var(--menu-phone-width, var(--menu-default-width, max-content));
728
907
  min-width: min(var(--menu-phone-min-width, var(--menu-default-min-width, 238px)), var(--menu-phone-max-width));
729
908
  max-width: var(--menu-phone-max-width);
730
909
  max-height: min(var(--menu-max-height, 1200px), var(--menu-phone-max-height));
@@ -799,4 +978,85 @@
799
978
  transition-delay: 0s;
800
979
  }
801
980
  }
981
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu]:not([data-submenu-positioned]) {
982
+ visibility: hidden;
983
+ }
984
+
985
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] {
986
+ /* The width of the menu it opens over, which it covers (iOS-menu IMG_5677) */
987
+ width: var(--menu-phone-width, var(--menu-default-width, -moz-max-content));
988
+ width: var(--menu-phone-width, var(--menu-default-width, max-content));
989
+ min-width: min(var(--menu-phone-min-width, var(--menu-default-min-width, 238px)), var(--menu-phone-max-width));
990
+ max-width: var(--menu-phone-max-width);
991
+ max-height: min(var(--menu-max-height, 1200px), var(--menu-phone-max-height));
992
+ }
993
+
994
+ /* A submenu row ends in a chevron of the label's color, 6 by 10pt with its end 28pt in from the panel's
995
+ (iOS-menu IMG_5676, View Options: 17 by 31px at @3x, black): the 8 by 14 units of ChevronRight at 18px. */
996
+ :where([data-plex-layout="phone"]) .MenuList:not([data-layout="horizontal"]) .SubTriggerIcon {
997
+ width: 18px;
998
+ height: 18px;
999
+ opacity: 1;
1000
+ }
1001
+
1002
+ :where([data-plex-layout="phone"]) .SubMenuItem[data-state="open"] > .PressableInner > .SubTriggerIcon {
1003
+ transform: rotate(90deg);
1004
+ }
1005
+
1006
+ /* iOS 26 submenus (iOS-menu IMG_5677, IMG_5678, IMG_5682): the row that opened one heads it in Semibold, with a
1007
+ separator under it (Menu.tsx SubContent). */
1008
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] > [data-submenu-collapse] {
1009
+ font-weight: var(--font-weight-semibold);
1010
+ }
1011
+
1012
+ /* A submenu that starts with its own separator keeps only the one under its heading row */
1013
+ :where([data-plex-layout="phone"]) [data-submenu-collapse] + .Separator + .Separator {
1014
+ display: none;
1015
+ }
1016
+
1017
+ /* While a submenu stands over it the parent steps back, as in IMG_5677 against IMG_5676: its rows at half strength
1018
+ (the label's ink 10 shows as 131 on the 254 panel) and the panel 0.968 of its size from its top (12px narrower on
1019
+ each side of a 753px panel, the top in place). The placement marks it (menuSubmenuPlacement.ts) and keeps the mark
1020
+ while the whole menu leaves. The origin returns only once the panel is back to full size. */
1021
+ :where([data-plex-layout="phone"]) .MenuList {
1022
+ transition: scale var(--motion-enter) var(--cubic-enter), transform-origin 0s linear var(--motion-enter);
1023
+ }
1024
+
1025
+ :where([data-plex-layout="phone"]) .MenuList > * {
1026
+ transition: opacity var(--motion-enter) var(--cubic-enter);
1027
+ }
1028
+
1029
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu-over] {
1030
+ scale: 0.968;
1031
+ transform-origin: 50% 0;
1032
+ transition: scale var(--motion-enter) var(--cubic-enter), transform-origin 0s;
1033
+ }
1034
+
1035
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu-over] > * {
1036
+ opacity: 0.5;
1037
+ }
1038
+
1039
+ /* A submenu grows out of the row that opened it, in step with the parent stepping back: from the middle of its top,
1040
+ where its heading row covers that row, over the parent's --motion-enter and on its curve. The desktop's quick
1041
+ submenu (100ms, from its corner beside the row) came in at a different time from the parent, from the corner. */
1042
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] {
1043
+ transform-origin: 50% 0;
1044
+ }
1045
+
1046
+ :where([data-plex-layout="phone"]) .Menu[data-entering-active] .MenuList[data-submenu-phone],
1047
+ :where([data-plex-layout="phone"]) .Menu[data-entering][data-interrupted] .MenuList[data-submenu-phone] {
1048
+ transition-duration: var(--motion-enter);
1049
+ }
1050
+
1051
+ :where([data-plex-layout="phone"]) .Menu[data-exiting-active] .MenuList[data-submenu-phone],
1052
+ :where([data-plex-layout="phone"]) .Menu[data-exiting][data-interrupted] .MenuList[data-submenu-phone] {
1053
+ transition-duration: var(--motion-exit);
1054
+ }
1055
+
1056
+ /* Opening and closing keep their own timing. The rule above lists a delay for the origin, and the open and close
1057
+ rules name only their properties and durations, so without this the scale of a menu coming in or going out
1058
+ started a whole --motion-enter late, after its fade. */
1059
+ :where([data-plex-layout="phone"]) .Menu:is([data-entering], [data-exiting]) .MenuList {
1060
+ transition-delay: 0s;
1061
+ }
802
1062
  }
@@ -70,7 +70,12 @@
70
70
  --field-error-text-align: center;
71
71
  --field-error-content-justify: center;
72
72
  }
73
- }@media (prefers-reduced-motion: reduce) {
73
+ }
74
+ :where([data-plex-layout="phone"]) .ErrorMessage {
75
+ --mobile-field-error-icon-display: none;
76
+ --field-error-text-align: center;
77
+ --field-error-content-justify: center;
78
+ }@media (prefers-reduced-motion: reduce) {
74
79
  .Cell {
75
80
  transition: none;
76
81
  }