@vllnt/ui 0.2.1-canary.06f0e84 → 0.2.1-canary.0aaaad2

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 (146) hide show
  1. package/dist/components/accordion/accordion.js +2 -2
  2. package/dist/components/activity-heatmap/activity-heatmap.js +15 -13
  3. package/dist/components/activity-log/activity-log.js +5 -5
  4. package/dist/components/agent-activity/agent-activity.js +8 -8
  5. package/dist/components/ai-artifact/ai-artifact.js +8 -8
  6. package/dist/components/ai-chat-input/ai-chat-input.js +2 -2
  7. package/dist/components/ai-message-bubble/ai-message-bubble.js +1 -1
  8. package/dist/components/ai-sidebar/ai-sidebar.js +4 -4
  9. package/dist/components/ai-source-citation/ai-source-citation.js +2 -2
  10. package/dist/components/ai-tool-call-display/ai-tool-call-display.js +4 -4
  11. package/dist/components/animated-text/animated-text.js +1 -4
  12. package/dist/components/auto-reload/auto-reload.js +14 -4
  13. package/dist/components/avatar/avatar.js +1 -1
  14. package/dist/components/avatar-group/avatar-group.js +4 -4
  15. package/dist/components/banner/banner.js +3 -3
  16. package/dist/components/bottom-activity-strip/bottom-activity-strip.js +1 -1
  17. package/dist/components/breadcrumb/breadcrumb.js +33 -26
  18. package/dist/components/button/button.js +1 -1
  19. package/dist/components/calendar/calendar.js +6 -6
  20. package/dist/components/callout/callout.js +1 -1
  21. package/dist/components/candlestick-chart/candlestick-chart.js +1 -1
  22. package/dist/components/canvas-shell/canvas-foundation-demo.js +4 -4
  23. package/dist/components/carousel/carousel.js +4 -4
  24. package/dist/components/chat-dock-section/chat-dock-section.js +1 -1
  25. package/dist/components/checkbox/checkbox.js +2 -2
  26. package/dist/components/checklist/checklist.js +3 -3
  27. package/dist/components/chronological-timeline/chronological-timeline.js +6 -5
  28. package/dist/components/civilization-card/civilization-card.js +1 -1
  29. package/dist/components/code-block/code-block.js +2 -2
  30. package/dist/components/code-playground/code-playground.js +8 -7
  31. package/dist/components/combobox/combobox.js +2 -2
  32. package/dist/components/command/command.js +1 -1
  33. package/dist/components/comment-pin/comment-pin.js +1 -1
  34. package/dist/components/comparison/comparison.js +9 -9
  35. package/dist/components/completion-dialog/completion-dialog.js +1 -1
  36. package/dist/components/content-intro/content-intro.js +7 -6
  37. package/dist/components/context-menu/context-menu.js +4 -4
  38. package/dist/components/conversation-thread/conversation-thread.js +8 -8
  39. package/dist/components/cookie-consent/cookie-consent.js +1 -1
  40. package/dist/components/copy-button/copy-button.js +3 -3
  41. package/dist/components/countdown-timer/countdown-timer.js +8 -7
  42. package/dist/components/credit-badge/credit-badge.js +1 -7
  43. package/dist/components/curriculum/curriculum.js +10 -10
  44. package/dist/components/data-list/data-list.js +1 -1
  45. package/dist/components/data-table/data-table.js +5 -4
  46. package/dist/components/date-picker/date-picker.js +1 -1
  47. package/dist/components/dialog/dialog.js +1 -1
  48. package/dist/components/dropdown-menu/dropdown-menu.js +3 -3
  49. package/dist/components/empty-state/empty-state.js +3 -3
  50. package/dist/components/exercise/exercise.js +4 -4
  51. package/dist/components/faq/faq.js +2 -2
  52. package/dist/components/file-upload/file-upload.js +3 -3
  53. package/dist/components/filter-bar/filter-bar.js +2 -1
  54. package/dist/components/flashcard/flashcard.js +1 -1
  55. package/dist/components/floating-action-button/floating-action-button.js +1 -1
  56. package/dist/components/floating-toolbar/floating-toolbar.js +1 -1
  57. package/dist/components/flow-diagram/flow-controls.js +9 -9
  58. package/dist/components/flow-diagram/flow-error-boundary.js +2 -2
  59. package/dist/components/flow-diagram/flow-fullscreen.js +2 -2
  60. package/dist/components/gantt-chart/gantt-chart.js +15 -13
  61. package/dist/components/handoff-beacon/handoff-beacon.js +1 -1
  62. package/dist/components/historic-timeline/historic-timeline.js +2 -2
  63. package/dist/components/historical-figure-card/historical-figure-card.js +4 -7
  64. package/dist/components/horizontal-scroll-row/horizontal-scroll-row.js +4 -4
  65. package/dist/components/input-otp/input-otp.js +1 -1
  66. package/dist/components/interactive-timeline/interactive-timeline.js +4 -4
  67. package/dist/components/jarvis-dock/jarvis-dock.js +2 -2
  68. package/dist/components/key-concept/key-concept.js +4 -4
  69. package/dist/components/keyboard-shortcuts-help/keyboard-shortcuts-help.js +2 -2
  70. package/dist/components/knowledge-check/knowledge-check.js +3 -3
  71. package/dist/components/learning-objectives/learning-objectives.js +12 -12
  72. package/dist/components/live-feed/live-feed.js +15 -13
  73. package/dist/components/map-2d/map-2d.js +2 -2
  74. package/dist/components/market-treemap/market-treemap.js +1 -1
  75. package/dist/components/mdx-content/mdx-content.js +2 -1
  76. package/dist/components/menubar/menubar.js +4 -4
  77. package/dist/components/metric-cluster/metric-cluster.js +1 -1
  78. package/dist/components/metric-gauge/metric-gauge.js +1 -1
  79. package/dist/components/model-comparison/model-comparison.js +2 -2
  80. package/dist/components/model-selector/model-selector.js +2 -2
  81. package/dist/components/multi-select/multi-select.js +3 -3
  82. package/dist/components/navbar-saas/navbar-saas.js +3 -2
  83. package/dist/components/navigation-menu/navigation-menu.js +2 -2
  84. package/dist/components/newsletter-signup/newsletter-signup.js +3 -3
  85. package/dist/components/number-input/number-input.js +1 -1
  86. package/dist/components/number-ticker/number-ticker.js +11 -4
  87. package/dist/components/object-inspector/object-inspector.js +1 -1
  88. package/dist/components/parallel-timeline/parallel-timeline.js +2 -2
  89. package/dist/components/password-input/password-input.js +1 -1
  90. package/dist/components/plan-badge/plan-badge.js +1 -7
  91. package/dist/components/presence-stack/presence-stack.js +2 -2
  92. package/dist/components/presence-sync-indicator/presence-sync-indicator.js +1 -1
  93. package/dist/components/pricing-table/pricing-table.js +3 -3
  94. package/dist/components/pro-tip/pro-tip.js +6 -6
  95. package/dist/components/profile-section/profile-section.js +1 -1
  96. package/dist/components/progress-card/progress-card.js +4 -3
  97. package/dist/components/progress-tracker/progress-tracker.js +7 -5
  98. package/dist/components/prompt-templates/prompt-templates.js +2 -2
  99. package/dist/components/quiz/quiz.js +5 -5
  100. package/dist/components/radio-group/radio-group.js +2 -2
  101. package/dist/components/rating/rating.js +3 -3
  102. package/dist/components/resizable/resizable.js +1 -1
  103. package/dist/components/runtime-overview-panel/runtime-overview-panel.js +1 -1
  104. package/dist/components/scope-selector/scope-selector.js +7 -7
  105. package/dist/components/search-bar/search-bar.js +24 -2
  106. package/dist/components/search-dialog/search-dialog.js +1 -1
  107. package/dist/components/select/select.js +5 -5
  108. package/dist/components/selection-halo/selection-halo.js +1 -1
  109. package/dist/components/severity-badge/severity-badge.js +2 -2
  110. package/dist/components/sheet/sheet.js +1 -1
  111. package/dist/components/sidebar/sidebar.js +1 -1
  112. package/dist/components/sidebar-toggle/sidebar-toggle.js +2 -2
  113. package/dist/components/slider/slider.js +1 -1
  114. package/dist/components/slideshow/slideshow.js +12 -11
  115. package/dist/components/social-fab/social-fab.js +2 -1
  116. package/dist/components/sparkline-grid/sparkline-grid.js +1 -1
  117. package/dist/components/spinner/spinner.js +3 -3
  118. package/dist/components/stat-card/stat-card.js +3 -3
  119. package/dist/components/state-badge-overlay/state-badge-overlay.js +1 -1
  120. package/dist/components/status-board/status-board.js +1 -1
  121. package/dist/components/status-indicator/status-indicator.js +3 -3
  122. package/dist/components/step-by-step/step-by-step.js +8 -7
  123. package/dist/components/step-navigation/step-navigation.js +2 -2
  124. package/dist/components/stepper/stepper.js +3 -3
  125. package/dist/components/sticky-metric/sticky-metric.js +1 -1
  126. package/dist/components/subscription-card/subscription-card.js +1 -1
  127. package/dist/components/switch/switch.js +1 -1
  128. package/dist/components/table-of-contents-panel/table-of-contents-panel.js +5 -5
  129. package/dist/components/tags-input/tags-input.js +1 -1
  130. package/dist/components/terminal/terminal.js +48 -34
  131. package/dist/components/thinking-block/thinking-block.js +1 -1
  132. package/dist/components/ticker-tape/ticker-tape.js +3 -3
  133. package/dist/components/timeline/timeline.js +2 -2
  134. package/dist/components/tldr-section/tldr-section.js +2 -2
  135. package/dist/components/tour/tour.js +1 -1
  136. package/dist/components/transaction-list/transaction-list.js +30 -9
  137. package/dist/components/tree-view/tree-view.js +2 -2
  138. package/dist/components/tutorial-complete/tutorial-complete.js +8 -8
  139. package/dist/components/usage-breakdown/usage-breakdown.js +9 -5
  140. package/dist/components/video-embed/video-embed.js +2 -2
  141. package/dist/components/viewport-bookmarks/viewport-bookmarks.js +1 -1
  142. package/dist/components/wallet-card/wallet-card.js +1 -1
  143. package/dist/components/watchlist/watchlist.js +5 -5
  144. package/dist/components/world-clock-bar/world-clock-bar.js +32 -12
  145. package/dist/index.d.ts +1 -1
  146. package/package.json +1 -1
