@plexui/styles 0.1.35 → 0.1.37
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/ContextMenu/ContextMenu.module.css +10 -2
- package/dist/es/components/Dialog/Dialog.module.css +70 -4
- package/dist/es/components/Menu/Menu.module.css +168 -4
- package/dist/es/components/Popover/Popover.module.css +1 -1
- package/dist/es/components/Select/Select.module.css +1 -1
- package/dist/es/styles/mobile-materials.css +12 -6
- package/dist/es/styles/touch.css +2 -2
- package/dist/es/styles/variables-components.css +3 -0
- package/package.json +1 -1
- package/postcss/phoneLayoutScope.mjs +6 -1
|
@@ -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
|
|
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,27 @@
|
|
|
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 it starts the body and
|
|
786
|
+
scrolls with it; without a body it stands under the bar, at the body's insets. */
|
|
787
|
+
.SheetDescriptionSlot,
|
|
788
|
+
.SheetDescription {
|
|
789
|
+
display: contents;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.SheetDescription > .Description {
|
|
793
|
+
color: var(--color-text);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.Panel > .SheetDescription > .Description {
|
|
797
|
+
margin: var(--page-bar-soft-tail, 32px) var(--mobile-layout-margin, 16px) 16px;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.Body > .SheetDescriptionSlot:not(:last-child) .Description {
|
|
801
|
+
margin-bottom: 16px;
|
|
802
|
+
}
|
|
803
|
+
|
|
783
804
|
/* With no footer, the content ends above the home indicator, as Files ends its View Options footnote about
|
|
784
805
|
35pt above the sheet's edge (iOS-menu IMG_5686): the bottom safe area, at least 16px. */
|
|
785
806
|
.Content[data-mobile-variant="sheet"] .Body {
|
|
@@ -806,8 +827,8 @@
|
|
|
806
827
|
display: none;
|
|
807
828
|
}
|
|
808
829
|
|
|
809
|
-
/* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar
|
|
810
|
-
the dialog, unseen, without a second Close. */
|
|
830
|
+
/* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar and the
|
|
831
|
+
description keep naming and describing the dialog, unseen, without a second Close. */
|
|
811
832
|
.Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] {
|
|
812
833
|
position: absolute;
|
|
813
834
|
width: 1px;
|
|
@@ -820,6 +841,18 @@
|
|
|
820
841
|
white-space: nowrap;
|
|
821
842
|
}
|
|
822
843
|
|
|
844
|
+
.Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) .SheetDescription {
|
|
845
|
+
position: absolute;
|
|
846
|
+
display: block;
|
|
847
|
+
width: 1px;
|
|
848
|
+
height: 1px;
|
|
849
|
+
margin: -1px;
|
|
850
|
+
padding: 0;
|
|
851
|
+
overflow: hidden;
|
|
852
|
+
clip-path: inset(50%);
|
|
853
|
+
white-space: nowrap;
|
|
854
|
+
}
|
|
855
|
+
|
|
823
856
|
.Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] > .BarClose {
|
|
824
857
|
display: none;
|
|
825
858
|
}
|
|
@@ -1184,6 +1217,27 @@
|
|
|
1184
1217
|
--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
1218
|
}
|
|
1186
1219
|
|
|
1220
|
+
/* The bar of a phone Sheet holds its title alone, centered on the row (iOS 27 kit Sheets 507-24684; owner
|
|
1221
|
+
09.11): the description reads as the first text of the content under the bar, in the type of the sheet
|
|
1222
|
+
and the label color, as the kit 27 alert writes its message. In Dialog.Body it starts the body and
|
|
1223
|
+
scrolls with it; without a body it stands under the bar, at the body's insets. */
|
|
1224
|
+
:where([data-plex-layout="phone"]) .SheetDescriptionSlot,
|
|
1225
|
+
:where([data-plex-layout="phone"]) .SheetDescription {
|
|
1226
|
+
display: contents;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
:where([data-plex-layout="phone"]) .SheetDescription > .Description {
|
|
1230
|
+
color: var(--color-text);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
:where([data-plex-layout="phone"]) .Panel > .SheetDescription > .Description {
|
|
1234
|
+
margin: var(--page-bar-soft-tail, 32px) var(--mobile-layout-margin, 16px) 16px;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
:where([data-plex-layout="phone"]) .Body > .SheetDescriptionSlot:not(:last-child) .Description {
|
|
1238
|
+
margin-bottom: 16px;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1187
1241
|
/* With no footer, the content ends above the home indicator, as Files ends its View Options footnote about
|
|
1188
1242
|
35pt above the sheet's edge (iOS-menu IMG_5686): the bottom safe area, at least 16px. */
|
|
1189
1243
|
:where([data-plex-layout="phone"]) .Content[data-mobile-variant="sheet"] .Body {
|
|
@@ -1210,8 +1264,8 @@
|
|
|
1210
1264
|
display: none;
|
|
1211
1265
|
}
|
|
1212
1266
|
|
|
1213
|
-
/* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar
|
|
1214
|
-
the dialog, unseen, without a second Close. */
|
|
1267
|
+
/* A Toolbar the dialog places itself takes the place of the bar its header becomes: that bar and the
|
|
1268
|
+
description keep naming and describing the dialog, unseen, without a second Close. */
|
|
1215
1269
|
:where([data-plex-layout="phone"]) .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] {
|
|
1216
1270
|
position: absolute;
|
|
1217
1271
|
width: 1px;
|
|
@@ -1224,6 +1278,18 @@
|
|
|
1224
1278
|
white-space: nowrap;
|
|
1225
1279
|
}
|
|
1226
1280
|
|
|
1281
|
+
:where([data-plex-layout="phone"]) .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) .SheetDescription {
|
|
1282
|
+
position: absolute;
|
|
1283
|
+
display: block;
|
|
1284
|
+
width: 1px;
|
|
1285
|
+
height: 1px;
|
|
1286
|
+
margin: -1px;
|
|
1287
|
+
padding: 0;
|
|
1288
|
+
overflow: hidden;
|
|
1289
|
+
clip-path: inset(50%);
|
|
1290
|
+
white-space: nowrap;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1227
1293
|
:where([data-plex-layout="phone"]) .Panel:has(> [data-toolbar][data-placement="top"]:not([data-dialog-bar])) > [data-dialog-bar] > .BarClose {
|
|
1228
1294
|
display: none;
|
|
1229
1295
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@layer components {.Menu {
|
|
2
2
|
/* Top-level selector needs to exist */
|
|
3
|
+
}/* A menu opened from a Dialog laid out as on a phone takes its phone rules here (Menu.tsx) */.PhoneScope {
|
|
4
|
+
display: contents;
|
|
3
5
|
}.MenuList[data-pill] {
|
|
4
6
|
--menu-radius: var(--menu-radius-pill, 22px);
|
|
5
7
|
--menu-gutter: var(--menu-pill-gutter);
|
|
@@ -750,7 +752,7 @@
|
|
|
750
752
|
background: var(--menu-mobile-background, var(--color-surface-elevated));
|
|
751
753
|
}
|
|
752
754
|
|
|
753
|
-
:where([data-plex-layout="phone"]) :where([data-theme="dark"]) .MenuList {
|
|
755
|
+
:where([data-theme="dark"]) :where([data-plex-layout="phone"]) .MenuList, :where([data-plex-layout="phone"]) :where([data-theme="dark"]) .MenuList {
|
|
754
756
|
backdrop-filter: var(--menu-mobile-backdrop-filter, none);
|
|
755
757
|
}
|
|
756
758
|
|
|
@@ -894,7 +896,37 @@
|
|
|
894
896
|
width: var(--menu-check-size, 18px);
|
|
895
897
|
height: var(--menu-check-size, 18px);
|
|
896
898
|
color: inherit;
|
|
897
|
-
}/*
|
|
899
|
+
}/* The items of a submenu (Menu.tsx SubContent). They lie in the panel itself; a phone submenu scrolls them under its
|
|
900
|
+
heading row (below). */.SubmenuItems {
|
|
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
|
+
}
|
|
929
|
+
}/* Phone submenu geometry is solved against the whole viewport/footer boundary.
|
|
898
930
|
Retain the primitive's collection and focus behavior, not its side-space width. */@media (max-width: 767px) {
|
|
899
931
|
.MenuList[data-submenu]:not([data-submenu-positioned]) {
|
|
900
932
|
visibility: hidden;
|
|
@@ -927,8 +959,72 @@
|
|
|
927
959
|
font-weight: var(--font-weight-semibold);
|
|
928
960
|
}
|
|
929
961
|
|
|
962
|
+
/* The heading row stays in place and only the items under it scroll, in a submenu taller than the room it has
|
|
963
|
+
(owner, plan 176: the row that closes the submenu is always in reach). */
|
|
964
|
+
.MenuList[data-submenu-phone] {
|
|
965
|
+
display: flex;
|
|
966
|
+
flex-direction: column;
|
|
967
|
+
overflow: hidden;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.MenuList[data-submenu-phone] > :is([data-submenu-collapse], .Separator) {
|
|
971
|
+
flex: none;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/* Across the panel's inline padding, into which a pressed row's capsule reaches: it scrolls only down */
|
|
975
|
+
.MenuList[data-submenu-phone] > .SubmenuItems {
|
|
976
|
+
display: block;
|
|
977
|
+
flex: 1 1 auto;
|
|
978
|
+
min-height: 0;
|
|
979
|
+
margin-inline: calc(-1 * var(--menu-padding-inline, var(--menu-gutter)));
|
|
980
|
+
padding-inline: var(--menu-padding-inline, var(--menu-gutter));
|
|
981
|
+
overflow: hidden auto;
|
|
982
|
+
overscroll-behavior: contain;
|
|
983
|
+
-webkit-overflow-scrolling: touch;
|
|
984
|
+
}
|
|
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
|
+
|
|
930
1026
|
/* A submenu that starts with its own separator keeps only the one under its heading row */
|
|
931
|
-
[data-submenu-
|
|
1027
|
+
.MenuList[data-submenu-phone] > .SubmenuItems > .Separator:first-child {
|
|
932
1028
|
display: none;
|
|
933
1029
|
}
|
|
934
1030
|
|
|
@@ -950,8 +1046,10 @@
|
|
|
950
1046
|
transition: scale var(--motion-enter) var(--cubic-enter), transform-origin 0s;
|
|
951
1047
|
}
|
|
952
1048
|
|
|
1049
|
+
/* Its rows take no press: one on the parent collapses the submenu and chooses nothing (owner, plan 176) */
|
|
953
1050
|
.MenuList[data-submenu-over] > * {
|
|
954
1051
|
opacity: 0.5;
|
|
1052
|
+
pointer-events: none;
|
|
955
1053
|
}
|
|
956
1054
|
|
|
957
1055
|
/* A submenu grows out of the row that opened it, in step with the parent stepping back: from the middle of its top,
|
|
@@ -1009,8 +1107,72 @@
|
|
|
1009
1107
|
font-weight: var(--font-weight-semibold);
|
|
1010
1108
|
}
|
|
1011
1109
|
|
|
1110
|
+
/* The heading row stays in place and only the items under it scroll, in a submenu taller than the room it has
|
|
1111
|
+
(owner, plan 176: the row that closes the submenu is always in reach). */
|
|
1112
|
+
:where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] {
|
|
1113
|
+
display: flex;
|
|
1114
|
+
flex-direction: column;
|
|
1115
|
+
overflow: hidden;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
:where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] > :is([data-submenu-collapse], .Separator) {
|
|
1119
|
+
flex: none;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/* Across the panel's inline padding, into which a pressed row's capsule reaches: it scrolls only down */
|
|
1123
|
+
:where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] > .SubmenuItems {
|
|
1124
|
+
display: block;
|
|
1125
|
+
flex: 1 1 auto;
|
|
1126
|
+
min-height: 0;
|
|
1127
|
+
margin-inline: calc(-1 * var(--menu-padding-inline, var(--menu-gutter)));
|
|
1128
|
+
padding-inline: var(--menu-padding-inline, var(--menu-gutter));
|
|
1129
|
+
overflow: hidden auto;
|
|
1130
|
+
overscroll-behavior: contain;
|
|
1131
|
+
-webkit-overflow-scrolling: touch;
|
|
1132
|
+
}
|
|
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
|
+
|
|
1012
1174
|
/* A submenu that starts with its own separator keeps only the one under its heading row */
|
|
1013
|
-
:where([data-plex-layout="phone"]) [data-submenu-
|
|
1175
|
+
:where([data-plex-layout="phone"]) .MenuList[data-submenu-phone] > .SubmenuItems > .Separator:first-child {
|
|
1014
1176
|
display: none;
|
|
1015
1177
|
}
|
|
1016
1178
|
|
|
@@ -1032,8 +1194,10 @@
|
|
|
1032
1194
|
transition: scale var(--motion-enter) var(--cubic-enter), transform-origin 0s;
|
|
1033
1195
|
}
|
|
1034
1196
|
|
|
1197
|
+
/* Its rows take no press: one on the parent collapses the submenu and chooses nothing (owner, plan 176) */
|
|
1035
1198
|
:where([data-plex-layout="phone"]) .MenuList[data-submenu-over] > * {
|
|
1036
1199
|
opacity: 0.5;
|
|
1200
|
+
pointer-events: none;
|
|
1037
1201
|
}
|
|
1038
1202
|
|
|
1039
1203
|
/* A submenu grows out of the row that opened it, in step with the parent stepping back: from the middle of its top,
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
background: var(--popover-mobile-background, var(--color-surface-elevated));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
:where([data-plex-layout="phone"]) :where([data-theme="dark"]) .Popover {
|
|
77
|
+
:where([data-theme="dark"]) :where([data-plex-layout="phone"]) .Popover, :where([data-plex-layout="phone"]) :where([data-theme="dark"]) .Popover {
|
|
78
78
|
backdrop-filter: var(--popover-mobile-backdrop-filter, none);
|
|
79
79
|
}@keyframes shake {
|
|
80
80
|
0% {
|
|
@@ -501,7 +501,7 @@ background: var(--gray-25);
|
|
|
501
501
|
background: var(--menu-mobile-background, var(--color-surface-elevated));
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
:where([data-plex-layout="phone"]) :where([data-theme="dark"]) .MenuList {
|
|
504
|
+
:where([data-theme="dark"]) :where([data-plex-layout="phone"]) .MenuList, :where([data-plex-layout="phone"]) :where([data-theme="dark"]) .MenuList {
|
|
505
505
|
backdrop-filter: var(--menu-mobile-backdrop-filter, none);
|
|
506
506
|
}
|
|
507
507
|
|
|
@@ -36,9 +36,12 @@
|
|
|
36
36
|
--mobile-knob-lens-shadow: 0 4.5px 8px rgb(0 0 0 / 12%), 0 0 0 0.33px rgb(0 0 0 / 20%), inset 0 0.5px 0 rgb(255 255 255 / 16%), inset 0 -0.5px 0 rgb(255 255 255 / 16%);
|
|
37
37
|
/* Dark menus and Select lists are glass, as native iOS 26 pop-up menus and popovers are: the glass
|
|
38
38
|
of the buttons, alpha-12, over a blurred backdrop (iOS2 IMG_5524, 5525, 5528: a sheet of 28 shows at
|
|
39
|
-
56, a card of 44 at 69
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
56, a card of 44 at 69). The page under it does not read through: the white knob of a switch behind
|
|
40
|
+
the menu (37 by 24pt, IMG_5524) spreads to 55 by 37pt at half its height and keeps a third of its
|
|
41
|
+
strength (IMG_5525), a blur of 18 (14 to 20 by the width, the height and the peak); text under it is
|
|
42
|
+
gone. A blur of 10 left the page's text at 1.5 to 3:1 against its background, readable (plan 176).
|
|
43
|
+
Light menus keep the elevated surface; the blur applies in dark only. */
|
|
44
|
+
--menu-mobile-backdrop-filter: blur(18px);
|
|
42
45
|
/* A popover takes the material of the menus: iOS 26 presents an action sheet from its source in the same
|
|
43
46
|
dark glass (iOS2 IMG_5528: a card of 44 under it at 65 to 69, the sheet of 28 at 55). */
|
|
44
47
|
--popover-mobile-background: var(--menu-mobile-background);
|
|
@@ -111,9 +114,12 @@
|
|
|
111
114
|
--mobile-knob-lens-shadow: 0 4.5px 8px rgb(0 0 0 / 12%), 0 0 0 0.33px rgb(0 0 0 / 20%), inset 0 0.5px 0 rgb(255 255 255 / 16%), inset 0 -0.5px 0 rgb(255 255 255 / 16%);
|
|
112
115
|
/* Dark menus and Select lists are glass, as native iOS 26 pop-up menus and popovers are: the glass
|
|
113
116
|
of the buttons, alpha-12, over a blurred backdrop (iOS2 IMG_5524, 5525, 5528: a sheet of 28 shows at
|
|
114
|
-
56, a card of 44 at 69
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
56, a card of 44 at 69). The page under it does not read through: the white knob of a switch behind
|
|
118
|
+
the menu (37 by 24pt, IMG_5524) spreads to 55 by 37pt at half its height and keeps a third of its
|
|
119
|
+
strength (IMG_5525), a blur of 18 (14 to 20 by the width, the height and the peak); text under it is
|
|
120
|
+
gone. A blur of 10 left the page's text at 1.5 to 3:1 against its background, readable (plan 176).
|
|
121
|
+
Light menus keep the elevated surface; the blur applies in dark only. */
|
|
122
|
+
--menu-mobile-backdrop-filter: blur(18px);
|
|
117
123
|
/* A popover takes the material of the menus: iOS 26 presents an action sheet from its source in the same
|
|
118
124
|
dark glass (iOS2 IMG_5528: a card of 44 under it at 65 to 69, the sheet of 28 at 55). */
|
|
119
125
|
--popover-mobile-background: var(--menu-mobile-background);
|
package/dist/es/styles/touch.css
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
--mobile-knob-lens-scale: calc(58 / 38) calc(38 / 24);
|
|
75
75
|
--mobile-knob-lens-background: rgb(255 255 255 / 9%);
|
|
76
76
|
--mobile-knob-lens-shadow: 0 4.5px 8px rgb(0 0 0 / 12%), 0 0 0 0.33px rgb(0 0 0 / 20%), inset 0 0.5px 0 rgb(255 255 255 / 16%), inset 0 -0.5px 0 rgb(255 255 255 / 16%);
|
|
77
|
-
--menu-mobile-backdrop-filter: blur(
|
|
77
|
+
--menu-mobile-backdrop-filter: blur(18px);
|
|
78
78
|
--popover-mobile-background: var(--menu-mobile-background);
|
|
79
79
|
--popover-mobile-backdrop-filter: var(--menu-mobile-backdrop-filter);
|
|
80
80
|
--dialog-alert-backdrop-filter: blur(10px);
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
--mobile-knob-lens-scale: calc(58 / 38) calc(38 / 24);
|
|
115
115
|
--mobile-knob-lens-background: rgb(255 255 255 / 9%);
|
|
116
116
|
--mobile-knob-lens-shadow: 0 4.5px 8px rgb(0 0 0 / 12%), 0 0 0 0.33px rgb(0 0 0 / 20%), inset 0 0.5px 0 rgb(255 255 255 / 16%), inset 0 -0.5px 0 rgb(255 255 255 / 16%);
|
|
117
|
-
--menu-mobile-backdrop-filter: blur(
|
|
117
|
+
--menu-mobile-backdrop-filter: blur(18px);
|
|
118
118
|
--popover-mobile-background: var(--menu-mobile-background);
|
|
119
119
|
--popover-mobile-backdrop-filter: var(--menu-mobile-backdrop-filter);
|
|
120
120
|
--dialog-alert-backdrop-filter: blur(10px);
|
|
@@ -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
|
@@ -15,6 +15,8 @@ const PHONE_FEATURE = /^\(\s*(?:max-width\s*:\s*767(?:\.98)?px|width\s*<=?\s*767
|
|
|
15
15
|
const DESKTOP_FEATURE = /^\(\s*(?:min-width\s*:\s*768px|width\s*>=\s*768px)\s*\)$/i
|
|
16
16
|
const MEDIA_TYPE = /^(?:only\s+)?(?:screen|all)$/i
|
|
17
17
|
const ROOT_COMPOUND = /^(?::root|html|body)(?=$|[\s>+~.[:#])((?:\[[^\]]*\]|:[\w-]+(?:\([^)]*\))?|\.[\w-]+)*)/
|
|
18
|
+
// The theme of the light and dark mixins (mixins.mjs), set on the root or on a part of the page
|
|
19
|
+
const THEME_COMPOUND = /^:where\(\[data-theme=(?:"(?:light|dark)"|'(?:light|dark)'|light|dark)\]\)(?=\s)/
|
|
18
20
|
|
|
19
21
|
/** Splits on commas outside parentheses and brackets. */
|
|
20
22
|
const splitList = (value) => {
|
|
@@ -59,7 +61,8 @@ export const isDesktopMedia = (params) =>
|
|
|
59
61
|
|
|
60
62
|
/**
|
|
61
63
|
* The selector for elements inside the scope: after a leading `:root`, `html` or `body` (and what it carries), so
|
|
62
|
-
* tokens set on the root are set on the scope instead, or before the selector.
|
|
64
|
+
* tokens set on the root are set on the scope instead, or before the selector. A rule of one theme (the dark and
|
|
65
|
+
* light mixins) applies in the scope whether the theme is set outside it, as on the root, or inside it.
|
|
63
66
|
* @param {string} selector
|
|
64
67
|
*/
|
|
65
68
|
export const scopeSelector = (selector) => {
|
|
@@ -68,6 +71,8 @@ export const scopeSelector = (selector) => {
|
|
|
68
71
|
const rest = selector.slice(root[0].length).trim()
|
|
69
72
|
return `${root[0]} :where(${PHONE_SCOPE})${rest ? ` ${rest}` : ""}`
|
|
70
73
|
}
|
|
74
|
+
const theme = THEME_COMPOUND.exec(selector)
|
|
75
|
+
if (theme) return `${theme[0]} :where(${PHONE_SCOPE}) ${selector.slice(theme[0].length).trim()}, :where(${PHONE_SCOPE}) ${selector}`
|
|
71
76
|
return `:where(${PHONE_SCOPE}) ${selector}`
|
|
72
77
|
}
|
|
73
78
|
|