@qwickapps/react-framework 1.3.4 → 1.4.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 (325) hide show
  1. package/README.md +1688 -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/Content.d.ts.map +1 -1
  28. package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
  29. package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
  30. package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
  31. package/dist/components/blocks/Footer.d.ts.map +1 -1
  32. package/dist/components/blocks/HeroBlock.d.ts +27 -13
  33. package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
  34. package/dist/components/blocks/Image.d.ts +41 -0
  35. package/dist/components/blocks/Image.d.ts.map +1 -0
  36. package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
  37. package/dist/components/blocks/ProductCard.d.ts.map +1 -1
  38. package/dist/components/blocks/Section.d.ts +16 -2
  39. package/dist/components/blocks/Section.d.ts.map +1 -1
  40. package/dist/components/blocks/Text.d.ts +41 -0
  41. package/dist/components/blocks/Text.d.ts.map +1 -0
  42. package/dist/components/blocks/index.d.ts +4 -0
  43. package/dist/components/blocks/index.d.ts.map +1 -1
  44. package/dist/components/buttons/Button.d.ts +23 -7
  45. package/dist/components/buttons/Button.d.ts.map +1 -1
  46. package/dist/components/forms/FormBlock.d.ts +19 -13
  47. package/dist/components/forms/FormBlock.d.ts.map +1 -1
  48. package/dist/components/index.d.ts +4 -0
  49. package/dist/components/index.d.ts.map +1 -1
  50. package/dist/components/input/ChoiceInputField.d.ts +17 -11
  51. package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
  52. package/dist/components/input/HtmlInputField.d.ts +17 -11
  53. package/dist/components/input/HtmlInputField.d.ts.map +1 -1
  54. package/dist/components/input/SelectInputField.d.ts +16 -10
  55. package/dist/components/input/SelectInputField.d.ts.map +1 -1
  56. package/dist/components/input/SwitchInputField.d.ts +16 -10
  57. package/dist/components/input/SwitchInputField.d.ts.map +1 -1
  58. package/dist/components/input/TextField.d.ts.map +1 -1
  59. package/dist/components/input/TextInputField.d.ts +16 -11
  60. package/dist/components/input/TextInputField.d.ts.map +1 -1
  61. package/dist/components/layout/GridCell.d.ts +23 -6
  62. package/dist/components/layout/GridCell.d.ts.map +1 -1
  63. package/dist/components/layout/GridLayout.d.ts +24 -23
  64. package/dist/components/layout/GridLayout.d.ts.map +1 -1
  65. package/dist/components/pages/FormPage.d.ts.map +1 -1
  66. package/dist/components/pages/Page.d.ts +49 -87
  67. package/dist/components/pages/Page.d.ts.map +1 -1
  68. package/dist/components/pages/index.d.ts +2 -2
  69. package/dist/components/pages/index.d.ts.map +1 -1
  70. package/dist/config/AppConfig.d.ts +49 -0
  71. package/dist/config/AppConfig.d.ts.map +1 -0
  72. package/dist/config/AppConfigBuilder.d.ts +75 -0
  73. package/dist/config/AppConfigBuilder.d.ts.map +1 -0
  74. package/dist/config/index.d.ts +13 -0
  75. package/dist/config/index.d.ts.map +1 -0
  76. package/dist/config/types.d.ts +130 -0
  77. package/dist/config/types.d.ts.map +1 -0
  78. package/dist/config.d.ts +15 -0
  79. package/dist/config.d.ts.map +1 -0
  80. package/dist/config.esm.js +451 -0
  81. package/dist/config.js +455 -0
  82. package/dist/contexts/PrintModeContext.d.ts +27 -0
  83. package/dist/contexts/PrintModeContext.d.ts.map +1 -0
  84. package/dist/contexts/QwickAppContext.d.ts +2 -2
  85. package/dist/contexts/QwickAppContext.d.ts.map +1 -1
  86. package/dist/contexts/ThemeContext.d.ts.map +1 -1
  87. package/dist/contexts/index.d.ts +2 -0
  88. package/dist/contexts/index.d.ts.map +1 -1
  89. package/dist/hooks/index.d.ts +2 -0
  90. package/dist/hooks/index.d.ts.map +1 -1
  91. package/dist/hooks/usePrintMode.d.ts +39 -0
  92. package/dist/hooks/usePrintMode.d.ts.map +1 -0
  93. package/dist/index.css +1 -1
  94. package/dist/index.d.ts +1 -0
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.esm.css +1 -1
  97. package/dist/index.esm.js +20722 -16021
  98. package/dist/index.js +20725 -16010
  99. package/dist/schemas/CodeSchema.d.ts +2 -1
  100. package/dist/schemas/CodeSchema.d.ts.map +1 -1
  101. package/dist/schemas/CollapsibleLayoutSchema.d.ts +2 -1
  102. package/dist/schemas/CollapsibleLayoutSchema.d.ts.map +1 -1
  103. package/dist/schemas/ContentSchema.d.ts +2 -1
  104. package/dist/schemas/ContentSchema.d.ts.map +1 -1
  105. package/dist/schemas/GridCellSchema.d.ts +25 -0
  106. package/dist/schemas/GridCellSchema.d.ts.map +1 -0
  107. package/dist/schemas/GridLayoutSchema.d.ts +23 -0
  108. package/dist/schemas/GridLayoutSchema.d.ts.map +1 -0
  109. package/dist/schemas/HtmlSchema.d.ts +14 -0
  110. package/dist/schemas/HtmlSchema.d.ts.map +1 -0
  111. package/dist/schemas/ImageSchema.d.ts +32 -0
  112. package/dist/schemas/ImageSchema.d.ts.map +1 -0
  113. package/dist/schemas/LogoSchema.d.ts +35 -0
  114. package/dist/schemas/LogoSchema.d.ts.map +1 -0
  115. package/dist/schemas/MarkdownSchema.d.ts +14 -0
  116. package/dist/schemas/MarkdownSchema.d.ts.map +1 -0
  117. package/dist/schemas/PageTemplateSchema.d.ts +31 -0
  118. package/dist/schemas/PageTemplateSchema.d.ts.map +1 -0
  119. package/dist/schemas/PrintConfigSchema.d.ts +31 -0
  120. package/dist/schemas/PrintConfigSchema.d.ts.map +1 -0
  121. package/dist/schemas/SectionSchema.d.ts +2 -1
  122. package/dist/schemas/SectionSchema.d.ts.map +1 -1
  123. package/dist/schemas/TextSchema.d.ts +37 -0
  124. package/dist/schemas/TextSchema.d.ts.map +1 -0
  125. package/dist/schemas/ViewModelSchema.d.ts +23 -0
  126. package/dist/schemas/ViewModelSchema.d.ts.map +1 -0
  127. package/dist/schemas/index.d.ts +15 -1
  128. package/dist/schemas/index.d.ts.map +1 -1
  129. package/dist/schemas/transformers/ComponentTransformer.d.ts +116 -0
  130. package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
  131. package/dist/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
  132. package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
  133. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +66 -0
  134. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +1 -0
  135. package/dist/schemas/transformers/registry.d.ts +15 -0
  136. package/dist/schemas/transformers/registry.d.ts.map +1 -0
  137. package/dist/schemas/types/Serializable.d.ts +46 -0
  138. package/dist/schemas/types/Serializable.d.ts.map +1 -0
  139. package/dist/utils/htmlTransform.d.ts.map +1 -1
  140. package/dist/utils/reactUtils.d.ts +12 -3
  141. package/dist/utils/reactUtils.d.ts.map +1 -1
  142. package/package.json +17 -3
  143. package/src/{components/__tests__ → __tests__/components}/AccessibilityProvider.test.tsx +1 -1
  144. package/src/{components/__tests__ → __tests__/components}/Article.test.tsx +1 -1
  145. package/src/{components/__tests__ → __tests__/components}/Breadcrumbs.test.tsx +1 -1
  146. package/src/{components/__tests__ → __tests__/components}/Button.test.tsx +1 -1
  147. package/src/{components/__tests__ → __tests__/components}/CardListGrid.test.tsx +2 -2
  148. package/src/{components/__tests__ → __tests__/components}/ChoiceInputField.test.tsx +1 -1
  149. package/src/{components/__tests__ → __tests__/components}/Code.test.tsx +1 -1
  150. package/src/{components/__tests__ → __tests__/components}/Content.integration.test.tsx +1 -1
  151. package/src/{components/__tests__ → __tests__/components}/Content.test.tsx +1 -1
  152. package/src/{components/__tests__ → __tests__/components}/CoverImageHeader.test.tsx +2 -2
  153. package/src/{components/__tests__ → __tests__/components}/ErrorBoundary.test.tsx +1 -1
  154. package/src/{components/__tests__ → __tests__/components}/FeatureCard.integration.test.tsx +2 -2
  155. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.integration.test.tsx +2 -2
  156. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.test.tsx +2 -2
  157. package/src/{components/__tests__ → __tests__/components}/Footer.test.tsx +4 -4
  158. package/src/{components/__tests__ → __tests__/components}/FormBlock.test.tsx +1 -1
  159. package/src/{components/__tests__ → __tests__/components}/HeroBlock.integration.test.tsx +2 -2
  160. package/src/{components/__tests__ → __tests__/components}/HeroBlock.test.tsx +233 -7
  161. package/src/{components/__tests__ → __tests__/components}/Html.test.tsx +11 -2
  162. package/src/{components/__tests__ → __tests__/components}/HtmlInputField.test.tsx +3 -3
  163. package/src/__tests__/components/Logo.test.js +3 -3
  164. package/src/{components/__tests__ → __tests__/components}/Markdown.test.tsx +1 -1
  165. package/src/{components/__tests__ → __tests__/components}/PageBannerHeader.test.tsx +3 -3
  166. package/src/{components/__tests__ → __tests__/components}/PaletteSwitcher.test.tsx +3 -3
  167. package/src/{components/__tests__ → __tests__/components}/ProductCard.test.tsx +4 -4
  168. package/src/{components/__tests__ → __tests__/components}/SafeSpan.integration.test.tsx +2 -2
  169. package/src/{components/__tests__ → __tests__/components}/SafeSpan.simple.test.tsx +1 -1
  170. package/src/{components/__tests__ → __tests__/components}/SafeSpan.test.tsx +1 -1
  171. package/src/{components/__tests__ → __tests__/components}/Section.integration.test.tsx +1 -1
  172. package/src/{components/__tests__ → __tests__/components}/Section.test.tsx +1 -1
  173. package/src/{components/__tests__ → __tests__/components}/SelectInputField.test.tsx +1 -1
  174. package/src/{components/__tests__ → __tests__/components}/TextInputField.test.tsx +3 -3
  175. package/src/{components/__tests__ → __tests__/components}/ThemeSwitcher.test.tsx +3 -3
  176. package/src/__tests__/components/base/ModelView.test.tsx +220 -0
  177. package/src/__tests__/components/blocks/Code.performance.test.tsx +625 -0
  178. package/src/__tests__/components/blocks/Code.serialization.test.tsx +507 -0
  179. package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +414 -0
  180. package/src/__tests__/components/blocks/Image.serialization.test.tsx +257 -0
  181. package/src/__tests__/components/blocks/Section.serialization.test.tsx +553 -0
  182. package/src/__tests__/components/blocks/Text.performance.test.tsx +442 -0
  183. package/src/__tests__/components/blocks/Text.serialization.test.tsx +491 -0
  184. package/src/__tests__/components/buttons/Button.serialization.test.tsx +443 -0
  185. package/src/__tests__/components/input/FormComponents.serialization.test.tsx +482 -0
  186. package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +439 -0
  187. package/src/__tests__/components/input/TextInputField.serialization.test.tsx +359 -0
  188. package/src/{components/layout/CollapsibleLayout/__tests__ → __tests__/components/layout}/CollapsibleLayout.test.tsx +4 -4
  189. package/src/__tests__/components/layout/GridCell.serialization.test.tsx +403 -0
  190. package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +311 -0
  191. package/src/__tests__/hooks/usePrintMode.test.ts +89 -0
  192. package/src/__tests__/schemas/PageTemplateSchema.test.ts +161 -0
  193. package/src/__tests__/schemas/PrintConfigSchema.test.ts +127 -0
  194. package/src/__tests__/schemas/ViewModelSchema.test.ts +80 -0
  195. package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +602 -0
  196. package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +301 -0
  197. package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +521 -0
  198. package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +586 -0
  199. package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +103 -0
  200. package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +1165 -0
  201. package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +602 -0
  202. package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +691 -0
  203. package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +460 -0
  204. package/src/__tests__/schemas/transformers/TestAutomation.test.ts +597 -0
  205. package/src/{utils/__tests__ → __tests__/utils}/nested-dom-fix.test.tsx +1 -1
  206. package/src/components/ErrorBoundary.tsx +8 -8
  207. package/src/components/Html.tsx +147 -44
  208. package/src/components/Logo.tsx +198 -100
  209. package/src/components/Markdown.tsx +125 -16
  210. package/src/components/QwickApp.tsx +64 -31
  211. package/src/components/QwickIcon.tsx +59 -0
  212. package/src/components/SafeSpan.tsx +65 -10
  213. package/src/components/Scaffold.tsx +2 -8
  214. package/src/components/base/ModelView.tsx +199 -0
  215. package/src/components/base/index.ts +11 -0
  216. package/src/components/blocks/Article.tsx +57 -18
  217. package/src/components/blocks/Code.md +529 -0
  218. package/src/components/blocks/Code.tsx +102 -15
  219. package/src/components/blocks/Content.tsx +25 -77
  220. package/src/components/blocks/CoverImageHeader.tsx +9 -4
  221. package/src/components/blocks/FeatureCard.tsx +1 -2
  222. package/src/components/blocks/FeatureGrid.tsx +19 -1
  223. package/src/components/blocks/Footer.tsx +13 -1
  224. package/src/components/blocks/HeroBlock.tsx +87 -20
  225. package/src/components/blocks/Image.tsx +395 -0
  226. package/src/components/blocks/PageBannerHeader.tsx +14 -12
  227. package/src/components/blocks/ProductCard.tsx +51 -52
  228. package/src/components/blocks/Section.tsx +113 -8
  229. package/src/components/blocks/Text.tsx +285 -0
  230. package/src/components/blocks/index.ts +4 -0
  231. package/src/components/buttons/Button.tsx +184 -15
  232. package/src/components/forms/FormBlock.tsx +70 -17
  233. package/src/components/index.ts +5 -0
  234. package/src/components/input/ChoiceInputField.tsx +48 -18
  235. package/src/components/input/HtmlInputField.tsx +48 -18
  236. package/src/components/input/SelectInputField.tsx +48 -16
  237. package/src/components/input/SwitchInputField.tsx +48 -17
  238. package/src/components/input/TextField.tsx +41 -1
  239. package/src/components/input/TextInputField.tsx +52 -18
  240. package/src/components/layout/GridCell.tsx +118 -9
  241. package/src/components/layout/GridLayout.tsx +125 -24
  242. package/src/components/pages/FormPage.tsx +0 -1
  243. package/src/components/pages/Page.css +304 -332
  244. package/src/components/pages/Page.tsx +307 -255
  245. package/src/components/pages/index.ts +2 -2
  246. package/src/config/AppConfig.ts +133 -0
  247. package/src/config/AppConfigBuilder.ts +421 -0
  248. package/src/config/__tests__/AppConfig.test.ts +385 -0
  249. package/src/config/__tests__/AppConfigBuilder.test.ts +432 -0
  250. package/src/config/index.ts +24 -0
  251. package/src/config/types.ts +170 -0
  252. package/src/config.ts +25 -0
  253. package/src/contexts/PrintModeContext.tsx +332 -0
  254. package/src/contexts/QwickAppContext.tsx +2 -2
  255. package/src/contexts/ThemeContext.tsx +1 -2
  256. package/src/contexts/index.ts +2 -0
  257. package/src/hooks/index.ts +5 -1
  258. package/src/hooks/usePrintMode.ts +73 -0
  259. package/src/index.ts +3 -0
  260. package/src/schemas/CodeSchema.ts +3 -3
  261. package/src/schemas/CollapsibleLayoutSchema.ts +2 -1
  262. package/src/schemas/ContentSchema.ts +2 -1
  263. package/src/schemas/GridCellSchema.ts +164 -0
  264. package/src/schemas/GridLayoutSchema.ts +133 -0
  265. package/src/schemas/HtmlSchema.ts +47 -0
  266. package/src/schemas/ImageSchema.ts +235 -0
  267. package/src/schemas/LogoSchema.ts +241 -0
  268. package/src/schemas/MarkdownSchema.ts +47 -0
  269. package/src/schemas/PageTemplateSchema.ts +186 -0
  270. package/src/schemas/PrintConfigSchema.ts +207 -0
  271. package/src/schemas/README.md +661 -0
  272. package/src/schemas/SectionSchema.ts +2 -1
  273. package/src/schemas/TextSchema.ts +329 -0
  274. package/src/schemas/ViewModelSchema.ts +115 -0
  275. package/src/schemas/index.ts +21 -2
  276. package/src/schemas/transformers/ComponentTransformer.ts +403 -0
  277. package/src/schemas/transformers/ReactNodeTransformer.ts +236 -0
  278. package/src/schemas/transformers/registry.ts +72 -0
  279. package/src/schemas/types/Serializable.ts +51 -0
  280. package/src/stories/AccessibilityProvider.stories.tsx +253 -253
  281. package/src/stories/Article.stories.tsx +433 -433
  282. package/src/stories/Button.stories.tsx +1 -1
  283. package/src/stories/CardListGrid.stories.tsx +451 -451
  284. package/src/stories/ChoiceInputField.stories.tsx +503 -503
  285. package/src/stories/Code.stories.tsx +1 -1
  286. package/src/stories/CollapsibleLayout.stories.tsx +1414 -1414
  287. package/src/stories/Content.stories.tsx +393 -393
  288. package/src/stories/CoverImageHeader.stories.tsx +701 -701
  289. package/src/stories/DataBinding.advanced.stories.tsx +432 -432
  290. package/src/stories/DataProvider.stories.tsx +1192 -1192
  291. package/src/stories/FeatureCard.stories.tsx +557 -557
  292. package/src/stories/FeatureGrid.stories.tsx +594 -594
  293. package/src/stories/Footer.stories.tsx +640 -640
  294. package/src/stories/FormBlock.stories.tsx +760 -760
  295. package/src/stories/FormComponents.stories.tsx +349 -541
  296. package/src/stories/GridCell.stories.tsx +417 -0
  297. package/src/stories/GridLayout.stories.tsx +353 -0
  298. package/src/stories/HeroBlock.stories.tsx +862 -373
  299. package/src/stories/HtmlInputField.stories.tsx +474 -474
  300. package/src/stories/Image.stories.tsx +819 -0
  301. package/src/stories/Introduction.stories.tsx +667 -667
  302. package/src/stories/LayoutBlocks.stories.tsx +324 -324
  303. package/src/stories/Logo.stories.tsx +165 -6
  304. package/src/stories/Markdown.stories.tsx +137 -137
  305. package/src/stories/ModelView.stories.tsx +477 -0
  306. package/src/stories/Page.stories.tsx +688 -688
  307. package/src/stories/PageBannerHeader.stories.tsx +864 -864
  308. package/src/stories/PaletteSwitcher.stories.tsx +119 -119
  309. package/src/stories/ProductCard.stories.tsx +424 -424
  310. package/src/stories/QwickApp.stories.tsx +368 -368
  311. package/src/stories/ResponsiveMenu.stories.tsx +249 -249
  312. package/src/stories/SafeSpan.stories.tsx +531 -531
  313. package/src/stories/Section.stories.tsx +90 -2
  314. package/src/stories/SelectInputField.stories.tsx +524 -524
  315. package/src/stories/Text.stories.tsx +560 -0
  316. package/src/stories/TextInputField.stories.tsx +443 -443
  317. package/src/stories/ThemeSwitcher.stories.tsx +123 -123
  318. package/src/utils/htmlTransform.tsx +74 -53
  319. package/src/utils/reactUtils.tsx +57 -6
  320. package/dist/index.bundled.css +0 -12
  321. /package/src/{hooks/__tests__ → __tests__/hooks}/useDataBinding.test.tsx.disabled +0 -0
  322. /package/src/{schemas/__tests__ → __tests__/schemas}/builders.test.ts +0 -0
  323. /package/src/{utils/__tests__ → __tests__/utils}/createDataDrivenComponent.test.tsx.disabled +0 -0
  324. /package/src/{utils/__tests__ → __tests__/utils}/htmlTransform.test.tsx +0 -0
  325. /package/src/{utils/__tests__ → __tests__/utils}/optional-logging.test.ts +0 -0