@@ -64,7 +64,7 @@ function SubscriptionDetails({
64
64
  /* @__PURE__ */ jsx("p", { className: "text-xs uppercase tracking-[0.18em] text-muted-foreground", children: "Monthly total" }),
65
65
  /* @__PURE__ */ jsx("p", { className: "mt-2 text-3xl font-semibold tracking-tight", children: priceLabel })
66
66
  ] }),
67
- /* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-4", children: [
67
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border/70 bg-muted/20 p-4", children: [
68
68
  /* @__PURE__ */ jsx(DetailRow, { label: "Renewal", value: renewalLabel }),
69
69
  seatsLabel ? /* @__PURE__ */ jsx(DetailRow, { label: "Seats", value: seatsLabel }) : null,
70
70
  usageLabel ? /* @__PURE__ */ jsx(DetailRow, { label: "Usage", value: usageLabel }) : null
@@ -16,7 +16,7 @@ const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
16
16
  SwitchPrimitives.Thumb,
17
17
  {
18
18
  className: cn(
19
- "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
19
+ "pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
20
20
  )
21
21
  }
22
22
  )
@@ -73,14 +73,14 @@ function TableOfContentsPanelImpl({
73
73
  "button",
74
74
  {
75
75
  "aria-label": "Close table of contents",
76
- className: "flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",
76
+ className: "flex size-8 items-center justify-center rounded-md hover:bg-muted",
77
77
  onClick: onClose,
78
78
  ref: closeButtonRef,
79
79
  type: "button",
80
80
  children: closeIcon ?? /* @__PURE__ */ jsx(
81
81
  "svg",
82
82
  {
83
- className: "h-5 w-5",
83
+ className: "size-5",
84
84
  fill: "none",
85
85
  stroke: "currentColor",
86
86
  viewBox: "0 0 24 24",
@@ -143,13 +143,13 @@ function TableOfContentsPanelImpl({
143
143
  "span",
144
144
  {
145
145
  className: cn(
146
- "flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",
146
+ "flex size-5 shrink-0 items-center justify-center rounded-full border",
147
147
  isCompleted ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground"
148
148
  ),
149
149
  children: isCompleted ? /* @__PURE__ */ jsx(
150
150
  "svg",
151
151
  {
152
- className: "h-3 w-3",
152
+ className: "size-3",
153
153
  fill: "none",
154
154
  stroke: "currentColor",
155
155
  viewBox: "0 0 24 24",
@@ -175,7 +175,7 @@ function TableOfContentsPanelImpl({
175
175
  )
176
176
  ]
177
177
  }
178
- ) }, `${section.id}-${index}`);
178
+ ) }, section.id);
179
179
  }) })
