@sero-ai/ui 0.4.0 → 0.4.2

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 (332) hide show
  1. package/.turbo/turbo-build.log +628 -628
  2. package/.turbo/turbo-test.log +18 -0
  3. package/.turbo/turbo-typecheck.log +1 -1
  4. package/CHANGELOG.md +22 -2
  5. package/LICENSE +201 -0
  6. package/dist/components/ai-elements/agent.cjs +6 -6
  7. package/dist/components/ai-elements/agent.js +6 -6
  8. package/dist/components/ai-elements/artifact.cjs +2 -2
  9. package/dist/components/ai-elements/artifact.js +2 -2
  10. package/dist/components/ai-elements/attachments.cjs +2 -2
  11. package/dist/components/ai-elements/attachments.js +2 -2
  12. package/dist/components/ai-elements/chain-of-thought.cjs +2 -2
  13. package/dist/components/ai-elements/chain-of-thought.js +2 -2
  14. package/dist/components/ai-elements/code-block.cjs +7 -5
  15. package/dist/components/ai-elements/code-block.d.cts +2 -1
  16. package/dist/components/ai-elements/code-block.d.ts +2 -1
  17. package/dist/components/ai-elements/code-block.js +7 -5
  18. package/dist/components/ai-elements/commit.cjs +2 -2
  19. package/dist/components/ai-elements/commit.js +2 -2
  20. package/dist/components/ai-elements/confirmation.cjs +1 -1
  21. package/dist/components/ai-elements/confirmation.js +1 -1
  22. package/dist/components/ai-elements/conversation.cjs +2 -2
  23. package/dist/components/ai-elements/conversation.js +2 -2
  24. package/dist/components/ai-elements/environment-variables.cjs +3 -3
  25. package/dist/components/ai-elements/environment-variables.js +3 -3
  26. package/dist/components/ai-elements/file-tree.cjs +1 -1
  27. package/dist/components/ai-elements/file-tree.js +1 -1
  28. package/dist/components/ai-elements/inline-citation.cjs +3 -3
  29. package/dist/components/ai-elements/inline-citation.js +3 -3
  30. package/dist/components/ai-elements/jsx-preview.cjs +1 -1
  31. package/dist/components/ai-elements/jsx-preview.js +1 -1
  32. package/dist/components/ai-elements/message.cjs +1 -1
  33. package/dist/components/ai-elements/message.js +1 -1
  34. package/dist/components/ai-elements/package-info.cjs +4 -4
  35. package/dist/components/ai-elements/package-info.js +4 -4
  36. package/dist/components/ai-elements/prompt-input-context.cjs +2 -3
  37. package/dist/components/ai-elements/prompt-input-context.js +2 -3
  38. package/dist/components/ai-elements/queue.cjs +2 -2
  39. package/dist/components/ai-elements/queue.js +2 -2
  40. package/dist/components/ai-elements/reasoning.cjs +2 -2
  41. package/dist/components/ai-elements/reasoning.js +2 -2
  42. package/dist/components/ai-elements/sandbox.cjs +3 -3
  43. package/dist/components/ai-elements/sandbox.js +3 -3
  44. package/dist/components/ai-elements/schema-display.cjs +12 -12
  45. package/dist/components/ai-elements/schema-display.js +12 -12
  46. package/dist/components/ai-elements/speech-input.cjs +18 -2
  47. package/dist/components/ai-elements/speech-input.js +16 -0
  48. package/dist/components/ai-elements/stack-trace.cjs +1 -1
  49. package/dist/components/ai-elements/stack-trace.js +1 -1
  50. package/dist/components/ai-elements/task.cjs +3 -3
  51. package/dist/components/ai-elements/task.js +3 -3
  52. package/dist/components/ai-elements/terminal.cjs +2 -2
  53. package/dist/components/ai-elements/terminal.js +2 -2
  54. package/dist/components/ai-elements/test-results.cjs +4 -4
  55. package/dist/components/ai-elements/test-results.js +4 -4
  56. package/dist/components/ai-elements/tool.cjs +4 -4
  57. package/dist/components/ai-elements/tool.js +4 -4
  58. package/dist/components/ai-elements/transcription.cjs +1 -1
  59. package/dist/components/ai-elements/transcription.js +1 -1
  60. package/dist/components/ai-elements/web-preview.cjs +2 -2
  61. package/dist/components/ai-elements/web-preview.js +2 -2
  62. package/dist/components/context-editor/CapabilitySection.cjs +2 -2
  63. package/dist/components/context-editor/CapabilitySection.js +2 -2
  64. package/dist/components/context-editor/ContextEditor.cjs +2 -2
  65. package/dist/components/context-editor/ContextEditor.js +2 -2
  66. package/dist/components/context-editor/PresetBar.cjs +3 -3
  67. package/dist/components/context-editor/PresetBar.js +3 -3
  68. package/dist/components/context-editor/SystemPromptSection.cjs +4 -4
  69. package/dist/components/context-editor/SystemPromptSection.js +4 -4
  70. package/dist/components/context-editor/parts.cjs +6 -6
  71. package/dist/components/context-editor/parts.js +6 -6
  72. package/dist/components/dashboard/activity-list.cjs +2 -2
  73. package/dist/components/dashboard/activity-list.js +2 -2
  74. package/dist/components/dashboard/catalog.cjs +1 -322
  75. package/dist/components/dashboard/catalog.d.cts +1 -2
  76. package/dist/components/dashboard/catalog.d.ts +1 -2
  77. package/dist/components/dashboard/catalog.js +0 -322
  78. package/dist/components/dashboard/catalog.json +312 -0
  79. package/dist/components/dashboard/empty-state.cjs +1 -1
  80. package/dist/components/dashboard/empty-state.js +1 -1
  81. package/dist/components/dashboard/index.d.cts +1 -1
  82. package/dist/components/dashboard/index.d.ts +1 -1
  83. package/dist/components/dashboard/item-list.cjs +2 -2
  84. package/dist/components/dashboard/item-list.js +2 -2
  85. package/dist/components/dashboard/layout.cjs +1 -1
  86. package/dist/components/dashboard/layout.js +1 -1
  87. package/dist/components/dashboard/metric.cjs +1 -1
  88. package/dist/components/dashboard/metric.js +1 -1
  89. package/dist/components/dashboard/stale-indicator.cjs +1 -1
  90. package/dist/components/dashboard/stale-indicator.js +1 -1
  91. package/dist/components/dashboard/status.cjs +6 -2
  92. package/dist/components/dashboard/status.js +7 -3
  93. package/dist/components/dashboard/tone.cjs +9 -1
  94. package/dist/components/dashboard/tone.d.cts +7 -1
  95. package/dist/components/dashboard/tone.d.ts +7 -1
  96. package/dist/components/dashboard/tone.js +8 -0
  97. package/dist/components/dashboard/typography.cjs +4 -4
  98. package/dist/components/dashboard/typography.d.cts +1 -1
  99. package/dist/components/dashboard/typography.d.ts +1 -1
  100. package/dist/components/dashboard/typography.js +4 -4
  101. package/dist/components/model-selection/available-model-picker.cjs +6 -6
  102. package/dist/components/model-selection/available-model-picker.js +6 -6
  103. package/dist/components/model-selection/thinking-level-picker.cjs +1 -1
  104. package/dist/components/model-selection/thinking-level-picker.js +1 -1
  105. package/dist/components/model-selection/thinking-picker.cjs +70 -0
  106. package/dist/components/model-selection/thinking-picker.d.cts +12 -0
  107. package/dist/components/model-selection/thinking-picker.d.ts +12 -0
  108. package/dist/components/model-selection/thinking-picker.js +70 -0
  109. package/dist/components/ui/accordion.cjs +2 -2
  110. package/dist/components/ui/accordion.js +2 -2
  111. package/dist/components/ui/alert-dialog.cjs +4 -2
  112. package/dist/components/ui/alert-dialog.js +4 -2
  113. package/dist/components/ui/alert.cjs +2 -2
  114. package/dist/components/ui/alert.js +2 -2
  115. package/dist/components/ui/avatar.cjs +2 -2
  116. package/dist/components/ui/avatar.js +2 -2
  117. package/dist/components/ui/breadcrumb.cjs +1 -1
  118. package/dist/components/ui/breadcrumb.js +1 -1
  119. package/dist/components/ui/button-group.cjs +1 -1
  120. package/dist/components/ui/button-group.js +1 -1
  121. package/dist/components/ui/button.cjs +1 -1
  122. package/dist/components/ui/button.js +1 -1
  123. package/dist/components/ui/calendar.cjs +2 -2
  124. package/dist/components/ui/calendar.js +2 -2
  125. package/dist/components/ui/card.cjs +1 -1
  126. package/dist/components/ui/card.js +1 -1
  127. package/dist/components/ui/carousel.cjs +3 -2
  128. package/dist/components/ui/carousel.js +2 -1
  129. package/dist/components/ui/chart.cjs +36 -27
  130. package/dist/components/ui/chart.d.cts +21 -17
  131. package/dist/components/ui/chart.d.ts +21 -17
  132. package/dist/components/ui/chart.js +30 -21
  133. package/dist/components/ui/combobox.cjs +7 -5
  134. package/dist/components/ui/combobox.js +7 -5
  135. package/dist/components/ui/command.cjs +3 -3
  136. package/dist/components/ui/command.js +3 -3
  137. package/dist/components/ui/context-menu.cjs +10 -7
  138. package/dist/components/ui/context-menu.js +10 -7
  139. package/dist/components/ui/dialog.cjs +4 -2
  140. package/dist/components/ui/dialog.js +4 -2
  141. package/dist/components/ui/drawer.cjs +4 -2
  142. package/dist/components/ui/drawer.js +4 -2
  143. package/dist/components/ui/dropdown-menu.cjs +10 -7
  144. package/dist/components/ui/dropdown-menu.js +10 -7
  145. package/dist/components/ui/empty.cjs +2 -2
  146. package/dist/components/ui/empty.js +2 -2
  147. package/dist/components/ui/field.cjs +5 -5
  148. package/dist/components/ui/field.js +5 -5
  149. package/dist/components/ui/form.cjs +2 -2
  150. package/dist/components/ui/form.js +2 -2
  151. package/dist/components/ui/hover-card.cjs +3 -1
  152. package/dist/components/ui/hover-card.js +3 -1
  153. package/dist/components/ui/input-group.cjs +3 -3
  154. package/dist/components/ui/input-group.js +3 -3
  155. package/dist/components/ui/input-otp.cjs +1 -1
  156. package/dist/components/ui/input-otp.js +1 -1
  157. package/dist/components/ui/input.cjs +1 -1
  158. package/dist/components/ui/input.js +1 -1
  159. package/dist/components/ui/item.cjs +3 -3
  160. package/dist/components/ui/item.js +3 -3
  161. package/dist/components/ui/label.cjs +1 -1
  162. package/dist/components/ui/label.js +1 -1
  163. package/dist/components/ui/menubar.cjs +9 -7
  164. package/dist/components/ui/menubar.js +9 -7
  165. package/dist/components/ui/native-select.cjs +1 -1
  166. package/dist/components/ui/native-select.js +1 -1
  167. package/dist/components/ui/navigation-menu.cjs +2 -2
  168. package/dist/components/ui/navigation-menu.js +2 -2
  169. package/dist/components/ui/plugin-safety-disclaimer.cjs +1 -1
  170. package/dist/components/ui/plugin-safety-disclaimer.js +1 -1
  171. package/dist/components/ui/popover.cjs +4 -2
  172. package/dist/components/ui/popover.js +4 -2
  173. package/dist/components/ui/select.cjs +5 -3
  174. package/dist/components/ui/select.js +5 -3
  175. package/dist/components/ui/sheet.cjs +4 -2
  176. package/dist/components/ui/sheet.js +4 -2
  177. package/dist/components/ui/sidebar.cjs +5 -5
  178. package/dist/components/ui/sidebar.js +5 -5
  179. package/dist/components/ui/table.cjs +2 -2
  180. package/dist/components/ui/table.js +2 -2
  181. package/dist/components/ui/tabs.cjs +1 -1
  182. package/dist/components/ui/tabs.js +1 -1
  183. package/dist/components/ui/textarea.cjs +1 -1
  184. package/dist/components/ui/textarea.js +1 -1
  185. package/dist/components/ui/toggle.cjs +1 -1
  186. package/dist/components/ui/toggle.js +1 -1
  187. package/dist/components/ui/tooltip.cjs +3 -1
  188. package/dist/components/ui/tooltip.js +3 -1
  189. package/dist/index.cjs +5 -1
  190. package/dist/index.d.cts +4 -1
  191. package/dist/index.d.ts +4 -1
  192. package/dist/index.js +5 -1
  193. package/dist/plugin-style-scope-context.cjs +10 -0
  194. package/dist/plugin-style-scope-context.d.cts +13 -0
  195. package/dist/plugin-style-scope-context.d.ts +13 -0
  196. package/dist/plugin-style-scope-context.js +10 -0
  197. package/dist/plugin-style-scope.cjs +25 -0
  198. package/dist/plugin-style-scope.d.cts +11 -0
  199. package/dist/plugin-style-scope.d.ts +11 -0
  200. package/dist/plugin-style-scope.js +25 -0
  201. package/dist/reference.cjs +1251 -3
  202. package/dist/reference.d.cts +11 -5
  203. package/dist/reference.d.ts +11 -5
  204. package/dist/reference.js +1224 -6
  205. package/dist/styles/globals.css +22 -3
  206. package/dist/styles/plugin-theme.css +80 -0
  207. package/dist/styles/plugin.css +14 -2
  208. package/package.json +53 -70
  209. package/scripts/ensure-pnpm-publish.mjs +23 -0
  210. package/scripts/smoke-dist.mjs +68 -0
  211. package/src/components/ai-elements/agent.tsx +6 -6
  212. package/src/components/ai-elements/artifact.tsx +2 -2
  213. package/src/components/ai-elements/attachments.tsx +2 -2
  214. package/src/components/ai-elements/chain-of-thought.tsx +2 -2
  215. package/src/components/ai-elements/code-block.tsx +6 -3
  216. package/src/components/ai-elements/commit.tsx +2 -2
  217. package/src/components/ai-elements/confirmation.tsx +1 -1
  218. package/src/components/ai-elements/conversation.tsx +2 -2
  219. package/src/components/ai-elements/environment-variables.tsx +3 -3
  220. package/src/components/ai-elements/file-tree.tsx +1 -1
  221. package/src/components/ai-elements/inline-citation.tsx +3 -3
  222. package/src/components/ai-elements/jsx-preview.tsx +1 -1
  223. package/src/components/ai-elements/message.tsx +1 -1
  224. package/src/components/ai-elements/package-info.tsx +4 -4
  225. package/src/components/ai-elements/prompt-input-context.tsx +3 -2
  226. package/src/components/ai-elements/queue.tsx +2 -2
  227. package/src/components/ai-elements/reasoning.tsx +2 -2
  228. package/src/components/ai-elements/sandbox.tsx +3 -3
  229. package/src/components/ai-elements/schema-display.tsx +12 -12
  230. package/src/components/ai-elements/speech-input.tsx +17 -0
  231. package/src/components/ai-elements/stack-trace.tsx +1 -1
  232. package/src/components/ai-elements/task.tsx +3 -3
  233. package/src/components/ai-elements/terminal.tsx +2 -2
  234. package/src/components/ai-elements/test-results.tsx +4 -4
  235. package/src/components/ai-elements/tool.tsx +4 -4
  236. package/src/components/ai-elements/transcription.tsx +1 -1
  237. package/src/components/ai-elements/web-preview.tsx +2 -2
  238. package/src/components/context-editor/CapabilitySection.tsx +2 -2
  239. package/src/components/context-editor/ContextEditor.tsx +2 -2
  240. package/src/components/context-editor/PresetBar.tsx +3 -3
  241. package/src/components/context-editor/SystemPromptSection.tsx +4 -4
  242. package/src/components/context-editor/parts.tsx +6 -6
  243. package/src/components/dashboard/__tests__/catalog.test.ts +7 -2
  244. package/src/components/dashboard/__tests__/state.test.tsx +19 -2
  245. package/src/components/dashboard/activity-list.tsx +2 -2
  246. package/src/components/dashboard/catalog.json +312 -0
  247. package/src/components/dashboard/catalog.ts +6 -328
  248. package/src/components/dashboard/empty-state.tsx +1 -1
  249. package/src/components/dashboard/index.ts +2 -2
  250. package/src/components/dashboard/item-list.tsx +2 -2
  251. package/src/components/dashboard/layout.tsx +1 -1
  252. package/src/components/dashboard/metric.tsx +1 -1
  253. package/src/components/dashboard/stale-indicator.tsx +1 -1
  254. package/src/components/dashboard/status.tsx +15 -2
  255. package/src/components/dashboard/tone.ts +13 -0
  256. package/src/components/dashboard/typography.tsx +5 -5
  257. package/src/components/model-selection/available-model-picker.tsx +7 -7
  258. package/src/components/model-selection/thinking-level-picker.tsx +1 -1
  259. package/src/components/model-selection/thinking-picker.tsx +90 -0
  260. package/src/components/ui/accordion.tsx +2 -2
  261. package/src/components/ui/alert-dialog.tsx +4 -2
  262. package/src/components/ui/alert.tsx +2 -2
  263. package/src/components/ui/avatar.tsx +2 -2
  264. package/src/components/ui/breadcrumb.tsx +1 -1
  265. package/src/components/ui/button-group.tsx +1 -1
  266. package/src/components/ui/button.tsx +1 -1
  267. package/src/components/ui/calendar.tsx +3 -3
  268. package/src/components/ui/card.tsx +1 -1
  269. package/src/components/ui/carousel.tsx +2 -1
  270. package/src/components/ui/chart.tsx +54 -36
  271. package/src/components/ui/combobox.tsx +7 -5
  272. package/src/components/ui/command.tsx +3 -3
  273. package/src/components/ui/context-menu.tsx +10 -7
  274. package/src/components/ui/dialog.tsx +4 -2
  275. package/src/components/ui/drawer.tsx +4 -2
  276. package/src/components/ui/dropdown-menu.tsx +10 -7
  277. package/src/components/ui/empty.tsx +2 -2
  278. package/src/components/ui/field.tsx +5 -5
  279. package/src/components/ui/form.tsx +2 -2
  280. package/src/components/ui/hover-card.tsx +3 -1
  281. package/src/components/ui/input-group.tsx +3 -3
  282. package/src/components/ui/input-otp.tsx +1 -1
  283. package/src/components/ui/input.tsx +1 -1
  284. package/src/components/ui/item.tsx +3 -3
  285. package/src/components/ui/label.tsx +1 -1
  286. package/src/components/ui/menubar.tsx +9 -7
  287. package/src/components/ui/native-select.tsx +1 -1
  288. package/src/components/ui/navigation-menu.tsx +2 -2
  289. package/src/components/ui/plugin-safety-disclaimer.tsx +1 -1
  290. package/src/components/ui/popover.tsx +4 -2
  291. package/src/components/ui/select.tsx +5 -3
  292. package/src/components/ui/sheet.tsx +4 -2
  293. package/src/components/ui/sidebar.tsx +5 -5
  294. package/src/components/ui/table.tsx +2 -2
  295. package/src/components/ui/tabs.tsx +1 -1
  296. package/src/components/ui/textarea.tsx +1 -1
  297. package/src/components/ui/toggle.tsx +1 -1
  298. package/src/components/ui/tooltip.tsx +3 -1
  299. package/src/index.ts +5 -1
  300. package/src/plugin-style-scope-context.ts +21 -0
  301. package/src/plugin-style-scope.test.tsx +38 -0
  302. package/src/plugin-style-scope.tsx +35 -0
  303. package/src/styles/globals.css +22 -3
  304. package/src/styles/plugin-theme.css +80 -0
  305. package/src/styles/plugin.css +14 -2
  306. package/tsup.config.ts +13 -3
  307. package/tsup.reference.config.ts +15 -0
  308. package/dist/components/reference/ActivityExample.cjs +0 -47
  309. package/dist/components/reference/ActivityExample.d.cts +0 -5
  310. package/dist/components/reference/ActivityExample.d.ts +0 -5
  311. package/dist/components/reference/ActivityExample.js +0 -47
  312. package/dist/components/reference/ResourceExample.cjs +0 -54
  313. package/dist/components/reference/ResourceExample.d.cts +0 -5
  314. package/dist/components/reference/ResourceExample.d.ts +0 -5
  315. package/dist/components/reference/ResourceExample.js +0 -54
  316. package/dist/components/reference/SchedulerExample.cjs +0 -68
  317. package/dist/components/reference/SchedulerExample.d.cts +0 -5
  318. package/dist/components/reference/SchedulerExample.d.ts +0 -5
  319. package/dist/components/reference/SchedulerExample.js +0 -68
  320. package/dist/components/reference/StarterExample.cjs +0 -34
  321. package/dist/components/reference/StarterExample.d.cts +0 -5
  322. package/dist/components/reference/StarterExample.d.ts +0 -5
  323. package/dist/components/reference/StarterExample.js +0 -34
  324. package/dist/components/reference/index.cjs +0 -10
  325. package/dist/components/reference/index.d.cts +0 -5
  326. package/dist/components/reference/index.d.ts +0 -5
  327. package/dist/components/reference/index.js +0 -10
  328. package/dist/dashboard-catalog.cjs +0 -8
  329. package/dist/dashboard-catalog.d.cts +0 -1
  330. package/dist/dashboard-catalog.d.ts +0 -1
  331. package/dist/dashboard-catalog.js +0 -8
  332. package/src/dashboard-catalog.ts +0 -13