@@ -13,173 +13,173 @@ import QwickApp from '../components/QwickApp';
13
13
 
14
14
  // Sample HTML content for different use cases
15
15
  const simpleArticleHtml = `
16
- <h1>Getting Started with QwickApps React Framework</h1>
17
- <p>Welcome to the QwickApps React Framework, a comprehensive React-based solution for building modern web applications. This guide will walk you through the basics of using our framework.</p>
18
-
19
- <h2>Installation</h2>
20
- <p>To get started, install the framework using npm:</p>
21
- <pre><code class="language-bash">npm install @qwickapps/react-framework</code></pre>
22
-
23
- <h2>Key Features</h2>
24
- <ul>
25
- <li>Component-based architecture</li>
26
- <li>Built-in data binding</li>
27
- <li>Responsive design system</li>
28
- <li>TypeScript support</li>
29
- </ul>
30
-
31
- <p>For more information, visit our <a href="https://qwickapps.com">official website</a>.</p>
16
+ <h1>Getting Started with QwickApps React Framework</h1>
17
+ <p>Welcome to the QwickApps React Framework, a comprehensive React-based solution for building modern web applications. This guide will walk you through the basics of using our framework.</p>
18
+
19
+ <h2>Installation</h2>
20
+ <p>To get started, install the framework using npm:</p>
21
+ <pre><code class="language-bash">npm install @qwickapps/react-framework</code></pre>
22
+
23
+ <h2>Key Features</h2>
24
+ <ul>
25
+ <li>Component-based architecture</li>
26
+ <li>Built-in data binding</li>
27
+ <li>Responsive design system</li>
28
+ <li>TypeScript support</li>
29
+ </ul>
30
+
31
+ <p>For more information, visit our <a href="https://qwickapps.com">official website</a>.</p>
32
32
  `;
