@object-ui/components 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/.turbo/turbo-build.log +47 -0
  2. package/README.md +13 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +34610 -24854
  5. package/dist/index.umd.cjs +53 -32
  6. package/dist/src/SchemaRenderer.d.ts +3 -0
  7. package/dist/src/{ui → custom}/button-group.d.ts +1 -1
  8. package/dist/src/custom/field.d.ts +19 -0
  9. package/dist/src/custom/index.d.ts +12 -0
  10. package/dist/src/custom/input-group.d.ts +14 -0
  11. package/dist/src/{ui → custom}/item.d.ts +1 -1
  12. package/dist/src/custom/native-select.d.ts +12 -0
  13. package/dist/src/custom/sort-builder.d.ts +22 -0
  14. package/dist/src/index.d.ts +1 -0
  15. package/dist/src/renderers/data-display/table.d.ts +1 -1
  16. package/dist/src/renderers/layout/page.d.ts +1 -1
  17. package/dist/src/renderers/placeholders.d.ts +1 -1
  18. package/dist/src/ui/accordion.d.ts +4 -4
  19. package/dist/src/ui/alert-dialog.d.ts +17 -11
  20. package/dist/src/ui/alert.d.ts +4 -5
  21. package/dist/src/ui/aspect-ratio.d.ts +1 -1
  22. package/dist/src/ui/avatar.d.ts +3 -3
  23. package/dist/src/ui/badge.d.ts +3 -3
  24. package/dist/src/ui/breadcrumb.d.ts +16 -8
  25. package/dist/src/ui/calendar.d.ts +7 -7
  26. package/dist/src/ui/card.d.ts +7 -8
  27. package/dist/src/ui/carousel.d.ts +5 -6
  28. package/dist/src/ui/chart.d.ts +62 -0
  29. package/dist/src/ui/checkbox.d.ts +1 -1
  30. package/dist/src/ui/collapsible.d.ts +3 -3
  31. package/dist/src/ui/command.d.ts +78 -16
  32. package/dist/src/ui/context-menu.d.ts +14 -12
  33. package/dist/src/ui/dialog.d.ts +17 -13
  34. package/dist/src/ui/drawer.d.ts +19 -10
  35. package/dist/src/ui/dropdown-menu.d.ts +20 -18
  36. package/dist/src/ui/form.d.ts +6 -7
  37. package/dist/src/ui/hover-card.d.ts +3 -3
  38. package/dist/src/ui/index.d.ts +2 -8
  39. package/dist/src/ui/input-otp.d.ts +30 -7
  40. package/dist/src/ui/label.d.ts +2 -1
  41. package/dist/src/ui/menubar.d.ts +19 -17
  42. package/dist/src/ui/navigation-menu.d.ts +9 -11
  43. package/dist/src/ui/pagination.d.ts +25 -10
  44. package/dist/src/ui/popover.d.ts +4 -5
  45. package/dist/src/ui/progress.d.ts +1 -1
  46. package/dist/src/ui/radio-group.d.ts +2 -2
  47. package/dist/src/ui/resizable.d.ts +5 -8
  48. package/dist/src/ui/scroll-area.d.ts +2 -2
  49. package/dist/src/ui/select.d.ts +11 -13
  50. package/dist/src/ui/sheet.d.ts +23 -11
  51. package/dist/src/ui/sidebar.d.ts +27 -29
  52. package/dist/src/ui/skeleton.d.ts +1 -1
  53. package/dist/src/ui/slider.d.ts +1 -1
  54. package/dist/src/ui/sonner.d.ts +2 -1
  55. package/dist/src/ui/switch.d.ts +2 -2
  56. package/dist/src/ui/tabs.d.ts +1 -1
  57. package/dist/src/ui/textarea.d.ts +1 -1
  58. package/dist/src/ui/toast.d.ts +22 -0
  59. package/dist/src/ui/toggle-group.d.ts +8 -3
  60. package/dist/src/ui/toggle.d.ts +4 -1
  61. package/dist/src/ui/tooltip.d.ts +4 -4
  62. package/dist/src/ui/typography.d.ts +21 -0
  63. package/package.json +17 -7
  64. package/shadcn-components.json +52 -47
  65. package/src/SchemaRenderer.tsx +28 -0
  66. package/src/__tests__/PageRendererRegions.test.tsx +59 -0
  67. package/src/__tests__/Registry.test.ts +21 -0
  68. package/src/__tests__/basic-renderers.test.tsx +1 -1
  69. package/src/__tests__/complex-disclosure-renderers.test.tsx +3 -2
  70. package/src/__tests__/feedback-overlay-renderers.test.tsx +1 -1
  71. package/src/__tests__/form-renderers.test.tsx +1 -1
  72. package/src/__tests__/layout-data-renderers.test.tsx +1 -1
  73. package/src/{ui → custom}/button-group.tsx +1 -1
  74. package/src/{ui → custom}/combobox.tsx +3 -3
  75. package/src/{ui → custom}/date-picker.tsx +3 -3
  76. package/src/custom/field.tsx +81 -0
  77. package/src/{ui → custom}/filter-builder.tsx +3 -3
  78. package/src/custom/index.ts +12 -0
  79. package/src/custom/input-group.tsx +53 -0
  80. package/src/{ui → custom}/item.tsx +1 -1
  81. package/src/custom/native-select.tsx +33 -0
  82. package/src/custom/sort-builder.tsx +129 -0
  83. package/src/index.css +20 -1
  84. package/src/index.ts +1 -0
  85. package/src/renderers/basic/button-group.tsx +1 -0
  86. package/src/renderers/basic/div.tsx +12 -1
  87. package/src/renderers/basic/html.tsx +1 -0
  88. package/src/renderers/basic/icon.tsx +1 -0
  89. package/src/renderers/basic/image.tsx +1 -0
  90. package/src/renderers/basic/navigation-menu.tsx +1 -0
  91. package/src/renderers/basic/pagination.tsx +31 -4
  92. package/src/renderers/basic/separator.tsx +1 -0
  93. package/src/renderers/basic/span.tsx +12 -1
  94. package/src/renderers/basic/text.tsx +4 -2
  95. package/src/renderers/complex/carousel.tsx +1 -0
  96. package/src/renderers/complex/data-table.tsx +134 -95
  97. package/src/renderers/complex/filter-builder.tsx +2 -1
  98. package/src/renderers/complex/resizable.tsx +2 -1
  99. package/src/renderers/complex/scroll-area.tsx +25 -7
  100. package/src/renderers/complex/table.tsx +1 -0
  101. package/src/renderers/data-display/alert.tsx +1 -0
  102. package/src/renderers/data-display/avatar.tsx +1 -0
  103. package/src/renderers/data-display/badge.tsx +1 -0
  104. package/src/renderers/data-display/breadcrumb.tsx +1 -0
  105. package/src/renderers/data-display/kbd.tsx +1 -0
  106. package/src/renderers/data-display/list.tsx +21 -49
  107. package/src/renderers/data-display/statistic.tsx +21 -5
  108. package/src/renderers/data-display/table.tsx +21 -11
  109. package/src/renderers/data-display/tree-view.tsx +7 -1
  110. package/src/renderers/disclosure/accordion.tsx +1 -0
  111. package/src/renderers/disclosure/collapsible.tsx +1 -0
  112. package/src/renderers/disclosure/toggle-group.tsx +2 -0
  113. package/src/renderers/feedback/empty.tsx +1 -0
  114. package/src/renderers/feedback/loading.tsx +2 -1
  115. package/src/renderers/feedback/progress.tsx +1 -0
  116. package/src/renderers/feedback/skeleton.tsx +1 -0
  117. package/src/renderers/feedback/sonner.tsx +1 -0
  118. package/src/renderers/feedback/spinner.tsx +1 -0
  119. package/src/renderers/feedback/toast.tsx +1 -0
  120. package/src/renderers/feedback/toaster.tsx +1 -0
  121. package/src/renderers/form/button.tsx +35 -1
  122. package/src/renderers/form/calendar.tsx +1 -0
  123. package/src/renderers/form/checkbox.tsx +38 -16
  124. package/src/renderers/form/combobox.tsx +2 -1
  125. package/src/renderers/form/command.tsx +1 -0
  126. package/src/renderers/form/date-picker.tsx +1 -0
  127. package/src/renderers/form/file-upload.tsx +1 -0
  128. package/src/renderers/form/form.tsx +92 -15
  129. package/src/renderers/form/input-otp.tsx +1 -0
  130. package/src/renderers/form/input.tsx +3 -0
  131. package/src/renderers/form/label.tsx +1 -0
  132. package/src/renderers/form/radio-group.tsx +1 -0
  133. package/src/renderers/form/select.tsx +35 -15
  134. package/src/renderers/form/slider.tsx +1 -0
  135. package/src/renderers/form/switch.tsx +1 -0
  136. package/src/renderers/form/textarea.tsx +50 -27
  137. package/src/renderers/form/toggle.tsx +3 -45
  138. package/src/renderers/layout/aspect-ratio.tsx +2 -1
  139. package/src/renderers/layout/card.tsx +10 -2
  140. package/src/renderers/layout/container.tsx +1 -0
  141. package/src/renderers/layout/flex.tsx +1 -0
  142. package/src/renderers/layout/grid.tsx +23 -8
  143. package/src/renderers/layout/page.tsx +35 -23
  144. package/src/renderers/layout/semantic.tsx +1 -0
  145. package/src/renderers/layout/stack.tsx +2 -1
  146. package/src/renderers/layout/tabs.tsx +43 -17
  147. package/src/renderers/navigation/header-bar.tsx +1 -0
  148. package/src/renderers/navigation/sidebar.tsx +5 -0
  149. package/src/renderers/overlay/alert-dialog.tsx +1 -0
  150. package/src/renderers/overlay/context-menu.tsx +1 -0
  151. package/src/renderers/overlay/dialog.tsx +1 -0
  152. package/src/renderers/overlay/drawer.tsx +1 -0
  153. package/src/renderers/overlay/dropdown-menu.tsx +1 -0
  154. package/src/renderers/overlay/hover-card.tsx +1 -0
  155. package/src/renderers/overlay/menubar.tsx +1 -0
  156. package/src/renderers/overlay/popover.tsx +1 -0
  157. package/src/renderers/overlay/sheet.tsx +1 -0
  158. package/src/renderers/overlay/tooltip.tsx +1 -0
  159. package/src/renderers/placeholders.tsx +2 -2
  160. package/src/stories/CRMApp.stories.tsx +706 -0
  161. package/src/stories/Guide.mdx +55 -0
  162. package/src/stories/Introduction.mdx +34 -0
  163. package/src/stories/MockedData.stories.tsx +71 -0
  164. package/src/stories/assets/accessibility.png +0 -0
  165. package/src/stories/assets/accessibility.svg +1 -0
  166. package/src/stories/assets/addon-library.png +0 -0
  167. package/src/stories/assets/assets.png +0 -0
  168. package/src/stories/assets/avif-test-image.avif +0 -0
  169. package/src/stories/assets/context.png +0 -0
  170. package/src/stories/assets/discord.svg +1 -0
  171. package/src/stories/assets/docs.png +0 -0
  172. package/src/stories/assets/figma-plugin.png +0 -0
  173. package/src/stories/assets/github.svg +1 -0
  174. package/src/stories/assets/share.png +0 -0
  175. package/src/stories/assets/styling.png +0 -0
  176. package/src/stories/assets/testing.png +0 -0
  177. package/src/stories/assets/theming.png +0 -0
  178. package/src/stories/assets/tutorials.svg +1 -0
  179. package/src/stories/assets/youtube.svg +1 -0
  180. package/src/stories/button.css +30 -0
  181. package/src/stories/header.css +32 -0
  182. package/src/stories/page.css +68 -0
  183. package/src/stories-json/accordion.stories.tsx +43 -0
  184. package/src/stories-json/aggrid.stories.tsx +103 -0
  185. package/src/stories-json/alert.stories.tsx +39 -0
  186. package/src/stories-json/aspect-ratio.stories.tsx +34 -0
  187. package/src/stories-json/avatar.stories.tsx +38 -0
  188. package/src/stories-json/badge.stories.tsx +53 -0
  189. package/src/stories-json/breadcrumb.stories.tsx +30 -0
  190. package/src/stories-json/button-group.stories.tsx +43 -0
  191. package/src/stories-json/button.stories.tsx +73 -0
  192. package/src/stories-json/calendar.stories.tsx +85 -0
  193. package/src/stories-json/card.stories.tsx +48 -0
  194. package/src/stories-json/carousel.stories.tsx +33 -0
  195. package/src/stories-json/charts.stories.tsx +195 -0
  196. package/src/stories-json/chatbot.stories.tsx +248 -0
  197. package/src/stories-json/code-editor.stories.tsx +92 -0
  198. package/src/stories-json/collapsible.stories.tsx +40 -0
  199. package/src/stories-json/controls.stories.tsx +36 -0
  200. package/src/stories-json/dashboard.stories.tsx +318 -0
  201. package/src/stories-json/data-table.stories.tsx +60 -0
  202. package/src/stories-json/data_display_extras.stories.tsx +102 -0
  203. package/src/stories-json/date-picker.stories.tsx +28 -0
  204. package/src/stories-json/detail-view.stories.tsx +258 -0
  205. package/src/stories-json/dialog.stories.tsx +43 -0
  206. package/src/stories-json/feedback_extras.stories.tsx +40 -0
  207. package/src/stories-json/feedback_others.stories.tsx +46 -0
  208. package/src/stories-json/form_advanced.stories.tsx +117 -0
  209. package/src/stories-json/form_extras.stories.tsx +123 -0
  210. package/src/stories-json/grid.stories.tsx +56 -0
  211. package/src/stories-json/icon.stories.tsx +36 -0
  212. package/src/stories-json/input.stories.tsx +52 -0
  213. package/src/stories-json/kanban.stories.tsx +295 -0
  214. package/src/stories-json/layout_extended.stories.tsx +76 -0
  215. package/src/stories-json/layout_flex.stories.tsx +107 -0
  216. package/src/stories-json/list-view.stories.tsx +97 -0
  217. package/src/stories-json/markdown.stories.tsx +129 -0
  218. package/src/stories-json/menus.stories.tsx +63 -0
  219. package/src/stories-json/metric-card.stories.tsx +143 -0
  220. package/src/stories-json/navigation-menu.stories.tsx +37 -0
  221. package/src/stories-json/object-aggrid.stories.tsx +252 -0
  222. package/src/stories-json/object-form.stories.tsx +130 -0
  223. package/src/stories-json/object-gantt.stories.tsx +114 -0
  224. package/src/stories-json/object-grid.stories.tsx +157 -0
  225. package/src/stories-json/object-map.stories.tsx +116 -0
  226. package/src/stories-json/object-view.stories.tsx +118 -0
  227. package/src/stories-json/overlay_extras.stories.tsx +113 -0
  228. package/src/stories-json/overlay_others.stories.tsx +76 -0
  229. package/src/stories-json/page.stories.tsx +55 -0
  230. package/src/stories-json/reports.stories.tsx +163 -0
  231. package/src/stories-json/resizable.stories.tsx +44 -0
  232. package/src/stories-json/select.stories.tsx +34 -0
  233. package/src/stories-json/separator.stories.tsx +41 -0
  234. package/src/stories-json/sidebar.stories.tsx +147 -0
  235. package/src/stories-json/statistic.stories.tsx +44 -0
  236. package/src/stories-json/tabs.stories.tsx +51 -0
  237. package/src/stories-json/timeline.stories.tsx +188 -0
  238. package/src/stories-json/typography.stories.tsx +45 -0
  239. package/src/ui/accordion.tsx +47 -53
  240. package/src/ui/alert-dialog.tsx +103 -117
  241. package/src/ui/alert.tsx +35 -36
  242. package/src/ui/aspect-ratio.tsx +1 -5
  243. package/src/ui/avatar.tsx +41 -42
  244. package/src/ui/badge.tsx +6 -15
  245. package/src/ui/breadcrumb.tsx +81 -75
  246. package/src/ui/button.tsx +10 -11
  247. package/src/ui/calendar.tsx +178 -51
  248. package/src/ui/card.tsx +51 -110
  249. package/src/ui/carousel.tsx +136 -113
  250. package/src/ui/chart.tsx +367 -0
  251. package/src/ui/checkbox.tsx +20 -22
  252. package/src/ui/collapsible.tsx +5 -25
  253. package/src/ui/command.tsx +106 -135
  254. package/src/ui/context-menu.tsx +69 -116
  255. package/src/ui/dialog.tsx +94 -113
  256. package/src/ui/drawer.tsx +82 -99
  257. package/src/ui/dropdown-menu.tsx +134 -188
  258. package/src/ui/form.tsx +51 -40
  259. package/src/ui/hover-card.tsx +18 -33
  260. package/src/ui/index.ts +2 -8
  261. package/src/ui/input-otp.tsx +42 -52
  262. package/src/ui/input.tsx +13 -15
  263. package/src/ui/label.tsx +17 -15
  264. package/src/ui/menubar.tsx +188 -206
  265. package/src/ui/navigation-menu.tsx +96 -136
  266. package/src/ui/pagination.tsx +86 -96
  267. package/src/ui/popover.tsx +24 -41
  268. package/src/ui/progress.tsx +21 -22
  269. package/src/ui/radio-group.tsx +19 -20
  270. package/src/ui/resizable.tsx +32 -42
  271. package/src/ui/scroll-area.tsx +38 -48
  272. package/src/ui/select.tsx +129 -157
  273. package/src/ui/separator.tsx +2 -2
  274. package/src/ui/sheet.tsx +110 -107
  275. package/src/ui/sidebar.tsx +442 -408
  276. package/src/ui/skeleton.tsx +6 -11
  277. package/src/ui/slider.tsx +19 -54
  278. package/src/ui/sonner.tsx +19 -1
  279. package/src/ui/switch.tsx +19 -21
  280. package/src/ui/tabs.tsx +6 -37
  281. package/src/ui/textarea.tsx +8 -4
  282. package/src/ui/toast.tsx +137 -0
  283. package/src/ui/toggle-group.tsx +28 -37
  284. package/src/ui/toggle.tsx +19 -19
  285. package/src/ui/tooltip.tsx +21 -52
  286. package/src/ui/typography.tsx +85 -0
  287. package/tsconfig.json +1 -1
  288. package/vite.config.ts +9 -1
  289. package/vitest.config.ts +5 -0
  290. package/ISSUES_FOUND.md +0 -128
  291. /package/dist/src/{ui → custom}/combobox.d.ts +0 -0
  292. /package/dist/src/{ui → custom}/date-picker.d.ts +0 -0
  293. /package/dist/src/{ui → custom}/empty.d.ts +0 -0
  294. /package/dist/src/{ui → custom}/filter-builder.d.ts +0 -0
  295. /package/dist/src/{ui → custom}/kbd.d.ts +0 -0
  296. /package/dist/src/{ui → custom}/spinner.d.ts +0 -0
  297. /package/src/{ui → custom}/empty.tsx +0 -0
  298. /package/src/{ui → custom}/kbd.tsx +0 -0
  299. /package/src/{ui → custom}/spinner.tsx +0 -0
