@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,588 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form Components Stories - Testing new base props pattern
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { Box, Paper, Typography } from '@mui/material';
|
|
6
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
7
|
+
import { Button } from '../../components/buttons/Button';
|
|
8
|
+
import { TextField } from '../../components/input/TextField';
|
|
9
|
+
import { GridCell } from '../../components/layout/GridCell';
|
|
10
|
+
import GridLayout from '../../components/layout/GridLayout';
|
|
11
|
+
|
|
12
|
+
const meta: Meta = {
|
|
13
|
+
title: 'Form/Enhanced Components',
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'padded',
|
|
16
|
+
docs: {
|
|
17
|
+
description: {
|
|
18
|
+
component: `Enhanced form components with base props support and grid integration.
|
|
19
|
+
|
|
20
|
+
**Key Features:**
|
|
21
|
+
- T-shirt sizing for dimensions and spacing (tiny, small, medium, large, x-large)
|
|
22
|
+
- Seamless grid behavior when used in GridLayout
|
|
23
|
+
- Background and styling props with theme integration
|
|
24
|
+
- Responsive breakpoint support (xs, sm, md, lg, xl)
|
|
25
|
+
- Consistent prop resolution and inheritance
|
|
26
|
+
|
|
27
|
+
**Perfect For:**
|
|
28
|
+
- Building responsive forms with minimal code
|
|
29
|
+
- Creating consistent layouts across your application
|
|
30
|
+
- Rapid prototyping with standardized sizing
|
|
31
|
+
- Complex form layouts with grid positioning`,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default meta;
|
|
38
|
+
|
|
39
|
+
export const BasicTextField: StoryObj = {
|
|
40
|
+
render: () => (
|
|
41
|
+
<Box>
|
|
42
|
+
<h3>TextField with T-shirt Sizing</h3>
|
|
43
|
+
<TextField
|
|
44
|
+
label="Small Width"
|
|
45
|
+
width="small"
|
|
46
|
+
margin="medium"
|
|
47
|
+
padding="small"
|
|
48
|
+
/>
|
|
49
|
+
<br />
|
|
50
|
+
<TextField
|
|
51
|
+
label="Large Width"
|
|
52
|
+
width="large"
|
|
53
|
+
margin="medium"
|
|
54
|
+
padding="large"
|
|
55
|
+
background="primary.light"
|
|
56
|
+
/>
|
|
57
|
+
</Box>
|
|
58
|
+
),
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const BasicButton: StoryObj = {
|
|
62
|
+
render: () => (
|
|
63
|
+
<Box>
|
|
64
|
+
<h3>Button with T-shirt Sizing</h3>
|
|
65
|
+
<Button
|
|
66
|
+
variant="contained"
|
|
67
|
+
width="small"
|
|
68
|
+
margin="medium"
|
|
69
|
+
>
|
|
70
|
+
Small Width
|
|
71
|
+
</Button>
|
|
72
|
+
<br />
|
|
73
|
+
<Button
|
|
74
|
+
variant="contained"
|
|
75
|
+
width="large"
|
|
76
|
+
margin="medium"
|
|
77
|
+
padding="large"
|
|
78
|
+
>
|
|
79
|
+
Large Width
|
|
80
|
+
</Button>
|
|
81
|
+
</Box>
|
|
82
|
+
),
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const InColumnLayout: StoryObj = {
|
|
86
|
+
render: () => (
|
|
87
|
+
<Box>
|
|
88
|
+
<h3>Components in GridLayout</h3>
|
|
89
|
+
<GridLayout spacing="medium">
|
|
90
|
+
<TextField
|
|
91
|
+
label="Half Width"
|
|
92
|
+
span={6}
|
|
93
|
+
fullWidth
|
|
94
|
+
/>
|
|
95
|
+
<TextField
|
|
96
|
+
label="Half Width"
|
|
97
|
+
span={6}
|
|
98
|
+
fullWidth
|
|
99
|
+
/>
|
|
100
|
+
<TextField
|
|
101
|
+
label="Full Width"
|
|
102
|
+
span={12}
|
|
103
|
+
fullWidth
|
|
104
|
+
/>
|
|
105
|
+
<Button
|
|
106
|
+
variant="contained"
|
|
107
|
+
span={4}
|
|
108
|
+
>
|
|
109
|
+
One Third
|
|
110
|
+
</Button>
|
|
111
|
+
<Button
|
|
112
|
+
variant="outlined"
|
|
113
|
+
span={4}
|
|
114
|
+
>
|
|
115
|
+
One Third
|
|
116
|
+
</Button>
|
|
117
|
+
<Button
|
|
118
|
+
variant="text"
|
|
119
|
+
span={4}
|
|
120
|
+
>
|
|
121
|
+
One Third
|
|
122
|
+
</Button>
|
|
123
|
+
</GridLayout>
|
|
124
|
+
</Box>
|
|
125
|
+
),
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const ResponsiveGrid: StoryObj = {
|
|
129
|
+
render: () => (
|
|
130
|
+
<Box>
|
|
131
|
+
<h3>Responsive Grid Behavior</h3>
|
|
132
|
+
<GridLayout spacing="medium">
|
|
133
|
+
<TextField
|
|
134
|
+
label="Mobile: Full, Tablet: Half, Desktop: Quarter"
|
|
135
|
+
xs={12}
|
|
136
|
+
sm={6}
|
|
137
|
+
md={3}
|
|
138
|
+
fullWidth
|
|
139
|
+
/>
|
|
140
|
+
<TextField
|
|
141
|
+
label="Mobile: Full, Tablet: Half, Desktop: Quarter"
|
|
142
|
+
xs={12}
|
|
143
|
+
sm={6}
|
|
144
|
+
md={3}
|
|
145
|
+
fullWidth
|
|
146
|
+
/>
|
|
147
|
+
<TextField
|
|
148
|
+
label="Mobile: Full, Tablet: Half, Desktop: Quarter"
|
|
149
|
+
xs={12}
|
|
150
|
+
sm={6}
|
|
151
|
+
md={3}
|
|
152
|
+
fullWidth
|
|
153
|
+
/>
|
|
154
|
+
<TextField
|
|
155
|
+
label="Mobile: Full, Tablet: Half, Desktop: Quarter"
|
|
156
|
+
xs={12}
|
|
157
|
+
sm={6}
|
|
158
|
+
md={3}
|
|
159
|
+
fullWidth
|
|
160
|
+
/>
|
|
161
|
+
</GridLayout>
|
|
162
|
+
</Box>
|
|
163
|
+
),
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const WithStyling: StoryObj = {
|
|
167
|
+
render: () => (
|
|
168
|
+
<Box>
|
|
169
|
+
<h3>Advanced Styling</h3>
|
|
170
|
+
<GridLayout spacing="large">
|
|
171
|
+
<TextField
|
|
172
|
+
label="With Background"
|
|
173
|
+
span={6}
|
|
174
|
+
fullWidth
|
|
175
|
+
background="linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)"
|
|
176
|
+
padding="medium"
|
|
177
|
+
sx={{ '& .MuiInputBase-root': { color: 'white' } }}
|
|
178
|
+
/>
|
|
179
|
+
<TextField
|
|
180
|
+
label="With Custom Height"
|
|
181
|
+
span={6}
|
|
182
|
+
fullWidth
|
|
183
|
+
height={80}
|
|
184
|
+
padding="medium"
|
|
185
|
+
/>
|
|
186
|
+
<Button
|
|
187
|
+
variant="contained"
|
|
188
|
+
span={12}
|
|
189
|
+
height="small"
|
|
190
|
+
padding="large"
|
|
191
|
+
background="linear-gradient(45deg, #2196F3 30%, #21CBF3 90%)"
|
|
192
|
+
>
|
|
193
|
+
Gradient Button with Height
|
|
194
|
+
</Button>
|
|
195
|
+
</GridLayout>
|
|
196
|
+
</Box>
|
|
197
|
+
),
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export const LoginFormExample: StoryObj = {
|
|
201
|
+
render: () => (
|
|
202
|
+
<Box sx={{ maxWidth: 400, mx: 'auto', p: 3 }}>
|
|
203
|
+
<h3>Login Form with New Components</h3>
|
|
204
|
+
<GridLayout spacing="medium">
|
|
205
|
+
<TextField
|
|
206
|
+
label="Email"
|
|
207
|
+
type="email"
|
|
208
|
+
span={12}
|
|
209
|
+
fullWidth
|
|
210
|
+
required
|
|
211
|
+
/>
|
|
212
|
+
<TextField
|
|
213
|
+
label="Password"
|
|
214
|
+
type="password"
|
|
215
|
+
span={12}
|
|
216
|
+
fullWidth
|
|
217
|
+
required
|
|
218
|
+
/>
|
|
219
|
+
<Button
|
|
220
|
+
variant="contained"
|
|
221
|
+
span={12}
|
|
222
|
+
size="large"
|
|
223
|
+
padding="medium"
|
|
224
|
+
>
|
|
225
|
+
Sign In
|
|
226
|
+
</Button>
|
|
227
|
+
<Button
|
|
228
|
+
variant="text"
|
|
229
|
+
span={6}
|
|
230
|
+
size="small"
|
|
231
|
+
>
|
|
232
|
+
Forgot Password?
|
|
233
|
+
</Button>
|
|
234
|
+
<Button
|
|
235
|
+
variant="text"
|
|
236
|
+
span={6}
|
|
237
|
+
size="small"
|
|
238
|
+
>
|
|
239
|
+
Sign Up
|
|
240
|
+
</Button>
|
|
241
|
+
</GridLayout>
|
|
242
|
+
</Box>
|
|
243
|
+
),
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// === T-SHIRT SIZING TESTS ===
|
|
247
|
+
|
|
248
|
+
export const TSizingDimensions: StoryObj = {
|
|
249
|
+
name: 'T-Shirt Sizing - Dimensions',
|
|
250
|
+
render: () => (
|
|
251
|
+
<Box sx={{ p: 2 }}>
|
|
252
|
+
<Typography variant="h6" gutterBottom>Width Sizing</Typography>
|
|
253
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, mb: 4 }}>
|
|
254
|
+
<TextField label="Tiny Width" width="tiny" />
|
|
255
|
+
<TextField label="Small Width" width="small" />
|
|
256
|
+
<TextField label="Medium Width" width="medium" />
|
|
257
|
+
<TextField label="Large Width" width="large" />
|
|
258
|
+
<TextField label="X-Large Width" width="x-large" />
|
|
259
|
+
<TextField label="Auto Width" width="auto" />
|
|
260
|
+
<TextField label="Custom 300px" width="300px" />
|
|
261
|
+
<TextField label="Custom 50%" width="50%" />
|
|
262
|
+
</Box>
|
|
263
|
+
|
|
264
|
+
<Typography variant="h6" gutterBottom>Height Sizing (Buttons)</Typography>
|
|
265
|
+
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 2 }}>
|
|
266
|
+
<Button height="tiny">Tiny</Button>
|
|
267
|
+
<Button height="small">Small</Button>
|
|
268
|
+
<Button height="medium">Medium</Button>
|
|
269
|
+
<Button height="large">Large</Button>
|
|
270
|
+
<Button height="x-large">X-Large</Button>
|
|
271
|
+
<Button height="60px">60px</Button>
|
|
272
|
+
</Box>
|
|
273
|
+
</Box>
|
|
274
|
+
),
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
export const TSizingSpacing: StoryObj = {
|
|
278
|
+
name: 'T-Shirt Sizing - Spacing',
|
|
279
|
+
render: () => (
|
|
280
|
+
<Box sx={{ p: 2 }}>
|
|
281
|
+
<Typography variant="h6" gutterBottom>Padding Variations</Typography>
|
|
282
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1, mb: 4 }}>
|
|
283
|
+
<TextField label="No Padding" padding="none" background="#f0f0f0" />
|
|
284
|
+
<TextField label="Tiny Padding" padding="tiny" background="#f0f0f0" />
|
|
285
|
+
<TextField label="Small Padding" padding="small" background="#f0f0f0" />
|
|
286
|
+
<TextField label="Medium Padding" padding="medium" background="#f0f0f0" />
|
|
287
|
+
<TextField label="Large Padding" padding="large" background="#f0f0f0" />
|
|
288
|
+
<TextField label="X-Large Padding" padding="x-large" background="#f0f0f0" />
|
|
289
|
+
<TextField label="Custom 20px" padding="20px" background="#f0f0f0" />
|
|
290
|
+
</Box>
|
|
291
|
+
|
|
292
|
+
<Typography variant="h6" gutterBottom>Margin Variations</Typography>
|
|
293
|
+
<Box sx={{ border: '1px dashed #ccc', p: 1 }}>
|
|
294
|
+
<TextField label="No Margin" margin="none" background="#e3f2fd" />
|
|
295
|
+
<TextField label="Tiny Margin" margin="tiny" background="#e8f5e8" />
|
|
296
|
+
<TextField label="Small Margin" margin="small" background="#fff3e0" />
|
|
297
|
+
<TextField label="Medium Margin" margin="medium" background="#fce4ec" />
|
|
298
|
+
<TextField label="Large Margin" margin="large" background="#f3e5f5" />
|
|
299
|
+
<TextField label="X-Large Margin" margin="x-large" background="#e0f2f1" />
|
|
300
|
+
</Box>
|
|
301
|
+
</Box>
|
|
302
|
+
),
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
// === GRID BEHAVIOR TESTS ===
|
|
306
|
+
|
|
307
|
+
export const GridSpanTests: StoryObj = {
|
|
308
|
+
name: 'Grid Behavior - Span',
|
|
309
|
+
render: () => (
|
|
310
|
+
<Box sx={{ p: 2 }}>
|
|
311
|
+
<Typography variant="h6" gutterBottom>Span Property (Equal Distribution)</Typography>
|
|
312
|
+
<GridLayout spacing="small">
|
|
313
|
+
<TextField label="Span 12 (Full)" span={12} fullWidth background="#ffebee" />
|
|
314
|
+
<TextField label="Span 6" span={6} fullWidth background="#e8f5e8" />
|
|
315
|
+
<TextField label="Span 6" span={6} fullWidth background="#e8f5e8" />
|
|
316
|
+
<TextField label="Span 4" span={4} fullWidth background="#e3f2fd" />
|
|
317
|
+
<TextField label="Span 4" span={4} fullWidth background="#e3f2fd" />
|
|
318
|
+
<TextField label="Span 4" span={4} fullWidth background="#e3f2fd" />
|
|
319
|
+
<Button span={3} variant="outlined">Span 3</Button>
|
|
320
|
+
<Button span={3} variant="outlined">Span 3</Button>
|
|
321
|
+
<Button span={3} variant="outlined">Span 3</Button>
|
|
322
|
+
<Button span={3} variant="outlined">Span 3</Button>
|
|
323
|
+
</GridLayout>
|
|
324
|
+
</Box>
|
|
325
|
+
),
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
export const GridResponsiveTests: StoryObj = {
|
|
329
|
+
name: 'Grid Behavior - Responsive',
|
|
330
|
+
render: () => (
|
|
331
|
+
<Box sx={{ p: 2 }}>
|
|
332
|
+
<Typography variant="h6" gutterBottom>Responsive Breakpoints</Typography>
|
|
333
|
+
<Typography variant="body2" sx={{ mb: 2, color: 'text.secondary' }}>
|
|
334
|
+
Resize browser to see responsive behavior: xs=mobile, sm=tablet, md=desktop
|
|
335
|
+
</Typography>
|
|
336
|
+
<GridLayout spacing="medium">
|
|
337
|
+
<TextField
|
|
338
|
+
label="xs:12, sm:6, md:4"
|
|
339
|
+
xs={12} sm={6} md={4}
|
|
340
|
+
fullWidth
|
|
341
|
+
background="#ffebee"
|
|
342
|
+
/>
|
|
343
|
+
<TextField
|
|
344
|
+
label="xs:12, sm:6, md:4"
|
|
345
|
+
xs={12} sm={6} md={4}
|
|
346
|
+
fullWidth
|
|
347
|
+
background="#e8f5e8"
|
|
348
|
+
/>
|
|
349
|
+
<TextField
|
|
350
|
+
label="xs:12, sm:6, md:4"
|
|
351
|
+
xs={12} sm={6} md={4}
|
|
352
|
+
fullWidth
|
|
353
|
+
background="#e3f2fd"
|
|
354
|
+
/>
|
|
355
|
+
<Button
|
|
356
|
+
xs={12} sm={12} md={6}
|
|
357
|
+
variant="contained"
|
|
358
|
+
fullWidth
|
|
359
|
+
>
|
|
360
|
+
xs:12, sm:12, md:6
|
|
361
|
+
</Button>
|
|
362
|
+
<Button
|
|
363
|
+
xs={12} sm={12} md={6}
|
|
364
|
+
variant="outlined"
|
|
365
|
+
fullWidth
|
|
366
|
+
>
|
|
367
|
+
xs:12, sm:12, md:6
|
|
368
|
+
</Button>
|
|
369
|
+
</GridLayout>
|
|
370
|
+
</Box>
|
|
371
|
+
),
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// === BACKGROUND TESTS ===
|
|
375
|
+
|
|
376
|
+
export const BackgroundTests: StoryObj = {
|
|
377
|
+
name: 'Background Variations',
|
|
378
|
+
render: () => (
|
|
379
|
+
<Box sx={{ p: 2 }}>
|
|
380
|
+
<Typography variant="h6" gutterBottom>Background Colors & Gradients</Typography>
|
|
381
|
+
<GridLayout spacing="medium">
|
|
382
|
+
<TextField
|
|
383
|
+
label="Primary Background"
|
|
384
|
+
span={6}
|
|
385
|
+
fullWidth
|
|
386
|
+
background="primary.light"
|
|
387
|
+
padding="medium"
|
|
388
|
+
/>
|
|
389
|
+
<TextField
|
|
390
|
+
label="Secondary Background"
|
|
391
|
+
span={6}
|
|
392
|
+
fullWidth
|
|
393
|
+
background="secondary.light"
|
|
394
|
+
padding="medium"
|
|
395
|
+
/>
|
|
396
|
+
<TextField
|
|
397
|
+
label="Custom Color"
|
|
398
|
+
span={4}
|
|
399
|
+
fullWidth
|
|
400
|
+
background="#4caf50"
|
|
401
|
+
padding="medium"
|
|
402
|
+
/>
|
|
403
|
+
<TextField
|
|
404
|
+
label="RGB Color"
|
|
405
|
+
span={4}
|
|
406
|
+
fullWidth
|
|
407
|
+
background="rgb(255, 152, 0)"
|
|
408
|
+
padding="medium"
|
|
409
|
+
/>
|
|
410
|
+
<TextField
|
|
411
|
+
label="Hex Color"
|
|
412
|
+
span={4}
|
|
413
|
+
fullWidth
|
|
414
|
+
background="#9c27b0"
|
|
415
|
+
padding="medium"
|
|
416
|
+
/>
|
|
417
|
+
<TextField
|
|
418
|
+
label="Linear Gradient"
|
|
419
|
+
span={12}
|
|
420
|
+
fullWidth
|
|
421
|
+
background="linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)"
|
|
422
|
+
padding="large"
|
|
423
|
+
sx={{ '& .MuiInputBase-root': { color: 'white' } }}
|
|
424
|
+
/>
|
|
425
|
+
<Button
|
|
426
|
+
span={6}
|
|
427
|
+
variant="contained"
|
|
428
|
+
background="linear-gradient(45deg, #2196F3 30%, #21CBF3 90%)"
|
|
429
|
+
padding="medium"
|
|
430
|
+
>
|
|
431
|
+
Gradient Button
|
|
432
|
+
</Button>
|
|
433
|
+
<Button
|
|
434
|
+
span={6}
|
|
435
|
+
variant="outlined"
|
|
436
|
+
background="radial-gradient(circle, #ff6b6b, #ee5a24)"
|
|
437
|
+
padding="medium"
|
|
438
|
+
>
|
|
439
|
+
Radial Gradient
|
|
440
|
+
</Button>
|
|
441
|
+
</GridLayout>
|
|
442
|
+
</Box>
|
|
443
|
+
),
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
// === COLUMN LAYOUT TESTS ===
|
|
447
|
+
|
|
448
|
+
export const ColumnLayoutTests: StoryObj = {
|
|
449
|
+
name: 'GridLayout Features',
|
|
450
|
+
render: () => (
|
|
451
|
+
<Box sx={{ p: 2 }}>
|
|
452
|
+
<Typography variant="h6" gutterBottom>Auto GridCell Distribution</Typography>
|
|
453
|
+
<Box sx={{ mb: 4 }}>
|
|
454
|
+
<Typography variant="subtitle2" gutterBottom>columns=2</Typography>
|
|
455
|
+
<GridLayout columns={2} spacing="small">
|
|
456
|
+
<TextField label="Auto GridCell 1" fullWidth />
|
|
457
|
+
<TextField label="Auto GridCell 2" fullWidth />
|
|
458
|
+
<Button variant="outlined" fullWidth>Auto Button 1</Button>
|
|
459
|
+
<Button variant="contained" fullWidth>Auto Button 2</Button>
|
|
460
|
+
</GridLayout>
|
|
461
|
+
</Box>
|
|
462
|
+
|
|
463
|
+
<Box sx={{ mb: 4 }}>
|
|
464
|
+
<Typography variant="subtitle2" gutterBottom>columns=3</Typography>
|
|
465
|
+
<GridLayout columns={3} spacing="medium">
|
|
466
|
+
<TextField label="Third 1" fullWidth />
|
|
467
|
+
<TextField label="Third 2" fullWidth />
|
|
468
|
+
<TextField label="Third 3" fullWidth />
|
|
469
|
+
<Button variant="outlined">Button 1</Button>
|
|
470
|
+
<Button variant="contained">Button 2</Button>
|
|
471
|
+
<Button variant="text">Button 3</Button>
|
|
472
|
+
</GridLayout>
|
|
473
|
+
</Box>
|
|
474
|
+
|
|
475
|
+
<Typography variant="h6" gutterBottom>Equal Height Columns</Typography>
|
|
476
|
+
<GridLayout columns={3} spacing="medium" equalHeight>
|
|
477
|
+
<Paper sx={{ p: 2, background: '#ffebee' }}>
|
|
478
|
+
<Typography>Short Content</Typography>
|
|
479
|
+
</Paper>
|
|
480
|
+
<Paper sx={{ p: 2, background: '#e8f5e8' }}>
|
|
481
|
+
<Typography>Medium length content that spans multiple lines to show height equalization working properly.</Typography>
|
|
482
|
+
</Paper>
|
|
483
|
+
<Paper sx={{ p: 2, background: '#e3f2fd' }}>
|
|
484
|
+
<Typography>Very long content that demonstrates the equal height feature by having much more text than the other columns, forcing all columns to match this height.</Typography>
|
|
485
|
+
</Paper>
|
|
486
|
+
</GridLayout>
|
|
487
|
+
</Box>
|
|
488
|
+
),
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
// === MIXED COMPONENT TESTS ===
|
|
492
|
+
|
|
493
|
+
export const MixedComponents: StoryObj = {
|
|
494
|
+
name: 'Mixed Component Integration',
|
|
495
|
+
render: () => (
|
|
496
|
+
<Box sx={{ p: 2 }}>
|
|
497
|
+
<Typography variant="h6" gutterBottom>QwickApp + Regular Components</Typography>
|
|
498
|
+
<GridLayout spacing="medium">
|
|
499
|
+
<TextField
|
|
500
|
+
label="QwickApp TextField"
|
|
501
|
+
span={6}
|
|
502
|
+
fullWidth
|
|
503
|
+
background="#f5f5f5"
|
|
504
|
+
padding="medium"
|
|
505
|
+
/>
|
|
506
|
+
<GridCell span={6} background="#e1f5fe" padding="medium">
|
|
507
|
+
<Typography variant="body2">Regular GridCell with base props</Typography>
|
|
508
|
+
<Box sx={{ mt: 1 }}>
|
|
509
|
+
<TextField label="Nested TextField" size="small" fullWidth />
|
|
510
|
+
</Box>
|
|
511
|
+
</GridCell>
|
|
512
|
+
<Button
|
|
513
|
+
span={4}
|
|
514
|
+
variant="contained"
|
|
515
|
+
color="primary"
|
|
516
|
+
padding="small"
|
|
517
|
+
>
|
|
518
|
+
QwickApp Button
|
|
519
|
+
</Button>
|
|
520
|
+
<GridCell span={4} padding="medium">
|
|
521
|
+
<Button variant="outlined" fullWidth>Regular MUI Button</Button>
|
|
522
|
+
</GridCell>
|
|
523
|
+
<GridCell span={4} background="linear-gradient(45deg, #673ab7, #9c27b0)" padding="medium">
|
|
524
|
+
<Typography sx={{ color: 'white', textAlign: 'center' }}>
|
|
525
|
+
Custom Content
|
|
526
|
+
</Typography>
|
|
527
|
+
</GridCell>
|
|
528
|
+
</GridLayout>
|
|
529
|
+
</Box>
|
|
530
|
+
),
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
// === ERROR & EDGE CASES ===
|
|
534
|
+
|
|
535
|
+
export const EdgeCases: StoryObj = {
|
|
536
|
+
name: 'Edge Cases & Error Handling',
|
|
537
|
+
render: () => (
|
|
538
|
+
<Box sx={{ p: 2 }}>
|
|
539
|
+
<Typography variant="h6" gutterBottom>Invalid Values (Check Console)</Typography>
|
|
540
|
+
<Box sx={{ mb: 4 }}>
|
|
541
|
+
<Typography variant="subtitle2" color="text.secondary" gutterBottom>
|
|
542
|
+
These should show warnings in console but still render:
|
|
543
|
+
</Typography>
|
|
544
|
+
<GridLayout spacing="medium">
|
|
545
|
+
<TextField
|
|
546
|
+
label="Invalid width"
|
|
547
|
+
width="invalid-value"
|
|
548
|
+
span={6}
|
|
549
|
+
fullWidth
|
|
550
|
+
background="#ffe0e0"
|
|
551
|
+
/>
|
|
552
|
+
<TextField
|
|
553
|
+
label="Invalid spacing"
|
|
554
|
+
padding="not-a-size"
|
|
555
|
+
span={6}
|
|
556
|
+
fullWidth
|
|
557
|
+
background="#ffe0e0"
|
|
558
|
+
/>
|
|
559
|
+
</GridLayout>
|
|
560
|
+
</Box>
|
|
561
|
+
|
|
562
|
+
<Typography variant="h6" gutterBottom>Extreme Values</Typography>
|
|
563
|
+
<GridLayout spacing="x-large">
|
|
564
|
+
<TextField
|
|
565
|
+
label="Zero dimensions"
|
|
566
|
+
width={0}
|
|
567
|
+
height={0}
|
|
568
|
+
span={4}
|
|
569
|
+
background="#f0f0f0"
|
|
570
|
+
/>
|
|
571
|
+
<TextField
|
|
572
|
+
label="Large padding"
|
|
573
|
+
padding="50px"
|
|
574
|
+
span={4}
|
|
575
|
+
background="#f0f0f0"
|
|
576
|
+
/>
|
|
577
|
+
<Button
|
|
578
|
+
span={4}
|
|
579
|
+
width="1000px"
|
|
580
|
+
height="100px"
|
|
581
|
+
variant="outlined"
|
|
582
|
+
>
|
|
583
|
+
Oversized Button
|
|
584
|
+
</Button>
|
|
585
|
+
</GridLayout>
|
|
586
|
+
</Box>
|
|
587
|
+
),
|
|
588
|
+
};
|