33
33
 
34
34
  const codeExamplesHtml = `
35
- <h1>Code Examples</h1>
36
- <p>Here are some practical examples of using QwickApps React Framework components.</p>
37
-
38
- <h2>Basic Component Usage</h2>
39
- <p>Create a simple ProductCard component:</p>
40
- <pre><code class="language-typescript">import { ProductCard } from '@qwickapps/react-framework';
35
+ <h1>Code Examples</h1>
36
+ <p>Here are some practical examples of using QwickApps React Framework components.</p>
37
+
38
+ <h2>Basic Component Usage</h2>
39
+ <p>Create a simple ProductCard component:</p>
40
+ <pre><code class="language-typescript">import { ProductCard } from '@qwickapps/react-framework';
41
41
 
42
42
  const product = {
43
- id: 'product-1',
44
- name: 'Amazing Product',
45
- description: 'This product will change your life',
46
- price: '$99.99'
43
+ id: 'product-1',
44
+ name: 'Amazing Product',
45
+ description: 'This product will change your life',
46
+ price: '$99.99'
47
47
  };
48
48
 
49
49
  function MyApp() {
50
- return (
51
- &lt;ProductCard product={product} variant="detailed" /&gt;
52
- );
50
+ return (
51
+ &lt;ProductCard product={product} variant="detailed" /&gt;
52
+ );
53
53
  }</code></pre>
54
54
 
55
- <h2>Data Binding Example</h2>
56
- <p>Using data binding with CMS integration:</p>
57
- <pre><code class="language-jsx">&lt;QwickApp dataSource={dataProvider}&gt;
58
- &lt;ProductCard dataSource="products.featured" /&gt;
55
+ <h2>Data Binding Example</h2>
56
+ <p>Using data binding with CMS integration:</p>
57
+ <pre><code class="language-jsx">&lt;QwickApp dataSource={dataProvider}&gt;
58
+ &lt;ProductCard dataSource="products.featured" /&gt;
59
59
  &lt;/QwickApp&gt;</code></pre>
60
60
 
61
- <p>You can also use inline code like <code>console.log('hello')</code> within paragraphs.</p>
62
-
63
- <h2>Complex Multi-line Code</h2>
64
- <code>
61
+ <p>You can also use inline code like <code>console.log('hello')</code> within paragraphs.</p>
62
+
63
+ <h2>Complex Multi-line Code</h2>
64
+ <code>
65
65
  function complexFunction() {
66
- const data = fetchData();
67
- return processData(data);
66
+ const data = fetchData();
67
+ return processData(data);
68
68
  }
69
- </code>
69
+ </code>
70
70
  `;
