@teamofsilicons/silicon-ui 0.2.0 → 0.4.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 (163) hide show
  1. package/README.md +4 -3
  2. package/check.mjs +14 -5
  3. package/components/activity-heatmap/activity-heatmap.module.css +4 -4
  4. package/components/alert/alert.module.css +1 -1
  5. package/components/animated-counter/animated-counter.js +1 -1
  6. package/components/announcement-bar/announcement-bar.module.css +6 -6
  7. package/components/avatar/avatar.d.ts +2 -2
  8. package/components/avatar/avatar.js +1 -1
  9. package/components/avatar/avatar.module.css +5 -2
  10. package/components/avatar-group/avatar-group.module.css +4 -4
  11. package/components/badge/badge.module.css +4 -4
  12. package/components/bar-chart/bar-chart.js +1 -1
  13. package/components/bar-chart/bar-chart.module.css +4 -4
  14. package/components/billing-toggle/billing-toggle.js +2 -2
  15. package/components/billing-toggle/billing-toggle.module.css +10 -10
  16. package/components/bottom-sheet/bottom-sheet.js +1 -1
  17. package/components/bottom-sheet/bottom-sheet.module.css +4 -5
  18. package/components/breadcrumb/breadcrumb.d.ts +8 -2
  19. package/components/breadcrumb/breadcrumb.js +21 -9
  20. package/components/breadcrumb/breadcrumb.module.css +7 -3
  21. package/components/brush-chart/brush-chart.module.css +9 -9
  22. package/components/button/button.d.ts +7 -2
  23. package/components/button/button.js +3 -1
  24. package/components/button/button.module.css +10 -1
  25. package/components/button-group/button-group.module.css +7 -7
  26. package/components/calendar/calendar.js +15 -5
  27. package/components/calendar/calendar.module.css +13 -10
  28. package/components/card/card.js +4 -4
  29. package/components/card/card.module.css +2 -2
  30. package/components/card-stack/card-stack.js +2 -2
  31. package/components/card-stack/card-stack.module.css +2 -3
  32. package/components/carousel/carousel.module.css +3 -3
  33. package/components/chat-thread/chat-thread.module.css +41 -41
  34. package/components/checkbox/checkbox.module.css +1 -1
  35. package/components/chip-group/chip-group.js +1 -1
  36. package/components/chip-group/chip-group.module.css +2 -2
  37. package/components/code-block/code-block.module.css +7 -14
  38. package/components/color-picker/color-picker.module.css +20 -21
  39. package/components/combobox/combobox.js +5 -1
  40. package/components/combobox/combobox.module.css +2 -2
  41. package/components/command-palette/command-palette.js +18 -11
  42. package/components/command-palette/command-palette.module.css +18 -18
  43. package/components/comment-thread/comment-thread.module.css +35 -35
  44. package/components/confirm-morph/confirm-morph.js +5 -5
  45. package/components/confirm-morph/confirm-morph.module.css +9 -9
  46. package/components/context-menu/context-menu.js +10 -28
  47. package/components/context-menu/context-menu.module.css +3 -3
  48. package/components/copy-button/copy-button.js +4 -4
  49. package/components/countdown/countdown.module.css +4 -4
  50. package/components/date-picker/date-picker.js +3 -3
  51. package/components/date-picker/date-picker.module.css +7 -7
  52. package/components/date-range-picker/date-range-picker.js +13 -10
  53. package/components/date-range-picker/date-range-picker.module.css +23 -22
  54. package/components/dialog/dialog.module.css +2 -2
  55. package/components/donut-chart/donut-chart.module.css +5 -5
  56. package/components/drawer/drawer.module.css +7 -7
  57. package/components/dropdown-menu/dropdown-menu.d.ts +71 -1
  58. package/components/dropdown-menu/dropdown-menu.js +100 -6
  59. package/components/dropdown-menu/dropdown-menu.module.css +15 -5
  60. package/components/elastic-slider/elastic-slider.js +2 -2
  61. package/components/elastic-slider/elastic-slider.module.css +4 -4
  62. package/components/expandable-card/expandable-card.js +1 -1
  63. package/components/expandable-card/expandable-card.module.css +1 -1
  64. package/components/expanding-button-group/expanding-button-group.module.css +3 -3
  65. package/components/expanding-search/expanding-search.js +3 -3
  66. package/components/expanding-search/expanding-search.module.css +9 -9
  67. package/components/file-dropzone/file-dropzone.js +3 -3
  68. package/components/file-dropzone/file-dropzone.module.css +21 -21
  69. package/components/file-upload/file-upload.module.css +7 -7
  70. package/components/filter-toolbar/filter-toolbar.js +7 -3
  71. package/components/filter-toolbar/filter-toolbar.module.css +9 -9
  72. package/components/floating-button-group/floating-button-group.module.css +7 -7
  73. package/components/gauge/gauge.js +1 -1
  74. package/components/gauge/gauge.module.css +2 -2
  75. package/components/hover-card/hover-card.js +2 -2
  76. package/components/hover-card/hover-card.module.css +2 -2
  77. package/components/image-compare/image-compare.module.css +4 -4
  78. package/components/inline-edit/inline-edit.module.css +12 -12
  79. package/components/json-viewer/json-viewer.module.css +12 -12
  80. package/components/line-chart/line-chart.js +1 -1
  81. package/components/line-chart/line-chart.module.css +8 -8
  82. package/components/mention-input/mention-input.js +4 -2
  83. package/components/mention-input/mention-input.module.css +8 -8
  84. package/components/metric-card/metric-card.module.css +1 -1
  85. package/components/money-input/money-input.js +6 -3
  86. package/components/money-input/money-input.module.css +10 -10
  87. package/components/morph-select/morph-select.js +7 -5
  88. package/components/morph-select/morph-select.module.css +13 -13
  89. package/components/multi-select/multi-select.js +4 -2
  90. package/components/multi-select/multi-select.module.css +6 -6
  91. package/components/nav-list/nav-list.d.ts +64 -0
  92. package/components/nav-list/nav-list.js +96 -0
  93. package/components/nav-list/nav-list.module.css +25 -0
  94. package/components/notification-center/notification-center.module.css +27 -27
  95. package/components/number-field/number-field.js +3 -3
  96. package/components/number-field/number-field.module.css +3 -3
  97. package/components/otp-input/otp-input.module.css +4 -4
  98. package/components/pagination/pagination.module.css +1 -1
  99. package/components/password-field/password-field.module.css +2 -2
  100. package/components/password-strength/password-strength.module.css +8 -8
  101. package/components/phone-input/phone-input.js +9 -7
  102. package/components/phone-input/phone-input.module.css +19 -19
  103. package/components/popover/popover.module.css +2 -2
  104. package/components/progress/progress.module.css +1 -1
  105. package/components/radio-cards/radio-cards.module.css +8 -8
  106. package/components/radio-group/radio-group.js +4 -1
  107. package/components/radio-group/radio-group.module.css +4 -3
  108. package/components/resizable-panels/resizable-panels.module.css +5 -5
  109. package/components/rich-text-editor/rich-text-editor.js +3 -3
  110. package/components/rich-text-editor/rich-text-editor.module.css +12 -12
  111. package/components/ridgeline/ridgeline.module.css +7 -7
  112. package/components/scroll-area/scroll-area.module.css +8 -8
  113. package/components/segmented-control/segmented-control.d.ts +3 -1
  114. package/components/segmented-control/segmented-control.js +5 -2
  115. package/components/segmented-control/segmented-control.module.css +9 -4
  116. package/components/select/select.module.css +5 -5
  117. package/components/shortcut-recorder/shortcut-recorder.js +5 -5
  118. package/components/shortcut-recorder/shortcut-recorder.module.css +16 -16
  119. package/components/signature-pad/signature-pad.module.css +11 -11
  120. package/components/slider/slider.module.css +4 -4
  121. package/components/slope-chart/slope-chart.module.css +7 -7
  122. package/components/slot-text/slot-text.js +2 -1
  123. package/components/sortable-data-table/sortable-data-table.module.css +4 -4
  124. package/components/sparkline/sparkline.js +1 -1
  125. package/components/split-button/split-button.module.css +6 -6
  126. package/components/stepper/stepper.module.css +3 -3
  127. package/components/streamgraph/streamgraph.module.css +7 -7
  128. package/components/swipe-actions/swipe-actions.js +2 -2
  129. package/components/swipe-actions/swipe-actions.module.css +5 -5
  130. package/components/switch/switch.js +2 -2
  131. package/components/switch/switch.module.css +1 -1
  132. package/components/tabs/tabs.d.ts +9 -2
  133. package/components/tabs/tabs.js +11 -5
  134. package/components/tabs/tabs.module.css +10 -3
  135. package/components/tag-input/tag-input.module.css +4 -4
  136. package/components/text-reveal/text-reveal.js +1 -1
  137. package/components/time-picker/time-picker.js +4 -2
  138. package/components/time-picker/time-picker.module.css +3 -3
  139. package/components/timeline/timeline.js +4 -4
  140. package/components/timeline/timeline.module.css +3 -3
  141. package/components/toast/toast.js +1 -1
  142. package/components/toast/toast.module.css +5 -5
  143. package/components/toast-stack/toast-stack.js +1 -1
  144. package/components/toast-stack/toast-stack.module.css +5 -5
  145. package/components/tooltip/tooltip.module.css +1 -1
  146. package/components/tree-view/tree-view.js +16 -12
  147. package/components/tree-view/tree-view.module.css +10 -8
  148. package/components/treemap/treemap.module.css +13 -13
  149. package/components/usage-meter/usage-meter.js +1 -1
  150. package/components/usage-meter/usage-meter.module.css +5 -5
  151. package/components/user-menu/user-menu.js +16 -14
  152. package/components/user-menu/user-menu.module.css +22 -22
  153. package/components/waffle-chart/waffle-chart.module.css +7 -7
  154. package/components.json +416 -1
  155. package/eslint.js +35 -3
  156. package/lib/fluid-hover.d.ts +83 -0
  157. package/lib/fluid-hover.js +184 -0
  158. package/lib/menu-highlight.d.ts +24 -11
  159. package/lib/menu-highlight.js +29 -28
  160. package/lib/motion-tokens.d.ts +76 -18
  161. package/lib/motion-tokens.js +45 -10
  162. package/package.json +1 -1
  163. package/styles.css +50 -7
