@qwickapps/react-framework 1.3.5 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/README.md +1691 -2
  2. package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
  3. package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
  4. package/dist/components/ErrorBoundary.d.ts +7 -0
  5. package/dist/components/ErrorBoundary.d.ts.map +1 -1
  6. package/dist/components/Html.d.ts +28 -18
  7. package/dist/components/Html.d.ts.map +1 -1
  8. package/dist/components/Logo.d.ts +12 -35
  9. package/dist/components/Logo.d.ts.map +1 -1
  10. package/dist/components/Markdown.d.ts +18 -13
  11. package/dist/components/Markdown.d.ts.map +1 -1
  12. package/dist/components/QwickApp.d.ts +16 -3
  13. package/dist/components/QwickApp.d.ts.map +1 -1
  14. package/dist/components/QwickIcon.d.ts +23 -0
  15. package/dist/components/QwickIcon.d.ts.map +1 -0
  16. package/dist/components/SafeSpan.d.ts +12 -5
  17. package/dist/components/SafeSpan.d.ts.map +1 -1
  18. package/dist/components/Scaffold.d.ts.map +1 -1
  19. package/dist/components/base/ModelView.d.ts +101 -0
  20. package/dist/components/base/ModelView.d.ts.map +1 -0
  21. package/dist/components/base/index.d.ts +11 -0
  22. package/dist/components/base/index.d.ts.map +1 -0
  23. package/dist/components/blocks/Article.d.ts +12 -2
  24. package/dist/components/blocks/Article.d.ts.map +1 -1
  25. package/dist/components/blocks/Code.d.ts +13 -2
  26. package/dist/components/blocks/Code.d.ts.map +1 -1
  27. package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
  28. package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
  29. package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
  30. package/dist/components/blocks/Footer.d.ts.map +1 -1
  31. package/dist/components/blocks/HeroBlock.d.ts +27 -13
  32. package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
  33. package/dist/components/blocks/Image.d.ts +41 -0
  34. package/dist/components/blocks/Image.d.ts.map +1 -0
  35. package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
  36. package/dist/components/blocks/Section.d.ts +16 -2
  37. package/dist/components/blocks/Section.d.ts.map +1 -1
  38. package/dist/components/blocks/Text.d.ts +41 -0
  39. package/dist/components/blocks/Text.d.ts.map +1 -0
  40. package/dist/components/blocks/index.d.ts +4 -0
  41. package/dist/components/blocks/index.d.ts.map +1 -1
  42. package/dist/components/buttons/Button.d.ts +23 -7
  43. package/dist/components/buttons/Button.d.ts.map +1 -1
  44. package/dist/components/forms/FormBlock.d.ts +19 -13
  45. package/dist/components/forms/FormBlock.d.ts.map +1 -1
  46. package/dist/components/index.d.ts +4 -0
  47. package/dist/components/index.d.ts.map +1 -1
  48. package/dist/components/input/ChoiceInputField.d.ts +17 -11
  49. package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
  50. package/dist/components/input/HtmlInputField.d.ts +17 -11
  51. package/dist/components/input/HtmlInputField.d.ts.map +1 -1
  52. package/dist/components/input/SelectInputField.d.ts +16 -10
  53. package/dist/components/input/SelectInputField.d.ts.map +1 -1
  54. package/dist/components/input/SwitchInputField.d.ts +16 -10
  55. package/dist/components/input/SwitchInputField.d.ts.map +1 -1
  56. package/dist/components/input/TextField.d.ts.map +1 -1
  57. package/dist/components/input/TextInputField.d.ts +16 -11
  58. package/dist/components/input/TextInputField.d.ts.map +1 -1
  59. package/dist/components/layout/GridCell.d.ts +23 -6
  60. package/dist/components/layout/GridCell.d.ts.map +1 -1
  61. package/dist/components/layout/GridLayout.d.ts +24 -23
  62. package/dist/components/layout/GridLayout.d.ts.map +1 -1
  63. package/dist/components/pages/FormPage.d.ts.map +1 -1
  64. package/dist/components/pages/Page.d.ts +49 -87
  65. package/dist/components/pages/Page.d.ts.map +1 -1
  66. package/dist/components/pages/index.d.ts +2 -2
  67. package/dist/components/pages/index.d.ts.map +1 -1
  68. package/dist/config/AppConfig.d.ts +49 -0
  69. package/dist/config/AppConfig.d.ts.map +1 -0
  70. package/dist/config/AppConfigBuilder.d.ts +75 -0
  71. package/dist/config/AppConfigBuilder.d.ts.map +1 -0
  72. package/dist/config/index.d.ts +13 -0
  73. package/dist/config/index.d.ts.map +1 -0
  74. package/dist/config/types.d.ts +130 -0
  75. package/dist/config/types.d.ts.map +1 -0
  76. package/dist/config.d.ts +15 -0
  77. package/dist/config.d.ts.map +1 -0
  78. package/dist/config.esm.js +451 -0
  79. package/dist/config.js +455 -0
  80. package/dist/contexts/PrintModeContext.d.ts +27 -0
  81. package/dist/contexts/PrintModeContext.d.ts.map +1 -0
  82. package/dist/contexts/QwickAppContext.d.ts +2 -2
  83. package/dist/contexts/QwickAppContext.d.ts.map +1 -1
  84. package/dist/contexts/index.d.ts +2 -0
  85. package/dist/contexts/index.d.ts.map +1 -1
  86. package/dist/hooks/index.d.ts +2 -0
  87. package/dist/hooks/index.d.ts.map +1 -1
  88. package/dist/hooks/usePrintMode.d.ts +39 -0
  89. package/dist/hooks/usePrintMode.d.ts.map +1 -0
  90. package/dist/index.css +1 -1
  91. package/dist/index.d.ts +1 -0
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.esm.css +1 -1
  94. package/dist/index.esm.js +10951 -6238
  95. package/dist/index.js +11014 -6287
  96. package/dist/schemas/CodeSchema.d.ts +2 -1
  97. package/dist/schemas/CodeSchema.d.ts.map +1 -1
  98. package/dist/schemas/CollapsibleLayoutSchema.d.ts +2 -1
  99. package/dist/schemas/CollapsibleLayoutSchema.d.ts.map +1 -1
  100. package/dist/schemas/ContentSchema.d.ts +2 -1
  101. package/dist/schemas/ContentSchema.d.ts.map +1 -1
  102. package/dist/schemas/GridCellSchema.d.ts +25 -0
  103. package/dist/schemas/GridCellSchema.d.ts.map +1 -0
  104. package/dist/schemas/GridLayoutSchema.d.ts +23 -0
  105. package/dist/schemas/GridLayoutSchema.d.ts.map +1 -0
  106. package/dist/schemas/HtmlSchema.d.ts +14 -0
  107. package/dist/schemas/HtmlSchema.d.ts.map +1 -0
  108. package/dist/schemas/ImageSchema.d.ts +32 -0
  109. package/dist/schemas/ImageSchema.d.ts.map +1 -0
  110. package/dist/schemas/LogoSchema.d.ts +35 -0
  111. package/dist/schemas/LogoSchema.d.ts.map +1 -0
  112. package/dist/schemas/MarkdownSchema.d.ts +14 -0
  113. package/dist/schemas/MarkdownSchema.d.ts.map +1 -0
  114. package/dist/schemas/PageTemplateSchema.d.ts +31 -0
  115. package/dist/schemas/PageTemplateSchema.d.ts.map +1 -0
  116. package/dist/schemas/PrintConfigSchema.d.ts +31 -0
  117. package/dist/schemas/PrintConfigSchema.d.ts.map +1 -0
  118. package/dist/schemas/SectionSchema.d.ts +2 -1
  119. package/dist/schemas/SectionSchema.d.ts.map +1 -1
  120. package/dist/schemas/TextSchema.d.ts +37 -0
  121. package/dist/schemas/TextSchema.d.ts.map +1 -0
  122. package/dist/schemas/ViewModelSchema.d.ts +23 -0
  123. package/dist/schemas/ViewModelSchema.d.ts.map +1 -0
  124. package/dist/schemas/index.d.ts +15 -1
  125. package/dist/schemas/index.d.ts.map +1 -1
  126. package/dist/schemas/transformers/ComponentTransformer.d.ts +116 -0
  127. package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
  128. package/dist/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
  129. package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
  130. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +66 -0
  131. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +1 -0
  132. package/dist/schemas/transformers/registry.d.ts +15 -0
  133. package/dist/schemas/transformers/registry.d.ts.map +1 -0
  134. package/dist/schemas/types/Serializable.d.ts +46 -0
  135. package/dist/schemas/types/Serializable.d.ts.map +1 -0
  136. package/dist/utils/htmlTransform.d.ts.map +1 -1
  137. package/dist/utils/reactUtils.d.ts +12 -3
  138. package/dist/utils/reactUtils.d.ts.map +1 -1
  139. package/package.json +17 -3
  140. package/src/{components/__tests__ → __tests__/components}/AccessibilityProvider.test.tsx +1 -1
  141. package/src/{components/__tests__ → __tests__/components}/Article.test.tsx +1 -1
  142. package/src/{components/__tests__ → __tests__/components}/Breadcrumbs.test.tsx +1 -1
  143. package/src/{components/__tests__ → __tests__/components}/Button.test.tsx +1 -1
  144. package/src/{components/__tests__ → __tests__/components}/CardListGrid.test.tsx +2 -2
  145. package/src/{components/__tests__ → __tests__/components}/ChoiceInputField.test.tsx +1 -1
  146. package/src/{components/__tests__ → __tests__/components}/Code.test.tsx +1 -1
  147. package/src/{components/__tests__ → __tests__/components}/Content.integration.test.tsx +1 -1
  148. package/src/{components/__tests__ → __tests__/components}/Content.test.tsx +1 -1
  149. package/src/{components/__tests__ → __tests__/components}/CoverImageHeader.test.tsx +2 -2
  150. package/src/{components/__tests__ → __tests__/components}/ErrorBoundary.test.tsx +1 -1
  151. package/src/{components/__tests__ → __tests__/components}/FeatureCard.integration.test.tsx +2 -2
  152. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.integration.test.tsx +2 -2
  153. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.test.tsx +2 -2
  154. package/src/{components/__tests__ → __tests__/components}/Footer.test.tsx +4 -4
  155. package/src/{components/__tests__ → __tests__/components}/FormBlock.test.tsx +1 -1
  156. package/src/{components/__tests__ → __tests__/components}/HeroBlock.integration.test.tsx +2 -2
  157. package/src/{components/__tests__ → __tests__/components}/HeroBlock.test.tsx +233 -7
  158. package/src/{components/__tests__ → __tests__/components}/Html.test.tsx +11 -2
  159. package/src/{components/__tests__ → __tests__/components}/HtmlInputField.test.tsx +3 -3
  160. package/src/__tests__/components/Logo.test.js +3 -3
  161. package/src/{components/__tests__ → __tests__/components}/Markdown.test.tsx +1 -1
  162. package/src/{components/__tests__ → __tests__/components}/PageBannerHeader.test.tsx +3 -3
  163. package/src/{components/__tests__ → __tests__/components}/PaletteSwitcher.test.tsx +3 -3
  164. package/src/{components/__tests__ → __tests__/components}/ProductCard.test.tsx +4 -4
  165. package/src/{components/__tests__ → __tests__/components}/SafeSpan.integration.test.tsx +2 -2
  166. package/src/{components/__tests__ → __tests__/components}/SafeSpan.simple.test.tsx +1 -1
  167. package/src/{components/__tests__ → __tests__/components}/SafeSpan.test.tsx +1 -1
  168. package/src/{components/__tests__ → __tests__/components}/Section.integration.test.tsx +1 -1
  169. package/src/{components/__tests__ → __tests__/components}/Section.test.tsx +1 -1
  170. package/src/{components/__tests__ → __tests__/components}/SelectInputField.test.tsx +1 -1
  171. package/src/{components/__tests__ → __tests__/components}/TextInputField.test.tsx +3 -3
  172. package/src/{components/__tests__ → __tests__/components}/ThemeSwitcher.test.tsx +3 -3
  173. package/src/__tests__/components/base/ModelView.test.tsx +220 -0
  174. package/src/__tests__/components/blocks/Code.performance.test.tsx +625 -0
  175. package/src/__tests__/components/blocks/Code.serialization.test.tsx +507 -0
  176. package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +414 -0
  177. package/src/__tests__/components/blocks/Image.serialization.test.tsx +257 -0
  178. package/src/__tests__/components/blocks/Section.serialization.test.tsx +553 -0
  179. package/src/__tests__/components/blocks/Text.performance.test.tsx +442 -0
  180. package/src/__tests__/components/blocks/Text.serialization.test.tsx +491 -0
  181. package/src/__tests__/components/buttons/Button.serialization.test.tsx +443 -0
  182. package/src/__tests__/components/input/FormComponents.serialization.test.tsx +482 -0
  183. package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +439 -0
  184. package/src/__tests__/components/input/TextInputField.serialization.test.tsx +359 -0
  185. package/src/{components/layout/CollapsibleLayout/__tests__ → __tests__/components/layout}/CollapsibleLayout.test.tsx +4 -4
  186. package/src/__tests__/components/layout/GridCell.serialization.test.tsx +403 -0
  187. package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +311 -0
  188. package/src/__tests__/hooks/usePrintMode.test.ts +89 -0
  189. package/src/__tests__/schemas/PageTemplateSchema.test.ts +161 -0
  190. package/src/__tests__/schemas/PrintConfigSchema.test.ts +127 -0
  191. package/src/__tests__/schemas/ViewModelSchema.test.ts +80 -0
  192. package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +602 -0
  193. package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +301 -0
  194. package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +521 -0
  195. package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +586 -0
  196. package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +103 -0
  197. package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +1165 -0
  198. package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +602 -0
  199. package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +691 -0
  200. package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +460 -0
  201. package/src/__tests__/schemas/transformers/TestAutomation.test.ts +597 -0
  202. package/src/{utils/__tests__ → __tests__/utils}/nested-dom-fix.test.tsx +1 -1
  203. package/src/components/ErrorBoundary.tsx +8 -8
  204. package/src/components/Html.tsx +147 -44
  205. package/src/components/Logo.tsx +198 -100
  206. package/src/components/Markdown.tsx +125 -16
  207. package/src/components/QwickApp.tsx +64 -31
  208. package/src/components/QwickIcon.tsx +59 -0
  209. package/src/components/SafeSpan.tsx +65 -10
  210. package/src/components/Scaffold.tsx +2 -8
  211. package/src/components/base/ModelView.tsx +199 -0
  212. package/src/components/base/index.ts +11 -0
  213. package/src/components/blocks/Article.tsx +57 -18
  214. package/src/components/blocks/Code.md +529 -0
  215. package/src/components/blocks/Code.tsx +102 -15
  216. package/src/components/blocks/CoverImageHeader.tsx +9 -4
  217. package/src/components/blocks/FeatureCard.tsx +1 -2
  218. package/src/components/blocks/FeatureGrid.tsx +19 -1
  219. package/src/components/blocks/Footer.tsx +13 -1
  220. package/src/components/blocks/HeroBlock.tsx +87 -20
  221. package/src/components/blocks/Image.tsx +395 -0
  222. package/src/components/blocks/PageBannerHeader.tsx +14 -12
  223. package/src/components/blocks/ProductCard.tsx +1 -1
  224. package/src/components/blocks/Section.tsx +113 -8
  225. package/src/components/blocks/Text.tsx +285 -0
  226. package/src/components/blocks/index.ts +4 -0
  227. package/src/components/buttons/Button.tsx +184 -15
  228. package/src/components/forms/FormBlock.tsx +70 -17
  229. package/src/components/index.ts +5 -0
  230. package/src/components/input/ChoiceInputField.tsx +48 -18
  231. package/src/components/input/HtmlInputField.tsx +48 -18
  232. package/src/components/input/SelectInputField.tsx +48 -16
  233. package/src/components/input/SwitchInputField.tsx +48 -17
  234. package/src/components/input/TextField.tsx +41 -1
  235. package/src/components/input/TextInputField.tsx +52 -18
  236. package/src/components/layout/GridCell.tsx +118 -9
  237. package/src/components/layout/GridLayout.tsx +125 -24
  238. package/src/components/pages/FormPage.tsx +0 -1
  239. package/src/components/pages/Page.css +304 -332
  240. package/src/components/pages/Page.tsx +307 -255
  241. package/src/components/pages/index.ts +2 -2
  242. package/src/config/AppConfig.ts +133 -0
  243. package/src/config/AppConfigBuilder.ts +421 -0
  244. package/src/config/__tests__/AppConfig.test.ts +385 -0
  245. package/src/config/__tests__/AppConfigBuilder.test.ts +432 -0
  246. package/src/config/index.ts +24 -0
  247. package/src/config/types.ts +170 -0
  248. package/src/config.ts +25 -0
  249. package/src/contexts/PrintModeContext.tsx +332 -0
  250. package/src/contexts/QwickAppContext.tsx +2 -2
  251. package/src/contexts/index.ts +2 -0
  252. package/src/hooks/index.ts +5 -1
  253. package/src/hooks/usePrintMode.ts +73 -0
  254. package/src/index.ts +3 -0
  255. package/src/schemas/CodeSchema.ts +3 -3
  256. package/src/schemas/CollapsibleLayoutSchema.ts +2 -1
  257. package/src/schemas/ContentSchema.ts +2 -1
  258. package/src/schemas/GridCellSchema.ts +164 -0
  259. package/src/schemas/GridLayoutSchema.ts +133 -0
  260. package/src/schemas/HtmlSchema.ts +47 -0
  261. package/src/schemas/ImageSchema.ts +235 -0
  262. package/src/schemas/LogoSchema.ts +241 -0
  263. package/src/schemas/MarkdownSchema.ts +47 -0
  264. package/src/schemas/PageTemplateSchema.ts +186 -0
  265. package/src/schemas/PrintConfigSchema.ts +207 -0
  266. package/src/schemas/README.md +661 -0
  267. package/src/schemas/SectionSchema.ts +2 -1
  268. package/src/schemas/TextSchema.ts +329 -0
  269. package/src/schemas/ViewModelSchema.ts +115 -0
  270. package/src/schemas/index.ts +21 -2
  271. package/src/schemas/transformers/ComponentTransformer.ts +403 -0
  272. package/src/schemas/transformers/ReactNodeTransformer.ts +236 -0
  273. package/src/schemas/transformers/registry.ts +72 -0
  274. package/src/schemas/types/Serializable.ts +51 -0
  275. package/src/stories/AccessibilityProvider.stories.tsx +253 -253
  276. package/src/stories/Article.stories.tsx +433 -433
  277. package/src/stories/Button.stories.tsx +1 -1
  278. package/src/stories/CardListGrid.stories.tsx +451 -451
  279. package/src/stories/ChoiceInputField.stories.tsx +503 -503
  280. package/src/stories/Code.stories.tsx +1 -1
  281. package/src/stories/CollapsibleLayout.stories.tsx +1414 -1414
  282. package/src/stories/Content.stories.tsx +393 -393
  283. package/src/stories/CoverImageHeader.stories.tsx +701 -701
  284. package/src/stories/DataBinding.advanced.stories.tsx +432 -432
  285. package/src/stories/DataProvider.stories.tsx +1192 -1192
  286. package/src/stories/FeatureCard.stories.tsx +557 -557
  287. package/src/stories/FeatureGrid.stories.tsx +594 -594
  288. package/src/stories/Footer.stories.tsx +640 -640
  289. package/src/stories/FormBlock.stories.tsx +760 -760
  290. package/src/stories/FormComponents.stories.tsx +349 -541
  291. package/src/stories/GridCell.stories.tsx +417 -0
  292. package/src/stories/GridLayout.stories.tsx +353 -0
  293. package/src/stories/HeroBlock.stories.tsx +862 -373
  294. package/src/stories/HtmlInputField.stories.tsx +474 -474
  295. package/src/stories/Image.stories.tsx +819 -0
  296. package/src/stories/Introduction.stories.tsx +667 -667
  297. package/src/stories/LayoutBlocks.stories.tsx +324 -324
  298. package/src/stories/Logo.stories.tsx +165 -6
  299. package/src/stories/Markdown.stories.tsx +137 -137
  300. package/src/stories/ModelView.stories.tsx +477 -0
  301. package/src/stories/Page.stories.tsx +688 -688
  302. package/src/stories/PageBannerHeader.stories.tsx +864 -864
  303. package/src/stories/PaletteSwitcher.stories.tsx +119 -119
  304. package/src/stories/ProductCard.stories.tsx +424 -424
  305. package/src/stories/QwickApp.stories.tsx +368 -368
  306. package/src/stories/ResponsiveMenu.stories.tsx +249 -249
  307. package/src/stories/SafeSpan.stories.tsx +531 -531
  308. package/src/stories/Section.stories.tsx +90 -2
  309. package/src/stories/SelectInputField.stories.tsx +524 -524
  310. package/src/stories/Text.stories.tsx +560 -0
  311. package/src/stories/TextInputField.stories.tsx +443 -443
  312. package/src/stories/ThemeSwitcher.stories.tsx +123 -123
  313. package/src/utils/htmlTransform.tsx +74 -53
  314. package/src/utils/reactUtils.tsx +57 -6
  315. package/dist/index.bundled.css +0 -12
  316. /package/src/{hooks/__tests__ → __tests__/hooks}/useDataBinding.test.tsx.disabled +0 -0
  317. /package/src/{schemas/__tests__ → __tests__/schemas}/builders.test.ts +0 -0
  318. /package/src/{utils/__tests__ → __tests__/utils}/createDataDrivenComponent.test.tsx.disabled +0 -0
  319. /package/src/{utils/__tests__ → __tests__/utils}/htmlTransform.test.tsx +0 -0
  320. /package/src/{utils/__tests__ → __tests__/utils}/optional-logging.test.ts +0 -0