71
71
 
72
72
  const blogSectionHtml = `
73
- <header class="blog-header">
74
- <h1>This Header Will Be Removed</h1>
75
- <p>When skipHeader is true</p>
76
- </header>
77
-
78
- <h1>Advanced QwickApps Techniques</h1>
79
- <p>Learn advanced patterns and best practices for building scalable applications.</p>
80
-
81
- <section class="blog-section" data-padding="large">
82
- <h2>Performance Optimization</h2>
83
- <p>QwickApps includes several built-in optimizations to ensure your applications run smoothly.</p>
84
- <pre><code class="language-typescript">// Lazy loading components
73
+ <header class="blog-header">
74
+ <h1>This Header Will Be Removed</h1>
75
+ <p>When skipHeader is true</p>
76
+ </header>
77
+
78
+ <h1>Advanced QwickApps Techniques</h1>
79
+ <p>Learn advanced patterns and best practices for building scalable applications.</p>
80
+
81
+ <section class="blog-section" data-padding="large">
82
+ <h2>Performance Optimization</h2>
83
+ <p>QwickApps includes several built-in optimizations to ensure your applications run smoothly.</p>
84
+ <pre><code class="language-typescript">// Lazy loading components
85
85
  const LazyComponent = lazy(() => import('./MyComponent'));
86
86
 
87
87
  function App() {
88
- return (
89
- &lt;Suspense fallback={&lt;div&gt;Loading...&lt;/div&gt;}&gt;
90
- &lt;LazyComponent /&gt;
91
- &lt;/Suspense&gt;
92
- );
88
+ return (
89
+ &lt;Suspense fallback={&lt;div&gt;Loading...&lt;/div&gt;}&gt;
90
+ &lt;LazyComponent /&gt;
91
+ &lt;/Suspense&gt;
92
+ );
93
93
  }</code></pre>
94
- </section>
95
-
96
- <section class="blog-section" data-padding="medium">
97
- <h2>State Management</h2>
98
- <p>Effective state management strategies for complex applications.</p>
99
- <ul>
100
- <li>Use Context for shared state</li>
101
- <li>Implement custom hooks for business logic</li>
102
- <li>Consider external state libraries for complex needs</li>
103
- </ul>
104
- </section>
105
-
106
- <p>These sections demonstrate the blog-section transformation feature.</p>
94
+ </section>
95
+
96
+ <section class="blog-section" data-padding="medium">
97
+ <h2>State Management</h2>
98
+ <p>Effective state management strategies for complex applications.</p>
99
+ <ul>
100
+ <li>Use Context for shared state</li>
101
+ <li>Implement custom hooks for business logic</li>
102
+ <li>Consider external state libraries for complex needs</li>
103
+ </ul>
104
+ </section>
105
+
106
+ <p>These sections demonstrate the blog-section transformation feature.</p>
107
107
  `;
108
108
 
