@vvedantb/ui 0.62.1 → 0.63.1

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 (88) hide show
  1. package/app/src/settings/SettingsPage.tsx +1 -1
  2. package/app/src/settings/SettingsSection.tsx +1 -1
  3. package/app/src/settings/ThemeModePicker.tsx +10 -2
  4. package/dist/app/src/settings/SettingsPage.js +1 -1
  5. package/dist/app/src/settings/SettingsSection.js +1 -1
  6. package/dist/app/src/settings/ThemeModePicker.js +11 -5
  7. package/dist/shell/src/PageHeaderBar.js +391 -175
  8. package/dist/shell/src/PageWrapper.js +159 -103
  9. package/dist/shell/src/SidePanelTabs.js +7 -5
  10. package/dist/shell/src/SidebarChrome.js +1 -1
  11. package/dist/shell/src/SidebarPanel.js +1 -1
  12. package/dist/shell/src/SidebarResize.js +2 -2
  13. package/dist/shell/src/SidebarUpgradeCard.js +1 -1
  14. package/dist/shell/src/app-shell-classes.js +1 -1
  15. package/dist/src/ai-elements/activity-question.js +2 -2
  16. package/dist/src/ai-elements/message.js +2 -2
  17. package/dist/src/ai-elements/model-picker-content.js +1 -1
  18. package/dist/src/ai-elements/model-picker.js +1 -1
  19. package/dist/src/ai-elements/prompt-input.js +1 -1
  20. package/dist/src/client.js +1 -1
  21. package/dist/src/generative-ui/content.js +3 -3
  22. package/dist/src/generative-ui/layout.js +1 -1
  23. package/dist/src/index.js +1 -1
  24. package/dist/src/kibo/kanban.js +1 -1
  25. package/dist/src/kibo/list.js +1 -1
  26. package/dist/src/kibo/video-player.js +0 -1
  27. package/dist/src/marketing/ProductHeroOrbit.js +26 -32
  28. package/dist/src/marketing/createLandingKit.js +1 -1
  29. package/dist/src/marketing/landing.js +1 -1
  30. package/dist/src/motion/dock-motion.js +36 -16
  31. package/dist/src/ui/_menu-classes.alt.js +1 -1
  32. package/dist/src/ui/_menu-classes.js +1 -1
  33. package/dist/src/ui/bulk-action-bar.js +1 -1
  34. package/dist/src/ui/calendar.js +1 -1
  35. package/dist/src/ui/card.js +1 -1
  36. package/dist/src/ui/clear-input.js +33 -46
  37. package/dist/src/ui/clearInputDissolve.js +2 -57
  38. package/dist/src/ui/command.js +3 -3
  39. package/dist/src/ui/count-pop.js +1 -1
  40. package/dist/src/ui/dialog.js +1 -1
  41. package/dist/src/ui/media-preview.js +1 -1
  42. package/dist/src/ui/progress.js +1 -1
  43. package/dist/src/ui/radix-select.js +1 -1
  44. package/dist/src/ui/select.js +1 -1
  45. package/dist/src/ui/table.js +1 -1
  46. package/dist/tokens/src/css/clear-input.css +4 -19
  47. package/package.json +1 -1
  48. package/shell/src/PageHeaderBar.tsx +162 -21
  49. package/shell/src/PageWrapper.tsx +116 -33
  50. package/shell/src/SidePanelTabs.tsx +7 -5
  51. package/shell/src/SidebarChrome.tsx +1 -1
  52. package/shell/src/SidebarPanel.tsx +1 -1
  53. package/shell/src/SidebarResize.tsx +2 -2
  54. package/shell/src/SidebarUpgradeCard.tsx +1 -1
  55. package/shell/src/app-shell-classes.ts +1 -1
  56. package/src/ai-elements/activity-question.tsx +2 -2
  57. package/src/ai-elements/message.tsx +3 -3
  58. package/src/ai-elements/model-picker-content.tsx +1 -1
  59. package/src/ai-elements/model-picker.tsx +1 -1
  60. package/src/ai-elements/prompt-input.tsx +1 -1
  61. package/src/client.ts +1 -1
  62. package/src/generative-ui/content.tsx +3 -3
  63. package/src/generative-ui/layout.tsx +1 -1
  64. package/src/index.ts +1 -1
  65. package/src/kibo/kanban.tsx +1 -1
  66. package/src/kibo/list.tsx +1 -1
  67. package/src/kibo/video-player.tsx +0 -2
  68. package/src/marketing/ProductHeroOrbit.tsx +3 -4
  69. package/src/marketing/createLandingKit.tsx +1 -1
  70. package/src/marketing/landing.tsx +1 -1
  71. package/src/motion/dock-motion.ts +30 -13
  72. package/src/ui/_menu-classes.alt.ts +1 -1
  73. package/src/ui/_menu-classes.ts +1 -1
  74. package/src/ui/bulk-action-bar.tsx +1 -1
  75. package/src/ui/calendar.tsx +1 -1
  76. package/src/ui/card.tsx +1 -1
  77. package/src/ui/clear-input.tsx +1 -5
  78. package/src/ui/clearInputDissolve.ts +2 -85
  79. package/src/ui/command.tsx +3 -3
  80. package/src/ui/count-pop.tsx +1 -1
  81. package/src/ui/dialog.tsx +1 -1
  82. package/src/ui/media-preview.tsx +1 -1
  83. package/src/ui/progress.tsx +1 -1
  84. package/src/ui/radix-select.tsx +1 -1
  85. package/src/ui/select.tsx +1 -1
  86. package/src/ui/table.tsx +1 -1
  87. package/tokens/examples/tokens-moved/Fixture.tsx +1 -1
  88. package/tokens/src/css/clear-input.css +4 -19