@@ -14,14 +14,16 @@ const meta = {
14
14
  layout: 'centered',
15
15
  docs: {
16
16
  description: {
17
- component: `Logo component provides flexible brand identity display with dynamic theming and customization options.
17
+ component: `Logo component provides flexible brand identity display with dynamic theming, image support, and customization options.
18
18
 
19
19
  **Key Features:**
20
20
  - **Theme Integration**: Automatically adapts colors based on current theme and variant
21
21
  - **Multiple Sizes**: Five size variants from tiny to extra-large with consistent scaling
22
22
  - **Badge System**: Optional badges with customizable shapes, positions, and offsets
23
+ - **Image Support**: Optional images with flexible positioning (start, end, top, bottom)
23
24
  - **Text Formatting**: Supports line breaks (\\n) and explicit spaces (\\s) for multi-line logos
24
25
  - **Variant Support**: Multiple visual variants including high-contrast and monochrome options
26
+ - **Schema-based**: Uses LogoSchema for consistent data binding and validation
25
27
  - **Animation Ready**: Built-in support for CSS animations and transitions
26
28
  - **Responsive Design**: Scales appropriately across different screen sizes
27
29
 
@@ -53,7 +55,7 @@ const meta = {
53
55
  },
54
56
  badge: {
55
57
  control: 'select',
56
- options: ['none', 'top-left', 'top-center', 'top-right', 'center-left', 'center', 'center-right', 'bottom-left', 'bottom-center', 'bottom-right'],
58
+ options: ['none', 'top-left', 'top-center', 'top-right', 'start', 'center', 'end', 'bottom-left', 'bottom-center', 'bottom-right'],
57
59
  description: 'Badge position and visibility',
58
60
  },
59
61
  badgeShape: {
@@ -81,6 +83,15 @@ const meta = {
81
83
  control: 'text',
82
84
  description: 'CSS class name for the second part of the logo text',
83
85
  },
86
+ image: {
87
+ control: 'text',
88
+ description: 'Optional image to display alongside the logo text (image path or React component)',
89
+ },
90
+ imagePosition: {
91
+ control: 'select',
92
+ options: ['none', 'top-left', 'top-center', 'top-right', 'start', 'center', 'end', 'bottom-left', 'bottom-center', 'bottom-right'],
93
+ description: 'Position of the image relative to the logo text',
94
+ },
84
95
  onClick: {
85
96
  description: 'Click handler for the logo',
86
97
  },
@@ -218,16 +229,16 @@ export const BadgePositioning: Story = {
218
229
  <p>Top Right</p>
219
230
  </div>
220
231
  <div style={{ textAlign: 'center' }}>
221
- <Logo name="CL" size="large" badge="center-left" />
222
- <p>Center Left</p>
232
+ <Logo name="ST" size="large" badge="start" />
233
+ <p>Start (Left)</p>
223
234
  </div>
224
235
  <div style={{ textAlign: 'center' }}>
225
236
  <Logo name="C" size="large" badge="center" />
226
237
  <p>Center</p>
227
238
  </div>
228
239
  <div style={{ textAlign: 'center' }}>
229
- <Logo name="CR" size="large" badge="center-right" />
230
- <p>Center Right</p>
240
+ <Logo name="EN" size="large" badge="end" />
241
+ <p>End (Right)</p>
231
242
  </div>
232
243
  <div style={{ textAlign: 'center' }}>
233
244
  <Logo name="BL" size="large" badge="bottom-left" />
@@ -398,3 +409,151 @@ export const BadgePositionScaling: Story = {
398
409
  },
399
410
  },
400
411
  };
412
+
413
+ // Image Support Examples
414
+ export const WithImageSupport: Story = {
415
+ render: () => (
416
+ <div style={{ display: 'flex', gap: '30px', flexWrap: 'wrap', alignItems: 'center' }}>
417
+ <div style={{ textAlign: 'center' }}>
418
+ <Logo name="Qwick Apps" size="medium" />
419
+ <p>Text Only</p>
420
+ </div>
421
+ <div style={{ textAlign: 'center' }}>
422
+ <Logo
423
+ name="Qwick Apps"
424
+ size="medium"
425
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='12' fill='%23007bff'/><text x='16' y='20' text-anchor='middle' fill='white' font-size='14' font-weight='bold'>Q</text></svg>"
426
+ imagePosition="start"
427
+ />
428
+ <p>With Image (Start)</p>
429
+ </div>
430
+ <div style={{ textAlign: 'center' }}>
431
+ <Logo
432
+ name="Qwick Apps"
433
+ size="medium"
434
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='12' fill='%2316a34a'/><text x='16' y='20' text-anchor='middle' fill='white' font-size='14' font-weight='bold'>A</text></svg>"
435
+ imagePosition="end"
436
+ />
437
+ <p>With Image (End)</p>
438
+ </div>
439
+ <div style={{ textAlign: 'center' }}>
440
+ <Logo
441
+ name="Qwick Apps"
442
+ size="medium"
443
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='12' fill='%23dc2626'/><text x='16' y='20' text-anchor='middle' fill='white' font-size='14' font-weight='bold'>T</text></svg>"
444
+ imagePosition="top-center"
445
+ />
446
+ <p>With Image (Top)</p>
447
+ </div>
448
+ </div>
449
+ ),
450
+ parameters: {
451
+ docs: {
452
+ description: {
453
+ story: 'Examples of Logo component with image support showing different positioning options.',
454
+ },
455
+ },
456
+ },
457
+ };
458
+
459
+ // Image Position Comparison
460
+ export const ImagePositionComparison: Story = {
461
+ render: () => (
462
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: '20px', alignItems: 'center', maxWidth: '600px' }}>
463
+ <div style={{ textAlign: 'center' }}>
464
+ <Logo
465
+ name="Start"
466
+ size="large"
467
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><rect x='4' y='4' width='24' height='24' fill='%23007bff' rx='4'/></svg>"
468
+ imagePosition="start"
469
+ />
470
+ <p>Start Position</p>
471
+ </div>
472
+ <div style={{ textAlign: 'center' }}>
473
+ <Logo
474
+ name="End"
475
+ size="large"
476
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><rect x='4' y='4' width='24' height='24' fill='%2316a34a' rx='4'/></svg>"
477
+ imagePosition="end"
478
+ />
479
+ <p>End Position</p>
480
+ </div>
481
+ <div style={{ textAlign: 'center' }}>
482
+ <Logo
483
+ name="Top"
484
+ size="large"
485
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><rect x='4' y='4' width='24' height='24' fill='%23dc2626' rx='4'/></svg>"
486
+ imagePosition="top-center"
487
+ />
488
+ <p>Top Center</p>
489
+ </div>
490
+ <div style={{ textAlign: 'center' }}>
491
+ <Logo
492
+ name="Bottom"
493
+ size="large"
494
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><rect x='4' y='4' width='24' height='24' fill='%23f59e0b' rx='4'/></svg>"
495
+ imagePosition="bottom-center"
496
+ />
497
+ <p>Bottom Center</p>
498
+ </div>
499
+ </div>
500
+ ),
501
+ parameters: {
502
+ docs: {
503
+ description: {
504
+ story: 'Comparison of different image positioning options relative to the logo text.',
505
+ },
506
+ },
507
+ },
508
+ };
509
+
510
+ // Image with Different Sizes
511
+ export const ImageScaling: Story = {
512
+ render: () => (
513
+ <div style={{ display: 'flex', gap: '30px', flexWrap: 'wrap', alignItems: 'center' }}>
514
+ <div style={{ textAlign: 'center' }}>
515
+ <Logo
516
+ name="Tiny Logo"
517
+ size="tiny"
518
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='12' fill='%23007bff'/></svg>"
519
+ imagePosition="start"
520
+ />
521
+ <p>Tiny Size</p>
522
+ </div>
523
+ <div style={{ textAlign: 'center' }}>
524
+ <Logo
525
+ name="Small Logo"
526
+ size="small"
527
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='12' fill='%23007bff'/></svg>"
528
+ imagePosition="start"
529
+ />
530
+ <p>Small Size</p>
531
+ </div>
532
+ <div style={{ textAlign: 'center' }}>
533
+ <Logo
534
+ name="Medium Logo"
535
+ size="medium"
536
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='12' fill='%23007bff'/></svg>"
537
+ imagePosition="start"
538
+ />
539
+ <p>Medium Size</p>
540
+ </div>
541
+ <div style={{ textAlign: 'center' }}>
542
+ <Logo
543
+ name="Large Logo"
544
+ size="large"
545
+ image="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='12' fill='%23007bff'/></svg>"
546
+ imagePosition="start"
547
+ />
548
+ <p>Large Size</p>
549
+ </div>
550
+ </div>
551
+ ),
552
+ parameters: {
553
+ docs: {
554
+ description: {
555
+ story: 'Demonstrates how images scale proportionally with logo text size.',
556
+ },
557
+ },
558
+ },
559
+ };
@@ -8,43 +8,43 @@ import type { Meta, StoryObj } from '@storybook/react';
8
8
  import { Markdown } from '../components/Markdown';
9
9
 
10
10
  const meta: Meta<typeof Markdown> = {
11
- title: 'Components/Markdown',
12
- component: Markdown,
13
- parameters: {
14
- layout: 'centered',
15
- docs: {
16
- description: {
17
- component: 'The Markdown component converts Markdown strings to React components via Html transformation. Supports GitHub Flavored Markdown with Framework component integration for code blocks, buttons, and more.',
18
- },
19
- },
20
- },
21
- tags: ['autodocs'],
22
- argTypes: {
23
- children: {
24
- control: 'text',
25
- description: 'Markdown content as string',
26
- },
27
- sanitize: {
28
- control: 'boolean',
29
- description: 'Whether to sanitize HTML output',
30
- },
31
- placeholder: {
32
- control: 'text',
33
- description: 'Fallback content when Markdown is empty',
34
- },
35
- component: {
36
- control: 'text',
37
- description: 'Container element type',
38
- },
39
- },
11
+ title: 'Components/Markdown',
12
+ component: Markdown,
13
+ parameters: {
14
+ layout: 'centered',
15
+ docs: {
16
+ description: {
17
+ component: 'The Markdown component converts Markdown strings to React components via Html transformation. Supports GitHub Flavored Markdown with Framework component integration for code blocks, buttons, and more.',
18
+ },
19
+ },
20
+ },
21
+ tags: ['autodocs'],
22
+ argTypes: {
23
+ children: {
24
+ control: 'text',
25
+ description: 'Markdown content as string',
26
+ },
27
+ sanitize: {
28
+ control: 'boolean',
29
+ description: 'Whether to sanitize HTML output',
30
+ },
31
+ placeholder: {
32
+ control: 'text',
33
+ description: 'Fallback content when Markdown is empty',
34
+ },
35
+ component: {
36
+ control: 'text',
37
+ description: 'Container element type',
38
+ },
39
+ },
40
40
  };
41
41
 
42
42
  export default meta;
43
43
  type Story = StoryObj<typeof Markdown>;
44
44
 
45
45
  export const BasicMarkdown: Story = {
46
- args: {
47
- children: `# Welcome to QwickApps React Framework
46
+ args: {
47
+ children: `# Welcome to QwickApps React Framework
48
48
 
49
49
  This is a **basic example** of Markdown content being rendered with the Markdown component.
50
50
 
@@ -58,19 +58,19 @@ This is a **basic example** of Markdown content being rendered with the Markdown
58
58
  ### Getting Started
59
59
 
60
60
  Just wrap your Markdown content in the \`<Markdown>\` component and you're ready to go!`,
61
- },
62
- parameters: {
63
- docs: {
64
- description: {
65
- story: 'Basic Markdown content with headings, emphasis, links, and lists. All content gets Framework styling automatically.',
66
- },
67
- },
68
- },
61
+ },
62
+ parameters: {
63
+ docs: {
64
+ description: {
65
+ story: 'Basic Markdown content with headings, emphasis, links, and lists. All content gets Framework styling automatically.',
66
+ },
67
+ },
68
+ },
69
69
  };
