@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,364 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integration tests for FeatureGrid with data binding functionality
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { render, waitFor, screen } from '@testing-library/react';
|
|
9
|
+
import FeatureGrid from '../blocks/FeatureGrid';
|
|
10
|
+
import { DataProvider } from '../../contexts/DataContext';
|
|
11
|
+
import { JsonDataProvider } from '@qwickapps/schema';
|
|
12
|
+
|
|
13
|
+
describe.skip('FeatureGrid Integration (Traditional + Data Binding)', () => {
|
|
14
|
+
const testData = {
|
|
15
|
+
'pages.home.features': {
|
|
16
|
+
features: [
|
|
17
|
+
{
|
|
18
|
+
id: 'fast',
|
|
19
|
+
title: '⚡ Lightning Fast',
|
|
20
|
+
description: 'Optimized performance for instant loading and smooth user experiences',
|
|
21
|
+
icon: '⚡'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 'beautiful',
|
|
25
|
+
title: '🎨 Beautiful UI',
|
|
26
|
+
description: 'Professional components and layouts that work perfectly out of the box',
|
|
27
|
+
icon: '🎨'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'mobile',
|
|
31
|
+
title: '📱 Mobile First',
|
|
32
|
+
description: 'Responsive design principles built into every component and layout',
|
|
33
|
+
icon: '📱'
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
columns: 3,
|
|
37
|
+
gap: 'medium',
|
|
38
|
+
equalHeight: true
|
|
39
|
+
},
|
|
40
|
+
'product.key-features': {
|
|
41
|
+
features: JSON.stringify([
|
|
42
|
+
{
|
|
43
|
+
id: 'feature-1',
|
|
44
|
+
title: 'Easy Integration',
|
|
45
|
+
description: 'Simple setup and configuration with minimal boilerplate code'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'feature-2',
|
|
49
|
+
title: 'Type Safe',
|
|
50
|
+
description: 'Full TypeScript support with comprehensive type definitions'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'feature-3',
|
|
54
|
+
title: 'Extensible',
|
|
55
|
+
description: 'Modular architecture allows for easy customization and extension'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'feature-4',
|
|
59
|
+
title: 'Well Documented',
|
|
60
|
+
description: 'Comprehensive documentation with examples and best practices'
|
|
61
|
+
}
|
|
62
|
+
]),
|
|
63
|
+
columns: 2,
|
|
64
|
+
gap: 'large',
|
|
65
|
+
equalHeight: 'false'
|
|
66
|
+
},
|
|
67
|
+
'marketing.benefits-grid': {
|
|
68
|
+
features: [
|
|
69
|
+
{
|
|
70
|
+
id: 'save-time',
|
|
71
|
+
title: 'Save Development Time',
|
|
72
|
+
description: 'Pre-built components reduce development time by up to 70%',
|
|
73
|
+
icon: '⏰'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'reduce-costs',
|
|
77
|
+
title: 'Reduce Costs',
|
|
78
|
+
description: 'Less development time means lower project costs and faster ROI',
|
|
79
|
+
icon: '💰'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 'scale-easily',
|
|
83
|
+
title: 'Scale with Confidence',
|
|
84
|
+
description: 'Built-in best practices ensure your application scales smoothly',
|
|
85
|
+
icon: '📈'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 'team-productivity',
|
|
89
|
+
title: 'Boost Team Productivity',
|
|
90
|
+
description: 'Consistent patterns and components improve team collaboration',
|
|
91
|
+
icon: '👥'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'user-experience',
|
|
95
|
+
title: 'Enhanced UX',
|
|
96
|
+
description: 'Professional design system ensures consistent user experience',
|
|
97
|
+
icon: '✨'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'future-proof',
|
|
101
|
+
title: 'Future Proof',
|
|
102
|
+
description: 'Regular updates and modern architecture keep your app current',
|
|
103
|
+
icon: '🚀'
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
columns: 3,
|
|
107
|
+
gap: 'medium',
|
|
108
|
+
equalHeight: true
|
|
109
|
+
},
|
|
110
|
+
'empty.features': {}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const dataProvider = new JsonDataProvider({ data: testData });
|
|
114
|
+
|
|
115
|
+
const sampleFeatures = [
|
|
116
|
+
{
|
|
117
|
+
id: 'traditional-1',
|
|
118
|
+
title: 'Traditional Feature 1',
|
|
119
|
+
description: 'This feature is passed via traditional props',
|
|
120
|
+
icon: '🔧'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 'traditional-2',
|
|
124
|
+
title: 'Traditional Feature 2',
|
|
125
|
+
description: 'Another feature using the traditional approach',
|
|
126
|
+
icon: '⚙️'
|
|
127
|
+
}
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
it('should work as traditional FeatureGrid without dataSource', () => {
|
|
131
|
+
const { container } = render(
|
|
132
|
+
<FeatureGrid
|
|
133
|
+
features={sampleFeatures}
|
|
134
|
+
columns={2}
|
|
135
|
+
gap="small"
|
|
136
|
+
equalHeight={true}
|
|
137
|
+
/>
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
expect(container.innerHTML).toContain('Traditional Feature 1');
|
|
141
|
+
expect(container.innerHTML).toContain('Traditional Feature 2');
|
|
142
|
+
expect(container.innerHTML).toContain('This feature is passed via traditional props');
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('should work with dataSource prop (data binding)', async () => {
|
|
146
|
+
const { container } = render(
|
|
147
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
148
|
+
<FeatureGrid dataSource="pages.home.features" />
|
|
149
|
+
</DataProvider>
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
await waitFor(() => {
|
|
153
|
+
expect(container.innerHTML).toContain('Lightning Fast');
|
|
154
|
+
expect(container.innerHTML).toContain('Beautiful UI');
|
|
155
|
+
expect(container.innerHTML).toContain('Mobile First');
|
|
156
|
+
expect(container.innerHTML).toContain('Optimized performance for instant loading');
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('should parse JSON string features correctly', async () => {
|
|
161
|
+
const { container } = render(
|
|
162
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
163
|
+
<FeatureGrid dataSource="product.key-features" />
|
|
164
|
+
</DataProvider>
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
await waitFor(() => {
|
|
168
|
+
expect(container.innerHTML).toContain('Easy Integration');
|
|
169
|
+
expect(container.innerHTML).toContain('Type Safe');
|
|
170
|
+
expect(container.innerHTML).toContain('Extensible');
|
|
171
|
+
expect(container.innerHTML).toContain('Well Documented');
|
|
172
|
+
expect(container.innerHTML).toContain('Simple setup and configuration');
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it('should use fallback props when dataSource has no content', async () => {
|
|
177
|
+
const fallbackFeatures = [
|
|
178
|
+
{
|
|
179
|
+
id: 'fallback-1',
|
|
180
|
+
title: 'Fallback Feature',
|
|
181
|
+
description: 'This appears when dataSource is empty'
|
|
182
|
+
}
|
|
183
|
+
];
|
|
184
|
+
|
|
185
|
+
const { container } = render(
|
|
186
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
187
|
+
<FeatureGrid
|
|
188
|
+
dataSource="empty.features"
|
|
189
|
+
features={fallbackFeatures}
|
|
190
|
+
columns={1}
|
|
191
|
+
gap="large"
|
|
192
|
+
/>
|
|
193
|
+
</DataProvider>
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
await waitFor(() => {
|
|
197
|
+
expect(container.innerHTML).toContain('Fallback Feature');
|
|
198
|
+
expect(container.innerHTML).toContain('This appears when dataSource is empty');
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
it('should include data attributes when using dataSource', async () => {
|
|
203
|
+
const { container } = render(
|
|
204
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
205
|
+
<FeatureGrid dataSource="pages.home.features" />
|
|
206
|
+
</DataProvider>
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
await waitFor(() => {
|
|
210
|
+
const gridElement = container.querySelector('[data-component="FeatureGrid"]');
|
|
211
|
+
expect(gridElement).toHaveAttribute('data-component', 'FeatureGrid');
|
|
212
|
+
expect(gridElement).toHaveAttribute('data-data-source', 'pages.home.features');
|
|
213
|
+
expect(gridElement).toHaveAttribute('data-feature-count', '3');
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it('should work with base props like grid attributes', () => {
|
|
218
|
+
const { container } = render(
|
|
219
|
+
<FeatureGrid
|
|
220
|
+
features={sampleFeatures}
|
|
221
|
+
span={12}
|
|
222
|
+
xs={12}
|
|
223
|
+
lg={10}
|
|
224
|
+
/>
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
const gridElement = container.querySelector('[data-grid-span]');
|
|
228
|
+
expect(gridElement).toHaveAttribute('data-grid-span', '12');
|
|
229
|
+
expect(gridElement).toHaveAttribute('data-grid-xs', '12');
|
|
230
|
+
expect(gridElement).toHaveAttribute('data-grid-lg', '10');
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it('should handle custom binding options', async () => {
|
|
234
|
+
const { container } = render(
|
|
235
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
236
|
+
<FeatureGrid
|
|
237
|
+
dataSource="nonexistent.features"
|
|
238
|
+
bindingOptions={{
|
|
239
|
+
fallback: {
|
|
240
|
+
features: [
|
|
241
|
+
{
|
|
242
|
+
id: 'custom-fallback',
|
|
243
|
+
title: 'Custom Fallback Feature',
|
|
244
|
+
description: 'Custom fallback from binding options'
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
columns: 1,
|
|
248
|
+
gap: 'small'
|
|
249
|
+
}
|
|
250
|
+
}}
|
|
251
|
+
/>
|
|
252
|
+
</DataProvider>
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
await waitFor(() => {
|
|
256
|
+
expect(container.innerHTML).toContain('Custom Fallback Feature');
|
|
257
|
+
expect(container.innerHTML).toContain('Custom fallback from binding options');
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it('should handle different column configurations', async () => {
|
|
262
|
+
const { container } = render(
|
|
263
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
264
|
+
<FeatureGrid dataSource="product.key-features" />
|
|
265
|
+
</DataProvider>
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
await waitFor(() => {
|
|
269
|
+
// Should render 4 features in 2 columns
|
|
270
|
+
expect(container.innerHTML).toContain('Easy Integration');
|
|
271
|
+
expect(container.innerHTML).toContain('Type Safe');
|
|
272
|
+
expect(container.innerHTML).toContain('Extensible');
|
|
273
|
+
expect(container.innerHTML).toContain('Well Documented');
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
it('should handle loading state', () => {
|
|
278
|
+
const { container } = render(
|
|
279
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
280
|
+
<FeatureGrid dataSource="slow.loading.features" />
|
|
281
|
+
</DataProvider>
|
|
282
|
+
);
|
|
283
|
+
|
|
284
|
+
// Should show loading features initially
|
|
285
|
+
expect(container.innerHTML).toContain('Loading Feature...');
|
|
286
|
+
expect(container.innerHTML).toContain('Loading feature content from data source');
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
it('should handle large feature grid', async () => {
|
|
290
|
+
const { container } = render(
|
|
291
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
292
|
+
<FeatureGrid dataSource="marketing.benefits-grid" />
|
|
293
|
+
</DataProvider>
|
|
294
|
+
);
|
|
295
|
+
|
|
296
|
+
await waitFor(() => {
|
|
297
|
+
expect(container.innerHTML).toContain('Save Development Time');
|
|
298
|
+
expect(container.innerHTML).toContain('Reduce Costs');
|
|
299
|
+
expect(container.innerHTML).toContain('Scale with Confidence');
|
|
300
|
+
expect(container.innerHTML).toContain('Boost Team Productivity');
|
|
301
|
+
expect(container.innerHTML).toContain('Enhanced UX');
|
|
302
|
+
expect(container.innerHTML).toContain('Future Proof');
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
it('should work with different gap sizes', async () => {
|
|
307
|
+
const { container } = render(
|
|
308
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
309
|
+
<FeatureGrid dataSource="product.key-features" />
|
|
310
|
+
</DataProvider>
|
|
311
|
+
);
|
|
312
|
+
|
|
313
|
+
await waitFor(() => {
|
|
314
|
+
// Should render features with large gap
|
|
315
|
+
expect(container.innerHTML).toContain('Easy Integration');
|
|
316
|
+
expect(container.innerHTML).toContain('Type Safe');
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
it('should handle boolean string conversion for equalHeight', async () => {
|
|
321
|
+
const { container } = render(
|
|
322
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
323
|
+
<FeatureGrid dataSource="product.key-features" />
|
|
324
|
+
</DataProvider>
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
await waitFor(() => {
|
|
328
|
+
// equalHeight is 'false' as string, should be converted to boolean false
|
|
329
|
+
expect(container.innerHTML).toContain('Easy Integration');
|
|
330
|
+
expect(container.innerHTML).toContain('Type Safe');
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
it('should handle empty features array gracefully', async () => {
|
|
335
|
+
const { container } = render(
|
|
336
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
337
|
+
<FeatureGrid
|
|
338
|
+
dataSource="empty.features"
|
|
339
|
+
features={[]} // Empty fallback
|
|
340
|
+
/>
|
|
341
|
+
</DataProvider>
|
|
342
|
+
);
|
|
343
|
+
|
|
344
|
+
await waitFor(() => {
|
|
345
|
+
expect(container.innerHTML).toContain('No Features Available');
|
|
346
|
+
expect(container.innerHTML).toContain('No feature data found in the specified data source');
|
|
347
|
+
});
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
it('should preserve children content alongside features', async () => {
|
|
351
|
+
// Note: FeatureGrid doesn't support children, but we test it doesn't break
|
|
352
|
+
const { container } = render(
|
|
353
|
+
<DataProvider dataSource={{ dataProvider }}>
|
|
354
|
+
<FeatureGrid dataSource="pages.home.features" />
|
|
355
|
+
</DataProvider>
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
await waitFor(() => {
|
|
359
|
+
expect(container.innerHTML).toContain('Lightning Fast');
|
|
360
|
+
expect(container.innerHTML).toContain('Beautiful UI');
|
|
361
|
+
expect(container.innerHTML).toContain('Mobile First');
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
});
|