109
109
  const tutorialHtml = `
110
- <h1>Complete Tutorial: Building a Dashboard</h1>
111
-
112
- <div class="tutorial-intro">
113
- <p><strong>What you'll learn:</strong> In this comprehensive tutorial, you'll build a complete dashboard application using QwickApps React Framework.</p>
114
- <p><strong>Prerequisites:</strong> Basic knowledge of React and TypeScript</p>
115
- <p><strong>Time required:</strong> Approximately 2 hours</p>
116
- </div>
117
-
118
- <h2>Step 1: Project Setup</h2>
119
- <p>First, create a new QwickApps project:</p>
120
- <pre><code class="language-bash">npx create-qwickapp my-dashboard
110
+ <h1>Complete Tutorial: Building a Dashboard</h1>
111
+
112
+ <div class="tutorial-intro">
113
+ <p><strong>What you'll learn:</strong> In this comprehensive tutorial, you'll build a complete dashboard application using QwickApps React Framework.</p>
114
+ <p><strong>Prerequisites:</strong> Basic knowledge of React and TypeScript</p>
115
+ <p><strong>Time required:</strong> Approximately 2 hours</p>
116
+ </div>
117
+
118
+ <h2>Step 1: Project Setup</h2>
119
+ <p>First, create a new QwickApps project:</p>
120
+ <pre><code class="language-bash">npx create-qwickapp my-dashboard
121
121
  cd my-dashboard
122
122
  npm start</code></pre>
123
123
 
124
- <h2>Step 2: Create the Layout</h2>
125
- <p>Set up the main dashboard layout with navigation:</p>
126
- <pre><code class="language-tsx">import { GridLayout, Navigation } from '@qwickapps/react-framework';
124
+ <h2>Step 2: Create the Layout</h2>
125
+ <p>Set up the main dashboard layout with navigation:</p>
126
+ <pre><code class="language-tsx">import { GridLayout, Navigation } from '@qwickapps/react-framework';
127
127
 
128
128
  export function DashboardLayout({ children }: { children: React.ReactNode }) {
129
- return (
130
- &lt;div className="dashboard"&gt;
131
- &lt;Navigation items={navItems} /&gt;
132
- &lt;main className="dashboard-content"&gt;
133
- &lt;GridLayout columns={2} spacing="large"&gt;
134
- {children}
135
- &lt;/GridLayout&gt;
136
- &lt;/main&gt;
137
- &lt;/div&gt;
138
- );
129
+ return (
130
+ &lt;div className="dashboard"&gt;
131
+ &lt;Navigation items={navItems} /&gt;
132
+ &lt;main className="dashboard-content"&gt;
133
+ &lt;GridLayout columns={2} spacing="large"&gt;
134
+ {children}
135
+ &lt;/GridLayout&gt;
136
+ &lt;/main&gt;
137
+ &lt;/div&gt;
138
+ );
139
139
  }</code></pre>
140
140
 
141
- <div class="tip-box">
142
- <h3>💡 Pro Tip</h3>
143
- <p>Use the <code>GridLayout</code> component for responsive layouts that automatically adapt to different screen sizes.</p>
144
- </div>
145
-
146
- <h2>Step 3: Add Data Visualization</h2>
147
- <p>Integrate charts and data visualization components.</p>
148
-
149
- <section class="blog-section">
150
- <h2>Final Result</h2>
151
- <p>Your completed dashboard will include:</p>
152
- <ul>
153
- <li>Responsive navigation</li>
154
- <li>Interactive charts</li>
155
- <li>Real-time data updates</li>
156
- <li>Mobile-friendly design</li>
157
- </ul>
158
- </section>
141
+ <div class="tip-box">
142
+ <h3>💡 Pro Tip</h3>
143
+ <p>Use the <code>GridLayout</code> component for responsive layouts that automatically adapt to different screen sizes.</p>
144
+ </div>
145
+
146
+ <h2>Step 3: Add Data Visualization</h2>
147
+ <p>Integrate charts and data visualization components.</p>
148
+
149
+ <section class="blog-section">
150
+ <h2>Final Result</h2>
151
+ <p>Your completed dashboard will include:</p>
152
+ <ul>
153
+ <li>Responsive navigation</li>
154
+ <li>Interactive charts</li>
155
+ <li>Real-time data updates</li>
156
+ <li>Mobile-friendly design</li>
157
+ </ul>
158
+ </section>
159
159
  `;
160
160
 
161
161
  // Sample CMS data for data binding stories
162
162
  const sampleCmsData = {
163
- 'articles': {
164
- 'simple': { title: 'Simple Article', html: simpleArticleHtml, skipHeader: false },
165
- 'code-examples': { title: 'Code Examples', html: codeExamplesHtml, skipHeader: false },
166
- 'blog-sections': { title: 'Blog Sections', html: blogSectionHtml, skipHeader: true },
167
- 'complete-tutorial': { title: 'Complete Tutorial', html: tutorialHtml, skipHeader: false },
168
- 'tutorial': { title: 'Tutorial Content', html: tutorialHtml, skipHeader: false },
169
- 'blog-post': { title: 'Blog Post', html: blogSectionHtml, skipHeader: true }
170
- }
163
+ 'articles': {
164
+ 'simple': { title: 'Simple Article', html: simpleArticleHtml, skipHeader: false },
165
+ 'code-examples': { title: 'Code Examples', html: codeExamplesHtml, skipHeader: false },
166
+ 'blog-sections': { title: 'Blog Sections', html: blogSectionHtml, skipHeader: true },
167
+ 'complete-tutorial': { title: 'Complete Tutorial', html: tutorialHtml, skipHeader: false },
168
+ 'tutorial': { title: 'Tutorial Content', html: tutorialHtml, skipHeader: false },
169
+ 'blog-post': { title: 'Blog Post', html: blogSectionHtml, skipHeader: true }
170
+ }
171
171
  };
172
172
 
173
173
  const dataProvider = new JsonDataProvider({ data: sampleCmsData });
174
174
 
175
175
  const meta = {
176
- title: 'Blocks/Article',
177
- component: Article,
178
- parameters: {
179
- layout: 'padded',
180
- docs: {
181
- description: {
182
- component: `Article is an intelligent HTML content transformer that automatically converts raw HTML into QwickApps React Framework components while preserving structure and styling.
176
+ title: 'Blocks/Article',
177
+ component: Article,
178
+ parameters: {
179
+ layout: 'padded',
180
+ docs: {
181
+ description: {
182
+ component: `Article is an intelligent HTML content transformer that automatically converts raw HTML into QwickApps React Framework components while preserving structure and styling.
183
183
 
184
184
  **Key Features:**
185
185
  - **Smart Code Block Detection**: Automatically transforms \`<pre><code>\` blocks into syntax-highlighted Code components
@@ -196,10 +196,10 @@ const meta = {
196
196
  - Tutorial and guide content
197
197
  - Legacy HTML content integration
198
198
  - Markdown-to-HTML transformed content`,
199
- },
200
- },
201
- },
202
- tags: ['autodocs'],
199
+ },
200
+ },
201
+ },
202
+ tags: ['autodocs'],
203
203
  } satisfies Meta<typeof Article>;
204
204
 
205
205
  export default meta;
@@ -207,343 +207,343 @@ type Story = StoryObj<typeof Article>;
207
207
 
208
208
  // Traditional Usage Examples
209
209
  export const SimpleArticle: Story = {
210
- render: () => (
211
- <QwickApp appId="article-simple" appName='Simple Article'>
212
- <Article html={simpleArticleHtml} />
213
- </QwickApp>
214
- ),
215
- parameters: {
216
- docs: {
217
- description: {
218
- story: 'Basic article with headings, paragraphs, lists, and code blocks that get transformed into proper components.',
219
- },
220
- },
221
- },
210
+ render: () => (
211
+ <QwickApp appId="article-simple" appName='Simple Article'>
212
+ <Article html={simpleArticleHtml} />
213
+ </QwickApp>
214
+ ),
215
+ parameters: {
216
+ docs: {
217
+ description: {
218
+ story: 'Basic article with headings, paragraphs, lists, and code blocks that get transformed into proper components.',
219
+ },
220
+ },
221
+ },
222
222
  };