@@ -0,0 +1,706 @@
1
+
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import React, { useState } from 'react';
4
+ import { SchemaRenderer, SchemaRendererProvider } from '@object-ui/react';
5
+ import { SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuButton } from '../ui/sidebar';
6
+ import {
7
+ LayoutDashboard,
8
+ Users,
9
+ Settings,
10
+ FileText,
11
+ GalleryVerticalEnd,
12
+ Building2,
13
+ UserPlus,
14
+ TrendingUp
15
+ } from 'lucide-react';
16
+
17
+ /* --- MOCK DATA --- */
18
+
19
+ const DASHBOARD_DATA = {
20
+ revenue: "$45,231.89",
21
+ subscriptions: "+2350",
22
+ sales: "+12,234",
23
+ revenueGrowth: "+20.1% from last month",
24
+ subGrowth: "+180.1% from last month",
25
+ salesGrowth: "+19% from last month",
26
+ overview: [
27
+ { name: "Jan", total: 1200 }, { name: "Feb", total: 1500 }, { name: "Mar", total: 1300 },
28
+ { name: "Apr", total: 1800 }, { name: "May", total: 2200 }, { name: "Jun", total: 2600 }
29
+ ],
30
+ // For view:simple list
31
+ recentSales: [
32
+ { name: "Olivia Martin", email: "olivia.martin@email.com", amount: "+$1,999.00" },
33
+ // ... handled manually in schema for view:simple until we support loops
34
+ ]
35
+ };
36
+
37
+ const CONTACTS_DATA = {
38
+ contacts: [
39
+ { id: 1, name: "Alice Johnson", company: "TechCorp", email: "alice@techcorp.com", status: "Active" },
40
+ { id: 2, name: "Bob Smith", company: "SalesInc", email: "bob@salesinc.com", status: "Inactive" },
41
+ { id: 3, name: "Charlie Davis", company: "StartupHub", email: "charlie@startuphub.com", status: "Lead" },
42
+ { id: 4, name: "Dana Wilson", company: "Enterprise Ltd", email: "dana@enterprise.com", status: "Active" },
43
+ { id: 5, name: "Evan Brown", company: "Innovate LLC", email: "evan@innovate.com", status: "Active" },
44
+ ]
45
+ };
46
+
47
+ const OPPORTUNITIES_DATA = {
48
+ opportunities: [
49
+ { id: 101, name: "TechCorp License Renewal", amount: 50000, stage: "Negotiation", probability: "80%", closeDate: "2026-02-15", contact: "Alice Johnson" },
50
+ { id: 102, name: "SalesInc New Deal", amount: 12000, stage: "Qualified", probability: "40%", closeDate: "2026-03-01", contact: "Bob Smith" },
51
+ { id: 103, name: "StartupHub Seed", amount: 5000, stage: "Closed Won", probability: "100%", closeDate: "2026-01-20", contact: "Charlie Davis" },
52
+ { id: 104, name: "Enterprise Ltd Expansion", amount: 150000, stage: "Proposal", probability: "60%", closeDate: "2026-02-28", contact: "Dana Wilson" }
53
+ ]
54
+ };
55
+
56
+ const ACCOUNTS_DATA = {
57
+ accounts: [
58
+ { id: 1, name: "TechCorp", industry: "Technology", revenue: 5000000, employees: 250, status: "Active" },
59
+ { id: 2, name: "SalesInc", industry: "Sales & Marketing", revenue: 1200000, employees: 50, status: "Active" },
60
+ { id: 3, name: "StartupHub", industry: "Venture Capital", revenue: 500000, employees: 15, status: "Lead" },
61
+ { id: 4, name: "Enterprise Ltd", industry: "Enterprise Software", revenue: 15000000, employees: 500, status: "Active" },
62
+ { id: 5, name: "Innovate LLC", industry: "Innovation", revenue: 3000000, employees: 100, status: "Active" }
63
+ ]
64
+ };
65
+
66
+ const CONTACT_DETAIL_DATA = {
67
+ id: 1,
68
+ name: "Alice Johnson",
69
+ company: "TechCorp",
70
+ email: "alice@techcorp.com",
71
+ status: "Active"
72
+ };
73
+
74
+ const OPPORTUNITY_DETAIL_DATA = {
75
+ id: 101,
76
+ name: "TechCorp License Renewal",
77
+ amount: 50000,
78
+ stage: "Negotiation",
79
+ probability: "80%",
80
+ closeDate: "2026-02-15",
81
+ contact: "Alice Johnson",
82
+ expectedRevenue: 40000,
83
+ daysToClose: 15
84
+ };
85
+
86
+ /* --- SCHEMAS --- */
87
+
88
+ const dashboardSchema = {
89
+ type: "page",
90
+ props: { title: "Dashboard" },
91
+ children: [
92
+ {
93
+ type: "div",
94
+ className: "flex items-center justify-between mb-6",
95
+ children: [
96
+ {
97
+ type: "page:header",
98
+ props: { title: "Dashboard", description: "Overview of your business performance." },
99
+ className: "mb-0"
100
+ },
101
+ {
102
+ type: "div",
103
+ className: "flex gap-2",
104
+ children: [
105
+ { type: "button", props: { variant: "outline", size: "sm", children: "Download Report" } },
106
+ { type: "button", props: { size: "sm", children: "Refresh" } }
107
+ ]
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ type: "grid",
113
+ props: { cols: 4, gap: 4, className: "mb-8 mt-2" },
114
+ children: [
115
+ { type: "card", title: "Total Revenue", description: "${data.revenueGrowth}", children: [{type: "text", content: "${data.revenue}", className: "text-2xl font-bold"}] },
116
+ { type: "card", title: "Subscriptions", description: "${data.subGrowth}", children: [{type: "text", content: "${data.subscriptions}", className: "text-2xl font-bold"}] },
117
+ { type: "card", title: "Sales", description: "${data.salesGrowth}", children: [{type: "text", content: "${data.sales}", className: "text-2xl font-bold"}] },
118
+ { type: "card", title: "Active Now", description: "+201 since last hour", children: [{type: "text", content: "+573", className: "text-2xl font-bold"}] },
119
+ ]
120
+ },
121
+ {
122
+ type: "grid",
123
+ props: { cols: 7, gap: 4 },
124
+ children: [
125
+ {
126
+ type: "page:card",
127
+ props: { title: "Revenue Overview", className: "col-span-4" },
128
+ children: [{ type: "chart:bar", props: {
129
+ data: "${data.overview}",
130
+ index: "name",
131
+ categories: ["total"],
132
+ colors: ["blue"]
133
+ }}]
134
+ },
135
+ {
136
+ type: "page:card",
137
+ props: { title: "Recent Sales", description: "You made 265 sales this month.", className: "col-span-3" },
138
+ children: [
139
+ { type: "view:simple", children: [
140
+ { type: "div", className: "flex items-center justify-between py-3 border-b hover:bg-muted/50 px-2 rounded transition-colors", children: [
141
+ { type: "div", className: "flex items-center gap-3", children: [{type:"avatar", props:{fallback:"OM"}}, {type:"div", children:[{type:"text", content:"Olivia Martin", className:"font-medium block"}, {type:"text", content:"olivia.martin@email.com", className:"text-xs text-muted-foreground block"}]}] },
142
+ { type: "text", content: "+$1,999.00", className: "font-medium" }
143
+ ]},
144
+ { type: "div", className: "flex items-center justify-between py-3 border-b hover:bg-muted/50 px-2 rounded transition-colors", children: [
145
+ { type: "div", className: "flex items-center gap-3", children: [{type:"avatar", props:{fallback:"JL"}}, {type:"div", children:[{type:"text", content:"Jackson Lee", className:"font-medium block"}, {type:"text", content:"jackson.lee@email.com", className:"text-xs text-muted-foreground block"}]}] },
146
+ { type: "text", content: "+$39.00", className: "font-medium" }
147
+ ]},
148
+ { type: "div", className: "flex items-center justify-between py-3 border-b hover:bg-muted/50 px-2 rounded transition-colors", children: [
149
+ { type: "div", className: "flex items-center gap-3", children: [{type:"avatar", props:{fallback:"IN"}}, {type:"div", children:[{type:"text", content:"Isabella Nguyen", className:"font-medium block"}, {type:"text", content:"isabella.nguyen@email.com", className:"text-xs text-muted-foreground block"}]}] },
150
+ { type: "text", content: "+$299.00", className: "font-medium" }
151
+ ]},
152
+ { type: "div", className: "flex items-center justify-between py-3 border-b hover:bg-muted/50 px-2 rounded transition-colors", children: [
153
+ { type: "div", className: "flex items-center gap-3", children: [{type:"avatar", props:{fallback:"WK"}}, {type:"div", children:[{type:"text", content:"William Kim", className:"font-medium block"}, {type:"text", content:"will@email.com", className:"text-xs text-muted-foreground block"}]}] },
154
+ { type: "text", content: "+$99.00", className: "font-medium" }
155
+ ]},
156
+ { type: "div", className: "flex items-center justify-between py-3 hover:bg-muted/50 px-2 rounded transition-colors", children: [
157
+ { type: "div", className: "flex items-center gap-3", children: [{type:"avatar", props:{fallback:"SD"}}, {type:"div", children:[{type:"text", content:"Sofia Davis", className:"font-medium block"}, {type:"text", content:"sofia.davis@email.com", className:"text-xs text-muted-foreground block"}]}] },
158
+ { type: "text", content: "+$39.00", className: "font-medium" }
159
+ ]},
160
+ ]}
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ ]
166
+ };
167
+
168
+ const contactsSchema = {
169
+ type: "page",
170
+ props: { title: "Contacts" },
171
+ children: [
172
+ {
173
+ type: "page:header",
174
+ props: { title: "Contacts", description: "Manage your customers and leads." },
175
+ children: [
176
+ { type: "button", props: { children: "New Contact" } }
177
+ ]
178
+ },
179
+ {
180
+ type: "div",
181
+ className: "flex gap-2 mt-4",
182
+ children: [
183
+ { type: "button", props: { variant: "outline", size: "sm", children: "All Contacts" } },
184
+ { type: "button", props: { variant: "ghost", size: "sm", children: "Active" } },
185
+ { type: "button", props: { variant: "ghost", size: "sm", children: "Inactive" } },
186
+ { type: "button", props: { variant: "ghost", size: "sm", children: "Leads" } }
187
+ ]
188
+ },
189
+ {
190
+ type: "page:card",
191
+ className: "mt-4",
192
+ children: [
193
+ {
194
+ type: "view:grid",
195
+ staticData: CONTACTS_DATA.contacts,
196
+ columns: [
197
+ { key: "name", label: "Name", type: "text" },
198
+ { key: "company", label: "Company", type: "text" },
199
+ { key: "email", label: "Email", type: "text" },
200
+ { key: "status", label: "Status", type: "text" }
201
+ ]
202
+ }
203
+ ]
204
+ }
205
+ ]
206
+ };
207
+
208
+ const opportunitiesSchema = {
209
+ type: "page",
210
+ props: { title: "Opportunities" },
211
+ children: [
212
+ {
213
+ type: "page:header",
214
+ props: { title: "Opportunities", description: "View and track sales deals." },
215
+ children: [
216
+ { type: "button", props: { children: "New Opportunity", size: "sm" } }
217
+ ]
218
+ },
219
+ {
220
+ type: "page:card",
221
+ className: "mt-6",
222
+ children: [
223
+ {
224
+ type: "view:grid",
225
+ staticData: OPPORTUNITIES_DATA.opportunities,
226
+ columns: [
227
+ { key: "name", label: "Deal Name", type: "text" },
228
+ { key: "contact", label: "Contact", type: "text" },
229
+ { key: "stage", label: "Stage", type: "text" },
230
+ { key: "amount", label: "Amount ($)", type: "number" },
231
+ { key: "probability", label: "Probability", type: "text" },
232
+ { key: "closeDate", label: "Close Date", type: "text" }
233
+ ]
234
+ }
235
+ ]
236
+ }
237
+ ]
238
+ };
239
+
240
+ const settingsSchema = {
241
+ type: "page",
242
+ props: { title: "Settings" },
243
+ children: [
244
+ {
245
+ type: "page:header",
246
+ props: { title: "Settings", description: "Manage your account settings and preferences." }
247
+ },
248
+ {
249
+ type: "div",
250
+ className: "grid grid-cols-1 md:grid-cols-3 gap-8 mt-6",
251
+ children: [
252
+ {
253
+ type: "div",
254
+ className: "col-span-1",
255
+ children: [
256
+ { type: "text", content: "Profile Information", className: "text-lg font-semibold block mb-2" },
257
+ { type: "text", content: "Update your account's profile information and email address.", className: "text-sm text-muted-foreground" },
258
+ {
259
+ type: "div",
260
+ className: "mt-4 flex flex-col gap-1",
261
+ children: [
262
+ { type: "button", props: { variant: "ghost", className: "justify-start font-semibold bg-muted", children: "General" } },
263
+ { type: "button", props: { variant: "ghost", className: "justify-start", children: "Security" } },
264
+ { type: "button", props: { variant: "ghost", className: "justify-start", children: "Billing" } },
265
+ { type: "button", props: { variant: "ghost", className: "justify-start", children: "Notifications" } },
266
+ ]
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ type: "page:card",
272
+ className: "col-span-2",
273
+ children: [
274
+ {
275
+ type: "div", // Using div as form container for now
276
+ className: "space-y-4",
277
+ children: [
278
+ { type: "field:text", props: { label: "Username", defaultValue: "${data.profile.name}", description: "This is your public display name." } },
279
+ { type: "field:text", props: { label: "Email", defaultValue: "${data.profile.email}", description: "Please enter a valid email address." } },
280
+ { type: "field:text", props: { label: "Role", defaultValue: "${data.profile.role}", readonly: true, disabled: true } },
281
+ { type: "div", className: "pt-4 flex justify-end", children: [
282
+ { type: "button", props: { children: "Save Changes" } }
283
+ ]}
284
+ ]
285
+ }
286
+ ]
287
+ }
288
+ ]
289
+ }
290
+ ]
291
+ };
292
+
293
+ const SETTINGS_DATA = {
294
+ profile: {
295
+ name: "Admin User",
296
+ email: "admin@objectui.dev",
297
+ role: "Administrator",
298
+ notifications: true
299
+ }
300
+ };
301
+
302
+ const accountsSchema = {
303
+ type: "page",
304
+ props: { title: "Accounts" },
305
+ children: [
306
+ {
307
+ type: "page:header",
308
+ props: { title: "Accounts", description: "Manage your business accounts and companies." },
309
+ children: [
310
+ { type: "button", props: { children: "New Account", size: "sm" } }
311
+ ]
312
+ },
313
+ {
314
+ type: "page:card",
315
+ className: "mt-6",
316
+ children: [
317
+ {
318
+ type: "view:grid",
319
+ staticData: ACCOUNTS_DATA.accounts,
320
+ columns: [
321
+ { key: "name", label: "Account Name", type: "text" },
322
+ { key: "industry", label: "Industry", type: "text" },
323
+ { key: "revenue", label: "Annual Revenue ($)", type: "number" },
324
+ { key: "employees", label: "Employees", type: "number" },
325
+ { key: "status", label: "Status", type: "text" }
326
+ ]
327
+ }
328
+ ]
329
+ }
330
+ ]
331
+ };
332
+
333
+ const contactDetailSchema = {
334
+ type: "page",
335
+ props: { title: "Contact Details" },
336
+ children: [
337
+ {
338
+ type: "div",
339
+ className: "flex items-center justify-between mb-6",
340
+ children: [
341
+ {
342
+ type: "page:header",
343
+ props: {
344
+ title: "${data.name}",
345
+ description: "${data.company} • ${data.email}"
346
+ },
347
+ className: "mb-0"
348
+ },
349
+ {
350
+ type: "div",
351
+ className: "flex gap-2",
352
+ children: [
353
+ { type: "button", props: { variant: "outline", size: "sm", children: "Edit" } },
354
+ { type: "button", props: { variant: "outline", size: "sm", children: "Delete" } }
355
+ ]
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ type: "grid",
361
+ props: { cols: 3, gap: 6 },
362
+ children: [
363
+ {
364
+ type: "page:card",
365
+ props: { title: "Contact Information", className: "col-span-2" },
366
+ children: [
367
+ {
368
+ type: "div",
369
+ className: "grid grid-cols-2 gap-4",
370
+ children: [
371
+ { type: "div", children: [
372
+ { type: "text", content: "Name", className: "text-sm font-medium text-muted-foreground block mb-1" },
373
+ { type: "text", content: "${data.name}", className: "text-base" }
374
+ ]},
375
+ { type: "div", children: [
376
+ { type: "text", content: "Email", className: "text-sm font-medium text-muted-foreground block mb-1" },
377
+ { type: "text", content: "${data.email}", className: "text-base" }
378
+ ]},
379
+ { type: "div", children: [
380
+ { type: "text", content: "Company", className: "text-sm font-medium text-muted-foreground block mb-1" },
381
+ { type: "text", content: "${data.company}", className: "text-base" }
382
+ ]},
383
+ { type: "div", children: [
384
+ { type: "text", content: "Status", className: "text-sm font-medium text-muted-foreground block mb-1" },
385
+ { type: "badge", props: { variant: "default" }, children: [{ type: "text", content: "${data.status}" }] }
386
+ ]}
387
+ ]
388
+ }
389
+ ]
390
+ },
391
+ {
392
+ type: "page:card",
393
+ props: { title: "Quick Actions", className: "col-span-1" },
394
+ children: [
395
+ {
396
+ type: "div",
397
+ className: "flex flex-col gap-2",
398
+ children: [
399
+ { type: "button", props: { variant: "outline", className: "justify-start", children: "Send Email" } },
400
+ { type: "button", props: { variant: "outline", className: "justify-start", children: "Schedule Call" } },
401
+ { type: "button", props: { variant: "outline", className: "justify-start", children: "Create Task" } }
402
+ ]
403
+ }
404
+ ]
405
+ }
406
+ ]
407
+ },
408
+ {
409
+ type: "page:card",
410
+ props: { title: "Recent Activities", className: "mt-6" },
411
+ children: [
412
+ {
413
+ type: "div",
414
+ className: "space-y-3",
415
+ children: [
416
+ { type: "div", className: "flex items-start gap-3 py-2", children: [
417
+ { type: "div", className: "h-2 w-2 rounded-full bg-blue-500 mt-2" },
418
+ { type: "div", children: [
419
+ { type: "text", content: "Email sent", className: "font-medium block" },
420
+ { type: "text", content: "Sent product demo information", className: "text-sm text-muted-foreground block" },
421
+ { type: "text", content: "2 hours ago", className: "text-xs text-muted-foreground block mt-1" }
422
+ ]}
423
+ ]},
424
+ { type: "div", className: "flex items-start gap-3 py-2", children: [
425
+ { type: "div", className: "h-2 w-2 rounded-full bg-green-500 mt-2" },
426
+ { type: "div", children: [
427
+ { type: "text", content: "Meeting completed", className: "font-medium block" },
428
+ { type: "text", content: "Discussed Q1 requirements", className: "text-sm text-muted-foreground block" },
429
+ { type: "text", content: "1 day ago", className: "text-xs text-muted-foreground block mt-1" }
430
+ ]}
431
+ ]},
432
+ { type: "div", className: "flex items-start gap-3 py-2", children: [
433
+ { type: "div", className: "h-2 w-2 rounded-full bg-gray-400 mt-2" },
434
+ { type: "div", children: [
435
+ { type: "text", content: "Contact created", className: "font-medium block" },
436
+ { type: "text", content: "Added to CRM system", className: "text-sm text-muted-foreground block" },
437
+ { type: "text", content: "3 days ago", className: "text-xs text-muted-foreground block mt-1" }
438
+ ]}
439
+ ]}
440
+ ]
441
+ }
442
+ ]
443
+ }
444
+ ]
445
+ };
446
+
447
+ const opportunityDetailSchema = {
448
+ type: "page",
449
+ props: { title: "Opportunity Details" },
450
+ children: [
451
+ {
452
+ type: "div",
453
+ className: "flex items-center justify-between mb-6",
454
+ children: [
455
+ {
456
+ type: "page:header",
457
+ props: {
458
+ title: "${data.name}",
459
+ description: "Stage: ${data.stage} • Close Date: ${data.closeDate}"
460
+ },
461
+ className: "mb-0"
462
+ },
463
+ {
464
+ type: "div",
465
+ className: "flex gap-2",
466
+ children: [
467
+ { type: "button", props: { variant: "outline", size: "sm", children: "Edit" } },
468
+ { type: "button", props: { size: "sm", children: "Mark as Won" } }
469
+ ]
470
+ }
471
+ ]
472
+ },
473
+ {
474
+ type: "grid",
475
+ props: { cols: 4, gap: 4, className: "mb-6" },
476
+ children: [
477
+ {
478
+ type: "card",
479
+ title: "Deal Amount",
480
+ children: [{ type: "text", content: "$${data.amount}", className: "text-2xl font-bold" }]
481
+ },
482
+ {
483
+ type: "card",
484
+ title: "Probability",
485
+ children: [{ type: "text", content: "${data.probability}", className: "text-2xl font-bold" }]
486
+ },
487
+ {
488
+ type: "card",
489
+ title: "Expected Revenue",
490
+ children: [{ type: "text", content: "$${data.expectedRevenue}", className: "text-2xl font-bold" }]
491
+ },
492
+ {
493
+ type: "card",
494
+ title: "Days to Close",
495
+ children: [{ type: "text", content: "${data.daysToClose}", className: "text-2xl font-bold" }]
496
+ }
497
+ ]
498
+ },
499
+ {
500
+ type: "grid",
501
+ props: { cols: 3, gap: 6 },
502
+ children: [
503
+ {
504
+ type: "page:card",
505
+ props: { title: "Opportunity Details", className: "col-span-2" },
506
+ children: [
507
+ {
508
+ type: "div",
509
+ className: "grid grid-cols-2 gap-4",
510
+ children: [
511
+ { type: "div", children: [
512
+ { type: "text", content: "Deal Name", className: "text-sm font-medium text-muted-foreground block mb-1" },
513
+ { type: "text", content: "${data.name}", className: "text-base" }
514
+ ]},
515
+ { type: "div", children: [
516
+ { type: "text", content: "Contact", className: "text-sm font-medium text-muted-foreground block mb-1" },
517
+ { type: "text", content: "${data.contact}", className: "text-base" }
518
+ ]},
519
+ { type: "div", children: [
520
+ { type: "text", content: "Stage", className: "text-sm font-medium text-muted-foreground block mb-1" },
521
+ { type: "badge", props: { variant: "default" }, children: [{ type: "text", content: "${data.stage}" }] }
522
+ ]},
523
+ { type: "div", children: [
524
+ { type: "text", content: "Close Date", className: "text-sm font-medium text-muted-foreground block mb-1" },
525
+ { type: "text", content: "${data.closeDate}", className: "text-base" }
526
+ ]}
527
+ ]
528
+ }
529
+ ]
530
+ },
531
+ {
532
+ type: "page:card",
533
+ props: { title: "Stage Progress", className: "col-span-1" },
534
+ children: [
535
+ {
536
+ type: "div",
537
+ className: "space-y-2",
538
+ children: [
539
+ { type: "div", className: "flex items-center justify-between", children: [
540
+ { type: "text", content: "Prospecting", className: "text-sm" },
541
+ { type: "text", content: "✓", className: "text-green-500" }
542
+ ]},
543
+ { type: "div", className: "flex items-center justify-between", children: [
544
+ { type: "text", content: "Qualified", className: "text-sm" },
545
+ { type: "text", content: "✓", className: "text-green-500" }
546
+ ]},
547
+ { type: "div", className: "flex items-center justify-between", children: [
548
+ { type: "text", content: "Proposal", className: "text-sm font-medium" },
549
+ { type: "text", content: "●", className: "text-blue-500" }
550
+ ]},
551
+ { type: "div", className: "flex items-center justify-between", children: [
552
+ { type: "text", content: "Negotiation", className: "text-sm text-muted-foreground" },
553
+ { type: "text", content: "○", className: "text-gray-300" }
554
+ ]},
555
+ { type: "div", className: "flex items-center justify-between", children: [
556
+ { type: "text", content: "Closed", className: "text-sm text-muted-foreground" },
557
+ { type: "text", content: "○", className: "text-gray-300" }
558
+ ]}
559
+ ]
560
+ }
561
+ ]
562
+ }
563
+ ]
564
+ }
565
+ ]
566
+ };
567
+
568
+ /* --- APP COMPONENT --- */
569
+
570
+ const CRMStoryApp = () => {
571
+ const [activePage, setActivePage] = useState("dashboard");
572
+
573
+ const renderContent = () => {
574
+ switch(activePage) {
575
+ case "dashboard":
576
+ return <SchemaRendererProvider dataSource={DASHBOARD_DATA}><SchemaRenderer schema={dashboardSchema} /></SchemaRendererProvider>;
577
+ case "contacts":
578
+ return <SchemaRendererProvider dataSource={CONTACTS_DATA}><SchemaRenderer schema={contactsSchema} /></SchemaRendererProvider>;
579
+ case "contact-detail":
580
+ return <SchemaRendererProvider dataSource={CONTACT_DETAIL_DATA}><SchemaRenderer schema={contactDetailSchema} /></SchemaRendererProvider>;
581
+ case "accounts":
582
+ return <SchemaRendererProvider dataSource={ACCOUNTS_DATA}><SchemaRenderer schema={accountsSchema} /></SchemaRendererProvider>;
583
+ case "opportunities":
584
+ return <SchemaRendererProvider dataSource={OPPORTUNITIES_DATA}><SchemaRenderer schema={opportunitiesSchema} /></SchemaRendererProvider>;
585
+ case "opportunity-detail":
586
+ return <SchemaRendererProvider dataSource={OPPORTUNITY_DETAIL_DATA}><SchemaRenderer schema={opportunityDetailSchema} /></SchemaRendererProvider>;
587
+ case "settings":
588
+ return <SchemaRendererProvider dataSource={SETTINGS_DATA}><SchemaRenderer schema={settingsSchema} /></SchemaRendererProvider>;
589
+ default:
590
+ return (
591
+ <div className="p-8">
592
+ <h2 className="text-2xl font-bold">Work in progress</h2>
593
+ <p className="text-muted-foreground mt-2">This page ({activePage}) is under construction.</p>
594
+ </div>
595
+ );
596
+ }
597
+ };
598
+
599
+ return (
600
+ <SidebarProvider>
601
+ <Sidebar collapsible="icon">
602
+ <SidebarHeader>
603
+ <div className="flex items-center gap-2 px-2 py-3 text-sidebar-foreground">
604
+ <div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground">
605
+ <GalleryVerticalEnd className="size-4" />
606
+ </div>
607
+ <div className="grid flex-1 text-left text-sm leading-tight">
608
+ <span className="truncate font-semibold">Object UI</span>
609
+ <span className="truncate text-xs">CRM Demo</span>
610
+ </div>
611
+ </div>
612
+ </SidebarHeader>
613
+ <SidebarContent>
614
+ <SidebarGroup>
615
+ <SidebarGroupLabel>Platform</SidebarGroupLabel>
616
+ <SidebarGroupContent>
617
+ <SidebarMenu>
618
+ <SidebarMenuButton
619
+ isActive={activePage === "dashboard"}
620
+ onClick={() => setActivePage("dashboard")}
621
+ tooltip="Dashboard"
622
+ >
623
+ <LayoutDashboard />
624
+ <span>Dashboard</span>
625
+ </SidebarMenuButton>
626
+ <SidebarMenuButton
627
+ isActive={activePage === "contacts"}
628
+ onClick={() => setActivePage("contacts")}
629
+ tooltip="Contacts"
630
+ >
631
+ <Users />
632
+ <span>Contacts</span>
633
+ </SidebarMenuButton>
634
+ <SidebarMenuButton
635
+ isActive={activePage === "accounts"}
636
+ onClick={() => setActivePage("accounts")}
637
+ tooltip="Accounts"
638
+ >
639
+ <Building2 />
640
+ <span>Accounts</span>
641
+ </SidebarMenuButton>
642
+ <SidebarMenuButton
643
+ isActive={activePage === "opportunities"}
644
+ onClick={() => setActivePage("opportunities")}
645
+ tooltip="Opportunities"
646
+ >
647
+ <TrendingUp />
648
+ <span>Opportunities</span>
649
+ </SidebarMenuButton>
650
+ <SidebarMenuButton
651
+ isActive={activePage === "settings"}
652
+ onClick={() => setActivePage("settings")}
653
+ tooltip="Settings"
654
+ >
655
+ <Settings />
656
+ <span>Settings</span>
657
+ </SidebarMenuButton>
658
+ </SidebarMenu>
659
+ </SidebarGroupContent>
660
+ </SidebarGroup>
661
+ <SidebarGroup>
662
+ <SidebarGroupLabel>Examples</SidebarGroupLabel>
663
+ <SidebarGroupContent>
664
+ <SidebarMenu>
665
+ <SidebarMenuButton
666
+ isActive={activePage === "contact-detail"}
667
+ onClick={() => setActivePage("contact-detail")}
668
+ tooltip="Contact Detail View"
669
+ >
670
+ <UserPlus />
671
+ <span>Contact Detail</span>
672
+ </SidebarMenuButton>
673
+ <SidebarMenuButton
674
+ isActive={activePage === "opportunity-detail"}
675
+ onClick={() => setActivePage("opportunity-detail")}
676
+ tooltip="Opportunity Detail View"
677
+ >
678
+ <FileText />
679
+ <span>Deal Detail</span>
680
+ </SidebarMenuButton>
681
+ </SidebarMenu>
682
+ </SidebarGroupContent>
683
+ </SidebarGroup>
684
+ </SidebarContent>
685
+ </Sidebar>
686
+
687
+ <div className="flex flex-1 flex-col h-screen overflow-hidden bg-gray-50/50">
688
+ <div className="flex-1 overflow-y-auto p-4 md:p-8">
689
+ {renderContent()}
690
+ </div>
691
+ </div>
692
+ </SidebarProvider>
693
+ );
694
+ };
695
+
696
+ const meta: Meta = {
697
+ title: 'Apps/CRM',
698
+ component: CRMStoryApp,
699
+ parameters: {
700
+ layout: 'fullscreen',
701
+ },
702
+ };
703
+
704
+ export default meta;
705
+
706
+ export const Default: StoryObj = {};