@plexui/styles 0.1.36 → 0.1.38

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.
@@ -10,9 +10,11 @@
10
10
  }.Dimming {
11
11
  /* Top-level selector needs to exist */
12
12
  }/* Context Menu - Dimming Overlay: black at 23% over a 30px background blur, with the element cut out so it stays
13
- clear, as iOS lifts its preview. A press on the dimming closes the menu and reaches nothing under it. It shares
13
+ clear, as iOS lifts its preview. A press on the dimming closes the menu and reaches nothing under it; a press on
14
+ the element, through the cut, closes it and reaches the element, whose action runs, as a tap on an iOS preview
15
+ commits it (the clip path takes the cut out of the dimming's hit area too, which the mask does not). It shares
14
16
  the overlay layer (50): it comes after a Dialog or Popover the element sits in, so it dims that too, as iOS dims a
15
- sheet, and before its own menu, which stays above it. */.Overlay {
17
+ sheet, and before its own menu, which stays above it. Inside a PhoneLayout it covers the box. */.Overlay {
16
18
  position: fixed;
17
19
  z-index: 50;
18
20
  inset: 0;
@@ -26,6 +28,7 @@
26
28
  mask-size: 100% 100%;
27
29
  -webkit-mask-repeat: no-repeat;
28
30
  mask-repeat: no-repeat;
31
+ clip-path: var(--context-menu-hole-clip, none);
29
32
  touch-action: none;
30
33
  }
31
34
 
@@ -43,6 +46,11 @@
43
46
  .Dimming[data-exiting][data-interrupted] .Overlay {
44
47
  opacity: 0;
45
48
  transition: opacity var(--motion-exit) var(--cubic-exit);
49
+ }
50
+
51
+ /* A dimming on its way out takes no press: the next tap, or a drag the hold went on to, reaches the page */
52
+ .Dimming[data-exiting] .Overlay {
53
+ pointer-events: none;
46
54
  }/* The kit's preview shadow around the element (Content Area: drop shadow 32, black at 20%). */.Preview {
47
55
  position: absolute;
48
56
  box-shadow: var(--context-menu-preview-shadow);
@@ -780,6 +780,29 @@
780
780
  --mobile-glass-shadow: 0 4px 12px transparent, 0 0 0 0.5px transparent, 1.25px 0 0 -0.75px transparent, -1.25px 0 0 -0.75px transparent, inset 0 0.67px 0 var(--mobile-glass-rim), inset 0 -0.67px 0 var(--mobile-glass-rim);
781
781
  }
782
782
 
783
+ /* The bar of a phone Sheet holds its title alone, centered on the row (iOS 27 kit Sheets 507-24684; owner
784
+ 09.11): the description reads as the first text of the content under the bar, in the type of the sheet
785
+ and the label color, as the kit 27 alert writes its message. In Dialog.Body, or a Dialog.DescriptionSlot
786
+ at the top of content of the app's own, it starts that content and scrolls with it; without either it
787
+ stands under the bar, in flow, at the body's insets. The margins sit on the text itself, so a description
788
+ hidden on a phone (display none, or visually hidden) leaves no space. */
789
+ .SheetDescriptionSlot,
790
+ .SheetDescription {
791
+ display: contents;
792
+ }
793
+
794
+ .SheetDescription > .Description {
795
+ color: var(--color-text);
796
+ }
797
+
798
+ .Panel > .SheetDescription > .Description {
799
+ margin: var(--page-bar-soft-tail, 32px) var(--mobile-layout-margin, 16px) 16px;
800
+ }
801
+
802
+ .SheetDescriptionSlot:not(:last-child) .Description {
803
+ margin-bottom: 16px;
804
+ }
805
+
783
806
  /* With no footer, the content ends above the home indicator, as Files ends its View Options footnote about
784
807
  35pt above the sheet's edge (iOS-menu IMG_5686): the bottom safe area, at least 16px. */
785
808
  .Content[data-mobile-variant="sheet"] .Body {
@@ -806,8 +829,8 @@
806
829
  display: none;
807
830
  }
808
831
 
809
- /* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar keeps naming
810
- the dialog, unseen, without a second Close. */
832
+ /* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar and the
833
+ description keep naming and describing the dialog, unseen, without a second Close. */
811
834
  .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] {
812
835
  position: absolute;
813
836
  width: 1px;
@@ -820,6 +843,18 @@
820
843
  white-space: nowrap;
821
844
  }