223
223
 
224
224
  export const CodeExamples: Story = {
225
- render: () => (
226
- <QwickApp appId="article-code" appName='Article with Code Examples'>
227
- <Article html={codeExamplesHtml} />
228
- </QwickApp>
229
- ),
230
- parameters: {
231
- docs: {
232
- description: {
233
- story: 'Article featuring various code examples including syntax-highlighted blocks and inline code snippets.',
234
- },
235
- },
236
- },
225
+ render: () => (
226
+ <QwickApp appId="article-code" appName='Article with Code Examples'>
227
+ <Article html={codeExamplesHtml} />
228
+ </QwickApp>
229
+ ),
230
+ parameters: {
231
+ docs: {
232
+ description: {
233
+ story: 'Article featuring various code examples including syntax-highlighted blocks and inline code snippets.',
234
+ },
235
+ },
236
+ },
237
237
  };
238
238
 
239
239
  export const BlogSections: Story = {
240
- render: () => (
241
- <QwickApp appId="article-blog" appName='Article with Blog Sections'>
242
- <Article html={blogSectionHtml} skipHeader={false} />
243
- </QwickApp>
244
- ),
245
- parameters: {
246
- docs: {
247
- description: {
248
- story: 'Article with blog sections that get transformed into Section components with proper spacing and layout.',
249
- },
250
- },
251
- },
240
+ render: () => (
241
+ <QwickApp appId="article-blog" appName='Article with Blog Sections'>
242
+ <Article html={blogSectionHtml} skipHeader={false} />
243
+ </QwickApp>
244
+ ),
245
+ parameters: {
246
+ docs: {
247
+ description: {
248
+ story: 'Article with blog sections that get transformed into Section components with proper spacing and layout.',
249
+ },
250
+ },
251
+ },
252
252
  };
253
253
 
254
254
  export const HeaderSkipping: Story = {
255
- render: () => (
256
- <QwickApp appId="article-header-skip" appName='Article Header Skipping'>
257
- <Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
258
-
259
- <Box>
260
- <Typography variant="h6" gutterBottom>With Header (skipHeader: false)</Typography>
261
- <Article html={blogSectionHtml} skipHeader={false} />
262
- </Box>
263
-
264
- <Box>
265
- <Typography variant="h6" gutterBottom>Without Header (skipHeader: true)</Typography>
266
- <Article html={blogSectionHtml} skipHeader={true} />
267
- </Box>
268
-
269
- </Box>
270
- </QwickApp>
271
- ),
272
- parameters: {
273
- docs: {
274
- description: {
275
- story: 'Comparison showing how skipHeader removes header elements and the first h1 for seamless page integration.',
276
- },
277
- },
278
- },
255
+ render: () => (
256
+ <QwickApp appId="article-header-skip" appName='Article Header Skipping'>
257
+ <Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
258
+
259
+ <Box>
260
+ <Typography variant="h6" gutterBottom>With Header (skipHeader: false)</Typography>
261
+ <Article html={blogSectionHtml} skipHeader={false} />
262
+ </Box>
263
+
264
+ <Box>
265
+ <Typography variant="h6" gutterBottom>Without Header (skipHeader: true)</Typography>
266
+ <Article html={blogSectionHtml} skipHeader={true} />
267
+ </Box>
268
+
269
+ </Box>
270
+ </QwickApp>
271
+ ),
272
+ parameters: {
273
+ docs: {
274
+ description: {
275
+ story: 'Comparison showing how skipHeader removes header elements and the first h1 for seamless page integration.',
276
+ },
277
+ },
278
+ },
279
279
  };
280
280
 
281
281
  export const TutorialContent: Story = {
282
- render: () => (
283
- <QwickApp appId="article-tutorial" appName='Tutorial Article'>
284
- <Article html={tutorialHtml} />
285
- </QwickApp>
286
- ),
287
- parameters: {
288
- docs: {
289
- description: {
290
- story: 'Complex tutorial content with mixed HTML elements, code blocks, and structured sections.',
291
- },
292
- },
293
- },
282
+ render: () => (
283
+ <QwickApp appId="article-tutorial" appName='Tutorial Article'>
284
+ <Article html={tutorialHtml} />
285
+ </QwickApp>
286
+ ),
287
+ parameters: {
288
+ docs: {
289
+ description: {
290
+ story: 'Complex tutorial content with mixed HTML elements, code blocks, and structured sections.',
291
+ },
292
+ },
293
+ },
294
294
  };
295
295
 
296
296
  // Data Binding Examples
297
297
  export const DataBindingBasic: Story = {
298
- render: () => (
299
- <QwickApp appId="article-data-binding" appName='Article Data Binding' dataSource={{ dataProvider }}>
300
- <Box>
301
-
302
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
303
- <Typography variant="h5" gutterBottom>📊 Data-Driven Article</Typography>
304
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
305
- Article components can be completely driven by CMS data, loading HTML content and configuration from your data source.
306
- </Typography>
307
-
308
- <Code title="Usage" language="tsx">{`<Article dataSource="articles.simple" />`}</Code>
309
-
310
- <Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData.articles.simple, null, 2)}</Code>
311
- </Box>
312
-
313
- <Article dataSource="articles.simple"/>
314
-
315
- </Box>
316
- </QwickApp>
317
- ),
318
- parameters: {
319
- docs: {
320
- description: {
321
- story: 'Article with data binding - HTML content and configuration resolved from CMS data through dataSource.',
322
- },
323
- },
324
- },
298
+ render: () => (
299
+ <QwickApp appId="article-data-binding" appName='Article Data Binding' dataSource={{ dataProvider }}>
300
+ <Box>
301
+
302
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
303
+ <Typography variant="h5" gutterBottom> Data-Driven Article</Typography>
304
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
305
+ Article components can be completely driven by CMS data, loading HTML content and configuration from your data source.
306
+ </Typography>
307
+
308
+ <Code title="Usage" language="tsx">{`<Article dataSource="articles.simple" />`}</Code>
309
+
310
+ <Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData.articles.simple, null, 2)}</Code>
311
+ </Box>
312
+
313
+ <Article dataSource="articles.simple"/>
314
+
315
+ </Box>
316
+ </QwickApp>
317
+ ),
318
+ parameters: {
319
+ docs: {
320
+ description: {
321
+ story: 'Article with data binding - HTML content and configuration resolved from CMS data through dataSource.',
322
+ },
323
+ },
324
+ },
325
325
  };
326
326
 
