@qwickapps/react-framework 1.3.4 → 1.4.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/README.md +1688 -2
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.d.ts +7 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/Html.d.ts +28 -18
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Logo.d.ts +12 -35
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +18 -13
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/QwickApp.d.ts +16 -3
- package/dist/components/QwickApp.d.ts.map +1 -1
- package/dist/components/QwickIcon.d.ts +23 -0
- package/dist/components/QwickIcon.d.ts.map +1 -0
- package/dist/components/SafeSpan.d.ts +12 -5
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/Scaffold.d.ts.map +1 -1
- package/dist/components/base/ModelView.d.ts +101 -0
- package/dist/components/base/ModelView.d.ts.map +1 -0
- package/dist/components/base/index.d.ts +11 -0
- package/dist/components/base/index.d.ts.map +1 -0
- package/dist/components/blocks/Article.d.ts +12 -2
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/Code.d.ts +13 -2
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/Content.d.ts.map +1 -1
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
- package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
- package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
- package/dist/components/blocks/Footer.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +27 -13
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +41 -0
- package/dist/components/blocks/Image.d.ts.map +1 -0
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
- package/dist/components/blocks/ProductCard.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +16 -2
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +41 -0
- package/dist/components/blocks/Text.d.ts.map +1 -0
- package/dist/components/blocks/index.d.ts +4 -0
- package/dist/components/blocks/index.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +23 -7
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/forms/FormBlock.d.ts +19 -13
- package/dist/components/forms/FormBlock.d.ts.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +17 -11
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +17 -11
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +16 -10
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/input/SwitchInputField.d.ts +16 -10
- package/dist/components/input/SwitchInputField.d.ts.map +1 -1
- package/dist/components/input/TextField.d.ts.map +1 -1
- package/dist/components/input/TextInputField.d.ts +16 -11
- package/dist/components/input/TextInputField.d.ts.map +1 -1
- package/dist/components/layout/GridCell.d.ts +23 -6
- package/dist/components/layout/GridCell.d.ts.map +1 -1
- package/dist/components/layout/GridLayout.d.ts +24 -23
- package/dist/components/layout/GridLayout.d.ts.map +1 -1
- package/dist/components/pages/FormPage.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +49 -87
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/pages/index.d.ts +2 -2
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/config/AppConfig.d.ts +49 -0
- package/dist/config/AppConfig.d.ts.map +1 -0
- package/dist/config/AppConfigBuilder.d.ts +75 -0
- package/dist/config/AppConfigBuilder.d.ts.map +1 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/types.d.ts +130 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config.d.ts +15 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.esm.js +451 -0
- package/dist/config.js +455 -0
- package/dist/contexts/PrintModeContext.d.ts +27 -0
- package/dist/contexts/PrintModeContext.d.ts.map +1 -0
- package/dist/contexts/QwickAppContext.d.ts +2 -2
- package/dist/contexts/QwickAppContext.d.ts.map +1 -1
- package/dist/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/usePrintMode.d.ts +39 -0
- package/dist/hooks/usePrintMode.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +20722 -16021
- package/dist/index.js +20725 -16010
- package/dist/schemas/CodeSchema.d.ts +2 -1
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/CollapsibleLayoutSchema.d.ts +2 -1
- package/dist/schemas/CollapsibleLayoutSchema.d.ts.map +1 -1
- package/dist/schemas/ContentSchema.d.ts +2 -1
- package/dist/schemas/ContentSchema.d.ts.map +1 -1
- package/dist/schemas/GridCellSchema.d.ts +25 -0
- package/dist/schemas/GridCellSchema.d.ts.map +1 -0
- package/dist/schemas/GridLayoutSchema.d.ts +23 -0
- package/dist/schemas/GridLayoutSchema.d.ts.map +1 -0
- package/dist/schemas/HtmlSchema.d.ts +14 -0
- package/dist/schemas/HtmlSchema.d.ts.map +1 -0
- package/dist/schemas/ImageSchema.d.ts +32 -0
- package/dist/schemas/ImageSchema.d.ts.map +1 -0
- package/dist/schemas/LogoSchema.d.ts +35 -0
- package/dist/schemas/LogoSchema.d.ts.map +1 -0
- package/dist/schemas/MarkdownSchema.d.ts +14 -0
- package/dist/schemas/MarkdownSchema.d.ts.map +1 -0
- package/dist/schemas/PageTemplateSchema.d.ts +31 -0
- package/dist/schemas/PageTemplateSchema.d.ts.map +1 -0
- package/dist/schemas/PrintConfigSchema.d.ts +31 -0
- package/dist/schemas/PrintConfigSchema.d.ts.map +1 -0
- package/dist/schemas/SectionSchema.d.ts +2 -1
- package/dist/schemas/SectionSchema.d.ts.map +1 -1
- package/dist/schemas/TextSchema.d.ts +37 -0
- package/dist/schemas/TextSchema.d.ts.map +1 -0
- package/dist/schemas/ViewModelSchema.d.ts +23 -0
- package/dist/schemas/ViewModelSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +15 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +116 -0
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +66 -0
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +1 -0
- package/dist/schemas/transformers/registry.d.ts +15 -0
- package/dist/schemas/transformers/registry.d.ts.map +1 -0
- package/dist/schemas/types/Serializable.d.ts +46 -0
- package/dist/schemas/types/Serializable.d.ts.map +1 -0
- package/dist/utils/htmlTransform.d.ts.map +1 -1
- package/dist/utils/reactUtils.d.ts +12 -3
- package/dist/utils/reactUtils.d.ts.map +1 -1
- package/package.json +17 -3
- package/src/{components/__tests__ → __tests__/components}/AccessibilityProvider.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Article.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Breadcrumbs.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Button.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/CardListGrid.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/ChoiceInputField.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Code.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Content.integration.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Content.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/CoverImageHeader.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/ErrorBoundary.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/FeatureCard.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/FeatureGrid.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/FeatureGrid.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/Footer.test.tsx +4 -4
- package/src/{components/__tests__ → __tests__/components}/FormBlock.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/HeroBlock.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/HeroBlock.test.tsx +233 -7
- package/src/{components/__tests__ → __tests__/components}/Html.test.tsx +11 -2
- package/src/{components/__tests__ → __tests__/components}/HtmlInputField.test.tsx +3 -3
- package/src/__tests__/components/Logo.test.js +3 -3
- package/src/{components/__tests__ → __tests__/components}/Markdown.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/PageBannerHeader.test.tsx +3 -3
- package/src/{components/__tests__ → __tests__/components}/PaletteSwitcher.test.tsx +3 -3
- package/src/{components/__tests__ → __tests__/components}/ProductCard.test.tsx +4 -4
- package/src/{components/__tests__ → __tests__/components}/SafeSpan.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/SafeSpan.simple.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/SafeSpan.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Section.integration.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Section.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/SelectInputField.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/TextInputField.test.tsx +3 -3
- package/src/{components/__tests__ → __tests__/components}/ThemeSwitcher.test.tsx +3 -3
- package/src/__tests__/components/base/ModelView.test.tsx +220 -0
- package/src/__tests__/components/blocks/Code.performance.test.tsx +625 -0
- package/src/__tests__/components/blocks/Code.serialization.test.tsx +507 -0
- package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +414 -0
- package/src/__tests__/components/blocks/Image.serialization.test.tsx +257 -0
- package/src/__tests__/components/blocks/Section.serialization.test.tsx +553 -0
- package/src/__tests__/components/blocks/Text.performance.test.tsx +442 -0
- package/src/__tests__/components/blocks/Text.serialization.test.tsx +491 -0
- package/src/__tests__/components/buttons/Button.serialization.test.tsx +443 -0
- package/src/__tests__/components/input/FormComponents.serialization.test.tsx +482 -0
- package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +439 -0
- package/src/__tests__/components/input/TextInputField.serialization.test.tsx +359 -0
- package/src/{components/layout/CollapsibleLayout/__tests__ → __tests__/components/layout}/CollapsibleLayout.test.tsx +4 -4
- package/src/__tests__/components/layout/GridCell.serialization.test.tsx +403 -0
- package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +311 -0
- package/src/__tests__/hooks/usePrintMode.test.ts +89 -0
- package/src/__tests__/schemas/PageTemplateSchema.test.ts +161 -0
- package/src/__tests__/schemas/PrintConfigSchema.test.ts +127 -0
- package/src/__tests__/schemas/ViewModelSchema.test.ts +80 -0
- package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +602 -0
- package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +301 -0
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +521 -0
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +586 -0
- package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +103 -0
- package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +1165 -0
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +602 -0
- package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +691 -0
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +460 -0
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +597 -0
- package/src/{utils/__tests__ → __tests__/utils}/nested-dom-fix.test.tsx +1 -1
- package/src/components/ErrorBoundary.tsx +8 -8
- package/src/components/Html.tsx +147 -44
- package/src/components/Logo.tsx +198 -100
- package/src/components/Markdown.tsx +125 -16
- package/src/components/QwickApp.tsx +64 -31
- package/src/components/QwickIcon.tsx +59 -0
- package/src/components/SafeSpan.tsx +65 -10
- package/src/components/Scaffold.tsx +2 -8
- package/src/components/base/ModelView.tsx +199 -0
- package/src/components/base/index.ts +11 -0
- package/src/components/blocks/Article.tsx +57 -18
- package/src/components/blocks/Code.md +529 -0
- package/src/components/blocks/Code.tsx +102 -15
- package/src/components/blocks/Content.tsx +25 -77
- package/src/components/blocks/CoverImageHeader.tsx +9 -4
- package/src/components/blocks/FeatureCard.tsx +1 -2
- package/src/components/blocks/FeatureGrid.tsx +19 -1
- package/src/components/blocks/Footer.tsx +13 -1
- package/src/components/blocks/HeroBlock.tsx +87 -20
- package/src/components/blocks/Image.tsx +395 -0
- package/src/components/blocks/PageBannerHeader.tsx +14 -12
- package/src/components/blocks/ProductCard.tsx +51 -52
- package/src/components/blocks/Section.tsx +113 -8
- package/src/components/blocks/Text.tsx +285 -0
- package/src/components/blocks/index.ts +4 -0
- package/src/components/buttons/Button.tsx +184 -15
- package/src/components/forms/FormBlock.tsx +70 -17
- package/src/components/index.ts +5 -0
- package/src/components/input/ChoiceInputField.tsx +48 -18
- package/src/components/input/HtmlInputField.tsx +48 -18
- package/src/components/input/SelectInputField.tsx +48 -16
- package/src/components/input/SwitchInputField.tsx +48 -17
- package/src/components/input/TextField.tsx +41 -1
- package/src/components/input/TextInputField.tsx +52 -18
- package/src/components/layout/GridCell.tsx +118 -9
- package/src/components/layout/GridLayout.tsx +125 -24
- package/src/components/pages/FormPage.tsx +0 -1
- package/src/components/pages/Page.css +304 -332
- package/src/components/pages/Page.tsx +307 -255
- package/src/components/pages/index.ts +2 -2
- package/src/config/AppConfig.ts +133 -0
- package/src/config/AppConfigBuilder.ts +421 -0
- package/src/config/__tests__/AppConfig.test.ts +385 -0
- package/src/config/__tests__/AppConfigBuilder.test.ts +432 -0
- package/src/config/index.ts +24 -0
- package/src/config/types.ts +170 -0
- package/src/config.ts +25 -0
- package/src/contexts/PrintModeContext.tsx +332 -0
- package/src/contexts/QwickAppContext.tsx +2 -2
- package/src/contexts/ThemeContext.tsx +1 -2
- package/src/contexts/index.ts +2 -0
- package/src/hooks/index.ts +5 -1
- package/src/hooks/usePrintMode.ts +73 -0
- package/src/index.ts +3 -0
- package/src/schemas/CodeSchema.ts +3 -3
- package/src/schemas/CollapsibleLayoutSchema.ts +2 -1
- package/src/schemas/ContentSchema.ts +2 -1
- package/src/schemas/GridCellSchema.ts +164 -0
- package/src/schemas/GridLayoutSchema.ts +133 -0
- package/src/schemas/HtmlSchema.ts +47 -0
- package/src/schemas/ImageSchema.ts +235 -0
- package/src/schemas/LogoSchema.ts +241 -0
- package/src/schemas/MarkdownSchema.ts +47 -0
- package/src/schemas/PageTemplateSchema.ts +186 -0
- package/src/schemas/PrintConfigSchema.ts +207 -0
- package/src/schemas/README.md +661 -0
- package/src/schemas/SectionSchema.ts +2 -1
- package/src/schemas/TextSchema.ts +329 -0
- package/src/schemas/ViewModelSchema.ts +115 -0
- package/src/schemas/index.ts +21 -2
- package/src/schemas/transformers/ComponentTransformer.ts +403 -0
- package/src/schemas/transformers/ReactNodeTransformer.ts +236 -0
- package/src/schemas/transformers/registry.ts +72 -0
- package/src/schemas/types/Serializable.ts +51 -0
- package/src/stories/AccessibilityProvider.stories.tsx +253 -253
- package/src/stories/Article.stories.tsx +433 -433
- package/src/stories/Button.stories.tsx +1 -1
- package/src/stories/CardListGrid.stories.tsx +451 -451
- package/src/stories/ChoiceInputField.stories.tsx +503 -503
- package/src/stories/Code.stories.tsx +1 -1
- package/src/stories/CollapsibleLayout.stories.tsx +1414 -1414
- package/src/stories/Content.stories.tsx +393 -393
- package/src/stories/CoverImageHeader.stories.tsx +701 -701
- package/src/stories/DataBinding.advanced.stories.tsx +432 -432
- package/src/stories/DataProvider.stories.tsx +1192 -1192
- package/src/stories/FeatureCard.stories.tsx +557 -557
- package/src/stories/FeatureGrid.stories.tsx +594 -594
- package/src/stories/Footer.stories.tsx +640 -640
- package/src/stories/FormBlock.stories.tsx +760 -760
- package/src/stories/FormComponents.stories.tsx +349 -541
- package/src/stories/GridCell.stories.tsx +417 -0
- package/src/stories/GridLayout.stories.tsx +353 -0
- package/src/stories/HeroBlock.stories.tsx +862 -373
- package/src/stories/HtmlInputField.stories.tsx +474 -474
- package/src/stories/Image.stories.tsx +819 -0
- package/src/stories/Introduction.stories.tsx +667 -667
- package/src/stories/LayoutBlocks.stories.tsx +324 -324
- package/src/stories/Logo.stories.tsx +165 -6
- package/src/stories/Markdown.stories.tsx +137 -137
- package/src/stories/ModelView.stories.tsx +477 -0
- package/src/stories/Page.stories.tsx +688 -688
- package/src/stories/PageBannerHeader.stories.tsx +864 -864
- package/src/stories/PaletteSwitcher.stories.tsx +119 -119
- package/src/stories/ProductCard.stories.tsx +424 -424
- package/src/stories/QwickApp.stories.tsx +368 -368
- package/src/stories/ResponsiveMenu.stories.tsx +249 -249
- package/src/stories/SafeSpan.stories.tsx +531 -531
- package/src/stories/Section.stories.tsx +90 -2
- package/src/stories/SelectInputField.stories.tsx +524 -524
- package/src/stories/Text.stories.tsx +560 -0
- package/src/stories/TextInputField.stories.tsx +443 -443
- package/src/stories/ThemeSwitcher.stories.tsx +123 -123
- package/src/utils/htmlTransform.tsx +74 -53
- package/src/utils/reactUtils.tsx +57 -6
- package/dist/index.bundled.css +0 -12
- /package/src/{hooks/__tests__ → __tests__/hooks}/useDataBinding.test.tsx.disabled +0 -0
- /package/src/{schemas/__tests__ → __tests__/schemas}/builders.test.ts +0 -0
- /package/src/{utils/__tests__ → __tests__/utils}/createDataDrivenComponent.test.tsx.disabled +0 -0
- /package/src/{utils/__tests__ → __tests__/utils}/htmlTransform.test.tsx +0 -0
- /package/src/{utils/__tests__ → __tests__/utils}/optional-logging.test.ts +0 -0
|
@@ -13,116 +13,116 @@ import QwickApp from '../components/QwickApp';
|
|
|
13
13
|
|
|
14
14
|
// Sample data for different card types
|
|
15
15
|
const sampleProducts = [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
16
|
+
{
|
|
17
|
+
id: 'product-1',
|
|
18
|
+
name: 'QwickApps React Framework',
|
|
19
|
+
category: 'Frontend Framework',
|
|
20
|
+
description: 'A comprehensive React framework for building modern web applications with AI-driven component generation and data binding.',
|
|
21
|
+
shortDescription: 'React framework for modern web apps',
|
|
22
|
+
features: ['AI-driven components', 'Data binding', 'Enterprise ready'],
|
|
23
|
+
technologies: ['React', 'TypeScript', 'Material-UI'],
|
|
24
|
+
status: 'launched',
|
|
25
|
+
image: 'https://via.placeholder.com/400x200/1976d2/ffffff?text=QwickApps+Framework'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'product-2',
|
|
29
|
+
name: 'QwickApps CMS',
|
|
30
|
+
category: 'Content Management',
|
|
31
|
+
description: 'Headless CMS built for developers with powerful API and visual editing capabilities.',
|
|
32
|
+
shortDescription: 'Developer-friendly headless CMS',
|
|
33
|
+
features: ['RESTful APIs', 'Visual editing', 'Multi-tenant'],
|
|
34
|
+
technologies: ['Node.js', 'PostgreSQL', 'GraphQL'],
|
|
35
|
+
status: 'beta',
|
|
36
|
+
image: 'https://via.placeholder.com/400x200/388e3c/ffffff?text=QwickApps+CMS'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'product-3',
|
|
40
|
+
name: 'QwickApps AI',
|
|
41
|
+
category: 'AI Platform',
|
|
42
|
+
description: 'AI-powered development assistant for generating components and optimizing code.',
|
|
43
|
+
shortDescription: 'AI development assistant',
|
|
44
|
+
features: ['Code generation', 'Performance optimization', 'Security analysis'],
|
|
45
|
+
technologies: ['Python', 'TensorFlow', 'OpenAI API'],
|
|
46
|
+
status: 'coming-soon',
|
|
47
|
+
image: 'https://via.placeholder.com/400x200/7b1fa2/ffffff?text=QwickApps+AI'
|
|
48
|
+
}
|
|
49
49
|
];
|
|
50
50
|
|
|
51
51
|
const sampleFeatures = [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
52
|
+
{
|
|
53
|
+
id: 'feature-1',
|
|
54
|
+
title: 'Lightning Fast',
|
|
55
|
+
description: 'Optimized for performance with minimal bundle size and efficient rendering.',
|
|
56
|
+
icon: ''
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'feature-2',
|
|
60
|
+
title: 'Type Safe',
|
|
61
|
+
description: 'Built with TypeScript for better developer experience and fewer runtime errors.',
|
|
62
|
+
icon: ''
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'feature-3',
|
|
66
|
+
title: 'Scalable',
|
|
67
|
+
description: 'Enterprise-grade architecture that scales with your application needs.',
|
|
68
|
+
icon: '📈'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'feature-4',
|
|
72
|
+
title: 'Flexible',
|
|
73
|
+
description: 'Customizable components that adapt to your design requirements.',
|
|
74
|
+
icon: ''
|
|
75
|
+
}
|
|
76
76
|
];
|
|
77
77
|
|
|
78
78
|
// Sample CMS data for data binding stories with nested structure
|
|
79
79
|
const sampleCmsData = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
80
|
+
'cardListGrids': {
|
|
81
|
+
'products': {
|
|
82
|
+
items: sampleProducts,
|
|
83
|
+
renderComponent: 'ProductCard',
|
|
84
|
+
columns: 3,
|
|
85
|
+
spacing: 'large',
|
|
86
|
+
equalHeight: true,
|
|
87
|
+
itemProps: { variant: 'compact', maxFeaturesCompact: 2 }
|
|
88
|
+
},
|
|
89
|
+
'features': {
|
|
90
|
+
items: sampleFeatures,
|
|
91
|
+
renderComponent: 'FeatureCard',
|
|
92
|
+
columns: 2,
|
|
93
|
+
spacing: 'large',
|
|
94
|
+
equalHeight: false,
|
|
95
|
+
itemProps: { variant: 'detailed' }
|
|
96
|
+
},
|
|
97
|
+
'product-showcase': {
|
|
98
|
+
items: sampleProducts.slice(0, 2),
|
|
99
|
+
renderComponent: 'ProductCard',
|
|
100
|
+
columns: 2,
|
|
101
|
+
spacing: 'huge',
|
|
102
|
+
equalHeight: true,
|
|
103
|
+
itemProps: { variant: 'detailed', showTechnologies: true }
|
|
104
|
+
},
|
|
105
|
+
'feature-compact': {
|
|
106
|
+
items: sampleFeatures,
|
|
107
|
+
renderComponent: 'FeatureCard',
|
|
108
|
+
columns: 4,
|
|
109
|
+
spacing: 'medium',
|
|
110
|
+
equalHeight: true,
|
|
111
|
+
itemProps: { variant: 'compact' }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
const dataProvider = new JsonDataProvider({ data: sampleCmsData });
|
|
117
117
|
|
|
118
118
|
const meta = {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
title: 'Blocks/CardListGrid',
|
|
120
|
+
component: CardListGrid,
|
|
121
|
+
parameters: {
|
|
122
|
+
layout: 'padded',
|
|
123
|
+
docs: {
|
|
124
|
+
description: {
|
|
125
|
+
component: `CardListGrid is a versatile grid layout component that can display any type of card component with consistent spacing and responsive design.
|
|
126
126
|
|
|
127
127
|
**Key Features:**
|
|
128
128
|
- **Universal Grid Layout**: Works with ProductCard, FeatureCard, or any custom card component
|
|
@@ -141,10 +141,10 @@ const meta = {
|
|
|
141
141
|
- Blog post collections
|
|
142
142
|
- Team member grids
|
|
143
143
|
- Portfolio layouts`,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
tags: ['autodocs'],
|
|
148
148
|
} satisfies Meta<typeof CardListGrid>;
|
|
149
149
|
|
|
150
150
|
export default meta;
|
|
@@ -152,388 +152,388 @@ type Story = StoryObj<typeof CardListGrid>;
|
|
|
152
152
|
|
|
153
153
|
// Traditional Usage Examples
|
|
154
154
|
export const ProductGrid: Story = {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
155
|
+
render: () => (
|
|
156
|
+
<QwickApp appId="cardlistgrid-products" appName='Product Grid'>
|
|
157
|
+
<CardListGrid
|
|
158
|
+
items={sampleProducts}
|
|
159
|
+
renderComponent="ProductCard"
|
|
160
|
+
columns={3}
|
|
161
|
+
spacing="large"
|
|
162
|
+
equalHeight={true}
|
|
163
|
+
itemProps={{ variant: 'compact', maxFeaturesCompact: 2 }}
|
|
164
|
+
/>
|
|
165
|
+
</QwickApp>
|
|
166
|
+
),
|
|
167
|
+
parameters: {
|
|
168
|
+
docs: {
|
|
169
|
+
description: {
|
|
170
|
+
story: 'Grid of ProductCards with consistent spacing and equal height alignment.',
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
export const FeatureGrid: Story = {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
177
|
+
render: () => (
|
|
178
|
+
<QwickApp appId="cardlistgrid-features" appName='Feature Grid'>
|
|
179
|
+
<CardListGrid
|
|
180
|
+
items={sampleFeatures}
|
|
181
|
+
renderComponent="FeatureCard"
|
|
182
|
+
columns={2}
|
|
183
|
+
spacing="large"
|
|
184
|
+
equalHeight={false}
|
|
185
|
+
itemProps={{ variant: 'detailed' }}
|
|
186
|
+
/>
|
|
187
|
+
</QwickApp>
|
|
188
|
+
),
|
|
189
|
+
parameters: {
|
|
190
|
+
docs: {
|
|
191
|
+
description: {
|
|
192
|
+
story: 'Grid of FeatureCards with detailed variant and natural height variation.',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
export const CustomRenderFunction: Story = {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
199
|
+
render: () => {
|
|
200
|
+
const customRenderItem = (item: any, index: number) => (
|
|
201
|
+
<Box
|
|
202
|
+
key={item.id || index}
|
|
203
|
+
sx={{
|
|
204
|
+
p: 3,
|
|
205
|
+
border: 1,
|
|
206
|
+
borderColor: 'divider',
|
|
207
|
+
borderRadius: 2,
|
|
208
|
+
textAlign: 'center',
|
|
209
|
+
backgroundColor: 'background.paper'
|
|
210
|
+
}}
|
|
211
|
+
>
|
|
212
|
+
<Typography variant="h6" gutterBottom>{item.name}</Typography>
|
|
213
|
+
<Typography variant="body2" color="text.secondary">
|
|
214
|
+
{item.shortDescription || item.description}
|
|
215
|
+
</Typography>
|
|
216
|
+
</Box>
|
|
217
|
+
);
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
219
|
+
return (
|
|
220
|
+
<QwickApp appId="cardlistgrid-custom" appName='Custom Render Grid'>
|
|
221
|
+
<CardListGrid
|
|
222
|
+
items={sampleProducts}
|
|
223
|
+
renderItem={customRenderItem}
|
|
224
|
+
columns={3}
|
|
225
|
+
spacing="medium"
|
|
226
|
+
/>
|
|
227
|
+
</QwickApp>
|
|
228
|
+
);
|
|
229
|
+
},
|
|
230
|
+
parameters: {
|
|
231
|
+
docs: {
|
|
232
|
+
description: {
|
|
233
|
+
story: 'Using a custom render function to create unique card layouts with complete control over appearance.',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
237
|
};
|
|
238
238
|
|
|
239
239
|
export const ColumnVariations: Story = {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
240
|
+
render: () => (
|
|
241
|
+
<QwickApp appId="cardlistgrid-columns" appName='Column Variations'>
|
|
242
|
+
<Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
|
|
243
|
+
|
|
244
|
+
<Box>
|
|
245
|
+
<Typography variant="h6" gutterBottom>Single Column Layout</Typography>
|
|
246
|
+
<CardListGrid
|
|
247
|
+
items={[sampleProducts[0]]}
|
|
248
|
+
renderComponent="ProductCard"
|
|
249
|
+
columns={1}
|
|
250
|
+
spacing="large"
|
|
251
|
+
itemProps={{ variant: 'detailed', showTechnologies: true }}
|
|
252
|
+
/>
|
|
253
|
+
</Box>
|
|
254
|
+
|
|
255
|
+
<Box>
|
|
256
|
+
<Typography variant="h6" gutterBottom>Two Column Layout</Typography>
|
|
257
|
+
<CardListGrid
|
|
258
|
+
items={sampleProducts.slice(0, 2)}
|
|
259
|
+
renderComponent="ProductCard"
|
|
260
|
+
columns={2}
|
|
261
|
+
spacing="large"
|
|
262
|
+
itemProps={{ variant: 'compact' }}
|
|
263
|
+
/>
|
|
264
|
+
</Box>
|
|
265
|
+
|
|
266
|
+
<Box>
|
|
267
|
+
<Typography variant="h6" gutterBottom>Four Column Layout</Typography>
|
|
268
|
+
<CardListGrid
|
|
269
|
+
items={sampleFeatures}
|
|
270
|
+
renderComponent="FeatureCard"
|
|
271
|
+
columns={4}
|
|
272
|
+
spacing="medium"
|
|
273
|
+
itemProps={{ variant: 'compact' }}
|
|
274
|
+
/>
|
|
275
|
+
</Box>
|
|
276
|
+
|
|
277
|
+
</Box>
|
|
278
|
+
</QwickApp>
|
|
279
|
+
),
|
|
280
|
+
parameters: {
|
|
281
|
+
docs: {
|
|
282
|
+
description: {
|
|
283
|
+
story: 'Different column configurations showing how the grid adapts to various layout needs.',
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
export const SpacingOptions: Story = {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
290
|
+
render: () => (
|
|
291
|
+
<QwickApp appId="cardlistgrid-spacing" appName='Spacing Options'>
|
|
292
|
+
<Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
|
|
293
|
+
|
|
294
|
+
<Box>
|
|
295
|
+
<Typography variant="h6" gutterBottom>Small Spacing</Typography>
|
|
296
|
+
<CardListGrid
|
|
297
|
+
items={sampleFeatures.slice(0, 2)}
|
|
298
|
+
renderComponent="FeatureCard"
|
|
299
|
+
columns={2}
|
|
300
|
+
spacing="small"
|
|
301
|
+
itemProps={{ variant: 'compact' }}
|
|
302
|
+
/>
|
|
303
|
+
</Box>
|
|
304
|
+
|
|
305
|
+
<Box>
|
|
306
|
+
<Typography variant="h6" gutterBottom>Large Spacing</Typography>
|
|
307
|
+
<CardListGrid
|
|
308
|
+
items={sampleFeatures.slice(0, 2)}
|
|
309
|
+
renderComponent="FeatureCard"
|
|
310
|
+
columns={2}
|
|
311
|
+
spacing="large"
|
|
312
|
+
itemProps={{ variant: 'compact' }}
|
|
313
|
+
/>
|
|
314
|
+
</Box>
|
|
315
|
+
|
|
316
|
+
<Box>
|
|
317
|
+
<Typography variant="h6" gutterBottom>Huge Spacing</Typography>
|
|
318
|
+
<CardListGrid
|
|
319
|
+
items={sampleFeatures.slice(0, 2)}
|
|
320
|
+
renderComponent="FeatureCard"
|
|
321
|
+
columns={2}
|
|
322
|
+
spacing="huge"
|
|
323
|
+
itemProps={{ variant: 'compact' }}
|
|
324
|
+
/>
|
|
325
|
+
</Box>
|
|
326
|
+
|
|
327
|
+
</Box>
|
|
328
|
+
</QwickApp>
|
|
329
|
+
),
|
|
330
|
+
parameters: {
|
|
331
|
+
docs: {
|
|
332
|
+
description: {
|
|
333
|
+
story: 'Different spacing options demonstrating visual density and breathing room between cards.',
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
337
|
};
|
|
338
338
|
|
|
339
339
|
// Data Binding Examples
|
|
340
340
|
export const DataBindingBasic: Story = {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
341
|
+
render: () => (
|
|
342
|
+
<QwickApp appId="cardlistgrid-data-binding" appName='CardListGrid Data Binding' dataSource={{ dataProvider }}>
|
|
343
|
+
<Box>
|
|
344
|
+
|
|
345
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
346
|
+
<Typography variant="h5" gutterBottom> Data-Driven CardListGrid</Typography>
|
|
347
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
348
|
+
CardListGrid can be completely driven by CMS data, automatically rendering the specified component type with configured properties.
|
|
349
|
+
</Typography>
|
|
350
|
+
|
|
351
|
+
<Code title="Usage" language="tsx">{`<CardListGrid dataSource="cardListGrids.products" />`}</Code>
|
|
352
|
+
|
|
353
|
+
<Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData['cardListGrids']['products'], null, 2)}</Code>
|
|
354
|
+
</Box>
|
|
355
355
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
356
|
+
<CardListGrid dataSource="cardListGrids.products" />
|
|
357
|
+
|
|
358
|
+
</Box>
|
|
359
|
+
</QwickApp>
|
|
360
|
+
),
|
|
361
|
+
parameters: {
|
|
362
|
+
docs: {
|
|
363
|
+
description: {
|
|
364
|
+
story: 'CardListGrid with data binding - all configuration resolved from CMS data through dataSource.',
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
368
|
};
|
|
369
369
|
|
|
370
370
|
export const DataBindingAdvanced: Story = {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
371
|
+
render: () => (
|
|
372
|
+
<QwickApp appId="cardlistgrid-data-advanced" appName='Advanced CardListGrid Data Binding' dataSource={{ dataProvider }}>
|
|
373
|
+
<Box>
|
|
374
|
+
|
|
375
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
376
|
+
<Typography variant="h5" gutterBottom> Multiple Grid Types</Typography>
|
|
377
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
378
|
+
Different CardListGrid instances can render different component types from separate data sources.
|
|
379
|
+
</Typography>
|
|
380
|
+
</Box>
|
|
381
381
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
382
|
+
{/* Product Showcase */}
|
|
383
|
+
<Box sx={{ mb: 4 }}>
|
|
384
|
+
<Typography variant="h4" gutterBottom>Product Showcase</Typography>
|
|
385
|
+
<CardListGrid dataSource="cardListGrids.product-showcase" />
|
|
386
|
+
</Box>
|
|
387
387
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
388
|
+
{/* Feature Grid */}
|
|
389
|
+
<Box sx={{ mb: 4 }}>
|
|
390
|
+
<Typography variant="h4" gutterBottom>Key Features</Typography>
|
|
391
|
+
<CardListGrid dataSource="cardListGrids.feature-compact" />
|
|
392
|
+
</Box>
|
|
393
|
+
|
|
394
|
+
</Box>
|
|
395
|
+
</QwickApp>
|
|
396
|
+
),
|
|
397
|
+
parameters: {
|
|
398
|
+
docs: {
|
|
399
|
+
description: {
|
|
400
|
+
story: 'Advanced data binding with multiple grid types showcasing different component configurations.',
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
404
|
};
|
|
405
405
|
|
|
406
406
|
export const DataBindingWithFallback: Story = {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
407
|
+
render: () => (
|
|
408
|
+
<QwickApp appId="cardlistgrid-fallback" appName='CardListGrid Data Binding with Fallback' dataSource={{ dataProvider }}>
|
|
409
|
+
<Box>
|
|
410
|
+
|
|
411
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
412
|
+
<Typography variant="h5" gutterBottom> Fallback Support</Typography>
|
|
413
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
414
|
+
CardListGrid gracefully handles missing data sources with fallback props and items.
|
|
415
|
+
</Typography>
|
|
416
|
+
|
|
417
|
+
<Code title="Fallback Usage" language="tsx">{`<CardListGrid
|
|
418
|
+
dataSource="cardListGrids.nonexistent"
|
|
419
|
+
items={fallbackItems}
|
|
420
|
+
renderComponent="ProductCard"
|
|
421
|
+
columns={2}
|
|
422
422
|
/>`}</Code>
|
|
423
|
-
|
|
423
|
+
</Box>
|
|
424
424
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
425
|
+
<Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
|
|
426
|
+
<Box>
|
|
427
|
+
<Typography variant="h6" gutterBottom>Missing Data Source (Fallback)</Typography>
|
|
428
|
+
<CardListGrid
|
|
429
|
+
dataSource="nonexistent.grid"
|
|
430
|
+
items={sampleProducts.slice(0, 2)}
|
|
431
|
+
renderComponent="ProductCard"
|
|
432
|
+
columns={1}
|
|
433
|
+
spacing="medium"
|
|
434
|
+
itemProps={{ variant: 'compact' }}
|
|
435
|
+
/>
|
|
436
|
+
</Box>
|
|
437
|
+
<Box>
|
|
438
|
+
<Typography variant="h6" gutterBottom>Valid Data Source</Typography>
|
|
439
|
+
<CardListGrid dataSource="cardListGrids.features" />
|
|
440
|
+
</Box>
|
|
441
|
+
</Box>
|
|
442
|
+
|
|
443
|
+
</Box>
|
|
444
|
+
</QwickApp>
|
|
445
|
+
),
|
|
446
|
+
parameters: {
|
|
447
|
+
docs: {
|
|
448
|
+
description: {
|
|
449
|
+
story: 'CardListGrid with fallback props when dataSource is missing or unavailable.',
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
453
|
};
|
|
454
454
|
|
|
455
455
|
export const RealWorldExample: Story = {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
456
|
+
render: () => (
|
|
457
|
+
<QwickApp appId="cardlistgrid-real-world" appName='Real World CardListGrid Example' dataSource={{ dataProvider }}>
|
|
458
|
+
<Box>
|
|
459
|
+
|
|
460
|
+
{/* Hero Products */}
|
|
461
|
+
<Box sx={{ mb: 6 }}>
|
|
462
|
+
<Typography variant="h3" gutterBottom>Our Products</Typography>
|
|
463
|
+
<Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
|
|
464
|
+
Comprehensive solutions for modern web development
|
|
465
|
+
</Typography>
|
|
466
|
+
<CardListGrid dataSource="cardListGrids.products" />
|
|
467
|
+
</Box>
|
|
468
|
+
|
|
469
|
+
{/* Features Section */}
|
|
470
|
+
<Box sx={{ mb: 6 }}>
|
|
471
|
+
<Typography variant="h3" gutterBottom>Why Choose QwickApps?</Typography>
|
|
472
|
+
<Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
|
|
473
|
+
Built for developers who demand excellence
|
|
474
|
+
</Typography>
|
|
475
|
+
<CardListGrid dataSource="cardListGrids.feature-compact" />
|
|
476
|
+
</Box>
|
|
477
|
+
|
|
478
|
+
{/* Detailed Product Showcase */}
|
|
479
|
+
<Box>
|
|
480
|
+
<Typography variant="h3" gutterBottom>Featured Solutions</Typography>
|
|
481
|
+
<Typography variant="h6" sx={{ mb: 4, opacity: 0.7 }}>
|
|
482
|
+
Deep dive into our flagship offerings
|
|
483
|
+
</Typography>
|
|
484
|
+
<CardListGrid dataSource="cardListGrids.product-showcase" />
|
|
485
|
+
</Box>
|
|
486
|
+
|
|
487
|
+
</Box>
|
|
488
|
+
</QwickApp>
|
|
489
|
+
),
|
|
490
|
+
parameters: {
|
|
491
|
+
docs: {
|
|
492
|
+
description: {
|
|
493
|
+
story: 'Real-world example combining multiple CardListGrid instances in a complete landing page layout.',
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
497
|
};
|
|
498
498
|
|
|
499
499
|
export const EmptyAndLoadingStates: Story = {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
500
|
+
render: () => (
|
|
501
|
+
<QwickApp appId="cardlistgrid-states" appName='CardListGrid States' dataSource={{ dataProvider }}>
|
|
502
|
+
<Box>
|
|
503
|
+
|
|
504
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
505
|
+
<Typography variant="h5" gutterBottom> State Management</Typography>
|
|
506
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
507
|
+
CardListGrid handles various states including empty data and component type switching.
|
|
508
|
+
</Typography>
|
|
509
|
+
</Box>
|
|
510
510
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
511
|
+
<Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 }}>
|
|
512
|
+
<Box>
|
|
513
|
+
<Typography variant="h6" gutterBottom>Empty Items (Returns null)</Typography>
|
|
514
|
+
<CardListGrid
|
|
515
|
+
items={[]}
|
|
516
|
+
renderComponent="ProductCard"
|
|
517
|
+
columns={2}
|
|
518
|
+
/>
|
|
519
|
+
<Typography variant="body2" color="text.secondary" sx={{ mt: 2 }}>
|
|
520
|
+
Component returns null when no items are provided
|
|
521
|
+
</Typography>
|
|
522
|
+
</Box>
|
|
523
|
+
<Box>
|
|
524
|
+
<Typography variant="h6" gutterBottom>Valid Grid</Typography>
|
|
525
|
+
<CardListGrid dataSource="cardListGrids.features" />
|
|
526
|
+
</Box>
|
|
527
|
+
</Box>
|
|
528
|
+
|
|
529
|
+
</Box>
|
|
530
|
+
</QwickApp>
|
|
531
|
+
),
|
|
532
|
+
parameters: {
|
|
533
|
+
docs: {
|
|
534
|
+
description: {
|
|
535
|
+
story: 'Demonstrates empty state handling and normal grid display states.',
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
539
|
};
|