@plexui/styles 0.17.4 → 0.17.6

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.
@@ -1021,7 +1021,8 @@ background-color: color-mix(in srgb, var(--button-background-color), #fff 22%);
1021
1021
  colors of their bar (Toolbar.module.css). */
1022
1022
  .Button[data-disabled][data-variant] {
1023
1023
  --button-background-color: var(--button-mobile-disabled-background, var(--color-background-disabled));
1024
- --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
1024
+ /* A brand's own disabled label (--button-mobile-disabled-color), else the tertiary label */
1025
+ --button-text-color: var(--button-mobile-disabled-color, var(--mobile-label-tertiary, var(--color-text-disabled)));
1025
1026
  }
1026
1027
 
1027
1028
  .Button:is([data-mobile-material="flat"], [data-disabled]:where(:not([data-mobile-material="glass"]))) {
@@ -1145,7 +1146,8 @@ background-color: color-mix(in srgb, var(--button-background-color), #fff 22%);
1145
1146
  colors of their bar (Toolbar.module.css). */
1146
1147
  :where([data-plex-layout="phone"]) .Button[data-disabled][data-variant] {
1147
1148
  --button-background-color: var(--button-mobile-disabled-background, var(--color-background-disabled));
1148
- --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
1149
+ /* A brand's own disabled label (--button-mobile-disabled-color), else the tertiary label */
1150
+ --button-text-color: var(--button-mobile-disabled-color, var(--mobile-label-tertiary, var(--color-text-disabled)));
1149
1151
  }
1150
1152
 
1151
1153
  :where([data-plex-layout="phone"]) .Button:is([data-mobile-material="flat"], [data-disabled]:where(:not([data-mobile-material="glass"]))) {
@@ -21,6 +21,15 @@
21
21
  transition: width var(--sidebar-collapse-duration) var(--cubic-move);
22
22
  }/* Collapsed state */:global([data-sidebar="collapsed"]) .Sidebar {
23
23
  width: var(--sidebar-width-icon);
24
+ }/* Offcanvas: a collapsed sidebar leaves the screen whole, no rail. It slides to nothing, then leaves the tab order
25
+ and the accessibility tree (visibility waits for the slide; it comes back at once on opening) */:global([data-sidebar="collapsed"][data-collapsible="offcanvas"]) .Sidebar {
26
+ width: 0;
27
+ padding-inline: 0;
28
+ visibility: hidden;
29
+ transition:
30
+ width var(--sidebar-collapse-duration) var(--cubic-move),
31
+ padding var(--sidebar-collapse-duration) var(--cubic-move),
32
+ visibility 0s linear var(--sidebar-collapse-duration);
24
33
  }/* Right side */.Sidebar[data-side="right"] {
25
34
  order: 1;
26
35
  }/* =============================================
@@ -495,6 +504,23 @@
495
504
  padding-left: 50px;
496
505
  }.MenuSub[data-has-icons="true"] .MenuSubButton.indent3 {
497
506
  padding-left: 62px;
507
+ }/* A tree: each level moves a row one whole 24px cell (the cell of a leading chevron or of an icon), 12px in at the
508
+ first; its icons stand in 24px cells too, the glyph 16px, so the text of a row with a chevron and an icon starts
509
+ at 60, 84, 108… The cells are as tall as the text's line, so the rows keep a submenu row's height */.MenuSub[data-tree="true"] .MenuSubButton {
510
+ padding-left: calc(var(--sidebar-menu-tree-inset, 12px) + var(--sidebar-menu-indent, 0) * 24px);
511
+ }/* Pill rows: capsules, the ends 16px in so the text and icons keep clear of the round ends. A tree moves every
512
+ level by the same 4px (a nested row stays under its parent's text); other rows keep the axis of the rows over
513
+ them and of the folded rail's icons, and only their end moves in */.Sidebar[data-pill="true"] {
514
+ --sidebar-menu-item-radius: var(--radius-full);
515
+ --sidebar-menu-item-trailing-padding: 16px;
516
+ --sidebar-menu-tree-inset: 16px;
517
+ }.MenuSub[data-tree="true"] .MenuButtonIcon {
518
+ width: 24px;
519
+ height: var(--sidebar-menu-sub-item-line-height, 20px);
520
+ margin: 0;
521
+ }.MenuSub[data-tree="true"] .MenuButtonIcon svg {
522
+ width: 16px;
523
+ height: 16px;
498
524
  }/* An open branch of a tree leaves a gap before the row after it */@media (min-width: 768px) {
499
525
  .MenuSub[data-state="open"]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
500
526
  padding-bottom: var(--sidebar-menu-sub-open-gap, 4px);
@@ -523,6 +549,23 @@
523
549
  }/* Rotate chevron when its own item is expanded: not when only an outer item
524
550
  is (a collapsed item nested under an expanded one keeps its chevron) */[data-expanded="true"] .MenuChevron:not([data-expanded="true"] li:not([data-expanded="true"]) .MenuChevron) {
525
551
  transform: rotate(90deg);
552
+ }/* A row of a tree turns its chevron by its own aria-expanded, as it folds and unfolds on a press anywhere on it */.MenuButton[aria-expanded="true"] .MenuChevron,
553
+ .MenuSubButton[aria-expanded="true"] .MenuChevron {
554
+ transform: rotate(90deg);
555
+ }/* A tree's chevron: first in the row, before its icon, in a 24px cell of its own; the glyph 16px in the secondary
556
+ color, a picture of the row's state with no hover of its own. A blank one keeps the cell on a row with nothing under it */.MenuChevron[data-placement="start"] {
557
+ position: relative;
558
+ z-index: 1;
559
+ width: 24px;
560
+ /* As tall as the text's line, so a tree row is as tall as any submenu row (32 on a desktop) */
561
+ height: var(--sidebar-menu-sub-item-line-height, 20px);
562
+ margin: 0;
563
+ color: var(--color-text-secondary);
564
+ }.MenuChevron[data-placement="start"] svg {
565
+ width: 16px;
566
+ height: 16px;
567
+ }:dir(rtl) .MenuChevron[data-placement="start"] svg {
568
+ transform: scaleX(-1);
526
569
  }/* Hide chevron in collapsed sidebar */:global([data-sidebar="collapsed"]) .MenuChevron:not(:where([data-sidebar="collapsed"] [data-sidebar="expanded"] *)) {
527
570
  display: none;
528
571
  }/* =============================================
@@ -510,7 +510,7 @@
510
510
  Button drops the material of a disabled button elsewhere; the extra attribute outweighs it and the shared
511
511
  disabled color in any style sheet order. */
512
512
  .Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a)[data-disabled][data-variant]:where(:not([data-mobile-material="flat"])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
513
- --button-text-color: var(--mobile-label-tertiary, var(--color-text-tertiary));
513
+ --button-text-color: var(--button-mobile-disabled-color, var(--mobile-label-tertiary, var(--color-text-tertiary)));
514
514
  --button-mobile-material-background: var(--mobile-glass-background);
515
515
  --button-mobile-material-sheen: var(--mobile-glass-sheen);
516
516
  --button-mobile-material-shadow: var(--mobile-glass-shadow);
@@ -1790,7 +1790,7 @@
1790
1790
  Button drops the material of a disabled button elsewhere; the extra attribute outweighs it and the shared
1791
1791
  disabled color in any style sheet order. */
1792
1792
  :where([data-plex-layout="phone"]) .Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a)[data-disabled][data-variant]:where(:not([data-mobile-material="flat"])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
1793
- --button-text-color: var(--mobile-label-tertiary, var(--color-text-tertiary));
1793
+ --button-text-color: var(--button-mobile-disabled-color, var(--mobile-label-tertiary, var(--color-text-tertiary)));
1794
1794
  --button-mobile-material-background: var(--mobile-glass-background);
1795
1795
  --button-mobile-material-sheen: var(--mobile-glass-sheen);
1796
1796
  --button-mobile-material-shadow: var(--mobile-glass-shadow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.17.4",
3
+ "version": "0.17.6",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",