@qwickapps/react-framework 1.3.5 → 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 (320) hide show
  1. package/README.md +1681 -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
@@ -5,13 +5,13 @@
5
5
  */
6
6
 
7
7
  import {
8
- Archive as ArchiveIcon,
9
- Delete as DeleteIcon,
10
- Download as DownloadIcon,
11
- Edit as EditIcon,
12
- Favorite as FavoriteIcon,
13
- Settings as SettingsIcon,
14
- Share as ShareIcon
8
+ Archive as ArchiveIcon,
9
+ Delete as DeleteIcon,
10
+ Download as DownloadIcon,
11
+ Edit as EditIcon,
12
+ Favorite as FavoriteIcon,
13
+ Settings as SettingsIcon,
14
+ Share as ShareIcon
15
15
  } from '@mui/icons-material';
16
16
  import { Box, Typography } from '@mui/material';
17
17
  import { JsonDataProvider } from '@qwickapps/schema';
@@ -21,13 +21,13 @@ import CoverImageHeader from '../components/blocks/CoverImageHeader';
21
21
  import QwickApp from '../components/QwickApp';
22
22
 
23
23
  const meta: Meta<typeof CoverImageHeader> = {
24
- title: 'Blocks/CoverImageHeader',
25
- component: CoverImageHeader,
26
- parameters: {
27
- layout: 'padded',
28
- docs: {
29
- description: {
30
- component: `The CoverImageHeader component provides a flexible header layout with optional image, information section, and contextual actions.
24
+ title: 'Blocks/CoverImageHeader',
25
+ component: CoverImageHeader,
26
+ parameters: {
27
+ layout: 'padded',
28
+ docs: {
29
+ description: {
30
+ component: `The CoverImageHeader component provides a flexible header layout with optional image, information section, and contextual actions.
31
31
 
32
32
  **Key Features:**
33
33
  - **Optional Image**: Supports URL string or custom React component with configurable size and shape
@@ -42,63 +42,63 @@ const meta: Meta<typeof CoverImageHeader> = {
42
42
  - Product listings with actions
43
43
  - Profile sections and team cards
44
44
  - Dashboard headers with quick actions`,
45
- },
46
- },
47
- },
48
- tags: ['autodocs'],
49
- argTypes: {
50
- image: {
51
- description: 'Optional image URL or React component',
52
- control: { type: 'text' },
53
- },
54
- imageAlt: {
55
- description: 'Image alt text (when using URL)',
56
- control: { type: 'text' },
57
- },
58
- imageSize: {
59
- description: 'Image size variant',
60
- control: { type: 'select' },
61
- options: ['small', 'medium', 'large'],
62
- },
63
- imageShape: {
64
- description: 'Image shape',
65
- control: { type: 'select' },
66
- options: ['square', 'circle', 'rounded'],
67
- },
68
- overline: {
69
- description: 'Optional overline text (appears above title)',
70
- control: { type: 'text' },
71
- },
72
- title: {
73
- description: 'Main title text',
74
- control: { type: 'text' },
75
- },
76
- subtitle: {
77
- description: 'Optional subtitle text',
78
- control: { type: 'text' },
79
- },
80
- tags: {
81
- description: 'Array of tag strings',
82
- control: { type: 'object' },
83
- },
84
- actions: {
85
- description: 'Context menu actions',
86
- control: false,
87
- },
88
- maxVisibleActions: {
89
- description: 'Maximum number of actions to show as buttons',
90
- control: { type: 'number', min: 1, max: 5 },
91
- },
92
- variant: {
93
- description: 'Header variant',
94
- control: { type: 'select' },
95
- options: ['default', 'compact', 'prominent'],
96
- },
97
- background: {
98
- description: 'Background color or image URL',
99
- control: { type: 'text' },
100
- },
101
- },
45
+ },
46
+ },
47
+ },
48
+ tags: ['autodocs'],
49
+ argTypes: {
50
+ image: {
51
+ description: 'Optional image URL or React component',
52
+ control: { type: 'text' },
53
+ },
54
+ imageAlt: {
55
+ description: 'Image alt text (when using URL)',
56
+ control: { type: 'text' },
57
+ },
58
+ imageSize: {
59
+ description: 'Image size variant',
60
+ control: { type: 'select' },
61
+ options: ['small', 'medium', 'large'],
62
+ },
63
+ imageShape: {
64
+ description: 'Image shape',
65
+ control: { type: 'select' },
66
+ options: ['square', 'circle', 'rounded'],
67
+ },
68
+ overline: {
69
+ description: 'Optional overline text (appears above title)',
70
+ control: { type: 'text' },
71
+ },
72
+ title: {
73
+ description: 'Main title text',
74
+ control: { type: 'text' },
75
+ },
76
+ subtitle: {
77
+ description: 'Optional subtitle text',
78
+ control: { type: 'text' },
79
+ },
80
+ tags: {
81
+ description: 'Array of tag strings',
82
+ control: { type: 'object' },
83
+ },
84
+ actions: {
85
+ description: 'Context menu actions',
86
+ control: false,
87
+ },
88
+ maxVisibleActions: {
89
+ description: 'Maximum number of actions to show as buttons',
90
+ control: { type: 'number', min: 1, max: 5 },
91
+ },
92
+ variant: {
93
+ description: 'Header variant',
94
+ control: { type: 'select' },
95
+ options: ['default', 'compact', 'prominent'],
96
+ },
97
+ background: {
98
+ description: 'Background color or image URL',
99
+ control: { type: 'text' },
100
+ },
101
+ },
102
102
  } satisfies Meta<typeof CoverImageHeader>;
103
103
 
104
104
  export default meta;
@@ -106,689 +106,689 @@ type Story = StoryObj<typeof meta>;
106
106
 
107
107
  // Sample CMS data for data binding stories (following nested structure pattern)
108
108
  const sampleCmsData = {
109
- 'coverImageHeaders': {
110
- 'teamLead': {
111
- image: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
112
- imageAlt: 'John Doe profile photo',
113
- imageSize: 'large',
114
- imageShape: 'circle',
115
- overline: 'TEAM LEAD',
116
- title: 'John Doe',
117
- subtitle: 'Senior Product Manager & Team Leader',
118
- tags: ['Product Strategy', 'Team Leadership', 'Agile', 'Remote Work'],
119
- maxVisibleActions: 2,
120
- variant: 'default'
121
- },
122
- 'projectShowcase': {
123
- image: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
124
- imageAlt: 'Dashboard project icon',
125
- imageSize: 'medium',
126
- imageShape: 'rounded',
127
- overline: 'FEATURED PROJECT',
128
- title: 'Analytics Dashboard 2.0',
129
- subtitle: 'Real-time business intelligence platform with advanced data visualization',
130
- tags: ['React', 'TypeScript', 'D3.js', 'Real-time', 'Analytics'],
131
- variant: 'compact'
132
- },
133
- 'companyProfile': {
134
- overline: 'TECHNOLOGY COMPANY',
135
- title: 'QwickApps Solutions',
136
- subtitle: 'Building the future of web development with intelligent component systems',
137
- tags: ['React', 'TypeScript', 'Enterprise', 'Open Source'],
138
- variant: 'prominent',
139
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'
140
- },
141
- 'productShowcase': {
142
- image: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
143
- imageAlt: 'Product showcase',
144
- imageSize: 'large',
145
- imageShape: 'square',
146
- overline: 'PRODUCT SHOWCASE',
147
- title: 'Smart Task Manager',
148
- subtitle: 'AI-powered productivity suite with intelligent task prioritization',
149
- tags: ['Productivity', 'AI', 'Task Management', 'Team Collaboration'],
150
- variant: 'default'
151
- },
152
- 'imageLoadingDemo': {
153
- image: 'https://httpstat.us/200?sleep=3000', // Simulates slow loading image
154
- imageAlt: 'Slow loading image demo',
155
- imageSize: 'medium',
156
- imageShape: 'rounded',
157
- overline: 'LOADING DEMO',
158
- title: 'Slow Loading Image Test',
159
- subtitle: 'Tests image loading states and fallback handling',
160
- tags: ['Performance', 'Loading', 'Fallback'],
161
- variant: 'default'
162
- },
163
- 'imageFallbackDemo': {
164
- image: 'https://invalid-url-that-will-fail.com/image.jpg',
165
- imageAlt: 'Image that will fail to load',
166
- imageSize: 'large',
167
- imageShape: 'circle',
168
- overline: 'ERROR DEMO',
169
- title: 'Image Fallback Test',
170
- subtitle: 'Tests image error handling and accessibility',
171
- tags: ['Error Handling', 'Accessibility', 'Fallback'],
172
- variant: 'default'
173
- }
174
- }
109
+ 'coverImageHeaders': {
110
+ 'teamLead': {
111
+ image: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
112
+ imageAlt: 'John Doe profile photo',
113
+ imageSize: 'large',
114
+ imageShape: 'circle',
115
+ overline: 'TEAM LEAD',
116
+ title: 'John Doe',
117
+ subtitle: 'Senior Product Manager & Team Leader',
118
+ tags: ['Product Strategy', 'Team Leadership', 'Agile', 'Remote Work'],
119
+ maxVisibleActions: 2,
120
+ variant: 'default'
121
+ },
122
+ 'projectShowcase': {
123
+ image: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
124
+ imageAlt: 'Dashboard project icon',
125
+ imageSize: 'medium',
126
+ imageShape: 'rounded',
127
+ overline: 'FEATURED PROJECT',
128
+ title: 'Analytics Dashboard 2.0',
129
+ subtitle: 'Real-time business intelligence platform with advanced data visualization',
130
+ tags: ['React', 'TypeScript', 'D3.js', 'Real-time', 'Analytics'],
131
+ variant: 'compact'
132
+ },
133
+ 'companyProfile': {
134
+ overline: 'TECHNOLOGY COMPANY',
135
+ title: 'QwickApps Solutions',
136
+ subtitle: 'Building the future of web development with intelligent component systems',
137
+ tags: ['React', 'TypeScript', 'Enterprise', 'Open Source'],
138
+ variant: 'prominent',
139
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'
140
+ },
141
+ 'productShowcase': {
142
+ image: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
143
+ imageAlt: 'Product showcase',
144
+ imageSize: 'large',
145
+ imageShape: 'square',
146
+ overline: 'PRODUCT SHOWCASE',
147
+ title: 'Smart Task Manager',
148
+ subtitle: 'AI-powered productivity suite with intelligent task prioritization',
149
+ tags: ['Productivity', 'AI', 'Task Management', 'Team Collaboration'],
150
+ variant: 'default'
151
+ },
152
+ 'imageLoadingDemo': {
153
+ image: 'https://httpstat.us/200?sleep=3000', // Simulates slow loading image
154
+ imageAlt: 'Slow loading image demo',
155
+ imageSize: 'medium',
156
+ imageShape: 'rounded',
157
+ overline: 'LOADING DEMO',
158
+ title: 'Slow Loading Image Test',
159
+ subtitle: 'Tests image loading states and fallback handling',
160
+ tags: ['Performance', 'Loading', 'Fallback'],
161
+ variant: 'default'
162
+ },
163
+ 'imageFallbackDemo': {
164
+ image: 'https://invalid-url-that-will-fail.com/image.jpg',
165
+ imageAlt: 'Image that will fail to load',
166
+ imageSize: 'large',
167
+ imageShape: 'circle',
168
+ overline: 'ERROR DEMO',
169
+ title: 'Image Fallback Test',
170
+ subtitle: 'Tests image error handling and accessibility',
171
+ tags: ['Error Handling', 'Accessibility', 'Fallback'],
172
+ variant: 'default'
173
+ }
174
+ }
175
175
  };
176
176
 
177
177
  const dataProvider = new JsonDataProvider({ data: sampleCmsData });
178
178
 
179
179
  // Sample actions for demos
180
180
  const sampleActions = [
181
- {
182
- id: 'edit',
183
- label: 'Edit',
184
- icon: <EditIcon />,
185
- onClick: () => alert('Edit clicked'),
186
- priority: 1,
187
- },
188
- {
189
- id: 'share',
190
- label: 'Share',
191
- icon: <ShareIcon />,
192
- onClick: () => alert('Share clicked'),
193
- priority: 2,
194
- },
195
- {
196
- id: 'favorite',
197
- label: 'Favorite',
198
- icon: <FavoriteIcon />,
199
- onClick: () => alert('Added to favorites'),
200
- priority: 3,
201
- },
202
- {
203
- id: 'download',
204
- label: 'Download',
205
- icon: <DownloadIcon />,
206
- onClick: () => alert('Downloading...'),
207
- priority: 4,
208
- },
209
- {
210
- id: 'settings',
211
- label: 'Settings',
212
- icon: <SettingsIcon />,
213
- onClick: () => alert('Settings opened'),
214
- priority: 5,
215
- },
216
- {
217
- id: 'archive',
218
- label: 'Archive',
219
- icon: <ArchiveIcon />,
220
- onClick: () => alert('Archived'),
221
- destructive: true,
222
- priority: 6,
223
- },
224
- {
225
- id: 'delete',
226
- label: 'Delete',
227
- icon: <DeleteIcon />,
228
- onClick: () => alert('Deleted'),
229
- destructive: true,
230
- priority: 7,
231
- },
181
+ {
182
+ id: 'edit',
183
+ label: 'Edit',
184
+ icon: <EditIcon />,
185
+ onClick: () => alert('Edit clicked'),
186
+ priority: 1,
187
+ },
188
+ {
189
+ id: 'share',
190
+ label: 'Share',
191
+ icon: <ShareIcon />,
192
+ onClick: () => alert('Share clicked'),
193
+ priority: 2,
194
+ },
195
+ {
196
+ id: 'favorite',
197
+ label: 'Favorite',
198
+ icon: <FavoriteIcon />,
199
+ onClick: () => alert('Added to favorites'),
200
+ priority: 3,
201
+ },
202
+ {
203
+ id: 'download',
204
+ label: 'Download',
205
+ icon: <DownloadIcon />,
206
+ onClick: () => alert('Downloading...'),
207
+ priority: 4,
208
+ },
209
+ {
210
+ id: 'settings',
211
+ label: 'Settings',
212
+ icon: <SettingsIcon />,
213
+ onClick: () => alert('Settings opened'),
214
+ priority: 5,
215
+ },
216
+ {
217
+ id: 'archive',
218
+ label: 'Archive',
219
+ icon: <ArchiveIcon />,
220
+ onClick: () => alert('Archived'),
221
+ destructive: true,
222
+ priority: 6,
223
+ },
224
+ {
225
+ id: 'delete',
226
+ label: 'Delete',
227
+ icon: <DeleteIcon />,
228
+ onClick: () => alert('Deleted'),
229
+ destructive: true,
230
+ priority: 7,
231
+ },
232
232
  ];
233
233
 
234
234
  export const Basic: Story = {
235
- args: {
236
- title: 'Basic Header Example',
237
- subtitle: 'Simple header without image or actions',
238
- },
239
- render: (args) => (
240
- <QwickApp appId="cover-header-basic" appName='Cover Header Basic'>
241
- <CoverImageHeader {...args} />
242
- </QwickApp>
243
- ),
244
- parameters: {
245
- docs: {
246
- description: {
247
- story: 'Basic usage with just title and subtitle. Clean and minimal design.',
248
- },
249
- },
250
- },
235
+ args: {
236
+ title: 'Basic Header Example',
237
+ subtitle: 'Simple header without image or actions',
238
+ },
239
+ render: (args) => (
240
+ <QwickApp appId="cover-header-basic" appName='Cover Header Basic'>
241
+ <CoverImageHeader {...args} />
242
+ </QwickApp>
243
+ ),
244
+ parameters: {
245
+ docs: {
246
+ description: {
247
+ story: 'Basic usage with just title and subtitle. Clean and minimal design.',
248
+ },
249
+ },
250
+ },
251
251
  };
252
252
 
253
253
  export const WithImage: Story = {
254
- args: {
255
- image: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
256
- imageAlt: 'Profile photo',
257
- title: 'John Doe',
258
- subtitle: 'Senior Software Engineer',
259
- overline: 'TEAM MEMBER',
260
- imageSize: 'medium',
261
- imageShape: 'circle',
262
- },
263
- render: (args) => (
264
- <QwickApp appId="cover-header-image" appName='Cover Header Image'>
265
- <CoverImageHeader {...args} />
266
- </QwickApp>
267
- ),
268
- parameters: {
269
- docs: {
270
- description: {
271
- story: 'Header with profile image, overline, title, and subtitle. Perfect for user cards.',
272
- },
273
- },
274
- },
254
+ args: {
255
+ image: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
256
+ imageAlt: 'Profile photo',
257
+ title: 'John Doe',
258
+ subtitle: 'Senior Software Engineer',
259
+ overline: 'TEAM MEMBER',
260
+ imageSize: 'medium',
261
+ imageShape: 'circle',
262
+ },
263
+ render: (args) => (
264
+ <QwickApp appId="cover-header-image" appName='Cover Header Image'>
265
+ <CoverImageHeader {...args} />
266
+ </QwickApp>
267
+ ),
268
+ parameters: {
269
+ docs: {
270
+ description: {
271
+ story: 'Header with profile image, overline, title, and subtitle. Perfect for user cards.',
272
+ },
273
+ },
274
+ },
275
275
  };
276
276
 
277
277
  export const WithTagsAndActions: Story = {
278
- args: {
279
- image: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=200&q=80',
280
- imageAlt: 'Project thumbnail',
281
- title: 'React Dashboard Project',
282
- subtitle: 'Modern admin dashboard with comprehensive analytics and user management',
283
- overline: 'ACTIVE PROJECT',
284
- tags: ['React', 'TypeScript', 'Dashboard', 'Material UI'],
285
- actions: sampleActions.slice(0, 5),
286
- maxVisibleActions: 3,
287
- imageSize: 'large',
288
- imageShape: 'rounded',
289
- },
290
- render: (args) => (
291
- <QwickApp appId="cover-header-full" appName='Cover Header Full'>
292
- <CoverImageHeader {...args} />
293
- </QwickApp>
294
- ),
295
- parameters: {
296
- docs: {
297
- description: {
298
- story: 'Complete example with image, tags, and actions. Shows overflow menu when actions exceed maxVisibleActions.',
299
- },
300
- },
301
- },
278
+ args: {
279
+ image: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=200&q=80',
280
+ imageAlt: 'Project thumbnail',
281
+ title: 'React Dashboard Project',
282
+ subtitle: 'Modern admin dashboard with comprehensive analytics and user management',
283
+ overline: 'ACTIVE PROJECT',
284
+ tags: ['React', 'TypeScript', 'Dashboard', 'Material UI'],
285
+ actions: sampleActions.slice(0, 5),
286
+ maxVisibleActions: 3,
287
+ imageSize: 'large',
288
+ imageShape: 'rounded',
289
+ },
290
+ render: (args) => (
291
+ <QwickApp appId="cover-header-full" appName='Cover Header Full'>
292
+ <CoverImageHeader {...args} />
293
+ </QwickApp>
294
+ ),
295
+ parameters: {
296
+ docs: {
297
+ description: {
298
+ story: 'Complete example with image, tags, and actions. Shows overflow menu when actions exceed maxVisibleActions.',
299
+ },
300
+ },
301
+ },
302
302
  };
303
303
 
304
304
  export const ImageSizeVariants: Story = {
305
- render: () => (
306
- <QwickApp appId="cover-header-sizes" appName='Cover Header Sizes'>
307
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
308
- <CoverImageHeader
309
- image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
310
- imageAlt="Small image"
311
- title="Small Image Header"
312
- subtitle="48px image size"
313
- imageSize="small"
314
- imageShape="circle"
315
- />
316
-
317
- <CoverImageHeader
318
- image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
319
- imageAlt="Medium image"
320
- title="Medium Image Header"
321
- subtitle="64px image size (default)"
322
- imageSize="medium"
323
- imageShape="circle"
324
- />
325
-
326
- <CoverImageHeader
327
- image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
328
- imageAlt="Large image"
329
- title="Large Image Header"
330
- subtitle="80px image size"
331
- imageSize="large"
332
- imageShape="circle"
333
- />
334
- </div>
335
- </QwickApp>
336
- ),
337
- parameters: {
338
- docs: {
339
- description: {
340
- story: 'Comparison of different image size variants: small (48px), medium (64px), and large (80px).',
341
- },
342
- },
343
- },
305
+ render: () => (
306
+ <QwickApp appId="cover-header-sizes" appName='Cover Header Sizes'>
307
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
308
+ <CoverImageHeader
309
+ image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
310
+ imageAlt="Small image"
311
+ title="Small Image Header"
312
+ subtitle="48px image size"
313
+ imageSize="small"
314
+ imageShape="circle"
315
+ />
316
+
317
+ <CoverImageHeader
318
+ image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
319
+ imageAlt="Medium image"
320
+ title="Medium Image Header"
321
+ subtitle="64px image size (default)"
322
+ imageSize="medium"
323
+ imageShape="circle"
324
+ />
325
+
326
+ <CoverImageHeader
327
+ image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
328
+ imageAlt="Large image"
329
+ title="Large Image Header"
330
+ subtitle="80px image size"
331
+ imageSize="large"
332
+ imageShape="circle"
333
+ />
334
+ </div>
335
+ </QwickApp>
336
+ ),
337
+ parameters: {
338
+ docs: {
339
+ description: {
340
+ story: 'Comparison of different image size variants: small (48px), medium (64px), and large (80px).',
341
+ },
342
+ },
343
+ },
344
344
  };
345
345
 
346
346
  export const ImageShapeVariants: Story = {
347
- render: () => (
348
- <QwickApp appId="cover-header-shapes" appName='Cover Header Shapes'>
349
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
350
- <CoverImageHeader
351
- image="https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
352
- imageAlt="Square image"
353
- title="Square Image"
354
- subtitle="Sharp corners, perfect for logos"
355
- imageShape="square"
356
- imageSize="large"
357
- />
358
-
359
- <CoverImageHeader
360
- image="https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
361
- imageAlt="Rounded image"
362
- title="Rounded Image"
363
- subtitle="Slightly rounded corners (default)"
364
- imageShape="rounded"
365
- imageSize="large"
366
- />
367
-
368
- <CoverImageHeader
369
- image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
370
- imageAlt="Circle image"
371
- title="Circle Image"
372
- subtitle="Perfect circles, ideal for avatars"
373
- imageShape="circle"
374
- imageSize="large"
375
- />
376
- </div>
377
- </QwickApp>
378
- ),
379
- parameters: {
380
- docs: {
381
- description: {
382
- story: 'Comparison of different image shape variants: square, rounded (default), and circle.',
383
- },
384
- },
385
- },
347
+ render: () => (
348
+ <QwickApp appId="cover-header-shapes" appName='Cover Header Shapes'>
349
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
350
+ <CoverImageHeader
351
+ image="https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
352
+ imageAlt="Square image"
353
+ title="Square Image"
354
+ subtitle="Sharp corners, perfect for logos"
355
+ imageShape="square"
356
+ imageSize="large"
357
+ />
358
+
359
+ <CoverImageHeader
360
+ image="https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
361
+ imageAlt="Rounded image"
362
+ title="Rounded Image"
363
+ subtitle="Slightly rounded corners (default)"
364
+ imageShape="rounded"
365
+ imageSize="large"
366
+ />
367
+
368
+ <CoverImageHeader
369
+ image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
370
+ imageAlt="Circle image"
371
+ title="Circle Image"
372
+ subtitle="Perfect circles, ideal for avatars"
373
+ imageShape="circle"
374
+ imageSize="large"
375
+ />
376
+ </div>
377
+ </QwickApp>
378
+ ),
379
+ parameters: {
380
+ docs: {
381
+ description: {
382
+ story: 'Comparison of different image shape variants: square, rounded (default), and circle.',
383
+ },
384
+ },
385
+ },
386
386
  };
387
387
 
388
388
  export const VariantComparison: Story = {
389
- render: () => (
390
- <QwickApp appId="cover-header-variants" appName='Cover Header Variants'>
391
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
392
- <CoverImageHeader
393
- image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
394
- imageAlt="Compact variant"
395
- title="Compact Variant"
396
- subtitle="Reduced padding and spacing"
397
- tags={['Compact', 'Space-efficient']}
398
- variant="compact"
399
- actions={sampleActions.slice(0, 2)}
400
- />
401
-
402
- <CoverImageHeader
403
- image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
404
- imageAlt="Default variant"
405
- title="Default Variant"
406
- subtitle="Balanced padding and spacing"
407
- tags={['Default', 'Balanced']}
408
- variant="default"
409
- actions={sampleActions.slice(0, 2)}
410
- />
411
-
412
- <CoverImageHeader
413
- image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
414
- imageAlt="Prominent variant"
415
- title="Prominent Variant"
416
- subtitle="Generous padding with centered alignment"
417
- tags={['Prominent', 'Eye-catching']}
418
- variant="prominent"
419
- actions={sampleActions.slice(0, 2)}
420
- />
421
- </div>
422
- </QwickApp>
423
- ),
424
- parameters: {
425
- docs: {
426
- description: {
427
- story: 'Comparison of header variants: compact (minimal spacing), default (balanced), and prominent (generous spacing).',
428
- },
429
- },
430
- },
389
+ render: () => (
390
+ <QwickApp appId="cover-header-variants" appName='Cover Header Variants'>
391
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
392
+ <CoverImageHeader
393
+ image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
394
+ imageAlt="Compact variant"
395
+ title="Compact Variant"
396
+ subtitle="Reduced padding and spacing"
397
+ tags={['Compact', 'Space-efficient']}
398
+ variant="compact"
399
+ actions={sampleActions.slice(0, 2)}
400
+ />
401
+
402
+ <CoverImageHeader
403
+ image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
404
+ imageAlt="Default variant"
405
+ title="Default Variant"
406
+ subtitle="Balanced padding and spacing"
407
+ tags={['Default', 'Balanced']}
408
+ variant="default"
409
+ actions={sampleActions.slice(0, 2)}
410
+ />
411
+
412
+ <CoverImageHeader
413
+ image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
414
+ imageAlt="Prominent variant"
415
+ title="Prominent Variant"
416
+ subtitle="Generous padding with centered alignment"
417
+ tags={['Prominent', 'Eye-catching']}
418
+ variant="prominent"
419
+ actions={sampleActions.slice(0, 2)}
420
+ />
421
+ </div>
422
+ </QwickApp>
423
+ ),
424
+ parameters: {
425
+ docs: {
426
+ description: {
427
+ story: 'Comparison of header variants: compact (minimal spacing), default (balanced), and prominent (generous spacing).',
428
+ },
429
+ },
430
+ },
431
431
  };
432
432
 
433
433
  export const WithBackgroundImage: Story = {
434
- args: {
435
- title: 'Hero Section Header',
436
- subtitle: 'Beautiful background with overlay for better text readability',
437
- overline: 'FEATURED',
438
- tags: ['Hero', 'Background', 'Overlay'],
439
- background: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80',
440
- variant: 'prominent',
441
- actions: [
442
- {
443
- id: 'cta',
444
- label: 'Get Started',
445
- onClick: () => alert('Getting started!'),
446
- priority: 1,
447
- },
448
- {
449
- id: 'learn-more',
450
- label: 'Learn More',
451
- onClick: () => alert('Learning more...'),
452
- priority: 2,
453
- },
454
- ],
455
- },
456
- render: (args) => (
457
- <QwickApp appId="cover-header-background" appName='Cover Header Background'>
458
- <CoverImageHeader {...args} />
459
- </QwickApp>
460
- ),
461
- parameters: {
462
- docs: {
463
- description: {
464
- story: 'Header with background image and automatic overlay for better text contrast. Perfect for hero sections.',
465
- },
466
- },
467
- },
434
+ args: {
435
+ title: 'Hero Section Header',
436
+ subtitle: 'Beautiful background with overlay for better text readability',
437
+ overline: 'FEATURED',
438
+ tags: ['Hero', 'Background', 'Overlay'],
439
+ background: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80',
440
+ variant: 'prominent',
441
+ actions: [
442
+ {
443
+ id: 'cta',
444
+ label: 'Get Started',
445
+ onClick: () => alert('Getting started!'),
446
+ priority: 1,
447
+ },
448
+ {
449
+ id: 'learn-more',
450
+ label: 'Learn More',
451
+ onClick: () => alert('Learning more...'),
452
+ priority: 2,
453
+ },
454
+ ],
455
+ },
456
+ render: (args) => (
457
+ <QwickApp appId="cover-header-background" appName='Cover Header Background'>
458
+ <CoverImageHeader {...args} />
459
+ </QwickApp>
460
+ ),
461
+ parameters: {
462
+ docs: {
463
+ description: {
464
+ story: 'Header with background image and automatic overlay for better text contrast. Perfect for hero sections.',
465
+ },
466
+ },
467
+ },
468
468
  };
469
469
 
470
470
  export const ActionsOverflowDemo: Story = {
471
- args: {
472
- image: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
473
- imageAlt: 'Document preview',
474
- title: 'Document Management',
475
- subtitle: 'Multiple actions available with overflow menu',
476
- overline: 'DOCUMENT',
477
- tags: ['PDF', 'Important', 'Shared'],
478
- actions: sampleActions,
479
- maxVisibleActions: 2,
480
- },
481
- render: (args) => (
482
- <QwickApp appId="cover-header-overflow" appName='Cover Header Overflow'>
483
- <CoverImageHeader {...args} />
484
- </QwickApp>
485
- ),
486
- parameters: {
487
- docs: {
488
- description: {
489
- story: 'Demonstrates action overflow functionality. When actions exceed maxVisibleActions, additional actions appear in an overflow menu.',
490
- },
491
- },
492
- },
471
+ args: {
472
+ image: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
473
+ imageAlt: 'Document preview',
474
+ title: 'Document Management',
475
+ subtitle: 'Multiple actions available with overflow menu',
476
+ overline: 'DOCUMENT',
477
+ tags: ['PDF', 'Important', 'Shared'],
478
+ actions: sampleActions,
479
+ maxVisibleActions: 2,
480
+ },
481
+ render: (args) => (
482
+ <QwickApp appId="cover-header-overflow" appName='Cover Header Overflow'>
483
+ <CoverImageHeader {...args} />
484
+ </QwickApp>
485
+ ),
486
+ parameters: {
487
+ docs: {
488
+ description: {
489
+ story: 'Demonstrates action overflow functionality. When actions exceed maxVisibleActions, additional actions appear in an overflow menu.',
490
+ },
491
+ },
492
+ },
493
493
  };
494
494
 
495
495
  export const CustomContent: Story = {
496
- args: {
497
- image: (
498
- <div style={{
499
- width: 64,
500
- height: 64,
501
- backgroundColor: 'var(--theme-primary)',
502
- borderRadius: '8px',
503
- display: 'flex',
504
- alignItems: 'center',
505
- justifyContent: 'center',
506
- fontSize: '1.5rem',
507
- fontWeight: 'bold',
508
- color: 'white',
509
- }}>
510
- 🚀
511
- </div>
512
- ),
513
- title: 'Custom React Component',
514
- subtitle: 'Using a custom React component instead of image URL',
515
- overline: 'CUSTOM',
516
- tags: [
517
- 'React',
518
- <span key="special" style={{
519
- background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4)',
520
- color: 'white',
521
- padding: '2px 8px',
522
- borderRadius: '12px',
523
- fontSize: '0.75rem',
524
- fontWeight: 'bold'
525
- }}>
526
- Special
527
- </span>,
528
- 'Component'
529
- ],
530
- actions: sampleActions.slice(0, 3),
531
- },
532
- render: (args) => (
533
- <QwickApp appId="cover-header-custom" appName='Cover Header Custom'>
534
- <CoverImageHeader {...args} />
535
- </QwickApp>
536
- ),
537
- parameters: {
538
- docs: {
539
- description: {
540
- story: 'Demonstrates custom React components for both image and tag content. Great for icons, badges, and custom layouts.',
541
- },
542
- },
543
- },
496
+ args: {
497
+ image: (
498
+ <div style={{
499
+ width: 64,
500
+ height: 64,
501
+ backgroundColor: 'var(--theme-primary)',
502
+ borderRadius: '8px',
503
+ display: 'flex',
504
+ alignItems: 'center',
505
+ justifyContent: 'center',
506
+ fontSize: '1.5rem',
507
+ fontWeight: 'bold',
508
+ color: 'white',
509
+ }}>
510
+
511
+ </div>
512
+ ),
513
+ title: 'Custom React Component',
514
+ subtitle: 'Using a custom React component instead of image URL',
515
+ overline: 'CUSTOM',
516
+ tags: [
517
+ 'React',
518
+ <span key="special" style={{
519
+ background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4)',
520
+ color: 'white',
521
+ padding: '2px 8px',
522
+ borderRadius: '12px',
523
+ fontSize: '0.75rem',
524
+ fontWeight: 'bold'
525
+ }}>
526
+ Special
527
+ </span>,
528
+ 'Component'
529
+ ],
530
+ actions: sampleActions.slice(0, 3),
531
+ },
532
+ render: (args) => (
533
+ <QwickApp appId="cover-header-custom" appName='Cover Header Custom'>
534
+ <CoverImageHeader {...args} />
535
+ </QwickApp>
536
+ ),
537
+ parameters: {
538
+ docs: {
539
+ description: {
540
+ story: 'Demonstrates custom React components for both image and tag content. Great for icons, badges, and custom layouts.',
541
+ },
542
+ },
543
+ },
544
544
  };
545
545
 
546
546
  // Data Binding Examples
547
547
  export const DataBindingTeamLead: Story = {
548
- render: () => (
549
- <QwickApp
550
- appId="cover-header-data-team"
551
- appName='Team Lead Data Binding'
552
- dataSource={{ dataProvider }}
553
- >
554
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
555
-
556
- <Box>
557
- <Typography variant="h5" gutterBottom>👤 Data-Driven Team Lead Header</Typography>
558
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
559
- CoverImageHeader components can be driven entirely by CMS data using the dataSource prop.
560
- </Typography>
561
-
562
- <Code title="Usage" language="tsx">{`<CoverImageHeader dataSource="coverImageHeaders.teamLead" />`}</Code>
563
-
564
- <Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData.coverImageHeaders.teamLead, null, 2)}</Code>
565
- </Box>
548
+ render: () => (
549
+ <QwickApp
550
+ appId="cover-header-data-team"
551
+ appName='Team Lead Data Binding'
552
+ dataSource={{ dataProvider }}
553
+ >
554
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
555
+
556
+ <Box>
557
+ <Typography variant="h5" gutterBottom>👤 Data-Driven Team Lead Header</Typography>
558
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
559
+ CoverImageHeader components can be driven entirely by CMS data using the dataSource prop.
560
+ </Typography>
561
+
562
+ <Code title="Usage" language="tsx">{`<CoverImageHeader dataSource="coverImageHeaders.teamLead" />`}</Code>
563
+
564
+ <Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData.coverImageHeaders.teamLead, null, 2)}</Code>
565
+ </Box>
566
566
 
567
- <CoverImageHeader dataSource="coverImageHeaders.teamLead" />
568
-
569
- <div style={{ padding: '2rem', maxWidth: '800px', margin: '0 auto' }}>
570
- <h3>Team Member Profile</h3>
571
- <p>
572
- This team lead header is completely driven by CMS data, including the profile image,
573
- metadata, tags, and actions. Perfect for team directories, leadership pages, and organizational charts.
574
- </p>
575
- </div>
576
-
577
- </div>
578
- </QwickApp>
579
- ),
580
- parameters: {
581
- docs: {
582
- description: {
583
- story: 'Team lead header with complete data binding - all content loaded from CMS data source.',
584
- },
585
- },
586
- },
567
+ <CoverImageHeader dataSource="coverImageHeaders.teamLead" />
568
+
569
+ <div style={{ padding: '2rem', maxWidth: '800px', margin: '0 auto' }}>
570
+ <h3>Team Member Profile</h3>
571
+ <p>
572
+ This team lead header is completely driven by CMS data, including the profile image,
573
+ metadata, tags, and actions. Perfect for team directories, leadership pages, and organizational charts.
574
+ </p>
575
+ </div>
576
+
577
+ </div>
578
+ </QwickApp>
579
+ ),
580
+ parameters: {
581
+ docs: {
582
+ description: {
583
+ story: 'Team lead header with complete data binding - all content loaded from CMS data source.',
584
+ },
585
+ },
586
+ },
587
587
  };
588
588
 
589
589
  export const DataBindingProject: Story = {
590
- render: () => (
591
- <QwickApp
592
- appId="cover-header-data-project"
593
- appName='Project Data Binding'
594
- dataSource={{ dataProvider }}
595
- >
596
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
597
-
598
- <Box>
599
- <Typography variant="h5" gutterBottom>🚀 Data-Driven Project Header</Typography>
600
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
601
- Project headers can pull all their content from CMS, making them perfect for dynamic portfolios.
602
- </Typography>
603
- </Box>
590
+ render: () => (
591
+ <QwickApp
592
+ appId="cover-header-data-project"
593
+ appName='Project Data Binding'
594
+ dataSource={{ dataProvider }}
595
+ >
596
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
597
+
598
+ <Box>
599
+ <Typography variant="h5" gutterBottom> Data-Driven Project Header</Typography>
600
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
601
+ Project headers can pull all their content from CMS, making them perfect for dynamic portfolios.
602
+ </Typography>
603
+ </Box>
604
604
 
605
- <CoverImageHeader dataSource="coverImageHeaders.projectShowcase" />
606
-
607
- <div style={{ padding: '2rem', maxWidth: '900px', margin: '0 auto' }}>
608
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '2rem' }}>
609
- <div>
610
- <h3>Dynamic Project Info</h3>
611
- <p>
612
- All project details including technology stack, status, and actions are dynamically loaded
613
- from the CMS, allowing for real-time updates without code changes.
614
- </p>
615
- </div>
616
-
617
- <div>
618
- <h3>Flexible Actions</h3>
619
- <p>
620
- Project-specific actions like demo links, source code, and documentation can be
621
- configured per project through the CMS interface.
622
- </p>
623
- </div>
624
- </div>
625
- </div>
626
-
627
- </div>
628
- </QwickApp>
629
- ),
630
- parameters: {
631
- docs: {
632
- description: {
633
- story: 'Project header with data binding showing technology tags, project status, and dynamic actions.',
634
- },
635
- },
636
- },
605
+ <CoverImageHeader dataSource="coverImageHeaders.projectShowcase" />
606
+
607
+ <div style={{ padding: '2rem', maxWidth: '900px', margin: '0 auto' }}>
608
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '2rem' }}>
609
+ <div>
610
+ <h3>Dynamic Project Info</h3>
611
+ <p>
612
+ All project details including technology stack, status, and actions are dynamically loaded
613
+ from the CMS, allowing for real-time updates without code changes.
614
+ </p>
615
+ </div>
616
+
617
+ <div>
618
+ <h3>Flexible Actions</h3>
619
+ <p>
620
+ Project-specific actions like demo links, source code, and documentation can be
621
+ configured per project through the CMS interface.
622
+ </p>
623
+ </div>
624
+ </div>
625
+ </div>
626
+
627
+ </div>
628
+ </QwickApp>
629
+ ),
630
+ parameters: {
631
+ docs: {
632
+ description: {
633
+ story: 'Project header with data binding showing technology tags, project status, and dynamic actions.',
634
+ },
635
+ },
636
+ },
637
637
  };
638
638
 
639
639
  export const DataBindingCompany: Story = {
640
- render: () => (
641
- <QwickApp
642
- appId="cover-header-data-company"
643
- appName='Company Data Binding'
644
- dataSource={{ dataProvider }}
645
- >
646
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
647
-
648
- <Box>
649
- <Typography variant="h5" gutterBottom>🏢 Data-Driven Company Header</Typography>
650
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
651
- Company headers with gradient backgrounds and corporate actions, all controlled by CMS.
652
- </Typography>
653
- </Box>
640
+ render: () => (
641
+ <QwickApp
642
+ appId="cover-header-data-company"
643
+ appName='Company Data Binding'
644
+ dataSource={{ dataProvider }}
645
+ >
646
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
647
+
648
+ <Box>
649
+ <Typography variant="h5" gutterBottom>🏢 Data-Driven Company Header</Typography>
650
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
651
+ Company headers with gradient backgrounds and corporate actions, all controlled by CMS.
652
+ </Typography>
653
+ </Box>
654
654
 
655
- <CoverImageHeader dataSource="coverImageHeaders.companyProfile" />
656
-
657
- <div style={{ padding: '2rem', maxWidth: '800px', margin: '0 auto' }}>
658
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', gap: '2rem' }}>
659
- <div>
660
- <h3>🎨 Dynamic Styling</h3>
661
- <p>
662
- Background gradients, colors, and visual styling can be controlled entirely
663
- through the CMS for brand consistency across different pages.
664
- </p>
665
- </div>
666
-
667
- <div>
668
- <h3>⚡ Business Actions</h3>
669
- <p>
670
- Corporate action buttons like contact sales, demos, and documentation
671
- can be managed and updated without developer intervention.
672
- </p>
673
- </div>
674
- </div>
675
- </div>
676
-
677
- </div>
678
- </QwickApp>
679
- ),
680
- parameters: {
681
- docs: {
682
- description: {
683
- story: 'Company header with data binding featuring gradient background and corporate action buttons.',
684
- },
685
- },
686
- },
655
+ <CoverImageHeader dataSource="coverImageHeaders.companyProfile" />
656
+
657
+ <div style={{ padding: '2rem', maxWidth: '800px', margin: '0 auto' }}>
658
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', gap: '2rem' }}>
659
+ <div>
660
+ <h3> Dynamic Styling</h3>
661
+ <p>
662
+ Background gradients, colors, and visual styling can be controlled entirely
663
+ through the CMS for brand consistency across different pages.
664
+ </p>
665
+ </div>
666
+
667
+ <div>
668
+ <h3> Business Actions</h3>
669
+ <p>
670
+ Corporate action buttons like contact sales, demos, and documentation
671
+ can be managed and updated without developer intervention.
672
+ </p>
673
+ </div>
674
+ </div>
675
+ </div>
676
+
677
+ </div>
678
+ </QwickApp>
679
+ ),
680
+ parameters: {
681
+ docs: {
682
+ description: {
683
+ story: 'Company header with data binding featuring gradient background and corporate action buttons.',
684
+ },
685
+ },
686
+ },
687
687
  };
688
688
 
689
689
  export const DataBindingProduct: Story = {
690
- render: () => (
691
- <QwickApp
692
- appId="cover-header-data-product"
693
- appName='Product Data Binding'
694
- dataSource={{ dataProvider }}
695
- >
696
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
697
-
698
- <Box>
699
- <Typography variant="h5" gutterBottom>📦 Data-Driven Product Header</Typography>
700
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
701
- Product showcase headers with features, pricing actions, and marketing content from CMS.
702
- </Typography>
703
- </Box>
690
+ render: () => (
691
+ <QwickApp
692
+ appId="cover-header-data-product"
693
+ appName='Product Data Binding'
694
+ dataSource={{ dataProvider }}
695
+ >
696
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
697
+
698
+ <Box>
699
+ <Typography variant="h5" gutterBottom> Data-Driven Product Header</Typography>
700
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
701
+ Product showcase headers with features, pricing actions, and marketing content from CMS.
702
+ </Typography>
703
+ </Box>
704
704
 
705
- <CoverImageHeader dataSource="coverImageHeaders.productShowcase" />
706
-
707
- <div style={{ padding: '2rem', maxWidth: '700px', margin: '0 auto' }}>
708
- <h3>Product Marketing Integration</h3>
709
- <p>
710
- Product headers can display feature highlights, call-to-action buttons, and marketing
711
- content that's managed through your CMS. Perfect for product pages, landing pages,
712
- and marketing campaigns that need frequent updates.
713
- </p>
714
- </div>
715
-
716
- </div>
717
- </QwickApp>
718
- ),
719
- parameters: {
720
- docs: {
721
- description: {
722
- story: 'Product showcase header with data binding displaying features, pricing actions, and marketing content.',
723
- },
724
- },
725
- },
705
+ <CoverImageHeader dataSource="coverImageHeaders.productShowcase" />
706
+
707
+ <div style={{ padding: '2rem', maxWidth: '700px', margin: '0 auto' }}>
708
+ <h3>Product Marketing Integration</h3>
709
+ <p>
710
+ Product headers can display feature highlights, call-to-action buttons, and marketing
711
+ content that's managed through your CMS. Perfect for product pages, landing pages,
712
+ and marketing campaigns that need frequent updates.
713
+ </p>
714
+ </div>
715
+
716
+ </div>
717
+ </QwickApp>
718
+ ),
719
+ parameters: {
720
+ docs: {
721
+ description: {
722
+ story: 'Product showcase header with data binding displaying features, pricing actions, and marketing content.',
723
+ },
724
+ },
725
+ },
726
726
  };
727
727
 
728
728
  export const DataBindingWithFallback: Story = {
729
- render: () => (
730
- <QwickApp
731
- appId="cover-header-data-fallback"
732
- appName='Data Binding with Fallback'
733
- dataSource={{ dataProvider }}
734
- >
735
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
736
-
737
- <Box>
738
- <Typography variant="h5" gutterBottom>🛡️ Fallback Support</Typography>
739
- <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
740
- CoverImageHeader gracefully handles missing data sources with fallback props.
741
- </Typography>
742
-
743
- <Code title="Fallback Usage" language="tsx">{`<CoverImageHeader
744
- dataSource="nonexistent.data"
745
- title="Fallback Title"
746
- subtitle="Shows when data source is missing"
747
- overline="FALLBACK"
729
+ render: () => (
730
+ <QwickApp
731
+ appId="cover-header-data-fallback"
732
+ appName='Data Binding with Fallback'
733
+ dataSource={{ dataProvider }}
734
+ >
735
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
736
+
737
+ <Box>
738
+ <Typography variant="h5" gutterBottom> Fallback Support</Typography>
739
+ <Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
740
+ CoverImageHeader gracefully handles missing data sources with fallback props.
741
+ </Typography>
742
+
743
+ <Code title="Fallback Usage" language="tsx">{`<CoverImageHeader
744
+ dataSource="nonexistent.data"
745
+ title="Fallback Title"
746
+ subtitle="Shows when data source is missing"
747
+ overline="FALLBACK"
748
748
  />`}</Code>
749
- </Box>
749
+ </Box>
750
750
 
751
- <CoverImageHeader
752
- dataSource="nonexistent.data"
753
- title="Fallback Header"
754
- subtitle="This content appears when the dataSource doesn't exist"
755
- overline="FALLBACK DEMO"
756
- tags={['Fallback', 'Graceful Degradation']}
757
- variant="default"
758
- />
759
-
760
- <Box sx={{ mt: 3 }}>
761
- <Typography variant="h6" gutterBottom>🔄 Image Loading Demo</Typography>
762
- <Typography variant="body2" sx={{ mb: 2, opacity: 0.8 }}>
763
- This example shows how the component handles slow-loading images.
764
- </Typography>
765
- <CoverImageHeader dataSource="coverImageHeaders.imageLoadingDemo" />
766
- </Box>
767
-
768
- <Box sx={{ mt: 3 }}>
769
- <Typography variant="h6" gutterBottom>⚠️ Image Error Handling</Typography>
770
- <Typography variant="body2" sx={{ mb: 2, opacity: 0.8 }}>
771
- This example demonstrates image fallback and error handling.
772
- </Typography>
773
- <CoverImageHeader dataSource="coverImageHeaders.imageFallbackDemo" />
774
- </Box>
775
-
776
- <div style={{ padding: '2rem', maxWidth: '700px', margin: '0 auto' }}>
777
- <h3>Graceful Degradation</h3>
778
- <p>
779
- When a data source is unavailable or empty, the component falls back to traditional props,
780
- ensuring your application remains functional even when CMS data is missing.
781
- </p>
782
- </div>
783
-
784
- </div>
785
- </QwickApp>
786
- ),
787
- parameters: {
788
- docs: {
789
- description: {
790
- story: 'Header with fallback props when dataSource is missing or unavailable, ensuring graceful degradation.',
791
- },
792
- },
793
- },
751
+ <CoverImageHeader
752
+ dataSource="nonexistent.data"
753
+ title="Fallback Header"
754
+ subtitle="This content appears when the dataSource doesn't exist"
755
+ overline="FALLBACK DEMO"
756
+ tags={['Fallback', 'Graceful Degradation']}
757
+ variant="default"
758
+ />
759
+
760
+ <Box sx={{ mt: 3 }}>
761
+ <Typography variant="h6" gutterBottom> Image Loading Demo</Typography>
762
+ <Typography variant="body2" sx={{ mb: 2, opacity: 0.8 }}>
763
+ This example shows how the component handles slow-loading images.
764
+ </Typography>
765
+ <CoverImageHeader dataSource="coverImageHeaders.imageLoadingDemo" />
766
+ </Box>
767
+
768
+ <Box sx={{ mt: 3 }}>
769
+ <Typography variant="h6" gutterBottom> Image Error Handling</Typography>
770
+ <Typography variant="body2" sx={{ mb: 2, opacity: 0.8 }}>
771
+ This example demonstrates image fallback and error handling.
772
+ </Typography>
773
+ <CoverImageHeader dataSource="coverImageHeaders.imageFallbackDemo" />
774
+ </Box>
775
+
776
+ <div style={{ padding: '2rem', maxWidth: '700px', margin: '0 auto' }}>
777
+ <h3>Graceful Degradation</h3>
778
+ <p>
779
+ When a data source is unavailable or empty, the component falls back to traditional props,
780
+ ensuring your application remains functional even when CMS data is missing.
781
+ </p>
782
+ </div>
783
+
784
+ </div>
785
+ </QwickApp>
786
+ ),
787
+ parameters: {
788
+ docs: {
789
+ description: {
790
+ story: 'Header with fallback props when dataSource is missing or unavailable, ensuring graceful degradation.',
791
+ },
792
+ },
793
+ },
794
794
  };