@qwickapps/react-framework 1.3.5 → 1.4.1

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 (320) hide show
  1. package/README.md +1691 -2
  2. package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
  3. package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
  4. package/dist/components/ErrorBoundary.d.ts +7 -0
  5. package/dist/components/ErrorBoundary.d.ts.map +1 -1
  6. package/dist/components/Html.d.ts +28 -18
  7. package/dist/components/Html.d.ts.map +1 -1
  8. package/dist/components/Logo.d.ts +12 -35
  9. package/dist/components/Logo.d.ts.map +1 -1
  10. package/dist/components/Markdown.d.ts +18 -13
  11. package/dist/components/Markdown.d.ts.map +1 -1
  12. package/dist/components/QwickApp.d.ts +16 -3
  13. package/dist/components/QwickApp.d.ts.map +1 -1
  14. package/dist/components/QwickIcon.d.ts +23 -0
  15. package/dist/components/QwickIcon.d.ts.map +1 -0
  16. package/dist/components/SafeSpan.d.ts +12 -5
  17. package/dist/components/SafeSpan.d.ts.map +1 -1
  18. package/dist/components/Scaffold.d.ts.map +1 -1
  19. package/dist/components/base/ModelView.d.ts +101 -0
  20. package/dist/components/base/ModelView.d.ts.map +1 -0
  21. package/dist/components/base/index.d.ts +11 -0
  22. package/dist/components/base/index.d.ts.map +1 -0
  23. package/dist/components/blocks/Article.d.ts +12 -2
  24. package/dist/components/blocks/Article.d.ts.map +1 -1
  25. package/dist/components/blocks/Code.d.ts +13 -2
  26. package/dist/components/blocks/Code.d.ts.map +1 -1
  27. package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
  28. package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
  29. package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
  30. package/dist/components/blocks/Footer.d.ts.map +1 -1
  31. package/dist/components/blocks/HeroBlock.d.ts +27 -13
  32. package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
  33. package/dist/components/blocks/Image.d.ts +41 -0
  34. package/dist/components/blocks/Image.d.ts.map +1 -0
  35. package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
  36. package/dist/components/blocks/Section.d.ts +16 -2
  37. package/dist/components/blocks/Section.d.ts.map +1 -1
  38. package/dist/components/blocks/Text.d.ts +41 -0
  39. package/dist/components/blocks/Text.d.ts.map +1 -0
  40. package/dist/components/blocks/index.d.ts +4 -0
  41. package/dist/components/blocks/index.d.ts.map +1 -1
  42. package/dist/components/buttons/Button.d.ts +23 -7
  43. package/dist/components/buttons/Button.d.ts.map +1 -1
  44. package/dist/components/forms/FormBlock.d.ts +19 -13
  45. package/dist/components/forms/FormBlock.d.ts.map +1 -1
  46. package/dist/components/index.d.ts +4 -0
  47. package/dist/components/index.d.ts.map +1 -1
  48. package/dist/components/input/ChoiceInputField.d.ts +17 -11
  49. package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
  50. package/dist/components/input/HtmlInputField.d.ts +17 -11
  51. package/dist/components/input/HtmlInputField.d.ts.map +1 -1
  52. package/dist/components/input/SelectInputField.d.ts +16 -10
  53. package/dist/components/input/SelectInputField.d.ts.map +1 -1
  54. package/dist/components/input/SwitchInputField.d.ts +16 -10
  55. package/dist/components/input/SwitchInputField.d.ts.map +1 -1
  56. package/dist/components/input/TextField.d.ts.map +1 -1
  57. package/dist/components/input/TextInputField.d.ts +16 -11
  58. package/dist/components/input/TextInputField.d.ts.map +1 -1
  59. package/dist/components/layout/GridCell.d.ts +23 -6
  60. package/dist/components/layout/GridCell.d.ts.map +1 -1
  61. package/dist/components/layout/GridLayout.d.ts +24 -23
  62. package/dist/components/layout/GridLayout.d.ts.map +1 -1
  63. package/dist/components/pages/FormPage.d.ts.map +1 -1
  64. package/dist/components/pages/Page.d.ts +49 -87
  65. package/dist/components/pages/Page.d.ts.map +1 -1
  66. package/dist/components/pages/index.d.ts +2 -2
  67. package/dist/components/pages/index.d.ts.map +1 -1
  68. package/dist/config/AppConfig.d.ts +49 -0
  69. package/dist/config/AppConfig.d.ts.map +1 -0
  70. package/dist/config/AppConfigBuilder.d.ts +75 -0
  71. package/dist/config/AppConfigBuilder.d.ts.map +1 -0
  72. package/dist/config/index.d.ts +13 -0
  73. package/dist/config/index.d.ts.map +1 -0
  74. package/dist/config/types.d.ts +130 -0
  75. package/dist/config/types.d.ts.map +1 -0
  76. package/dist/config.d.ts +15 -0
  77. package/dist/config.d.ts.map +1 -0
  78. package/dist/config.esm.js +451 -0
  79. package/dist/config.js +455 -0
  80. package/dist/contexts/PrintModeContext.d.ts +27 -0
  81. package/dist/contexts/PrintModeContext.d.ts.map +1 -0
  82. package/dist/contexts/QwickAppContext.d.ts +2 -2
  83. package/dist/contexts/QwickAppContext.d.ts.map +1 -1
  84. package/dist/contexts/index.d.ts +2 -0
  85. package/dist/contexts/index.d.ts.map +1 -1
  86. package/dist/hooks/index.d.ts +2 -0
  87. package/dist/hooks/index.d.ts.map +1 -1
  88. package/dist/hooks/usePrintMode.d.ts +39 -0
  89. package/dist/hooks/usePrintMode.d.ts.map +1 -0
  90. package/dist/index.css +1 -1
  91. package/dist/index.d.ts +1 -0
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.esm.css +1 -1
  94. package/dist/index.esm.js +10951 -6238
  95. package/dist/index.js +11014 -6287
  96. package/dist/schemas/CodeSchema.d.ts +2 -1
  97. package/dist/schemas/CodeSchema.d.ts.map +1 -1
  98. package/dist/schemas/CollapsibleLayoutSchema.d.ts +2 -1
  99. package/dist/schemas/CollapsibleLayoutSchema.d.ts.map +1 -1
  100. package/dist/schemas/ContentSchema.d.ts +2 -1
  101. package/dist/schemas/ContentSchema.d.ts.map +1 -1
  102. package/dist/schemas/GridCellSchema.d.ts +25 -0
  103. package/dist/schemas/GridCellSchema.d.ts.map +1 -0
  104. package/dist/schemas/GridLayoutSchema.d.ts +23 -0
  105. package/dist/schemas/GridLayoutSchema.d.ts.map +1 -0
  106. package/dist/schemas/HtmlSchema.d.ts +14 -0
  107. package/dist/schemas/HtmlSchema.d.ts.map +1 -0
  108. package/dist/schemas/ImageSchema.d.ts +32 -0
  109. package/dist/schemas/ImageSchema.d.ts.map +1 -0
  110. package/dist/schemas/LogoSchema.d.ts +35 -0
  111. package/dist/schemas/LogoSchema.d.ts.map +1 -0
  112. package/dist/schemas/MarkdownSchema.d.ts +14 -0
  113. package/dist/schemas/MarkdownSchema.d.ts.map +1 -0
  114. package/dist/schemas/PageTemplateSchema.d.ts +31 -0
  115. package/dist/schemas/PageTemplateSchema.d.ts.map +1 -0
  116. package/dist/schemas/PrintConfigSchema.d.ts +31 -0
  117. package/dist/schemas/PrintConfigSchema.d.ts.map +1 -0
  118. package/dist/schemas/SectionSchema.d.ts +2 -1
  119. package/dist/schemas/SectionSchema.d.ts.map +1 -1
  120. package/dist/schemas/TextSchema.d.ts +37 -0
  121. package/dist/schemas/TextSchema.d.ts.map +1 -0
  122. package/dist/schemas/ViewModelSchema.d.ts +23 -0
  123. package/dist/schemas/ViewModelSchema.d.ts.map +1 -0
  124. package/dist/schemas/index.d.ts +15 -1
  125. package/dist/schemas/index.d.ts.map +1 -1
  126. package/dist/schemas/transformers/ComponentTransformer.d.ts +116 -0
  127. package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
  128. package/dist/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
  129. package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
  130. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +66 -0
  131. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +1 -0
  132. package/dist/schemas/transformers/registry.d.ts +15 -0
  133. package/dist/schemas/transformers/registry.d.ts.map +1 -0
  134. package/dist/schemas/types/Serializable.d.ts +46 -0
  135. package/dist/schemas/types/Serializable.d.ts.map +1 -0
  136. package/dist/utils/htmlTransform.d.ts.map +1 -1
  137. package/dist/utils/reactUtils.d.ts +12 -3
  138. package/dist/utils/reactUtils.d.ts.map +1 -1
  139. package/package.json +17 -3
  140. package/src/{components/__tests__ → __tests__/components}/AccessibilityProvider.test.tsx +1 -1
  141. package/src/{components/__tests__ → __tests__/components}/Article.test.tsx +1 -1
  142. package/src/{components/__tests__ → __tests__/components}/Breadcrumbs.test.tsx +1 -1
  143. package/src/{components/__tests__ → __tests__/components}/Button.test.tsx +1 -1
  144. package/src/{components/__tests__ → __tests__/components}/CardListGrid.test.tsx +2 -2
  145. package/src/{components/__tests__ → __tests__/components}/ChoiceInputField.test.tsx +1 -1
  146. package/src/{components/__tests__ → __tests__/components}/Code.test.tsx +1 -1
  147. package/src/{components/__tests__ → __tests__/components}/Content.integration.test.tsx +1 -1
  148. package/src/{components/__tests__ → __tests__/components}/Content.test.tsx +1 -1
  149. package/src/{components/__tests__ → __tests__/components}/CoverImageHeader.test.tsx +2 -2
  150. package/src/{components/__tests__ → __tests__/components}/ErrorBoundary.test.tsx +1 -1
  151. package/src/{components/__tests__ → __tests__/components}/FeatureCard.integration.test.tsx +2 -2
  152. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.integration.test.tsx +2 -2
  153. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.test.tsx +2 -2
  154. package/src/{components/__tests__ → __tests__/components}/Footer.test.tsx +4 -4
  155. package/src/{components/__tests__ → __tests__/components}/FormBlock.test.tsx +1 -1
  156. package/src/{components/__tests__ → __tests__/components}/HeroBlock.integration.test.tsx +2 -2
  157. package/src/{components/__tests__ → __tests__/components}/HeroBlock.test.tsx +233 -7
  158. package/src/{components/__tests__ → __tests__/components}/Html.test.tsx +11 -2
  159. package/src/{components/__tests__ → __tests__/components}/HtmlInputField.test.tsx +3 -3
  160. package/src/__tests__/components/Logo.test.js +3 -3
  161. package/src/{components/__tests__ → __tests__/components}/Markdown.test.tsx +1 -1
  162. package/src/{components/__tests__ → __tests__/components}/PageBannerHeader.test.tsx +3 -3
  163. package/src/{components/__tests__ → __tests__/components}/PaletteSwitcher.test.tsx +3 -3
  164. package/src/{components/__tests__ → __tests__/components}/ProductCard.test.tsx +4 -4
  165. package/src/{components/__tests__ → __tests__/components}/SafeSpan.integration.test.tsx +2 -2
  166. package/src/{components/__tests__ → __tests__/components}/SafeSpan.simple.test.tsx +1 -1
  167. package/src/{components/__tests__ → __tests__/components}/SafeSpan.test.tsx +1 -1
  168. package/src/{components/__tests__ → __tests__/components}/Section.integration.test.tsx +1 -1
  169. package/src/{components/__tests__ → __tests__/components}/Section.test.tsx +1 -1
  170. package/src/{components/__tests__ → __tests__/components}/SelectInputField.test.tsx +1 -1
  171. package/src/{components/__tests__ → __tests__/components}/TextInputField.test.tsx +3 -3
  172. package/src/{components/__tests__ → __tests__/components}/ThemeSwitcher.test.tsx +3 -3
  173. package/src/__tests__/components/base/ModelView.test.tsx +220 -0
  174. package/src/__tests__/components/blocks/Code.performance.test.tsx +625 -0
  175. package/src/__tests__/components/blocks/Code.serialization.test.tsx +507 -0
  176. package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +414 -0
  177. package/src/__tests__/components/blocks/Image.serialization.test.tsx +257 -0
  178. package/src/__tests__/components/blocks/Section.serialization.test.tsx +553 -0
  179. package/src/__tests__/components/blocks/Text.performance.test.tsx +442 -0
  180. package/src/__tests__/components/blocks/Text.serialization.test.tsx +491 -0
  181. package/src/__tests__/components/buttons/Button.serialization.test.tsx +443 -0
  182. package/src/__tests__/components/input/FormComponents.serialization.test.tsx +482 -0
  183. package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +439 -0
  184. package/src/__tests__/components/input/TextInputField.serialization.test.tsx +359 -0
  185. package/src/{components/layout/CollapsibleLayout/__tests__ → __tests__/components/layout}/CollapsibleLayout.test.tsx +4 -4
  186. package/src/__tests__/components/layout/GridCell.serialization.test.tsx +403 -0
  187. package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +311 -0
  188. package/src/__tests__/hooks/usePrintMode.test.ts +89 -0
  189. package/src/__tests__/schemas/PageTemplateSchema.test.ts +161 -0
  190. package/src/__tests__/schemas/PrintConfigSchema.test.ts +127 -0
  191. package/src/__tests__/schemas/ViewModelSchema.test.ts +80 -0
  192. package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +602 -0
  193. package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +301 -0
  194. package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +521 -0
  195. package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +586 -0
  196. package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +103 -0
  197. package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +1165 -0
  198. package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +602 -0
  199. package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +691 -0
  200. package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +460 -0
  201. package/src/__tests__/schemas/transformers/TestAutomation.test.ts +597 -0
  202. package/src/{utils/__tests__ → __tests__/utils}/nested-dom-fix.test.tsx +1 -1
  203. package/src/components/ErrorBoundary.tsx +8 -8
  204. package/src/components/Html.tsx +147 -44
  205. package/src/components/Logo.tsx +198 -100
  206. package/src/components/Markdown.tsx +125 -16
  207. package/src/components/QwickApp.tsx +64 -31
  208. package/src/components/QwickIcon.tsx +59 -0
  209. package/src/components/SafeSpan.tsx +65 -10
  210. package/src/components/Scaffold.tsx +2 -8
  211. package/src/components/base/ModelView.tsx +199 -0
  212. package/src/components/base/index.ts +11 -0
  213. package/src/components/blocks/Article.tsx +57 -18
  214. package/src/components/blocks/Code.md +529 -0
  215. package/src/components/blocks/Code.tsx +102 -15
  216. package/src/components/blocks/CoverImageHeader.tsx +9 -4
  217. package/src/components/blocks/FeatureCard.tsx +1 -2
  218. package/src/components/blocks/FeatureGrid.tsx +19 -1
  219. package/src/components/blocks/Footer.tsx +13 -1
  220. package/src/components/blocks/HeroBlock.tsx +87 -20
  221. package/src/components/blocks/Image.tsx +395 -0
  222. package/src/components/blocks/PageBannerHeader.tsx +14 -12
  223. package/src/components/blocks/ProductCard.tsx +1 -1
  224. package/src/components/blocks/Section.tsx +113 -8
  225. package/src/components/blocks/Text.tsx +285 -0
  226. package/src/components/blocks/index.ts +4 -0
  227. package/src/components/buttons/Button.tsx +184 -15
  228. package/src/components/forms/FormBlock.tsx +70 -17
  229. package/src/components/index.ts +5 -0
  230. package/src/components/input/ChoiceInputField.tsx +48 -18
  231. package/src/components/input/HtmlInputField.tsx +48 -18
  232. package/src/components/input/SelectInputField.tsx +48 -16
  233. package/src/components/input/SwitchInputField.tsx +48 -17
  234. package/src/components/input/TextField.tsx +41 -1
  235. package/src/components/input/TextInputField.tsx +52 -18
  236. package/src/components/layout/GridCell.tsx +118 -9
  237. package/src/components/layout/GridLayout.tsx +125 -24
  238. package/src/components/pages/FormPage.tsx +0 -1
  239. package/src/components/pages/Page.css +304 -332
  240. package/src/components/pages/Page.tsx +307 -255
  241. package/src/components/pages/index.ts +2 -2
  242. package/src/config/AppConfig.ts +133 -0
  243. package/src/config/AppConfigBuilder.ts +421 -0
  244. package/src/config/__tests__/AppConfig.test.ts +385 -0
  245. package/src/config/__tests__/AppConfigBuilder.test.ts +432 -0
  246. package/src/config/index.ts +24 -0
  247. package/src/config/types.ts +170 -0
  248. package/src/config.ts +25 -0
  249. package/src/contexts/PrintModeContext.tsx +332 -0
  250. package/src/contexts/QwickAppContext.tsx +2 -2
  251. package/src/contexts/index.ts +2 -0
  252. package/src/hooks/index.ts +5 -1
  253. package/src/hooks/usePrintMode.ts +73 -0
  254. package/src/index.ts +3 -0
  255. package/src/schemas/CodeSchema.ts +3 -3
  256. package/src/schemas/CollapsibleLayoutSchema.ts +2 -1
  257. package/src/schemas/ContentSchema.ts +2 -1
  258. package/src/schemas/GridCellSchema.ts +164 -0
  259. package/src/schemas/GridLayoutSchema.ts +133 -0
  260. package/src/schemas/HtmlSchema.ts +47 -0
  261. package/src/schemas/ImageSchema.ts +235 -0
  262. package/src/schemas/LogoSchema.ts +241 -0
  263. package/src/schemas/MarkdownSchema.ts +47 -0
  264. package/src/schemas/PageTemplateSchema.ts +186 -0
  265. package/src/schemas/PrintConfigSchema.ts +207 -0
  266. package/src/schemas/README.md +661 -0
  267. package/src/schemas/SectionSchema.ts +2 -1
  268. package/src/schemas/TextSchema.ts +329 -0
  269. package/src/schemas/ViewModelSchema.ts +115 -0
  270. package/src/schemas/index.ts +21 -2
  271. package/src/schemas/transformers/ComponentTransformer.ts +403 -0
  272. package/src/schemas/transformers/ReactNodeTransformer.ts +236 -0
  273. package/src/schemas/transformers/registry.ts +72 -0
  274. package/src/schemas/types/Serializable.ts +51 -0
  275. package/src/stories/AccessibilityProvider.stories.tsx +253 -253
  276. package/src/stories/Article.stories.tsx +433 -433
  277. package/src/stories/Button.stories.tsx +1 -1
  278. package/src/stories/CardListGrid.stories.tsx +451 -451
  279. package/src/stories/ChoiceInputField.stories.tsx +503 -503
  280. package/src/stories/Code.stories.tsx +1 -1
  281. package/src/stories/CollapsibleLayout.stories.tsx +1414 -1414
  282. package/src/stories/Content.stories.tsx +393 -393
  283. package/src/stories/CoverImageHeader.stories.tsx +701 -701
  284. package/src/stories/DataBinding.advanced.stories.tsx +432 -432
  285. package/src/stories/DataProvider.stories.tsx +1192 -1192
  286. package/src/stories/FeatureCard.stories.tsx +557 -557
  287. package/src/stories/FeatureGrid.stories.tsx +594 -594
  288. package/src/stories/Footer.stories.tsx +640 -640
  289. package/src/stories/FormBlock.stories.tsx +760 -760
  290. package/src/stories/FormComponents.stories.tsx +349 -541
  291. package/src/stories/GridCell.stories.tsx +417 -0
  292. package/src/stories/GridLayout.stories.tsx +353 -0
  293. package/src/stories/HeroBlock.stories.tsx +862 -373
  294. package/src/stories/HtmlInputField.stories.tsx +474 -474
  295. package/src/stories/Image.stories.tsx +819 -0
  296. package/src/stories/Introduction.stories.tsx +667 -667
  297. package/src/stories/LayoutBlocks.stories.tsx +324 -324
  298. package/src/stories/Logo.stories.tsx +165 -6
  299. package/src/stories/Markdown.stories.tsx +137 -137
  300. package/src/stories/ModelView.stories.tsx +477 -0
  301. package/src/stories/Page.stories.tsx +688 -688
  302. package/src/stories/PageBannerHeader.stories.tsx +864 -864
  303. package/src/stories/PaletteSwitcher.stories.tsx +119 -119
  304. package/src/stories/ProductCard.stories.tsx +424 -424
  305. package/src/stories/QwickApp.stories.tsx +368 -368
  306. package/src/stories/ResponsiveMenu.stories.tsx +249 -249
  307. package/src/stories/SafeSpan.stories.tsx +531 -531
  308. package/src/stories/Section.stories.tsx +90 -2
  309. package/src/stories/SelectInputField.stories.tsx +524 -524
  310. package/src/stories/Text.stories.tsx +560 -0
  311. package/src/stories/TextInputField.stories.tsx +443 -443
  312. package/src/stories/ThemeSwitcher.stories.tsx +123 -123
  313. package/src/utils/htmlTransform.tsx +74 -53
  314. package/src/utils/reactUtils.tsx +57 -6
  315. package/dist/index.bundled.css +0 -12
  316. /package/src/{hooks/__tests__ → __tests__/hooks}/useDataBinding.test.tsx.disabled +0 -0
  317. /package/src/{schemas/__tests__ → __tests__/schemas}/builders.test.ts +0 -0
  318. /package/src/{utils/__tests__ → __tests__/utils}/createDataDrivenComponent.test.tsx.disabled +0 -0
  319. /package/src/{utils/__tests__ → __tests__/utils}/htmlTransform.test.tsx +0 -0
  320. /package/src/{utils/__tests__ → __tests__/utils}/optional-logging.test.ts +0 -0