@@ -15,7 +15,7 @@
15
15
  /* Only the band stretches. Ticks, thumb, and tag ride along without distorting. */
16
16
  .track { position: absolute; inset: 0; border-radius: var(--radius-full); corner-shape: round; background: var(--control-track); will-change: transform; }
17
17
  .fill { position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; background: var(--control-fill); }
18
- .tick { position: absolute; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: var(--radius-full); corner-shape: round; background: color-mix(in oklab, var(--foreground) 32%, transparent); pointer-events: none; transition: background-color var(--duration-fast) var(--ease-standard); }
18
+ .tick { position: absolute; top: 50%; width: 4px; height: 4px; margin: calc(var(--space-hair) * -1) 0 0 calc(var(--space-hair) * -1); border-radius: var(--radius-full); corner-shape: round; background: color-mix(in oklab, var(--foreground) 32%, transparent); pointer-events: none; transition: background-color var(--duration-fast) var(--ease-standard); }
19
19
  .tick[data-on] { background: color-mix(in oklab, var(--control-glyph) 60%, transparent); }
20
20
  .thumbs { position: absolute; inset: 0 calc(var(--elastic-thumb) / 2); container-type: inline-size; pointer-events: none; }
21
21
  /* Each layer is as wide as the rail and slides by a percentage of itself, so placing the thumb needs no measuring. */
@@ -23,11 +23,11 @@
23
23
  .shift { position: absolute; inset: 0; }
24
24
  .thumb { position: absolute; top: 50%; right: 0; box-sizing: border-box; width: var(--elastic-thumb); height: var(--elastic-thumb); translate: 50% -50%; border: 0; border-radius: var(--radius-full); corner-shape: round; background: var(--control-thumb); box-shadow: var(--control-thumb-shadow); pointer-events: auto; cursor: grab; outline: none; transition: box-shadow var(--duration-fast) var(--ease-standard); }
25
25
  /* A generous invisible hit area for fingertips. */
26
- .thumb::after { content: ""; position: absolute; inset: -12px; border-radius: inherit; corner-shape: inherit; }
26
+ .thumb::after { content: ""; position: absolute; inset: calc(var(--space-group) * -1); border-radius: inherit; corner-shape: inherit; }
27
27
  .root[data-dragging], .root[data-dragging] .control, .root[data-dragging] .thumb { cursor: grabbing; }
28
28
  /* The tag centers on the thumb until it would pass the component's edge, then holds there. It hangs from its bottom edge, so a swing pivots on the thumb. */
29
- .bubbleAnchor { --edge: calc(var(--elastic-thumb) / 2); --x: calc(var(--at, 0) * 1cqw); position: absolute; right: 0; bottom: calc(50% + var(--elastic-thumb) / 2 + 10px); display: flex; translate: clamp(calc(100% - var(--edge) - var(--x)), 50%, calc(100cqw + var(--edge) - var(--x))) 0; pointer-events: none; }
30
- @media (pointer: coarse) { .bubbleAnchor { bottom: calc(50% + var(--elastic-thumb) / 2 + 20px); } }
29
+ .bubbleAnchor { --edge: calc(var(--elastic-thumb) / 2); --x: calc(var(--at, 0) * 1cqw); position: absolute; right: 0; bottom: calc(50% + var(--elastic-thumb) / 2 + var(--space-group)); display: flex; translate: clamp(calc(100% - var(--edge) - var(--x)), 50%, calc(100cqw + var(--edge) - var(--x))) 0; pointer-events: none; }
30
+ @media (pointer: coarse) { .bubbleAnchor { bottom: calc(50% + var(--elastic-thumb) / 2 + var(--space-comfort)); } }
31
31
  .bubble { display: inline-flex; min-height: 1.75rem; align-items: center; padding: 0 var(--space-group); border-radius: var(--radius-full); corner-shape: round; background: var(--foreground); color: var(--background); box-shadow: var(--shadow-raised); font-size: var(--text-sm); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; transform-origin: 50% 130%; }