822
845
 
846
+ .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) .SheetDescription {
847
+ position: absolute;
848
+ display: block;
849
+ width: 1px;
850
+ height: 1px;
851
+ margin: -1px;
852
+ padding: 0;
853
+ overflow: hidden;
854
+ clip-path: inset(50%);
855
+ white-space: nowrap;
856
+ }
857
+
823
858
  .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] > .BarClose {
824
859
  display: none;
825
860
  }
@@ -1184,6 +1219,29 @@
1184
1219
  --mobile-glass-shadow: 0 4px 12px transparent, 0 0 0 0.5px transparent, 1.25px 0 0 -0.75px transparent, -1.25px 0 0 -0.75px transparent, inset 0 0.67px 0 var(--mobile-glass-rim), inset 0 -0.67px 0 var(--mobile-glass-rim);
1185
1220
  }
1186
1221
 
1222
+ /* The bar of a phone Sheet holds its title alone, centered on the row (iOS 27 kit Sheets 507-24684; owner
1223
+ 09.11): the description reads as the first text of the content under the bar, in the type of the sheet
1224
+ and the label color, as the kit 27 alert writes its message. In Dialog.Body, or a Dialog.DescriptionSlot
1225
+ at the top of content of the app's own, it starts that content and scrolls with it; without either it
1226
+ stands under the bar, in flow, at the body's insets. The margins sit on the text itself, so a description
1227
+ hidden on a phone (display none, or visually hidden) leaves no space. */
1228
+ :where([data-plex-layout="phone"]) .SheetDescriptionSlot,
1229
+ :where([data-plex-layout="phone"]) .SheetDescription {
1230
+ display: contents;
1231
+ }
1232
+
1233
+ :where([data-plex-layout="phone"]) .SheetDescription > .Description {
1234
+ color: var(--color-text);
1235
+ }
1236
+
1237
+ :where([data-plex-layout="phone"]) .Panel > .SheetDescription > .Description {
1238
+ margin: var(--page-bar-soft-tail, 32px) var(--mobile-layout-margin, 16px) 16px;
1239
+ }
1240
+
1241
+ :where([data-plex-layout="phone"]) .SheetDescriptionSlot:not(:last-child) .Description {
1242
+ margin-bottom: 16px;
1243
+ }
1244
+
1187
1245
  /* With no footer, the content ends above the home indicator, as Files ends its View Options footnote about
1188
1246
  35pt above the sheet's edge (iOS-menu IMG_5686): the bottom safe area, at least 16px. */
1189
1247
  :where([data-plex-layout="phone"]) .Content[data-mobile-variant="sheet"] .Body {
@@ -1210,8 +1268,8 @@
1210
1268
  display: none;
1211
1269
  }
1212
1270
 
1213
- /* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar keeps naming
1214
- the dialog, unseen, without a second Close. */
1271
+ /* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar and the
1272
+ description keep naming and describing the dialog, unseen, without a second Close. */
1215
1273
  :where([data-plex-layout="phone"]) .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] {
1216
1274
  position: absolute;
1217
1275
  width: 1px;
@@ -1224,6 +1282,18 @@
1224
1282
  white-space: nowrap;
1225
1283
  }
1226
1284
 
1285
+ :where([data-plex-layout="phone"]) .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) .SheetDescription {
1286
+ position: absolute;
1287
+ display: block;
1288
+ width: 1px;
1289
+ height: 1px;
1290
+ margin: -1px;
1291
+ padding: 0;
1292
+ overflow: hidden;
1293
+ clip-path: inset(50%);
1294
+ white-space: nowrap;
1295
+ }
1296
+
1227
1297
  :where([data-plex-layout="phone"]) .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] > .BarClose {
1228
1298
  display: none;
1229
1299
  }