70
70
 
71
71
  export const CodeExamples: Story = {
72
- args: {
73
- children: `# Code Examples
72
+ args: {
73
+ children: `# Code Examples
74
74
 
75
75
  The Markdown component automatically transforms code blocks into the Framework Code component.
76
76
 
@@ -78,13 +78,13 @@ The Markdown component automatically transforms code blocks into the Framework C
78
78
 
79
79
  \`\`\`javascript
80
80
  function createApp(options) {
81
- return {
82
- name: options.appName,
83
- version: '1.0.0',
84
- start() {
85
- console.log(\`Starting \${this.name}...\`);
86
- }
87
- };
81
+ return {
82
+ name: options.appName,
83
+ version: '1.0.0',
84
+ start() {
85
+ console.log(\`Starting \${this.name}...\`);
86
+ }
87
+ };
88
88
  }
89
89
 
90
90
  const app = createApp({ appName: 'My QwickApp' });
@@ -95,16 +95,16 @@ app.start();
95
95
 
96
96
  \`\`\`typescript
97
97
  interface AppConfig {
98
- name: string;
99
- version: string;
100
- features: string[];
101
- debug?: boolean;
98
+ name: string;
99
+ version: string;
100
+ features: string[];
101
+ debug?: boolean;
102
102
  }
103
103
 
104
104
  const config: AppConfig = {
105
- name: 'QwickApp',
106
- version: '2.0.0',
107
- features: ['responsive', 'theming', 'components']
105
+ name: 'QwickApp',
106
+ version: '2.0.0',
107
+ features: ['responsive', 'theming', 'components']
108
108
  };
109
109
  \`\`\`
110
110
 
@@ -118,19 +118,19 @@ You can also use \`inline code\` within paragraphs. The Markdown component prese
118
118
  This is a plain code block without language specification.
119
119
  It still gets the Code component treatment with copy functionality.
120
120
  \`\`\``,
121
- },
122
- parameters: {
123
- docs: {
124
- description: {
125
- story: 'Code blocks in Markdown are automatically transformed into Framework Code components with syntax highlighting and interactive features.',
126
- },
127
- },
128
- },
121
+ },
122
+ parameters: {
123
+ docs: {
124
+ description: {
125
+ story: 'Code blocks in Markdown are automatically transformed into Framework Code components with syntax highlighting and interactive features.',
126
+ },
127
+ },
128
+ },
129
129
  };