@@ -5,7 +5,7 @@ const ringClass = "absolute rounded-full border border-current/25 animate-spin m
5
5
  const dotClass = "absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 rounded-full bg-current";
6
6
 
7
7
  /**
8
- * The default concept visual for `ProductHero`: a glowing core with three orbit rings, in the
8
+ * The default concept visual for `ProductHero`: a core with three orbit rings, in the
9
9
  * style of https://projectv.uk. Pass it as `visual`. A product sets `accent` instead of drawing
10
10
  * its own visual.
11
11
  *
@@ -13,7 +13,7 @@ const dotClass = "absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 roun
13
13
  * Each ring has a fixed start angle, so the still version does not stack the dots.
14
14
  */
15
15
  export function ProductHeroOrbit(t0) {
16
- const $ = _c(16);
16
+ const $ = _c(15);
17
17
  const {
18
18
  accent,
19
19
  children,
@@ -40,24 +40,20 @@ export function ProductHeroOrbit(t0) {
40
40
  let t3;
41
41
  let t4;
42
42
  let t5;
43
- let t6;
44
43
  if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
45
44
  t3 = /*#__PURE__*/_jsx("span", {
46
- className: "absolute inset-[24%] rounded-full bg-current/30 blur-2xl animate-pulse [animation-duration:5s] motion-reduce:animate-none"
47
- });
48
- t4 = /*#__PURE__*/_jsx("span", {
49
45
  className: cn(ringClass, "inset-[2%] border-dashed rotate-[130deg] [animation-duration:48s]"),
50
46
  children: /*#__PURE__*/_jsx("span", {
51
47
  className: cn(dotClass, "size-2 opacity-60")
52
48
  })
53
49
  });
54
- t5 = /*#__PURE__*/_jsx("span", {
50
+ t4 = /*#__PURE__*/_jsx("span", {
55
51
  className: cn(ringClass, "inset-[15%] rotate-[250deg] [animation-direction:reverse] [animation-duration:30s]"),
56
52
  children: /*#__PURE__*/_jsx("span", {
57
53
  className: cn(dotClass, "size-2.5 opacity-80")
58
54
  })
59
55
  });
60
- t6 = /*#__PURE__*/_jsx("span", {
56
+ t5 = /*#__PURE__*/_jsx("span", {
61
57
  className: cn(ringClass, "inset-[29%] border-current/40 rotate-[40deg] [animation-duration:16s]"),
62
58
  children: /*#__PURE__*/_jsx("span", {
63
59
  className: cn(dotClass, "size-3")
@@ -66,49 +62,47 @@ export function ProductHeroOrbit(t0) {
66
62
  $[4] = t3;
67
63
  $[5] = t4;
68
64
  $[6] = t5;
69
- $[7] = t6;
70
65
  } else {
71
66
  t3 = $[4];
72
67
  t4 = $[5];
73
68
  t5 = $[6];
74
- t6 = $[7];
75
69
  }
76
- let t7;
77
- if ($[8] !== children) {
78
- t7 = children ? /*#__PURE__*/_jsx("span", {
70
+ let t6;
71
+ if ($[7] !== children) {
72
+ t6 = children ? /*#__PURE__*/_jsx("span", {
79
73
  className: "flex items-center justify-center text-foreground",
80
74
  children: children
81
75
  }) : null;
82
- $[8] = children;
83
- $[9] = t7;
76
+ $[7] = children;
77
+ $[8] = t6;
84
78
  } else {
85
- t7 = $[9];
79
+ t6 = $[8];
86
80
  }
87
- let t8;
88
- if ($[10] !== t7) {
89
- t8 = /*#__PURE__*/_jsx("span", {
90
- className: "absolute inset-[40%] flex items-center justify-center rounded-full bg-current/15 ring-1 ring-current/40 shadow-[0_0_48px_8px] shadow-current/30",
91
- children: t7
81
+ let t7;
82
+ if ($[9] !== t6) {
83
+ t7 = /*#__PURE__*/_jsx("span", {
84
+ className: "absolute inset-[40%] flex items-center justify-center rounded-full bg-current/15 ring-1 ring-current/40",
85
+ children: t6
92
86
  });
87
+ $[9] = t6;
93
88
  $[10] = t7;
94
- $[11] = t8;
95
89
  } else {
96
- t8 = $[11];
90
+ t7 = $[10];
97
91
  }
98
- let t9;
99
- if ($[12] !== t1 || $[13] !== t2 || $[14] !== t8) {
100
- t9 = /*#__PURE__*/_jsxs("div", {
92
+ let t8;
93
+ if ($[11] !== t1 || $[12] !== t2 || $[13] !== t7) {
94
+ t8 = /*#__PURE__*/_jsxs("div", {
101
95
  "data-testid": "product-hero-orbit",
102
96
  className: t1,
103
97
  style: t2,
104
- children: [t3, t4, t5, t6, t8]
98
+ children: [t3, t4, t5, t7]
105
99
  });
106
- $[12] = t1;
107
- $[13] = t2;
100
+ $[11] = t1;
101
+ $[12] = t2;
102
+ $[13] = t7;
108
103
  $[14] = t8;
109
- $[15] = t9;
110
104
  } else {
111
- t9 = $[15];
105
+ t8 = $[14];
112
106
  }
113
- return t9;
107
+ return t8;
114
108
  }
@@ -250,7 +250,7 @@ export function createLandingKit({
250
250
  let t1;
251
251
  if ($[0] !== title) {
252
252
  t1 = /*#__PURE__*/_jsx("h2", {
253
- className: "max-w-2xl text-balance font-semibold text-3xl leading-[1.1] tracking-[-0.03em] text-foreground sm:text-5xl",
253
+ className: "max-w-2xl text-balance font-medium text-3xl leading-[1.1] tracking-[-0.03em] text-foreground sm:text-5xl",
254
254
  children: title
255
255
  });
256
256
  $[0] = title;
@@ -87,7 +87,7 @@ export function LandingSectionHeading(t0) {
87
87
  let t3;
88
88
  if ($[4] !== heading) {
89
89
  t3 = /*#__PURE__*/_jsx("h2", {
90
- className: "text-balance font-semibold text-3xl leading-[1.08] tracking-[-0.03em] text-foreground sm:text-5xl",
90
+ className: "text-balance font-medium text-3xl leading-[1.08] tracking-[-0.03em] text-foreground sm:text-5xl",
91
91
  children: heading
92
92
  });
93
93
  $[4] = heading;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Dock motion for a panel that docks into a rail tile: it grows out of the
3
- * tile when shown, shrinks back into it when hidden, and settles when the
4
- * tile it belongs to changes. The Web Animations API drives it: the motions
3
+ * tile when shown, shrinks back into it when hidden, and its content slides
4
+ * in when the tile it belongs to changes. The Web Animations API drives it: the motions
5
5
  * are one-shot and imperative, and a hide has to finish before the caller
6
6
  * removes the panel.
7
7
  *
@@ -17,7 +17,9 @@ import { prefersReducedMotion } from "./reduced-motion.js";
17
17
  const DOCKED_SCALE = 0.12;
18
18
  const POP_IN_MS = 380;
19
19
  const POP_OUT_MS = 260;
20
- const SWITCH_MS = 220;
20
+ const SWITCH_MS = 240;
21
+ /* The tab-switch slide: the rail page switch and tab content use 24-32px. */
22
+ const SWITCH_SLIDE_PX = 24;
21
23
  /* Out-quint: fast start, long settle. The panel lands rather than stops. */
22
24
  const SETTLE_EASE = "cubic-bezier(0.22, 1, 0.36, 1)";
23
25
  /* In-cubic: accelerates into the tile, as a minimise does. */
@@ -106,20 +108,38 @@ export function dockPopIn(panel, tile, edge, after) {
106
108
  });
107
109
  }
108
110
 
109
- /** The tile changed with the panel shown: a short settle from the new tile. */
110
- export function dockNudge(panel, tile, edge) {
111
- if (!aimAt(panel, tile, edge)) return;
111
+ /**
112
+ * The tile changed with the panel shown: the panel's content slides in from
113
+ * the side of the new tile, as tab content does (`TabsTransition`). A tile
114
+ * below the old one brings the content up from below; on a horizontal strip,
115
+ * a tile to the right brings it in from the right. The panel itself stays put,
116
+ * so its edges and arrow do not move. Enter only: the caller has already
117
+ * hidden the old content.
118
+ */
119
+ export function dockSwitch(panel, from, to) {
120
+ if (!from?.isConnected || !to || dockMotionOff() || typeof panel.animate !== "function") return;
121
+ if (panel.getBoundingClientRect().height === 0) return;
122
+ const a = from.getBoundingClientRect();
123
+ const b = to.getBoundingClientRect();
124
+ const dx = b.left - a.left;
125
+ const dy = b.top - a.top;
126
+ if (dx === 0 && dy === 0) return;
127
+ const vertical = Math.abs(dy) >= Math.abs(dx);
128
+ const sign = (vertical ? dy : dx) > 0 ? 1 : -1;
129
+ const offset = `translate${vertical ? "Y" : "X"}(${sign * SWITCH_SLIDE_PX}px)`;
112
130
  panel.dispatchEvent(new DockMotionEvent(SWITCH_MS));
113
- panel.animate([{
114
- transform: "scale(0.965)",
115
- opacity: 0.4
116
- }, {
117
- transform: "scale(1)",
118
- opacity: 1
119
- }], {
120
- duration: SWITCH_MS,
121
- easing: SETTLE_EASE
122
- });
131
+ for (const child of panel.children) {
132
+ child.animate([{
133
+ transform: offset,
134
+ opacity: 0
135
+ }, {
136
+ transform: "none",
137
+ opacity: 1
138
+ }], {
139
+ duration: SWITCH_MS,
140
+ easing: SETTLE_EASE
141
+ });
142
+ }
123
143
  }
124
144
 
125
145
  /**
@@ -8,6 +8,6 @@ export const menuContentClass = ["z-50 min-w-48 overflow-hidden p-1.5 outline-hi
8
8
  export const menuSubTriggerClass = "flex cursor-pointer select-none items-center gap-2 rounded-menu-item px-2.5 py-2 text-sm text-foreground outline-hidden transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.99] focus:bg-default focus:text-foreground data-highlighted:bg-default data-highlighted:text-foreground data-[state=open]:bg-default data-disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
9
9
  export const menuItemClass = "relative flex cursor-pointer select-none items-center gap-2 rounded-menu-item px-2.5 py-2 text-sm outline-hidden transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.99] focus:bg-default focus:text-foreground data-highlighted:bg-default data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:pointer-events-none";
10
10
  export const menuCheckboxRadioItemClass = "relative flex cursor-pointer select-none items-center rounded-menu-item py-2 pl-8 pr-2.5 text-sm outline-hidden transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.99] focus:bg-default focus:text-foreground data-highlighted:bg-default data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50";
11
- export const menuLabelClass = "px-2.5 py-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground";
11
+ export const menuLabelClass = "px-2.5 py-1.5 text-xs font-medium uppercase tracking-widest text-muted-foreground";
12
12
  export const menuSeparatorClass = "-mx-1.5 my-1 h-px bg-separator";
13
13
  export const menuShortcutClass = "ml-auto text-xs tracking-wide text-muted-foreground/90";
@@ -22,6 +22,6 @@ export const menuContentClass = ["z-50 min-w-[12rem] overflow-hidden p-1 outline
22
22
  export const menuSubTriggerClass = "flex cursor-pointer select-none items-center gap-2 rounded-menu-item px-2.5 py-1.5 max-sm:min-h-10 text-sm text-foreground outline-none transition-[background-color,color] focus:bg-default focus:text-foreground data-[highlighted]:bg-default data-[highlighted]:text-foreground data-[state=open]:bg-default data-[disabled]:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
23
23
  export const menuItemClass = "relative flex cursor-pointer select-none items-center gap-2 rounded-menu-item px-2.5 py-1.5 max-sm:min-h-10 text-sm outline-none transition-[background-color,color] focus:bg-default focus:text-foreground data-[highlighted]:bg-default data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:pointer-events-none";
24
24
  export const menuCheckboxRadioItemClass = "relative flex cursor-pointer select-none items-center rounded-menu-item py-1.5 max-sm:min-h-10 pl-8 pr-2.5 text-sm outline-none transition-[background-color,color] focus:bg-default focus:text-foreground data-[highlighted]:bg-default data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50";
25
- export const menuLabelClass = "px-2.5 py-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground";
25
+ export const menuLabelClass = "px-2.5 py-1.5 text-xs font-medium uppercase tracking-widest text-muted-foreground";
26
26
  export const menuSeparatorClass = "-mx-1 my-1 h-px bg-separator";
27
27
  export const menuShortcutClass = "ml-auto text-xs tracking-wide text-muted-foreground/90";
@@ -281,7 +281,7 @@ export function BulkActionBar(t0) {
281
281
  className: "flex shrink-0 items-center gap-2 pl-1 pr-0.5",
282
282
  children: [/*#__PURE__*/_jsx(CountPop, {
283
283
  label: String(selectedCount),
284
- className: "rounded-md bg-surface-secondary px-2 py-0.5 text-xs font-semibold text-foreground tabular-nums"
284
+ className: "rounded-md bg-surface-secondary px-2 py-0.5 text-xs font-medium text-foreground tabular-nums"
285
285
  }), /*#__PURE__*/_jsx("span", {
286
286
  className: "hidden text-sm font-medium text-muted-foreground sm:inline",
287
287
  children: "selected"
@@ -159,7 +159,7 @@ function Calendar({
159
159
  // selected tone never depends on the order Tailwind emits rules in.
160
160
  // the today dot is `bg-current`: foreground, or primary-foreground
161
161
  // when selected
162
- "not-group-data-selected/day:enabled:hover:bg-surface-tertiary/50", "group-data-today/day:font-semibold group-data-today/day:not-group-data-selected/day:text-foreground group-data-today/day:after:absolute group-data-today/day:after:bottom-1 group-data-today/day:after:left-1/2 group-data-today/day:after:size-1 group-data-today/day:after:-translate-x-1/2 group-data-today/day:after:rounded-full group-data-today/day:after:bg-current", "group-data-outside/day:not-group-data-selected/day:text-muted-foreground",
162
+ "not-group-data-selected/day:enabled:hover:bg-surface-tertiary/50", "group-data-today/day:font-medium group-data-today/day:not-group-data-selected/day:text-foreground group-data-today/day:after:absolute group-data-today/day:after:bottom-1 group-data-today/day:after:left-1/2 group-data-today/day:after:size-1 group-data-today/day:after:-translate-x-1/2 group-data-today/day:after:rounded-full group-data-today/day:after:bg-current", "group-data-outside/day:not-group-data-selected/day:text-muted-foreground",
163
163
  // spelled out (not built from pickerSelectedClass) so Tailwind's
164
164
  // scanner sees it
165
165
  "group-data-selected/day:bg-primary group-data-selected/day:text-primary-foreground", defaultClassNames.day_button),
@@ -103,7 +103,7 @@ const CardTitle = /*#__PURE__*/React.forwardRef((t0, ref) => {
103
103
  className = $[1];
104
104
  props = $[2];
105
105
  }
106
- const t1 = useCardClass("title", "font-semibold leading-none tracking-[-0.02em]", className);
106
+ const t1 = useCardClass("title", "font-medium leading-none tracking-[-0.02em]", className);
107
107
  let t2;
108
108
  if ($[3] !== props || $[4] !== ref || $[5] !== t1) {
109
109
  t2 = /*#__PURE__*/_jsx("div", {
@@ -274,7 +274,7 @@ const PlainClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
274
274
  return t13;
275
275
  });
276
276
  const DissolveClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
277
- const $ = _c(73);
277
+ const $ = _c(72);
278
278
  let className;
279
279
  let classes;
280
280
  let leading;
@@ -324,7 +324,6 @@ const DissolveClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
324
324
  const inputRef = React.useRef(null);
325
325
  const mirrorRef = React.useRef(null);
326
326
  const placeholderRef = React.useRef(null);
327
- const glowRef = React.useRef(null);
328
327
  const clearingRef = React.useRef(false);
329
328
  const [clearing, setClearing] = React.useState(false);
330
329
  let t3;
@@ -386,8 +385,7 @@ const DissolveClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
386
385
  const input = inputRef.current;
387
386
  const mirror_0 = mirrorRef.current;
388
387
  const placeholderLayer = placeholderRef.current;
389
- const glow = glowRef.current;
390
- if (!wrap_0 || !input || !mirror_0 || !placeholderLayer || !glow || clearingRef.current || value.length === 0) {
388
+ if (!wrap_0 || !input || !mirror_0 || !placeholderLayer || clearingRef.current || value.length === 0) {
391
389
  return;
392
390
  }
393
391
  clearingRef.current = true;
@@ -396,8 +394,7 @@ const DissolveClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
396
394
  wrap: wrap_0,
397
395
  input,
398
396
  mirror: mirror_0,
399
- placeholderLayer,
400
- glow
397
+ placeholderLayer
401
398
  }, () => {
402
399
  onChange("");
403
400
  }, () => {
@@ -516,33 +513,23 @@ const DissolveClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
516
513
  t18 = $[53];
517
514
  }
518
515
  let t19;
519
- if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
520
- t19 = /*#__PURE__*/_jsx("div", {
521
- ref: glowRef,
522
- className: "t-clear-glow"
523
- });
524
- $[54] = t19;
525
- } else {
526
- t19 = $[54];
527
- }
528
- let t20;
529
- if ($[55] !== t11 || $[56] !== t12 || $[57] !== t13 || $[58] !== t18) {
530
- t20 = /*#__PURE__*/_jsxs("div", {
516
+ if ($[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t18) {
517
+ t19 = /*#__PURE__*/_jsxs("div", {
531
518
  className: t11,
532
519
  "aria-hidden": t12,
533
- children: [t13, t18, t19]
520
+ children: [t13, t18]
534
521
  });
535
- $[55] = t11;
536
- $[56] = t12;
537
- $[57] = t13;
538
- $[58] = t18;
539
- $[59] = t20;
522
+ $[54] = t11;
523
+ $[55] = t12;
524
+ $[56] = t13;
525
+ $[57] = t18;
526
+ $[58] = t19;
540
527
  } else {
541
- t20 = $[59];
528
+ t19 = $[58];
542
529
  }
543
- let t21;
544
- if ($[60] !== classes || $[61] !== clearLabel || $[62] !== clearing || $[63] !== handleClear || $[64] !== value.length) {
545
- t21 = value.length > 0 && !clearing ? /*#__PURE__*/_jsx("button", {
530
+ let t20;
531
+ if ($[59] !== classes || $[60] !== clearLabel || $[61] !== clearing || $[62] !== handleClear || $[63] !== value.length) {
532
+ t20 = value.length > 0 && !clearing ? /*#__PURE__*/_jsx("button", {
546
533
  type: "button",
547
534
  className: classes?.button ? `t-clear-btn ${classes.button}` : `t-clear-btn ${buttonClasses}`,
548
535
  "aria-label": clearLabel,
@@ -554,32 +541,32 @@ const DissolveClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
554
541
  stroke: 1.75
555
542
  })
556
543
  }) : null;
557
- $[60] = classes;
558
- $[61] = clearLabel;
559
- $[62] = clearing;
560
- $[63] = handleClear;
561
- $[64] = value.length;
562
- $[65] = t21;
544
+ $[59] = classes;
545
+ $[60] = clearLabel;
546
+ $[61] = clearing;
547
+ $[62] = handleClear;
548
+ $[63] = value.length;
549
+ $[64] = t20;
563
550
  } else {
564
- t21 = $[65];
551
+ t20 = $[64];
565
552
  }
566
- let t22;
567
- if ($[66] !== t14 || $[67] !== t15 || $[68] !== t16 || $[69] !== t17 || $[70] !== t20 || $[71] !== t21) {
568
- t22 = /*#__PURE__*/_jsxs("div", {
553
+ let t21;
554
+ if ($[65] !== t14 || $[66] !== t15 || $[67] !== t16 || $[68] !== t17 || $[69] !== t19 || $[70] !== t20) {
555
+ t21 = /*#__PURE__*/_jsxs("div", {
569
556
  ref: t14,
570
557
  className: t15,
571
- children: [t16, t17, t20, t21]
558
+ children: [t16, t17, t19, t20]
572
559
  });
573
- $[66] = t14;
574
- $[67] = t15;
575
- $[68] = t16;
576
- $[69] = t17;
560
+ $[65] = t14;
561
+ $[66] = t15;
562
+ $[67] = t16;
563
+ $[68] = t17;
564
+ $[69] = t19;
577
565
  $[70] = t20;
578
566
  $[71] = t21;
579
- $[72] = t22;
580
567
  } else {
581
- t22 = $[72];
568
+ t21 = $[71];
582
569
  }
583
- return t22;
570
+ return t21;
584
571
  });
585
572
  export { ClearInput };
@@ -1,7 +1,5 @@
1
1
  /** transitions.dev input clear with dissolve — see 13-input-clear-dissolve.md */
2
2
 
3
- import { readDocumentAppearance } from "../hooks/use-document-appearance.js";
4
-
5
3
  // Times come back in ms. CSS minifiers rewrite `1000ms` as `1s`, so a value
6
4
  // in seconds is converted rather than read as 1.
7
5
  export function readCssNumber(root, name, fallback) {
@@ -47,45 +45,6 @@ export function readCssEase(root, name) {
47
45
  return ((ay * sample + by) * sample + cy) * sample;
48
46
  };
49
47
  }
50
- function measureCanvas() {
51
- const canvas = document.createElement("canvas");
52
- return canvas.getContext("2d");
53
- }
54
- let sharedMeasureCanvas = null;
55
- function getMeasureCanvas() {
56
- if (sharedMeasureCanvas === null) {
57
- sharedMeasureCanvas = measureCanvas();
58
- }
59
- return sharedMeasureCanvas;
60
- }
61
- function buildGlowBackground(wrap, input, text, root) {
62
- const canvas = getMeasureCanvas();
63
- if (canvas === null) {
64
- return "";
65
- }
66
- canvas.font = getComputedStyle(input).font;
67
- const dark = readDocumentAppearance() === "dark";
68
- const rgb = dark ? "255,255,255" : "0,0,0";
69
- const width = wrap.clientWidth || 280;
70
- const padLeft = parseFloat(getComputedStyle(input).paddingLeft) || 12;
71
- const spread = readCssNumber(root, "--glow-spread", 1.5);
72
- const layers = [];
73
- let x = 0;
74
- for (const segment of text.split(/(\s+)/)) {
75
- const segmentWidth = canvas.measureText(segment).width;
76
- if (segment.trim()) {
77
- const centerX = padLeft + x + segmentWidth / 2;
78
- const halfWidth = Math.max(segmentWidth * 0.45, 8) * spread;
79
- const streaks = [[0, 0.8, 7, 0.22], [halfWidth * 0.45, 0.55, 8, 0.18], [-halfWidth * 0.4, 0.65, 6, 0.16], [halfWidth * 0.15, 0.9, 5, 0.14]];
80
- for (const [dx, rwm, rh, alpha] of streaks) {
81
- const leftPercent = ((centerX + dx) / width * 100).toFixed(2);
82
- layers.push(`radial-gradient(ellipse ${Math.max(halfWidth * rwm, 2).toFixed(1)}px ${rh}px at ${leftPercent}% 100%, rgba(${rgb},${alpha}), transparent)`);
83
- }
84
- }
85
- x += segmentWidth;
86
- }
87
- return layers.join(", ");
88
- }
89
48
  function resetLayerStyles(mirror, placeholderLayer) {
90
49
  mirror.style.cssText = "";
91
50
  placeholderLayer.style.cssText = "";
@@ -95,8 +54,7 @@ export function runClearInputDissolve(elements, onValueClear, onDone) {
95
54
  wrap,
96
55
  input,
97
56
  mirror,
98
- placeholderLayer,
99
- glow
57
+ placeholderLayer
100
58
  } = elements;
101
59
  const root = document.documentElement;
102
60
  const text = input.value;
@@ -105,21 +63,16 @@ export function runClearInputDissolve(elements, onValueClear, onDone) {
105
63
  }
106
64
  const keepFocus = document.activeElement === input;
107
65
  mirror.textContent = text.replace(/ /g, "\u00a0");
108
- const total = readCssNumber(root, "--clear-dur", 1000);
66
+ const total = readCssNumber(root, "--clear-dur", 400);
109
67
  const outDur = readCssNumber(root, "--clear-out-dur", 400);
110
68
  const inDur = readCssNumber(root, "--clear-in-dur", 400);
111
69
  const outFly = readCssNumber(root, "--clear-out-fly", 12);
112
70
  const inFly = readCssNumber(root, "--clear-in-fly", 12);
113
- const delay = readCssNumber(root, "--glow-delay", 50);
114
- const peakAt = readCssNumber(root, "--glow-peak-at", 0.15);
115
- const glowOpacity = readCssNumber(root, "--glow-opacity", 0.85);
116
71
  const easeOut = readCssEase(root, "--clear-out-ease");
117
72
  const easeIn = readCssEase(root, "--clear-in-ease");
118
73
  onValueClear();
119
74
  wrap.classList.remove("has-value");
120
75
  wrap.classList.add("is-clearing");
121
- glow.style.background = buildGlowBackground(wrap, input, mirror.textContent, root);
122
- glow.style.opacity = "0";
123
76
  placeholderLayer.style.transform = `translateY(-${inFly}px)`;
124
77
  placeholderLayer.style.opacity = "0.9";
125
78
  placeholderLayer.style.filter = "none";
@@ -133,12 +86,6 @@ export function runClearInputDissolve(elements, onValueClear, onDone) {
133
86
  const inProgress = easeIn(Math.min(1, elapsed / inDur));
134
87
  placeholderLayer.style.transform = `translateY(${(-inFly + inProgress * inFly).toFixed(1)}px)`;
135
88
  placeholderLayer.style.opacity = (0.9 + inProgress * 0.1).toFixed(3);
136
- let glowStrength = 0;
137
- if (elapsed > delay) {
138
- const glowProgress = Math.min(1, (elapsed - delay) / Math.max(1, total - delay));
139
- glowStrength = glowProgress < peakAt ? glowProgress / peakAt : 1 - (glowProgress - peakAt) / (1 - peakAt);
140
- }
141
- glow.style.opacity = (glowStrength * glowOpacity).toFixed(3);
142
89
  if (elapsed < total) {
143
90
  requestAnimationFrame(tick);
144
91
  return;
@@ -146,8 +93,6 @@ export function runClearInputDissolve(elements, onValueClear, onDone) {
146
93
  wrap.classList.remove("is-clearing");
147
94
  resetLayerStyles(mirror, placeholderLayer);
148
95
  mirror.textContent = "";
149
- glow.style.opacity = "0";
150
- glow.style.background = "";
151
96
  onDone();
152
97
  if (keepFocus) {
153
98
  requestAnimationFrame(() => {
@@ -56,7 +56,7 @@ Command.displayName = CommandPrimitive.displayName;
56
56
 
57
57
  // The list is pinned rather than `max-h`: a palette that resizes on every
58
58
  // keystroke shifts the whole dialog under the cursor.
59
- const commandDialogPinnedClass = "[&_[cmdk-list]]:h-80 [&_[cmdk-list]]:max-h-[60dvh] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-widest [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-1.5 [&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-input]]:h-11 [&_[cmdk-item]]:rounded-menu-item [&_[cmdk-item]]:px-2.5 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4";
59
+ const commandDialogPinnedClass = "[&_[cmdk-list]]:h-80 [&_[cmdk-list]]:max-h-[60dvh] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-widest [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-1.5 [&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-input]]:h-11 [&_[cmdk-item]]:rounded-menu-item [&_[cmdk-item]]:px-2.5 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4";
60
60
 
61
61
  // Keyboard surface: the palette opens and closes in the same frame. Override
62
62
  // the `t-modal` timing variables on the content element (do not fork the CSS).
@@ -71,7 +71,7 @@ const commandDialogInstantClass = "[--modal-open-dur:0ms] [--modal-close-dur:1ms
71
71
  const commandOverlayInstantClass = "[animation:none!important]";
72
72
 
73
73
  // The list sizes itself and items keep the caller's styling.
74
- const commandDialogAutoClass = "[&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-widest [&_[cmdk-group-heading]]:text-muted [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-1.5 [&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-input]]:h-11 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4"; // check-tokens-allow: text-muted
74
+ const commandDialogAutoClass = "[&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-widest [&_[cmdk-group-heading]]:text-muted [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-1.5 [&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-input]]:h-11 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4"; // check-tokens-allow: text-muted
75
75
 
76
76
  function CommandDialog(t0) {
77
77
  const $ = _c(26);
@@ -365,7 +365,7 @@ const CommandGroup = /*#__PURE__*/React.forwardRef((t0, ref) => {
365
365
  }
366
366
  const group = useUiConfig("Command")?.classes?.group;
367
367
  const merge = useCn();
368
- const t1 = group ?? "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-widest [&_[cmdk-group-heading]]:text-muted-foreground";
368
+ const t1 = group ?? "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-widest [&_[cmdk-group-heading]]:text-muted-foreground";
369
369
  let t2;
370
370
  if ($[3] !== className || $[4] !== merge || $[5] !== t1) {
371
371
  t2 = merge(t1, className);
@@ -124,7 +124,7 @@ export function UnreadDot(t0) {
124
124
  * Shape and placement of a count badge hung off a tile's bottom-right corner.
125
125
  * Put the tile in a `relative` box; add one tone class (e.g. a live colour).
126
126
  */
127
- export const CORNER_BADGE_CLASS = "absolute -bottom-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-semibold leading-none";
127
+ export const CORNER_BADGE_CLASS = "absolute -bottom-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-medium leading-none";
128
128
 
129
129
  /** An unread count on a tile's corner: `CountPop` in the primary tone, "99+" above 99. */
130
130
  export function UnreadCornerBadge(t0) {
@@ -591,7 +591,7 @@ const DialogTitle = /*#__PURE__*/React.forwardRef((t0, ref) => {
591
591
  }
592
592
  const title = useUiConfig("Dialog")?.classes?.title;
593
593
  const merge = useCn();
594
- const t1 = title ?? "text-lg font-semibold tracking-normal text-foreground text-balance";
594
+ const t1 = title ?? "text-lg font-medium tracking-normal text-foreground text-balance";
595
595
  let t2;
596
596
  if ($[3] !== className || $[4] !== merge || $[5] !== t1) {
597
597
  t2 = merge(t1, className);
@@ -51,7 +51,7 @@ export function ImageGalleryPreview(t0) {
51
51
  loading: "lazy",
52
52
  className: cn("h-full w-full object-cover transition-opacity hover:opacity-90", count === 3 && index === 0 ? "min-h-full" : "aspect-4/3")
53
53
  }), overflow > 0 && index === tiles.length - 1 ? /*#__PURE__*/_jsxs("span", {
54
- className: "absolute inset-0 flex items-center justify-center bg-black/60 text-xl font-semibold text-white",
54
+ className: "absolute inset-0 flex items-center justify-center bg-black/60 text-xl font-medium text-white",
55
55
  children: ["+", overflow]
56
56
  }) : null]
57
57
  }, index))
@@ -36,7 +36,7 @@ const Progress = /*#__PURE__*/React.forwardRef((t0, ref) => {
36
36
  } else {
37
37
  t2 = $[7];
38
38
  }
39
- const t3 = classes?.indicator ?? "h-full w-full flex-1 rounded-full bg-primary transition-transform duration-300 ease-smooth";
39
+ const t3 = classes?.indicator ?? "h-full w-full flex-1 rounded-full bg-primary transition-transform duration-200 ease-smooth";
40
40
  const t4 = `translateX(-${100 - (value ?? 0)}%)`;
41
41
  let t5;
42
42
  if ($[8] !== t4) {
@@ -261,7 +261,7 @@ function SelectLabel(t0) {
261
261
  }
262
262
  let t1;
263
263
  if ($[3] !== className) {
264
- t1 = cn("text-muted-foreground px-2.5 py-1.5 text-xs font-semibold uppercase tracking-widest", className);
264
+ t1 = cn("text-muted-foreground px-2.5 py-1.5 text-xs font-medium uppercase tracking-widest", className);
265
265
  $[3] = className;
266
266
  $[4] = t1;
267
267
  } else {
@@ -345,7 +345,7 @@ const SelectLabel = /*#__PURE__*/React.forwardRef((t0, ref) => {
345
345
  }
346
346
  const label = useUiConfig("Select")?.classes?.label;
347
347
  const merge = useCn();
348
- const t1 = label ?? "px-2.5 py-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground";
348
+ const t1 = label ?? "px-2.5 py-1.5 text-xs font-medium uppercase tracking-widest text-muted-foreground";
349
349
  let t2;
350
350
  if ($[3] !== className || $[4] !== merge || $[5] !== t1) {
351
351
  t2 = merge(t1, className);
@@ -218,7 +218,7 @@ const TableHead = /*#__PURE__*/React.forwardRef((t0, ref) => {
218
218
  className = $[1];
219
219
  props = $[2];
220
220
  }
221
- const t1 = useTableClass("head", "h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-widest text-muted-foreground [&:has([role=checkbox])]:pr-0", className);
221
+ const t1 = useTableClass("head", "h-11 px-4 text-left align-middle text-xs font-medium uppercase tracking-widest text-muted-foreground [&:has([role=checkbox])]:pr-0", className);
222
222
  let t2;
223
223
  if ($[3] !== props || $[4] !== ref || $[5] !== t1) {
224
224
  t2 = /*#__PURE__*/_jsx("th", {