@gram-ai/elements 1.27.3 → 1.27.5

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 (278) hide show
  1. package/README.md +72 -60
  2. package/README.typedoc.md +6 -6
  3. package/bin/cli.js +74 -74
  4. package/dist/compat-shims-CO9JXXV4.cjs.map +1 -1
  5. package/dist/{compat-shims-BPJ7Q68c.js → compat-shims-DxtUrORi.js} +4 -2
  6. package/dist/compat-shims-DxtUrORi.js.map +1 -0
  7. package/dist/components/ShareButton/index.d.ts +2 -2
  8. package/dist/components/assistant-ui/message-feedback.d.ts +1 -1
  9. package/dist/components/assistant-ui/tooltip-icon-button.d.ts +2 -2
  10. package/dist/components/ui/avatar.d.ts +2 -2
  11. package/dist/components/ui/button.d.ts +1 -1
  12. package/dist/components/ui/calendar.d.ts +1 -1
  13. package/dist/components/ui/collapsible.d.ts +1 -1
  14. package/dist/components/ui/dialog.d.ts +4 -4
  15. package/dist/components/ui/popover.d.ts +2 -2
  16. package/dist/components/ui/skeleton.d.ts +1 -1
  17. package/dist/components/ui/time-range-picker.d.ts +4 -2
  18. package/dist/components/ui/tool-ui.d.ts +7 -7
  19. package/dist/components/ui/tooltip.d.ts +2 -2
  20. package/dist/contexts/ConnectionStatusContext.d.ts +1 -1
  21. package/dist/elements.cjs +1 -1
  22. package/dist/elements.css +1 -1
  23. package/dist/elements.js +2 -2
  24. package/dist/hooks/useDensity.d.ts +73 -73
  25. package/dist/hooks/useMCPTools.d.ts +1 -1
  26. package/dist/hooks/useRadius.d.ts +1 -1
  27. package/dist/{index-BpJstUh1.cjs → index-C4bFBGfl.cjs} +4 -4
  28. package/dist/{index-BpJstUh1.cjs.map → index-C4bFBGfl.cjs.map} +1 -1
  29. package/dist/{index-CUitXazZ.js → index-D93pV0_o.js} +55 -55
  30. package/dist/{index-CUitXazZ.js.map → index-D93pV0_o.js.map} +1 -1
  31. package/dist/{index-DBrhzauj.js → index-DuCQRbcQ.js} +6386 -6337
  32. package/dist/index-DuCQRbcQ.js.map +1 -0
  33. package/dist/{index-DxfW52oA.cjs → index-y_PNN5vK.cjs} +64 -46
  34. package/dist/index-y_PNN5vK.cjs.map +1 -0
  35. package/dist/lib/cassette.d.ts +4 -4
  36. package/dist/lib/errorTracking.d.ts +1 -1
  37. package/dist/lib/messageConverter.d.ts +1 -1
  38. package/dist/lib/models.d.ts +1 -1
  39. package/dist/plugins/chart/ui/bar-chart.d.ts +1 -1
  40. package/dist/plugins/generative-ui/ui/accordion-wrapper.d.ts +2 -2
  41. package/dist/plugins/generative-ui/ui/accordion.d.ts +1 -1
  42. package/dist/plugins/generative-ui/ui/action-button.d.ts +2 -2
  43. package/dist/plugins/generative-ui/ui/alert-wrapper.d.ts +1 -1
  44. package/dist/plugins/generative-ui/ui/alert.d.ts +4 -4
  45. package/dist/plugins/generative-ui/ui/avatar.d.ts +5 -5
  46. package/dist/plugins/generative-ui/ui/badge.d.ts +2 -2
  47. package/dist/plugins/generative-ui/ui/button-wrapper.d.ts +2 -2
  48. package/dist/plugins/generative-ui/ui/button.d.ts +2 -2
  49. package/dist/plugins/generative-ui/ui/card-wrapper.d.ts +2 -2
  50. package/dist/plugins/generative-ui/ui/card.d.ts +8 -8
  51. package/dist/plugins/generative-ui/ui/checkbox.d.ts +1 -1
  52. package/dist/plugins/generative-ui/ui/data-table.d.ts +2 -2
  53. package/dist/plugins/generative-ui/ui/dialog.d.ts +3 -3
  54. package/dist/plugins/generative-ui/ui/dropdown-menu.d.ts +3 -3
  55. package/dist/plugins/generative-ui/ui/grid.d.ts +3 -3
  56. package/dist/plugins/generative-ui/ui/input-wrapper.d.ts +1 -1
  57. package/dist/plugins/generative-ui/ui/input.d.ts +2 -2
  58. package/dist/plugins/generative-ui/ui/label.d.ts +1 -1
  59. package/dist/plugins/generative-ui/ui/metric.d.ts +3 -3
  60. package/dist/plugins/generative-ui/ui/pagination.d.ts +6 -6
  61. package/dist/plugins/generative-ui/ui/popover.d.ts +4 -4
  62. package/dist/plugins/generative-ui/ui/progress.d.ts +2 -2
  63. package/dist/plugins/generative-ui/ui/radio-group.d.ts +1 -1
  64. package/dist/plugins/generative-ui/ui/select.d.ts +2 -2
  65. package/dist/plugins/generative-ui/ui/separator.d.ts +1 -1
  66. package/dist/plugins/generative-ui/ui/skeleton.d.ts +1 -1
  67. package/dist/plugins/generative-ui/ui/stack.d.ts +6 -6
  68. package/dist/plugins/generative-ui/ui/switch.d.ts +2 -2
  69. package/dist/plugins/generative-ui/ui/table.d.ts +9 -9
  70. package/dist/plugins/generative-ui/ui/tabs-wrapper.d.ts +1 -1
  71. package/dist/plugins/generative-ui/ui/tabs.d.ts +1 -1
  72. package/dist/plugins/generative-ui/ui/text.d.ts +3 -3
  73. package/dist/plugins/generative-ui/ui/textarea.d.ts +2 -2
  74. package/dist/plugins/generative-ui/ui/tooltip.d.ts +1 -1
  75. package/dist/plugins.cjs +1 -1
  76. package/dist/plugins.js +1 -1
  77. package/dist/{profiler-D6ndqfsd.js → profiler-FpBY9eRv.js} +2 -2
  78. package/dist/{profiler-D6ndqfsd.js.map → profiler-FpBY9eRv.js.map} +1 -1
  79. package/dist/{profiler-DhnzZ34c.cjs → profiler-_mthyjvo.cjs} +2 -2
  80. package/dist/{profiler-DhnzZ34c.cjs.map → profiler-_mthyjvo.cjs.map} +1 -1
  81. package/dist/react-shim.js +1 -1
  82. package/dist/server/express.cjs.map +1 -1
  83. package/dist/server/express.js.map +1 -1
  84. package/dist/{startRecording-BwXmdmy1.cjs → startRecording-NJcpiHw-.cjs} +2 -2
  85. package/dist/{startRecording-BwXmdmy1.cjs.map → startRecording-NJcpiHw-.cjs.map} +1 -1
  86. package/dist/{startRecording-B_9CRZ_P.js → startRecording-r5MXQ2Dm.js} +2 -2
  87. package/dist/{startRecording-B_9CRZ_P.js.map → startRecording-r5MXQ2Dm.js.map} +1 -1
  88. package/dist/types/index.d.ts +2 -2
  89. package/package.json +1 -5
  90. package/src/compat-plugin.ts +14 -14
  91. package/src/compat-shims.ts +33 -31
  92. package/src/compat.test.ts +48 -48
  93. package/src/compat.ts +6 -6
  94. package/src/components/Chat/index.tsx +17 -17
  95. package/src/components/Chat/stories/Charts.stories.tsx +98 -98
  96. package/src/components/Chat/stories/Composer.stories.tsx +15 -15
  97. package/src/components/Chat/stories/ConnectionConfiguration.stories.tsx +44 -44
  98. package/src/components/Chat/stories/CustomComponents.stories.tsx +17 -17
  99. package/src/components/Chat/stories/Density.stories.tsx +20 -20
  100. package/src/components/Chat/stories/ErrorBoundary.stories.tsx +47 -47
  101. package/src/components/Chat/stories/FrontendTools.stories.tsx +39 -39
  102. package/src/components/Chat/stories/GenerativeUI.stories.tsx +48 -48
  103. package/src/components/Chat/stories/MessageFeedback.stories.tsx +52 -52
  104. package/src/components/Chat/stories/Modal.stories.tsx +28 -28
  105. package/src/components/Chat/stories/Model.stories.tsx +11 -11
  106. package/src/components/Chat/stories/Radius.stories.tsx +20 -20
  107. package/src/components/Chat/stories/Sidecar.stories.tsx +13 -13
  108. package/src/components/Chat/stories/StyleIsolation.stories.tsx +11 -11
  109. package/src/components/Chat/stories/Theme.stories.tsx +25 -25
  110. package/src/components/Chat/stories/Thread.stories.tsx +25 -25
  111. package/src/components/Chat/stories/ToolApproval.stories.tsx +55 -55
  112. package/src/components/Chat/stories/ToolMentions.stories.tsx +17 -17
  113. package/src/components/Chat/stories/Tools.stories.tsx +88 -88
  114. package/src/components/Chat/stories/Variants.stories.tsx +32 -32
  115. package/src/components/Chat/stories/Welcome.stories.tsx +14 -14
  116. package/src/components/ChatHistory.tsx +7 -7
  117. package/src/components/FrontendTools/index.tsx +5 -5
  118. package/src/components/Replay.stories.tsx +157 -157
  119. package/src/components/Replay.tsx +76 -73
  120. package/src/components/ShadowRoot.tsx +40 -40
  121. package/src/components/ShareButton/index.tsx +32 -32
  122. package/src/components/assistant-ui/assistant-modal.tsx +92 -87
  123. package/src/components/assistant-ui/assistant-sidecar.tsx +35 -35
  124. package/src/components/assistant-ui/attachment.tsx +80 -80
  125. package/src/components/assistant-ui/connection-status-indicator.tsx +33 -33
  126. package/src/components/assistant-ui/error-boundary.tsx +34 -34
  127. package/src/components/assistant-ui/follow-on-suggestions.tsx +26 -26
  128. package/src/components/assistant-ui/markdown-text.tsx +69 -69
  129. package/src/components/assistant-ui/mentioned-tools-badges.tsx +38 -38
  130. package/src/components/assistant-ui/message-feedback.tsx +74 -61
  131. package/src/components/assistant-ui/reasoning.tsx +83 -83
  132. package/src/components/assistant-ui/thread-list.tsx +45 -45
  133. package/src/components/assistant-ui/thread.tsx +278 -278
  134. package/src/components/assistant-ui/tool-fallback.tsx +37 -37
  135. package/src/components/assistant-ui/tool-group.tsx +26 -26
  136. package/src/components/assistant-ui/tool-mention-autocomplete.tsx +122 -122
  137. package/src/components/assistant-ui/tooltip-icon-button.tsx +18 -18
  138. package/src/components/ui/avatar.tsx +12 -12
  139. package/src/components/ui/button.tsx +12 -12
  140. package/src/components/ui/buttonVariants.ts +17 -17
  141. package/src/components/ui/calendar.tsx +106 -106
  142. package/src/components/ui/charts.stories.tsx +56 -56
  143. package/src/components/ui/collapsible.tsx +5 -5
  144. package/src/components/ui/dialog.tsx +30 -30
  145. package/src/components/ui/generative-ui.stories.tsx +200 -200
  146. package/src/components/ui/generative-ui.tsx +26 -26
  147. package/src/components/ui/popover.tsx +14 -14
  148. package/src/components/ui/skeleton.tsx +5 -5
  149. package/src/components/ui/time-range-picker.stories.tsx +80 -80
  150. package/src/components/ui/time-range-picker.tsx +272 -235
  151. package/src/components/ui/tool-ui.stories.tsx +37 -37
  152. package/src/components/ui/tool-ui.tsx +221 -215
  153. package/src/components/ui/tooltip.tsx +15 -15
  154. package/src/constants/tailwind.ts +1 -1
  155. package/src/contexts/ChatIdContext.tsx +7 -7
  156. package/src/contexts/ConnectionStatusContext.tsx +64 -64
  157. package/src/contexts/ElementsProvider.tsx +222 -211
  158. package/src/contexts/ReplayContext.ts +3 -3
  159. package/src/contexts/ToolApprovalContext.tsx +54 -54
  160. package/src/contexts/ToolExecutionContext.tsx +34 -34
  161. package/src/contexts/contexts.ts +7 -7
  162. package/src/contexts/portal-container-context.ts +2 -2
  163. package/src/contexts/portal-container.tsx +7 -7
  164. package/src/embedded.ts +1 -1
  165. package/src/global.css +25 -25
  166. package/src/hooks/useAuth.ts +72 -72
  167. package/src/hooks/useDensity.ts +79 -79
  168. package/src/hooks/useElements.ts +6 -6
  169. package/src/hooks/useExpanded.ts +12 -12
  170. package/src/hooks/useFollowOnSuggestions.ts +87 -82
  171. package/src/hooks/useGramThreadListAdapter.tsx +99 -99
  172. package/src/hooks/useMCPTools.ts +47 -47
  173. package/src/hooks/useModel.ts +14 -14
  174. package/src/hooks/usePluginComponents.ts +11 -11
  175. package/src/hooks/usePortalContainer.ts +5 -5
  176. package/src/hooks/useRadius.ts +23 -23
  177. package/src/hooks/useRecordCassette.ts +34 -34
  178. package/src/hooks/useSession.ts +11 -11
  179. package/src/hooks/useThemeProps.ts +13 -13
  180. package/src/hooks/useThreadId.ts +4 -4
  181. package/src/hooks/useToolApproval.ts +7 -7
  182. package/src/hooks/useToolMentions.ts +40 -40
  183. package/src/index.ts +26 -26
  184. package/src/lib/api.test.ts +61 -61
  185. package/src/lib/api.ts +4 -3
  186. package/src/lib/auth.ts +13 -13
  187. package/src/lib/cassette.ts +84 -84
  188. package/src/lib/easing.ts +1 -1
  189. package/src/lib/errorTracking.config.ts +5 -5
  190. package/src/lib/errorTracking.ts +29 -29
  191. package/src/lib/generative-ui.ts +7 -7
  192. package/src/lib/humanize.ts +3 -3
  193. package/src/lib/messageConverter.test.ts +130 -127
  194. package/src/lib/messageConverter.ts +196 -196
  195. package/src/lib/models.ts +21 -20
  196. package/src/lib/token.test.ts +56 -56
  197. package/src/lib/token.ts +14 -14
  198. package/src/lib/tool-mentions.ts +45 -45
  199. package/src/lib/tools.ts +66 -62
  200. package/src/lib/utils.ts +5 -5
  201. package/src/lib.d.ts +1 -1
  202. package/src/plugins/README.md +5 -5
  203. package/src/plugins/chart/catalog.ts +18 -18
  204. package/src/plugins/chart/chart.test.ts +31 -31
  205. package/src/plugins/chart/component.tsx +34 -34
  206. package/src/plugins/chart/index.ts +4 -4
  207. package/src/plugins/chart/ui/area-chart.tsx +42 -42
  208. package/src/plugins/chart/ui/bar-chart.tsx +46 -46
  209. package/src/plugins/chart/ui/donut-chart.tsx +48 -48
  210. package/src/plugins/chart/ui/index.ts +7 -7
  211. package/src/plugins/chart/ui/line-chart.tsx +43 -43
  212. package/src/plugins/chart/ui/pie-chart.tsx +44 -44
  213. package/src/plugins/chart/ui/radar-chart.tsx +33 -33
  214. package/src/plugins/chart/ui/scatter-chart.tsx +43 -43
  215. package/src/plugins/components/MacOSWindowFrame.tsx +15 -15
  216. package/src/plugins/components/PluginLoadingState.tsx +10 -10
  217. package/src/plugins/components/index.ts +1 -1
  218. package/src/plugins/generative-ui/catalog.ts +54 -54
  219. package/src/plugins/generative-ui/component.tsx +85 -85
  220. package/src/plugins/generative-ui/index.ts +4 -4
  221. package/src/plugins/generative-ui/ui/accordion-wrapper.tsx +16 -16
  222. package/src/plugins/generative-ui/ui/accordion.tsx +16 -16
  223. package/src/plugins/generative-ui/ui/action-button.tsx +28 -28
  224. package/src/plugins/generative-ui/ui/alert-wrapper.tsx +8 -8
  225. package/src/plugins/generative-ui/ui/alert.tsx +20 -20
  226. package/src/plugins/generative-ui/ui/avatar-wrapper.tsx +7 -7
  227. package/src/plugins/generative-ui/ui/avatar.tsx +30 -30
  228. package/src/plugins/generative-ui/ui/badge.tsx +22 -22
  229. package/src/plugins/generative-ui/ui/button-wrapper.tsx +12 -12
  230. package/src/plugins/generative-ui/ui/button.tsx +28 -28
  231. package/src/plugins/generative-ui/ui/card-wrapper.tsx +8 -8
  232. package/src/plugins/generative-ui/ui/card.tsx +27 -27
  233. package/src/plugins/generative-ui/ui/checkbox-wrapper.tsx +9 -9
  234. package/src/plugins/generative-ui/ui/checkbox.tsx +9 -9
  235. package/src/plugins/generative-ui/ui/data-table.tsx +8 -8
  236. package/src/plugins/generative-ui/ui/dialog.tsx +31 -31
  237. package/src/plugins/generative-ui/ui/dropdown-menu.tsx +44 -44
  238. package/src/plugins/generative-ui/ui/grid.tsx +12 -12
  239. package/src/plugins/generative-ui/ui/index.ts +40 -40
  240. package/src/plugins/generative-ui/ui/input-wrapper.tsx +11 -11
  241. package/src/plugins/generative-ui/ui/input.tsx +9 -9
  242. package/src/plugins/generative-ui/ui/label.tsx +8 -8
  243. package/src/plugins/generative-ui/ui/list.tsx +11 -11
  244. package/src/plugins/generative-ui/ui/metric.tsx +23 -23
  245. package/src/plugins/generative-ui/ui/pagination.tsx +28 -28
  246. package/src/plugins/generative-ui/ui/popover.tsx +21 -21
  247. package/src/plugins/generative-ui/ui/progress.tsx +13 -13
  248. package/src/plugins/generative-ui/ui/radio-group.tsx +12 -12
  249. package/src/plugins/generative-ui/ui/select-wrapper.tsx +7 -7
  250. package/src/plugins/generative-ui/ui/select.tsx +37 -37
  251. package/src/plugins/generative-ui/ui/separator.tsx +9 -9
  252. package/src/plugins/generative-ui/ui/skeleton-wrapper.tsx +10 -10
  253. package/src/plugins/generative-ui/ui/skeleton.tsx +5 -5
  254. package/src/plugins/generative-ui/ui/stack.tsx +28 -28
  255. package/src/plugins/generative-ui/ui/switch.tsx +11 -11
  256. package/src/plugins/generative-ui/ui/table.tsx +32 -32
  257. package/src/plugins/generative-ui/ui/tabs-wrapper.tsx +11 -11
  258. package/src/plugins/generative-ui/ui/tabs.tsx +26 -26
  259. package/src/plugins/generative-ui/ui/text.tsx +12 -12
  260. package/src/plugins/generative-ui/ui/textarea.tsx +7 -7
  261. package/src/plugins/generative-ui/ui/tooltip.tsx +12 -12
  262. package/src/plugins/index.ts +7 -7
  263. package/src/react-shim.ts +6 -6
  264. package/src/server/bun.ts +12 -12
  265. package/src/server/core.ts +25 -25
  266. package/src/server/express.ts +17 -15
  267. package/src/server/fastify.ts +14 -14
  268. package/src/server/hono.ts +9 -9
  269. package/src/server/nextjs.ts +12 -12
  270. package/src/server/tanstack-start.ts +12 -12
  271. package/src/server.ts +27 -27
  272. package/src/storybook.d.ts +4 -4
  273. package/src/types/index.ts +122 -122
  274. package/src/types/plugins.ts +7 -7
  275. package/src/vite-env.d.ts +12 -12
  276. package/dist/compat-shims-BPJ7Q68c.js.map +0 -1
  277. package/dist/index-DBrhzauj.js.map +0 -1
  278. package/dist/index-DxfW52oA.cjs.map +0 -1
