@qwickapps/react-framework 1.3.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.
- package/LICENSE +44 -0
- package/README.md +794 -0
- package/dist/components/AccessibilityChecker.d.ts +12 -0
- package/dist/components/AccessibilityChecker.d.ts.map +1 -0
- package/dist/components/Html.d.ts +48 -0
- package/dist/components/Html.d.ts.map +1 -0
- package/dist/components/Logo.d.ts +79 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/Markdown.d.ts +47 -0
- package/dist/components/Markdown.d.ts.map +1 -0
- package/dist/components/QwickApp.d.ts +56 -0
- package/dist/components/QwickApp.d.ts.map +1 -0
- package/dist/components/QwickAppsLogo.d.ts +25 -0
- package/dist/components/QwickAppsLogo.d.ts.map +1 -0
- package/dist/components/ResponsiveMenu.d.ts +38 -0
- package/dist/components/ResponsiveMenu.d.ts.map +1 -0
- package/dist/components/SafeSpan.d.ts +23 -0
- package/dist/components/SafeSpan.d.ts.map +1 -0
- package/dist/components/Scaffold.d.ts +57 -0
- package/dist/components/Scaffold.d.ts.map +1 -0
- package/dist/components/blocks/Article.d.ts +23 -0
- package/dist/components/blocks/Article.d.ts.map +1 -0
- package/dist/components/blocks/CardListGrid.d.ts +23 -0
- package/dist/components/blocks/CardListGrid.d.ts.map +1 -0
- package/dist/components/blocks/Code.d.ts +21 -0
- package/dist/components/blocks/Code.d.ts.map +1 -0
- package/dist/components/blocks/Content.d.ts +24 -0
- package/dist/components/blocks/Content.d.ts.map +1 -0
- package/dist/components/blocks/CoverImageHeader.d.ts +44 -0
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -0
- package/dist/components/blocks/FeatureCard.d.ts +66 -0
- package/dist/components/blocks/FeatureCard.d.ts.map +1 -0
- package/dist/components/blocks/FeatureGrid.d.ts +48 -0
- package/dist/components/blocks/FeatureGrid.d.ts.map +1 -0
- package/dist/components/blocks/Footer.d.ts +56 -0
- package/dist/components/blocks/Footer.d.ts.map +1 -0
- package/dist/components/blocks/HeroBlock.d.ts +33 -0
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -0
- package/dist/components/blocks/PageBannerHeader.d.ts +30 -0
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -0
- package/dist/components/blocks/ProductCard.d.ts +57 -0
- package/dist/components/blocks/ProductCard.d.ts.map +1 -0
- package/dist/components/blocks/Section.d.ts +40 -0
- package/dist/components/blocks/Section.d.ts.map +1 -0
- package/dist/components/blocks/index.d.ts +37 -0
- package/dist/components/blocks/index.d.ts.map +1 -0
- package/dist/components/buttons/Button.d.ts +38 -0
- package/dist/components/buttons/Button.d.ts.map +1 -0
- package/dist/components/buttons/PaletteSwitcher.d.ts +24 -0
- package/dist/components/buttons/PaletteSwitcher.d.ts.map +1 -0
- package/dist/components/buttons/ThemeSwitcher.d.ts +24 -0
- package/dist/components/buttons/ThemeSwitcher.d.ts.map +1 -0
- package/dist/components/buttons/index.d.ts +11 -0
- package/dist/components/buttons/index.d.ts.map +1 -0
- package/dist/components/forms/FormBlock.d.ts +45 -0
- package/dist/components/forms/FormBlock.d.ts.map +1 -0
- package/dist/components/forms/index.d.ts +8 -0
- package/dist/components/forms/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/ChoiceInputField.d.ts +30 -0
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -0
- package/dist/components/input/HtmlInputField.d.ts +29 -0
- package/dist/components/input/HtmlInputField.d.ts.map +1 -0
- package/dist/components/input/SelectInputField.d.ts +29 -0
- package/dist/components/input/SelectInputField.d.ts.map +1 -0
- package/dist/components/input/TextField.d.ts +18 -0
- package/dist/components/input/TextField.d.ts.map +1 -0
- package/dist/components/input/TextInputField.d.ts +32 -0
- package/dist/components/input/TextInputField.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +17 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/layout/GridCell.d.ts +16 -0
- package/dist/components/layout/GridCell.d.ts.map +1 -0
- package/dist/components/layout/GridCellWrapper.d.ts +46 -0
- package/dist/components/layout/GridCellWrapper.d.ts.map +1 -0
- package/dist/components/layout/GridLayout.d.ts +38 -0
- package/dist/components/layout/GridLayout.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +12 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/menu/Menu.d.ts +1 -0
- package/dist/components/menu/Menu.d.ts.map +1 -0
- package/dist/components/menu/MenuItem.d.ts +31 -0
- package/dist/components/menu/MenuItem.d.ts.map +1 -0
- package/dist/components/menu/index.d.ts +7 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/pages/FormPage.d.ts +66 -0
- package/dist/components/pages/FormPage.d.ts.map +1 -0
- package/dist/components/pages/Page.d.ts +124 -0
- package/dist/components/pages/Page.d.ts.map +1 -0
- package/dist/components/pages/index.d.ts +11 -0
- package/dist/components/pages/index.d.ts.map +1 -0
- package/dist/contexts/DataContext.d.ts +139 -0
- package/dist/contexts/DataContext.d.ts.map +1 -0
- package/dist/contexts/DimensionsContext.d.ts +42 -0
- package/dist/contexts/DimensionsContext.d.ts.map +1 -0
- package/dist/contexts/PaletteContext.d.ts +53 -0
- package/dist/contexts/PaletteContext.d.ts.map +1 -0
- package/dist/contexts/QwickAppContext.d.ts +71 -0
- package/dist/contexts/QwickAppContext.d.ts.map +1 -0
- package/dist/contexts/ThemeContext.d.ts +65 -0
- package/dist/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/contexts/index.d.ts +9 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useBaseProps.d.ts +101 -0
- package/dist/hooks/useBaseProps.d.ts.map +1 -0
- package/dist/hooks/useDataBinding.d.ts +22 -0
- package/dist/hooks/useDataBinding.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.css +1 -0
- package/dist/index.esm.js +24143 -0
- package/dist/index.js +24245 -0
- package/dist/palettes/PaletteAutumn.d.ts +10 -0
- package/dist/palettes/PaletteAutumn.d.ts.map +1 -0
- package/dist/palettes/PaletteCosmic.d.ts +10 -0
- package/dist/palettes/PaletteCosmic.d.ts.map +1 -0
- package/dist/palettes/PaletteDefault.d.ts +10 -0
- package/dist/palettes/PaletteDefault.d.ts.map +1 -0
- package/dist/palettes/PaletteOcean.d.ts +10 -0
- package/dist/palettes/PaletteOcean.d.ts.map +1 -0
- package/dist/palettes/PaletteSpring.d.ts +10 -0
- package/dist/palettes/PaletteSpring.d.ts.map +1 -0
- package/dist/palettes/PaletteWinter.d.ts +10 -0
- package/dist/palettes/PaletteWinter.d.ts.map +1 -0
- package/dist/palettes/index.d.ts +13 -0
- package/dist/palettes/index.d.ts.map +1 -0
- package/dist/schemas/ActionSchema.d.ts +21 -0
- package/dist/schemas/ActionSchema.d.ts.map +1 -0
- package/dist/schemas/ArticleSchema.d.ts +13 -0
- package/dist/schemas/ArticleSchema.d.ts.map +1 -0
- package/dist/schemas/Builders.d.ts +7 -0
- package/dist/schemas/Builders.d.ts.map +1 -0
- package/dist/schemas/ButtonSchema.d.ts +19 -0
- package/dist/schemas/ButtonSchema.d.ts.map +1 -0
- package/dist/schemas/CardListGridSchema.d.ts +17 -0
- package/dist/schemas/CardListGridSchema.d.ts.map +1 -0
- package/dist/schemas/ChoiceInputFieldSchema.d.ts +18 -0
- package/dist/schemas/ChoiceInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/CodeSchema.d.ts +18 -0
- package/dist/schemas/CodeSchema.d.ts.map +1 -0
- package/dist/schemas/ContentSchema.d.ts +20 -0
- package/dist/schemas/ContentSchema.d.ts.map +1 -0
- package/dist/schemas/CoverImageHeaderSchema.d.ts +28 -0
- package/dist/schemas/CoverImageHeaderSchema.d.ts.map +1 -0
- package/dist/schemas/FeatureCardSchema.d.ts +28 -0
- package/dist/schemas/FeatureCardSchema.d.ts.map +1 -0
- package/dist/schemas/FeatureGridSchema.d.ts +17 -0
- package/dist/schemas/FeatureGridSchema.d.ts.map +1 -0
- package/dist/schemas/FeatureItemSchema.d.ts +16 -0
- package/dist/schemas/FeatureItemSchema.d.ts.map +1 -0
- package/dist/schemas/FooterItemSchema.d.ts +15 -0
- package/dist/schemas/FooterItemSchema.d.ts.map +1 -0
- package/dist/schemas/FooterSchema.d.ts +20 -0
- package/dist/schemas/FooterSchema.d.ts.map +1 -0
- package/dist/schemas/FooterSectionSchema.d.ts +15 -0
- package/dist/schemas/FooterSectionSchema.d.ts.map +1 -0
- package/dist/schemas/FormBlockSchema.d.ts +19 -0
- package/dist/schemas/FormBlockSchema.d.ts.map +1 -0
- package/dist/schemas/HeaderActionSchema.d.ts +17 -0
- package/dist/schemas/HeaderActionSchema.d.ts.map +1 -0
- package/dist/schemas/HeroBlockSchema.d.ts +22 -0
- package/dist/schemas/HeroBlockSchema.d.ts.map +1 -0
- package/dist/schemas/HtmlInputFieldSchema.d.ts +18 -0
- package/dist/schemas/HtmlInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/MetadataItemSchema.d.ts +13 -0
- package/dist/schemas/MetadataItemSchema.d.ts.map +1 -0
- package/dist/schemas/PageBannerHeaderSchema.d.ts +28 -0
- package/dist/schemas/PageBannerHeaderSchema.d.ts.map +1 -0
- package/dist/schemas/PaletteSwitcherSchema.d.ts +16 -0
- package/dist/schemas/PaletteSwitcherSchema.d.ts.map +1 -0
- package/dist/schemas/ProductCardSchema.d.ts +39 -0
- package/dist/schemas/ProductCardSchema.d.ts.map +1 -0
- package/dist/schemas/SafeSpanSchema.d.ts +13 -0
- package/dist/schemas/SafeSpanSchema.d.ts.map +1 -0
- package/dist/schemas/SectionSchema.d.ts +17 -0
- package/dist/schemas/SectionSchema.d.ts.map +1 -0
- package/dist/schemas/SelectInputFieldSchema.d.ts +27 -0
- package/dist/schemas/SelectInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/TextInputFieldSchema.d.ts +22 -0
- package/dist/schemas/TextInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/ThemeSwitcherSchema.d.ts +19 -0
- package/dist/schemas/ThemeSwitcherSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +33 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/types.d.ts +7 -0
- package/dist/schemas/types.d.ts.map +1 -0
- package/dist/templates/TemplateResolver.d.ts +52 -0
- package/dist/templates/TemplateResolver.d.ts.map +1 -0
- package/dist/templates/index.d.ts +7 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/tests/ConsoleWarningTest.d.ts +5 -0
- package/dist/tests/ConsoleWarningTest.d.ts.map +1 -0
- package/dist/tests/StorageKeyTest.d.ts +6 -0
- package/dist/tests/StorageKeyTest.d.ts.map +1 -0
- package/dist/tests/ThemeStorageKeyTest.d.ts +6 -0
- package/dist/tests/ThemeStorageKeyTest.d.ts.map +1 -0
- package/dist/types/CacheProvider.d.ts +18 -0
- package/dist/types/CacheProvider.d.ts.map +1 -0
- package/dist/types/ContentProxy.d.ts +47 -0
- package/dist/types/ContentProxy.d.ts.map +1 -0
- package/dist/types/DataBinding.d.ts +7 -0
- package/dist/types/DataBinding.d.ts.map +1 -0
- package/dist/types/DataProvider.d.ts +7 -0
- package/dist/types/DataProvider.d.ts.map +1 -0
- package/dist/types/DataTypes.d.ts +185 -0
- package/dist/types/DataTypes.d.ts.map +1 -0
- package/dist/types/TemplateProvider.d.ts +10 -0
- package/dist/types/TemplateProvider.d.ts.map +1 -0
- package/dist/types/TemplateResolver.d.ts +23 -0
- package/dist/types/TemplateResolver.d.ts.map +1 -0
- package/dist/types/index.d.ts +81 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/breakpoints.d.ts +35 -0
- package/dist/utils/breakpoints.d.ts.map +1 -0
- package/dist/utils/customPaletteManager.d.ts +8 -0
- package/dist/utils/customPaletteManager.d.ts.map +1 -0
- package/dist/utils/dimensions.d.ts +34 -0
- package/dist/utils/dimensions.d.ts.map +1 -0
- package/dist/utils/htmlTransform.d.ts +44 -0
- package/dist/utils/htmlTransform.d.ts.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/paletteUtils.d.ts +38 -0
- package/dist/utils/paletteUtils.d.ts.map +1 -0
- package/dist/utils/persistenceUtils.d.ts +31 -0
- package/dist/utils/persistenceUtils.d.ts.map +1 -0
- package/dist/utils/reactUtils.d.ts +24 -0
- package/dist/utils/reactUtils.d.ts.map +1 -0
- package/dist/utils/spacing.d.ts +34 -0
- package/dist/utils/spacing.d.ts.map +1 -0
- package/dist/utils/themePerformanceMonitor.d.ts +32 -0
- package/dist/utils/themePerformanceMonitor.d.ts.map +1 -0
- package/dist/utils/themeUtils.d.ts +27 -0
- package/dist/utils/themeUtils.d.ts.map +1 -0
- package/package.json +141 -0
- package/src/__tests__/components/Logo.test.js +172 -0
- package/src/__tests__/contexts/DataContext.test.js +505 -0
- package/src/__tests__/contexts/PaletteContext.test.js +115 -0
- package/src/__tests__/contexts/ThemeContext.test.js +123 -0
- package/src/__tests__/utils/paletteUtils.test.js +142 -0
- package/src/__tests__/utils/themeUtils.test.js +142 -0
- package/src/components/AccessibilityChecker.tsx +264 -0
- package/src/components/Html.tsx +191 -0
- package/src/components/Logo.css +217 -0
- package/src/components/Logo.tsx +370 -0
- package/src/components/Markdown.tsx +191 -0
- package/src/components/QwickApp.css +257 -0
- package/src/components/QwickApp.tsx +157 -0
- package/src/components/QwickAppsLogo.tsx +77 -0
- package/src/components/ResponsiveMenu.css +416 -0
- package/src/components/ResponsiveMenu.tsx +310 -0
- package/src/components/SafeSpan.tsx +128 -0
- package/src/components/Scaffold.css +541 -0
- package/src/components/Scaffold.tsx +463 -0
- package/src/components/__tests__/Article.test.tsx +419 -0
- package/src/components/__tests__/Button.test.tsx +702 -0
- package/src/components/__tests__/CardListGrid.test.tsx +478 -0
- package/src/components/__tests__/ChoiceInputField.test.tsx +864 -0
- package/src/components/__tests__/Code.test.tsx +595 -0
- package/src/components/__tests__/Content.integration.test.tsx +193 -0
- package/src/components/__tests__/Content.test.tsx +504 -0
- package/src/components/__tests__/CoverImageHeader.test.tsx +456 -0
- package/src/components/__tests__/FeatureCard.integration.test.tsx +384 -0
- package/src/components/__tests__/FeatureGrid.integration.test.tsx +364 -0
- package/src/components/__tests__/FeatureGrid.test.tsx +494 -0
- package/src/components/__tests__/Footer.test.tsx +544 -0
- package/src/components/__tests__/FormBlock.test.tsx +857 -0
- package/src/components/__tests__/HeroBlock.integration.test.tsx +272 -0
- package/src/components/__tests__/HeroBlock.test.tsx +463 -0
- package/src/components/__tests__/Html.test.tsx +174 -0
- package/src/components/__tests__/HtmlInputField.test.tsx +856 -0
- package/src/components/__tests__/Markdown.test.tsx +233 -0
- package/src/components/__tests__/PageBannerHeader.test.tsx +614 -0
- package/src/components/__tests__/PaletteSwitcher.test.tsx +864 -0
- package/src/components/__tests__/ProductCard.test.tsx +377 -0
- package/src/components/__tests__/SafeSpan.integration.test.tsx +123 -0
- package/src/components/__tests__/SafeSpan.simple.test.tsx +65 -0
- package/src/components/__tests__/SafeSpan.test.tsx +388 -0
- package/src/components/__tests__/Section.integration.test.tsx +288 -0
- package/src/components/__tests__/Section.test.tsx +494 -0
- package/src/components/__tests__/SelectInputField.test.tsx +886 -0
- package/src/components/__tests__/TextInputField.test.tsx +749 -0
- package/src/components/__tests__/ThemeSwitcher.test.tsx +777 -0
- package/src/components/blocks/Article.tsx +194 -0
- package/src/components/blocks/CardListGrid.tsx +132 -0
- package/src/components/blocks/Code.tsx +313 -0
- package/src/components/blocks/Content.tsx +265 -0
- package/src/components/blocks/CoverImageHeader.css +17 -0
- package/src/components/blocks/CoverImageHeader.tsx +435 -0
- package/src/components/blocks/FeatureCard.tsx +321 -0
- package/src/components/blocks/FeatureGrid.tsx +147 -0
- package/src/components/blocks/Footer.tsx +343 -0
- package/src/components/blocks/HeroBlock.tsx +280 -0
- package/src/components/blocks/PageBannerHeader.tsx +471 -0
- package/src/components/blocks/ProductCard.tsx +472 -0
- package/src/components/blocks/Section.tsx +209 -0
- package/src/components/blocks/index.ts +37 -0
- package/src/components/buttons/Button.tsx +233 -0
- package/src/components/buttons/PaletteSwitcher.tsx +268 -0
- package/src/components/buttons/ThemeSwitcher.tsx +283 -0
- package/src/components/buttons/index.ts +11 -0
- package/src/components/forms/FormBlock.tsx +291 -0
- package/src/components/forms/index.ts +7 -0
- package/src/components/index.ts +37 -0
- package/src/components/input/ChoiceInputField.tsx +188 -0
- package/src/components/input/HtmlInputField.tsx +326 -0
- package/src/components/input/SelectInputField.tsx +197 -0
- package/src/components/input/TextField.tsx +47 -0
- package/src/components/input/TextInputField.tsx +144 -0
- package/src/components/input/index.ts +17 -0
- package/src/components/layout/GridCell.tsx +46 -0
- package/src/components/layout/GridCellWrapper.tsx +87 -0
- package/src/components/layout/GridLayout.tsx +169 -0
- package/src/components/layout/index.ts +13 -0
- package/src/components/menu/Menu.tsx +0 -0
- package/src/components/menu/MenuItem.tsx +32 -0
- package/src/components/menu/index.ts +6 -0
- package/src/components/pages/FormPage.tsx +108 -0
- package/src/components/pages/Page.css +460 -0
- package/src/components/pages/Page.tsx +345 -0
- package/src/components/pages/index.ts +11 -0
- package/src/contexts/DataContext.tsx +355 -0
- package/src/contexts/DimensionsContext.tsx +154 -0
- package/src/contexts/PaletteContext.tsx +217 -0
- package/src/contexts/QwickAppContext.tsx +95 -0
- package/src/contexts/ThemeContext.tsx +376 -0
- package/src/contexts/index.ts +9 -0
- package/src/hooks/__tests__/useDataBinding.test.tsx.disabled +229 -0
- package/src/hooks/index.ts +11 -0
- package/src/hooks/useBaseProps.ts +267 -0
- package/src/hooks/useDataBinding.ts +77 -0
- package/src/index.ts +23 -0
- package/src/palettes/PaletteAutumn.css +172 -0
- package/src/palettes/PaletteAutumn.ts +16 -0
- package/src/palettes/PaletteCosmic.css +172 -0
- package/src/palettes/PaletteCosmic.ts +16 -0
- package/src/palettes/PaletteDefault.css +178 -0
- package/src/palettes/PaletteDefault.ts +17 -0
- package/src/palettes/PaletteOcean.css +172 -0
- package/src/palettes/PaletteOcean.ts +16 -0
- package/src/palettes/PaletteSpring.css +160 -0
- package/src/palettes/PaletteSpring.ts +16 -0
- package/src/palettes/PaletteWinter.css +172 -0
- package/src/palettes/PaletteWinter.ts +16 -0
- package/src/palettes/index.css +12 -0
- package/src/palettes/index.ts +29 -0
- package/src/schemas/ActionSchema.ts +140 -0
- package/src/schemas/ArticleSchema.ts +35 -0
- package/src/schemas/ButtonSchema.ts +99 -0
- package/src/schemas/CardListGridSchema.ts +102 -0
- package/src/schemas/ChoiceInputFieldSchema.ts +89 -0
- package/src/schemas/CodeSchema.ts +88 -0
- package/src/schemas/ContentSchema.ts +128 -0
- package/src/schemas/CoverImageHeaderSchema.ts +208 -0
- package/src/schemas/FeatureCardSchema.ts +161 -0
- package/src/schemas/FeatureGridSchema.ts +87 -0
- package/src/schemas/FeatureItemSchema.ts +68 -0
- package/src/schemas/FooterItemSchema.ts +57 -0
- package/src/schemas/FooterSchema.ts +116 -0
- package/src/schemas/FooterSectionSchema.ts +50 -0
- package/src/schemas/FormBlockSchema.ts +102 -0
- package/src/schemas/HeaderActionSchema.ts +83 -0
- package/src/schemas/HeroBlockSchema.ts +149 -0
- package/src/schemas/HtmlInputFieldSchema.ts +88 -0
- package/src/schemas/MetadataItemSchema.ts +35 -0
- package/src/schemas/PageBannerHeaderSchema.ts +206 -0
- package/src/schemas/PaletteSwitcherSchema.ts +66 -0
- package/src/schemas/ProductCardSchema.ts +264 -0
- package/src/schemas/SafeSpanSchema.ts +36 -0
- package/src/schemas/SectionSchema.ts +106 -0
- package/src/schemas/SelectInputFieldSchema.ts +137 -0
- package/src/schemas/TextInputFieldSchema.ts +129 -0
- package/src/schemas/ThemeSwitcherSchema.ts +97 -0
- package/src/schemas/__tests__/builders.test.ts +313 -0
- package/src/schemas/index.ts +34 -0
- package/src/setupTests.js +60 -0
- package/src/stories/Article.stories.tsx +549 -0
- package/src/stories/Button.stories.tsx +498 -0
- package/src/stories/CardListGrid.stories.tsx +539 -0
- package/src/stories/ChoiceInputField.stories.tsx +591 -0
- package/src/stories/Code.stories.tsx +711 -0
- package/src/stories/Content.stories.tsx +463 -0
- package/src/stories/CoverImageHeader.stories.tsx +794 -0
- package/src/stories/DataBinding.advanced.stories.tsx +548 -0
- package/src/stories/DataBinding.stories.tsx +452 -0
- package/src/stories/DataProvider.stories.tsx +1361 -0
- package/src/stories/FeatureCard.stories.tsx +642 -0
- package/src/stories/FeatureGrid.stories.tsx +669 -0
- package/src/stories/Footer.stories.tsx +724 -0
- package/src/stories/FormBlock.stories.tsx +834 -0
- package/src/stories/HeroBlock.stories.tsx +442 -0
- package/src/stories/Html.stories.tsx +264 -0
- package/src/stories/HtmlInputField.stories.tsx +558 -0
- package/src/stories/Introduction.stories.tsx +721 -0
- package/src/stories/LayoutBlocks.stories.tsx +382 -0
- package/src/stories/LayoutSystem.stories.tsx +253 -0
- package/src/stories/Logo.stories.tsx +400 -0
- package/src/stories/Markdown.stories.tsx +349 -0
- package/src/stories/Page.stories.tsx +762 -0
- package/src/stories/PageBannerHeader.stories.tsx +949 -0
- package/src/stories/PaletteSwitcher.stories.tsx +156 -0
- package/src/stories/ProductCard.stories.tsx +504 -0
- package/src/stories/QwickApp.stories.tsx +461 -0
- package/src/stories/ResponsiveMenu.stories.tsx +299 -0
- package/src/stories/SafeSpan.stories.tsx +612 -0
- package/src/stories/Section.stories.tsx +613 -0
- package/src/stories/SelectInputField.stories.tsx +605 -0
- package/src/stories/TextInputField.stories.tsx +526 -0
- package/src/stories/ThemeSwitcher.stories.tsx +170 -0
- package/src/stories/form/FormComponents.stories.tsx +588 -0
- package/src/templates/TemplateResolver.ts +156 -0
- package/src/templates/index.ts +6 -0
- package/src/tests/ConsoleWarningTest.tsx +30 -0
- package/src/tests/StorageKeyTest.tsx +110 -0
- package/src/tests/ThemeStorageKeyTest.tsx +114 -0
- package/src/types/CacheProvider.ts +14 -0
- package/src/types/ContentProxy.ts +99 -0
- package/src/types/DataTypes.ts +196 -0
- package/src/types/TemplateProvider.ts +9 -0
- package/src/types/TemplateResolver.ts +26 -0
- package/src/types/index.ts +99 -0
- package/src/utils/__tests__/createDataDrivenComponent.test.tsx.disabled +193 -0
- package/src/utils/__tests__/htmlTransform.test.tsx +255 -0
- package/src/utils/breakpoints.ts +87 -0
- package/src/utils/customPaletteManager.js +214 -0
- package/src/utils/dimensions.ts +147 -0
- package/src/utils/htmlTransform.tsx +323 -0
- package/src/utils/index.ts +16 -0
- package/src/utils/logger.ts +28 -0
- package/src/utils/paletteUtils.ts +78 -0
- package/src/utils/persistenceUtils.ts +107 -0
- package/src/utils/reactUtils.tsx +37 -0
- package/src/utils/spacing.ts +155 -0
- package/src/utils/themePerformanceMonitor.js +113 -0
- package/src/utils/themeUtils.ts +67 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PaletteSwitcher Component Stories
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
8
|
+
import PaletteSwitcher from '../components/buttons/PaletteSwitcher';
|
|
9
|
+
import ThemeSwitcher from '../components/buttons/ThemeSwitcher';
|
|
10
|
+
import AccessibilityChecker from '../components/AccessibilityChecker';
|
|
11
|
+
import { QwickApp } from '../index';
|
|
12
|
+
import { Box } from '@mui/material';
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: 'Components/PaletteSwitcher',
|
|
16
|
+
component: PaletteSwitcher,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'centered',
|
|
19
|
+
docs: {
|
|
20
|
+
description: {
|
|
21
|
+
component: `PaletteSwitcher enables users to switch between different color palettes, providing instant visual customization.
|
|
22
|
+
|
|
23
|
+
**Key Features:**
|
|
24
|
+
- **Dynamic Palette Switching**: Instant color theme changes with smooth transitions
|
|
25
|
+
- **Context Integration**: Seamlessly works with PaletteContext for state management
|
|
26
|
+
- **CSS Variables**: Automatically updates CSS custom properties for consistent theming
|
|
27
|
+
- **Accessibility Support**: Proper ARIA labels and keyboard navigation
|
|
28
|
+
- **Visual Feedback**: Shows current palette selection with clear visual indicators
|
|
29
|
+
- **Persistent Selection**: Remembers user's choice across sessions via localStorage
|
|
30
|
+
- **Theme Compatibility**: Works harmoniously with ThemeSwitcher for complete customization
|
|
31
|
+
|
|
32
|
+
**Perfect for:**
|
|
33
|
+
- User preference settings and customization panels
|
|
34
|
+
- Brand customization in multi-tenant applications
|
|
35
|
+
- Accessibility enhancement tools
|
|
36
|
+
- Design system demonstrations and showcases
|
|
37
|
+
- Personal dashboards and profile pages
|
|
38
|
+
- Application headers with user controls`,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
tags: ['autodocs'],
|
|
43
|
+
decorators: [
|
|
44
|
+
(Story) => (
|
|
45
|
+
<QwickApp appId="com.qwickapps.storybook" appName="QwickApps Storybook">
|
|
46
|
+
<Box p={3}>
|
|
47
|
+
<Story />
|
|
48
|
+
</Box>
|
|
49
|
+
</QwickApp>
|
|
50
|
+
),
|
|
51
|
+
],
|
|
52
|
+
} satisfies Meta<typeof PaletteSwitcher>;
|
|
53
|
+
|
|
54
|
+
export default meta;
|
|
55
|
+
type Story = StoryObj<typeof meta>;
|
|
56
|
+
|
|
57
|
+
// Default story - Color Variables Demo with Theme Switching
|
|
58
|
+
export const Default: Story = {
|
|
59
|
+
render: () => (
|
|
60
|
+
<Box sx={{
|
|
61
|
+
p: 3,
|
|
62
|
+
backgroundColor: 'var(--palette-background-main)',
|
|
63
|
+
borderRadius: '8px',
|
|
64
|
+
border: '1px solid var(--palette-border-light)'
|
|
65
|
+
}}>
|
|
66
|
+
<div style={{ marginBottom: '20px', textAlign: 'center' }}>
|
|
67
|
+
<h3 style={{ color: 'var(--palette-text-primary)', marginBottom: '8px' }}>
|
|
68
|
+
Palette & Theme Switcher Demo
|
|
69
|
+
</h3>
|
|
70
|
+
<p style={{ color: 'var(--palette-text-secondary)', marginBottom: '16px' }}>
|
|
71
|
+
Try switching palettes and themes to see how colors adapt across light/dark modes.
|
|
72
|
+
</p>
|
|
73
|
+
<div style={{
|
|
74
|
+
display: 'flex',
|
|
75
|
+
gap: '12px',
|
|
76
|
+
justifyContent: 'center',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
marginBottom: '20px'
|
|
79
|
+
}}>
|
|
80
|
+
<PaletteSwitcher />
|
|
81
|
+
<ThemeSwitcher />
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
{/* AccessibilityChecker Showcase */}
|
|
85
|
+
<div style={{
|
|
86
|
+
padding: '16px',
|
|
87
|
+
backgroundColor: 'var(--palette-surface-main)',
|
|
88
|
+
borderRadius: '8px',
|
|
89
|
+
border: '1px solid var(--palette-border-light)',
|
|
90
|
+
marginBottom: '20px'
|
|
91
|
+
}}>
|
|
92
|
+
<h4 style={{ color: 'var(--palette-text-primary)', marginBottom: '8px', fontSize: '1rem' }}>
|
|
93
|
+
🔍 Accessibility Checker
|
|
94
|
+
</h4>
|
|
95
|
+
<p style={{ color: 'var(--palette-text-secondary)', fontSize: '0.875rem', marginBottom: '12px' }}>
|
|
96
|
+
The AccessibilityChecker automatically monitors color contrast and provides accessibility feedback.
|
|
97
|
+
Try different palette and theme combinations to see how it adapts.
|
|
98
|
+
</p>
|
|
99
|
+
<AccessibilityChecker />
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div style={{
|
|
103
|
+
display: 'flex',
|
|
104
|
+
flexWrap: 'wrap',
|
|
105
|
+
gap: '16px',
|
|
106
|
+
justifyContent: 'center'
|
|
107
|
+
}}>
|
|
108
|
+
{[
|
|
109
|
+
{ name: 'Primary', var: '--palette-primary-main' },
|
|
110
|
+
{ name: 'Secondary', var: '--palette-secondary-main' },
|
|
111
|
+
{ name: 'Success', var: '--palette-success-main' },
|
|
112
|
+
{ name: 'Warning', var: '--palette-warning-main' },
|
|
113
|
+
{ name: 'Error', var: '--palette-error-main' },
|
|
114
|
+
{ name: 'Info', var: '--palette-info-main' },
|
|
115
|
+
].map(({ name, var: varName }) => (
|
|
116
|
+
<div key={name} style={{
|
|
117
|
+
padding: '16px',
|
|
118
|
+
borderRadius: '8px',
|
|
119
|
+
backgroundColor: 'var(--palette-surface-main)',
|
|
120
|
+
border: '1px solid var(--palette-border-main)',
|
|
121
|
+
textAlign: 'center',
|
|
122
|
+
minWidth: '120px',
|
|
123
|
+
boxShadow: '0 2px 4px rgba(0,0,0,0.1)'
|
|
124
|
+
}}>
|
|
125
|
+
<div style={{
|
|
126
|
+
width: '80px',
|
|
127
|
+
height: '40px',
|
|
128
|
+
backgroundColor: `var(${varName})`,
|
|
129
|
+
borderRadius: '4px',
|
|
130
|
+
marginBottom: '8px',
|
|
131
|
+
margin: '0 auto 8px auto'
|
|
132
|
+
}} />
|
|
133
|
+
<div style={{ color: 'var(--palette-text-primary)', fontWeight: 'bold', fontSize: '0.875rem' }}>
|
|
134
|
+
{name}
|
|
135
|
+
</div>
|
|
136
|
+
<div style={{
|
|
137
|
+
color: 'var(--palette-text-secondary)',
|
|
138
|
+
fontSize: '0.75rem',
|
|
139
|
+
fontFamily: 'monospace',
|
|
140
|
+
marginTop: '4px'
|
|
141
|
+
}}>
|
|
142
|
+
{varName}
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
))}
|
|
146
|
+
</div>
|
|
147
|
+
</Box>
|
|
148
|
+
),
|
|
149
|
+
parameters: {
|
|
150
|
+
docs: {
|
|
151
|
+
description: {
|
|
152
|
+
story: 'Interactive demo showcasing palette/theme switching with color variables and the AccessibilityChecker component. Switch between different palettes and light/dark modes to see how colors adapt and how the accessibility checker provides real-time contrast feedback.',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
};
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProductCard Component Stories - Product showcase with data binding support
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Box, Typography } from '@mui/material';
|
|
8
|
+
import { JsonDataProvider } from '@qwickapps/schema';
|
|
9
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
10
|
+
import { Code } from '../components/blocks';
|
|
11
|
+
import type { Product } from '../components/blocks/ProductCard';
|
|
12
|
+
import { ProductCard } from '../components/blocks/ProductCard';
|
|
13
|
+
import { GridLayout } from '../components/layout';
|
|
14
|
+
import QwickApp from '../components/QwickApp';
|
|
15
|
+
|
|
16
|
+
// Sample product data
|
|
17
|
+
const sampleProducts: Product[] = [
|
|
18
|
+
{
|
|
19
|
+
id: 'qwickapps-react-framework',
|
|
20
|
+
name: 'QwickApps React Framework',
|
|
21
|
+
category: 'Frontend Framework',
|
|
22
|
+
description: 'A comprehensive React framework for building modern web applications with AI-driven component generation, data binding, and enterprise-grade features.',
|
|
23
|
+
shortDescription: 'React framework for modern web apps',
|
|
24
|
+
features: [
|
|
25
|
+
'AI-driven component generation',
|
|
26
|
+
'Automatic data binding',
|
|
27
|
+
'Enterprise authentication',
|
|
28
|
+
'Real-time collaboration',
|
|
29
|
+
'Advanced theming system',
|
|
30
|
+
'Comprehensive testing suite'
|
|
31
|
+
],
|
|
32
|
+
technologies: ['React', 'TypeScript', 'Material-UI', 'Node.js'],
|
|
33
|
+
status: 'launched',
|
|
34
|
+
image: 'https://via.placeholder.com/400x200/1976d2/ffffff?text=QwickApps+Framework',
|
|
35
|
+
url: 'https://qwickapps.com/framework'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'qwickapps-cms',
|
|
39
|
+
name: 'QwickApps CMS',
|
|
40
|
+
category: 'Content Management',
|
|
41
|
+
description: 'Headless CMS built for developers with powerful API, visual editing, and seamless integration with modern frameworks.',
|
|
42
|
+
shortDescription: 'Developer-friendly headless CMS',
|
|
43
|
+
features: [
|
|
44
|
+
'RESTful and GraphQL APIs',
|
|
45
|
+
'Visual content editing',
|
|
46
|
+
'Multi-tenant architecture',
|
|
47
|
+
'Advanced caching',
|
|
48
|
+
'Role-based permissions'
|
|
49
|
+
],
|
|
50
|
+
technologies: ['Node.js', 'PostgreSQL', 'Redis', 'GraphQL'],
|
|
51
|
+
status: 'beta',
|
|
52
|
+
image: 'https://via.placeholder.com/400x200/388e3c/ffffff?text=QwickApps+CMS'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'qwickapps-ai',
|
|
56
|
+
name: 'QwickApps AI Assistant',
|
|
57
|
+
category: 'AI/ML Platform',
|
|
58
|
+
description: 'Intelligent development assistant that helps generate components, optimize code, and automate development workflows.',
|
|
59
|
+
shortDescription: 'AI-powered development assistant',
|
|
60
|
+
features: [
|
|
61
|
+
'Code generation',
|
|
62
|
+
'Performance optimization',
|
|
63
|
+
'Security analysis',
|
|
64
|
+
'Documentation generation',
|
|
65
|
+
'Test automation'
|
|
66
|
+
],
|
|
67
|
+
technologies: ['Python', 'TensorFlow', 'OpenAI API', 'Docker'],
|
|
68
|
+
status: 'coming-soon',
|
|
69
|
+
image: 'https://via.placeholder.com/400x200/7b1fa2/ffffff?text=QwickApps+AI'
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
// Sample CMS data for data binding stories
|
|
74
|
+
const sampleCmsData = {
|
|
75
|
+
'products': {
|
|
76
|
+
'framework': {
|
|
77
|
+
product: sampleProducts[0],
|
|
78
|
+
variant: 'detailed',
|
|
79
|
+
showImage: true,
|
|
80
|
+
showTechnologies: true
|
|
81
|
+
},
|
|
82
|
+
'cms-beta': {
|
|
83
|
+
product: sampleProducts[1],
|
|
84
|
+
variant: 'compact',
|
|
85
|
+
showImage: true,
|
|
86
|
+
showTechnologies: false,
|
|
87
|
+
maxFeaturesCompact: 3
|
|
88
|
+
},
|
|
89
|
+
'ai-coming': {
|
|
90
|
+
product: sampleProducts[2],
|
|
91
|
+
variant: 'detailed',
|
|
92
|
+
showImage: true,
|
|
93
|
+
showTechnologies: true
|
|
94
|
+
},
|
|
95
|
+
'showcase': sampleProducts.map(product => ({
|
|
96
|
+
product,
|
|
97
|
+
variant: 'compact',
|
|
98
|
+
showImage: true,
|
|
99
|
+
maxFeaturesCompact: 2
|
|
100
|
+
})),
|
|
101
|
+
'detailed-showcase': sampleProducts.map(product => ({
|
|
102
|
+
product,
|
|
103
|
+
variant: 'detailed',
|
|
104
|
+
showImage: true,
|
|
105
|
+
showTechnologies: true
|
|
106
|
+
}))
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const dataProvider = new JsonDataProvider({ data: sampleCmsData });
|
|
111
|
+
|
|
112
|
+
const meta = {
|
|
113
|
+
title: 'Blocks/ProductCard',
|
|
114
|
+
component: ProductCard,
|
|
115
|
+
parameters: {
|
|
116
|
+
layout: 'padded',
|
|
117
|
+
docs: {
|
|
118
|
+
description: {
|
|
119
|
+
component: `ProductCard is a flexible component for showcasing products and services with both traditional props and data binding through dataSource.
|
|
120
|
+
|
|
121
|
+
**Key Features:**
|
|
122
|
+
- **Two Display Variants**: Compact for grids and lists, Detailed for individual showcases
|
|
123
|
+
- **Product Status Support**: Handles launched, beta, and coming-soon product states
|
|
124
|
+
- **Smart Feature Display**: Automatic feature limiting in compact mode with "+X more" indicators
|
|
125
|
+
- **Technology Badges**: Optional technology stack display for technical products
|
|
126
|
+
- **Custom Actions**: Support for multiple action buttons with different variants
|
|
127
|
+
- **Data Binding**: Full CMS integration through dataSource prop
|
|
128
|
+
- **Image Handling**: Optional product images with fallback support
|
|
129
|
+
- **Responsive Design**: Adapts beautifully across all screen sizes
|
|
130
|
+
|
|
131
|
+
**Perfect For:**
|
|
132
|
+
- Product showcases and catalogs
|
|
133
|
+
- Service offerings and portfolios
|
|
134
|
+
- Software tool presentations
|
|
135
|
+
- Feature comparison grids
|
|
136
|
+
- Beta product announcements
|
|
137
|
+
- Coming soon product teasers`,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
tags: ['autodocs'],
|
|
142
|
+
} satisfies Meta<typeof ProductCard>;
|
|
143
|
+
|
|
144
|
+
export default meta;
|
|
145
|
+
type Story = StoryObj<typeof ProductCard>;
|
|
146
|
+
|
|
147
|
+
// Traditional Usage Examples
|
|
148
|
+
export const LaunchedProduct: Story = {
|
|
149
|
+
render: () => (
|
|
150
|
+
<QwickApp appId="productcard-launched" appName='Launched ProductCard'>
|
|
151
|
+
<ProductCard
|
|
152
|
+
product={sampleProducts[0]}
|
|
153
|
+
variant="detailed"
|
|
154
|
+
/>
|
|
155
|
+
</QwickApp>
|
|
156
|
+
),
|
|
157
|
+
parameters: {
|
|
158
|
+
docs: {
|
|
159
|
+
description: {
|
|
160
|
+
story: 'ProductCard displaying a launched product with detailed variant showing full description and technology stack.',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const ProductStatusVariants: Story = {
|
|
167
|
+
render: () => (
|
|
168
|
+
<QwickApp appId="productcard-statuses" appName='ProductCard Status Variants'>
|
|
169
|
+
<GridLayout columns={3} spacing="large" equalHeight>
|
|
170
|
+
<ProductCard
|
|
171
|
+
product={sampleProducts[0]}
|
|
172
|
+
variant="compact"
|
|
173
|
+
maxFeaturesCompact={2}
|
|
174
|
+
/>
|
|
175
|
+
<ProductCard
|
|
176
|
+
product={sampleProducts[1]}
|
|
177
|
+
variant="compact"
|
|
178
|
+
maxFeaturesCompact={2}
|
|
179
|
+
/>
|
|
180
|
+
<ProductCard
|
|
181
|
+
product={sampleProducts[2]}
|
|
182
|
+
variant="compact"
|
|
183
|
+
maxFeaturesCompact={2}
|
|
184
|
+
/>
|
|
185
|
+
</GridLayout>
|
|
186
|
+
</QwickApp>
|
|
187
|
+
),
|
|
188
|
+
parameters: {
|
|
189
|
+
docs: {
|
|
190
|
+
description: {
|
|
191
|
+
story: 'Different product status states: launched (green), beta (orange), and coming-soon (disabled) with appropriate action buttons.',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export const VariantComparison: Story = {
|
|
198
|
+
render: () => (
|
|
199
|
+
<QwickApp appId="productcard-variants" appName='ProductCard Variant Comparison'>
|
|
200
|
+
<Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
|
|
201
|
+
|
|
202
|
+
<Box>
|
|
203
|
+
<Typography variant="h6" gutterBottom>Compact Variant</Typography>
|
|
204
|
+
<Typography variant="body2" sx={{ mb: 2, opacity: 0.7 }}>
|
|
205
|
+
Ideal for product grids and lists with limited space
|
|
206
|
+
</Typography>
|
|
207
|
+
<GridLayout columns={2} spacing="medium">
|
|
208
|
+
<ProductCard
|
|
209
|
+
product={sampleProducts[0]}
|
|
210
|
+
variant="compact"
|
|
211
|
+
maxFeaturesCompact={3}
|
|
212
|
+
/>
|
|
213
|
+
<ProductCard
|
|
214
|
+
product={sampleProducts[1]}
|
|
215
|
+
variant="compact"
|
|
216
|
+
maxFeaturesCompact={2}
|
|
217
|
+
showTechnologies={false}
|
|
218
|
+
/>
|
|
219
|
+
</GridLayout>
|
|
220
|
+
</Box>
|
|
221
|
+
|
|
222
|
+
<Box>
|
|
223
|
+
<Typography variant="h6" gutterBottom>Detailed Variant</Typography>
|
|
224
|
+
<Typography variant="body2" sx={{ mb: 2, opacity: 0.7 }}>
|
|
225
|
+
Perfect for individual product showcases with complete information
|
|
226
|
+
</Typography>
|
|
227
|
+
<ProductCard
|
|
228
|
+
product={sampleProducts[0]}
|
|
229
|
+
variant="detailed"
|
|
230
|
+
showTechnologies={true}
|
|
231
|
+
/>
|
|
232
|
+
</Box>
|
|
233
|
+
|
|
234
|
+
</Box>
|
|
235
|
+
</QwickApp>
|
|
236
|
+
),
|
|
237
|
+
parameters: {
|
|
238
|
+
docs: {
|
|
239
|
+
description: {
|
|
240
|
+
story: 'Side-by-side comparison of compact vs detailed variants showing different use cases and information density.',
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export const CustomizationOptions: Story = {
|
|
247
|
+
render: () => (
|
|
248
|
+
<QwickApp appId="productcard-customization" appName='ProductCard Customization'>
|
|
249
|
+
<GridLayout columns={2} spacing="large">
|
|
250
|
+
|
|
251
|
+
<ProductCard
|
|
252
|
+
product={sampleProducts[0]}
|
|
253
|
+
variant="detailed"
|
|
254
|
+
showImage={false}
|
|
255
|
+
showTechnologies={false}
|
|
256
|
+
/>
|
|
257
|
+
|
|
258
|
+
<ProductCard
|
|
259
|
+
product={sampleProducts[0]}
|
|
260
|
+
variant="detailed"
|
|
261
|
+
actions={[
|
|
262
|
+
{
|
|
263
|
+
id: 'demo',
|
|
264
|
+
label: 'View Demo',
|
|
265
|
+
variant: 'contained',
|
|
266
|
+
color: 'primary',
|
|
267
|
+
onClick: () => alert('Demo clicked!')
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: 'docs',
|
|
271
|
+
label: 'Documentation',
|
|
272
|
+
variant: 'outlined',
|
|
273
|
+
color: 'primary',
|
|
274
|
+
onClick: () => alert('Docs clicked!')
|
|
275
|
+
}
|
|
276
|
+
]}
|
|
277
|
+
/>
|
|
278
|
+
|
|
279
|
+
</GridLayout>
|
|
280
|
+
</QwickApp>
|
|
281
|
+
),
|
|
282
|
+
parameters: {
|
|
283
|
+
docs: {
|
|
284
|
+
description: {
|
|
285
|
+
story: 'Customization options: hiding images/technologies and adding custom action buttons.',
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
// Data Binding Examples
|
|
292
|
+
export const DataBindingBasic: Story = {
|
|
293
|
+
render: () => (
|
|
294
|
+
<QwickApp appId="productcard-data-binding" appName='ProductCard Data Binding' dataSource={{ dataProvider }}>
|
|
295
|
+
<Box>
|
|
296
|
+
|
|
297
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
298
|
+
<Typography variant="h5" gutterBottom>📊 Data-Driven ProductCard</Typography>
|
|
299
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
300
|
+
ProductCard components can be driven entirely by CMS data using the dataSource prop.
|
|
301
|
+
</Typography>
|
|
302
|
+
|
|
303
|
+
<Code title="Usage" language="tsx">{`<ProductCard dataSource="products.framework" />`}</Code>
|
|
304
|
+
|
|
305
|
+
<Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData.products.framework, null, 2)}</Code>
|
|
306
|
+
</Box>
|
|
307
|
+
|
|
308
|
+
<ProductCard dataSource="products.framework" />
|
|
309
|
+
|
|
310
|
+
</Box>
|
|
311
|
+
</QwickApp>
|
|
312
|
+
),
|
|
313
|
+
parameters: {
|
|
314
|
+
docs: {
|
|
315
|
+
description: {
|
|
316
|
+
story: 'ProductCard with data binding - all props resolved from CMS data through dataSource.',
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export const DataBindingAdvanced: Story = {
|
|
323
|
+
render: () => (
|
|
324
|
+
<QwickApp appId="productcard-data-advanced" appName='Advanced ProductCard Data Binding' dataSource={{ dataProvider }}>
|
|
325
|
+
<Box>
|
|
326
|
+
|
|
327
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
328
|
+
<Typography variant="h5" gutterBottom>🎯 Multiple Data Sources</Typography>
|
|
329
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
330
|
+
Different ProductCard components can pull from different data sources with varying configurations.
|
|
331
|
+
</Typography>
|
|
332
|
+
</Box>
|
|
333
|
+
|
|
334
|
+
<GridLayout columns={3} spacing="large" equalHeight>
|
|
335
|
+
<ProductCard dataSource="products.framework" />
|
|
336
|
+
<ProductCard dataSource="products.cms-beta" />
|
|
337
|
+
<ProductCard dataSource="products.ai-coming" />
|
|
338
|
+
</GridLayout>
|
|
339
|
+
|
|
340
|
+
</Box>
|
|
341
|
+
</QwickApp>
|
|
342
|
+
),
|
|
343
|
+
parameters: {
|
|
344
|
+
docs: {
|
|
345
|
+
description: {
|
|
346
|
+
story: 'Advanced data binding with multiple data sources showcasing different product statuses and configurations.',
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
export const DataBindingWithFallback: Story = {
|
|
353
|
+
render: () => (
|
|
354
|
+
<QwickApp appId="productcard-fallback" appName='ProductCard Data Binding with Fallback' dataSource={{ dataProvider }}>
|
|
355
|
+
<Box>
|
|
356
|
+
|
|
357
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
358
|
+
<Typography variant="h5" gutterBottom>🛡️ Fallback Support</Typography>
|
|
359
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
360
|
+
ProductCard components gracefully handle missing data sources with fallback props.
|
|
361
|
+
</Typography>
|
|
362
|
+
|
|
363
|
+
<Code title="Fallback Usage" language="tsx">{`<ProductCard
|
|
364
|
+
dataSource="nonexistent.product"
|
|
365
|
+
product={fallbackProduct}
|
|
366
|
+
variant="compact"
|
|
367
|
+
/>`}</Code>
|
|
368
|
+
</Box>
|
|
369
|
+
|
|
370
|
+
<GridLayout columns={2} spacing="large">
|
|
371
|
+
<ProductCard
|
|
372
|
+
dataSource="nonexistent.product"
|
|
373
|
+
product={sampleProducts[0]}
|
|
374
|
+
variant="compact"
|
|
375
|
+
maxFeaturesCompact={3}
|
|
376
|
+
/>
|
|
377
|
+
<ProductCard dataSource="products.framework" />
|
|
378
|
+
</GridLayout>
|
|
379
|
+
|
|
380
|
+
</Box>
|
|
381
|
+
</QwickApp>
|
|
382
|
+
),
|
|
383
|
+
parameters: {
|
|
384
|
+
docs: {
|
|
385
|
+
description: {
|
|
386
|
+
story: 'ProductCard with fallback props when dataSource is missing or unavailable.',
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
export const ProductShowcaseGrid: Story = {
|
|
393
|
+
render: () => (
|
|
394
|
+
<QwickApp appId="productcard-showcase" appName='Product Showcase Grid'>
|
|
395
|
+
<Box>
|
|
396
|
+
|
|
397
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
398
|
+
<Typography variant="h5" gutterBottom>🏪 Product Showcase</Typography>
|
|
399
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
400
|
+
Real-world example of ProductCard in a product catalog layout.
|
|
401
|
+
</Typography>
|
|
402
|
+
</Box>
|
|
403
|
+
|
|
404
|
+
<GridLayout columns={3} spacing="large" equalHeight>
|
|
405
|
+
{sampleProducts.map((product) => (
|
|
406
|
+
<ProductCard
|
|
407
|
+
key={product.id}
|
|
408
|
+
product={product}
|
|
409
|
+
variant="compact"
|
|
410
|
+
maxFeaturesCompact={2}
|
|
411
|
+
/>
|
|
412
|
+
))}
|
|
413
|
+
</GridLayout>
|
|
414
|
+
|
|
415
|
+
</Box>
|
|
416
|
+
</QwickApp>
|
|
417
|
+
),
|
|
418
|
+
parameters: {
|
|
419
|
+
docs: {
|
|
420
|
+
description: {
|
|
421
|
+
story: 'Product catalog layout with multiple ProductCards showing different statuses and consistent spacing.',
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
export const RealWorldExample: Story = {
|
|
428
|
+
render: () => (
|
|
429
|
+
<QwickApp appId="productcard-real-world" appName='Real World ProductCard Example' dataSource={{ dataProvider }}>
|
|
430
|
+
<Box>
|
|
431
|
+
{/* Featured Product - Data Driven */}
|
|
432
|
+
<Box sx={{ mb: 4 }}>
|
|
433
|
+
<Typography variant="h4" gutterBottom>Featured Product</Typography>
|
|
434
|
+
<ProductCard dataSource="products.framework" />
|
|
435
|
+
</Box>
|
|
436
|
+
|
|
437
|
+
{/* Product Grid - Mixed Data Sources */}
|
|
438
|
+
<Box sx={{ mb: 4 }}>
|
|
439
|
+
<Typography variant="h4" gutterBottom>Our Products</Typography>
|
|
440
|
+
<GridLayout columns={3} spacing="large" equalHeight>
|
|
441
|
+
<ProductCard dataSource="products.framework" />
|
|
442
|
+
<ProductCard dataSource="products.cms-beta" />
|
|
443
|
+
<ProductCard dataSource="products.ai-coming" />
|
|
444
|
+
</GridLayout>
|
|
445
|
+
</Box>
|
|
446
|
+
|
|
447
|
+
{/* Coming Soon Section */}
|
|
448
|
+
<Box>
|
|
449
|
+
<Typography variant="h4" gutterBottom>Coming Soon</Typography>
|
|
450
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.7 }}>
|
|
451
|
+
Get excited about our upcoming releases
|
|
452
|
+
</Typography>
|
|
453
|
+
<ProductCard
|
|
454
|
+
product={sampleProducts[2]}
|
|
455
|
+
variant="detailed"
|
|
456
|
+
showTechnologies={true}
|
|
457
|
+
/>
|
|
458
|
+
</Box>
|
|
459
|
+
</Box>
|
|
460
|
+
</QwickApp>
|
|
461
|
+
),
|
|
462
|
+
parameters: {
|
|
463
|
+
docs: {
|
|
464
|
+
description: {
|
|
465
|
+
story: 'Real-world example combining data-driven ProductCards with traditional usage in a complete product showcase page.',
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
export const EmptyAndLoadingStates: Story = {
|
|
472
|
+
render: () => (
|
|
473
|
+
<QwickApp appId="productcard-states" appName='ProductCard States' dataSource={{ dataProvider }}>
|
|
474
|
+
<Box>
|
|
475
|
+
|
|
476
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
477
|
+
<Typography variant="h5" gutterBottom>🔄 State Management</Typography>
|
|
478
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
479
|
+
ProductCard handles various states including empty data and loading scenarios.
|
|
480
|
+
</Typography>
|
|
481
|
+
</Box>
|
|
482
|
+
|
|
483
|
+
<GridLayout columns={2} spacing="large">
|
|
484
|
+
<Box>
|
|
485
|
+
<Typography variant="h6" gutterBottom>Empty State</Typography>
|
|
486
|
+
<ProductCard />
|
|
487
|
+
</Box>
|
|
488
|
+
<Box>
|
|
489
|
+
<Typography variant="h6" gutterBottom>Valid Product</Typography>
|
|
490
|
+
<ProductCard dataSource="products.framework" />
|
|
491
|
+
</Box>
|
|
492
|
+
</GridLayout>
|
|
493
|
+
|
|
494
|
+
</Box>
|
|
495
|
+
</QwickApp>
|
|
496
|
+
),
|
|
497
|
+
parameters: {
|
|
498
|
+
docs: {
|
|
499
|
+
description: {
|
|
500
|
+
story: 'Demonstrates empty state handling and normal product display states.',
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
};
|