@vllnt/ui 0.4.0-canary.sha4d4d033 → 0.4.0-canary.sha51db65b

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 (227) hide show
  1. package/CHANGELOG.md +294 -1
  2. package/README.md +122 -10
  3. package/dist/components/atoms/accordion/accordion.js +29 -7
  4. package/dist/components/atoms/agent-activity/agent-activity.js +9 -2
  5. package/dist/components/atoms/ai-source-citation/ai-source-citation.js +1 -1
  6. package/dist/components/atoms/ai-streaming-text/ai-streaming-text.js +1 -1
  7. package/dist/components/atoms/alert/alert.js +1 -1
  8. package/dist/components/atoms/alert-pulse/alert-pulse.js +8 -5
  9. package/dist/components/atoms/animated-tabs/animated-tabs.js +15 -3
  10. package/dist/components/atoms/animated-text/animated-text.js +28 -7
  11. package/dist/components/atoms/animated-tooltip/animated-tooltip.js +10 -0
  12. package/dist/components/atoms/avatar/avatar.js +129 -24
  13. package/dist/components/atoms/badge/badge.js +84 -5
  14. package/dist/components/atoms/border-beam/border-beam.js +1 -4
  15. package/dist/components/atoms/bottom-activity-strip/bottom-activity-strip.js +5 -3
  16. package/dist/components/atoms/breadcrumb/breadcrumb.js +89 -37
  17. package/dist/components/atoms/chain-of-thought/chain-of-thought.js +7 -1
  18. package/dist/components/atoms/checklist/checklist.js +6 -3
  19. package/dist/components/atoms/{jarvis-dock/jarvis-dock.js → command-dock/command-dock.js} +12 -10
  20. package/dist/components/atoms/comment-pin/comment-pin.js +7 -4
  21. package/dist/components/atoms/comparison/comparison.js +40 -26
  22. package/dist/components/atoms/curriculum/curriculum.js +11 -9
  23. package/dist/components/atoms/cursor/cursor.js +48 -9
  24. package/dist/components/atoms/dialog/dialog.js +4 -2
  25. package/dist/components/atoms/dock/dock.js +75 -17
  26. package/dist/components/atoms/drawer/drawer.js +3 -1
  27. package/dist/components/atoms/dropdown-menu/dropdown-menu.js +1 -1
  28. package/dist/components/atoms/era-comparison/era-comparison.js +1 -1
  29. package/dist/components/atoms/floating-toolbar/floating-toolbar.js +23 -2
  30. package/dist/components/atoms/follow-mode/follow-mode.js +6 -6
  31. package/dist/components/atoms/gauge-chart/gauge-chart.js +1 -1
  32. package/dist/components/atoms/glass-progress/glass-progress.js +2 -1
  33. package/dist/components/atoms/handoff-beacon/handoff-beacon.js +1 -1
  34. package/dist/components/atoms/heat-overlay/heat-overlay.js +3 -2
  35. package/dist/components/atoms/input-otp/input-otp.js +1 -1
  36. package/dist/components/atoms/kbd/kbd.js +41 -11
  37. package/dist/components/atoms/key-concept/key-concept.js +4 -2
  38. package/dist/components/atoms/keyboard-shortcuts-help/keyboard-shortcuts-help.js +8 -3
  39. package/dist/components/atoms/learning-objectives/learning-objectives.js +24 -10
  40. package/dist/components/atoms/liquid-glass/liquid-glass.js +1 -2
  41. package/dist/components/atoms/list-box/list-box.js +55 -4
  42. package/dist/components/atoms/live-cursor/live-cursor.js +9 -4
  43. package/dist/components/atoms/magnetic/magnetic.js +61 -14
  44. package/dist/components/atoms/magnetic-button/magnetic-button.js +61 -14
  45. package/dist/components/atoms/marquee/marquee.js +89 -30
  46. package/dist/components/atoms/menubar/menubar.js +1 -1
  47. package/dist/components/atoms/meteors/meteors.js +2 -2
  48. package/dist/components/atoms/meter/meter.js +2 -2
  49. package/dist/components/atoms/metric-cluster/metric-cluster.js +2 -1
  50. package/dist/components/atoms/object-handle/object-handle.js +1 -1
  51. package/dist/components/atoms/object-inspector/object-inspector.js +1 -1
  52. package/dist/components/atoms/order-book/order-book.js +13 -7
  53. package/dist/components/atoms/particles/particles.js +2 -2
  54. package/dist/components/atoms/playback-ghost/playback-ghost.js +12 -4
  55. package/dist/components/atoms/policy-delivery-panel/policy-delivery-panel.js +19 -10
  56. package/dist/components/atoms/presence-stack/presence-stack.js +9 -4
  57. package/dist/components/atoms/presence-sync-indicator/presence-sync-indicator.js +2 -2
  58. package/dist/components/atoms/pro-tip/pro-tip.js +3 -0
  59. package/dist/components/atoms/progress-bar/progress-bar.js +190 -30
  60. package/dist/components/atoms/prompt-input/prompt-input.js +7 -1
  61. package/dist/components/atoms/property-section/property-section.js +1 -1
  62. package/dist/components/atoms/pull-quote/pull-quote.js +77 -0
  63. package/dist/components/atoms/qr-code/qr-code.js +27 -3
  64. package/dist/components/atoms/quiz/quiz.js +4 -2
  65. package/dist/components/atoms/rating/rating.js +13 -2
  66. package/dist/components/atoms/reasoning/reasoning.js +16 -7
  67. package/dist/components/atoms/relationship-inspector/relationship-inspector.js +1 -1
  68. package/dist/components/atoms/routing-assignment-panel/routing-assignment-panel.js +20 -11
  69. package/dist/components/atoms/runtime-overview-panel/runtime-overview-panel.js +2 -1
  70. package/dist/components/atoms/scramble-text/scramble-text.js +5 -11
  71. package/dist/components/atoms/scrim/scrim.js +32 -0
  72. package/dist/components/atoms/scroll-area/scroll-area.js +55 -13
  73. package/dist/components/atoms/scroll-progress/scroll-progress.js +11 -2
  74. package/dist/components/atoms/search-field/search-field.js +2 -2
  75. package/dist/components/atoms/segmented-control/segmented-control.js +2 -2
  76. package/dist/components/atoms/select/select.js +3 -3
  77. package/dist/components/atoms/selection-halo/selection-halo.js +10 -2
  78. package/dist/components/atoms/selection-presence/selection-presence.js +3 -1
  79. package/dist/components/atoms/severity-badge/severity-badge.js +10 -10
  80. package/dist/components/atoms/sheet/sheet.js +3 -2
  81. package/dist/components/atoms/shine-border/shine-border.js +1 -4
  82. package/dist/components/atoms/skeleton/skeleton.js +4 -1
  83. package/dist/components/atoms/slider/slider.js +12 -1
  84. package/dist/components/atoms/snap-guides/snap-guides.js +1 -0
  85. package/dist/components/atoms/sparkles/sparkles.js +2 -2
  86. package/dist/components/atoms/sparkline-grid/sparkline-grid.js +4 -4
  87. package/dist/components/atoms/spinner/spinner.js +2 -1
  88. package/dist/components/atoms/spinning-text/spinning-text.js +14 -12
  89. package/dist/components/atoms/spotlight-card/spotlight-card.js +35 -11
  90. package/dist/components/atoms/state-badge-overlay/state-badge-overlay.js +14 -16
  91. package/dist/components/atoms/status-indicator/status-indicator.js +1 -1
  92. package/dist/components/atoms/step-by-step/step-by-step.js +3 -1
  93. package/dist/components/atoms/stepper/stepper.js +2 -1
  94. package/dist/components/atoms/sticky-metric/sticky-metric.js +2 -1
  95. package/dist/components/atoms/table/table.js +1 -1
  96. package/dist/components/atoms/table-of-contents/table-of-contents.js +1 -1
  97. package/dist/components/atoms/table-of-contents-panel/table-of-contents-panel.js +8 -4
  98. package/dist/components/atoms/tabs/tabs.js +137 -19
  99. package/dist/components/atoms/tag-group/tag-group.js +10 -5
  100. package/dist/components/atoms/tags-input/tags-input.js +1 -1
  101. package/dist/components/atoms/text/text.js +28 -25
  102. package/dist/components/atoms/text-reveal/text-reveal.js +32 -17
  103. package/dist/components/atoms/theme-switcher/theme-switcher.js +12 -1
  104. package/dist/components/atoms/thinking-block/thinking-block.js +9 -7
  105. package/dist/components/atoms/thread-bubble/thread-bubble.js +4 -2
  106. package/dist/components/atoms/threshold-ring/threshold-ring.js +3 -2
  107. package/dist/components/atoms/tilt-card/tilt-card.js +63 -18
  108. package/dist/components/atoms/timeline/timeline.js +15 -3
  109. package/dist/components/atoms/timeline-scrubber/timeline-scrubber.js +3 -2
  110. package/dist/components/atoms/tldr-section/tldr-section.js +12 -7
  111. package/dist/components/atoms/toast/sonner-toast.js +4 -0
  112. package/dist/components/atoms/toast/toast.js +15 -16
  113. package/dist/components/atoms/toast/toaster.js +7 -1
  114. package/dist/components/atoms/toggle/toggle.js +1 -1
  115. package/dist/components/atoms/toolbar/toolbar.js +1 -0
  116. package/dist/components/atoms/typewriter/typewriter.js +2 -1
  117. package/dist/components/atoms/video-embed/video-embed.js +2 -0
  118. package/dist/components/atoms/view-switcher/view-switcher.js +54 -43
  119. package/dist/components/atoms/viewport-bookmarks/viewport-bookmarks.js +1 -1
  120. package/dist/components/atoms/watchlist/watchlist.js +9 -8
  121. package/dist/components/atoms/workspace-switcher/workspace-switcher.js +40 -11
  122. package/dist/components/index.js +54 -8
  123. package/dist/components/molecules/ai-artifact/ai-artifact.js +7 -13
  124. package/dist/components/molecules/ai-chat-input/ai-chat-input.js +8 -1
  125. package/dist/components/molecules/ai-tool-call-display/ai-tool-call-display.js +1 -1
  126. package/dist/components/molecules/approval-request/approval-request.js +168 -0
  127. package/dist/components/molecules/avatar-group/avatar-group.js +1 -1
  128. package/dist/components/molecules/civilization-card/civilization-card.js +1 -1
  129. package/dist/components/molecules/color-picker/color-picker.js +47 -38
  130. package/dist/components/molecules/command/command.js +33 -14
  131. package/dist/components/molecules/completion-dialog/completion-dialog.js +91 -132
  132. package/dist/components/molecules/connector-edge/connector-edge.js +1 -0
  133. package/dist/components/molecules/content-intro/content-intro.js +4 -2
  134. package/dist/components/molecules/conversation-thread/conversation-thread.js +10 -9
  135. package/dist/components/molecules/cookie-consent/cookie-consent.js +188 -80
  136. package/dist/components/molecules/copy-button/copy-button.js +4 -44
  137. package/dist/components/molecules/copy-button/use-copy-to-clipboard.js +40 -0
  138. package/dist/components/molecules/countdown-timer/countdown-timer.js +1 -1
  139. package/dist/components/molecules/credit-badge/credit-badge.js +13 -16
  140. package/dist/components/molecules/exercise/exercise.js +3 -3
  141. package/dist/components/molecules/file-upload/file-upload.js +43 -41
  142. package/dist/components/molecules/filter-bar/filter-bar.js +5 -5
  143. package/dist/components/molecules/historical-figure-card/historical-figure-card.js +2 -2
  144. package/dist/components/molecules/inline-input/inline-input.js +4 -0
  145. package/dist/components/molecules/live-feed/live-feed.js +1 -1
  146. package/dist/components/molecules/metric-gauge/metric-gauge.js +2 -2
  147. package/dist/components/molecules/newsletter-signup/newsletter-signup.js +8 -1
  148. package/dist/components/molecules/number-input/number-input.js +6 -0
  149. package/dist/components/molecules/object-card/object-card.js +5 -4
  150. package/dist/components/molecules/overview-board/overview-board.js +1 -0
  151. package/dist/components/molecules/pagination/pagination.js +44 -12
  152. package/dist/components/molecules/plan-badge/plan-badge.js +12 -13
  153. package/dist/components/molecules/pricing-table/pricing-table.js +1 -1
  154. package/dist/components/molecules/progress-card/progress-card.js +18 -8
  155. package/dist/components/molecules/progress-tracker/progress-tracker.js +47 -48
  156. package/dist/components/molecules/scope-selector/scope-selector.js +2 -2
  157. package/dist/components/molecules/search-bar/search-bar.js +15 -9
  158. package/dist/components/molecules/sidebar/sidebar.js +27 -12
  159. package/dist/components/molecules/stat-card/stat-card.js +2 -2
  160. package/dist/components/molecules/status-board/status-board.js +7 -1
  161. package/dist/components/molecules/ticker-tape/ticker-tape.js +40 -12
  162. package/dist/components/molecules/time-picker/time-picker.js +65 -26
  163. package/dist/components/molecules/tour/tour.js +15 -7
  164. package/dist/components/molecules/transaction-list/transaction-list.js +8 -10
  165. package/dist/components/molecules/tutorial-card/tutorial-card.js +8 -6
  166. package/dist/components/molecules/tutorial-filters/tutorial-filters.js +5 -5
  167. package/dist/components/molecules/usage-breakdown/usage-breakdown.js +1 -1
  168. package/dist/components/molecules/zoom-hud/zoom-hud.js +1 -0
  169. package/dist/components/organisms/access-matrix/access-matrix.js +271 -0
  170. package/dist/components/organisms/activity-heatmap/activity-heatmap.js +1 -1
  171. package/dist/components/organisms/candlestick-chart/candlestick-chart.js +4 -4
  172. package/dist/components/organisms/canvas-view/canvas-view.js +10 -14
  173. package/dist/components/organisms/chart/bar-chart.js +1 -1
  174. package/dist/components/organisms/choropleth-map/choropleth-map.js +9 -2
  175. package/dist/components/organisms/chronological-timeline/chronological-timeline.js +2 -4
  176. package/dist/components/organisms/code-block/code-block.js +154 -63
  177. package/dist/components/organisms/code-playground/code-playground.js +9 -2
  178. package/dist/components/organisms/combobox/combobox.js +25 -7
  179. package/dist/components/organisms/cta-band/cta-band.js +79 -0
  180. package/dist/components/organisms/data-table/data-table.js +39 -19
  181. package/dist/components/organisms/date-picker/date-picker.js +20 -8
  182. package/dist/components/organisms/date-range-picker/date-range-picker.js +20 -8
  183. package/dist/components/organisms/flow-diagram/flow-canvas.js +3 -0
  184. package/dist/components/organisms/flow-diagram/flow-controls.js +8 -2
  185. package/dist/components/organisms/flow-diagram/flow-fullscreen.js +6 -2
  186. package/dist/components/organisms/flow-diagram/use-flow-diagram.js +25 -11
  187. package/dist/components/organisms/gantt-chart/gantt-chart.js +7 -3
  188. package/dist/components/organisms/geography-quiz-map/geography-quiz-map.js +43 -20
  189. package/dist/components/organisms/globe-3d/globe-3d.js +1 -1
  190. package/dist/components/organisms/historic-timeline/historic-timeline.js +2 -2
  191. package/dist/components/organisms/interactive-timeline/interactive-timeline.js +6 -6
  192. package/dist/components/organisms/map-2d/map-2d.js +3 -0
  193. package/dist/components/organisms/market-treemap/market-treemap.js +9 -2
  194. package/dist/components/organisms/model-selector/model-selector.js +57 -40
  195. package/dist/components/organisms/multi-select/multi-select.js +14 -1
  196. package/dist/components/organisms/navbar-saas/navbar-saas.js +1 -1
  197. package/dist/components/organisms/order-summary/order-summary.js +172 -0
  198. package/dist/components/organisms/parallel-timeline/parallel-timeline.js +2 -1
  199. package/dist/components/organisms/primary-source-viewer/primary-source-viewer.js +1 -1
  200. package/dist/components/organisms/run-timeline/run-timeline.js +2 -2
  201. package/dist/components/organisms/settings-list/settings-list.js +125 -0
  202. package/dist/components/organisms/share-dialog/share-dialog.js +39 -25
  203. package/dist/components/organisms/share-dialog-people/share-dialog-people.js +412 -0
  204. package/dist/components/organisms/slideshow/slideshow.js +32 -17
  205. package/dist/components/organisms/static-code/static-code-copy.js +1 -1
  206. package/dist/components/organisms/subscription-card/subscription-card.js +10 -10
  207. package/dist/components/organisms/terminal/terminal.js +5 -5
  208. package/dist/components/organisms/tree-view/tree-view.js +41 -4
  209. package/dist/components/organisms/tutorial-complete/tutorial-complete.js +2 -2
  210. package/dist/components/organisms/tutorial-mdx/tutorial-mdx.js +7 -6
  211. package/dist/index.d.ts +2251 -876
  212. package/dist/index.js +24 -0
  213. package/dist/lib/copy-text.js +64 -0
  214. package/dist/lib/focus-calendar-day.js +13 -0
  215. package/dist/lib/roving-focus.js +70 -0
  216. package/dist/lib/status-dot.js +33 -0
  217. package/dist/lib/use-escape-key.js +6 -3
  218. package/dist/lib/use-event-callback.js +15 -0
  219. package/dist/lib/use-focus-containment.js +74 -0
  220. package/dist/lib/use-return-focus.js +23 -0
  221. package/dist/tailwind-preset.js +16 -0
  222. package/dist/types/side-effect-imports.d.js +0 -0
  223. package/package.json +85 -72
  224. package/styles.css +77 -7
  225. package/themes/default.css +48 -7
  226. package/themes/presets.css +24 -24
  227. package/themes/products.css +146 -0
