@plexui/styles 0.1.40 → 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.
@@ -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.40",
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",