@glasshome/ui 1.39.0 → 1.41.0

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.
Files changed (41) hide show
  1. package/SPEC.md +26 -4
  2. package/dist/index.js +1 -1
  3. package/dist/lib/overlay-classes.d.ts +1 -1
  4. package/dist/solid/alert-dialog.d.ts +10 -9
  5. package/dist/solid/bottom-sheet/bottom-sheet.d.ts +1 -5
  6. package/dist/solid/confirm-dialog.d.ts +22 -0
  7. package/dist/solid/dialog-parts.d.ts +27 -1
  8. package/dist/solid/dialog.d.ts +3 -6
  9. package/dist/solid/dock-edit.d.ts +1 -1
  10. package/dist/solid/dock.d.ts +6 -1
  11. package/dist/solid/docked-panel.d.ts +1 -5
  12. package/dist/solid/icon-nodes.d.ts +13 -0
  13. package/dist/solid/index.d.ts +6 -4
  14. package/dist/solid/index.js +5080 -4841
  15. package/dist/solid/responsive-dialog.d.ts +3 -6
  16. package/dist/solid/sheet.d.ts +1 -5
  17. package/dist/solid/tabs.d.ts +3 -1
  18. package/dist/solid/term.d.ts +14 -0
  19. package/dist/{utils-DXEj_oXa.js → utils-CGN4X-2O.js} +1 -1
  20. package/package.json +14 -3
  21. package/scripts/check-gallery.ts +22 -4
  22. package/src/lib/overlay-classes.ts +2 -4
  23. package/src/solid/alert-dialog.tsx +13 -0
  24. package/src/solid/alert.tsx +1 -1
  25. package/src/solid/confirm-dialog.tsx +62 -0
  26. package/src/solid/dialog-parts.tsx +51 -1
  27. package/src/solid/dialog.tsx +4 -0
  28. package/src/solid/dock-edit.tsx +11 -16
  29. package/src/solid/dock.tsx +115 -25
  30. package/src/solid/icon-nodes.ts +71 -0
  31. package/src/solid/icon.tsx +44 -39
  32. package/src/solid/image-picker.tsx +9 -9
  33. package/src/solid/index.ts +6 -1
  34. package/src/solid/option-card.tsx +1 -1
  35. package/src/solid/responsive-dialog.tsx +8 -1
  36. package/src/solid/select.tsx +7 -2
  37. package/src/solid/tabs.tsx +11 -10
  38. package/src/solid/term.tsx +51 -0
  39. package/src/solid/toggle-group.tsx +12 -5
  40. package/src/styles/globals.css +6 -2
  41. package/src/styles/theme.css +7 -5
@@ -48,12 +48,15 @@ const ToggleGroup: ParentComponent<
48
48
  // discriminated union, so pulling `multiple` into a separate prop collapses the
49
49
  // union and mistypes `value`. Leave it in `rest` and just peek at it here.
50
50
  const sliding = () => !(props as { multiple?: boolean }).multiple;
51
+ // Same peek for `orientation`: a column stacks its segments instead of balancing rows.
52
+ const vertical = () => (props as { orientation?: string }).orientation === "vertical";
51
53
  let root: HTMLDivElement | undefined;
52
54
  let scope: HTMLDivElement | undefined;
53
55
  onMount(() => {
54
56
  if (!root) return;
55
57
  if (local.scroll) onCleanup(trackScroll(root, "[data-pressed]", "data-pressed"));
56
- else onCleanup(balanceRows(root, scope ?? root, '[data-slot="toggle-group-item"]'));
58
+ else if (!vertical())
59
+ onCleanup(balanceRows(root, scope ?? root, '[data-slot="toggle-group-item"]'));
57
60
  });