@@ -899,6 +899,33 @@
899
899
  }/* The items of a submenu (Menu.tsx SubContent). They lie in the panel itself; a phone submenu scrolls them under its
900
900
  heading row (below). */.SubmenuItems {
901
901
  display: contents;
902
+ }/* The items of a vertical menu (Menu.tsx Content). They lie in the panel itself, which scrolls on a desktop; a phone
903
+ menu scrolls them inside the panel and fades them at its edges (below). */.Items {
904
+ display: contents;
905
+ }/* The fade of a phone menu's edge, grown as the items scroll away from it (below) */@property --menu-fade-start {
906
+ syntax: "<length>";
907
+ inherits: false;
908
+ initial-value: 0px;
909
+ }@property --menu-fade-end {
910
+ syntax: "<length>";
911
+ inherits: false;
912
+ initial-value: 0px;
913
+ }@keyframes menu-fade-start {
914
+ from {
915
+ --menu-fade-start: 0px;
916
+ }
917
+
918
+ to {
919
+ --menu-fade-start: var(--menu-scroll-fade, 32px);
920
+ }
921
+ }@keyframes menu-fade-end {
922
+ from {
923
+ --menu-fade-end: var(--menu-scroll-fade, 32px);
924
+ }
925
+
926
+ to {
927
+ --menu-fade-end: 0px;
928
+ }
902
929
  }/* Phone submenu geometry is solved against the whole viewport/footer boundary.
903
930
  Retain the primitive's collection and focus behavior, not its side-space width. */@media (max-width: 767px) {
904
931
  .MenuList[data-submenu]:not([data-submenu-positioned]) {
@@ -956,6 +983,46 @@
956
983
  -webkit-overflow-scrolling: touch;
957
984
  }
958
985
 
986
+ /* A phone menu taller than its room scrolls its items inside the panel, which stays whole with its glass and
987
+ shadow, and the items fade at an edge they scroll past, as the soft scroll edge of iOS 26 ("a subtle blurred
988
+ boundary"; kit Materials, Scroll Edge Effect - Soft 5661:26943, a gradient mask) over --menu-scroll-fade. Each
989
+ fade grows as the items leave that edge, by the scroll position (scroll-driven animations); where a browser has
990
+ none, the items do not fade. Across the panel's padding, so they scroll to its edges as the panel did. */
991
+ .MenuList:has(> .Items) {
992
+ display: flex;
993
+ flex-direction: column;
994
+ overflow: hidden;
995
+ }
996
+
997
+ .MenuList > .Items {
998
+ display: block;
999
+ flex: 1 1 auto;
1000
+ min-height: 0;
1001
+ margin: calc(-1 * var(--menu-gutter)) calc(-1 * var(--menu-padding-inline, var(--menu-gutter)));
1002
+ padding: var(--menu-gutter) var(--menu-padding-inline, var(--menu-gutter));
1003
+ overflow: hidden auto;
1004
+ overscroll-behavior: contain;
1005
+ -webkit-overflow-scrolling: touch;
1006
+ }
1007
+
1008
+ .MenuList[data-submenu-phone] > .SubmenuItems {
1009
+ margin-bottom: calc(-1 * var(--menu-gutter));
1010
+ padding-bottom: var(--menu-gutter);
1011
+ }
1012
+
1013
+ /* Only with scroll timelines: without one the animations would run at once on the page's clock and keep their end,
1014
+ a lasting fade over the first row */
1015
+ @supports (animation-timeline: scroll()) {
1016
+ .MenuList > .Items,
1017
+ .MenuList[data-submenu-phone] > .SubmenuItems {
1018
+ -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--menu-fade-start), #000 calc(100% - var(--menu-fade-end)), transparent);
1019
+ mask-image: linear-gradient(to bottom, transparent, #000 var(--menu-fade-start), #000 calc(100% - var(--menu-fade-end)), transparent);
1020
+ animation: menu-fade-start auto linear both, menu-fade-end auto linear both;
1021
+ animation-timeline: scroll(self block), scroll(self block);
1022
+ animation-range: 0 var(--menu-scroll-fade, 32px), calc(100% - var(--menu-scroll-fade, 32px)) 100%;
1023
+ }
1024
+ }
1025
+
959
1026
  /* A submenu that starts with its own separator keeps only the one under its heading row */
960
1027
  .MenuList[data-submenu-phone] > .SubmenuItems > .Separator:first-child {
961
1028
  display: none;
@@ -1064,6 +1131,46 @@
1064
1131
  -webkit-overflow-scrolling: touch;
1065
1132
  }
1066
1133
 
1134
+ /* A phone menu taller than its room scrolls its items inside the panel, which stays whole with its glass and
1135
+ shadow, and the items fade at an edge they scroll past, as the soft scroll edge of iOS 26 ("a subtle blurred
1136
+ boundary"; kit Materials, Scroll Edge Effect - Soft 5661:26943, a gradient mask) over --menu-scroll-fade. Each
1137
+ fade grows as the items leave that edge, by the scroll position (scroll-driven animations); where a browser has
1138
+ none, the items do not fade. Across the panel's padding, so they scroll to its edges as the panel did. */
1139
+ :where([data-plex-layout="phone"]) .MenuList:has(> .Items) {
1140
+ display: flex;
1141
+ flex-direction: column;
1142
+ overflow: hidden;
1143
+ }
1144
+
1145
+ :where([data-plex-layout="phone"]) .MenuList > .Items {
1146
+ display: block;
1147
+ flex: 1 1 auto;
1148
+ min-height: 0;
1149
+ margin: calc(-1 * var(--menu-gutter)) calc(-1 * var(--menu-padding-inline, var(--menu-gutter)));
1150
+ padding: var(--menu-gutter) var(--menu-padding-inline, var(--menu-gutter));
1151
+ overflow: hidden auto;
1152
+ overscroll-behavior: contain;
1153
+ -webkit-overflow-scrolling: touch;
1154
+ }
1155
+
1156
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] > .SubmenuItems {
1157
+ margin-bottom: calc(-1 * var(--menu-gutter));
1158
+ padding-bottom: var(--menu-gutter);
1159
+ }
1160
+
1161
+ /* Only with scroll timelines: without one the animations would run at once on the page's clock and keep their end,
1162
+ a lasting fade over the first row */
1163
+ @supports (animation-timeline: scroll()) {
1164
+ :where([data-plex-layout="phone"]) .MenuList > .Items,
1165
+ :where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] > .SubmenuItems {
1166
+ -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--menu-fade-start), #000 calc(100% - var(--menu-fade-end)), transparent);
1167
+ mask-image: linear-gradient(to bottom, transparent, #000 var(--menu-fade-start), #000 calc(100% - var(--menu-fade-end)), transparent);
1168
+ animation: menu-fade-start auto linear both, menu-fade-end auto linear both;
1169
+ animation-timeline: scroll(self block), scroll(self block);
1170
+ animation-range: 0 var(--menu-scroll-fade, 32px), calc(100% - var(--menu-scroll-fade, 32px)) 100%;
1171
+ }
1172
+ }
1173
+
1067
1174
  /* A submenu that starts with its own separator keeps only the one under its heading row */
1068
1175
  :where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] > .SubmenuItems > .Separator:first-child {
1069
1176
  display: none;
@@ -463,6 +463,9 @@
463
463
  --menu-radio-indicator-size: var(--font-text-lg-size);
464
464
  --menu-radio-indicator-hole-size: var(--font-text-3xs-size);
465
465
  --menu-checkbox-indicator-size: var(--font-text-lg-size);
466
+ /* How far the items of a phone menu fade at an edge they scroll past: the soft scroll edge of the bars
467
+ (--page-bar-soft-tail), so a menu and a page fade alike. */
468
+ --menu-scroll-fade: 32px;
466
469
 
467
470
  /* =============================================
468
471
  Modal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",