@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,794 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CoverImageHeader Component Stories
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
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
|
|
15
|
+
} from '@mui/icons-material';
|
|
16
|
+
import { Box, Typography } from '@mui/material';
|
|
17
|
+
import { JsonDataProvider } from '@qwickapps/schema';
|
|
18
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
+
import { Code } from '../components/blocks';
|
|
20
|
+
import CoverImageHeader from '../components/blocks/CoverImageHeader';
|
|
21
|
+
import QwickApp from '../components/QwickApp';
|
|
22
|
+
|
|
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.
|
|
31
|
+
|
|
32
|
+
**Key Features:**
|
|
33
|
+
- **Optional Image**: Supports URL string or custom React component with configurable size and shape
|
|
34
|
+
- **Information Display**: Overline, title, subtitle, and tags for comprehensive content presentation
|
|
35
|
+
- **Contextual Actions**: Priority-based action system with overflow menu for additional options
|
|
36
|
+
- **Responsive Design**: Automatically adapts layout for mobile and desktop viewing
|
|
37
|
+
- **MUI Integration**: Built with Material UI components for consistent styling
|
|
38
|
+
|
|
39
|
+
**Perfect for:**
|
|
40
|
+
- Page headers with user information
|
|
41
|
+
- Project cards and portfolio items
|
|
42
|
+
- Product listings with actions
|
|
43
|
+
- Profile sections and team cards
|
|
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
|
+
},
|
|
102
|
+
} satisfies Meta<typeof CoverImageHeader>;
|
|
103
|
+
|
|
104
|
+
export default meta;
|
|
105
|
+
type Story = StoryObj<typeof meta>;
|
|
106
|
+
|
|
107
|
+
// Sample CMS data for data binding stories (following nested structure pattern)
|
|
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
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const dataProvider = new JsonDataProvider({ data: sampleCmsData });
|
|
178
|
+
|
|
179
|
+
// Sample actions for demos
|
|
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
|
+
},
|
|
232
|
+
];
|
|
233
|
+
|
|
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
|
+
},
|
|
251
|
+
};
|
|
252
|
+
|
|
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
|
+
},
|
|
275
|
+
};
|
|
276
|
+
|
|
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
|
+
},
|
|
302
|
+
};
|
|
303
|
+
|
|
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
|
+
},
|
|
344
|
+
};
|
|
345
|
+
|
|
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
|
+
},
|
|
386
|
+
};
|
|
387
|
+
|
|
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
|
+
},
|
|
431
|
+
};
|
|
432
|
+
|
|
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
|
+
},
|
|
468
|
+
};
|
|
469
|
+
|
|
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
|
+
},
|
|
493
|
+
};
|
|
494
|
+
|
|
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
|
+
},
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
// Data Binding Examples
|
|
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>
|
|
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
|
+
},
|
|
587
|
+
};
|
|
588
|
+
|
|
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>
|
|
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
|
+
},
|
|
637
|
+
};
|
|
638
|
+
|
|
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>
|
|
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
|
+
},
|
|
687
|
+
};
|
|
688
|
+
|
|
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>
|
|
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
|
+
},
|
|
726
|
+
};
|
|
727
|
+
|
|
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"
|
|
748
|
+
/>`}</Code>
|
|
749
|
+
</Box>
|
|
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
|
+
},
|
|
794
|
+
};
|