@@ -1,25 +1,25 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite'
2
- import { GenerativeUI } from './generative-ui'
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
+ import { GenerativeUI } from "./generative-ui";
3
3
 
4
4
  const meta: Meta<typeof GenerativeUI> = {
5
- title: 'Components/Generative UI',
5
+ title: "Components/Generative UI",
6
6
  component: GenerativeUI,
7
7
  parameters: {
8
- layout: 'fullscreen',
8
+ layout: "fullscreen",
9
9
  },
10
10
  decorators: [
11
11
  (Story) => (
12
- <div className="bg-background text-foreground min-h-screen p-6">
12
+ <div className="min-h-screen bg-background p-6 text-foreground">
13
13
  <div className="max-w-2xl">
14
14
  <Story />
15
15
  </div>
16
16
  </div>
17
17
  ),
18
18
  ],
19
- }
19
+ };
20
20
 
21
- export default meta
22
- type Story = StoryObj<typeof GenerativeUI>
21
+ export default meta;
22
+ type Story = StoryObj<typeof GenerativeUI>;
23
23
 
24
24
  /**
25
25
  * Basic layout with Stack and Text components.
@@ -27,22 +27,22 @@ type Story = StoryObj<typeof GenerativeUI>
27
27
  export const BasicLayout: Story = {
28
28
  args: {
29
29
  content: {
30
- type: 'Stack',
31
- props: { direction: 'vertical', gap: 'md' },
30
+ type: "Stack",
31
+ props: { direction: "vertical", gap: "md" },
32
32
  children: [
33
- { type: 'Text', props: { content: 'Hello World', variant: 'heading' } },
33
+ { type: "Text", props: { content: "Hello World", variant: "heading" } },
34
34
  {
35
- type: 'Text',
36
- props: { content: 'This is a body text example.', variant: 'body' },
35
+ type: "Text",
36
+ props: { content: "This is a body text example.", variant: "body" },
37
37
  },
38
38
  {
39
- type: 'Text',
40
- props: { content: 'Caption text for extra info', variant: 'caption' },
39
+ type: "Text",
40
+ props: { content: "Caption text for extra info", variant: "caption" },
41
41
  },
42
42
  ],
43
43
  },
44
44
  },
45
- }
45
+ };
46
46
 
47
47
  /**
48
48
  * Card with metrics displaying key statistics.
@@ -50,31 +50,31 @@ export const BasicLayout: Story = {
50
50
  export const MetricsCard: Story = {
51
51
  args: {
52
52
  content: {
53
- type: 'Card',
54
- props: { title: 'Monthly Overview' },
53
+ type: "Card",
54
+ props: { title: "Monthly Overview" },
55
55
  children: [
56
56
  {
57
- type: 'Grid',
58
- props: { columns: 3, gap: 'md' },
57
+ type: "Grid",
58
+ props: { columns: 3, gap: "md" },
59
59
  children: [
60
60
  {
61
- type: 'Metric',
62
- props: { label: 'Revenue', value: 12500, format: 'currency' },
61
+ type: "Metric",
62
+ props: { label: "Revenue", value: 12500, format: "currency" },
63
63
  },
64
64
  {
65
- type: 'Metric',
66
- props: { label: 'Orders', value: 156, format: 'number' },
65
+ type: "Metric",
66
+ props: { label: "Orders", value: 156, format: "number" },
67
67
  },
68
68
  {
69
- type: 'Metric',
70
- props: { label: 'Conversion', value: 0.032, format: 'percent' },
69
+ type: "Metric",
70
+ props: { label: "Conversion", value: 0.032, format: "percent" },
71
71
  },
72
72
  ],
73
73
  },
74
74
  ],
75
75
  },
76
76
  },
77
- }
77
+ };
78
78
 
79
79
  /**
80
80
  * Data table with headers and rows.
@@ -82,25 +82,25 @@ export const MetricsCard: Story = {
82
82
  export const DataTable: Story = {
83
83
  args: {
84
84
  content: {
85
- type: 'Card',
86
- props: { title: 'Recent Orders' },
85
+ type: "Card",
86
+ props: { title: "Recent Orders" },
87
87
  children: [
88
88
  {
89
- type: 'Table',
89
+ type: "Table",
90
90
  props: {
91
- headers: ['Order ID', 'Customer', 'Amount', 'Status'],
91
+ headers: ["Order ID", "Customer", "Amount", "Status"],
92
92
  rows: [
93
- ['#1001', 'Alice Johnson', '$125.00', 'Shipped'],
94
- ['#1002', 'Bob Smith', '$89.50', 'Processing'],
95
- ['#1003', 'Carol White', '$234.00', 'Delivered'],
96
- ['#1004', 'David Brown', '$56.75', 'Pending'],
93
+ ["#1001", "Alice Johnson", "$125.00", "Shipped"],
94
+ ["#1002", "Bob Smith", "$89.50", "Processing"],
95
+ ["#1003", "Carol White", "$234.00", "Delivered"],
96
+ ["#1004", "David Brown", "$56.75", "Pending"],
97
97
  ],
98
98
  },
99
99
  },
100
100
  ],
101
101
  },
102
102
  },
103
- }
103
+ };
104
104
 
105
105
  /**
106
106
  * Badges showing different status variants.
@@ -108,25 +108,25 @@ export const DataTable: Story = {
108
108
  export const BadgeVariants: Story = {
109
109
  args: {
110
110
  content: {
111
- type: 'Stack',
112
- props: { direction: 'horizontal', gap: 'sm' },
111
+ type: "Stack",
112
+ props: { direction: "horizontal", gap: "sm" },
113
113
  children: [
114
- { type: 'Badge', props: { content: 'Default' } },
114
+ { type: "Badge", props: { content: "Default" } },
115
115
  {
116
- type: 'Badge',
117
- props: { content: 'Secondary', variant: 'secondary' },
116
+ type: "Badge",
117
+ props: { content: "Secondary", variant: "secondary" },
118
118
  },
119
- { type: 'Badge', props: { content: 'Success', variant: 'success' } },
120
- { type: 'Badge', props: { content: 'Warning', variant: 'warning' } },
119
+ { type: "Badge", props: { content: "Success", variant: "success" } },
120
+ { type: "Badge", props: { content: "Warning", variant: "warning" } },
121
121
  {
122
- type: 'Badge',
123
- props: { content: 'Destructive', variant: 'destructive' },
122
+ type: "Badge",
123
+ props: { content: "Destructive", variant: "destructive" },
124
124
  },
125
- { type: 'Badge', props: { content: 'Outline', variant: 'outline' } },
125
+ { type: "Badge", props: { content: "Outline", variant: "outline" } },
126
126
  ],
127
127
  },
128
128
  },
129
- }
129
+ };
130
130
 
131
131
  /**
132
132
  * Alert messages for different contexts.
@@ -134,28 +134,28 @@ export const BadgeVariants: Story = {
134
134
  export const Alerts: Story = {
135
135
  args: {
136
136
  content: {
137
- type: 'Stack',
138
- props: { direction: 'vertical', gap: 'md' },
137
+ type: "Stack",
138
+ props: { direction: "vertical", gap: "md" },
139
139
  children: [
140
140
  {
141
- type: 'Alert',
141
+ type: "Alert",
142
142
  props: {
143
- title: 'Information',
144
- description: 'This is a default informational alert.',
143
+ title: "Information",
144
+ description: "This is a default informational alert.",
145
145
  },
146
146
  },
147
147
  {
148
- type: 'Alert',
148
+ type: "Alert",
149
149
  props: {
150
- title: 'Error',
151
- description: 'Something went wrong. Please try again.',
152
- variant: 'destructive',
150
+ title: "Error",
151
+ description: "Something went wrong. Please try again.",
152
+ variant: "destructive",
153
153
  },
154
154
  },
155
155
  ],
156
156
  },
157
157
  },
158
- }
158
+ };
159
159
 
160
160
  /**
161
161
  * Progress bars showing completion.
@@ -163,35 +163,35 @@ export const Alerts: Story = {
163
163
  export const ProgressBars: Story = {
164
164
  args: {
165
165
  content: {
166
- type: 'Stack',
167
- props: { direction: 'vertical', gap: 'md' },
166
+ type: "Stack",
167
+ props: { direction: "vertical", gap: "md" },
168
168
  children: [
169
169
  {
170
- type: 'Stack',
171
- props: { direction: 'vertical', gap: 'sm' },
170
+ type: "Stack",
171
+ props: { direction: "vertical", gap: "sm" },
172
172
  children: [
173
173
  {
174
- type: 'Text',
175
- props: { content: 'Upload Progress', variant: 'body' },
174
+ type: "Text",
175
+ props: { content: "Upload Progress", variant: "body" },
176
176
  },
177
- { type: 'Progress', props: { value: 75 } },
177
+ { type: "Progress", props: { value: 75 } },
178
178
  ],
179
179
  },
180
180
  {
181
- type: 'Stack',
182
- props: { direction: 'vertical', gap: 'sm' },
181
+ type: "Stack",
182
+ props: { direction: "vertical", gap: "sm" },
183
183
  children: [
184
184
  {
185
- type: 'Text',
186
- props: { content: 'Task Completion', variant: 'body' },
185
+ type: "Text",
186
+ props: { content: "Task Completion", variant: "body" },
187
187
  },
188
- { type: 'Progress', props: { value: 45 } },
188
+ { type: "Progress", props: { value: 45 } },
189
189
  ],
190
190
  },
191
191
  ],
192
192
  },
193
193
  },
194
- }
194
+ };
195
195
 
196
196
  /**
197
197
  * Lists - ordered and unordered.
@@ -199,34 +199,34 @@ export const ProgressBars: Story = {
199
199
  export const Lists: Story = {
200
200
  args: {
201
201
  content: {
202
- type: 'Grid',
203
- props: { columns: 2, gap: 'lg' },
202
+ type: "Grid",
203
+ props: { columns: 2, gap: "lg" },
204
204
  children: [
205
205
  {
206
- type: 'Card',
207
- props: { title: 'Unordered List' },
206
+ type: "Card",
207
+ props: { title: "Unordered List" },
208
208
  children: [
209
209
  {
210
- type: 'List',
210
+ type: "List",
211
211
  props: {
212
212
  items: [
213
- 'First item',
214
- 'Second item',
215
- 'Third item',
216
- 'Fourth item',
213
+ "First item",
214
+ "Second item",
215
+ "Third item",
216
+ "Fourth item",
217
217
  ],
218
218
  },
219
219
  },
220
220
  ],
221
221
  },
222
222
  {
223
- type: 'Card',
224
- props: { title: 'Ordered List' },
223
+ type: "Card",
224
+ props: { title: "Ordered List" },
225
225
  children: [
226
226
  {
227
- type: 'List',
227
+ type: "List",
228
228
  props: {
229
- items: ['Step one', 'Step two', 'Step three', 'Step four'],
229
+ items: ["Step one", "Step two", "Step three", "Step four"],
230
230
  ordered: true,
231
231
  },
232
232
  },
@@ -235,7 +235,7 @@ export const Lists: Story = {
235
235
  ],
236
236
  },
237
237
  },
238
- }
238
+ };
239
239
 
240
240
  /**
241
241
  * Accordion with collapsible sections.
@@ -243,51 +243,51 @@ export const Lists: Story = {
243
243
  export const AccordionExample: Story = {
244
244
  args: {
245
245
  content: {
246
- type: 'Card',
247
- props: { title: 'FAQ' },
246
+ type: "Card",
247
+ props: { title: "FAQ" },
248
248
  children: [
249
249
  {
250
- type: 'Accordion',
251
- props: { type: 'single' },
250
+ type: "Accordion",
251
+ props: { type: "single" },
252
252
  children: [
253
253
  {
254
- type: 'AccordionItem',
255
- props: { value: 'q1', title: 'What is your return policy?' },
254
+ type: "AccordionItem",
255
+ props: { value: "q1", title: "What is your return policy?" },
256
256
  children: [
257
257
  {
258
- type: 'Text',
258
+ type: "Text",
259
259
  props: {
260
260
  content:
261
- 'We offer a 30-day return policy for all unused items in original packaging.',
262
- variant: 'body',
261
+ "We offer a 30-day return policy for all unused items in original packaging.",
262
+ variant: "body",
263
263
  },
264
264
  },
265
265
  ],
266
266
  },
267
267
  {
268
- type: 'AccordionItem',
269
- props: { value: 'q2', title: 'How long does shipping take?' },
268
+ type: "AccordionItem",
269
+ props: { value: "q2", title: "How long does shipping take?" },
270
270
  children: [
271
271
  {
272
- type: 'Text',
272
+ type: "Text",
273
273
  props: {
274
274
  content:
275
- 'Standard shipping takes 5-7 business days. Express shipping is available for 2-3 day delivery.',
276
- variant: 'body',
275
+ "Standard shipping takes 5-7 business days. Express shipping is available for 2-3 day delivery.",
276
+ variant: "body",
277
277
  },
278
278
  },
279
279
  ],
280
280
  },
281
281
  {
282
- type: 'AccordionItem',
283
- props: { value: 'q3', title: 'Do you ship internationally?' },
282
+ type: "AccordionItem",
283
+ props: { value: "q3", title: "Do you ship internationally?" },
284
284
  children: [
285
285
  {
286
- type: 'Text',
286
+ type: "Text",
287
287
  props: {
288
288
  content:
289
- 'Yes! We ship to over 50 countries worldwide. Shipping costs vary by destination.',
290
- variant: 'body',
289
+ "Yes! We ship to over 50 countries worldwide. Shipping costs vary by destination.",
290
+ variant: "body",
291
291
  },
292
292
  },
293
293
  ],
@@ -297,7 +297,7 @@ export const AccordionExample: Story = {
297
297
  ],
298
298
  },
299
299
  },
300
- }
300
+ };
301
301
 
302
302
  /**
303
303
  * Tabs with multiple content panels.
@@ -305,60 +305,60 @@ export const AccordionExample: Story = {
305
305
  export const TabsExample: Story = {
306
306
  args: {
307
307
  content: {
308
- type: 'Card',
309
- props: { title: 'Product Details' },
308
+ type: "Card",
309
+ props: { title: "Product Details" },
310
310
  children: [
311
311
  {
312
- type: 'Tabs',
312
+ type: "Tabs",
313
313
  props: {
314
- defaultValue: 'overview',
314
+ defaultValue: "overview",
315
315
  tabs: [
316
- { value: 'overview', label: 'Overview' },
317
- { value: 'specs', label: 'Specifications' },
318
- { value: 'reviews', label: 'Reviews' },
316
+ { value: "overview", label: "Overview" },
317
+ { value: "specs", label: "Specifications" },
318
+ { value: "reviews", label: "Reviews" },
319
319
  ],
320
320
  },
321
321
  children: [
322
322
  {
323
- type: 'TabContent',
324
- props: { value: 'overview' },
323
+ type: "TabContent",
324
+ props: { value: "overview" },
325
325
  children: [
326
326
  {
327
- type: 'Text',
327
+ type: "Text",
328
328
  props: {
329
329
  content:
330
- 'This premium product features cutting-edge technology and elegant design.',
331
- variant: 'body',
330
+ "This premium product features cutting-edge technology and elegant design.",
331
+ variant: "body",
332
332
  },
333
333
  },
334
334
  ],
335
335
  },
336
336
  {
337
- type: 'TabContent',
338
- props: { value: 'specs' },
337
+ type: "TabContent",
338
+ props: { value: "specs" },
339
339
  children: [
340
340
  {
341
- type: 'List',
341
+ type: "List",
342
342
  props: {
343
343
  items: [
344
- 'Weight: 1.2 kg',
345
- 'Dimensions: 30x20x10 cm',
346
- 'Material: Aluminum',
347
- 'Battery: 10 hours',
344
+ "Weight: 1.2 kg",
345
+ "Dimensions: 30x20x10 cm",
346
+ "Material: Aluminum",
347
+ "Battery: 10 hours",
348
348
  ],
349
349
  },
350
350
  },
351
351
  ],
352
352
  },
353
353
  {
354
- type: 'TabContent',
355
- props: { value: 'reviews' },
354
+ type: "TabContent",
355
+ props: { value: "reviews" },
356
356
  children: [
357
357
  {
358
- type: 'Text',
358
+ type: "Text",
359
359
  props: {
360
- content: '4.8 out of 5 stars based on 256 reviews',
361
- variant: 'body',
360
+ content: "4.8 out of 5 stars based on 256 reviews",
361
+ variant: "body",
362
362
  },
363
363
  },
364
364
  ],
@@ -368,7 +368,7 @@ export const TabsExample: Story = {
368
368
  ],
369
369
  },
370
370
  },
371
- }
371
+ };
372
372
 
373
373
  /**
374
374
  * Form elements - inputs, checkboxes, and selects.
@@ -376,60 +376,60 @@ export const TabsExample: Story = {
376
376
  export const FormElements: Story = {
377
377
  args: {
378
378
  content: {
379
- type: 'Card',
380
- props: { title: 'Contact Form' },
379
+ type: "Card",
380
+ props: { title: "Contact Form" },
381
381
  children: [
382
382
  {
383
- type: 'Stack',
384
- props: { direction: 'vertical', gap: 'md' },
383
+ type: "Stack",
384
+ props: { direction: "vertical", gap: "md" },
385
385
  children: [
386
386
  {
387
- type: 'Input',
387
+ type: "Input",
388
388
  props: {
389
- label: 'Full Name',
390
- placeholder: 'Enter your name',
391
- valuePath: 'name',
389
+ label: "Full Name",
390
+ placeholder: "Enter your name",
391
+ valuePath: "name",
392
392
  },
393
393
  },
394
394
  {
395
- type: 'Input',
395
+ type: "Input",
396
396
  props: {
397
- label: 'Email',
398
- placeholder: 'Enter your email',
399
- type: 'email',
400
- valuePath: 'email',
397
+ label: "Email",
398
+ placeholder: "Enter your email",
399
+ type: "email",
400
+ valuePath: "email",
401
401
  },
402
402
  },
403
403
  {
404
- type: 'Select',
404
+ type: "Select",
405
405
  props: {
406
- placeholder: 'Select a topic',
407
- valuePath: 'topic',
406
+ placeholder: "Select a topic",
407
+ valuePath: "topic",
408
408
  options: [
409
- { value: 'general', label: 'General Inquiry' },
410
- { value: 'support', label: 'Technical Support' },
411
- { value: 'sales', label: 'Sales Question' },
412
- { value: 'feedback', label: 'Feedback' },
409
+ { value: "general", label: "General Inquiry" },
410
+ { value: "support", label: "Technical Support" },
411
+ { value: "sales", label: "Sales Question" },
412
+ { value: "feedback", label: "Feedback" },
413
413
  ],
414
414
  },
415
415
  },
416
416
  {
417
- type: 'Checkbox',
417
+ type: "Checkbox",
418
418
  props: {
419
- label: 'Subscribe to newsletter',
420
- valuePath: 'subscribe',
419
+ label: "Subscribe to newsletter",
420
+ valuePath: "subscribe",
421
421
  },
422
422
  },
423
423
  {
424
- type: 'Button',
425
- props: { label: 'Submit', variant: 'default' },
424
+ type: "Button",
425
+ props: { label: "Submit", variant: "default" },
426
426
  },
427
427
  ],
428
428
  },
429
429
  ],
430
430
  },
431
431
  },
432
- }
432
+ };
433
433
 
434
434
  /**
435
435
  * Avatar and skeleton loading states.
@@ -437,29 +437,29 @@ export const FormElements: Story = {
437
437
  export const AvatarsAndSkeletons: Story = {
438
438
  args: {
439
439
  content: {
440
- type: 'Stack',
441
- props: { direction: 'vertical', gap: 'lg' },
440
+ type: "Stack",
441
+ props: { direction: "vertical", gap: "lg" },
442
442
  children: [
443
443
  {
444
- type: 'Stack',
445
- props: { direction: 'horizontal', gap: 'md', align: 'center' },
444
+ type: "Stack",
445
+ props: { direction: "horizontal", gap: "md", align: "center" },
446
446
  children: [
447
- { type: 'Avatar', props: { fallback: 'JD' } },
448
- { type: 'Avatar', props: { fallback: 'AS' } },
449
- { type: 'Avatar', props: { fallback: 'MK' } },
447
+ { type: "Avatar", props: { fallback: "JD" } },
448
+ { type: "Avatar", props: { fallback: "AS" } },
449
+ { type: "Avatar", props: { fallback: "MK" } },
450
450
  ],
451
451
  },
452
452
  {
453
- type: 'Card',
454
- props: { title: 'Loading State' },
453
+ type: "Card",
454
+ props: { title: "Loading State" },
455
455
  children: [
456
456
  {
457
- type: 'Stack',
458
- props: { direction: 'vertical', gap: 'sm' },
457
+ type: "Stack",
458
+ props: { direction: "vertical", gap: "sm" },
459
459
  children: [
460
- { type: 'Skeleton', props: { height: '1.5rem', width: '60%' } },
461
- { type: 'Skeleton', props: { height: '1rem', width: '100%' } },
462
- { type: 'Skeleton', props: { height: '1rem', width: '80%' } },
460
+ { type: "Skeleton", props: { height: "1.5rem", width: "60%" } },
461
+ { type: "Skeleton", props: { height: "1rem", width: "100%" } },
462
+ { type: "Skeleton", props: { height: "1rem", width: "80%" } },
463
463
  ],
464
464
  },
465
465
  ],
@@ -467,7 +467,7 @@ export const AvatarsAndSkeletons: Story = {
467
467
  ],
468
468
  },
469
469
  },
470
- }
470
+ };
471
471
 
472
472
  /**
473
473
  * Complete dashboard example combining multiple components.
@@ -475,77 +475,77 @@ export const AvatarsAndSkeletons: Story = {
475
475
  export const Dashboard: Story = {
476
476
  args: {
477
477
  content: {
478
- type: 'Stack',
479
- props: { direction: 'vertical', gap: 'lg' },
478
+ type: "Stack",
479
+ props: { direction: "vertical", gap: "lg" },
480
480
  children: [
481
481
  {
482
- type: 'Text',
483
- props: { content: 'Store Dashboard', variant: 'heading' },
482
+ type: "Text",
483
+ props: { content: "Store Dashboard", variant: "heading" },
484
484
  },
485
485
  {
486
- type: 'Grid',
487
- props: { columns: 4, gap: 'md' },
486
+ type: "Grid",
487
+ props: { columns: 4, gap: "md" },
488
488
  children: [
489
489
  {
490
- type: 'Card',
490
+ type: "Card",
491
491
  children: [
492
492
  {
493
- type: 'Metric',
493
+ type: "Metric",
494
494
  props: {
495
- label: 'Total Revenue',
495
+ label: "Total Revenue",
496
496
  value: 45231,
497
- format: 'currency',
497
+ format: "currency",
498
498
  },
499
499
  },
500
500
  ],
501
501
  },
502
502
  {
503
- type: 'Card',
503
+ type: "Card",
504
504
  children: [
505
505
  {
506
- type: 'Metric',
507
- props: { label: 'Orders', value: 1234, format: 'number' },
506
+ type: "Metric",
507
+ props: { label: "Orders", value: 1234, format: "number" },
508
508
  },
509
509
  ],
510
510
  },
511
511
  {
512
- type: 'Card',
512
+ type: "Card",
513
513
  children: [
514
514
  {
515
- type: 'Metric',
516
- props: { label: 'Customers', value: 567, format: 'number' },
515
+ type: "Metric",
516
+ props: { label: "Customers", value: 567, format: "number" },
517
517
  },
518
518
  ],
519
519
  },
520
520
  {
521
- type: 'Card',
521
+ type: "Card",
522
522
  children: [
523
523
  {
524
- type: 'Metric',
524
+ type: "Metric",
525
525
  props: {
526
- label: 'Conversion',
526
+ label: "Conversion",
527
527
  value: 0.0312,
528
- format: 'percent',
528
+ format: "percent",
529
529
  },
530
530
  },
531
531
  ],
532
532
  },
533
533
  ],
534
534
  },
535
- { type: 'Separator' },
535
+ { type: "Separator" },
536
536
  {
537
- type: 'Card',
538
- props: { title: 'Recent Orders' },
537
+ type: "Card",
538
+ props: { title: "Recent Orders" },
539
539
  children: [
540
540
  {
541
- type: 'Table',
541
+ type: "Table",
542
542
  props: {
543
- headers: ['Order', 'Customer', 'Status', 'Amount'],
543
+ headers: ["Order", "Customer", "Status", "Amount"],
544
544
  rows: [
545
- ['#3210', 'Olivia Martin', 'Shipped', '$42.25'],
546
- ['#3209', 'Ava Johnson', 'Processing', '$74.99'],
547
- ['#3208', 'Michael Chen', 'Delivered', '$124.00'],
548
- ['#3207', 'Lisa Wang', 'Pending', '$64.75'],
545
+ ["#3210", "Olivia Martin", "Shipped", "$42.25"],
546
+ ["#3209", "Ava Johnson", "Processing", "$74.99"],
547
+ ["#3208", "Michael Chen", "Delivered", "$124.00"],
548
+ ["#3207", "Lisa Wang", "Pending", "$64.75"],
549
549
  ],
550
550
  },
551
551
  },
@@ -554,4 +554,4 @@ export const Dashboard: Story = {
554
554
  ],
555
555
  },
556
556
  },
557
- }
557
+ };