130
130
 
131
131
  export const GitHubFlavoredMarkdown: Story = {
132
- args: {
133
- children: `# GitHub Flavored Markdown Support
132
+ args: {
133
+ children: `# GitHub Flavored Markdown Support
134
134
 
135
135
  The Markdown component supports GitHub Flavored Markdown (GFM) features.
136
136
 
@@ -170,19 +170,19 @@ Content above the rule.
170
170
  ---
171
171
 
172
172
  Content below the rule.`,
173
- },
174
- parameters: {
175
- docs: {
176
- description: {
177
- story: 'GitHub Flavored Markdown features like strikethrough, task lists, and tables are fully supported.',
178
- },
179
- },
180
- },
173
+ },
174
+ parameters: {
175
+ docs: {
176
+ description: {
177
+ story: 'GitHub Flavored Markdown features like strikethrough, task lists, and tables are fully supported.',
178
+ },
179
+ },
180
+ },
181
181
  };
182
182
 
183
183
  export const ComplexDocument: Story = {
184
- args: {
185
- children: `# QwickApps React Framework Guide
184
+ args: {
185
+ children: `# QwickApps React Framework Guide
186
186
 
187
187
  Welcome to the comprehensive guide for using the QwickApps React Framework with Markdown content.
188
188
 
@@ -200,11 +200,11 @@ Getting started with QwickApps is easy:
200
200
  import { Markdown } from '@qwickapps/react-framework';
201
201
 
202
202
  function DocumentPage({ content }: { content: string }) {
203
- return (
204
- <div>
205
- <Markdown>{content}</Markdown>
206
- </div>
207
- );
203
+ return (
204
+ <div>
205
+ <Markdown>{content}</Markdown>
206
+ </div>
207
+ );
208
208
  }
209
209
  \`\`\`
210
210
 
@@ -216,13 +216,13 @@ The framework automatically highlights code in various languages:
216
216
 
217
217
  \`\`\`python
218
218
  def fibonacci(n):
219
- if n <= 1:
220
- return n
221
- return fibonacci(n-1) + fibonacci(n-2)
219
+ if n <= 1:
220
+ return n
221
+ return fibonacci(n-1) + fibonacci(n-2)
222
222
 
223
223
  # Generate first 10 Fibonacci numbers
224
224
  for i in range(10):
225
- print(f"F({i}) = {fibonacci(i)}")
225
+ print(f"F({i}) = {fibonacci(i)}")
226
226
  \`\`\`
227
227
 
228
228
  ### Interactive Elements
@@ -232,10 +232,10 @@ for i in range(10):
232
232
  ### Lists and Organization
233
233
 
234
234
  **Key Benefits:**
235
- - 🚀 **Performance**: Optimized rendering pipeline
236
- - 🎨 **Theming**: Automatic theme integration
237
- - 🔧 **Flexibility**: Configurable transformation rules
238
- - 📱 **Responsive**: Mobile-first design approach
235
+ - **Performance**: Optimized rendering pipeline
236
+ - **Theming**: Automatic theme integration
237
+ - **Flexibility**: Configurable transformation rules
238
+ - **Responsive**: Mobile-first design approach
239
239
  - ♿ **Accessibility**: WCAG compliant components
240
240
 
241
241
  **Supported Content Types:**
@@ -264,34 +264,34 @@ The QwickApps React Framework Markdown component provides a powerful way to rend
264
264
 
265
265
  ---
266
266
 
267
- *Happy coding with QwickApps! 🎉*`,
268
- },
269
- parameters: {
270
- docs: {
271
- description: {
272
- story: 'A comprehensive document demonstrating various Markdown features working together in a real-world scenario.',
273
- },
274
- },
275
- },
267
+ *Happy coding with QwickApps! *`,
268
+ },
269
+ parameters: {
270
+ docs: {
271
+ description: {
272
+ story: 'A comprehensive document demonstrating various Markdown features working together in a real-world scenario.',
273
+ },
274
+ },
275
+ },
276
276
  };
277
277
 
278
278
  export const EmptyContent: Story = {
279
- args: {
280
- children: '',
281
- placeholder: 'No documentation available yet. Check back later!',
282
- },
283
- parameters: {
284
- docs: {
285
- description: {
286
- story: 'When no Markdown content is provided, a placeholder message can be displayed with appropriate styling.',
287
- },
288
- },
289
- },
279
+ args: {
280
+ children: '',
281
+ placeholder: 'No documentation available yet. Check back later!',
282
+ },
283
+ parameters: {
284
+ docs: {
285
+ description: {
286
+ story: 'When no Markdown content is provided, a placeholder message can be displayed with appropriate styling.',
287
+ },
288
+ },
289
+ },
290
290
  };
291
291
 
292
292
  export const CustomConfiguration: Story = {
293
- args: {
294
- children: `# Custom Configuration
293
+ args: {
294
+ children: `# Custom Configuration
295
295
 
296
296
  This example shows Markdown with custom marked options.
297
297
 
@@ -299,32 +299,32 @@ Line 1
299
299
  Line 2
300
300
 
301
301
  The breaks option can convert single line breaks to \`<br>\` tags.`,
302
- markedOptions: {
303
- breaks: true,
304
- },
305
- },
306
- parameters: {
307
- docs: {
308
- description: {
309
- story: 'The Markdown component accepts custom marked.js options for fine-tuning the parsing behavior.',
310
- },
311
- },
312
- },
302
+ markedOptions: {
303
+ breaks: true,
304
+ },
305
+ },
306
+ parameters: {
307
+ docs: {
308
+ description: {
309
+ story: 'The Markdown component accepts custom marked.js options for fine-tuning the parsing behavior.',
310
+ },
311
+ },
312
+ },
313
313
  };