58
61
  return (
59
62
  <ToggleGroupPrimitive
@@ -66,9 +69,11 @@ const ToggleGroup: ParentComponent<
66
69
  `group/toggle-group w-fit max-w-full items-center gap-y-1 rounded-lg data-[wrapped]:w-full ${TRACK_SURFACE} p-1 data-[variant=outline]:shadow-xs`,
67
70
  local.scroll
68
71
  ? `flex [scrollbar-width:none] flex-nowrap overflow-x-auto ${SCROLL_TRACK_FADE}`
69
- : sliding()
70
- ? "flex"
71
- : BALANCED_ROWS,
72
+ : vertical()
73
+ ? "flex flex-col items-stretch"
74
+ : sliding()
75
+ ? "flex"
76
+ : BALANCED_ROWS,
72
77
  local.class,
73
78
  )}
74
79
  {...rest}
@@ -86,7 +91,9 @@ const ToggleGroup: ParentComponent<
86
91
  class={
87
92
  local.scroll
88
93
  ? "flex w-max flex-nowrap items-center"
89
- : `w-full items-center gap-y-1 ${BALANCED_ROWS}`
94
+ : vertical()
95
+ ? "flex w-full flex-col items-stretch gap-y-0.5"
96
+ : `w-full items-center gap-y-1 ${BALANCED_ROWS}`
90
97
  }
91
98
  >
92
99
  {local.children}
@@ -664,14 +664,18 @@
664
664
  transparent 360deg
665
665
  );
666
666
  animation: spin-slow 8s linear infinite;
667
+ animation-play-state: var(--_orbit-play, running);
667
668
  }
668
669
  @media (prefers-reduced-motion: reduce) {
669
670
  :where(.glass-edge-orbit) > * {
670
671
  animation: none;
671
672
  }
672
673
  }
673
- /* Ambient loops under a modal's blurred scrim would make the browser re-blur the whole page every frame. */
674
- :root[data-page-covered] :is(:where(.glass-edge-orbit) > *, .animate-spin-slow, .animate-float) {
674
+ /* Ambient loops under a modal's scrim re-blur the page every frame; each selector ends in a class, as a trailing * restyles the whole document. */
675
+ :root[data-page-covered] .glass-edge-orbit {
676
+ --_orbit-play: paused;
677
+ }
678
+ :root[data-page-covered] :is(.animate-spin-slow, .animate-float) {
675
679
  animation-play-state: paused;
676
680
  }
677
681
 
@@ -321,15 +321,15 @@
321
321
  --duration-arrive: 2400ms;
322
322
  /* One sway of the dock's edit mode (DOCK_EDIT_MOTION). */
323
323
  --duration-jiggle: 140ms;
324
- /* Ambient motion is an event (SPEC motion rule 5): 1 while the host holds
325
- * html[data-motion="live"], else 0. Inherits into widget shadow roots, so a
326
- * loop multiplies its duration by it: calc(var(--motion-ambient, 0) * 1s).
327
- * --motion-play is its keyword twin for a loop that can only pause. */
324
+ /* Ambient motion is an event (SPEC motion rule 5): 1 on a [data-motion-reader]
325
+ * while the host holds html[data-motion="live"], else 0. A loop multiplies its
326
+ * duration by it: calc(var(--motion-ambient, 0) * 1s). --motion-play is its
327
+ * keyword twin for a loop that can only pause. */
328
328
  --motion-ambient: 0;
329
329
  --motion-play: paused;
330
330
  }
331
331
 
332
- html[data-motion="live"] {
332
+ html[data-motion="live"] [data-motion-reader] {
333
333
  --motion-ambient: 1;
334
334
  --motion-play: running;
335
335
  }
@@ -613,6 +613,8 @@ html[data-motion="live"] {
613
613
  --duration-arrive: 0ms;
614
614
  --duration-jiggle: 0ms;
615
615
  --duration-slide: 0ms;
616
+ --stagger-base: 0ms;
617
+ --stagger-step: 0ms;
616
618
  }
617
619
  /* tw-animate enter/exit classes carry their own fallback duration. */
618
620
  .animate-in,