package/CHANGELOG.md CHANGED
@@ -6,16 +6,308 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ### Changed
10
+
11
+ - **`JarvisDock` is now `CommandDock`** - the floating bottom dock with
12
+ quick-action buttons and a command-palette trigger. Props and behavior are
13
+ the same. The `data-jarvis-*` attributes are now `data-command-*` and the
14
+ default region label is "Command dock". The registry item is `command-dock`
15
+ and its page is `/components/command-dock`; `/components/jarvis-dock`
16
+ redirects there (308). (#682)
17
+
18
+ ### Deprecated
19
+
20
+ - **`JarvisDock` and the `jarvis-dock` registry item** - renamed to
21
+ `CommandDock` / `command-dock`. The aliases (`JarvisDock`, `JarvisDockAction`,
22
+ `JarvisDockLabels`, `JarvisDockProps`, `JarvisDockTone`, and
23
+ `/r/jarvis-dock.json`) stay for one release and are removed in the release
24
+ after next. To migrate, import `CommandDock` instead of `JarvisDock`, rename
25
+ `data-jarvis-*` selectors to `data-command-*`, and install with
26
+ `pnpm dlx shadcn@latest add https://ui.vllnt.com/r/command-dock.json`. (#682)
27
+
28
+ ### Fixed
29
+
30
+ - **Avatar fallback in dark** - `AvatarFallback` and the `PresenceStack`
31
+ overflow chip fill their disc with `bg-secondary` (#262626). They used
32
+ `bg-muted`, which is the page colour (#000000) in dark, so the disc
33
+ disappeared and only the initials showed. Light mode is unchanged. A test
34
+ fails if either goes back to `bg-muted`. (#686)
35
+
36
+ ## [0.4.0] - 2026-11-20
37
+
9
38
  ### Added
10
39
 
11
- - Source-only React Native renderer and shared design contracts for the 0.4.0 canary track; stable Web installation remains unchanged.
40
+ - **Dialog overlay** - `DialogContent` takes `overlay="scrim"` (default, the
41
+ dimmed veil as before) or `overlay="none"` (no veil; the dialog stays modal).
42
+ (#601)
43
+ - **Design tokens** - `color.badge-label.*`, `brand.status.*`, `radius.control`
44
+ (6 px), `radius.surface` (8 px), `size.target.min` (44 px), `size.control-xs`
45
+ (32 px, and 44 px under a coarse pointer), `opacity.grain` and
46
+ `opacity.contact`. Only the radius, size and opacity tokens have CSS
47
+ variables. (#602)
48
+ - **Lock 2 tokens** - `shadow.raised`, `shadow.overlay` and `shadow.floating`
49
+ (`--shadow-raised`, `--shadow-overlay`, `--shadow-floating`, one list per
50
+ mode), `spacing.page-gutter`, `spacing.page-gutter-tablet` and
51
+ `spacing.page-gutter-desktop` (20, 48 and 96 px, as `--spacing-page-gutter*`),
52
+ `size.page-max` (1440 px) and `size.measure-narrow` (480 px) as
53
+ `--size-page-max` and `--size-measure-narrow`, and a `spacing.24` step
54
+ (96 px, no CSS variable). (#614)
55
+ - **Badge v1.3 props** - `tone`, `size`, `border`, `dot` and `variant="soft"`.
56
+ A status tone colours a dot, not the words. Existing props and defaults
57
+ render as before. (#610)
58
+ - **ProgressBar `blocks`** - draws ten blocks and fills one per whole 10% of
59
+ `value / max`; `aria-valuenow` stays exact. (#611)
60
+ - **Lint rule A12** (`vllnt/a12-no-status-text-colour`) - flags a status colour
61
+ used as text colour in component code. 56 existing files are allowlisted and
62
+ burn down in #604. (#607)
63
+ - **`warning` tone** - `AlertPulse` (`severity`), `BottomActivityStrip`,
64
+ `HeatOverlay`, `MetricCluster`, `RuntimeOverviewPanel`, `StickyMetric`,
65
+ `ThresholdRing` and `TimelineScrubber` (`tone`) accept `warning`, the name the
66
+ design library uses. (#616)
67
+ - **Product themes stylesheet** - `@vllnt/ui/themes/products.css` ships the
68
+ Maia and PaaS themes as `html[data-theme="maia"]` and
69
+ `html[data-theme="paas"]`, each with a `.dark` block. It is generated from
70
+ `packages/design/tokens.json`. Load JetBrains Mono (Maia, PaaS) in your
71
+ app; the package does not ship the font.
72
+ - **Status and diff colors** - CSS variables `--success`, `--warning`,
73
+ `--info`, their `-foreground` pairs, `--diff-added` and `--diff-removed` in
74
+ `themes/default.css` and `styles.css`, and matching Tailwind colors
75
+ (`success`, `warning`, `info`, `diff.added`, `diff.removed`) in the preset.
76
+ - **Label type step** - `--font-size-label`, `--line-height-label` and
77
+ `--font-weight-label`.
78
+ - **Sidebar `pathname` prop** - names the page the sidebar marks as current.
79
+ It defaults to the router's pathname, so existing usage is unchanged. Pass
80
+ it when the URL the visitor sees differs from the route that renders, such as
81
+ a prerendered locale or variant route, instead of overriding the router's
82
+ pathname context.
83
+ - **Sidebar `prefetch` prop** - set it to `false` to stop the sidebar's links
84
+ from prefetching their pages. Left unset, the links keep the router's default
85
+ prefetching, so existing usage is unchanged. A sidebar with dozens of links
86
+ in view otherwise prefetches every one of them on page load.
87
+
88
+ - **New hooks** - `useFocusContainment` (trap Tab inside a custom modal and
89
+ restore focus on close) and `useEventCallback` (stable callback that always
90
+ calls the latest closure). Registry items import them from `@vllnt/ui`.
91
+ - **Props types exported from the barrel** - `BreadcrumbProps`,
92
+ `CommandDialogProps`, `SheetContentProps`, `CarouselProps`, `CodeBlockProps`,
93
+ `MDXContentProps`, `SidebarProps`, `TableOfContentsProps`,
94
+ `CategoryFilterProps`, `SearchBarProps`, `ShareSectionProps`,
95
+ `SearchDialogProps`, `LangProviderProps`, `ThemeToggleProps`,
96
+ `ProfileSectionProps`, `TLDRSectionProps`, `AreaChartProps`, `BarChartProps`,
97
+ `LineChartProps` and `ThemePresetProviderProps`.
98
+
99
+ - Source-only React Native renderer and shared design contracts (`@vllnt/ui-core`, `@vllnt/ui-native`). They are experimental and not published with this release; installing `@vllnt/ui` is unchanged.
12
100
  - Localized Native catalog discovery, dependency/capability comparison, and extensible React/React Native source tabs in a single component preview surface.
101
+ - **Accessibility gate** - the Storybook test-runner runs axe-core (WCAG 2.0,
102
+ 2.1 and 2.2, levels A and AA) on every story in the light and dark theme and
103
+ fails on any violation. A story can turn a rule off only through
104
+ `parameters.a11y.config.rules` with a written `reason`. (#543)
105
+ - **Optional accessibility props** (English defaults, nothing required):
106
+ `popoverLabel` on Combobox, MultiSelect, DatePicker, DateRangePicker,
107
+ TimePicker and ColorPicker; `aria-label` / `aria-labelledby` /
108
+ `aria-describedby` / `id` on Combobox; `aria-label` / `aria-labelledby` on
109
+ InlineInput and ScrollArea; NumberInput `incrementLabel` / `decrementLabel`;
110
+ Marquee and TickerTape `pauseControl` + `labels`; TabsContent `tabIndex`;
111
+ GanttChartLabels `region`; CompletionDialog `modal`; Pagination `labels`;
112
+ AIArtifactLabels `content`; ModelSelector `listLabel`; DataTableFilter
113
+ `ariaLabel`; VideoEmbed `playLabel`. (#543)
114
+ - **New exports** - `moveRovingFocus` (+ `RovingFocusOptions`,
115
+ `RovingOrientation`), `useReturnFocus` (+ `ReturnFocusHandlers`),
116
+ `focusCalendarDay`, `CHECKLIST_PROGRESS_EVENT`, `parseChecklistStorageValue`,
117
+ `MarqueeLabels`, `TickerTapeLabels`, `PaginationLabels`. Registry items now
118
+ import these from `@vllnt/ui`, so installing them needs a `@vllnt/ui` release
119
+ that contains them (the registry pins `^0.3.0`, which does not).
120
+ `registry:integrity` now fails when a registry item imports a name that
121
+ `@vllnt/ui` does not export. (#543)
122
+ - **`copyText` helper** - `copyText(value): Promise<boolean>` is exported from
123
+ `@vllnt/ui`. It writes through the Clipboard API, falls back to a temporary
124
+ textarea and `document.execCommand("copy")` when that API is missing or
125
+ rejects, and resolves to `false` when neither path works. (#576)
126
+ - **Text `family` prop** - `family="mono"` sets body copy in `--font-mono`
127
+ (JetBrains Mono by default) with the same scale: `size="base"` 16/1.6,
128
+ `size="lead"` 18/1.7. The default stays `family="sans"`. (#666)
129
+ - **`@vllnt/ui/package.json` export** - tools can read the package manifest
130
+ (for example its version) without `ERR_PACKAGE_PATH_NOT_EXPORTED`. (#665)
131
+
132
+ ### Changed
133
+
134
+ - **Dark surfaces are pure black** - the default dark theme now renders
135
+ `--background`, `--muted`, `--card` and `--popover` as `0 0 0` (#000000).
136
+ Hairline borders separate the surfaces: `--border`, `--secondary` and
137
+ `--accent` stay `0.2686` (#262626), and `--input` is unchanged. Before,
138
+ `--muted` was `0.2686` (#262626) and `--card` / `--popover` were `0.1445`
139
+ (#0a0a0a). A `bg-card` or `bg-popover` surface needs a `border` to show its
140
+ edge; every shipped one has it, and a test now fails on one that does not.
141
+ The separators in `DropdownMenu`, `Menubar` and `Select` draw with
142
+ `bg-border` instead of `bg-muted`, which is the page color now, and a test
143
+ fails on any one-pixel divider that uses `bg-muted`. Light mode is unchanged.
144
+ Themes that override these roles (presets, Maia) keep their values; PaaS and
145
+ any app that reads the dark `--muted`, `--card` or `--popover` directly get
146
+ black.
147
+ - **Hover, selected and data-state fills use `secondary`** - 32 component files
148
+ (`Table`, `Tabs` pill, `Toggle`, `Slideshow`, `FilterBar` and others) used
149
+ `bg-muted` for that feedback, which is now the page color in dark.
150
+ They use `bg-secondary` with the same opacity. In the default and PaaS themes
151
+ the fill is the same color as before in light and dark, because `--secondary`
152
+ equals the old `--muted` there. Theme presets keep a quiet neutral
153
+ `--secondary` (their `--accent` is a brand color), so text on these fills
154
+ stays at 6.65 to 12.53:1 in dark. The Maia theme has its own dark `--muted`
155
+ (`0.2002`) and a core dark `--secondary` (`0.2686`), so its dark hover fills
156
+ are one step lighter than before.
157
+ `SegmentedControl`, `ViewSwitcher`, `WorkspaceSwitcher` and the `PricingTable`
158
+ period toggle draw their track with `bg-secondary` for the same reason: the
159
+ selected segment is `bg-background` on that track.
160
+ - **Skeletons, tracks and handles use `secondary`** - 29 `bg-muted` fills in 23
161
+ component files were the whole visual of their element: `Skeleton`, the
162
+ `ProgressBar`, `Meter`, `Tour`, `Checklist`, `UsageBreakdown` and other
163
+ progress, meter and usage tracks, the `Drawer` handle, the empty cells of
164
+ `ActivityHeatmap` and the neutral `GanttChart` bar. They use `bg-secondary`
165
+ (#262626) with the same opacity, because `bg-muted` is the page color in dark
166
+ and they would disappear. Chips, code spans and panels keep `bg-muted`: their
167
+ text and border carry them. A test fails on a `bg-muted` skeleton or bar.
168
+ - **Alert destructive** - the title and body use the foreground colour. The
169
+ status colour stays on the border and the glyph. (#607)
170
+ - **Badge status chips** use a status dot. (#610)
171
+ - **Maia is Ink, and `--input` follows the design library** - Maia `--primary`
172
+ is black in light and white in dark (it was pink), Maia uses the core sans
173
+ font instead of Figtree, and its display and label weights are 600, not 700.
174
+ The default theme's `--input` is `0.6167` in light (was `0.66`) and `0.5208`
175
+ in dark (was `0.49`). (#614)
176
+ - **Theme presets meet the input 3:1 rule on muted** - the 12 runtime presets
177
+ (aura, chatgpt, claude, cyberlime, cyberpunk, dracula, dusk, gemini, matrix,
178
+ nord, synthwave and tron) get a new `--input` lightness in light and dark, by
179
+ 0.048 at most, with hue and chroma unchanged. The control border now reaches
180
+ 3:1 on background, card, popover and muted. (#620)
181
+ - **`warn` is deprecated** in the eight components above; pass `warning`. `warn`
182
+ still works and renders the same colour. Removing it would break consumers,
183
+ so that waits for a breaking release. `HeatOverlay` and `AlertPulse` now
184
+ default to `warning`. A `data-*` tone attribute echoes the value you pass.
185
+ - **Site header name** - `NavbarSaas` is the one code name for the design
186
+ library's `organism / Site header`. A `floating` style will join it as an
187
+ added prop, and `FloatingNavbar` stays a separate component until then.
188
+ `Display` is the design library's `atom / Heading` with `Level=display`.
189
+ - **Colour tokens meet WCAG AA** (#538). The default light theme uses a darker
190
+ `--muted-foreground`, `--destructive` and `--input`; in the dark theme
191
+ `--destructive` is lighter with a dark foreground and `--input` is lighter, so
192
+ input borders are easier to see in both. Presets adjust `--primary`,
193
+ `--destructive`, `--input` and `--ring` the same way. Visual snapshots change.
194
+ - **Font tokens on `:root`** - `styles.css` now defines `--font-sans`,
195
+ `--font-display` and `--font-mono` on `:root`. If your app sets variables
196
+ with these names, declare them later in the cascade or on `body` so yours win.
197
+ - **Lighter imports** (#541) - CodeBlock renders its code as plain text first
198
+ and highlights it once the Prism build loads on the client; TutorialMDX loads
199
+ the MDX compiler only for content with JSX, and FlowDiagram loads
200
+ `html-to-image` only when copied. Apps that use neither `toast` nor
201
+ `Toaster` no longer bundle sonner.
202
+ - **Smaller package** - the tarball has 361 files instead of 659: the
203
+ per-component re-export stubs and `dist/test-setup.js` are gone.
204
+ Only the `exports` entry points are public, so imports do not change.
205
+
206
+ - **Peer dependency ranges now match what the package needs.** `next` is
207
+ `>=15.0.0` (Next 14 peers React 18, which the React 19 build cannot use),
208
+ `tailwindcss` is `^3.4.0` (components use `size-*`, `text-balance` and
209
+ `has-[]`, and the preset and CSS are Tailwind v3 only), and `next-themes` is
210
+ now a required peer because the root entry imports it. `next` stays optional
211
+ in metadata, but the root entry still imports `next/link`, `next/image` and
212
+ `next/navigation`, so non-Next apps must alias them (see the README
213
+ workaround). `react` and `react-dom` stay `>=19.0.0`: SearchBar and Slideshow
214
+ no longer call React 19.2's `useEffectEvent`, so 19.0 and 19.1 work.
215
+
216
+ - **Accessibility behaviour changes** (#543):
217
+ - Drawer moves focus into its content on open (`autoFocus` now defaults to
218
+ `true`; pass `autoFocus={false}` for vaul's previous behaviour).
219
+ - CompletionDialog is built on the Radix dialog: it traps focus, closes on
220
+ Escape and returns focus to the opener. `modal` (default `true`) maps to
221
+ Radix `modal`; `modal={false}` leaves the page behind it interactive.
222
+ Shortcuts work only while focus is inside the dialog, an empty string turns
223
+ one off, and Enter no longer confirms from any focused element.
224
+ - Marquee and TickerTape show a 24px pause/play button by default
225
+ (`pauseControl={false}` hides it). It overlays the top-right corner of the
226
+ Marquee and the right edge of the TickerTape, and hides under reduced
227
+ motion, when nothing moves.
228
+ - Pagination renders a `nav` landmark of single links styled as buttons, with
229
+ `aria-current="page"` on the current page (it used to nest a button in each
230
+ link).
231
+ - CodeBlock syntax colours come from the `--vllnt-code-*` CSS variables
232
+ (OKLCH channels) instead of JS theme detection. The defaults reach 4.5:1 on
233
+ the background in light and dark mode for the default theme and every
234
+ preset; override the variables to restyle.
235
+ - CommandSeparator renders an `aria-hidden` divider.
236
+ - Under `prefers-reduced-motion`, components stop their own decorative
237
+ animation and AnimatedText shows its final text at once; loaders marked
238
+ `data-motion="essential"` keep spinning, slower. The stylesheet changes
239
+ motion only on library components, never on your own elements.
240
+ - TabsContent is a tab stop only when the panel holds no focusable element;
241
+ the ScrollArea viewport is a tab stop only while its content scrolls.
242
+ - TreeView supports Home / End, ArrowRight to the first child and ArrowLeft
243
+ to the parent, and keeps the active row in view.
244
+ - **Core caption and label weights match the Penpot library** -
245
+ `font.weight.caption` is 400 (was 500) and `font.weight.label` /
246
+ `--font-weight-label` is 500 (was 600). No shipped web component reads
247
+ them; read `--font-weight-label` directly and labels get lighter. The Maia
248
+ theme keeps its Ink scale (caption 500, label 600). Radius is unchanged:
249
+ `radius.control` 6 and `radius.surface` 8 are the shared role names. (#669)
13
250
 
14
251
  ### Fixed
15
252
 
253
+ - **Tap targets** - the NavbarSaas links, the Breadcrumb crumbs, the
254
+ TableOfContents buttons and the Sidebar family heading link are at least
255
+ 24 px tall (WCAG 2.5.8); they were 20 px.
256
+ - **Close button target size** - the close buttons of `DialogContent`,
257
+ `SheetContent` and `CompletionDialog` were 16 px. They are at least 24 x 24 px
258
+ around the same 16 px icon (WCAG 2.5.8). (#576)
259
+ - **Copy without the Clipboard API** - `useCopyToClipboard` (so `CopyButton`,
260
+ `CodeBlock`, `Terminal` and the other copy controls) and
261
+ `AIArtifactCopyButton` fall back to a temporary textarea and
262
+ `document.execCommand("copy")` when `navigator.clipboard` is missing (plain
263
+ http, such as a Tailnet IP) or `writeText` rejects. The fallback works inside
264
+ modal dialogs, alert dialogs, native `dialog` elements and modal menus, keeps
265
+ the text the user had selected on the page, and returns focus only when it
266
+ came from the keyboard. `copied` stays `false` when both paths fail.
267
+ `FlowDiagram` copies a PNG, so it has no text fallback and keeps reporting
268
+ "Copy failed". (#576)
269
+ - **Accordion accessibility** - each trigger now has `aria-controls` pointing
270
+ at its panel, and each panel is a `region` labelled by its trigger. Closed
271
+ panels are `inert`, so screen readers no longer read closed answers and Tab
272
+ skips links inside them. The open and close animation is unchanged.
273
+ - **Select, SegmentedControl, FloatingToolbar and ProgressBar** - `Select`
274
+ shows `aria-invalid` with a destructive border. The `Select` menu animation,
275
+ the `SegmentedControl` selection transition, the `FloatingToolbar` colour
276
+ transition and the `ProgressBar` transitions stop under
277
+ `prefers-reduced-motion`. `FloatingToolbar` is one tab stop, and the arrow,
278
+ Home and End keys move between its actions and skip disabled ones. (#611)
279
+ - **Setup docs** - the Tailwind config in both READMEs, the installation page
280
+ and the agent skill now lists `./node_modules/@vllnt/ui/dist/**/*.js` in
281
+ `content`. Tailwind 3 ignores a preset's `content` once the app sets its own,
282
+ so the documented config generated no component styles. The agent skill's
283
+ peer ranges and colour format (OKLCH) are corrected too.
284
+ - **Tailwind preset dependency** - `tailwindcss-animate`, which
285
+ `@vllnt/ui/tailwind-preset` imports, is now a runtime dependency. With 0.3.0
286
+ the preset failed to load unless the app installed it.
287
+ - **Duplicate React keys** - Terminal, FileUpload, AvatarGroup, Breadcrumb and
288
+ about 20 other list renderers no longer key rows by content or label alone,
289
+ so repeated or blank entries stop triggering duplicate-key errors. FileUpload
290
+ adds an identical file (same name, size and lastModified) once, so removal
291
+ removes one entry, and a selection that adds nothing new does not call
292
+ `onFilesChange`.
293
+ - **`"use client"` directives** - Toolbar, Stepper, AIChatInput, ObjectCard,
294
+ OverviewBoard and ZoomHUD use event handlers or browser globals and now carry
295
+ the directive. `check:use-client` also flags handler props and browser globals.
296
+ - **Focus in custom dialogs** - KeyboardShortcutsHelp, TableOfContentsPanel,
297
+ the FlowDiagram fullscreen view and the Slideshow contents panel keep Tab and
298
+ Shift+Tab inside the dialog and return focus to the opener on close.
299
+ - **DataTable** sortable headers expose `aria-sort`.
300
+ - **Contrast** - Rating stars and the green success icons in Checklist,
301
+ Curriculum and LearningObjectives reach 3:1 against the background in light
302
+ and dark themes.
303
+ - **Decorative inline `<svg>` icons** are hidden from assistive technology.
304
+
16
305
  - Preserve nested scrolling, reduced-motion behavior and sidebar keyboard focus in the affected Web components.
17
306
  - Forward explicit tab accessibility relationships and label/keyboard handlers without changing default tab navigation.
18
307
  - Emit JSON-LD graph documents and localized Native discovery metadata without advertising unpublished npm packages.
308
+ - Accessible names, ARIA structure, APG keyboard patterns (tabs, radio groups,
309
+ listbox, tree, dialogs and focus return), reduced motion and hard-coded
310
+ palette contrast across the Web components flagged by the #535 audit. (#543)
19
311
 
20
312
  ## [0.3.0] - 2026-06-26
21
313
 
@@ -164,6 +456,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
164
456
 
165
457
  - Initial public publish to the public npm registry.
166
458
 
459
+ [0.4.0]: https://github.com/vllnt/ui/releases/tag/v0.4.0
167
460
  [0.3.0]: https://github.com/vllnt/ui/releases/tag/v0.3.0
168
461
  [0.2.1]: https://github.com/vllnt/ui/releases/tag/v0.2.1
169
462
  [0.2.0]: https://github.com/vllnt/ui/releases/tag/v0.2.0
package/README.md CHANGED
@@ -1,9 +1,33 @@
1
1
  # @vllnt/ui
2
2
 
3
- React component library — 309 components built on Radix UI primitives, Tailwind CSS, and CVA.
3
+ React components built on Radix UI primitives, Tailwind CSS, and CVA. For humans and AI agents.
4
4
 
5
5
  See [CHANGELOG.md](./CHANGELOG.md) for release history.
6
6
 
7
+ ## For AI agents
8
+
9
+ An agent can read this library as text and JSON, without scraping pages. The site is <https://ui.vllnt.com>.
10
+
11
+ | URL | Returns |
12
+ | --- | --- |
13
+ | `https://ui.vllnt.com/llms.txt` | A short plain-text overview: install steps, docs links, and components grouped by category. |
14
+ | `https://ui.vllnt.com/llms-full.txt` | One long text file: guides, the design guide, latest release notes, templates, and a summary of every component. |
15
+ | `https://ui.vllnt.com/r/registry.json` | JSON index of every component in the shadcn registry. |
16
+ | `https://ui.vllnt.com/r/<name>` | One component as a shadcn registry item, with its source files inline. |
17
+ | `https://ui.vllnt.com/r/themes?t=<token>` | A shadcn theme item decoded from a theme token made in the theme editor. |
18
+ | `https://ui.vllnt.com/r/design.json` | The design tokens as JSON. |
19
+ | `https://ui.vllnt.com/design.txt` | The design guide as plain text. `https://ui.vllnt.com/DESIGN.md` is the same guide as Markdown. |
20
+ | `https://ui.vllnt.com/mcp` | An MCP server. It speaks JSON-RPC 2.0 over HTTP POST and has four read-only tools: `search_components`, `get_component`, `list_categories`, `list_platforms`. A GET returns server info. |
21
+ | `https://ui.vllnt.com/.well-known/api-catalog` | A catalog of these APIs (RFC 9727 linkset). |
22
+
23
+ The home page, the design and philosophy pages, and most docs and component pages also answer in Markdown. Send `Accept: text/markdown` to the same URL. A wildcard `Accept` does not select Markdown; the header must name `text/markdown`.
24
+
25
+ ```bash
26
+ curl -H "Accept: text/markdown" https://ui.vllnt.com/components/button
27
+ ```
28
+
29
+ More: <https://ui.vllnt.com/docs/agents>.
30
+
7
31
  ## Install
8
32
 
9
33
  ```bash
@@ -15,15 +39,69 @@ pnpm add @vllnt/ui
15
39
  Required:
16
40
 
17
41
  ```bash
18
- pnpm add react react-dom tailwindcss
42
+ pnpm add react react-dom tailwindcss next-themes
19
43
  ```
20
44
 
21
- Optional (only if using ThemeProvider, NavbarSaas, or other Next.js-specific components):
45
+ `react` and `react-dom` >= 19.0.0, `tailwindcss` ^3.4.0, `next-themes` >= 0.4.0 (a React-only library; it works outside Next.js).
46
+
47
+ Next.js (>= 15.0.0) is an optional peer, but the root entry imports `next/link`, `next/image` and `next/navigation` at module level. Install `next` unless you alias those modules (below).
22
48
 
23
49
  ```bash
24
- pnpm add next next-themes
50
+ pnpm add next
51
+ ```
52
+
53
+ #### Without Next.js (workaround)
54
+
55
+ Importing anything from `@vllnt/ui` loads every component, including the ones that use `next/*`. In a bundler without Next.js (for example Vite), alias the three modules to small stubs. Verified to build with Vite 7; runtime behaviour of the stubbed components (`Breadcrumb`, `Pagination`, `Sidebar`, `SearchBar`, `NavbarSaas`, ...) is not guaranteed.
56
+
57
+ ```ts
58
+ // vite.config.ts - workaround, not an officially supported setup
59
+ import { fileURLToPath } from "node:url";
60
+ import { defineConfig } from "vite";
61
+
62
+ const stub = (file: string) =>
63
+ fileURLToPath(new URL(`./next-stubs/${file}`, import.meta.url));
64
+
65
+ export default defineConfig({
66
+ resolve: {
67
+ alias: [
68
+ { find: /^next\/link$/, replacement: stub("link.js") },
69
+ { find: /^next\/image$/, replacement: stub("image.js") },
70
+ { find: /^next\/navigation$/, replacement: stub("navigation.js") },
71
+ ],
72
+ },
73
+ });
74
+ ```
75
+
76
+ Stub files (workaround for non-Next bundlers; place them in `next-stubs/`):
77
+
78
+ ```jsx
79
+ // next-stubs/link.js
80
+ import { createElement } from "react";
81
+ export default function Link({ href, prefetch, replace, scroll, ...props }) {
82
+ return createElement("a", { href: typeof href === "string" ? href : href?.pathname, ...props });
83
+ }
84
+ ```
85
+
86
+ ```jsx
87
+ // next-stubs/image.js
88
+ import { createElement } from "react";
89
+ export default function Image({ src, alt = "", fill, priority, quality, placeholder, blurDataURL, loader, unoptimized, ...props }) {
90
+ return createElement("img", { src: typeof src === "string" ? src : src?.src, alt, ...props });
91
+ }
92
+ ```
93
+
94
+ ```js
95
+ // next-stubs/navigation.js
96
+ export const usePathname = () => "/";
97
+ export const useRouter = () => ({
98
+ push() {}, replace() {}, back() {}, forward() {}, refresh() {}, prefetch() {},
99
+ });
100
+ export const useSearchParams = () => new URLSearchParams();
25
101
  ```
26
102
 
103
+ Plain Node ESM import is not supported.
104
+
27
105
  ## Setup
28
106
 
29
107
  ### 1. Tailwind Preset
@@ -38,7 +116,9 @@ export default {
38
116
  presets: [uiPreset],
39
117
  content: [
40
118
  "./src/**/*.{ts,tsx}",
41
- // The preset auto-includes @vllnt/ui content paths
119
+ // Required: Tailwind 3 ignores a preset's `content` once your config sets
120
+ // its own, so list the package's compiled components here.
121
+ "./node_modules/@vllnt/ui/dist/**/*.js",
42
122
  ],
43
123
  };
44
124
  ```
@@ -60,6 +140,8 @@ import "@vllnt/ui/styles.css";
60
140
 
61
141
  This imports Tailwind base/components/utilities + default theme variables + safe-area utilities.
62
142
 
143
+ If TypeScript reports TS2882 for this import (newer versions check side-effect imports), add `declare module "*.css";` to a `.d.ts` file in your app.
144
+
63
145
  ### 3. Use Components
64
146
 
65
147
  ```tsx
@@ -84,6 +166,7 @@ export function Example() {
84
166
  | `@vllnt/ui/styles.css` | Full styles (Tailwind base + theme variables + utilities) |
85
167
  | `@vllnt/ui/themes/default.css` | Theme CSS variables only (no Tailwind base) |
86
168
  | `@vllnt/ui/themes/presets.css` | Built-in color presets (applied via `data-theme`) |
169
+ | `@vllnt/ui/themes/products.css` | Product themes `maia` and `paas` (generated; applied via `data-theme`) |
87
170
 
88
171
  ## Theming
89
172
 
@@ -106,7 +189,7 @@ All colors are **OKLCH channel** CSS variables (`L C H`), consumed as
106
189
  --destructive: 0.55 0.2078 25.326;
107
190
  --destructive-foreground: 0.9848 0 0;
108
191
  --border: 0.9219 0 0;
109
- --input: 0.66 0 0;
192
+ --input: 0.6167 0 0;
110
193
  --ring: 0.1445 0 0;
111
194
  --radius: 0.5rem;
112
195
  --card: 1 0 0;
@@ -133,6 +216,35 @@ at runtime with `<ThemeSwitcher />` (or `setThemePreset` / `useThemePreset`),
133
216
  which set `data-theme` on the document root. Render `<ThemePresetProvider />`
134
217
  once near the root to restore the saved preset before paint.
135
218
 
219
+ ### Product themes
220
+
221
+ `@vllnt/ui/themes/products.css` adds two full product themes, generated from
222
+ `packages/design/tokens.json`. Import it after `styles.css`, set
223
+ `data-theme="maia"` or `data-theme="paas"` on `<html>`, and keep using the
224
+ `dark` class for dark mode:
225
+
226
+ ```html
227
+ <html data-theme="maia" class="dark">
228
+ ```
229
+
230
+ - `maia` (Ink): no accent; `--primary` is the ink colour (pure black `#000000`
231
+ in light on purpose, while core keeps `#171717`; white in dark). Core Inter
232
+ plus JetBrains Mono, weights 400 to 600, tighter type
233
+ scale and radius. Its Label step is capitals in the design: add `uppercase`
234
+ where you use it.
235
+ - `paas`: core neutrals and status tones in JetBrains Mono. Dark is the design
236
+ default; light works too.
237
+
238
+ The package does not ship fonts. Core puts Inter (sans) and JetBrains Mono
239
+ (mono) first, then the system stacks. Load Inter and JetBrains Mono (core, Maia
240
+ and PaaS) in your app, for example with `next/font` or a font `<link>`; without
241
+ them each stack falls back to the system font stack (`system-ui` for core sans
242
+ and Maia, `ui-monospace` for core mono and PaaS).
243
+
244
+ Both define `success`, `warning`, `info`, `diff-added` and `diff-removed` roles
245
+ (the core theme defines them as well). Web `--radius` carries the theme's
246
+ `md` step only; the other radius steps ship in the `@vllnt/ui-core` outputs.
247
+
136
248
  To design and export your own theme, use the visual editor at
137
249
  [`/themes`](https://ui.vllnt.com/themes) — it exports a CSS block, a
138
250
  `npx shadcn add` command, or design tokens.
@@ -436,10 +548,10 @@ import type {
436
548
 
437
549
  ## Requirements
438
550
 
439
- - React >= 18.0.0
440
- - Tailwind CSS >= 3.0.0
441
- - Next.js >= 14.0.0 (optional — only for `ThemeProvider`, `NavbarSaas`, `LangProvider`)
442
- - `next-themes` >= 0.4.0 (optional — only for `ThemeProvider`, `ThemeToggle`)
551
+ - React >= 19.0.0
552
+ - Tailwind CSS ^3.4.0 (`size-*`, `text-balance` and `has-[...]` utilities need 3.4; Tailwind 4 is not supported)
553
+ - `next-themes` >= 0.4.0 (required peer)
554
+ - Next.js >= 15.0.0 (optional peer, but the root entry imports `next/*`; see Peer Dependencies for the no-Next workaround). Next 14 only supports React 18.
443
555
 
444
556
  ## License
445
557
 
@@ -1,8 +1,22 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { createContext, use, useCallback, useMemo, useState } from "react";
3
+ import {
4
+ createContext,
5
+ use,
6
+ useCallback,
7
+ useId,
8
+ useMemo,
9
+ useState
10
+ } from "react";
4
11
  import { cn } from "../../../lib/utils.js";
5
12
  const AccordionContext = createContext(null);
13
+ function getPartId(baseId, part, value) {
14
+ const key = value.replaceAll(
15
+ /[^\dA-Za-z-]/g,
16
+ (character) => `_${(character.codePointAt(0) ?? 0).toString(16)}_`
17
+ );
18
+ return `${baseId}-${part}-${key}`;
19
+ }
6
20
  function useAccordionContext() {
7
21
  const context = use(AccordionContext);
8
22
  if (!context) {
@@ -16,6 +30,7 @@ function Accordion({
16
30
  defaultValue,
17
31
  type = "single"
18
32
  }) {
33
+ const baseId = useId();
19
34
  const [openItems, setOpenItems] = useState(() => {
20
35
  if (!defaultValue) return /* @__PURE__ */ new Set();
21
36
  if (Array.isArray(defaultValue)) return new Set(defaultValue);
@@ -39,8 +54,8 @@ function Accordion({
39
54
  [type]
40
55
  );
41
56
  const contextValue = useMemo(
42
- () => ({ openItems, toggleItem, type }),
43
- [openItems, toggleItem, type]
57
+ () => ({ baseId, openItems, toggleItem, type }),
58
+ [baseId, openItems, toggleItem, type]
44
59
  );
45
60
  return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
46
61
  "div",
@@ -76,18 +91,20 @@ function AccordionTrigger({
76
91
  icon,
77
92
  value
78
93
  }) {
79
- const { openItems, toggleItem } = useAccordionContext();
94
+ const { baseId, openItems, toggleItem } = useAccordionContext();
80
95
  const isOpen = openItems.has(value);
81
96
  return /* @__PURE__ */ jsxs(
82
97
  "button",
83
98
  {
99
+ "aria-controls": getPartId(baseId, "content", value),
84
100
  "aria-expanded": isOpen,
85
101
  className: cn(
86
102
  "w-full flex items-center justify-between p-4 text-left font-medium transition-colors",
87
- "hover:bg-muted/50",
88
- isOpen && "bg-muted/30",
103
+ "hover:bg-secondary/50",
104
+ isOpen && "bg-secondary/30",
89
105
  className
90
106
  ),
107
+ id: getPartId(baseId, "trigger", value),
91
108
  onClick: () => {
92
109
  toggleItem(value);
93
110
  },
@@ -106,6 +123,7 @@ function AccordionTrigger({
106
123
  ) : /* @__PURE__ */ jsx(
107
124
  "svg",
108
125
  {
126
+ "aria-hidden": "true",
109
127
  className: cn(
110
128
  "size-4 flex-shrink-0 transition-transform duration-200",
111
129
  isOpen && "rotate-180"
@@ -133,15 +151,19 @@ function AccordionContent({
133
151
  className,
134
152
  value
135
153
  }) {
136
- const { openItems } = useAccordionContext();
154
+ const { baseId, openItems } = useAccordionContext();
137
155
  const isOpen = openItems.has(value);
138
156
  return /* @__PURE__ */ jsx(
139
157
  "div",
140
158
  {
159
+ "aria-labelledby": getPartId(baseId, "trigger", value),
141
160
  className: cn(
142
161
  "overflow-hidden transition-all duration-200",
143
162
  isOpen ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"
144
163
  ),
164
+ id: getPartId(baseId, "content", value),
165
+ inert: !isOpen,
166
+ role: "region",
145
167
  children: /* @__PURE__ */ jsx(
146
168
  "div",
147
169
  {
@@ -48,7 +48,14 @@ const DEFAULT_STATUS_ICON = {
48
48
  completed: /* @__PURE__ */ jsx(CheckCircle2, { "aria-hidden": "true", className: "size-4" }),
49
49
  error: /* @__PURE__ */ jsx(AlertTriangle, { "aria-hidden": "true", className: "size-4" }),
50
50
  pending: /* @__PURE__ */ jsx(Circle, { "aria-hidden": "true", className: "size-4" }),
51
- running: /* @__PURE__ */ jsx(Loader2, { "aria-hidden": "true", className: "size-4 animate-spin" }),
51
+ running: /* @__PURE__ */ jsx(
52
+ Loader2,
53
+ {
54
+ "aria-hidden": "true",
55
+ className: "size-4 animate-spin motion-reduce:[animation-duration:1.5s]",
56
+ "data-motion": "essential"
57
+ }
58
+ ),
52
59
  skipped: /* @__PURE__ */ jsx(MinusCircle, { "aria-hidden": "true", className: "size-4" })
53
60
  };
54
61
  const StepContext = createContext({ status: "pending" });
@@ -289,7 +296,7 @@ const AgentStepProgress = ({
289
296
  "aria-valuemax": 100,
290
297
  "aria-valuemin": 0,
291
298
  "aria-valuenow": clamped,
292
- className: cn("h-1.5 w-full rounded-full bg-muted", className),
299
+ className: cn("h-1.5 w-full rounded-full bg-secondary", className),
293
300
  ref,
294
301
  role: "progressbar",
295
302
  ...rest,
@@ -15,7 +15,7 @@ const AISourceCitation = ({
15
15
  "a",
16
16
  {
17
17
  className: cn(
18
- "group inline-flex max-w-full flex-col gap-2 rounded-xl border border-border/70 bg-background px-3 py-2 text-left shadow-sm transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
18
+ "group inline-flex max-w-full flex-col gap-2 rounded-xl border border-border/70 bg-background px-3 py-2 text-left shadow-sm transition-colors hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
19
19
  className
20
20
  ),
21
21
  href,
@@ -25,7 +25,7 @@ const AIStreamingText = ({
25
25
  "span",
26
26
  {
27
27
  "aria-hidden": "true",
28
- className: "ml-0.5 inline-block animate-pulse text-muted-foreground",
28
+ className: "ml-0.5 inline-block animate-pulse text-muted-foreground motion-reduce:animate-none",
29
29
  children: cursor
30
30
  }
31
31
  ) : null
@@ -10,7 +10,7 @@ const alertVariants = cva(
10
10
  variants: {
11
11
  variant: {
12
12
  default: "bg-background text-foreground",
13
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
13
+ destructive: "border-destructive/50 text-foreground dark:border-destructive [&>svg]:text-destructive"
14
14
  }
15
15
  }
16
16
  }