314
314
 
315
315
  export const MixedContent: Story = {
316
- args: {
317
- children: `# Mixed HTML and Markdown
316
+ args: {
317
+ children: `# Mixed HTML and Markdown
318
318
 
319
319
  You can mix HTML with Markdown when needed:
320
320
 
321
321
  <div style="padding: 16px; border: 1px solid #ccc; border-radius: 8px; background: #f9f9f9;">
322
- This is **HTML with Markdown** inside it!
323
-
324
- \`\`\`javascript
325
- const mixed = 'HTML and Markdown';
326
- console.log(\`Working with \${mixed}\`);
327
- \`\`\`
322
+ This is **HTML with Markdown** inside it!
323
+
324
+ \`\`\`javascript
325
+ const mixed = 'HTML and Markdown';
326
+ console.log(\`Working with \${mixed}\`);
327
+ \`\`\`
328
328
  </div>
329
329
 
330
330
  Back to regular **Markdown content** here.
@@ -338,12 +338,12 @@ Back to regular **Markdown content** here.
338
338
  | HTML Only | Complete control | Verbose syntax |
339
339
 
340
340
  Choose the approach that best fits your content needs!`,
341
- },
342
- parameters: {
343
- docs: {
344
- description: {
345
- story: 'Markdown content can include HTML elements when additional structure or styling is needed.',
346
- },
347
- },
348
- },
341
+ },
342
+ parameters: {
343
+ docs: {
344
+ description: {
345
+ story: 'Markdown content can include HTML elements when additional structure or styling is needed.',
346
+ },
347
+ },
348
+ },
349
349
  };