@@ -13,116 +13,116 @@ import QwickApp from '../components/QwickApp';
13
13
 
14
14
  // Sample data for different card types
15
15
  const sampleProducts = [
16
- {
17
- id: 'product-1',
18
- name: 'QwickApps React Framework',
19
- category: 'Frontend Framework',
20
- description: 'A comprehensive React framework for building modern web applications with AI-driven component generation and data binding.',
21
- shortDescription: 'React framework for modern web apps',
22
- features: ['AI-driven components', 'Data binding', 'Enterprise ready'],
23
- technologies: ['React', 'TypeScript', 'Material-UI'],
24
- status: 'launched',
25
- image: 'https://via.placeholder.com/400x200/1976d2/ffffff?text=QwickApps+Framework'
26
- },
27
- {
28
- id: 'product-2',
29
- name: 'QwickApps CMS',
30
- category: 'Content Management',
31
- description: 'Headless CMS built for developers with powerful API and visual editing capabilities.',
32
- shortDescription: 'Developer-friendly headless CMS',
33
- features: ['RESTful APIs', 'Visual editing', 'Multi-tenant'],
34
- technologies: ['Node.js', 'PostgreSQL', 'GraphQL'],
35
- status: 'beta',
36
- image: 'https://via.placeholder.com/400x200/388e3c/ffffff?text=QwickApps+CMS'
37
- },
38
- {
39
- id: 'product-3',
40
- name: 'QwickApps AI',
41
- category: 'AI Platform',
42
- description: 'AI-powered development assistant for generating components and optimizing code.',
43
- shortDescription: 'AI development assistant',
44
- features: ['Code generation', 'Performance optimization', 'Security analysis'],
45
- technologies: ['Python', 'TensorFlow', 'OpenAI API'],
46
- status: 'coming-soon',
47
- image: 'https://via.placeholder.com/400x200/7b1fa2/ffffff?text=QwickApps+AI'
48
- }
16
+ {
17
+ id: 'product-1',
18
+ name: 'QwickApps React Framework',
19
+ category: 'Frontend Framework',
20
+ description: 'A comprehensive React framework for building modern web applications with AI-driven component generation and data binding.',
21
+ shortDescription: 'React framework for modern web apps',
22
+ features: ['AI-driven components', 'Data binding', 'Enterprise ready'],
23
+ technologies: ['React', 'TypeScript', 'Material-UI'],
24
+ status: 'launched',
25
+ image: 'https://via.placeholder.com/400x200/1976d2/ffffff?text=QwickApps+Framework'
26
+ },
27
+ {
28
+ id: 'product-2',
29
+ name: 'QwickApps CMS',
30
+ category: 'Content Management',
31
+ description: 'Headless CMS built for developers with powerful API and visual editing capabilities.',
32
+ shortDescription: 'Developer-friendly headless CMS',
33
+ features: ['RESTful APIs', 'Visual editing', 'Multi-tenant'],
34
+ technologies: ['Node.js', 'PostgreSQL', 'GraphQL'],
35
+ status: 'beta',
36
+ image: 'https://via.placeholder.com/400x200/388e3c/ffffff?text=QwickApps+CMS'
37
+ },
38
+ {
39
+ id: 'product-3',
40
+ name: 'QwickApps AI',
41
+ category: 'AI Platform',
42
+ description: 'AI-powered development assistant for generating components and optimizing code.',
43
+ shortDescription: 'AI development assistant',
44
+ features: ['Code generation', 'Performance optimization', 'Security analysis'],
45
+ technologies: ['Python', 'TensorFlow', 'OpenAI API'],
46
+ status: 'coming-soon',
47
+ image: 'https://via.placeholder.com/400x200/7b1fa2/ffffff?text=QwickApps+AI'
48
+ }
49
49
  ];