32
32
  .marks { position: relative; grid-area: 2 / 2; height: 1.25rem; margin: 0 calc(var(--elastic-thumb) / 2); color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
33
33
  .markLabel { position: absolute; top: 0; translate: -50% 0; white-space: nowrap; cursor: pointer; transition: color var(--duration-fast) var(--ease-standard); }
@@ -17,7 +17,7 @@ const settleTime = 450;
17
17
  const boxTransition = (expanded, hold) => expanded || !hold ? morph : { ...morph, delay: closeHold };
18
18
  const contentTransition = (expanded) => expanded
19
19
  ? { duration: motionTokens.duration.standard, ease: [...motionTokens.ease.standard], delay: 0.12 }
20
- : { duration: 0.1, ease: [...motionTokens.ease.standard] };
20
+ : { duration: motionTokens.duration.instant, ease: [...motionTokens.ease.standard] };
21
21
  const still = { duration: 0 };
22
22
  /** Changed words in the summary rise in; unchanged words hold still. */
23
23
  const wordMotion = {
@@ -10,7 +10,7 @@
10
10
  .trigger:active { background: var(--surface-muted); }
11
11
  .copy { min-width: 0; }
12
12
  .copy strong { display: block; font-size: var(--text-sm); font-weight: 500; }
13
- .description { display: block; margin-top: 4px; color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
13
+ .description { display: block; margin-top: var(--space-tight); color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
14
14
  .roll { position: relative; display: block; }
15
15
  .word { display: inline-block; white-space: pre; }
16
16
  .srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@@ -1,5 +1,5 @@
1
1
  /* A flat pill on the surface. Geometry comes from the component as --ebg-* variables, so the measured widths and the CSS agree. */
2
- .group { --ebg-h: 36px; --ebg-icon: 16px; --ebg-start: 10px; --ebg-gap: 7px; --ebg-end: 14px; --ebg-pad: 3px; position: relative; isolation: isolate; display: inline-flex; max-width: 100%; flex: none; align-items: center; gap: 2px; padding: var(--ebg-pad); border: 1px solid var(--border); border-radius: var(--radius-full); corner-shape: round; background: var(--surface); }
2
+ .group { --ebg-h: 36px; --ebg-icon: 16px; --ebg-start: 10px; --ebg-gap: 7px; --ebg-end: 14px; --ebg-pad: 3px; position: relative; isolation: isolate; display: inline-flex; max-width: 100%; flex: none; align-items: center; gap: var(--space-hair); padding: var(--ebg-pad); border: 1px solid var(--border); border-radius: var(--radius-full); corner-shape: round; background: var(--surface); }
3
3
 
4
4
  /* The box never scales: its width is the animation, so a press answers with the icon and with color. The label overflows to the
5
5
  right of the icon and the clipped width reveals it. min-width keeps the spring's settle from pinching a collapsed button. */
@@ -17,8 +17,8 @@
17
17
  :global(:root[data-theme="dark"]) .item[data-tone="danger"][data-expanded] { background: color-mix(in oklab, var(--danger) 14%, var(--surface)); }
18
18
  :global(:root[data-theme="dark"]) .item[data-state="done"]:not([data-tone="danger"]) { background: color-mix(in oklab, var(--success) 14%, var(--surface)); }
19
19
 
20
- .icon { position: relative; display: grid; width: var(--ebg-icon); height: var(--ebg-icon); flex: none; place-items: center; transition: transform 320ms var(--ease-spring); }
21
- .item:active:not([aria-disabled="true"]) .icon { transform: scale(.86); transition-duration: 90ms; transition-timing-function: var(--ease-standard); }
20
+ .icon { position: relative; display: grid; width: var(--ebg-icon); height: var(--ebg-icon); flex: none; place-items: center; transition: transform var(--duration-standard) var(--ease-spring); }
21
+ .item:active:not([aria-disabled="true"]) .icon { transform: scale(.86); transition-duration: var(--duration-fast); transition-timing-function: var(--ease-standard); }
22
22
  .glyph { display: grid; grid-area: 1 / 1; place-items: center; width: 100%; height: 100%; }
23
23
  .glyph svg { width: 100%; height: 100%; stroke-width: 1.75; }
24
24
 
@@ -112,10 +112,10 @@ function Listbox({ id, label, groups, query, activeIndex, optionId, reduced, key
112
112
  }, [activeId, layoutKey, reduced, travel, fade, keyboard]);
113
113
  return _jsx("div", { ref: listRef, id: id, role: "listbox", "aria-label": label, className: styles.listbox, children: _jsx(AnimatePresence, { mode: "popLayout", initial: false, children: groups.map(group => {
114
114
  const headingId = `${id}-${group.name || "results"}`.replace(/\s+/g, "-");
115
- return _jsxs(motion.div, { role: "group", "aria-labelledby": group.name ? headingId : undefined, className: styles.group, layout: reduced ? false : "position", layoutDependency: layoutKey, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0, transition: { duration: .08 } }, transition: { opacity: { duration: motionTokens.duration.fast, ease: enter }, layout: motionTokens.spring.smooth }, children: [group.name && _jsx("div", { id: headingId, className: styles.groupLabel, role: "presentation", children: group.name }), _jsx(AnimatePresence, { mode: "popLayout", initial: false, children: group.items.map(item => {
115
+ return _jsxs(motion.div, { role: "group", "aria-labelledby": group.name ? headingId : undefined, className: styles.group, layout: reduced ? false : "position", layoutDependency: layoutKey, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0, transition: { duration: motionTokens.duration.instant } }, transition: { opacity: { duration: motionTokens.duration.fast, ease: enter }, layout: motionTokens.spring.smooth }, children: [group.name && _jsx("div", { id: headingId, className: styles.groupLabel, role: "presentation", children: group.name }), _jsx(AnimatePresence, { mode: "popLayout", initial: false, children: group.items.map(item => {
116
116
  const position = flat.indexOf(item);
117
117
  const active = position === activeIndex;
118
- return _jsxs(motion.div, { id: optionId(item), role: "option", "aria-selected": active, "data-active": active || undefined, className: styles.option, layout: reduced ? false : "position", layoutDependency: layoutKey, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0, transition: { duration: .08 } }, transition: { opacity: { duration: motionTokens.duration.fast, ease: enter }, layout: motionTokens.spring.smooth }, onPointerMove: () => { if (!active) {
118
+ return _jsxs(motion.div, { id: optionId(item), role: "option", "aria-selected": active, "data-active": active || undefined, className: styles.option, layout: reduced ? false : "position", layoutDependency: layoutKey, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0, transition: { duration: motionTokens.duration.instant } }, transition: { opacity: { duration: motionTokens.duration.fast, ease: enter }, layout: motionTokens.spring.smooth }, onPointerMove: () => { if (!active) {
119
119
  keyboard.current = false;
120
120
  onHover(position);
121
121
  } }, onMouseDown: event => event.preventDefault(), onClick: () => onChoose(item), children: [active && _jsx(motion.span, { className: styles.highlight, style: { y: travel, opacity: fade }, "aria-hidden": "true" }), item.icon && _jsx("span", { className: styles.optionIcon, "aria-hidden": "true", children: item.icon }), _jsxs("span", { className: styles.optionText, children: [_jsx("span", { className: styles.optionTitle, children: _jsx(Match, { text: item.title, query: query }) }), item.meta && _jsx("span", { className: styles.optionMeta, children: item.meta })] })] }, item.id);
@@ -235,7 +235,7 @@ export function ExpandingSearch({ label, items, suggestions = [], suggestionsLab
235
235
  setFocused(false);
236
236
  if (open.current && !inputRef.current?.value.trim())
237
237
  collapse(false);
238
- }, onKeyDown: handleKeyDown }), _jsx(AnimatePresence, { initial: false, children: expanded && query && _jsx(motion.button, { type: "button", tabIndex: -1, className: styles.clear, "aria-label": "Clear search", onMouseDown: event => event.preventDefault(), onClick: () => { setQuery(""); setActive(-1); inputRef.current?.focus({ preventScroll: true }); }, initial: clearHidden, animate: { opacity: 1, scale: 1, filter: "blur(0px)" }, exit: { ...clearHidden, transition: { duration: reduced ? .1 : motionTokens.duration.instant, ease: standard } }, transition: reduced ? { duration: .15 } : { ...motionTokens.spring.snappy, opacity: { duration: motionTokens.duration.fast }, filter: { duration: motionTokens.duration.fast } }, children: _jsx(X, { width: 16, height: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }, "clear") })] }), _jsx(AnimatePresence, { children: panelOpen && _jsx(Panel, { width: width, reduced: reduced, children: _jsx(AnimatePresence, { mode: "popLayout", initial: false, children: _jsx(motion.div, { className: styles.view, initial: reduced ? { opacity: 0 } : { opacity: 0, filter: `blur(${motionTokens.blur.subtle}px)` }, animate: { opacity: 1, filter: "blur(0px)" }, exit: { opacity: 0, transition: { duration: .1, ease: standard } }, transition: { duration: reduced ? .15 : motionTokens.duration.fast, ease: enter }, children: mode === "empty"
238
+ }, onKeyDown: handleKeyDown }), _jsx(AnimatePresence, { initial: false, children: expanded && query && _jsx(motion.button, { type: "button", tabIndex: -1, className: styles.clear, "aria-label": "Clear search", onMouseDown: event => event.preventDefault(), onClick: () => { setQuery(""); setActive(-1); inputRef.current?.focus({ preventScroll: true }); }, initial: clearHidden, animate: { opacity: 1, scale: 1, filter: "blur(0px)" }, exit: { ...clearHidden, transition: { duration: reduced ? .1 : motionTokens.duration.instant, ease: standard } }, transition: reduced ? { duration: motionTokens.duration.fast } : { ...motionTokens.spring.snappy, opacity: { duration: motionTokens.duration.fast }, filter: { duration: motionTokens.duration.fast } }, children: _jsx(X, { width: 16, height: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }, "clear") })] }), _jsx(AnimatePresence, { children: panelOpen && _jsx(Panel, { width: width, reduced: reduced, children: _jsx(AnimatePresence, { mode: "popLayout", initial: false, children: _jsx(motion.div, { className: styles.view, initial: reduced ? { opacity: 0 } : { opacity: 0, filter: `blur(${motionTokens.blur.subtle}px)` }, animate: { opacity: 1, filter: "blur(0px)" }, exit: { opacity: 0, transition: { duration: motionTokens.duration.instant, ease: standard } }, transition: { duration: reduced ? .15 : motionTokens.duration.fast, ease: enter }, children: mode === "empty"
239
239
  ? _jsxs("div", { className: styles.empty, children: [_jsxs("p", { className: styles.emptyTitle, children: ["No results for \u201C", trimmed, "\u201D"] }), _jsx("p", { className: styles.emptyHint, children: emptyHint })] })
240
240
  : _jsx(Listbox, { id: listboxId, label: mode === "suggestions" ? suggestionsLabel : `Results for ${trimmed}`, groups: groups, query: mode === "results" ? trimmed : "", activeIndex: activeIndex, optionId: optionId, reduced: reduced, keyboard: keyboard, onHover: setActive, onChoose: choose }) }, mode) }) }, "panel") }), _jsx("span", { className: styles.srOnly, role: "status", "aria-live": "polite", children: announcement })] });
241
241
  }
@@ -16,24 +16,24 @@
16
16
  .trigger { position: absolute; z-index: 1; inset: 0; margin: 0; padding: 0; border: 0; border-radius: inherit; corner-shape: inherit; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
17
17
  .trigger:focus-visible { outline: none; }
18
18
  /* The glass sits at the leading edge, so it is centered in the circle and rides that edge to its place in the open field. */
19
- .icon { position: absolute; top: calc(50% - 9px); left: calc(var(--control-height-md) / 2 - 10px); pointer-events: none; }
20
- .input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 40px 0 38px; border: 0; background: transparent; color: var(--foreground); font: inherit; font-size: var(--text-sm); letter-spacing: var(--tracking-body); text-overflow: ellipsis; outline: none; }
19
+ .icon { position: absolute; top: calc(50% - var(--space-related)); left: calc(var(--control-height-md) / 2 - var(--space-group)); pointer-events: none; }
20
+ .input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 var(--space-page) 0 var(--space-block); border: 0; background: transparent; color: var(--foreground); font: inherit; font-size: var(--text-sm); letter-spacing: var(--tracking-body); text-overflow: ellipsis; outline: none; }
21
21
  .input:focus-visible { outline: none; }
22
22
  .input::placeholder { color: var(--text-muted); opacity: 1; }
23
23
  .input[inert] { pointer-events: none; }
24
- .clear { position: absolute; z-index: 1; top: calc(50% - 14px); right: 7px; display: grid; width: 28px; height: 28px; place-items: center; margin: 0; padding: 0; border: 0; border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-muted); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); -webkit-tap-highlight-color: transparent; }
24
+ .clear { position: absolute; z-index: 1; top: calc(50% - var(--space-inset)); right: var(--space-related); display: grid; width: 28px; height: 28px; place-items: center; margin: 0; padding: 0; border: 0; border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-muted); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); -webkit-tap-highlight-color: transparent; }
25
25
 
26
26
  /* A floating layer: its width is the field's, so it unfolds from the field on first open; its content keeps the final width and rides the leading edge. */
27
- .panel { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-container); corner-shape: var(--corner-shape); background: var(--surface-raised); box-shadow: var(--shadow-floating); pointer-events: auto; }
27
+ .panel { position: absolute; z-index: var(--layer-dropdown); top: calc(100% + var(--space-related)); right: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-container); corner-shape: var(--corner-shape); background: var(--surface-raised); box-shadow: var(--shadow-floating); pointer-events: auto; }
28
28
  .root[data-anchor="start"] .panel { right: auto; left: 0; }
29
- .body { position: relative; width: calc(var(--es-width, 360px) - 2px); max-height: min(22rem, 60vh); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 6px; scrollbar-width: thin; }
29
+ .body { position: relative; width: calc(var(--es-width, 360px) - 2px); max-height: min(22rem, 60vh); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-related); scrollbar-width: thin; }
30
30
  .view { position: relative; }
31
31
  /* A flex gap, not margins: a group popping out while it leaves never lets the next one's margin collapse through the list. */
32
- .listbox { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 4px; }
32
+ .listbox { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: var(--space-tight); }
33
33
  .group { position: relative; }
34
- .groupLabel { padding: 8px 12px 4px; color: var(--text-muted); font-size: var(--text-xs); font-weight: 500; line-height: var(--leading-body); }
34
+ .groupLabel { padding: var(--space-related) var(--space-group) var(--space-tight); color: var(--text-muted); font-size: var(--text-xs); font-weight: 500; line-height: var(--leading-body); }
35
35
  /* Nested corners step down from the panel by its inset. The highlight paints under every row's content, so text never hides while it travels. */
36
- .option { position: relative; display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 6px 12px; border-radius: calc(var(--radius-container) - 6px); corner-shape: var(--corner-shape); color: var(--foreground); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
36
+ .option { position: relative; display: flex; min-height: 48px; align-items: center; gap: var(--space-group); padding: var(--space-related) var(--space-group); border-radius: calc(var(--radius-container) - var(--space-related)); corner-shape: var(--corner-shape); color: var(--foreground); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
37
37
  .highlight { position: absolute; z-index: -1; inset: 0; border-radius: inherit; corner-shape: inherit; background: color-mix(in oklab, var(--foreground) 6%, transparent); pointer-events: none; }
38
38
  .optionIcon { display: grid; flex: none; width: 18px; place-items: center; color: var(--text-muted); transition: color var(--duration-fast) var(--ease-standard); }
39
39
  .option[data-active] .optionIcon { color: var(--foreground); }
@@ -42,7 +42,7 @@
42
42
  .optionTitle { color: var(--foreground); font-size: var(--text-sm); }
43
43
  .optionMeta { color: var(--text-muted); font-size: var(--text-xs); }
44
44
  .mark { background: none; color: var(--foreground); font-weight: 500; }
45
- .empty { display: grid; gap: 2px; padding: 12px 12px 14px; }
45
+ .empty { display: grid; gap: var(--space-hair); padding: var(--space-group) var(--space-group) var(--space-inset); }
46
46
  .emptyTitle { margin: 0; overflow-wrap: anywhere; color: var(--foreground); font-size: var(--text-sm); font-weight: 500; line-height: var(--leading-body); }
47
47
  .emptyHint { margin: 0; color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
48
48
  .srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@@ -12,7 +12,7 @@ const exitFast = { duration: motionTokens.duration.fast, ease: [...motionTokens.
12
12
  const instant = { duration: 0 };
13
13
  const fade = { duration: motionTokens.duration.instant };
14
14
  /** Exits are shorter than entries: the same critically damped spring, settled sooner. */
15
- const collapse = { ...motionTokens.spring.smooth, visualDuration: .3 };
15
+ const collapse = { ...motionTokens.spring.smooth, visualDuration: motionTokens.spring.moderate.visualDuration };
16
16
  const textIn = { opacity: 0, y: "0.3em", filter: `blur(${motionTokens.blur.soft}px)` };
17
17
  const textOut = { opacity: 0, y: "-0.3em", filter: `blur(${motionTokens.blur.subtle}px)`, transition: exitFast };
18
18
  const shown = { opacity: 1, y: "0em", filter: "blur(0px)" };
@@ -21,7 +21,7 @@ const clamp = (value) => Math.min(Math.max(value, 0), 100);
21
21
  const SHAKE = { x: [0, -7, 6, -4, 3, -1.5, 0] };
22
22
  const shakeTransition = { duration: .42, ease: "easeOut" };
23
23
  /** New rows drop out of the target into the list, with a touch of life as they land. */
24
- const land = { type: "spring", visualDuration: .42, bounce: .14 };
24
+ const land = { type: "spring", visualDuration: motionTokens.spring.slow.visualDuration, bounce: .14 };
25
25
  export function formatFileSize(bytes) {
26
26
  if (bytes < 1024)
27
27
  return `${bytes} B`;
@@ -76,7 +76,7 @@ function ErrorRow({ text }) {
76
76
  }
77
77
  /** The circle closes, then the tick draws through it. */
78
78
  function DrawnCheck({ reduce }) {
79
- return _jsxs("svg", { className: styles.stateIcon, width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.25, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx(motion.path, { d: "M12 2.5a9.5 9.5 0 1 1 0 19a9.5 9.5 0 1 1 0-19", initial: reduce ? false : { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: motionTokens.duration.considered * .7, ease: [...motionTokens.ease.enter] } }), _jsx(motion.path, { d: "m8.2 12.4 2.6 2.6 5-5.2", initial: reduce ? false : { pathLength: 0 }, animate: { pathLength: 1 }, transition: { ...enter, delay: .16 } })] });
79
+ return _jsxs("svg", { className: styles.stateIcon, width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.25, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx(motion.path, { d: "M12 2.5a9.5 9.5 0 1 1 0 19a9.5 9.5 0 1 1 0-19", initial: reduce ? false : { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: motionTokens.duration.expressive * .7, ease: [...motionTokens.ease.enter] } }), _jsx(motion.path, { d: "m8.2 12.4 2.6 2.6 5-5.2", initial: reduce ? false : { pathLength: 0 }, animate: { pathLength: 1 }, transition: { ...enter, delay: .16 } })] });
80
80
  }
81
81
  function Thumb({ item }) {
82
82
  const [broken, setBroken] = useState(false);
@@ -4,9 +4,9 @@
4
4
  /* A folded prompt is a slimmer surface, so its corners step down to the panel radius. */
5
5
  .dropzone.compact { border-radius: var(--radius-container); corner-shape: var(--corner-shape); }
6
6
  /* The edge is a drawn stroke, fitted to the perimeter in script, so a drag can close its dashes into one line. */
7
- .edge { position: absolute; top: .5px; left: .5px; width: calc(100% - 1px); height: calc(100% - 1px); overflow: visible; pointer-events: none; }
7
+ .edge { position: absolute; top: var(--space-hair); left: var(--space-hair); width: calc(100% - 1px); height: calc(100% - 1px); overflow: visible; pointer-events: none; }
8
8
  .edge rect { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3.5 3.5; stroke-dashoffset: 0; transition: stroke var(--duration-fast) var(--ease-standard), stroke-dasharray var(--duration-standard) var(--ease-standard), stroke-dashoffset var(--duration-standard) var(--ease-standard); }
9
- .trigger { display: flex; width: 100%; flex-direction: column; align-items: stretch; justify-content: center; border: 0; border-radius: inherit; corner-shape: inherit; padding: 34px var(--space-comfort); background: transparent; color: inherit; font: inherit; letter-spacing: var(--tracking-body); text-align: center; cursor: pointer; }
9
+ .trigger { display: flex; width: 100%; flex-direction: column; align-items: stretch; justify-content: center; border: 0; border-radius: inherit; corner-shape: inherit; padding: var(--space-block) var(--space-comfort); background: transparent; color: inherit; font: inherit; letter-spacing: var(--tracking-body); text-align: center; cursor: pointer; }
10
10
  .trigger > * { pointer-events: none; }
11
11
  @media (hover: hover) and (pointer: fine) {
12
12
  .dropzone:has(.trigger:hover) { background: var(--surface-muted); }
@@ -19,24 +19,24 @@
19
19
  @keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012); } }
20
20
  /* Light that follows the pointer: a wash inside, and a brighter stretch of the edge nearest the file. */
21
21
  .wash, .glow { position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; opacity: 0; pointer-events: none; transition: opacity var(--duration-standard) var(--ease-standard); }
22
- .glow { padding: 1.5px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
22
+ .glow { padding: var(--space-hair); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
23
23
  .dragging .wash, .dragging .glow { opacity: 1; }
24
24
  .dragging .edge rect { stroke: color-mix(in oklab, var(--accent) 40%, var(--border)); stroke-dasharray: 7 0; stroke-dashoffset: 1.75; }
25
25
  /* No gaps between the prompt's parts: each slot carries its own space, so a folding slot takes its space with it. */
26
26
  .iconSlot, .noteSlot { display: flex; flex-direction: column; overflow: hidden; }
27
27
  /* Three sheets of paper, the target's one illustration. The slot's top margin is room for them to lift without clipping. */
28
- .sheets { position: relative; display: block; width: 36px; height: 44px; align-self: center; margin: 10px 0 14px; }
28
+ .sheets { position: relative; display: block; width: 36px; height: 44px; align-self: center; margin: var(--space-group) 0 var(--space-inset); }
29
29
  .sheet {
30
30
  --r: 0deg; --x: 0px; --y: 0px;
31
- position: absolute; inset: 0; display: grid; place-items: end center; padding: 0 0 5px;
31
+ position: absolute; inset: 0; display: grid; place-items: end center; padding: 0 0 var(--space-tight);
32
32
  border: 1px solid var(--border); border-radius: var(--radius-detail); corner-shape: var(--corner-shape); background: var(--surface-raised); color: var(--text-muted);
33
- box-shadow: 0 1px 2px oklch(0% 0 0 / .05), 0 3px 8px oklch(0% 0 0 / .04);
33
+ box-shadow: var(--shadow-thumb);
34
34
  transform: translate(var(--x), var(--y)) rotate(var(--r));
35
35
  transform-origin: 50% 100%;
36
36
  transition: transform var(--duration-spring) var(--ease-spring), color var(--duration-standard) var(--ease-standard), border-color var(--duration-standard) var(--ease-standard);
37
37
  }
38
- .sheet::before, .sheet::after { position: absolute; top: 8px; left: 7px; width: 16px; height: 2px; border-radius: var(--radius-full); corner-shape: round; background: currentColor; content: ""; opacity: .3; }
39
- .sheet::after { top: 13px; width: 11px; }
38
+ .sheet::before, .sheet::after { position: absolute; top: var(--space-related); left: var(--space-related); width: 16px; height: 2px; border-radius: var(--radius-full); corner-shape: round; background: currentColor; content: ""; opacity: .3; }
39
+ .sheet::after { top: var(--space-group); width: 11px; }
40
40
  .sheet > svg { transition: transform var(--duration-spring) var(--ease-spring); }
41
41
  .dragging .sheet > svg { transform: translateY(-3px); }
42
42
  .sheet[data-sheet="back"] { --r: -10deg; --x: -9px; --y: 2px; }
@@ -53,31 +53,31 @@
53
53
  /* Full width and centered text: the label box never moves, so an outgoing label leaves from exactly where it was. */
54
54
  .label { position: relative; display: block; font-size: var(--text-sm); font-weight: 500; line-height: var(--leading-body); }
55
55
  .labelText { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; white-space: nowrap; }
56
- .hint { margin-top: 6px; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-body); }
57
- .note { padding-top: 6px; color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
56
+ .hint { margin-top: var(--space-related); color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-body); }
57
+ .note { padding-top: var(--space-related); color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
58
58
  .input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
59
59
  .messageSlot { overflow: hidden; }
60
- .error { display: flex; align-items: flex-start; gap: 6px; padding-top: var(--space-group); color: var(--danger); font-size: var(--text-sm); line-height: var(--leading-body); }
60
+ .error { display: flex; align-items: flex-start; gap: var(--space-related); padding-top: var(--space-group); color: var(--danger); font-size: var(--text-sm); line-height: var(--leading-body); }
61
61
  /* The icon sits on the first line's optical center, so a wrapped message keeps it at the top. */
62
- .errorIcon { flex: 0 0 auto; margin-top: 3px; }
62
+ .errorIcon { flex: 0 0 auto; margin-top: var(--space-tight); }
63
63
  .errorCopy { position: relative; min-width: 0; flex: 1; }
64
64
 
65
65
  .list { display: grid; min-width: 0; margin: 0; padding: 0; list-style: none; container: dropzone-list / inline-size; }
66
- .inside .list { padding-inline: 12px; }
66
+ .inside .list { padding-inline: var(--space-group); }
67
67
  /* Rows animate height; the gap lives inside the clipped row as margin, so a closing row reaches a true zero. */
68
68
  .item { min-width: 0; overflow: hidden; }
69
- .row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 58px; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-control); corner-shape: var(--corner-shape); padding: 8px 8px 8px 9px; background: var(--surface); transition: border-color var(--duration-standard) var(--ease-standard); }
69
+ .row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-group); min-height: 58px; margin-top: var(--space-related); border: 1px solid var(--border); border-radius: var(--radius-control); corner-shape: var(--corner-shape); padding: var(--space-related) var(--space-related) var(--space-related) var(--space-related); background: var(--surface); transition: border-color var(--duration-standard) var(--ease-standard); }
70
70
  .row.isFailed { border-color: color-mix(in oklab, var(--danger) 26%, var(--border)); }
71
71
  .fileIcon { display: grid; width: 40px; height: 40px; place-items: center; color: var(--text-secondary); }
72
- .thumb { display: block; width: 40px; height: 40px; overflow: hidden; border-radius: var(--radius-detail); corner-shape: var(--corner-shape); background: var(--surface-muted); box-shadow: inset 0 0 0 1px oklch(0% 0 0 / .06); }
72
+ .thumb { display: block; width: 40px; height: 40px; overflow: hidden; border-radius: var(--radius-detail); corner-shape: var(--corner-shape); background: var(--surface-muted); box-shadow: var(--edge-inset); }
73
73
  .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
74
74
  .copy { display: grid; min-width: 0; }
75
75
  .name { overflow: hidden; font-size: var(--text-sm); font-weight: 500; line-height: var(--leading-body); text-overflow: ellipsis; white-space: nowrap; }
76
76
  .meta { display: flex; min-width: 0; align-items: center; margin-top: 1px; color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
77
- .dot { padding-inline: 6px; }
77
+ .dot { padding-inline: var(--space-related); }
78
78
  /* The outgoing status is measured against this box when it pops out to leave. */
79
79
  .phase { position: relative; display: flex; min-width: 0; flex: 1; }
80
- .state { display: inline-flex; min-width: 0; align-items: center; gap: 5px; }
80
+ .state { display: inline-flex; min-width: 0; align-items: center; gap: var(--space-tight); }
81
81
  .uploaded { color: var(--text-secondary); }
82
82
  .uploaded .stateIcon { color: var(--success); }
83
83
  .failed { color: var(--danger); }
@@ -85,18 +85,18 @@
85
85
  .reason { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
86
86
  .percent { font-variant-numeric: tabular-nums; }
87
87
  .barFrame { display: block; overflow: hidden; }
88
- .bar { display: block; height: 4px; margin: 7px 0 2px; overflow: hidden; border-radius: var(--radius-full); corner-shape: round; background: var(--border); }
88
+ .bar { display: block; height: 4px; margin: var(--space-related) 0 var(--space-hair); overflow: hidden; border-radius: var(--radius-full); corner-shape: round; background: var(--border); }
89
89
  /* The fill slides in from the left instead of scaling, so its rounded end keeps its shape at every value. */
90
90
  .barFill { display: block; width: 100%; height: 100%; border-radius: inherit; corner-shape: inherit; background: var(--accent); }
91
91
  .actions { display: flex; align-items: center; }
92
92
  .retrySlot { display: flex; overflow: hidden; }
93
- .retryInner { display: flex; padding: 3px 6px 3px 3px; }
93
+ .retryInner { display: flex; padding: var(--space-tight) var(--space-related) var(--space-tight) var(--space-tight); }
94
94
  .retry, .remove { display: grid; place-items: center; border: 0; color: var(--text-secondary); font: inherit; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), transform var(--duration-spring) var(--ease-spring); }
95
- .retry { display: flex; height: 30px; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: var(--radius-full); corner-shape: round; padding: 0 12px 0 10px; background: var(--surface); color: var(--foreground); font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-body); white-space: nowrap; }
95
+ .retry { display: flex; height: 30px; align-items: center; gap: var(--space-tight); border: 1px solid var(--border); border-radius: var(--radius-full); corner-shape: round; padding: 0 var(--space-group) 0 var(--space-group); background: var(--surface); color: var(--foreground); font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-body); white-space: nowrap; }
96
96
  /* On narrow lists Retry keeps only its icon, so the failure reason keeps the room to be read in full. */
97
97
  @container dropzone-list (max-width: 440px) { .retry { width: 30px; justify-content: center; padding: 0; } .retryLabel { display: none; } }
98
98
  /* On the narrowest lists the type icon steps aside for the name and status. */
99
- @container dropzone-list (max-width: 300px) { .row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 14px; } .fileIcon, .thumb { display: none; } }
99
+ @container dropzone-list (max-width: 300px) { .row { grid-template-columns: minmax(0, 1fr) auto; padding-left: var(--space-inset); } .fileIcon, .thumb { display: none; } }
100
100
  .remove { width: 32px; height: 32px; border-radius: var(--radius-full); corner-shape: round; background: transparent; }
101
101
  @media (hover: hover) and (pointer: fine) {
102
102
  .retry:hover { border-color: var(--border-strong); background: var(--surface-muted); }
@@ -1,38 +1,38 @@
1
1
  .root { display: grid; width: 100%; min-width: 0; color: var(--foreground); }
2
2
  .input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
3
3
  /* A full-width drop target: press feedback is color only, never a scale. */
4
- .dropzone { display: flex; min-height: 92px; align-items: center; gap: 12px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-container); corner-shape: var(--corner-shape); background: var(--surface); cursor: pointer; transition: border-color var(--duration-standard) var(--ease-standard), background-color var(--duration-standard) var(--ease-standard); }
4
+ .dropzone { display: flex; min-height: 92px; align-items: center; gap: var(--space-group); padding: var(--space-inset); border: 1px dashed var(--border-strong); border-radius: var(--radius-container); corner-shape: var(--corner-shape); background: var(--surface); cursor: pointer; transition: border-color var(--duration-standard) var(--ease-standard), background-color var(--duration-standard) var(--ease-standard); }
5
5
  .dropzone.dragging, .dropzone:not(.disabled):active { border-color: var(--accent); background: var(--accent-subtle); }
6
6
  .dropzone.disabled { cursor: not-allowed; opacity: .52; }
7
7
  .uploadIcon, .fileIcon { display: grid; flex: 0 0 auto; place-items: center; color: var(--accent-strong); }
8
8
  /* The cloud lifts toward the file while it hovers over the drop target. */
9
9
  .uploadIcon { width: 24px; height: 24px; transition: transform var(--duration-spring) var(--ease-spring); }
10
10
  .dragging .uploadIcon { transform: translateY(-3px); }
11
- .copy { display: grid; min-width: 0; gap: 3px; flex: 1; }
11
+ .copy { display: grid; min-width: 0; gap: var(--space-tight); flex: 1; }
12
12
  .copy strong { font-size: var(--text-sm); font-weight: 500; line-height: var(--leading-body); }
13
13
  .label { position: relative; display: block; min-width: 0; }
14
14
  .labelText { display: block; }
15
15
  .copy > span { color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); overflow-wrap: anywhere; }
16
16
  .browse { flex: 0 0 auto; color: var(--accent-strong); font-size: var(--text-xs); font-weight: 500; }
17
17
  .statusFrame { overflow: hidden; }
18
- .status { position: relative; min-height: 16px; margin: 0; padding-top: 8px; color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
18
+ .status { position: relative; min-height: 16px; margin: 0; padding-top: var(--space-related); color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
19
19
  .statusText { display: block; }
20
20
  .fileList { display: grid; margin: 0; padding: 0; list-style: none; }
21
21
  /* The gap lives inside the clipped row, so a collapsing row reaches zero height instead of stopping at its padding. */
22
22
  .fileRow { overflow: hidden; }
23
- .fileItem { display: flex; margin-top: 6px; min-width: 0; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-control); corner-shape: var(--corner-shape); background: var(--surface-muted); }
23
+ .fileItem { display: flex; margin-top: var(--space-related); min-width: 0; align-items: center; gap: var(--space-group); padding: var(--space-group) var(--space-group) var(--space-group) var(--space-group); border: 1px solid var(--border-subtle); border-radius: var(--radius-control); corner-shape: var(--corner-shape); background: var(--surface-muted); }
24
24
  .fileIcon { width: 24px; height: 24px; color: var(--text-secondary); }
25
- .fileCopy { display: grid; min-width: 0; flex: 1; gap: 2px; }
25
+ .fileCopy { display: grid; min-width: 0; flex: 1; gap: var(--space-hair); }
26
26
  .fileCopy strong { overflow: hidden; font-size: var(--text-sm); font-weight: 500; line-height: var(--leading-body); text-overflow: ellipsis; white-space: nowrap; }
27
27
  .fileCopy > span { color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
28
28
  .meta { display: flex; min-width: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
29
- .dot { padding-inline: 5px; }
29
+ .dot { padding-inline: var(--space-tight); }
30
30
  .phase { position: relative; display: inline-block; }
31
31
  .phaseText { display: block; }
32
32
  .percent { display: inline-block; min-width: 4ch; }
33
33
  .fileCopy .error { color: var(--danger); }
34
34
  .barFrame { display: block; }
35
- .bar { display: block; height: 3px; margin: 5px 0 1px; overflow: hidden; border-radius: var(--radius-full); corner-shape: round; background: var(--border); }
35
+ .bar { display: block; height: 3px; margin: var(--space-tight) 0 1px; overflow: hidden; border-radius: var(--radius-full); corner-shape: round; background: var(--border); }
36
36
  .barFill { display: block; width: 100%; height: 100%; border-radius: inherit; corner-shape: inherit; background: var(--accent); }
37
37
  .statusSlot { position: relative; display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; }
38
38
  .retrySlot { display: grid; place-items: center; }
@@ -4,6 +4,7 @@ import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from
4
4
  import { Check, ChevronLeft, ChevronRight, Plus, X } from "lucide-react";
5
5
  import { AnimatePresence, animate, motion, useIsPresent, useMotionValue, useReducedMotion, useTransform } from "motion/react";
6
6
  import { motionTokens } from "../../lib/motion-tokens.js";
7
+ import { useNearestItem } from "../../lib/fluid-hover.js";
7
8
  import styles from "./filter-toolbar.module.css";
8
9
  const enter = { duration: motionTokens.duration.standard, ease: [...motionTokens.ease.enter] };
9
10
  const leave = { duration: motionTokens.duration.instant, ease: [...motionTokens.ease.standard] };
@@ -128,6 +129,10 @@ function MenuList({ rows, labelledBy, onChoose, onBack, onLeave, radio }) {
128
129
  const typed = useRef({ text: "", at: 0 });
129
130
  const [current, setCurrent] = useState(() => Math.max(0, rows.findIndex(row => row.checked)));
130
131
  const [highlight, setHighlight] = useState(null);
132
+ // Fluid hover: the mouse focuses the nearest row, gaps and padding included, so the highlight (which follows focus) lights
133
+ // it and the keyboard carries on from there. A click in a gap picks that row.
134
+ const nearest = useNearestItem({ items: "[data-row]", onPick: item => { pointer.current = true; if (document.activeElement !== item)
135
+ item.focus({ preventScroll: true }); } });
131
136
  const items = () => Array.from(list.current?.querySelectorAll("[data-row]") ?? []);
132
137
  const move = (item) => {
133
138
  const node = list.current;
@@ -183,9 +188,8 @@ function MenuList({ rows, labelledBy, onChoose, onBack, onLeave, radio }) {
183
188
  if (!list.current?.contains(event.relatedTarget))
184
189
  setHighlight(previous => previous && { ...previous, glide: false, ring: false, shown: false });
185
190
  }
186
- return _jsxs("div", { ref: list, className: styles.list, role: "menu", "aria-labelledby": labelledBy, "data-current": present ? "" : undefined, onKeyDown: onKeyDown, onFocus: onFocus, onBlur: onBlur, onPointerLeave: () => { if (pointer.current && list.current?.contains(document.activeElement))
187
- onLeave(); }, children: [_jsx(motion.span, { className: styles.highlight, "data-ring": highlight?.ring || undefined, "aria-hidden": "true", initial: false, animate: highlight ? { y: highlight.top, height: highlight.height, opacity: highlight.shown ? 1 : 0 } : { opacity: 0 }, transition: { default: highlight?.glide ? motionTokens.spring.snappy : still, opacity: { duration: reduced ? 0 : .08 } } }), rows.map((row, index) => _jsxs("button", { type: "button", className: styles.item, role: radio ? "menuitemradio" : "menuitem", "aria-checked": radio ? !!row.checked : undefined, tabIndex: index === current ? 0 : -1, "data-row": row.key, "data-text": row.label, onPointerMove: event => { pointer.current = true; if (document.activeElement !== event.currentTarget)
188
- event.currentTarget.focus({ preventScroll: true }); }, onClick: (event) => onChoose(row, event.detail === 0), children: [row.icon ? _jsx("span", { className: styles.itemIcon, "aria-hidden": "true", children: row.icon }) : null, _jsx("span", { className: styles.itemLabel, children: row.label }), row.meta ? _jsx("span", { className: styles.itemMeta, children: row.meta }) : null] }, row.key))] });
191
+ return _jsxs("div", { ref: list, className: styles.list, role: "menu", "aria-labelledby": labelledBy, "data-current": present ? "" : undefined, onKeyDown: onKeyDown, onFocus: onFocus, onBlur: onBlur, ...nearest, onPointerLeave: () => { if (pointer.current && list.current?.contains(document.activeElement))
192
+ onLeave(); }, children: [_jsx(motion.span, { className: styles.highlight, "data-ring": highlight?.ring || undefined, "aria-hidden": "true", initial: false, animate: highlight ? { y: highlight.top, height: highlight.height, opacity: highlight.shown ? 1 : 0 } : { opacity: 0 }, transition: { default: highlight?.glide ? motionTokens.spring.snappy : still, opacity: { duration: reduced ? 0 : .08 } } }), rows.map((row, index) => _jsxs("button", { type: "button", className: styles.item, role: radio ? "menuitemradio" : "menuitem", "aria-checked": radio ? !!row.checked : undefined, tabIndex: index === current ? 0 : -1, "data-row": row.key, "data-text": row.label, onClick: (event) => onChoose(row, event.detail === 0), children: [row.icon ? _jsx("span", { className: styles.itemIcon, "aria-hidden": "true", children: row.icon }) : null, _jsx("span", { className: styles.itemLabel, children: row.label }), row.meta ? _jsx("span", { className: styles.itemMeta, children: row.meta }) : null] }, row.key))] });
189
193
  }
190
194
  /** The room the panel may use: the viewport, narrowed on each axis by any ancestor that clips that axis, so a panel
191
195
  * inside a scrolling or clipped container flips and shifts within what is actually visible. */
@@ -24,7 +24,7 @@
24
24
  /* Add filter: the trigger is transparent and the surface behind it is the button's rounded rectangle.
25
25
  Opening springs that same surface to the panel size, so the button itself becomes the menu. */
26
26
  .menu { position: relative; display: inline-flex; flex: none; isolation: isolate; }
27
- .menu:not([data-state="closed"]) { z-index: 30; }
27
+ .menu:not([data-state="closed"]) { z-index: var(--layer-dropdown); }
28
28
  .trigger { position: relative; z-index: 1; display: inline-flex; min-height: var(--control-height-sm); align-items: center; padding: 0 var(--space-group); border: 1px solid transparent; border-radius: var(--radius-control); corner-shape: var(--corner-shape); background: transparent; color: var(--foreground); font: inherit; font-size: var(--text-sm); font-weight: 500; line-height: var(--leading-body); letter-spacing: var(--tracking-body); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
29
29
  .menu[data-state="open"] .trigger { pointer-events: none; }
30
30
  .face { display: inline-flex; align-items: center; gap: var(--space-related); }
@@ -38,24 +38,24 @@
38
38
  @media (hover: hover) and (pointer: fine) {
39
39
  .menu[data-state="closed"] .trigger:hover + .surface { background: var(--surface-muted); box-shadow: var(--shadow-resting); }
40
40
  }
41
- .panel { position: absolute; top: 0; left: 0; width: min(var(--filter-menu-width, 16rem), calc(100vw - var(--space-block))); padding: 6px 6px 6px; outline: none; }
41
+ .panel { position: absolute; top: 0; left: 0; width: min(var(--filter-menu-width, 16rem), calc(100vw - var(--space-block))); padding: var(--space-related) var(--space-related) var(--space-related); outline: none; }
42
42
  .menu[data-y="up"] .panel { top: auto; bottom: 0; }
43
43
  .menu[data-state="closed"] .panel { visibility: hidden; }
44
- .head { display: flex; height: 32px; align-items: center; padding: 0 var(--space-related) 0 10px; }
45
- .menu[data-y="up"] .head { margin-top: 4px; }
46
- .back { display: grid; width: 28px; height: 28px; flex: none; place-items: center; margin-left: -6px; padding: 0; border: 0; border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-secondary); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); }
44
+ .head { display: flex; height: 32px; align-items: center; padding: 0 var(--space-related) 0 var(--space-group); }
45
+ .menu[data-y="up"] .head { margin-top: var(--space-tight); }
46
+ .back { display: grid; width: 28px; height: 28px; flex: none; place-items: center; margin-left: calc(var(--space-related) * -1); padding: 0; border: 0; border-radius: var(--radius-full); corner-shape: round; background: transparent; color: var(--text-secondary); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); }
47
47
  .back:active { background: var(--surface-muted); color: var(--foreground); }
48
48
  .title { position: relative; display: flex; min-width: 0; color: var(--foreground); font-size: var(--text-sm); font-weight: 500; letter-spacing: var(--tracking-body); white-space: nowrap; }
49
49
  .titleText { display: block; }
50
- .stage { position: relative; margin-top: 2px; }
50
+ .stage { position: relative; margin-top: var(--space-hair); }
51
51
  .step { width: 100%; }
52
52
  .list { position: relative; display: grid; max-height: min(20rem, 55vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
53
- .highlight { position: absolute; top: 0; right: 0; left: 0; border-radius: calc(var(--radius-container) - 6px); corner-shape: var(--corner-shape); background: color-mix(in oklab, var(--foreground) 6%, transparent); opacity: 0; pointer-events: none; }
53
+ .highlight { position: absolute; top: 0; right: 0; left: 0; border-radius: calc(var(--radius-container) - var(--space-related)); corner-shape: var(--corner-shape); background: color-mix(in oklab, var(--foreground) 6%, transparent); opacity: 0; pointer-events: none; }
54
54
  .item:focus-visible { outline: none; }
55
- .item { position: relative; display: flex; min-width: 0; min-height: var(--control-height-sm); align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: calc(var(--radius-container) - 6px); corner-shape: var(--corner-shape); background: transparent; color: var(--foreground); font: inherit; font-size: var(--text-sm); letter-spacing: var(--tracking-body); text-align: left; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
55
+ .item { position: relative; display: flex; min-width: 0; min-height: var(--control-height-sm); align-items: center; gap: var(--space-group); padding: 0 var(--space-group); border: 0; border-radius: calc(var(--radius-container) - var(--space-related)); corner-shape: var(--corner-shape); background: transparent; color: var(--foreground); font: inherit; font-size: var(--text-sm); letter-spacing: var(--tracking-body); text-align: left; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
56
56
  .itemIcon { display: inline-flex; min-width: 16px; flex: none; align-items: center; justify-content: center; color: var(--text-secondary); }
57
57
  .itemLabel { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
58
- .itemMeta { display: inline-flex; min-width: 0; flex: none; align-items: center; gap: 6px; max-width: 50%; color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
58
+ .itemMeta { display: inline-flex; min-width: 0; flex: none; align-items: center; gap: var(--space-related); max-width: 50%; color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
59
59
  .metaValue { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
60
60
  .hint { min-width: 2ch; text-align: right; }
61
61
  .check { display: inline-flex; width: 15px; color: var(--foreground); opacity: 0; }
@@ -33,7 +33,7 @@
33
33
  /* Buttons are not positioned, so the highlight measures them against the tray and stacks above their background. */
34
34
  .item { display: inline-flex; min-width: var(--fbg-h); height: var(--fbg-h); flex: none; align-items: center; justify-content: center; margin: 0; padding: 0 var(--fbg-pad-x); border: 0; border-radius: var(--fbg-radius); background: transparent; color: inherit; font: inherit; font-size: var(--text-sm); font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard); }
35
35
  .sm .item { font-size: var(--text-xs); }
36
- .item[data-icon]:not([data-icon-only]) { padding-left: calc(var(--fbg-pad-x) - 2px); }
36
+ .item[data-icon]:not([data-icon-only]) { padding-left: calc(var(--fbg-pad-x) - var(--space-hair)); }
37
37
  .item[data-icon-only] { width: var(--fbg-h); padding: 0; }
38
38
  .item[data-active], .item[aria-pressed="true"] { color: var(--foreground); }
39
39
  .item[aria-pressed="true"] { background: var(--fbg-on); }
@@ -45,21 +45,21 @@
45
45
  .slot { position: relative; z-index: 2; display: inline-grid; align-items: center; justify-items: center; }
46
46
  .slot > * { grid-area: 1 / 1; }
47
47
  .vertical .slot { justify-items: start; }
48
- .ghost { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; visibility: hidden; pointer-events: none; }
48
+ .ghost { display: inline-flex; align-items: center; gap: var(--space-related); white-space: nowrap; visibility: hidden; pointer-events: none; }
49
49
  .iconSpace { display: block; width: 16px; height: 16px; flex: none; }
50
- .phase { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
50
+ .phase { display: inline-flex; align-items: center; gap: var(--space-related); white-space: nowrap; }
51
51
  .icon { display: inline-flex; flex: none; }
52
52
  .icon svg { width: 16px; height: 16px; stroke-width: 1.75; }
53
53
  .text { display: block; }
54
54
 
55
- .separator { flex: none; align-self: center; width: 1px; height: calc(var(--fbg-h) * .5); margin-inline: 2px; border-radius: var(--radius-full); corner-shape: round; background: var(--fbg-rule); }
56
- .vertical .separator { width: calc(var(--fbg-h) * .5); height: 1px; margin: 2px 0; }
55
+ .separator { flex: none; align-self: center; width: 1px; height: calc(var(--fbg-h) * .5); margin-inline: var(--space-hair); border-radius: var(--radius-full); corner-shape: round; background: var(--fbg-rule); }
56
+ .vertical .separator { width: calc(var(--fbg-h) * .5); height: 1px; margin: var(--space-hair) 0; }
57
57
 
58
58
  .tip { display: inline-flex; align-items: baseline; gap: var(--space-group); white-space: nowrap; }
59
59
  .kbd { font: inherit; color: color-mix(in oklab, var(--background) 58%, var(--foreground)); font-variant-numeric: tabular-nums; }
60
60
 
61
61
  /* Side tooltips for a column match the library tooltip, rising a few pixels away from the rail instead of up. */
62
- .sideTip { --tip-x: -3px; z-index: 90; max-width: 15rem; padding: var(--space-group) var(--space-inset); border: 1px solid color-mix(in oklab, var(--background) 14%, var(--foreground)); border-radius: var(--radius-control); corner-shape: var(--corner-shape); background: var(--foreground); color: var(--background); box-shadow: var(--shadow-raised); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; letter-spacing: var(--tracking-body); line-height: var(--leading-body); transform-origin: var(--radix-tooltip-content-transform-origin); transition: opacity var(--duration-fast) var(--ease-enter), transform var(--duration-fast) var(--ease-enter); }
62
+ .sideTip { --tip-x: -3px; z-index: var(--layer-tooltip); max-width: 15rem; padding: var(--space-group) var(--space-inset); border: 1px solid color-mix(in oklab, var(--background) 14%, var(--foreground)); border-radius: var(--radius-control); corner-shape: var(--corner-shape); background: var(--foreground); color: var(--background); box-shadow: var(--shadow-raised); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; letter-spacing: var(--tracking-body); line-height: var(--leading-body); transform-origin: var(--radix-tooltip-content-transform-origin); transition: opacity var(--duration-fast) var(--ease-enter), transform var(--duration-fast) var(--ease-enter); }
63
63
  .sideTip[data-side="left"] { --tip-x: 3px; }
64
64
  @starting-style {
65
65
  .sideTip[data-state$="-open"] { opacity: 0; transform: translateX(var(--tip-x)) scale(.97); }
@@ -70,5 +70,5 @@
70
70
 
71
71
  @media (prefers-reduced-motion: reduce) {
72
72
  .item, .highlight { transition: color var(--duration-instant) linear, background-color var(--duration-instant) linear, opacity var(--duration-instant) linear; }
73
- .sideTip, .sideTip[data-state="closed"] { transform: none; transition: opacity 90ms linear; }
73
+ .sideTip, .sideTip[data-state="closed"] { transform: none; transition: opacity var(--duration-fast) linear; }
74
74
  }
@@ -9,7 +9,7 @@ const rise = { hidden: (direction) => ({ opacity: 0, y: `${.3 * direction}em`, f
9
9
  // Same keys as `rise` so the settled style is identical whichever branch renders on the server.
10
10
  const fade = { hidden: { opacity: 0, y: 0, filter: "blur(0px)" }, shown: { opacity: 1, y: 0, filter: "blur(0px)", transition: { duration: motionTokens.duration.instant } }, gone: { opacity: 0, y: 0, filter: "blur(0px)", transition: { duration: motionTokens.duration.instant } } };
11
11
  /** The first fill is slower and never overshoots, like a ring closing when the view opens. */
12
- const reveal = { ...motionTokens.spring.smooth, visualDuration: motionTokens.duration.considered * 1.6 };
12
+ const reveal = { ...motionTokens.spring.smooth, visualDuration: motionTokens.duration.expressive * 1.6 };
13
13
  /** New copy rises in while the old copy leaves, popped out of flow so the line never holds both. */
14
14
  function Swap({ text, direction = 1 }) {
15
15
  const reduceMotion = !!useReducedMotion();
@@ -1,4 +1,4 @@
1
- .figure { display: grid; justify-items: center; min-width: 0; gap: 10px; margin: 0; text-align: center; }.figure figcaption { display: grid; gap: 3px; min-width: 0; }.figure strong { font-size: var(--text-sm); font-weight: 500; }.detail { color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
1
+ .figure { display: grid; justify-items: center; min-width: 0; gap: var(--space-group); margin: 0; text-align: center; }.figure figcaption { display: grid; gap: var(--space-tight); min-width: 0; }.figure strong { font-size: var(--text-sm); font-weight: 500; }.detail { color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
2
2
  .accent { --gauge-color: var(--accent); --gauge-text: var(--accent-strong); }.success { --gauge-color: var(--success); --gauge-text: var(--success); }.warning { --gauge-color: var(--warning); --gauge-text: var(--warning); }.danger { --gauge-color: var(--danger); --gauge-text: var(--danger); }
3
3
 
4
4
  /* An activity style ring: a thick stroke with round caps over a faint tint of its own color. The stroke scales with the ring. */
@@ -9,7 +9,7 @@
9
9
  .arc { stroke: var(--gauge-color); }
10
10
 
11
11
  /* The readout sits on the ring's true centre, which is the middle of a square as wide as the ring. */
12
- .readout { position: absolute; top: 0; left: 0; display: grid; width: 100%; aspect-ratio: 1; place-content: center; justify-items: center; gap: 4px; pointer-events: none; }
12
+ .readout { position: absolute; top: 0; left: 0; display: grid; width: 100%; aspect-ratio: 1; place-content: center; justify-items: center; gap: var(--space-tight); pointer-events: none; }
13
13
  .number { position: relative; display: inline-flex; align-items: baseline; color: var(--foreground); font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 500; letter-spacing: var(--tracking-display); line-height: 1; font-variant-numeric: tabular-nums; }
14
14
  .digits { display: inline-flex; justify-content: flex-end; white-space: nowrap; }
15
15
  .unit { margin-left: 1px; color: var(--text-secondary); font-family: var(--font-body); font-size: .5em; letter-spacing: 0; }
@@ -59,8 +59,8 @@ const Surface = forwardRef(function Surface({ instant, reduced, className, style
59
59
  const unsubscribe = progress.on("change", apply);
60
60
  apply(progress.get());
61
61
  const controls = isPresent
62
- ? animate(progress, 1, still ? { duration: .14, ease: enter } : motionTokens.spring.smooth)
63
- : animate(progress, 0, { duration: .12, ease: standard });
62
+ ? animate(progress, 1, still ? { duration: motionTokens.duration.fast, ease: enter } : motionTokens.spring.smooth)
63
+ : animate(progress, 0, { duration: motionTokens.duration.instant, ease: standard });
64
64
  // The fade leads the grow on the way in and runs alongside it on the way out; it starts from the current opacity either way.
65
65
  const fade = isPresent
66
66
  ? animate(opacity, 1, { duration: reduced ? .15 : still ? .09 : .16, ease: enter })
@@ -1,5 +1,5 @@
1
1
  /* A floating layer, so it earns the floating shadow. Transforms pivot on the placed origin, the corner nearest the trigger. */
2
- .card { z-index: 60; box-sizing: border-box; width: 18.5rem; max-width: min(18.5rem, var(--radix-popover-content-available-width, calc(100vw - 24px))); padding: var(--space-inset); border: 1px solid var(--border); border-radius: var(--radius-container); corner-shape: var(--corner-shape); background: var(--surface-raised); color: var(--foreground); box-shadow: var(--shadow-floating); font-family: var(--font-body); letter-spacing: var(--tracking-body); transform-origin: var(--radix-popover-content-transform-origin); outline: none; }
2
+ .card { z-index: var(--layer-popover); box-sizing: border-box; width: 18.5rem; max-width: min(18.5rem, var(--radix-popover-content-available-width, calc(100vw - 24px))); padding: var(--space-inset); border: 1px solid var(--border); border-radius: var(--radius-container); corner-shape: var(--corner-shape); background: var(--surface-raised); color: var(--foreground); box-shadow: var(--shadow-floating); font-family: var(--font-body); letter-spacing: var(--tracking-body); transform-origin: var(--radix-popover-content-transform-origin); outline: none; }
3
3
  .profile { display: grid; gap: var(--space-group); }
4
4
  .head { display: flex; min-width: 0; align-items: center; gap: var(--space-group); }
5
5
  .avatar { position: relative; display: grid; width: 48px; height: 48px; flex: none; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-full); corner-shape: round; background: var(--surface-muted); color: var(--foreground); font-size: var(--text-sm); font-weight: 500; }
@@ -15,6 +15,6 @@
15
15
  .stat { display: flex; flex-direction: column-reverse; }
16
16
  .stat dt { color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
17
17
  .stat dd { margin: 0; color: var(--foreground); font-size: var(--text-base); font-variant-numeric: tabular-nums; font-weight: 500; line-height: var(--leading-body); }
18
- .meta { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
18
+ .meta { display: flex; align-items: center; gap: var(--space-related); color: var(--text-muted); font-size: var(--text-xs); line-height: var(--leading-body); }
19
19
  .meta svg { flex: none; }
20
20
  @media (prefers-reduced-motion: reduce) { .avatar img { transition: none; } .avatar img[data-loading] { filter: none; } }
@@ -6,20 +6,20 @@
6
6
  .layer { position: absolute; inset: 0; }
7
7
  .layer :where(img, picture, video) { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
8
8
  /* Captions sit on a frosted chip so they read over any photo, below the divider. */
9
- .chip { position: absolute; z-index: 1; top: var(--space-group); left: var(--space-group); padding: 3px 10px; border-radius: var(--radius-full); corner-shape: round; background: color-mix(in oklab, var(--background) 74%, transparent); color: var(--foreground); font-size: var(--text-xs); font-weight: 500; line-height: var(--leading-body); letter-spacing: var(--tracking-body); pointer-events: none; -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
9
+ .chip { position: absolute; z-index: 1; top: var(--space-group); left: var(--space-group); padding: var(--space-tight) var(--space-group); border-radius: var(--radius-full); corner-shape: round; background: color-mix(in oklab, var(--background) 74%, transparent); color: var(--foreground); font-size: var(--text-xs); font-weight: 500; line-height: var(--leading-body); letter-spacing: var(--tracking-body); pointer-events: none; -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
10
10
  .chip[data-place="end"] { right: var(--space-group); left: auto; }
11
11
  .chip[data-place="bottom"] { top: auto; bottom: var(--space-group); }
12
12
  /* The pivot is a frame-sized layer moved by a percentage of itself; its top-left corner is the divider's center. */
13
13
  .pivot { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
14
14
  .rotor { position: absolute; top: 0; left: 0; width: 0; height: 0; }
15
- .line { position: absolute; top: calc((100cqw + 100cqh) * -1); left: -1px; width: 2px; height: calc((100cqw + 100cqh) * 2); background: var(--surface-raised); box-shadow: 0 0 0 .5px oklch(0% 0 0 / .14); }
15
+ .line { position: absolute; top: calc((100cqw + 100cqh) * -1); left: -1px; width: 2px; height: calc((100cqw + 100cqh) * 2); background: var(--surface-raised); box-shadow: var(--shadow-hairline); }
16
16
  /* The line sits on photography, not on the theme, so it stays light in dark mode too. */
17
17
  :global(:root[data-theme="dark"]) .line { background: var(--foreground); }
18
18
  .handleSlot { position: absolute; top: 0; left: 0; }
19
19
  /* Centered with the translate property; Motion only animates its width and height, so the shape morphs without scaling the icons. */
20
20
  .handle { position: absolute; top: 0; left: 0; display: grid; box-sizing: border-box; width: 40px; height: 40px; place-items: center; translate: -50% -50%; border: 1px solid var(--border); border-radius: var(--radius-full); corner-shape: round; background: var(--surface-raised); box-shadow: var(--shadow-raised); color: var(--foreground); pointer-events: auto; outline: 0 solid transparent; transition: border-color var(--duration-fast) var(--ease-standard); }
21
- .handle::after { content: ""; position: absolute; inset: -8px; border-radius: inherit; corner-shape: inherit; }
21
+ .handle::after { content: ""; position: absolute; inset: calc(var(--space-related) * -1); border-radius: inherit; corner-shape: inherit; }
22
22
  @media (hover: hover) and (pointer: fine) { .root:hover .handle { border-color: var(--border-strong); } }
23
23
  .chevrons { display: flex; align-items: center; }
24
- .chevron { display: grid; margin-inline: -2.5px; place-items: center; }
24
+ .chevron { display: grid; margin-inline: calc(var(--space-hair) * -1); place-items: center; }
25
25
  @media (prefers-reduced-motion: reduce) { .handle { transition: none; } }