180
180
  }
181
181
  ),
@@ -103,7 +103,7 @@ function TagList({ disabled, onRemove, tags }) {
103
103
  onRemove(tag);
104
104
  },
105
105
  type: "button",
106
- children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
106
+ children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
107
107
  }
108
108
  )
109
109
  ]
@@ -20,35 +20,42 @@ function Terminal({
20
20
  return /* @__PURE__ */ jsxs("div", { className: "my-6 rounded-lg border bg-zinc-950 dark:bg-zinc-900 overflow-hidden", children: [
21
21
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2 bg-zinc-900 dark:bg-zinc-800 border-b border-zinc-800", children: [
22
22
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
23
- /* @__PURE__ */ jsx(TerminalIcon, { className: "h-4 w-4 text-zinc-400" }),
23
+ /* @__PURE__ */ jsx(TerminalIcon, { className: "size-4 text-zinc-400" }),
24
24
  /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-zinc-300", children: title })
25
25
  ] }),
26
26
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
27
- /* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-red-500" }),
28
- /* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-yellow-500" }),
29
- /* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-green-500" })
27
+ /* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-red-500" }),
28
+ /* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-yellow-500" }),
29
+ /* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-green-500" })
30
30
  ] })
31
31
  ] }),
32
32
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
33
- /* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-start", children: [
34
- line.type === "command" && /* @__PURE__ */ jsxs(Fragment, { children: [
35
- /* @__PURE__ */ jsx("span", { className: "text-green-400 mr-2 select-none", children: "$" }),
36
- /* @__PURE__ */ jsx("span", { className: "text-zinc-100", children: line.content })
37
- ] }),
38
- line.type === "output" && /* @__PURE__ */ jsx("span", { className: "text-zinc-400", children: line.content }),
39
- line.type === "comment" && /* @__PURE__ */ jsxs("span", { className: "text-zinc-600 italic", children: [
40
- "# ",
41
- line.content
42
- ] })
43
- ] }, index)) }),
33
+ /* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line) => /* @__PURE__ */ jsxs(
34
+ "div",
35
+ {
36
+ className: "flex items-start",
37
+ children: [
38
+ line.type === "command" && /* @__PURE__ */ jsxs(Fragment, { children: [
39
+ /* @__PURE__ */ jsx("span", { className: "text-green-400 mr-2 select-none", children: "$" }),
40
+ /* @__PURE__ */ jsx("span", { className: "text-zinc-100", children: line.content })
41
+ ] }),
42
+ line.type === "output" && /* @__PURE__ */ jsx("span", { className: "text-zinc-400", children: line.content }),
43
+ line.type === "comment" && /* @__PURE__ */ jsxs("span", { className: "text-zinc-600 italic", children: [
44
+ "# ",
45
+ line.content
46
+ ] })
47
+ ]
48
+ },
49
+ `${line.type}-${line.content}`
50
+ )) }),
44
51
  copyable && commands.length > 0 ? /* @__PURE__ */ jsx(
45
52
  Button,
46
53
  {
47
- className: "absolute top-2 right-2 h-8 w-8 bg-zinc-800 hover:bg-zinc-700 text-zinc-300",
54
+ className: "absolute top-2 right-2 size-8 bg-zinc-800 hover:bg-zinc-700 text-zinc-300",
48
55
  onClick: handleCopy,
49
56
  size: "icon",
50
57
  variant: "ghost",
51
- children: copied ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3 w-3" })
58
+ children: copied ? /* @__PURE__ */ jsx(Check, { className: "size-3" }) : /* @__PURE__ */ jsx(Copy, { className: "size-3" })
52
59
  }
53
60
  ) : null