327
327
  export const DataBindingAdvanced: Story = {
328
- render: () => (
329
- <QwickApp appId="article-data-advanced" appName='Advanced Article Data Binding' dataSource={{ dataProvider }}>
330
- <Box>
331
-
332
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
333
- <Typography variant="h5" gutterBottom>🎯 Multiple Article Types</Typography>
334
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
335
- Different Article instances can load different content types from separate data sources with varying configurations.
336
- </Typography>
337
- </Box>
338
-
339
- {/* Code Examples Article */}
340
- <Box sx={{ mb: 4 }}>
341
- <Typography variant="h4" gutterBottom>Code Examples</Typography>
342
- <Article dataSource="articles.code-examples" />
343
- </Box>
344
-
345
- {/* Tutorial Article */}
346
- <Box sx={{ mb: 4 }}>
347
- <Typography variant="h4" gutterBottom>Tutorial Content</Typography>
348
- <Article dataSource="articles.tutorial" />
349
- </Box>
350
-
351
- </Box>
352
- </QwickApp>
353
- ),
354
- parameters: {
355
- docs: {
356
- description: {
357
- story: 'Advanced data binding with multiple article types showcasing different content structures and transformations.',
358
- },
359
- },
360
- },
328
+ render: () => (
329
+ <QwickApp appId="article-data-advanced" appName='Advanced Article Data Binding' dataSource={{ dataProvider }}>
330
+ <Box>
331
+
332
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
333
+ <Typography variant="h5" gutterBottom> Multiple Article Types</Typography>
334
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
335
+ Different Article instances can load different content types from separate data sources with varying configurations.
336
+ </Typography>
337
+ </Box>
338
+
339
+ {/* Code Examples Article */}
340
+ <Box sx={{ mb: 4 }}>
341
+ <Typography variant="h4" gutterBottom>Code Examples</Typography>
342
+ <Article dataSource="articles.code-examples" />
343
+ </Box>
344
+
345
+ {/* Tutorial Article */}
346
+ <Box sx={{ mb: 4 }}>
347
+ <Typography variant="h4" gutterBottom>Tutorial Content</Typography>
348
+ <Article dataSource="articles.tutorial" />
349
+ </Box>
350
+
351
+ </Box>
352
+ </QwickApp>
353
+ ),
354
+ parameters: {
355
+ docs: {
356
+ description: {
357
+ story: 'Advanced data binding with multiple article types showcasing different content structures and transformations.',
358
+ },
359
+ },
360
+ },
361
361
  };
362
362
 