50
50
 
51
51
  const sampleFeatures = [
52
- {
53
- id: 'feature-1',
54
- title: 'Lightning Fast',
55
- description: 'Optimized for performance with minimal bundle size and efficient rendering.',
56
- icon: ''
57
- },
58
- {
59
- id: 'feature-2',
60
- title: 'Type Safe',
61
- description: 'Built with TypeScript for better developer experience and fewer runtime errors.',
62
- icon: '🛡️'
63
- },
64
- {
65
- id: 'feature-3',
66
- title: 'Scalable',
67
- description: 'Enterprise-grade architecture that scales with your application needs.',
68
- icon: '📈'
69
- },
70
- {
71
- id: 'feature-4',
72
- title: 'Flexible',
73
- description: 'Customizable components that adapt to your design requirements.',
74
- icon: '🎨'
75
- }
52
+ {
53
+ id: 'feature-1',
54
+ title: 'Lightning Fast',
55
+ description: 'Optimized for performance with minimal bundle size and efficient rendering.',
56
+ icon: ''
57
+ },
58
+ {
59
+ id: 'feature-2',
60
+ title: 'Type Safe',
61
+ description: 'Built with TypeScript for better developer experience and fewer runtime errors.',
62
+ icon: ''
63
+ },
64
+ {
65
+ id: 'feature-3',
66
+ title: 'Scalable',
67
+ description: 'Enterprise-grade architecture that scales with your application needs.',
68
+ icon: '📈'
69
+ },
70
+ {
71
+ id: 'feature-4',
72
+ title: 'Flexible',
73
+ description: 'Customizable components that adapt to your design requirements.',
74
+ icon: ''
75
+ }
76
76
  ];