@@ -30,7 +30,7 @@ function AccordionTrigger({
30
30
  {
31
31
  "data-slot": "accordion-trigger",
32
32
  className: cn(
33
- "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
33
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-base font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
34
34
  className
35
35
  ),
36
36
  ...props,
@@ -50,7 +50,7 @@ function AccordionContent({
50
50
  AccordionPrimitive.Content,
51
51
  {
52
52
  "data-slot": "accordion-content",
53
- className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
53
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-base",
54
54
  ...props,
55
55
  children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
56
56
  }
@@ -2,6 +2,7 @@
2
2
  var _jsxruntime = require('react/jsx-runtime');
3
3
  var _radixui = require('radix-ui');
4
4
  var _utils = require('../../lib/utils');
5
+ var _pluginstylescopecontext = require('../../plugin-style-scope-context');
5
6
  var _button = require('./button');
6
7
  function AlertDialog({
7
8
  ...props
@@ -16,7 +17,8 @@ function AlertDialogTrigger({
16
17
  function AlertDialogPortal({
17
18
  ...props
18
19
  }) {
19
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _radixui.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
20
+ const container = _pluginstylescopecontext.usePluginPortalContainer.call(void 0, );
21
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _radixui.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", container, ...props });
20
22
  }
21
23
  function AlertDialogOverlay({
22
24
  className,
@@ -111,7 +113,7 @@ function AlertDialogDescription({
111
113
  _radixui.AlertDialog.Description,
112
114
  {
113
115
  "data-slot": "alert-dialog-description",
114
- className: _utils.cn.call(void 0, "text-muted-foreground text-sm", className),
116
+ className: _utils.cn.call(void 0, "text-muted-foreground text-base", className),
115
117
  ...props
116
118
  }
117
119
  );
@@ -2,6 +2,7 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
4
4
  import { cn } from "../../lib/utils";
5
+ import { usePluginPortalContainer } from "../../plugin-style-scope-context";
5
6
  import { Button } from "./button";
6
7
  function AlertDialog({
7
8
  ...props
@@ -16,7 +17,8 @@ function AlertDialogTrigger({
16
17
  function AlertDialogPortal({
17
18
  ...props
18
19
  }) {
19
- return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
20
+ const container = usePluginPortalContainer();
21
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", container, ...props });
20
22
  }
21
23
  function AlertDialogOverlay({
22
24
  className,
@@ -111,7 +113,7 @@ function AlertDialogDescription({
111
113
  AlertDialogPrimitive.Description,
112
114
  {
113
115
  "data-slot": "alert-dialog-description",
114
- className: cn("text-muted-foreground text-sm", className),
116
+ className: cn("text-muted-foreground text-base", className),
115
117
  ...props
116
118
  }
117
119
  );
@@ -2,7 +2,7 @@
2
2
  var _classvarianceauthority = require('class-variance-authority');
3
3
  var _utils = require('../../lib/utils');
4
4
  const alertVariants = _classvarianceauthority.cva.call(void 0,
5
- "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
5
+ "relative w-full rounded-lg border px-4 py-3 text-base grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
6
6
  {
7
7
  variants: {
8
8
  variant: {
@@ -52,7 +52,7 @@ function AlertDescription({
52
52
  {
53
53
  "data-slot": "alert-description",
54
54
  className: _utils.cn.call(void 0,
55
- "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
55
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-base [&_p]:leading-relaxed",
56
56
  className
57
57
  ),
58
58
  ...props
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "../../lib/utils";
4
4
  const alertVariants = cva(
5
- "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
5
+ "relative w-full rounded-lg border px-4 py-3 text-base grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
6
6
  {
7
7
  variants: {
8
8
  variant: {
@@ -52,7 +52,7 @@ function AlertDescription({
52
52
  {
53
53
  "data-slot": "alert-description",
54
54
  className: cn(
55
- "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
55
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-base [&_p]:leading-relaxed",
56
56
  className
57
57
  ),
58
58
  ...props
@@ -41,7 +41,7 @@ function AvatarFallback({
41
41
  {
42
42
  "data-slot": "avatar-fallback",
43
43
  className: _utils.cn.call(void 0,
44
- "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",
44
+ "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-base group-data-[size=sm]/avatar:text-xs",
45
45
  className
46
46
  ),
47
47
  ...props
@@ -86,7 +86,7 @@ function AvatarGroupCount({
86
86
  {
87
87
  "data-slot": "avatar-group-count",
88
88
  className: _utils.cn.call(void 0,
89
- "bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
89
+ "bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-base ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
90
90
  className
91
91
  ),
92
92
  ...props
@@ -41,7 +41,7 @@ function AvatarFallback({
41
41
  {
42
42
  "data-slot": "avatar-fallback",
43
43
  className: cn(
44
- "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",
44
+ "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-base group-data-[size=sm]/avatar:text-xs",
45
45
  className
46
46
  ),
47
47
  ...props
@@ -86,7 +86,7 @@ function AvatarGroupCount({
86
86
  {
87
87
  "data-slot": "avatar-group-count",
88
88
  className: cn(
89
- "bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
89
+ "bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-base ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
90
90
  className
91
91
  ),
92
92
  ...props
@@ -11,7 +11,7 @@ function BreadcrumbList({ className, ...props }) {
11
11
  {
12
12
  "data-slot": "breadcrumb-list",
13
13
  className: _utils.cn.call(void 0,
14
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
14
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-base break-words sm:gap-2.5",
15
15
  className
16
16
  ),
17
17
  ...props
@@ -11,7 +11,7 @@ function BreadcrumbList({ className, ...props }) {
11
11
  {
12
12
  "data-slot": "breadcrumb-list",
13
13
  className: cn(
14
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
14
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-base break-words sm:gap-2.5",
15
15
  className
16
16
  ),
17
17
  ...props
@@ -43,7 +43,7 @@ function ButtonGroupText({
43
43
  Comp,
44
44
  {
45
45
  className: _utils.cn.call(void 0,
46
- "bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
46
+ "bg-muted flex items-center gap-2 rounded-md border px-4 text-base font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
47
47
  className
48
48
  ),
49
49
  ...props
@@ -43,7 +43,7 @@ function ButtonGroupText({
43
43
  Comp,
44
44
  {
45
45
  className: cn(
46
- "bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
46
+ "bg-muted flex items-center gap-2 rounded-md border px-4 text-base font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
47
47
  className
48
48
  ),
49
49
  ...props
@@ -3,7 +3,7 @@ var _classvarianceauthority = require('class-variance-authority');
3
3
  var _radixui = require('radix-ui');
4
4
  var _utils = require('../../lib/utils');
5
5
  const buttonVariants = _classvarianceauthority.cva.call(void 0,
6
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
6
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-base font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
7
7
  {
8
8
  variants: {
9
9
  variant: {
@@ -3,7 +3,7 @@ import { cva } from "class-variance-authority";
3
3
  import { Slot } from "radix-ui";
4
4
  import { cn } from "../../lib/utils";
5
5
  const buttonVariants = cva(
6
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
6
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-base font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
7
7
  {
8
8
  variants: {
9
9
  variant: {
@@ -63,7 +63,7 @@ function Calendar({
63
63
  defaultClassNames.month_caption
64
64
  ),
65
65
  dropdowns: _utils.cn.call(void 0,
66
- "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
66
+ "w-full flex items-center text-base font-medium justify-center h-(--cell-size) gap-1.5",
67
67
  defaultClassNames.dropdowns
68
68
  ),
69
69
  dropdown_root: _utils.cn.call(void 0,
@@ -76,7 +76,7 @@ function Calendar({
76
76
  ),
77
77
  caption_label: _utils.cn.call(void 0,
78
78
  "select-none font-medium",
79
- captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
79
+ captionLayout === "label" ? "text-base" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-base h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
80
80
  defaultClassNames.caption_label
81
81
  ),
82
82
  table: "w-full border-collapse",
@@ -63,7 +63,7 @@ function Calendar({
63
63
  defaultClassNames.month_caption
64
64
  ),
65
65
  dropdowns: cn(
66
- "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
66
+ "w-full flex items-center text-base font-medium justify-center h-(--cell-size) gap-1.5",
67
67
  defaultClassNames.dropdowns
68
68
  ),
69
69
  dropdown_root: cn(
@@ -76,7 +76,7 @@ function Calendar({
76
76
  ),
77
77
  caption_label: cn(
78
78
  "select-none font-medium",
79
- captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
79
+ captionLayout === "label" ? "text-base" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-base h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
80
80
  defaultClassNames.caption_label
81
81
  ),
82
82
  table: "w-full border-collapse",
@@ -41,7 +41,7 @@ function CardDescription({ className, ...props }) {
41
41
  "div",
42
42
  {
43
43
  "data-slot": "card-description",
44
- className: _utils.cn.call(void 0, "text-muted-foreground text-sm", className),
44
+ className: _utils.cn.call(void 0, "text-muted-foreground text-base", className),
45
45
  ...props
46
46
  }
47
47
  );
@@ -41,7 +41,7 @@ function CardDescription({ className, ...props }) {
41
41
  "div",
42
42
  {
43
43
  "data-slot": "card-description",
44
- className: cn("text-muted-foreground text-sm", className),
44
+ className: cn("text-muted-foreground text-base", className),
45
45
  ...props
46
46
  }
47
47
  );
@@ -63,7 +63,8 @@ function Carousel({
63
63
  api.on("reInit", onSelect);
64
64
  api.on("select", onSelect);
65
65
  return () => {
66
- _optionalChain([api, 'optionalAccess', _5 => _5.off, 'call', _6 => _6("select", onSelect)]);
66
+ api.off("reInit", onSelect);
67
+ api.off("select", onSelect);
67
68
  };
68
69
  }, [api, onSelect]);
69
70
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -73,7 +74,7 @@ function Carousel({
73
74
  carouselRef,
74
75
  api,
75
76
  opts,
76
- orientation: orientation || (_optionalChain([opts, 'optionalAccess', _7 => _7.axis]) === "y" ? "vertical" : "horizontal"),
77
+ orientation: orientation || (_optionalChain([opts, 'optionalAccess', _5 => _5.axis]) === "y" ? "vertical" : "horizontal"),
77
78
  scrollPrev,
78
79
  scrollNext,
79
80
  canScrollPrev,
@@ -63,7 +63,8 @@ function Carousel({
63
63
  api.on("reInit", onSelect);
64
64
  api.on("select", onSelect);
65
65
  return () => {
66
- api?.off("select", onSelect);
66
+ api.off("reInit", onSelect);
67
+ api.off("select", onSelect);
67
68
  };
68
69
  }, [api, onSelect]);
69
70
  return /* @__PURE__ */ jsx(
@@ -1,11 +1,13 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _jsxruntime = require('react/jsx-runtime');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
+ var _jsxruntime = require('react/jsx-runtime');
2
3
  var _react = require('react'); var React = _interopRequireWildcard(_react);
3
4
  var _recharts = require('recharts'); var RechartsPrimitive = _interopRequireWildcard(_recharts);
4
5
  var _utils = require('../../lib/utils');
5
6
  const THEMES = { light: "", dark: ".dark" };
7
+ const INITIAL_DIMENSION = { width: 320, height: 200 };
6
8
  const ChartContext = React.createContext(null);
7
9
  function useChart() {
8
- const context = React.use(ChartContext);
10
+ const context = React.useContext(ChartContext);
9
11
  if (!context) {
10
12
  throw new Error("useChart must be used within a <ChartContainer />");
11
13
  }
@@ -16,30 +18,37 @@ function ChartContainer({
16
18
  className,
17
19
  children,
18
20
  config,
21
+ initialDimension = INITIAL_DIMENSION,
19
22
  ...props
20
23
  }) {
21
24
  const uniqueId = React.useId();
22
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
25
+ const chartId = `chart-${_nullishCoalesce(id, () => ( uniqueId.replace(/:/g, "")))}`;
23
26
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
24
27
  "div",
25
28
  {
26
29
  "data-slot": "chart",
27
30
  "data-chart": chartId,
28
31
  className: _utils.cn.call(void 0,
29
- "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
32
+ "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
30
33
  className
31
34
  ),
32
35
  ...props,
33
36
  children: [
34
37
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartStyle, { id: chartId, config }),
35
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RechartsPrimitive.ResponsiveContainer, { children })
38
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
39
+ RechartsPrimitive.ResponsiveContainer,
40
+ {
41
+ initialDimension,
42
+ children
43
+ }
44
+ )
36
45
  ]
37
46
  }
38
47
  ) });
39
48
  }
40
49
  const ChartStyle = ({ id, config }) => {
41
50
  const colorConfig = Object.entries(config).filter(
42
- ([, config2]) => config2.theme || config2.color
51
+ ([, config2]) => _nullishCoalesce(config2.theme, () => ( config2.color))
43
52
  );
44
53
  if (!colorConfig.length) {
45
54
  return null;
@@ -52,7 +61,7 @@ const ChartStyle = ({ id, config }) => {
52
61
  ([theme, prefix]) => `
53
62
  ${prefix} [data-chart=${id}] {
54
63
  ${colorConfig.map(([key, itemConfig]) => {
55
- const color = _optionalChain([itemConfig, 'access', _ => _.theme, 'optionalAccess', _2 => _2[theme]]) || itemConfig.color;
64
+ const color = _nullishCoalesce(_optionalChain([itemConfig, 'access', _ => _.theme, 'optionalAccess', _2 => _2[theme]]), () => ( itemConfig.color));
56
65
  return color ? ` --color-${key}: ${color};` : null;
57
66
  }).join("\n")}
58
67
  }
@@ -84,9 +93,9 @@ function ChartTooltipContent({
84
93
  return null;
85
94
  }
86
95
  const [item] = payload;
87
- const key = `${labelKey || _optionalChain([item, 'optionalAccess', _4 => _4.dataKey]) || _optionalChain([item, 'optionalAccess', _5 => _5.name]) || "value"}`;
96
+ const key = `${_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(labelKey, () => ( _optionalChain([item, 'optionalAccess', _4 => _4.dataKey]))), () => ( _optionalChain([item, 'optionalAccess', _5 => _5.name]))), () => ( "value"))}`;
88
97
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
89
- const value = !labelKey && typeof label === "string" ? _optionalChain([config, 'access', _6 => _6[label], 'optionalAccess', _7 => _7.label]) || label : _optionalChain([itemConfig, 'optionalAccess', _8 => _8.label]);
98
+ const value = !labelKey && typeof label === "string" ? _nullishCoalesce(_optionalChain([config, 'access', _6 => _6[label], 'optionalAccess', _7 => _7.label]), () => ( label)) : _optionalChain([itemConfig, 'optionalAccess', _8 => _8.label]);
90
99
  if (labelFormatter) {
91
100
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _utils.cn.call(void 0, "font-medium", labelClassName), children: labelFormatter(value, payload) });
92
101
  }
@@ -111,30 +120,30 @@ function ChartTooltipContent({
111
120
  "div",
112
121
  {
113
122
  className: _utils.cn.call(void 0,
114
- "border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
123
+ "grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
115
124
  className
116
125
  ),
117
126
  children: [
118
127
  !nestLabel ? tooltipLabel : null,
119
128
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
120
- const key = `${nameKey || item.name || item.dataKey || "value"}`;
129
+ const key = `${_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(nameKey, () => ( item.name)), () => ( item.dataKey)), () => ( "value"))}`;
121
130
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
122
- const indicatorColor = color || item.payload.fill || item.color;
131
+ const indicatorColor = _nullishCoalesce(_nullishCoalesce(color, () => ( _optionalChain([item, 'access', _10 => _10.payload, 'optionalAccess', _11 => _11.fill]))), () => ( item.color));
123
132
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
124
133
  "div",
125
134
  {
126
135
  className: _utils.cn.call(void 0,
127
- "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
136
+ "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
128
137
  indicator === "dot" && "items-center"
129
138
  ),
130
- children: formatter && _optionalChain([item, 'optionalAccess', _10 => _10.value]) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
131
- _optionalChain([itemConfig, 'optionalAccess', _11 => _11.icon]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
139
+ children: formatter && _optionalChain([item, 'optionalAccess', _12 => _12.value]) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
140
+ _optionalChain([itemConfig, 'optionalAccess', _13 => _13.icon]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
132
141
  "div",
133
142
  {
134
143
  className: _utils.cn.call(void 0,
135
144
  "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
136
145
  {
137
- "size-2.5": indicator === "dot",
146
+ "h-2.5 w-2.5": indicator === "dot",
138
147
  "w-1": indicator === "line",
139
148
  "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
140
149
  "my-0.5": nestLabel && indicator === "dashed"
@@ -156,15 +165,15 @@ function ChartTooltipContent({
156
165
  children: [
157
166
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-1.5", children: [
158
167
  nestLabel ? tooltipLabel : null,
159
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: _optionalChain([itemConfig, 'optionalAccess', _12 => _12.label]) || item.name })
168
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: _nullishCoalesce(_optionalChain([itemConfig, 'optionalAccess', _14 => _14.label]), () => ( item.name)) })
160
169
  ] }),
161
- item.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
170
+ item.value != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-mono font-medium text-foreground tabular-nums", children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value) })
162
171
  ]
163
172
  }
164
173
  )
165
174
  ] })
166
175
  },
167
- item.dataKey
176
+ index
168
177
  );
169
178
  }) })
170
179
  ]
@@ -180,7 +189,7 @@ function ChartLegendContent({
180
189
  nameKey
181
190
  }) {
182
191
  const { config } = useChart();
183
- if (!_optionalChain([payload, 'optionalAccess', _13 => _13.length])) {
192
+ if (!_optionalChain([payload, 'optionalAccess', _15 => _15.length])) {
184
193
  return null;
185
194
  }
186
195
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -191,29 +200,29 @@ function ChartLegendContent({
191
200
  verticalAlign === "top" ? "pb-3" : "pt-3",
192
201
  className
193
202
  ),
194
- children: payload.filter((item) => item.type !== "none").map((item) => {
195
- const key = `${nameKey || item.dataKey || "value"}`;
203
+ children: payload.filter((item) => item.type !== "none").map((item, index) => {
204
+ const key = `${_nullishCoalesce(_nullishCoalesce(nameKey, () => ( item.dataKey)), () => ( "value"))}`;
196
205
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
197
206
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
198
207
  "div",
199
208
  {
200
209
  className: _utils.cn.call(void 0,
201
- "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
210
+ "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
202
211
  ),
203
212
  children: [
204
- _optionalChain([itemConfig, 'optionalAccess', _14 => _14.icon]) && !hideIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
213
+ _optionalChain([itemConfig, 'optionalAccess', _16 => _16.icon]) && !hideIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
205
214
  "div",
206
215
  {
207
- className: "size-2 shrink-0 rounded-[2px]",
216
+ className: "h-2 w-2 shrink-0 rounded-[2px]",
208
217
  style: {
209
218
  backgroundColor: item.color
210
219
  }
211
220
  }
212
221
  ),
213
- _optionalChain([itemConfig, 'optionalAccess', _15 => _15.label])
222
+ _optionalChain([itemConfig, 'optionalAccess', _17 => _17.label])
214
223
  ]
215
224
  },
216
- item.value
225
+ index
217
226
  );
218
227
  })
219
228
  }
@@ -1,26 +1,30 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import * as RechartsPrimitive from 'recharts';
4
+ import { TooltipValueType } from 'recharts';
4
5
 
5
6
  declare const THEMES: {
6
7
  readonly light: "";
7
8
  readonly dark: ".dark";
8
9
  };
9
- type ChartConfig = {
10
- [k in string]: {
11
- label?: React.ReactNode;
12
- icon?: React.ComponentType;
13
- } & ({
14
- color?: string;
15
- theme?: never;
16
- } | {
17
- color?: never;
18
- theme: Record<keyof typeof THEMES, string>;
19
- });
20
- };
21
- declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
10
+ type TooltipNameType = number | string;
11
+ type ChartConfig = Record<string, {
12
+ label?: React.ReactNode;
13
+ icon?: React.ComponentType;
14
+ } & ({
15
+ color?: string;
16
+ theme?: never;
17
+ } | {
18
+ color?: never;
19
+ theme: Record<keyof typeof THEMES, string>;
20
+ })>;
21
+ declare function ChartContainer({ id, className, children, config, initialDimension, ...props }: React.ComponentProps<"div"> & {
22
22
  config: ChartConfig;
23
23
  children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
24
+ initialDimension?: {
25
+ width: number;
26
+ height: number;
27
+ };
24
28
  }): react_jsx_runtime.JSX.Element;
25
29
  declare const ChartStyle: ({ id, config }: {
26
30
  id: string;
@@ -33,11 +37,11 @@ declare function ChartTooltipContent({ active, payload, className, indicator, hi
33
37
  indicator?: "line" | "dot" | "dashed";
34
38
  nameKey?: string;
35
39
  labelKey?: string;
36
- }): react_jsx_runtime.JSX.Element | null;
37
- declare const ChartLegend: typeof RechartsPrimitive.Legend;
38
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
40
+ } & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, "accessibilityLayer">): react_jsx_runtime.JSX.Element | null;
41
+ declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
42
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & {
39
43
  hideIcon?: boolean;
40
44
  nameKey?: string;
41
- }): react_jsx_runtime.JSX.Element | null;
45
+ } & RechartsPrimitive.DefaultLegendContentProps): react_jsx_runtime.JSX.Element | null;
42
46
 
43
47
  export { type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
@@ -1,26 +1,30 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import * as RechartsPrimitive from 'recharts';
4
+ import { TooltipValueType } from 'recharts';
4
5
 
5
6
  declare const THEMES: {
6
7
  readonly light: "";
7
8
  readonly dark: ".dark";
8
9
  };
9
- type ChartConfig = {
10
- [k in string]: {
11
- label?: React.ReactNode;
12
- icon?: React.ComponentType;
13
- } & ({
14
- color?: string;
15
- theme?: never;
16
- } | {
17
- color?: never;
18
- theme: Record<keyof typeof THEMES, string>;
19
- });
20
- };
21
- declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
10
+ type TooltipNameType = number | string;
11
+ type ChartConfig = Record<string, {
12
+ label?: React.ReactNode;
13
+ icon?: React.ComponentType;
14
+ } & ({
15
+ color?: string;
16
+ theme?: never;
17
+ } | {
18
+ color?: never;
19
+ theme: Record<keyof typeof THEMES, string>;
20
+ })>;
21
+ declare function ChartContainer({ id, className, children, config, initialDimension, ...props }: React.ComponentProps<"div"> & {
22
22
  config: ChartConfig;
23
23
  children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
24
+ initialDimension?: {
25
+ width: number;
26
+ height: number;
27
+ };
24
28
  }): react_jsx_runtime.JSX.Element;
25
29
  declare const ChartStyle: ({ id, config }: {
26
30
  id: string;
@@ -33,11 +37,11 @@ declare function ChartTooltipContent({ active, payload, className, indicator, hi
33
37
  indicator?: "line" | "dot" | "dashed";
34
38
  nameKey?: string;
35
39
  labelKey?: string;
36
- }): react_jsx_runtime.JSX.Element | null;
37
- declare const ChartLegend: typeof RechartsPrimitive.Legend;
38
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
40
+ } & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, "accessibilityLayer">): react_jsx_runtime.JSX.Element | null;
41
+ declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
42
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & {
39
43
  hideIcon?: boolean;
40
44
  nameKey?: string;
41
- }): react_jsx_runtime.JSX.Element | null;
45
+ } & RechartsPrimitive.DefaultLegendContentProps): react_jsx_runtime.JSX.Element | null;
42
46
 
43
47
  export { type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };