@plexui/styles 0.1.39 → 0.1.41

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.
@@ -282,7 +282,8 @@
282
282
  display: none;
283
283
  }
284
284
 
285
- .Alert .Actions > :where(button, a, [role="link"]) {
285
+ /* `mobileActions="own"`: the buttons keep the size they are given, for an alert inside a block of its own buttons */
286
+ .Alert:where(:not([data-mobile-actions="own"])) .Actions > :where(button, a, [role="link"]) {
286
287
  --button-size: var(--button-size-xl, 50px);
287
288
  --button-font-size: var(--button-font-size-xl, 17px);
288
289
  --button-font-weight: var(--font-weight-semibold);
@@ -384,7 +385,8 @@
384
385
  display: none;
385
386
  }
386
387
 
387
- :where([data-plex-layout="phone"]) .Alert .Actions > :where(button, a, [role="link"]) {
388
+ /* `mobileActions="own"`: the buttons keep the size they are given, for an alert inside a block of its own buttons */
389
+ :where([data-plex-layout="phone"]) .Alert:where(:not([data-mobile-actions="own"])) .Actions > :where(button, a, [role="link"]) {
388
390
  --button-size: var(--button-size-xl, 50px);
389
391
  --button-font-size: var(--button-font-size-xl, 17px);
390
392
  --button-font-weight: var(--font-weight-semibold);
@@ -927,7 +927,9 @@
927
927
  --button-outline-context-background: var(--mobile-neutral-outline-background, var(--button-outline-background));
928
928
  }
929
929
 
930
- .Button[data-mobile-material="glass"]:where(:not([data-disabled])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
930
+ /* A disabled glass button keeps its glass and dims its symbol or label (below), as a bar button does (iOS 26 kit
931
+ _Button - Symbol, Text and Back, State=Disabled; owner 09.11). Its hover and press stay off (Button states). */
932
+ .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
931
933
  --button-mobile-material-background: var(--mobile-glass-background);
932
934
  --button-mobile-material-hover: var(--mobile-glass-background-hover);
933
935
  --button-mobile-material-active: var(--mobile-glass-background-active);
@@ -958,7 +960,7 @@
958
960
  --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
959
961
  }
960
962
 
961
- .Button:is([data-mobile-material="flat"], [data-disabled]) {
963
+ .Button:is([data-mobile-material="flat"], [data-disabled]:where(:not([data-mobile-material="glass"]))) {
962
964
  --button-mobile-material-background: initial;
963
965
  --button-mobile-material-hover: initial;
964
966
  --button-mobile-material-active: initial;
@@ -968,12 +970,27 @@
968
970
  --button-mobile-material-opacity: initial;
969
971
  --button-mobile-material-scale: initial;
970
972
  }
973
+
974
+ /* A uniform button draws its 28 or 34px circle and takes touches 44px around its center, as the close button
975
+ of a phone Alert does (owner 09.11): the minimum target of Apple's guidelines. A larger one keeps its size. In a
976
+ ButtonGroup or beside the text of a field it keeps its own box, so it never takes the taps of a neighbor. */
977
+ .Button[data-uniform]:not(:is([data-slot="button-group"], [data-slot="input-group"], [data-slot="input"], [data-slot="textarea"]) *) > .ButtonInner::before {
978
+ position: absolute;
979
+ top: 50%;
980
+ left: 50%;
981
+ width: max(100%, 44px);
982
+ height: max(100%, 44px);
983
+ transform: translate(-50%, -50%);
984
+ content: "";
985
+ }
971
986
  }
972
987
  :where([data-plex-layout="phone"]) .Button[data-variant="outline"]:where([data-color="primary"], [data-color="secondary"]) {
973
988
  --button-outline-context-background: var(--mobile-neutral-outline-background, var(--button-outline-background));
974
989
  }
975
990
 
976
- :where([data-plex-layout="phone"]) .Button[data-mobile-material="glass"]:where(:not([data-disabled])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
991
+ /* A disabled glass button keeps its glass and dims its symbol or label (below), as a bar button does (iOS 26 kit
992
+ _Button - Symbol, Text and Back, State=Disabled; owner 09.11). Its hover and press stay off (Button states). */
993
+ :where([data-plex-layout="phone"]) .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
977
994
  --button-mobile-material-background: var(--mobile-glass-background);
978
995
  --button-mobile-material-hover: var(--mobile-glass-background-hover);
979
996
  --button-mobile-material-active: var(--mobile-glass-background-active);
@@ -1004,7 +1021,7 @@
1004
1021
  --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
1005
1022
  }
1006
1023
 
1007
- :where([data-plex-layout="phone"]) .Button:is([data-mobile-material="flat"], [data-disabled]) {
1024
+ :where([data-plex-layout="phone"]) .Button:is([data-mobile-material="flat"], [data-disabled]:where(:not([data-mobile-material="glass"]))) {
1008
1025
  --button-mobile-material-background: initial;
1009
1026
  --button-mobile-material-hover: initial;
1010
1027
  --button-mobile-material-active: initial;
@@ -1014,4 +1031,17 @@
1014
1031
  --button-mobile-material-opacity: initial;
1015
1032
  --button-mobile-material-scale: initial;
1016
1033
  }
1034
+
1035
+ /* A uniform button draws its 28 or 34px circle and takes touches 44px around its center, as the close button
1036
+ of a phone Alert does (owner 09.11): the minimum target of Apple's guidelines. A larger one keeps its size. In a
1037
+ ButtonGroup or beside the text of a field it keeps its own box, so it never takes the taps of a neighbor. */
1038
+ :where([data-plex-layout="phone"]) .Button[data-uniform]:not(:is([data-slot="button-group"], [data-slot="input-group"], [data-slot="input"], [data-slot="textarea"]) *) > .ButtonInner::before {
1039
+ position: absolute;
1040
+ top: 50%;
1041
+ left: 50%;
1042
+ width: max(100%, 44px);
1043
+ height: max(100%, 44px);
1044
+ transform: translate(-50%, -50%);
1045
+ content: "";
1046
+ }
1017
1047
  }
@@ -865,6 +865,8 @@
865
865
  -moz-user-select: none;
866
866
  user-select: none;
867
867
  visibility: hidden;
868
+ /* The edge the drawer slides in from, read by the swipe that opens and closes it (lib/phoneDrawer) */
869
+ --sidebar-drawer-edge: right;
868
870
  transition:
869
871
  left var(--sidebar-mobile-exit-duration) var(--cubic-exit),
870
872
  visibility 0s var(--sidebar-mobile-exit-duration);
@@ -897,6 +899,23 @@
897
899
  transition-delay: 0.21s;
898
900
  }:global([data-mobile-menu="visible"]) .MobileSidebar > *:nth-child(3) {
899
901
  transition-delay: 0.27s;
902
+ }/* Under a finger the drawer follows it: --sidebar-drawer-progress goes from 0 (closed) to 1 (open). Its left edge
903
+ moves, as it does when it opens and closes, so on release it animates on from there to the state the swipe ends in.
904
+ The drag rule outweighs the open contained drawer's place. */:global([data-mobile-dragging][data-mobile-menu]) .MobileBackdrop {
905
+ pointer-events: none;
906
+ opacity: var(--sidebar-drawer-progress, 0);
907
+ visibility: visible;
908
+ transition: none;
909
+ }:global([data-mobile-dragging][data-mobile-menu]) .MobileSidebar.MobileSidebar {
910
+ left: calc((1 - var(--sidebar-drawer-progress, 0)) * 100%);
911
+ right: auto;
912
+ width: 100%;
913
+ visibility: visible;
914
+ transition: none;
915
+ }:global([data-mobile-dragging][data-mobile-menu]) .MobileSidebar > * {
916
+ opacity: 1;
917
+ transform: none;
918
+ transition: none;
900
919
  }/* Mobile menu item - larger for touch */.MobileSidebar .MenuButtonInner {
901
920
  height: var(--sidebar-menu-item-height);
902
921
  }/* Mobile header */.MobileHeader {
@@ -1353,6 +1372,8 @@
1353
1372
  right: 0;
1354
1373
  width: auto;
1355
1374
  background: var(--color-surface);
1375
+ }/* Under a finger it has the open drawer's background; where it is comes from the drag rule */:global([data-mobile-dragging][data-mobile-menu]) .MobileSidebar.contained {
1376
+ background: var(--color-surface);
1356
1377
  }/* =============================================
1357
1378
  Footer Links (horizontal layout)
1358
1379
  ============================================= */.FooterLinks {
@@ -1526,6 +1547,31 @@ background: var(--gray-300);
1526
1547
  transition: visibility 0s;
1527
1548
  }
1528
1549
 
1550
+ /* The app drawer stays under the page and the page follows the finger. The drag rules outweigh the open and
1551
+ closed ones and the contained drawer's. */
1552
+ .App .MobileSidebar {
1553
+ --sidebar-drawer-edge: left;
1554
+ }
1555
+
1556
+ .App.App[data-mobile-dragging][data-mobile-menu] .Inset {
1557
+ box-shadow: 0 0 2rem rgb(0 0 0 / 12%);
1558
+ transform: translateX(calc(var(--sidebar-drawer-width) * var(--sidebar-drawer-progress, 0)));
1559
+ transition: none;
1560
+ }
1561
+
1562
+ .App.App[data-mobile-dragging][data-mobile-menu] .MobileSidebar {
1563
+ left: 0;
1564
+ right: auto;
1565
+ width: var(--sidebar-drawer-width);
1566
+ visibility: visible;
1567
+ transition: none;
1568
+ }
1569
+
1570
+ .App.App[data-mobile-dragging][data-mobile-menu] .MobileSidebar::after {
1571
+ opacity: calc(1 - var(--sidebar-drawer-progress, 0));
1572
+ transition: none;
1573
+ }
1574
+
1529
1575
  .App .MobileSidebar > * {
1530
1576
  opacity: 1;
1531
1577
  transform: none;
@@ -1633,6 +1679,31 @@ background: var(--gray-300);
1633
1679
  transition: visibility 0s;
1634
1680
  }
1635
1681
 
1682
+ /* The app drawer stays under the page and the page follows the finger. The drag rules outweigh the open and
1683
+ closed ones and the contained drawer's. */
1684
+ :where([data-plex-layout="phone"]) .App .MobileSidebar {
1685
+ --sidebar-drawer-edge: left;
1686
+ }
1687
+
1688
+ :where([data-plex-layout="phone"]) .App.App[data-mobile-dragging][data-mobile-menu] .Inset {
1689
+ box-shadow: 0 0 2rem rgb(0 0 0 / 12%);
1690
+ transform: translateX(calc(var(--sidebar-drawer-width) * var(--sidebar-drawer-progress, 0)));
1691
+ transition: none;
1692
+ }
1693
+
1694
+ :where([data-plex-layout="phone"]) .App.App[data-mobile-dragging][data-mobile-menu] .MobileSidebar {
1695
+ left: 0;
1696
+ right: auto;
1697
+ width: var(--sidebar-drawer-width);
1698
+ visibility: visible;
1699
+ transition: none;
1700
+ }
1701
+
1702
+ :where([data-plex-layout="phone"]) .App.App[data-mobile-dragging][data-mobile-menu] .MobileSidebar::after {
1703
+ opacity: calc(1 - var(--sidebar-drawer-progress, 0));
1704
+ transition: none;
1705
+ }
1706
+
1636
1707
  :where([data-plex-layout="phone"]) .App .MobileSidebar > * {
1637
1708
  opacity: 1;
1638
1709
  transform: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",