77
77
 
78
78
  // Sample CMS data for data binding stories with nested structure
79
79
  const sampleCmsData = {
80
- 'cardListGrids': {
81
- 'products': {
82
- items: sampleProducts,
83
- renderComponent: 'ProductCard',
84
- columns: 3,
85
- spacing: 'large',
86
- equalHeight: true,
87
- itemProps: { variant: 'compact', maxFeaturesCompact: 2 }
88
- },
89
- 'features': {
90
- items: sampleFeatures,
91
- renderComponent: 'FeatureCard',
92
- columns: 2,
93
- spacing: 'large',
94
- equalHeight: false,
95
- itemProps: { variant: 'detailed' }
96
- },
97
- 'product-showcase': {
98
- items: sampleProducts.slice(0, 2),
99
- renderComponent: 'ProductCard',
100
- columns: 2,
101
- spacing: 'huge',
102
- equalHeight: true,
103
- itemProps: { variant: 'detailed', showTechnologies: true }
104
- },
105
- 'feature-compact': {
106
- items: sampleFeatures,
107
- renderComponent: 'FeatureCard',
108
- columns: 4,
109
- spacing: 'medium',
110
- equalHeight: true,
111
- itemProps: { variant: 'compact' }
112
- }
113
- }
80
+ 'cardListGrids': {
81
+ 'products': {
82
+ items: sampleProducts,
83
+ renderComponent: 'ProductCard',
84
+ columns: 3,
85
+ spacing: 'large',
86
+ equalHeight: true,
87
+ itemProps: { variant: 'compact', maxFeaturesCompact: 2 }
88
+ },
89
+ 'features': {
90
+ items: sampleFeatures,
91
+ renderComponent: 'FeatureCard',
92
+ columns: 2,
93
+ spacing: 'large',
94
+ equalHeight: false,
95
+ itemProps: { variant: 'detailed' }
96
+ },
97
+ 'product-showcase': {
98
+ items: sampleProducts.slice(0, 2),
99
+ renderComponent: 'ProductCard',
100
+ columns: 2,
101
+ spacing: 'huge',
102
+ equalHeight: true,
103
+ itemProps: { variant: 'detailed', showTechnologies: true }
104
+ },
105
+ 'feature-compact': {
106
+ items: sampleFeatures,
107
+ renderComponent: 'FeatureCard',
108
+ columns: 4,
109
+ spacing: 'medium',
110
+ equalHeight: true,
111
+ itemProps: { variant: 'compact' }
112
+ }
113
+ }
114
114
  };