54
61
  ] })
@@ -79,35 +86,42 @@ function SimpleTerminal({
79
86
  return /* @__PURE__ */ jsxs("div", { className: "my-6 rounded-lg border bg-zinc-950 dark:bg-zinc-900 overflow-hidden", children: [
80
87
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2 bg-zinc-900 dark:bg-zinc-800 border-b border-zinc-800", children: [
81
88
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
82
- /* @__PURE__ */ jsx(TerminalIcon, { className: "h-4 w-4 text-zinc-400" }),
89
+ /* @__PURE__ */ jsx(TerminalIcon, { className: "size-4 text-zinc-400" }),
83
90
  /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-zinc-300", children: title })
84
91
  ] }),
85
92
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
86
- /* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-red-500" }),
87
- /* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-yellow-500" }),
88
- /* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-green-500" })
93
+ /* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-red-500" }),
94
+ /* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-yellow-500" }),
95
+ /* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-green-500" })
89
96
  ] })
90
97
  ] }),
91
98
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
92
- /* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-start", children: [
93
- line.type === "command" && /* @__PURE__ */ jsxs(Fragment, { children: [
94
- /* @__PURE__ */ jsx("span", { className: "text-green-400 mr-2 select-none", children: "$" }),
95
- /* @__PURE__ */ jsx("span", { className: "text-zinc-100", children: line.content })
96
- ] }),
97
- line.type === "output" && /* @__PURE__ */ jsx("span", { className: "text-zinc-400", children: line.content }),
98
- line.type === "comment" && /* @__PURE__ */ jsxs("span", { className: "text-zinc-600 italic", children: [
99
- "# ",
100
- line.content
101
- ] })
102
- ] }, index)) }),
99
+ /* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line) => /* @__PURE__ */ jsxs(
100
+ "div",
101
+ {
102
+ className: "flex items-start",
103
+ children: [
104
+ line.type === "command" && /* @__PURE__ */ jsxs(Fragment, { children: [
105
+ /* @__PURE__ */ jsx("span", { className: "text-green-400 mr-2 select-none", children: "$" }),
106
+ /* @__PURE__ */ jsx("span", { className: "text-zinc-100", children: line.content })
107
+ ] }),
108
+ line.type === "output" && /* @__PURE__ */ jsx("span", { className: "text-zinc-400", children: line.content }),
109
+ line.type === "comment" && /* @__PURE__ */ jsxs("span", { className: "text-zinc-600 italic", children: [
110
+ "# ",
111
+ line.content
112
+ ] })
113
+ ]
114
+ },
115
+ `${line.type}-${line.content}`
116
+ )) }),
103
117
  commands.length > 0 && /* @__PURE__ */ jsx(
104
118
  Button,
105
119
  {
106
- className: "absolute top-2 right-2 h-8 w-8 bg-zinc-800 hover:bg-zinc-700 text-zinc-300",
120
+ className: "absolute top-2 right-2 size-8 bg-zinc-800 hover:bg-zinc-700 text-zinc-300",
107
121
  onClick: handleCopy,
108
122
  size: "icon",
109
123
  variant: "ghost",
110
- children: copied ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3 w-3" })
124
+ children: copied ? /* @__PURE__ */ jsx(Check, { className: "size-3" }) : /* @__PURE__ */ jsx(Copy, { className: "size-3" })
111
125
  }
112
126
  )
113
127
  ] })
