@qwickapps/react-framework 1.3.5 → 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 +1681 -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/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/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/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 +10951 -6238
- package/dist/index.js +11014 -6287
- 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/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 +1 -1
- 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/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
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
Archive as ArchiveIcon,
|
|
9
|
+
Delete as DeleteIcon,
|
|
10
|
+
Download as DownloadIcon,
|
|
11
|
+
Edit as EditIcon,
|
|
12
|
+
Favorite as FavoriteIcon,
|
|
13
|
+
Settings as SettingsIcon,
|
|
14
|
+
Share as ShareIcon
|
|
15
15
|
} from '@mui/icons-material';
|
|
16
16
|
import { Box, Typography } from '@mui/material';
|
|
17
17
|
import { JsonDataProvider } from '@qwickapps/schema';
|
|
@@ -21,13 +21,13 @@ import CoverImageHeader from '../components/blocks/CoverImageHeader';
|
|
|
21
21
|
import QwickApp from '../components/QwickApp';
|
|
22
22
|
|
|
23
23
|
const meta: Meta<typeof CoverImageHeader> = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
title: 'Blocks/CoverImageHeader',
|
|
25
|
+
component: CoverImageHeader,
|
|
26
|
+
parameters: {
|
|
27
|
+
layout: 'padded',
|
|
28
|
+
docs: {
|
|
29
|
+
description: {
|
|
30
|
+
component: `The CoverImageHeader component provides a flexible header layout with optional image, information section, and contextual actions.
|
|
31
31
|
|
|
32
32
|
**Key Features:**
|
|
33
33
|
- **Optional Image**: Supports URL string or custom React component with configurable size and shape
|
|
@@ -42,63 +42,63 @@ const meta: Meta<typeof CoverImageHeader> = {
|
|
|
42
42
|
- Product listings with actions
|
|
43
43
|
- Profile sections and team cards
|
|
44
44
|
- Dashboard headers with quick actions`,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
tags: ['autodocs'],
|
|
49
|
+
argTypes: {
|
|
50
|
+
image: {
|
|
51
|
+
description: 'Optional image URL or React component',
|
|
52
|
+
control: { type: 'text' },
|
|
53
|
+
},
|
|
54
|
+
imageAlt: {
|
|
55
|
+
description: 'Image alt text (when using URL)',
|
|
56
|
+
control: { type: 'text' },
|
|
57
|
+
},
|
|
58
|
+
imageSize: {
|
|
59
|
+
description: 'Image size variant',
|
|
60
|
+
control: { type: 'select' },
|
|
61
|
+
options: ['small', 'medium', 'large'],
|
|
62
|
+
},
|
|
63
|
+
imageShape: {
|
|
64
|
+
description: 'Image shape',
|
|
65
|
+
control: { type: 'select' },
|
|
66
|
+
options: ['square', 'circle', 'rounded'],
|
|
67
|
+
},
|
|
68
|
+
overline: {
|
|
69
|
+
description: 'Optional overline text (appears above title)',
|
|
70
|
+
control: { type: 'text' },
|
|
71
|
+
},
|
|
72
|
+
title: {
|
|
73
|
+
description: 'Main title text',
|
|
74
|
+
control: { type: 'text' },
|
|
75
|
+
},
|
|
76
|
+
subtitle: {
|
|
77
|
+
description: 'Optional subtitle text',
|
|
78
|
+
control: { type: 'text' },
|
|
79
|
+
},
|
|
80
|
+
tags: {
|
|
81
|
+
description: 'Array of tag strings',
|
|
82
|
+
control: { type: 'object' },
|
|
83
|
+
},
|
|
84
|
+
actions: {
|
|
85
|
+
description: 'Context menu actions',
|
|
86
|
+
control: false,
|
|
87
|
+
},
|
|
88
|
+
maxVisibleActions: {
|
|
89
|
+
description: 'Maximum number of actions to show as buttons',
|
|
90
|
+
control: { type: 'number', min: 1, max: 5 },
|
|
91
|
+
},
|
|
92
|
+
variant: {
|
|
93
|
+
description: 'Header variant',
|
|
94
|
+
control: { type: 'select' },
|
|
95
|
+
options: ['default', 'compact', 'prominent'],
|
|
96
|
+
},
|
|
97
|
+
background: {
|
|
98
|
+
description: 'Background color or image URL',
|
|
99
|
+
control: { type: 'text' },
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
102
|
} satisfies Meta<typeof CoverImageHeader>;
|
|
103
103
|
|
|
104
104
|
export default meta;
|
|
@@ -106,689 +106,689 @@ type Story = StoryObj<typeof meta>;
|
|
|
106
106
|
|
|
107
107
|
// Sample CMS data for data binding stories (following nested structure pattern)
|
|
108
108
|
const sampleCmsData = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
109
|
+
'coverImageHeaders': {
|
|
110
|
+
'teamLead': {
|
|
111
|
+
image: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
|
|
112
|
+
imageAlt: 'John Doe profile photo',
|
|
113
|
+
imageSize: 'large',
|
|
114
|
+
imageShape: 'circle',
|
|
115
|
+
overline: 'TEAM LEAD',
|
|
116
|
+
title: 'John Doe',
|
|
117
|
+
subtitle: 'Senior Product Manager & Team Leader',
|
|
118
|
+
tags: ['Product Strategy', 'Team Leadership', 'Agile', 'Remote Work'],
|
|
119
|
+
maxVisibleActions: 2,
|
|
120
|
+
variant: 'default'
|
|
121
|
+
},
|
|
122
|
+
'projectShowcase': {
|
|
123
|
+
image: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
|
|
124
|
+
imageAlt: 'Dashboard project icon',
|
|
125
|
+
imageSize: 'medium',
|
|
126
|
+
imageShape: 'rounded',
|
|
127
|
+
overline: 'FEATURED PROJECT',
|
|
128
|
+
title: 'Analytics Dashboard 2.0',
|
|
129
|
+
subtitle: 'Real-time business intelligence platform with advanced data visualization',
|
|
130
|
+
tags: ['React', 'TypeScript', 'D3.js', 'Real-time', 'Analytics'],
|
|
131
|
+
variant: 'compact'
|
|
132
|
+
},
|
|
133
|
+
'companyProfile': {
|
|
134
|
+
overline: 'TECHNOLOGY COMPANY',
|
|
135
|
+
title: 'QwickApps Solutions',
|
|
136
|
+
subtitle: 'Building the future of web development with intelligent component systems',
|
|
137
|
+
tags: ['React', 'TypeScript', 'Enterprise', 'Open Source'],
|
|
138
|
+
variant: 'prominent',
|
|
139
|
+
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'
|
|
140
|
+
},
|
|
141
|
+
'productShowcase': {
|
|
142
|
+
image: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
|
|
143
|
+
imageAlt: 'Product showcase',
|
|
144
|
+
imageSize: 'large',
|
|
145
|
+
imageShape: 'square',
|
|
146
|
+
overline: 'PRODUCT SHOWCASE',
|
|
147
|
+
title: 'Smart Task Manager',
|
|
148
|
+
subtitle: 'AI-powered productivity suite with intelligent task prioritization',
|
|
149
|
+
tags: ['Productivity', 'AI', 'Task Management', 'Team Collaboration'],
|
|
150
|
+
variant: 'default'
|
|
151
|
+
},
|
|
152
|
+
'imageLoadingDemo': {
|
|
153
|
+
image: 'https://httpstat.us/200?sleep=3000', // Simulates slow loading image
|
|
154
|
+
imageAlt: 'Slow loading image demo',
|
|
155
|
+
imageSize: 'medium',
|
|
156
|
+
imageShape: 'rounded',
|
|
157
|
+
overline: 'LOADING DEMO',
|
|
158
|
+
title: 'Slow Loading Image Test',
|
|
159
|
+
subtitle: 'Tests image loading states and fallback handling',
|
|
160
|
+
tags: ['Performance', 'Loading', 'Fallback'],
|
|
161
|
+
variant: 'default'
|
|
162
|
+
},
|
|
163
|
+
'imageFallbackDemo': {
|
|
164
|
+
image: 'https://invalid-url-that-will-fail.com/image.jpg',
|
|
165
|
+
imageAlt: 'Image that will fail to load',
|
|
166
|
+
imageSize: 'large',
|
|
167
|
+
imageShape: 'circle',
|
|
168
|
+
overline: 'ERROR DEMO',
|
|
169
|
+
title: 'Image Fallback Test',
|
|
170
|
+
subtitle: 'Tests image error handling and accessibility',
|
|
171
|
+
tags: ['Error Handling', 'Accessibility', 'Fallback'],
|
|
172
|
+
variant: 'default'
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
const dataProvider = new JsonDataProvider({ data: sampleCmsData });
|
|
178
178
|
|
|
179
179
|
// Sample actions for demos
|
|
180
180
|
const sampleActions = [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
181
|
+
{
|
|
182
|
+
id: 'edit',
|
|
183
|
+
label: 'Edit',
|
|
184
|
+
icon: <EditIcon />,
|
|
185
|
+
onClick: () => alert('Edit clicked'),
|
|
186
|
+
priority: 1,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: 'share',
|
|
190
|
+
label: 'Share',
|
|
191
|
+
icon: <ShareIcon />,
|
|
192
|
+
onClick: () => alert('Share clicked'),
|
|
193
|
+
priority: 2,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: 'favorite',
|
|
197
|
+
label: 'Favorite',
|
|
198
|
+
icon: <FavoriteIcon />,
|
|
199
|
+
onClick: () => alert('Added to favorites'),
|
|
200
|
+
priority: 3,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: 'download',
|
|
204
|
+
label: 'Download',
|
|
205
|
+
icon: <DownloadIcon />,
|
|
206
|
+
onClick: () => alert('Downloading...'),
|
|
207
|
+
priority: 4,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: 'settings',
|
|
211
|
+
label: 'Settings',
|
|
212
|
+
icon: <SettingsIcon />,
|
|
213
|
+
onClick: () => alert('Settings opened'),
|
|
214
|
+
priority: 5,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: 'archive',
|
|
218
|
+
label: 'Archive',
|
|
219
|
+
icon: <ArchiveIcon />,
|
|
220
|
+
onClick: () => alert('Archived'),
|
|
221
|
+
destructive: true,
|
|
222
|
+
priority: 6,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: 'delete',
|
|
226
|
+
label: 'Delete',
|
|
227
|
+
icon: <DeleteIcon />,
|
|
228
|
+
onClick: () => alert('Deleted'),
|
|
229
|
+
destructive: true,
|
|
230
|
+
priority: 7,
|
|
231
|
+
},
|
|
232
232
|
];
|
|
233
233
|
|
|
234
234
|
export const Basic: Story = {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
235
|
+
args: {
|
|
236
|
+
title: 'Basic Header Example',
|
|
237
|
+
subtitle: 'Simple header without image or actions',
|
|
238
|
+
},
|
|
239
|
+
render: (args) => (
|
|
240
|
+
<QwickApp appId="cover-header-basic" appName='Cover Header Basic'>
|
|
241
|
+
<CoverImageHeader {...args} />
|
|
242
|
+
</QwickApp>
|
|
243
|
+
),
|
|
244
|
+
parameters: {
|
|
245
|
+
docs: {
|
|
246
|
+
description: {
|
|
247
|
+
story: 'Basic usage with just title and subtitle. Clean and minimal design.',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
251
|
};
|
|
252
252
|
|
|
253
253
|
export const WithImage: Story = {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
254
|
+
args: {
|
|
255
|
+
image: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
|
|
256
|
+
imageAlt: 'Profile photo',
|
|
257
|
+
title: 'John Doe',
|
|
258
|
+
subtitle: 'Senior Software Engineer',
|
|
259
|
+
overline: 'TEAM MEMBER',
|
|
260
|
+
imageSize: 'medium',
|
|
261
|
+
imageShape: 'circle',
|
|
262
|
+
},
|
|
263
|
+
render: (args) => (
|
|
264
|
+
<QwickApp appId="cover-header-image" appName='Cover Header Image'>
|
|
265
|
+
<CoverImageHeader {...args} />
|
|
266
|
+
</QwickApp>
|
|
267
|
+
),
|
|
268
|
+
parameters: {
|
|
269
|
+
docs: {
|
|
270
|
+
description: {
|
|
271
|
+
story: 'Header with profile image, overline, title, and subtitle. Perfect for user cards.',
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
275
|
};
|
|
276
276
|
|
|
277
277
|
export const WithTagsAndActions: Story = {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
278
|
+
args: {
|
|
279
|
+
image: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=200&q=80',
|
|
280
|
+
imageAlt: 'Project thumbnail',
|
|
281
|
+
title: 'React Dashboard Project',
|
|
282
|
+
subtitle: 'Modern admin dashboard with comprehensive analytics and user management',
|
|
283
|
+
overline: 'ACTIVE PROJECT',
|
|
284
|
+
tags: ['React', 'TypeScript', 'Dashboard', 'Material UI'],
|
|
285
|
+
actions: sampleActions.slice(0, 5),
|
|
286
|
+
maxVisibleActions: 3,
|
|
287
|
+
imageSize: 'large',
|
|
288
|
+
imageShape: 'rounded',
|
|
289
|
+
},
|
|
290
|
+
render: (args) => (
|
|
291
|
+
<QwickApp appId="cover-header-full" appName='Cover Header Full'>
|
|
292
|
+
<CoverImageHeader {...args} />
|
|
293
|
+
</QwickApp>
|
|
294
|
+
),
|
|
295
|
+
parameters: {
|
|
296
|
+
docs: {
|
|
297
|
+
description: {
|
|
298
|
+
story: 'Complete example with image, tags, and actions. Shows overflow menu when actions exceed maxVisibleActions.',
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
302
|
};
|
|
303
303
|
|
|
304
304
|
export const ImageSizeVariants: Story = {
|
|
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
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
305
|
+
render: () => (
|
|
306
|
+
<QwickApp appId="cover-header-sizes" appName='Cover Header Sizes'>
|
|
307
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
308
|
+
<CoverImageHeader
|
|
309
|
+
image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
310
|
+
imageAlt="Small image"
|
|
311
|
+
title="Small Image Header"
|
|
312
|
+
subtitle="48px image size"
|
|
313
|
+
imageSize="small"
|
|
314
|
+
imageShape="circle"
|
|
315
|
+
/>
|
|
316
|
+
|
|
317
|
+
<CoverImageHeader
|
|
318
|
+
image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
319
|
+
imageAlt="Medium image"
|
|
320
|
+
title="Medium Image Header"
|
|
321
|
+
subtitle="64px image size (default)"
|
|
322
|
+
imageSize="medium"
|
|
323
|
+
imageShape="circle"
|
|
324
|
+
/>
|
|
325
|
+
|
|
326
|
+
<CoverImageHeader
|
|
327
|
+
image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
328
|
+
imageAlt="Large image"
|
|
329
|
+
title="Large Image Header"
|
|
330
|
+
subtitle="80px image size"
|
|
331
|
+
imageSize="large"
|
|
332
|
+
imageShape="circle"
|
|
333
|
+
/>
|
|
334
|
+
</div>
|
|
335
|
+
</QwickApp>
|
|
336
|
+
),
|
|
337
|
+
parameters: {
|
|
338
|
+
docs: {
|
|
339
|
+
description: {
|
|
340
|
+
story: 'Comparison of different image size variants: small (48px), medium (64px), and large (80px).',
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
344
|
};
|
|
345
345
|
|
|
346
346
|
export const ImageShapeVariants: Story = {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
347
|
+
render: () => (
|
|
348
|
+
<QwickApp appId="cover-header-shapes" appName='Cover Header Shapes'>
|
|
349
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
350
|
+
<CoverImageHeader
|
|
351
|
+
image="https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
352
|
+
imageAlt="Square image"
|
|
353
|
+
title="Square Image"
|
|
354
|
+
subtitle="Sharp corners, perfect for logos"
|
|
355
|
+
imageShape="square"
|
|
356
|
+
imageSize="large"
|
|
357
|
+
/>
|
|
358
|
+
|
|
359
|
+
<CoverImageHeader
|
|
360
|
+
image="https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
361
|
+
imageAlt="Rounded image"
|
|
362
|
+
title="Rounded Image"
|
|
363
|
+
subtitle="Slightly rounded corners (default)"
|
|
364
|
+
imageShape="rounded"
|
|
365
|
+
imageSize="large"
|
|
366
|
+
/>
|
|
367
|
+
|
|
368
|
+
<CoverImageHeader
|
|
369
|
+
image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
370
|
+
imageAlt="Circle image"
|
|
371
|
+
title="Circle Image"
|
|
372
|
+
subtitle="Perfect circles, ideal for avatars"
|
|
373
|
+
imageShape="circle"
|
|
374
|
+
imageSize="large"
|
|
375
|
+
/>
|
|
376
|
+
</div>
|
|
377
|
+
</QwickApp>
|
|
378
|
+
),
|
|
379
|
+
parameters: {
|
|
380
|
+
docs: {
|
|
381
|
+
description: {
|
|
382
|
+
story: 'Comparison of different image shape variants: square, rounded (default), and circle.',
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
386
|
};
|
|
387
387
|
|
|
388
388
|
export const VariantComparison: Story = {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
389
|
+
render: () => (
|
|
390
|
+
<QwickApp appId="cover-header-variants" appName='Cover Header Variants'>
|
|
391
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
392
|
+
<CoverImageHeader
|
|
393
|
+
image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
394
|
+
imageAlt="Compact variant"
|
|
395
|
+
title="Compact Variant"
|
|
396
|
+
subtitle="Reduced padding and spacing"
|
|
397
|
+
tags={['Compact', 'Space-efficient']}
|
|
398
|
+
variant="compact"
|
|
399
|
+
actions={sampleActions.slice(0, 2)}
|
|
400
|
+
/>
|
|
401
|
+
|
|
402
|
+
<CoverImageHeader
|
|
403
|
+
image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
404
|
+
imageAlt="Default variant"
|
|
405
|
+
title="Default Variant"
|
|
406
|
+
subtitle="Balanced padding and spacing"
|
|
407
|
+
tags={['Default', 'Balanced']}
|
|
408
|
+
variant="default"
|
|
409
|
+
actions={sampleActions.slice(0, 2)}
|
|
410
|
+
/>
|
|
411
|
+
|
|
412
|
+
<CoverImageHeader
|
|
413
|
+
image="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80"
|
|
414
|
+
imageAlt="Prominent variant"
|
|
415
|
+
title="Prominent Variant"
|
|
416
|
+
subtitle="Generous padding with centered alignment"
|
|
417
|
+
tags={['Prominent', 'Eye-catching']}
|
|
418
|
+
variant="prominent"
|
|
419
|
+
actions={sampleActions.slice(0, 2)}
|
|
420
|
+
/>
|
|
421
|
+
</div>
|
|
422
|
+
</QwickApp>
|
|
423
|
+
),
|
|
424
|
+
parameters: {
|
|
425
|
+
docs: {
|
|
426
|
+
description: {
|
|
427
|
+
story: 'Comparison of header variants: compact (minimal spacing), default (balanced), and prominent (generous spacing).',
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
431
|
};
|
|
432
432
|
|
|
433
433
|
export const WithBackgroundImage: Story = {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
434
|
+
args: {
|
|
435
|
+
title: 'Hero Section Header',
|
|
436
|
+
subtitle: 'Beautiful background with overlay for better text readability',
|
|
437
|
+
overline: 'FEATURED',
|
|
438
|
+
tags: ['Hero', 'Background', 'Overlay'],
|
|
439
|
+
background: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80',
|
|
440
|
+
variant: 'prominent',
|
|
441
|
+
actions: [
|
|
442
|
+
{
|
|
443
|
+
id: 'cta',
|
|
444
|
+
label: 'Get Started',
|
|
445
|
+
onClick: () => alert('Getting started!'),
|
|
446
|
+
priority: 1,
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
id: 'learn-more',
|
|
450
|
+
label: 'Learn More',
|
|
451
|
+
onClick: () => alert('Learning more...'),
|
|
452
|
+
priority: 2,
|
|
453
|
+
},
|
|
454
|
+
],
|
|
455
|
+
},
|
|
456
|
+
render: (args) => (
|
|
457
|
+
<QwickApp appId="cover-header-background" appName='Cover Header Background'>
|
|
458
|
+
<CoverImageHeader {...args} />
|
|
459
|
+
</QwickApp>
|
|
460
|
+
),
|
|
461
|
+
parameters: {
|
|
462
|
+
docs: {
|
|
463
|
+
description: {
|
|
464
|
+
story: 'Header with background image and automatic overlay for better text contrast. Perfect for hero sections.',
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
468
|
};
|
|
469
469
|
|
|
470
470
|
export const ActionsOverflowDemo: Story = {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
471
|
+
args: {
|
|
472
|
+
image: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&q=80',
|
|
473
|
+
imageAlt: 'Document preview',
|
|
474
|
+
title: 'Document Management',
|
|
475
|
+
subtitle: 'Multiple actions available with overflow menu',
|
|
476
|
+
overline: 'DOCUMENT',
|
|
477
|
+
tags: ['PDF', 'Important', 'Shared'],
|
|
478
|
+
actions: sampleActions,
|
|
479
|
+
maxVisibleActions: 2,
|
|
480
|
+
},
|
|
481
|
+
render: (args) => (
|
|
482
|
+
<QwickApp appId="cover-header-overflow" appName='Cover Header Overflow'>
|
|
483
|
+
<CoverImageHeader {...args} />
|
|
484
|
+
</QwickApp>
|
|
485
|
+
),
|
|
486
|
+
parameters: {
|
|
487
|
+
docs: {
|
|
488
|
+
description: {
|
|
489
|
+
story: 'Demonstrates action overflow functionality. When actions exceed maxVisibleActions, additional actions appear in an overflow menu.',
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
493
|
};
|
|
494
494
|
|
|
495
495
|
export const CustomContent: Story = {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
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
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
496
|
+
args: {
|
|
497
|
+
image: (
|
|
498
|
+
<div style={{
|
|
499
|
+
width: 64,
|
|
500
|
+
height: 64,
|
|
501
|
+
backgroundColor: 'var(--theme-primary)',
|
|
502
|
+
borderRadius: '8px',
|
|
503
|
+
display: 'flex',
|
|
504
|
+
alignItems: 'center',
|
|
505
|
+
justifyContent: 'center',
|
|
506
|
+
fontSize: '1.5rem',
|
|
507
|
+
fontWeight: 'bold',
|
|
508
|
+
color: 'white',
|
|
509
|
+
}}>
|
|
510
|
+
|
|
511
|
+
</div>
|
|
512
|
+
),
|
|
513
|
+
title: 'Custom React Component',
|
|
514
|
+
subtitle: 'Using a custom React component instead of image URL',
|
|
515
|
+
overline: 'CUSTOM',
|
|
516
|
+
tags: [
|
|
517
|
+
'React',
|
|
518
|
+
<span key="special" style={{
|
|
519
|
+
background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4)',
|
|
520
|
+
color: 'white',
|
|
521
|
+
padding: '2px 8px',
|
|
522
|
+
borderRadius: '12px',
|
|
523
|
+
fontSize: '0.75rem',
|
|
524
|
+
fontWeight: 'bold'
|
|
525
|
+
}}>
|
|
526
|
+
Special
|
|
527
|
+
</span>,
|
|
528
|
+
'Component'
|
|
529
|
+
],
|
|
530
|
+
actions: sampleActions.slice(0, 3),
|
|
531
|
+
},
|
|
532
|
+
render: (args) => (
|
|
533
|
+
<QwickApp appId="cover-header-custom" appName='Cover Header Custom'>
|
|
534
|
+
<CoverImageHeader {...args} />
|
|
535
|
+
</QwickApp>
|
|
536
|
+
),
|
|
537
|
+
parameters: {
|
|
538
|
+
docs: {
|
|
539
|
+
description: {
|
|
540
|
+
story: 'Demonstrates custom React components for both image and tag content. Great for icons, badges, and custom layouts.',
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
544
|
};
|
|
545
545
|
|
|
546
546
|
// Data Binding Examples
|
|
547
547
|
export const DataBindingTeamLead: Story = {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
548
|
+
render: () => (
|
|
549
|
+
<QwickApp
|
|
550
|
+
appId="cover-header-data-team"
|
|
551
|
+
appName='Team Lead Data Binding'
|
|
552
|
+
dataSource={{ dataProvider }}
|
|
553
|
+
>
|
|
554
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
555
|
+
|
|
556
|
+
<Box>
|
|
557
|
+
<Typography variant="h5" gutterBottom>👤 Data-Driven Team Lead Header</Typography>
|
|
558
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
559
|
+
CoverImageHeader components can be driven entirely by CMS data using the dataSource prop.
|
|
560
|
+
</Typography>
|
|
561
|
+
|
|
562
|
+
<Code title="Usage" language="tsx">{`<CoverImageHeader dataSource="coverImageHeaders.teamLead" />`}</Code>
|
|
563
|
+
|
|
564
|
+
<Code title="Data Structure" language="json">{JSON.stringify(sampleCmsData.coverImageHeaders.teamLead, null, 2)}</Code>
|
|
565
|
+
</Box>
|
|
566
566
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
567
|
+
<CoverImageHeader dataSource="coverImageHeaders.teamLead" />
|
|
568
|
+
|
|
569
|
+
<div style={{ padding: '2rem', maxWidth: '800px', margin: '0 auto' }}>
|
|
570
|
+
<h3>Team Member Profile</h3>
|
|
571
|
+
<p>
|
|
572
|
+
This team lead header is completely driven by CMS data, including the profile image,
|
|
573
|
+
metadata, tags, and actions. Perfect for team directories, leadership pages, and organizational charts.
|
|
574
|
+
</p>
|
|
575
|
+
</div>
|
|
576
|
+
|
|
577
|
+
</div>
|
|
578
|
+
</QwickApp>
|
|
579
|
+
),
|
|
580
|
+
parameters: {
|
|
581
|
+
docs: {
|
|
582
|
+
description: {
|
|
583
|
+
story: 'Team lead header with complete data binding - all content loaded from CMS data source.',
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
587
|
};
|
|
588
588
|
|
|
589
589
|
export const DataBindingProject: Story = {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
590
|
+
render: () => (
|
|
591
|
+
<QwickApp
|
|
592
|
+
appId="cover-header-data-project"
|
|
593
|
+
appName='Project Data Binding'
|
|
594
|
+
dataSource={{ dataProvider }}
|
|
595
|
+
>
|
|
596
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
597
|
+
|
|
598
|
+
<Box>
|
|
599
|
+
<Typography variant="h5" gutterBottom> Data-Driven Project Header</Typography>
|
|
600
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
601
|
+
Project headers can pull all their content from CMS, making them perfect for dynamic portfolios.
|
|
602
|
+
</Typography>
|
|
603
|
+
</Box>
|
|
604
604
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
605
|
+
<CoverImageHeader dataSource="coverImageHeaders.projectShowcase" />
|
|
606
|
+
|
|
607
|
+
<div style={{ padding: '2rem', maxWidth: '900px', margin: '0 auto' }}>
|
|
608
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '2rem' }}>
|
|
609
|
+
<div>
|
|
610
|
+
<h3>Dynamic Project Info</h3>
|
|
611
|
+
<p>
|
|
612
|
+
All project details including technology stack, status, and actions are dynamically loaded
|
|
613
|
+
from the CMS, allowing for real-time updates without code changes.
|
|
614
|
+
</p>
|
|
615
|
+
</div>
|
|
616
|
+
|
|
617
|
+
<div>
|
|
618
|
+
<h3>Flexible Actions</h3>
|
|
619
|
+
<p>
|
|
620
|
+
Project-specific actions like demo links, source code, and documentation can be
|
|
621
|
+
configured per project through the CMS interface.
|
|
622
|
+
</p>
|
|
623
|
+
</div>
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
626
|
+
|
|
627
|
+
</div>
|
|
628
|
+
</QwickApp>
|
|
629
|
+
),
|
|
630
|
+
parameters: {
|
|
631
|
+
docs: {
|
|
632
|
+
description: {
|
|
633
|
+
story: 'Project header with data binding showing technology tags, project status, and dynamic actions.',
|
|
634
|
+
},
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
637
|
};
|
|
638
638
|
|
|
639
639
|
export const DataBindingCompany: Story = {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
640
|
+
render: () => (
|
|
641
|
+
<QwickApp
|
|
642
|
+
appId="cover-header-data-company"
|
|
643
|
+
appName='Company Data Binding'
|
|
644
|
+
dataSource={{ dataProvider }}
|
|
645
|
+
>
|
|
646
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
647
|
+
|
|
648
|
+
<Box>
|
|
649
|
+
<Typography variant="h5" gutterBottom>🏢 Data-Driven Company Header</Typography>
|
|
650
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
651
|
+
Company headers with gradient backgrounds and corporate actions, all controlled by CMS.
|
|
652
|
+
</Typography>
|
|
653
|
+
</Box>
|
|
654
654
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
655
|
+
<CoverImageHeader dataSource="coverImageHeaders.companyProfile" />
|
|
656
|
+
|
|
657
|
+
<div style={{ padding: '2rem', maxWidth: '800px', margin: '0 auto' }}>
|
|
658
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', gap: '2rem' }}>
|
|
659
|
+
<div>
|
|
660
|
+
<h3> Dynamic Styling</h3>
|
|
661
|
+
<p>
|
|
662
|
+
Background gradients, colors, and visual styling can be controlled entirely
|
|
663
|
+
through the CMS for brand consistency across different pages.
|
|
664
|
+
</p>
|
|
665
|
+
</div>
|
|
666
|
+
|
|
667
|
+
<div>
|
|
668
|
+
<h3> Business Actions</h3>
|
|
669
|
+
<p>
|
|
670
|
+
Corporate action buttons like contact sales, demos, and documentation
|
|
671
|
+
can be managed and updated without developer intervention.
|
|
672
|
+
</p>
|
|
673
|
+
</div>
|
|
674
|
+
</div>
|
|
675
|
+
</div>
|
|
676
|
+
|
|
677
|
+
</div>
|
|
678
|
+
</QwickApp>
|
|
679
|
+
),
|
|
680
|
+
parameters: {
|
|
681
|
+
docs: {
|
|
682
|
+
description: {
|
|
683
|
+
story: 'Company header with data binding featuring gradient background and corporate action buttons.',
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
687
|
};
|
|
688
688
|
|
|
689
689
|
export const DataBindingProduct: Story = {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
690
|
+
render: () => (
|
|
691
|
+
<QwickApp
|
|
692
|
+
appId="cover-header-data-product"
|
|
693
|
+
appName='Product Data Binding'
|
|
694
|
+
dataSource={{ dataProvider }}
|
|
695
|
+
>
|
|
696
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
697
|
+
|
|
698
|
+
<Box>
|
|
699
|
+
<Typography variant="h5" gutterBottom> Data-Driven Product Header</Typography>
|
|
700
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
701
|
+
Product showcase headers with features, pricing actions, and marketing content from CMS.
|
|
702
|
+
</Typography>
|
|
703
|
+
</Box>
|
|
704
704
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
705
|
+
<CoverImageHeader dataSource="coverImageHeaders.productShowcase" />
|
|
706
|
+
|
|
707
|
+
<div style={{ padding: '2rem', maxWidth: '700px', margin: '0 auto' }}>
|
|
708
|
+
<h3>Product Marketing Integration</h3>
|
|
709
|
+
<p>
|
|
710
|
+
Product headers can display feature highlights, call-to-action buttons, and marketing
|
|
711
|
+
content that's managed through your CMS. Perfect for product pages, landing pages,
|
|
712
|
+
and marketing campaigns that need frequent updates.
|
|
713
|
+
</p>
|
|
714
|
+
</div>
|
|
715
|
+
|
|
716
|
+
</div>
|
|
717
|
+
</QwickApp>
|
|
718
|
+
),
|
|
719
|
+
parameters: {
|
|
720
|
+
docs: {
|
|
721
|
+
description: {
|
|
722
|
+
story: 'Product showcase header with data binding displaying features, pricing actions, and marketing content.',
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
},
|
|
726
726
|
};
|
|
727
727
|
|
|
728
728
|
export const DataBindingWithFallback: Story = {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
729
|
+
render: () => (
|
|
730
|
+
<QwickApp
|
|
731
|
+
appId="cover-header-data-fallback"
|
|
732
|
+
appName='Data Binding with Fallback'
|
|
733
|
+
dataSource={{ dataProvider }}
|
|
734
|
+
>
|
|
735
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
736
|
+
|
|
737
|
+
<Box>
|
|
738
|
+
<Typography variant="h5" gutterBottom> Fallback Support</Typography>
|
|
739
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
740
|
+
CoverImageHeader gracefully handles missing data sources with fallback props.
|
|
741
|
+
</Typography>
|
|
742
|
+
|
|
743
|
+
<Code title="Fallback Usage" language="tsx">{`<CoverImageHeader
|
|
744
|
+
dataSource="nonexistent.data"
|
|
745
|
+
title="Fallback Title"
|
|
746
|
+
subtitle="Shows when data source is missing"
|
|
747
|
+
overline="FALLBACK"
|
|
748
748
|
/>`}</Code>
|
|
749
|
-
|
|
749
|
+
</Box>
|
|
750
750
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
751
|
+
<CoverImageHeader
|
|
752
|
+
dataSource="nonexistent.data"
|
|
753
|
+
title="Fallback Header"
|
|
754
|
+
subtitle="This content appears when the dataSource doesn't exist"
|
|
755
|
+
overline="FALLBACK DEMO"
|
|
756
|
+
tags={['Fallback', 'Graceful Degradation']}
|
|
757
|
+
variant="default"
|
|
758
|
+
/>
|
|
759
|
+
|
|
760
|
+
<Box sx={{ mt: 3 }}>
|
|
761
|
+
<Typography variant="h6" gutterBottom> Image Loading Demo</Typography>
|
|
762
|
+
<Typography variant="body2" sx={{ mb: 2, opacity: 0.8 }}>
|
|
763
|
+
This example shows how the component handles slow-loading images.
|
|
764
|
+
</Typography>
|
|
765
|
+
<CoverImageHeader dataSource="coverImageHeaders.imageLoadingDemo" />
|
|
766
|
+
</Box>
|
|
767
|
+
|
|
768
|
+
<Box sx={{ mt: 3 }}>
|
|
769
|
+
<Typography variant="h6" gutterBottom> Image Error Handling</Typography>
|
|
770
|
+
<Typography variant="body2" sx={{ mb: 2, opacity: 0.8 }}>
|
|
771
|
+
This example demonstrates image fallback and error handling.
|
|
772
|
+
</Typography>
|
|
773
|
+
<CoverImageHeader dataSource="coverImageHeaders.imageFallbackDemo" />
|
|
774
|
+
</Box>
|
|
775
|
+
|
|
776
|
+
<div style={{ padding: '2rem', maxWidth: '700px', margin: '0 auto' }}>
|
|
777
|
+
<h3>Graceful Degradation</h3>
|
|
778
|
+
<p>
|
|
779
|
+
When a data source is unavailable or empty, the component falls back to traditional props,
|
|
780
|
+
ensuring your application remains functional even when CMS data is missing.
|
|
781
|
+
</p>
|
|
782
|
+
</div>
|
|
783
|
+
|
|
784
|
+
</div>
|
|
785
|
+
</QwickApp>
|
|
786
|
+
),
|
|
787
|
+
parameters: {
|
|
788
|
+
docs: {
|
|
789
|
+
description: {
|
|
790
|
+
story: 'Header with fallback props when dataSource is missing or unavailable, ensuring graceful degradation.',
|
|
791
|
+
},
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
794
|
};
|