115
115
 
116
116
  const dataProvider = new JsonDataProvider({ data: sampleCmsData });
117
117
 
118
118
  const meta = {
119
- title: 'Blocks/CardListGrid',
120
- component: CardListGrid,
121
- parameters: {
122
- layout: 'padded',
123
- docs: {
124
- description: {
125
- component: `CardListGrid is a versatile grid layout component that can display any type of card component with consistent spacing and responsive design.
119
+ title: 'Blocks/CardListGrid',
120
+ component: CardListGrid,
121
+ parameters: {
122
+ layout: 'padded',
123
+ docs: {
124
+ description: {
125
+ component: `CardListGrid is a versatile grid layout component that can display any type of card component with consistent spacing and responsive design.
126
126
 
127
127
  **Key Features:**
128
128
  - **Universal Grid Layout**: Works with ProductCard, FeatureCard, or any custom card component
@@ -141,10 +141,10 @@ const meta = {
141
141
  - Blog post collections
142
142
  - Team member grids
143
143
  - Portfolio layouts`,
144
- },
145
- },
146
- },
147
- tags: ['autodocs'],
144
+ },
145
+ },
146
+ },
147
+ tags: ['autodocs'],
148
148
  } satisfies Meta<typeof CardListGrid>;
149
149
 
150
150
  export default meta;
@@ -152,388 +152,388 @@ type Story = StoryObj<typeof CardListGrid>;
152
152
 
153
153
  // Traditional Usage Examples
154
154
  export const ProductGrid: Story = {
155
- render: () => (
156
- <QwickApp appId="cardlistgrid-products" appName='Product Grid'>
157
- <CardListGrid
158
- items={sampleProducts}
159
- renderComponent="ProductCard"
160
- columns={3}
161
- spacing="large"
162
- equalHeight={true}
163
- itemProps={{ variant: 'compact', maxFeaturesCompact: 2 }}
164
- />
165
- </QwickApp>
166
- ),
167
- parameters: {
168
- docs: {
169
- description: {
170
- story: 'Grid of ProductCards with consistent spacing and equal height alignment.',
171
- },
172
- },
173
- },
155
+ render: () => (
156
+ <QwickApp appId="cardlistgrid-products" appName='Product Grid'>
157
+ <CardListGrid
158
+ items={sampleProducts}
159
+ renderComponent="ProductCard"
160
+ columns={3}
161
+ spacing="large"
162
+ equalHeight={true}
163
+ itemProps={{ variant: 'compact', maxFeaturesCompact: 2 }}
164
+ />
165
+ </QwickApp>
166
+ ),
167
+ parameters: {
168
+ docs: {
169
+ description: {
170
+ story: 'Grid of ProductCards with consistent spacing and equal height alignment.',
171
+ },
172
+ },
173
+ },
174
174
  };
175
175
 
176
176
  export const FeatureGrid: Story = {
177
- render: () => (
178
- <QwickApp appId="cardlistgrid-features" appName='Feature Grid'>
179
- <CardListGrid
180
- items={sampleFeatures}
181
- renderComponent="FeatureCard"
182
- columns={2}
183
- spacing="large"
184
- equalHeight={false}
185
- itemProps={{ variant: 'detailed' }}
186
- />
187
- </QwickApp>
188
- ),
189
- parameters: {
190
- docs: {
191
- description: {
192
- story: 'Grid of FeatureCards with detailed variant and natural height variation.',
193
- },
194
- },
195
- },
177
+ render: () => (
178
+ <QwickApp appId="cardlistgrid-features" appName='Feature Grid'>
179
+ <CardListGrid
180
+ items={sampleFeatures}
181
+ renderComponent="FeatureCard"
182
+ columns={2}
183
+ spacing="large"
184
+ equalHeight={false}
185
+ itemProps={{ variant: 'detailed' }}
186
+ />
187
+ </QwickApp>
188
+ ),
189
+ parameters: {
190
+ docs: {
191
+ description: {
192
+ story: 'Grid of FeatureCards with detailed variant and natural height variation.',
193
+ },
194
+ },
195
+ },
196
196
  };
197
197
 
198
198
  export const CustomRenderFunction: Story = {
199
- render: () => {
200
- const customRenderItem = (item: any, index: number) => (
201
- <Box
202
- key={item.id || index}
203
- sx={{
204
- p: 3,
205
- border: 1,
206
- borderColor: 'divider',
207
- borderRadius: 2,
208
- textAlign: 'center',
209
- backgroundColor: 'background.paper'
210
- }}
211
- >
212
- <Typography variant="h6" gutterBottom>{item.name}</Typography>
213
- <Typography variant="body2" color="text.secondary">
214
- {item.shortDescription || item.description}
215
- </Typography>
216
- </Box>
217
- );
199
+ render: () => {
200
+ const customRenderItem = (item: any, index: number) => (
201
+ <Box
202
+ key={item.id || index}
203
+ sx={{
204
+ p: 3,
205
+ border: 1,
206
+ borderColor: 'divider',
207
+ borderRadius: 2,
208
+ textAlign: 'center',
209
+ backgroundColor: 'background.paper'
210
+ }}
211
+ >
212
+ <Typography variant="h6" gutterBottom>{item.name}</Typography>
213
+ <Typography variant="body2" color="text.secondary">
214
+ {item.shortDescription || item.description}
215
+ </Typography>
216
+ </Box>
217
+ );
218
218
 
219
- return (
220
- <QwickApp appId="cardlistgrid-custom" appName='Custom Render Grid'>
221
- <CardListGrid
222
- items={sampleProducts}
223
- renderItem={customRenderItem}
224
- columns={3}
225
- spacing="medium"
226
- />
227
- </QwickApp>
228
- );
229
- },
230
- parameters: {
231
- docs: {
232
- description: {
233
- story: 'Using a custom render function to create unique card layouts with complete control over appearance.',
234
- },
235
- },
236
- },
219
+ return (
220
+ <QwickApp appId="cardlistgrid-custom" appName='Custom Render Grid'>
221
+ <CardListGrid
222
+ items={sampleProducts}
223
+ renderItem={customRenderItem}
224
+ columns={3}
225
+ spacing="medium"
226
+ />
227
+ </QwickApp>
228
+ );
229
+ },
230
+ parameters: {
231
+ docs: {
232
+ description: {
233
+ story: 'Using a custom render function to create unique card layouts with complete control over appearance.',
234
+ },
235
+ },
236
+ },
237
237
  };
238
238
 
239
239
  export const ColumnVariations: Story = {
240
- render: () => (
241
- <QwickApp appId="cardlistgrid-columns" appName='Column Variations'>
242
- <Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
243
-
244
- <Box>
245
- <Typography variant="h6" gutterBottom>Single Column Layout</Typography>
246
- <CardListGrid
247
- items={[sampleProducts[0]]}
248
- renderComponent="ProductCard"
249
- columns={1}
250
- spacing="large"
251
- itemProps={{ variant: 'detailed', showTechnologies: true }}
252
- />
253
- </Box>
254
-
255
- <Box>
256
- <Typography variant="h6" gutterBottom>Two Column Layout</Typography>
257
- <CardListGrid
258
- items={sampleProducts.slice(0, 2)}
259
- renderComponent="ProductCard"
260
- columns={2}
261
- spacing="large"
262
- itemProps={{ variant: 'compact' }}
263
- />
264
- </Box>
265
-
266
- <Box>
267
- <Typography variant="h6" gutterBottom>Four Column Layout</Typography>
268
- <CardListGrid
269
- items={sampleFeatures}
270
- renderComponent="FeatureCard"
271
- columns={4}
272
- spacing="medium"
273
- itemProps={{ variant: 'compact' }}
274
- />
275
- </Box>
276
-
277
- </Box>
278
- </QwickApp>
279
- ),
280
- parameters: {
281
- docs: {
282
- description: {
283
- story: 'Different column configurations showing how the grid adapts to various layout needs.',
284
- },
285
- },
286
- },
240
+ render: () => (
241
+ <QwickApp appId="cardlistgrid-columns" appName='Column Variations'>
242
+ <Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
243
+
244
+ <Box>
245
+ <Typography variant="h6" gutterBottom>Single Column Layout</Typography>
246
+ <CardListGrid
247
+ items={[sampleProducts[0]]}
248
+ renderComponent="ProductCard"
249
+ columns={1}
250
+ spacing="large"
251
+ itemProps={{ variant: 'detailed', showTechnologies: true }}
252
+ />
253
+ </Box>
254
+
255
+ <Box>
256
+ <Typography variant="h6" gutterBottom>Two Column Layout</Typography>
257
+ <CardListGrid
258
+ items={sampleProducts.slice(0, 2)}
259
+ renderComponent="ProductCard"
260
+ columns={2}
261
+ spacing="large"
262
+ itemProps={{ variant: 'compact' }}
263
+ />
264
+ </Box>
265
+
266
+ <Box>
267
+ <Typography variant="h6" gutterBottom>Four Column Layout</Typography>
268
+ <CardListGrid
269
+ items={sampleFeatures}
270
+ renderComponent="FeatureCard"
271
+ columns={4}
272
+ spacing="medium"
273
+ itemProps={{ variant: 'compact' }}
274
+ />
275
+ </Box>
276
+
277
+ </Box>
278
+ </QwickApp>
279
+ ),
280
+ parameters: {
281
+ docs: {
282
+ description: {
283
+ story: 'Different column configurations showing how the grid adapts to various layout needs.',
284
+ },
285
+ },
286
+ },
287
287
  };
288
288
 
289
289
  export const SpacingOptions: Story = {
290
- render: () => (
291
- <QwickApp appId="cardlistgrid-spacing" appName='Spacing Options'>
292
- <Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
293
-
294
- <Box>
295
- <Typography variant="h6" gutterBottom>Small Spacing</Typography>
296
- <CardListGrid
297
- items={sampleFeatures.slice(0, 2)}
298
- renderComponent="FeatureCard"
299
- columns={2}
300
- spacing="small"
301
- itemProps={{ variant: 'compact' }}
302
- />
303
- </Box>
304
-
305
- <Box>
306
- <Typography variant="h6" gutterBottom>Large Spacing</Typography>
307
- <CardListGrid
308
- items={sampleFeatures.slice(0, 2)}
309
- renderComponent="FeatureCard"
310
- columns={2}
311
- spacing="large"
312
- itemProps={{ variant: 'compact' }}
313
- />
314
- </Box>
315
-
316
- <Box>
317
- <Typography variant="h6" gutterBottom>Huge Spacing</Typography>
318
- <CardListGrid
319
- items={sampleFeatures.slice(0, 2)}
320
- renderComponent="FeatureCard"
321
- columns={2}
322
- spacing="huge"
323
- itemProps={{ variant: 'compact' }}
324
- />
325
- </Box>
326
-
327
- </Box>
328
- </QwickApp>
329
- ),
330
- parameters: {
331
- docs: {
332
- description: {
333
- story: 'Different spacing options demonstrating visual density and breathing room between cards.',
334
- },
335
- },
336
- },
290
+ render: () => (
291
+ <QwickApp appId="cardlistgrid-spacing" appName='Spacing Options'>
292
+ <Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
293
+
294
+ <Box>
295
+ <Typography variant="h6" gutterBottom>Small Spacing</Typography>
296
+ <CardListGrid
297
+ items={sampleFeatures.slice(0, 2)}
298
+ renderComponent="FeatureCard"
299
+ columns={2}
300
+ spacing="small"
301
+ itemProps={{ variant: 'compact' }}
302
+ />
303
+ </Box>
304
+
305
+ <Box>
306
+ <Typography variant="h6" gutterBottom>Large Spacing</Typography>
307
+ <CardListGrid
308
+ items={sampleFeatures.slice(0, 2)}
309
+ renderComponent="FeatureCard"
310
+ columns={2}
311
+ spacing="large"
312
+ itemProps={{ variant: 'compact' }}
313
+ />
314
+ </Box>
315
+
316
+ <Box>
317
+ <Typography variant="h6" gutterBottom>Huge Spacing</Typography>
318
+ <CardListGrid
319
+ items={sampleFeatures.slice(0, 2)}
320
+ renderComponent="FeatureCard"
321
+ columns={2}
322
+ spacing="huge"
323
+ itemProps={{ variant: 'compact' }}
324
+ />
325
+ </Box>
326
+
327
+ </Box>
328
+ </QwickApp>
329
+ ),
330
+ parameters: {
331
+ docs: {
332
+ description: {
333
+ story: 'Different spacing options demonstrating visual density and breathing room between cards.',
334
+ },
335
+ },
336
+ },
337
337
  };
338
338
 
339
339
  // Data Binding Examples
340
340
  export const DataBindingBasic: Story = {
341
- render: () => (
342
- <QwickApp appId="cardlistgrid-data-binding" appName='CardListGrid Data Binding' dataSource={{ dataProvider }}>
343
- <Box>
344
-
345
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
346
- <Typography variant="h5" gutterBottom>📊 Data-Driven CardListGrid</Typography>
347
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
348
- CardListGrid can be completely driven by CMS data, automatically rendering the specified component type with configured properties.
349
- </Typography>
350
-
351
- <Code title="Usage" language="tsx">{`<CardListGrid dataSource="cardListGrids.products" />`}</Code>
352
-
353
- <Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData['cardListGrids']['products'], null, 2)}</Code>
354
- </Box>
341
+ render: () => (
342
+ <QwickApp appId="cardlistgrid-data-binding" appName='CardListGrid Data Binding' dataSource={{ dataProvider }}>
343
+ <Box>
344
+
345
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
346
+ <Typography variant="h5" gutterBottom> Data-Driven CardListGrid</Typography>
347
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
348
+ CardListGrid can be completely driven by CMS data, automatically rendering the specified component type with configured properties.
349
+ </Typography>
350
+
351
+ <Code title="Usage" language="tsx">{`<CardListGrid dataSource="cardListGrids.products" />`}</Code>
352
+
353
+ <Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData['cardListGrids']['products'], null, 2)}</Code>
354
+ </Box>
355
355
 
356
- <CardListGrid dataSource="cardListGrids.products" />
357
-
358
- </Box>
359
- </QwickApp>
360
- ),
361
- parameters: {
362
- docs: {
363
- description: {
364
- story: 'CardListGrid with data binding - all configuration resolved from CMS data through dataSource.',
365
- },
366
- },
367
- },
356
+ <CardListGrid dataSource="cardListGrids.products" />
357
+
358
+ </Box>
359
+ </QwickApp>
360
+ ),
361
+ parameters: {
362
+ docs: {
363
+ description: {
364
+ story: 'CardListGrid with data binding - all configuration resolved from CMS data through dataSource.',
365
+ },
366
+ },
367
+ },
368
368
  };
369
369
 
370
370
  export const DataBindingAdvanced: Story = {
371
- render: () => (
372
- <QwickApp appId="cardlistgrid-data-advanced" appName='Advanced CardListGrid Data Binding' dataSource={{ dataProvider }}>
373
- <Box>
374
-
375
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
376
- <Typography variant="h5" gutterBottom>🎯 Multiple Grid Types</Typography>
377
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
378
- Different CardListGrid instances can render different component types from separate data sources.
379
- </Typography>
380
- </Box>
371
+ render: () => (
372
+ <QwickApp appId="cardlistgrid-data-advanced" appName='Advanced CardListGrid Data Binding' dataSource={{ dataProvider }}>
373
+ <Box>
374
+
375
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
376
+ <Typography variant="h5" gutterBottom> Multiple Grid Types</Typography>
377
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
378
+ Different CardListGrid instances can render different component types from separate data sources.
379
+ </Typography>
380
+ </Box>
381
381
 
382
- {/* Product Showcase */}
383
- <Box sx={{ mb: 4 }}>
384
- <Typography variant="h4" gutterBottom>Product Showcase</Typography>
385
- <CardListGrid dataSource="cardListGrids.product-showcase" />
386
- </Box>
382
+ {/* Product Showcase */}
383
+ <Box sx={{ mb: 4 }}>
384
+ <Typography variant="h4" gutterBottom>Product Showcase</Typography>
385
+ <CardListGrid dataSource="cardListGrids.product-showcase" />
386
+ </Box>
387
387
 
388
- {/* Feature Grid */}
389
- <Box sx={{ mb: 4 }}>
390
- <Typography variant="h4" gutterBottom>Key Features</Typography>
391
- <CardListGrid dataSource="cardListGrids.feature-compact" />
392
- </Box>
393
-
394
- </Box>
395
- </QwickApp>
396
- ),
397
- parameters: {
398
- docs: {
399
- description: {
400
- story: 'Advanced data binding with multiple grid types showcasing different component configurations.',
401
- },
402
- },
403
- },
388
+ {/* Feature Grid */}
389
+ <Box sx={{ mb: 4 }}>
390
+ <Typography variant="h4" gutterBottom>Key Features</Typography>
391
+ <CardListGrid dataSource="cardListGrids.feature-compact" />
392
+ </Box>
393
+
394
+ </Box>
395
+ </QwickApp>
396
+ ),
397
+ parameters: {
398
+ docs: {
399
+ description: {
400
+ story: 'Advanced data binding with multiple grid types showcasing different component configurations.',
401
+ },
402
+ },
403
+ },
404
404
  };
405
405
 
406
406
  export const DataBindingWithFallback: Story = {
407
- render: () => (
408
- <QwickApp appId="cardlistgrid-fallback" appName='CardListGrid Data Binding with Fallback' dataSource={{ dataProvider }}>
409
- <Box>
410
-
411
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
412
- <Typography variant="h5" gutterBottom>🛡️ Fallback Support</Typography>
413
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
414
- CardListGrid gracefully handles missing data sources with fallback props and items.
415
- </Typography>
416
-
417
- <Code title="Fallback Usage" language="tsx">{`<CardListGrid
418
- dataSource="cardListGrids.nonexistent"
419
- items={fallbackItems}
420
- renderComponent="ProductCard"
421
- columns={2}
407
+ render: () => (
408
+ <QwickApp appId="cardlistgrid-fallback" appName='CardListGrid Data Binding with Fallback' dataSource={{ dataProvider }}>
409
+ <Box>
410
+
411
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
412
+ <Typography variant="h5" gutterBottom> Fallback Support</Typography>
413
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
414
+ CardListGrid gracefully handles missing data sources with fallback props and items.
415
+ </Typography>
416
+
417
+ <Code title="Fallback Usage" language="tsx">{`<CardListGrid
418
+ dataSource="cardListGrids.nonexistent"
419
+ items={fallbackItems}
420
+ renderComponent="ProductCard"
421
+ columns={2}
422
422
  />`}</Code>
423
- </Box>
423
+ </Box>
424
424
 
425
- <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
426
- <Box>
427
- <Typography variant="h6" gutterBottom>Missing Data Source (Fallback)</Typography>
428
- <CardListGrid
429
- dataSource="nonexistent.grid"
430
- items={sampleProducts.slice(0, 2)}
431
- renderComponent="ProductCard"
432
- columns={1}
433
- spacing="medium"
434
- itemProps={{ variant: 'compact' }}
435
- />
436
- </Box>
437
- <Box>
438
- <Typography variant="h6" gutterBottom>Valid Data Source</Typography>
439
- <CardListGrid dataSource="cardListGrids.features" />
440
- </Box>
441
- </Box>
442
-
443
- </Box>
444
- </QwickApp>
445
- ),
446
- parameters: {
447
- docs: {
448
- description: {
449
- story: 'CardListGrid with fallback props when dataSource is missing or unavailable.',
450
- },
451
- },
452
- },
425
+ <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
426
+ <Box>
427
+ <Typography variant="h6" gutterBottom>Missing Data Source (Fallback)</Typography>
428
+ <CardListGrid
429
+ dataSource="nonexistent.grid"
430
+ items={sampleProducts.slice(0, 2)}
431
+ renderComponent="ProductCard"
432
+ columns={1}
433
+ spacing="medium"
434
+ itemProps={{ variant: 'compact' }}
435
+ />
436
+ </Box>
437
+ <Box>
438
+ <Typography variant="h6" gutterBottom>Valid Data Source</Typography>
439
+ <CardListGrid dataSource="cardListGrids.features" />
440
+ </Box>
441
+ </Box>
442
+
443
+ </Box>
444
+ </QwickApp>
445
+ ),
446
+ parameters: {
447
+ docs: {
448
+ description: {
449
+ story: 'CardListGrid with fallback props when dataSource is missing or unavailable.',
450
+ },
451
+ },
452
+ },
453
453
  };
454
454
 
455
455
  export const RealWorldExample: Story = {
456
- render: () => (
457
- <QwickApp appId="cardlistgrid-real-world" appName='Real World CardListGrid Example' dataSource={{ dataProvider }}>
458
- <Box>
459
-
460
- {/* Hero Products */}
461
- <Box sx={{ mb: 6 }}>
462
- <Typography variant="h3" gutterBottom>Our Products</Typography>
463
- <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
464
- Comprehensive solutions for modern web development
465
- </Typography>
466
- <CardListGrid dataSource="cardListGrids.products" />
467
- </Box>
468
-
469
- {/* Features Section */}
470
- <Box sx={{ mb: 6 }}>
471
- <Typography variant="h3" gutterBottom>Why Choose QwickApps?</Typography>
472
- <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
473
- Built for developers who demand excellence
474
- </Typography>
475
- <CardListGrid dataSource="cardListGrids.feature-compact" />
476
- </Box>
477
-
478
- {/* Detailed Product Showcase */}
479
- <Box>
480
- <Typography variant="h3" gutterBottom>Featured Solutions</Typography>
481
- <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
482
- Deep dive into our flagship offerings
483
- </Typography>
484
- <CardListGrid dataSource="cardListGrids.product-showcase" />
485
- </Box>
486
-
487
- </Box>
488
- </QwickApp>
489
- ),
490
- parameters: {
491
- docs: {
492
- description: {
493
- story: 'Real-world example combining multiple CardListGrid instances in a complete landing page layout.',
494
- },
495
- },
496
- },
456
+ render: () => (
457
+ <QwickApp appId="cardlistgrid-real-world" appName='Real World CardListGrid Example' dataSource={{ dataProvider }}>
458
+ <Box>
459
+
460
+ {/* Hero Products */}
461
+ <Box sx={{ mb: 6 }}>
462
+ <Typography variant="h3" gutterBottom>Our Products</Typography>
463
+ <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
464
+ Comprehensive solutions for modern web development
465
+ </Typography>
466
+ <CardListGrid dataSource="cardListGrids.products" />
467
+ </Box>
468
+
469
+ {/* Features Section */}
470
+ <Box sx={{ mb: 6 }}>
471
+ <Typography variant="h3" gutterBottom>Why Choose QwickApps?</Typography>
472
+ <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
473
+ Built for developers who demand excellence
474
+ </Typography>
475
+ <CardListGrid dataSource="cardListGrids.feature-compact" />
476
+ </Box>
477
+
478
+ {/* Detailed Product Showcase */}
479
+ <Box>
480
+ <Typography variant="h3" gutterBottom>Featured Solutions</Typography>
481
+ <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
482
+ Deep dive into our flagship offerings
483
+ </Typography>
484
+ <CardListGrid dataSource="cardListGrids.product-showcase" />
485
+ </Box>
486
+
487
+ </Box>
488
+ </QwickApp>
489
+ ),
490
+ parameters: {
491
+ docs: {
492
+ description: {
493
+ story: 'Real-world example combining multiple CardListGrid instances in a complete landing page layout.',
494
+ },
495
+ },
496
+ },
497
497
  };
498
498
 
499
499
  export const EmptyAndLoadingStates: Story = {
500
- render: () => (
501
- <QwickApp appId="cardlistgrid-states" appName='CardListGrid States' dataSource={{ dataProvider }}>
502
- <Box>
503
-
504
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
505
- <Typography variant="h5" gutterBottom>🔄 State Management</Typography>
506
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
507
- CardListGrid handles various states including empty data and component type switching.
508
- </Typography>
509
- </Box>
500
+ render: () => (
501
+ <QwickApp appId="cardlistgrid-states" appName='CardListGrid States' dataSource={{ dataProvider }}>
502
+ <Box>
503
+
504
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
505
+ <Typography variant="h5" gutterBottom> State Management</Typography>
506
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
507
+ CardListGrid handles various states including empty data and component type switching.
508
+ </Typography>
509
+ </Box>
510
510
 
511
- <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
512
- <Box>
513
- <Typography variant="h6" gutterBottom>Empty Items (Returns null)</Typography>
514
- <CardListGrid
515
- items={[]}
516
- renderComponent="ProductCard"
517
- columns={2}
518
- />
519
- <Typography variant="body2" color="text.secondary" sx={{ mt: 2 }}>
520
- Component returns null when no items are provided
521
- </Typography>
522
- </Box>
523
- <Box>
524
- <Typography variant="h6" gutterBottom>Valid Grid</Typography>
525
- <CardListGrid dataSource="cardListGrids.features" />
526
- </Box>
527
- </Box>
528
-
529
- </Box>
530
- </QwickApp>
531
- ),
532
- parameters: {
533
- docs: {
534
- description: {
535
- story: 'Demonstrates empty state handling and normal grid display states.',
536
- },
537
- },
538
- },
511
+ <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
512
+ <Box>
513
+ <Typography variant="h6" gutterBottom>Empty Items (Returns null)</Typography>
514
+ <CardListGrid
515
+ items={[]}
516
+ renderComponent="ProductCard"
517
+ columns={2}
518
+ />
519
+ <Typography variant="body2" color="text.secondary" sx={{ mt: 2 }}>
520
+ Component returns null when no items are provided
521
+ </Typography>
522
+ </Box>
523
+ <Box>
524
+ <Typography variant="h6" gutterBottom>Valid Grid</Typography>
525
+ <CardListGrid dataSource="cardListGrids.features" />
526
+ </Box>
527
+ </Box>
528
+
529
+ </Box>
530
+ </QwickApp>
531
+ ),
532
+ parameters: {
533
+ docs: {
534
+ description: {
535
+ story: 'Demonstrates empty state handling and normal grid display states.',
536
+ },
537
+ },
538
+ },
539
539
  };