@@ -30,7 +30,7 @@ function ThinkingBlock({
30
30
  onClick: toggleExpanded,
31
31
  type: "button",
32
32
  children: [
33
- isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3" }),
33
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3" }),
34
34
  /* @__PURE__ */ jsxs("span", { children: [
35
35
  "Thinking",
36
36
  isStreaming ? /* @__PURE__ */ jsx("span", { className: "ml-1 animate-pulse", children: "..." }) : null
@@ -22,7 +22,7 @@ function formatChange(change) {
22
22
  return `${sign}${change.toFixed(2)}%`;
23
23
  }
24
24
  function TickerTapeRow({ items }) {
25
- return /* @__PURE__ */ jsx("div", { className: "flex min-w-max items-center gap-3 px-3 py-3", children: items.map((item) => {
25
+ return /* @__PURE__ */ jsx("div", { className: "flex min-w-max items-center gap-3 p-3", children: items.map((item) => {
26
26
  const isPositive = item.change >= 0;
27
27
  const TrendIcon = isPositive ? ArrowUpRight : ArrowDownRight;
28
28
  return /* @__PURE__ */ jsxs(
@@ -43,13 +43,13 @@ function TickerTapeRow({ items }) {
43
43
  ),
44
44
  variant: "outline",
45
45
  children: [
46
- /* @__PURE__ */ jsx(TrendIcon, { className: "h-3 w-3" }),
46
+ /* @__PURE__ */ jsx(TrendIcon, { className: "size-3" }),
47
47
  formatChange(item.change)
48
48
  ]
49
49
  }
50
50
  ),
51
51
  item.volume ? /* @__PURE__ */ jsxs("span", { className: "hidden items-center text-xs text-muted-foreground sm:inline-flex", children: [
52
- /* @__PURE__ */ jsx(Dot, { className: "h-3.5 w-3.5" }),
52
+ /* @__PURE__ */ jsx(Dot, { className: "size-3.5" }),
53
53
  item.volume
54
54
  ] }) : null
55
55
  ]
@@ -102,7 +102,7 @@ function Marker({ color, icon, status }) {
102
102
  {
103
103
  "aria-hidden": "true",
104
104
  className: cn(
105
- "relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2 bg-background text-[10px]",
105
+ "relative z-10 flex size-6 shrink-0 items-center justify-center rounded-full border-2 bg-background text-[10px]",
106
106
  borderClass
107
107
  ),
108
108
  children: icon ? /* @__PURE__ */ jsx(
@@ -118,7 +118,7 @@ function Marker({ color, icon, status }) {
118
118
  "span",
119
119
  {
120
120
  className: cn(
121
- "h-2.5 w-2.5 rounded-full",
121
+ "size-2.5 rounded-full",
122
122
  override ? fillClass : palette.markerFill
123
123
  )
124
124
  }
@@ -48,7 +48,7 @@ function TLDRSection({ children, label }) {
48
48
  /* @__PURE__ */ jsx(
49
49
  "svg",
50
50
  {
51
- className: "w-5 h-5 text-muted-foreground",
51
+ className: "size-5 text-muted-foreground",
52
52
  fill: "none",
53
53
  stroke: "currentColor",
54
54
  strokeWidth: "2",
@@ -69,7 +69,7 @@ function TLDRSection({ children, label }) {
69
69
  /* @__PURE__ */ jsx(
70
70
  "svg",
71
71
  {
72
- className: `w-4 h-4 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`,
72
+ className: `size-4 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`,
73
73
  fill: "none",
74
74
  stroke: "currentColor",
75
75
  strokeWidth: "2",
@@ -60,7 +60,7 @@ function TourFooter({
60
60
  {
61
61
  "aria-label": `Go to ${step.title}`,
62
62
  className: cn(
63
- "h-2.5 w-2.5 rounded-full transition-colors",
63
+ "size-2.5 rounded-full transition-colors",
64
64
  index === currentStep ? "bg-primary" : "bg-muted-foreground/30"
65
65
  ),
66
66
  onClick: () => {
@@ -7,6 +7,32 @@ import { Badge } from "../badge/badge";
7
7
  const CENTS_PER_UNIT = 100;
8
8
  const DEFAULT_LOCALE = "en-US";
9
9
  const DEFAULT_CURRENCY = "USD";
10
+ const CURRENCY_FORMATTER_CACHE = /* @__PURE__ */ new Map();
11
+ function getCurrencyFormatter(locale, currency) {
12
+ const key = `${locale}|${currency}`;
13
+ let formatter = CURRENCY_FORMATTER_CACHE.get(key);
14
+ if (!formatter) {
15
+ formatter = new Intl.NumberFormat(locale, {
16
+ currency,
17
+ style: "currency"
18
+ });
19
+ CURRENCY_FORMATTER_CACHE.set(key, formatter);
20
+ }
21
+ return formatter;
22
+ }
23
+ const DATE_FORMATTER_CACHE = /* @__PURE__ */ new Map();
24
+ function getTransactionDateFormatter(locale) {
25
+ let formatter = DATE_FORMATTER_CACHE.get(locale);
26
+ if (!formatter) {
27
+ formatter = new Intl.DateTimeFormat(locale, {
28
+ day: "numeric",
29
+ month: "short",
30
+ year: "numeric"
31
+ });
32
+ DATE_FORMATTER_CACHE.set(locale, formatter);
33
+ }
34
+ return formatter;
35
+ }
10
36
  const DEFAULT_LABELS = {
11
37
  active: "Active",
12
38
  canceled: "Canceled",
@@ -44,17 +70,12 @@ const INTERVAL_LABEL = {
44
70
  };
45
71
  function formatTransactionAmount(amountCents, options = {}) {
46
72
  const { currency = DEFAULT_CURRENCY, locale = DEFAULT_LOCALE } = options;
47
- return new Intl.NumberFormat(locale, {
48
- currency,
49
- style: "currency"
50
- }).format(amountCents / CENTS_PER_UNIT);
73
+ return getCurrencyFormatter(locale, currency).format(
74
+ amountCents / CENTS_PER_UNIT
75
+ );
51
76
  }
52
77
  function formatTransactionDate(timestamp, locale = DEFAULT_LOCALE) {
53
- return new Intl.DateTimeFormat(locale, {
54
- day: "numeric",
55
- month: "short",
56
- year: "numeric"
57
- }).format(new Date(timestamp));
78
+ return getTransactionDateFormatter(locale).format(new Date(timestamp));
58
79
  }
59
80
  const TransactionListBase = forwardRef(
60
81
  (props, ref) => {
@@ -92,14 +92,14 @@ function TreeRow({
92
92
  {
93
93
  "aria-hidden": "true",
94
94
  className: cn(
95
- "inline-flex h-4 w-4 shrink-0 items-center justify-center text-xs text-muted-foreground transition-transform",
95
+ "inline-flex size-4 shrink-0 items-center justify-center text-xs text-muted-foreground transition-transform",
96
96
  hasChildren ? "" : "opacity-0",
97
97
  expanded ? "rotate-90" : ""
98
98
  ),
99
99
  children: "\u25B8"
100
100
  }
101
101
  ),
102
- node.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "inline-flex h-4 w-4 shrink-0", children: node.icon }) : null,
102
+ node.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "inline-flex size-4 shrink-0", children: node.icon }) : null,
103
103
  /* @__PURE__ */ jsx("span", { className: "truncate", children: node.label })
104
104
  ]
105
105
  }
@@ -32,11 +32,11 @@ function TutorialCompleteImpl({
32
32
  /* @__PURE__ */ jsx(
33
33
  "div",
34
34
  {
35
- className: `inline-flex items-center justify-center w-20 h-20 rounded-full mb-6 ${isFullyComplete ? "bg-green-100 dark:bg-green-900/30" : "bg-muted"}`,
35
+ className: `inline-flex items-center justify-center size-20 rounded-full mb-6 ${isFullyComplete ? "bg-green-100 dark:bg-green-900/30" : "bg-muted"}`,
36
36
  children: /* @__PURE__ */ jsx(
37
37
  Check,
38
38
  {
39
- className: `h-10 w-10 ${isFullyComplete ? "text-green-600 dark:text-green-400" : "text-muted-foreground"}`
39
+ className: `size-10 ${isFullyComplete ? "text-green-600 dark:text-green-400" : "text-muted-foreground"}`
40
40
  }
41
41
  )
42
42
  }
@@ -44,7 +44,7 @@ function TutorialCompleteImpl({
44
44
  /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold mb-2", children: isFullyComplete ? labels.tutorialComplete : labels.tutorialFinished }),
45
45
  /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-6", children: isFullyComplete ? `${labels.youveCompletedAll} "${title}"` : `${labels.youveFinishedWith} "${title}" (${completionPercent}%)` }),
46
46
  /* @__PURE__ */ jsxs(Button, { className: "gap-2", onClick: onRestart, variant: "outline", children: [
47
- /* @__PURE__ */ jsx(RotateCcw, { className: "h-4 w-4" }),
47
+ /* @__PURE__ */ jsx(RotateCcw, { className: "size-4" }),
48
48
  labels.startOver
49
49
  ] })
50
50
  ] }),
@@ -64,15 +64,15 @@ function TutorialCompleteImpl({
64
64
  /* @__PURE__ */ jsx(
65
65
  "div",
66
66
  {
67
- className: `flex-shrink-0 w-5 h-5 rounded-full border-2 flex items-center justify-center ${isCompleted ? "bg-foreground border-foreground" : "border-muted-foreground"}`,
68
- children: isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-background" }) : null
67
+ className: `flex-shrink-0 size-5 rounded-full border-2 flex items-center justify-center ${isCompleted ? "bg-foreground border-foreground" : "border-muted-foreground"}`,
68
+ children: isCompleted ? /* @__PURE__ */ jsx(Check, { className: "size-3 text-background" }) : null
69
69
  }
70
70
  ),
71
71
  /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: section.title }),
72
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
72
+ /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-muted-foreground" })
73
73
  ]
74
74
  },
75
- `${section.id}-${index}`
75
+ section.id
76
76
  );
77
77
  }) })
78
78
  ] }),
@@ -86,7 +86,7 @@ function TutorialCompleteImpl({
86
86
  children: [
87
87
  /* @__PURE__ */ jsx("span", { className: "text-xs uppercase text-muted-foreground font-medium", children: item.type }),
88
88
  /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: item.title }),
89
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
89
+ /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-muted-foreground" })
90
90
  ]
91
91
  },
92
92
  item.href
@@ -21,10 +21,14 @@ function formatPercent(value) {
21
21
  if (!Number.isFinite(value)) return "0%";
22
22
  return `${Math.round(value)}%`;
23
23
  }
24
+ const LARGE_VALUE_FORMATTER = new Intl.NumberFormat("en-US", {
25
+ maximumFractionDigits: 0
26
+ });
27
+ const SMALL_VALUE_FORMATTER = new Intl.NumberFormat("en-US", {
28
+ maximumFractionDigits: 1
29
+ });
24
30
  function formatValue(value) {
25
- return new Intl.NumberFormat("en-US", {
26
- maximumFractionDigits: value >= 100 ? 0 : 1
27
- }).format(value);
31
+ return value >= 100 ? LARGE_VALUE_FORMATTER.format(value) : SMALL_VALUE_FORMATTER.format(value);
28
32
  }
29
33
  function getRelativeWidth(value, maxValue) {
30
34
  if (maxValue <= 0) return 0;
@@ -39,7 +43,7 @@ function UsageBreakdownTrend({ item }) {
39
43
  const trendTone = item.tone ?? "default";
40
44
  const TrendIcon = item.trend.direction === "down" ? ArrowDownRight : ArrowUpRight;
41
45
  return /* @__PURE__ */ jsxs(Badge, { className: cn("gap-1 border", toneClasses[trendTone]), children: [
42
- /* @__PURE__ */ jsx(TrendIcon, { className: "h-3.5 w-3.5" }),
46
+ /* @__PURE__ */ jsx(TrendIcon, { className: "size-3.5" }),
43
47
  item.trend.label
44
48
  ] });
45
49
  }
@@ -69,7 +73,7 @@ function UsageBreakdownRow({
69
73
  totalValue
70
74
  }) {
71
75
  return /* @__PURE__ */ jsx("li", { className: "rounded-lg border bg-background/70 p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
72
- /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-md border bg-muted text-sm font-semibold text-muted-foreground", children: item.icon ?? rank }),
76
+ /* @__PURE__ */ jsx("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border bg-muted text-sm font-semibold text-muted-foreground", children: item.icon ?? rank }),
73
77
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-3", children: [
74
78
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between", children: [
75
79
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-1", children: [
@@ -60,14 +60,14 @@ function VideoEmbed({
60
60
  src: thumbnail
61
61
  }
62
62
  ) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-br from-muted to-muted-foreground/20" }),
63
- /* @__PURE__ */ jsx("div", { className: "relative z-10 flex h-16 w-16 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform group-hover:scale-110", children: /* @__PURE__ */ jsx(Play, { className: "h-6 w-6 ml-1" }) })
63
+ /* @__PURE__ */ jsx("div", { className: "relative z-10 flex size-16 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform group-hover:scale-110", children: /* @__PURE__ */ jsx(Play, { className: "size-6 ml-1" }) })
64
64
  ]
65
65
  }
66
66
  )
67
67
  }
68
68
  ),
69
69
  /* @__PURE__ */ jsxs("p", { className: "mt-2 text-sm text-center text-muted-foreground flex items-center justify-center gap-1", children: [
70
- /* @__PURE__ */ jsx(Video, { className: "h-4 w-4" }),
70
+ /* @__PURE__ */ jsx(Video, { className: "size-4" }),
71
71
  title
72
72
  ] })
73
73
  ] });
@@ -50,7 +50,7 @@ const RowBody = (props) => {
50
50
  "span",
51
51
  {
52
52
  "aria-hidden": "true",
53
- className: "h-1.5 w-1.5 rounded-full",
53
+ className: "size-1.5 rounded-full",
54
54
  style: { backgroundColor: bookmark.color ?? "hsl(var(--foreground))" }
55
55
  }
56
56
  ),
@@ -31,7 +31,7 @@ function WalletDetails({
31
31
  /* @__PURE__ */ jsx("p", { className: "text-xs uppercase tracking-[0.18em] text-muted-foreground", children: "Current balance" }),
32
32
  /* @__PURE__ */ jsx("p", { className: "mt-2 text-3xl font-semibold tracking-tight", children: balanceLabel })
33
33
  ] }),
34
- /* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-4", children: [
34
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border/70 bg-muted/20 p-4", children: [
35
35
  availableLabel ? /* @__PURE__ */ jsx(DetailRow, { label: "Available now", value: availableLabel }) : null,
36
36
  pendingLabel ? /* @__PURE__ */ jsx(DetailRow, { label: "Pending", value: pendingLabel }) : null,
37
37
  renewsLabel ? /* @__PURE__ */ jsx(DetailRow, { label: "Refresh", value: renewsLabel }) : null
@@ -21,13 +21,13 @@ function WatchlistRow({ item }) {
21
21
  {
22
22
  "aria-hidden": "true",
23
23
  className: cn(
24
- "flex h-7 w-7 items-center justify-center rounded-full border",
24
+ "flex size-7 items-center justify-center rounded-full border",
25
25
  item.starred ? "border-amber-400/40 bg-amber-400/10 text-amber-500" : "border-border bg-background text-muted-foreground"
26
26
  ),
27
27
  children: /* @__PURE__ */ jsx(
28
28
  Star,
29
29
  {
30
- className: cn("h-3.5 w-3.5", item.starred && "fill-current"),
30
+ className: cn("size-3.5", item.starred && "fill-current"),
31
31
  strokeWidth: 1.75
32
32
  }
33
33
  )
@@ -49,7 +49,7 @@ function WatchlistRow({ item }) {
49
49
  isPositive ? "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "border-rose-500/30 bg-rose-500/10 text-rose-600 dark:text-rose-400"
50
50
  ),
51
51
  children: [
52
- /* @__PURE__ */ jsx(TrendIcon, { className: "h-3 w-3" }),
52
+ /* @__PURE__ */ jsx(TrendIcon, { className: "size-3" }),
53
53
  formatChange(item.change)
54
54
  ]
55
55
  }
@@ -87,12 +87,12 @@ const Watchlist = React.forwardRef(
87
87
  ] }),
88
88
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
89
89
  /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border border-emerald-500/30 bg-emerald-500/10 px-2 py-1 text-emerald-600 dark:text-emerald-400", children: [
90
- /* @__PURE__ */ jsx(ArrowUpRight, { className: "h-3 w-3" }),
90
+ /* @__PURE__ */ jsx(ArrowUpRight, { className: "size-3" }),
91
91
  advancing,
92
92
  " up"
93
93
  ] }),
94
94
  /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border border-rose-500/30 bg-rose-500/10 px-2 py-1 text-rose-600 dark:text-rose-400", children: [
95
- /* @__PURE__ */ jsx(ArrowDownRight, { className: "h-3 w-3" }),
95
+ /* @__PURE__ */ jsx(ArrowDownRight, { className: "size-3" }),
96
96
  declining,
97
97
  " down"
98
98
  ] })
@@ -29,20 +29,40 @@ function useLiveDate(now, updateIntervalMs) {
29
29
  }, [fixedNow, updateIntervalMs]);
30
30
  return liveNow;
31
31
  }
32
+ const TIME_FORMATTER_CACHE = /* @__PURE__ */ new Map();
33
+ function getTimeFormatter(locale, timeZone) {
34
+ const key = `${locale}|${timeZone}`;
35
+ let formatter = TIME_FORMATTER_CACHE.get(key);
36
+ if (!formatter) {
37
+ formatter = new Intl.DateTimeFormat(locale, {
38
+ hour: "numeric",
39
+ minute: "2-digit",
40
+ timeZone,
41
+ timeZoneName: "short"
42
+ });
43
+ TIME_FORMATTER_CACHE.set(key, formatter);
44
+ }
45
+ return formatter;
46
+ }
47
+ const DATE_FORMATTER_CACHE = /* @__PURE__ */ new Map();
48
+ function getDateFormatter(locale, timeZone) {
49
+ const key = `${locale}|${timeZone}`;
50
+ let formatter = DATE_FORMATTER_CACHE.get(key);
51
+ if (!formatter) {
52
+ formatter = new Intl.DateTimeFormat(locale, {
53
+ day: "numeric",
54
+ month: "short",
55
+ timeZone,
56
+ weekday: "short"
57
+ });
58
+ DATE_FORMATTER_CACHE.set(key, formatter);
59
+ }
60
+ return formatter;
61
+ }
32
62
  function formatZoneDateTime(zone, date, showDate) {
33
63
  const locale = zone.locale ?? "en-US";
34
- const timeFormatter = new Intl.DateTimeFormat(locale, {
35
- hour: "numeric",
36
- minute: "2-digit",
37
- timeZone: zone.timeZone,
38
- timeZoneName: "short"
39
- });
40
- const dateFormatter = new Intl.DateTimeFormat(locale, {
41
- day: "numeric",
42
- month: "short",
43
- timeZone: zone.timeZone,
44
- weekday: "short"
45
- });
64
+ const timeFormatter = getTimeFormatter(locale, zone.timeZone);
65
+ const dateFormatter = getDateFormatter(locale, zone.timeZone);
46
66
  return {
47
67
  date: showDate ? dateFormatter.format(date) : "",
48
68
  time: timeFormatter.format(date)
package/dist/index.d.ts CHANGED
@@ -4692,7 +4692,7 @@ type SearchBarProps = {
4692
4692
  onSearch?: (query: string) => void;
4693
4693
  placeholder?: string;
4694
4694
  };
4695
- declare function SearchBar({ className, onSearch, placeholder, }: SearchBarProps): react_jsx_runtime.JSX.Element;
4695
+ declare function SearchBar(props: SearchBarProps): react_jsx_runtime.JSX.Element;
4696
4696
 
4697
4697
  type ScopeSelectorNode = {
4698
4698
  badge?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vllnt/ui",
3
- "version": "0.2.1-canary.06f0e84",
3
+ "version": "0.2.1-canary.0aaaad2",
4
4
  "description": "React component library — 225 components built on Radix UI, Tailwind CSS, and CVA",
5
5
  "license": "MIT",
6
6
  "author": "vllnt",