363
363
  export const DataBindingWithFallback: Story = {
364
- render: () => (
365
- <QwickApp appId="article-fallback" appName='Article Data Binding with Fallback' dataSource={{ dataProvider }}>
366
- <Box>
367
-
368
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
369
- <Typography variant="h5" gutterBottom>🛡️ Fallback Support</Typography>
370
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
371
- Article components gracefully handle missing data sources with fallback HTML content.
372
- </Typography>
373
-
374
- <Code title="Fallback Usage" language="tsx">{`<Article
375
- dataSource="nonexistent.article"
376
- html={fallbackHtml}
377
- skipHeader={true}
364
+ render: () => (
365
+ <QwickApp appId="article-fallback" appName='Article Data Binding with Fallback' dataSource={{ dataProvider }}>
366
+ <Box>
367
+
368
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
369
+ <Typography variant="h5" gutterBottom> Fallback Support</Typography>
370
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
371
+ Article components gracefully handle missing data sources with fallback HTML content.
372
+ </Typography>
373
+
374
+ <Code title="Fallback Usage" language="tsx">{`<Article
375
+ dataSource="nonexistent.article"
376
+ html={fallbackHtml}
377
+ skipHeader={true}
378
378
  />`}</Code>
379
- </Box>
380
-
381
- <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
382
- <Box>
383
- <Typography variant="h6" gutterBottom>Missing Data Source (Fallback)</Typography>
384
- <Article
385
- dataSource="nonexistent.article"
386
- html={simpleArticleHtml}
387
- skipHeader={true}
388
- />
389
- </Box>
390
- <Box>
391
- <Typography variant="h6" gutterBottom>Valid Data Source</Typography>
392
- <Article dataSource="articles.simple" />
393
- </Box>
394
- </Box>
395
-
396
- </Box>
397
- </QwickApp>
398
- ),
399
- parameters: {
400
- docs: {
401
- description: {
402
- story: 'Article with fallback HTML when dataSource is missing or unavailable.',
403
- },
404
- },
405
- },
379
+ </Box>
380
+
381
+ <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
382
+ <Box>
383
+ <Typography variant="h6" gutterBottom>Missing Data Source (Fallback)</Typography>
384
+ <Article
385
+ dataSource="nonexistent.article"
386
+ html={simpleArticleHtml}
387
+ skipHeader={true}
388
+ />
389
+ </Box>
390
+ <Box>
391
+ <Typography variant="h6" gutterBottom>Valid Data Source</Typography>
392
+ <Article dataSource="articles.simple" />
393
+ </Box>
394
+ </Box>
395
+
396
+ </Box>
397
+ </QwickApp>
398
+ ),
399
+ parameters: {
400
+ docs: {
401
+ description: {
402
+ story: 'Article with fallback HTML when dataSource is missing or unavailable.',
403
+ },
404
+ },
405
+ },
406
406
  };
407
407
 
408
408
  export const ContentTransformations: Story = {
409
- render: () => (
410
- <QwickApp appId="article-transformations" appName='Article Content Transformations'>
411
- <Box>
412
-
413
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
414
- <Typography variant="h5" gutterBottom>🔄 Transformation Showcase</Typography>
415
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
416
- Demonstrates how Article intelligently transforms different HTML elements into QwickApps components.
417
- </Typography>
418
- </Box>
419
-
420
- {/* Before/After Comparison */}
421
- <Box sx={{ mb: 4 }}>
422
- <Typography variant="h4" gutterBottom>Code Block Transformation</Typography>
423
- <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
424
- <Box>
425
- <Typography variant="h6" gutterBottom>Raw HTML Input</Typography>
426
- <Code title="HTML" language="html">{`<pre><code class="language-javascript">
409
+ render: () => (
410
+ <QwickApp appId="article-transformations" appName='Article Content Transformations'>
411
+ <Box>
412
+
413
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
414
+ <Typography variant="h5" gutterBottom> Transformation Showcase</Typography>
415
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
416
+ Demonstrates how Article intelligently transforms different HTML elements into QwickApps components.
417
+ </Typography>
418
+ </Box>
419
+
420
+ {/* Before/After Comparison */}
421
+ <Box sx={{ mb: 4 }}>
422
+ <Typography variant="h4" gutterBottom>Code Block Transformation</Typography>
423
+ <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
424
+ <Box>
425
+ <Typography variant="h6" gutterBottom>Raw HTML Input</Typography>
426
+ <Code title="HTML" language="html">{`<pre><code class="language-javascript">
427
427
  function greet(name) {
428
- return \`Hello, \${name}!\`;
428
+ return \`Hello, \${name}!\`;
429
429
  }
430
430
  </code></pre>`}</Code>
431
- </Box>
432
- <Box>
433
- <Typography variant="h6" gutterBottom>Transformed Output</Typography>
434
- <pre><code className="language-javascript">{`function greet(name) {
435
- return \`Hello, \${name}!\`;
431
+ </Box>
432
+ <Box>
433
+ <Typography variant="h6" gutterBottom>Transformed Output</Typography>
434
+ <pre><code className="language-javascript">{`function greet(name) {
435
+ return \`Hello, \${name}!\`;
436
436
  }`}</code></pre>
437
- </Box>
438
- </Box>
439
- </Box>
440
-
441
- <Box sx={{ mb: 4 }}>
442
- <Typography variant="h4" gutterBottom>Blog Section Transformation</Typography>
443
- <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
444
- <Box>
445
- <Typography variant="h6" gutterBottom>Raw HTML Input</Typography>
446
- <Code title="HTML" language="html">{`<section class="blog-section">
447
- <h2>Section Title</h2>
448
- <p>Section content...</p>
437
+ </Box>
438
+ </Box>
439
+ </Box>
440
+
441
+ <Box sx={{ mb: 4 }}>
442
+ <Typography variant="h4" gutterBottom>Blog Section Transformation</Typography>
443
+ <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
444
+ <Box>
445
+ <Typography variant="h6" gutterBottom>Raw HTML Input</Typography>
446
+ <Code title="HTML" language="html">{`<section class="blog-section">
447
+ <h2>Section Title</h2>
448
+ <p>Section content...</p>
449
449
  </section>`}</Code>
450
- </Box>
451
- <Box>
452
- <Typography variant="h6" gutterBottom>Transformed Output</Typography>
453
- <Typography variant="body2" color="text.secondary">
454
- → Becomes Section component with proper spacing and Content wrapper
455
- </Typography>
456
- </Box>
457
- </Box>
458
- </Box>
459
-
460
- </Box>
461
- </QwickApp>
462
- ),
463
- parameters: {
464
- docs: {
465
- description: {
466
- story: 'Educational showcase of how Article transforms various HTML elements into QwickApps components.',
467
- },
468
- },
469
- },
450
+ </Box>
451
+ <Box>
452
+ <Typography variant="h6" gutterBottom>Transformed Output</Typography>
453
+ <Typography variant="body2" color="text.secondary">
454
+ → Becomes Section component with proper spacing and Content wrapper
455
+ </Typography>
456
+ </Box>
457
+ </Box>
458
+ </Box>
459
+
460
+ </Box>
461
+ </QwickApp>
462
+ ),
463
+ parameters: {
464
+ docs: {
465
+ description: {
466
+ story: 'Educational showcase of how Article transforms various HTML elements into QwickApps components.',
467
+ },
468
+ },
469
+ },
470
470
  };
471
471
 
472
472
  export const RealWorldExample: Story = {
473
- render: () => (
474
- <QwickApp appId="article-real-world" appName='Real World Article Example' dataSource={{ dataProvider }}>
475
- <Box>
476
-
477
- {/* Blog Post */}
478
- <Box sx={{ mb: 6 }}>
479
- <Typography variant="h3" gutterBottom>Latest Blog Post</Typography>
480
- <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
481
- Direct from our CMS with header removal enabled
482
- </Typography>
483
- <Article dataSource="articles.blog-post" />
484
- </Box>
485
-
486
- {/* Documentation */}
487
- <Box sx={{ mb: 6 }}>
488
- <Typography variant="h3" gutterBottom>Documentation</Typography>
489
- <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
490
- Technical content with code examples and proper syntax highlighting
491
- </Typography>
492
- <Article dataSource="articles.code-examples" />
493
- </Box>
494
-
495
- {/* Tutorial Content */}
496
- <Box>
497
- <Typography variant="h3" gutterBottom>Learning Resources</Typography>
498
- <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
499
- Step-by-step tutorials with mixed content types
500
- </Typography>
501
- <Article dataSource="articles.tutorial" />
502
- </Box>
503
-
504
- </Box>
505
- </QwickApp>
506
- ),
507
- parameters: {
508
- docs: {
509
- description: {
510
- story: 'Real-world example showing Article in various contexts: blog posts, documentation, and tutorials.',
511
- },
512
- },
513
- },
473
+ render: () => (
474
+ <QwickApp appId="article-real-world" appName='Real World Article Example' dataSource={{ dataProvider }}>
475
+ <Box>
476
+
477
+ {/* Blog Post */}
478
+ <Box sx={{ mb: 6 }}>
479
+ <Typography variant="h3" gutterBottom>Latest Blog Post</Typography>
480
+ <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
481
+ Direct from our CMS with header removal enabled
482
+ </Typography>
483
+ <Article dataSource="articles.blog-post" />
484
+ </Box>
485
+
486
+ {/* Documentation */}
487
+ <Box sx={{ mb: 6 }}>
488
+ <Typography variant="h3" gutterBottom>Documentation</Typography>
489
+ <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
490
+ Technical content with code examples and proper syntax highlighting
491
+ </Typography>
492
+ <Article dataSource="articles.code-examples" />
493
+ </Box>
494
+
495
+ {/* Tutorial Content */}
496
+ <Box>
497
+ <Typography variant="h3" gutterBottom>Learning Resources</Typography>
498
+ <Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
499
+ Step-by-step tutorials with mixed content types
500
+ </Typography>
501
+ <Article dataSource="articles.tutorial" />
502
+ </Box>
503
+
504
+ </Box>
505
+ </QwickApp>
506
+ ),
507
+ parameters: {
508
+ docs: {
509
+ description: {
510
+ story: 'Real-world example showing Article in various contexts: blog posts, documentation, and tutorials.',
511
+ },
512
+ },
513
+ },
514
514
  };
515
515
 
516
516
  export const EmptyAndLoadingStates: Story = {
517
- render: () => (
518
- <QwickApp appId="article-states" appName='Article States' dataSource={{ dataProvider }}>
519
- <Box>
520
-
521
- <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
522
- <Typography variant="h5" gutterBottom>🔄 State Management</Typography>
523
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
524
- Article handles various states including empty content and loading scenarios gracefully.
525
- </Typography>
526
- </Box>
527
-
528
- <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
529
- <Box>
530
- <Typography variant="h6" gutterBottom>Empty Content</Typography>
531
- <Article html="" />
532
- </Box>
533
- <Box>
534
- <Typography variant="h6" gutterBottom>Valid Content</Typography>
535
- <Article dataSource="articles.simple" />
536
- </Box>
537
- </Box>
538
-
539
- </Box>
540
- </QwickApp>
541
- ),
542
- parameters: {
543
- docs: {
544
- description: {
545
- story: 'Demonstrates empty state handling and normal article display states.',
546
- },
547
- },
548
- },
517
+ render: () => (
518
+ <QwickApp appId="article-states" appName='Article States' dataSource={{ dataProvider }}>
519
+ <Box>
520
+
521
+ <Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
522
+ <Typography variant="h5" gutterBottom> State Management</Typography>
523
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
524
+ Article handles various states including empty content and loading scenarios gracefully.
525
+ </Typography>
526
+ </Box>
527
+
528
+ <Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
529
+ <Box>
530
+ <Typography variant="h6" gutterBottom>Empty Content</Typography>
531
+ <Article html="" />
532
+ </Box>
533
+ <Box>
534
+ <Typography variant="h6" gutterBottom>Valid Content</Typography>
535
+ <Article dataSource="articles.simple" />
536
+ </Box>
537
+ </Box>
538
+
539
+ </Box>
540
+ </QwickApp>
541
+ ),
542
+ parameters: {
543
+ docs: {
544
+ description: {
545
+ story: 'Demonstrates empty state handling and normal article display states.',
546
+ },
547
+ },
548
+ },
549
549
  };