@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
|
@@ -7,62 +7,62 @@ import { HeroBlock, Section, Content } from '../components/blocks';
|
|
|
7
7
|
const HomeIcon = () => <span>🏠</span>;
|
|
8
8
|
const AboutIcon = () => <span>📖</span>;
|
|
9
9
|
const ContactIcon = () => <span>📞</span>;
|
|
10
|
-
const ServicesIcon = () => <span
|
|
11
|
-
const BlogIcon = () => <span
|
|
10
|
+
const ServicesIcon = () => <span>🛠</span>;
|
|
11
|
+
const BlogIcon = () => <span></span>;
|
|
12
12
|
const ProfileIcon = () => <span>👤</span>;
|
|
13
13
|
|
|
14
14
|
const sampleMenuItems = [
|
|
15
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
15
|
+
{
|
|
16
|
+
id: 'home',
|
|
17
|
+
label: 'Home',
|
|
18
|
+
icon: <HomeIcon />,
|
|
19
|
+
onClick: () => { alert('Navigate to Home'); },
|
|
20
|
+
active: true,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'about',
|
|
24
|
+
label: 'About',
|
|
25
|
+
icon: <AboutIcon />,
|
|
26
|
+
onClick: () => { alert('Navigate to About'); },
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 'services',
|
|
30
|
+
label: 'Services',
|
|
31
|
+
icon: <ServicesIcon />,
|
|
32
|
+
onClick: () => { alert('Navigate to Services'); },
|
|
33
|
+
badge: '3',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'blog',
|
|
37
|
+
label: 'Blog',
|
|
38
|
+
icon: <BlogIcon />,
|
|
39
|
+
onClick: () => { alert('Navigate to Blog'); },
|
|
40
|
+
badge: 'New',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'contact',
|
|
44
|
+
label: 'Contact',
|
|
45
|
+
icon: <ContactIcon />,
|
|
46
|
+
onClick: () => { alert('Navigate to Contact'); },
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'profile',
|
|
50
|
+
label: 'Profile',
|
|
51
|
+
icon: <ProfileIcon />,
|
|
52
|
+
onClick: () => { alert('Navigate to Profile'); },
|
|
53
|
+
},
|
|
54
54
|
];
|
|
55
55
|
|
|
56
56
|
const meta: Meta = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
title: 'Framework/Responsive Navigation',
|
|
58
|
+
decorators: [
|
|
59
|
+
(Story) => <Story />
|
|
60
|
+
],
|
|
61
|
+
parameters: {
|
|
62
|
+
layout: 'fullscreen',
|
|
63
|
+
docs: {
|
|
64
|
+
description: {
|
|
65
|
+
component: `Complete responsive navigation system that automatically adapts to different screen sizes.
|
|
66
66
|
|
|
67
67
|
**Key Features:**
|
|
68
68
|
- Automatic adaptation: bottom nav on mobile, nav rail on tablet, top nav on desktop
|
|
@@ -76,224 +76,224 @@ const meta: Meta = {
|
|
|
76
76
|
- Apps that need consistent navigation across all devices
|
|
77
77
|
- Applications requiring notification badges and status indicators
|
|
78
78
|
- Projects using the QwickApp framework`,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
export default meta;
|
|
85
85
|
type Story = StoryObj<typeof meta>;
|
|
86
86
|
|
|
87
87
|
export const Default: Story = {
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
88
|
+
render: () => (
|
|
89
|
+
<QwickApp
|
|
90
|
+
appName="Demo App"
|
|
91
|
+
enableScaffolding={true}
|
|
92
|
+
navigationItems={sampleMenuItems}
|
|
93
|
+
>
|
|
94
|
+
<Page route="/">
|
|
95
|
+
<Section padding="large">
|
|
96
|
+
<Content title="Responsive Navigation Demo" centered maxWidth="large">
|
|
97
|
+
<p>Resize the viewport to see the responsive navigation in action:</p>
|
|
98
|
+
<ul>
|
|
99
|
+
<li><strong>Mobile (< 600px):</strong> Bottom navigation (3-5 items, rest in drawer)</li>
|
|
100
|
+
<li><strong>Tablet (600px - 1024px):</strong> Navigation rail on the left (3-7 items, rest in drawer)</li>
|
|
101
|
+
<li><strong>Desktop (> 1024px):</strong> App bar navigation (5-7 items, rest in drawer)</li>
|
|
102
|
+
</ul>
|
|
103
|
+
</Content>
|
|
104
|
+
</Section>
|
|
105
|
+
|
|
106
|
+
<Section padding="large" background="alternate">
|
|
107
|
+
<Content variant="elevated">
|
|
108
|
+
<h2>Sample Content Area</h2>
|
|
109
|
+
<p>This content area demonstrates how the layout adapts with different navigation styles.</p>
|
|
110
|
+
<p>Notice how the content is properly spaced to avoid overlap with navigation elements.</p>
|
|
111
|
+
</Content>
|
|
112
|
+
</Section>
|
|
113
|
+
|
|
114
|
+
<Section padding="large">
|
|
115
|
+
<HeroBlock
|
|
116
|
+
title="Content flows properly"
|
|
117
|
+
subtitle="The scaffolding system ensures content doesn't overlap with navigation"
|
|
118
|
+
height="medium"
|
|
119
|
+
backgroundGradient="linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
120
|
+
/>
|
|
121
|
+
</Section>
|
|
122
|
+
</Page>
|
|
123
|
+
</QwickApp>
|
|
124
|
+
),
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
export const WithCustomLogo: Story = {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
128
|
+
render: () => (
|
|
129
|
+
<QwickApp
|
|
130
|
+
appName="Custom Logo Demo"
|
|
131
|
+
logo={<div style={{ padding: '8px', background: 'var(--theme-primary)', color: 'white', borderRadius: '4px' }}>CUSTOM</div>}
|
|
132
|
+
enableScaffolding={true}
|
|
133
|
+
navigationItems={sampleMenuItems}
|
|
134
|
+
>
|
|
135
|
+
<Page route="/logo">
|
|
136
|
+
<Section padding="large">
|
|
137
|
+
<Content title="Custom Logo Example" centered>
|
|
138
|
+
<p>This example shows how to use a custom logo component instead of the default text-based logo.</p>
|
|
139
|
+
</Content>
|
|
140
|
+
</Section>
|
|
141
|
+
</Page>
|
|
142
|
+
</QwickApp>
|
|
143
|
+
),
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
export const CenterLogo: Story = {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
147
|
+
render: () => (
|
|
148
|
+
<QwickApp
|
|
149
|
+
appName="Centered Logo Demo"
|
|
150
|
+
enableScaffolding={true}
|
|
151
|
+
navigationItems={sampleMenuItems}
|
|
152
|
+
appBar={{
|
|
153
|
+
logoPosition: 'center',
|
|
154
|
+
title: 'Centered Brand'
|
|
155
|
+
}}
|
|
156
|
+
>
|
|
157
|
+
<Page route="/center">
|
|
158
|
+
<Section padding="large">
|
|
159
|
+
<Content title="Centered Logo Layout" centered>
|
|
160
|
+
<p>The logo and title are positioned in the center of the app bar for a different visual hierarchy.</p>
|
|
161
|
+
</Content>
|
|
162
|
+
</Section>
|
|
163
|
+
</Page>
|
|
164
|
+
</QwickApp>
|
|
165
|
+
),
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
export const WithPageActions: Story = {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
169
|
+
render: () => (
|
|
170
|
+
<QwickApp
|
|
171
|
+
appName="Page Actions Demo"
|
|
172
|
+
enableScaffolding={true}
|
|
173
|
+
navigationItems={sampleMenuItems}
|
|
174
|
+
>
|
|
175
|
+
<Page
|
|
176
|
+
route="/actions"
|
|
177
|
+
actions={
|
|
178
|
+
<div style={{ display: 'flex', gap: '8px' }}>
|
|
179
|
+
<button style={{ padding: '8px 16px', background: 'var(--theme-primary)', color: 'var(--theme-on-primary)', border: 'none', borderRadius: '6px' }}>
|
|
180
|
+
Save
|
|
181
|
+
</button>
|
|
182
|
+
<button style={{ padding: '8px 16px', background: 'transparent', color: 'var(--theme-on-surface)', border: '1px solid var(--theme-outline)', borderRadius: '6px' }}>
|
|
183
|
+
Cancel
|
|
184
|
+
</button>
|
|
185
|
+
</div>
|
|
186
|
+
}
|
|
187
|
+
>
|
|
188
|
+
<Section padding="large">
|
|
189
|
+
<Content title="Page-Specific Actions" centered>
|
|
190
|
+
<p>This page demonstrates how page-specific actions appear in the app bar.</p>
|
|
191
|
+
</Content>
|
|
192
|
+
</Section>
|
|
193
|
+
</Page>
|
|
194
|
+
</QwickApp>
|
|
195
|
+
),
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
export const ManyItems: Story = {
|
|
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
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
199
|
+
render: () => {
|
|
200
|
+
const manyItems = [
|
|
201
|
+
...sampleMenuItems,
|
|
202
|
+
{
|
|
203
|
+
id: 'docs',
|
|
204
|
+
label: 'Documentation',
|
|
205
|
+
icon: <span>📚</span>,
|
|
206
|
+
onClick: () => { alert('Navigate to Docs'); },
|
|
207
|
+
priority: 10,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: 'support',
|
|
211
|
+
label: 'Support',
|
|
212
|
+
icon: <span>💬</span>,
|
|
213
|
+
onClick: () => { alert('Navigate to Support'); },
|
|
214
|
+
badge: '2',
|
|
215
|
+
priority: 11,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: 'settings',
|
|
219
|
+
label: 'Settings',
|
|
220
|
+
icon: <span>⚙</span>,
|
|
221
|
+
onClick: () => { alert('Navigate to Settings'); },
|
|
222
|
+
priority: 12,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: 'analytics',
|
|
226
|
+
label: 'Analytics',
|
|
227
|
+
icon: <span></span>,
|
|
228
|
+
onClick: () => { alert('Navigate to Analytics'); },
|
|
229
|
+
priority: 13,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: 'reports',
|
|
233
|
+
label: 'Reports',
|
|
234
|
+
icon: <span>📈</span>,
|
|
235
|
+
onClick: () => { alert('Navigate to Reports'); },
|
|
236
|
+
priority: 14,
|
|
237
|
+
},
|
|
238
|
+
];
|
|
239
|
+
|
|
240
|
+
return (
|
|
241
|
+
<QwickApp
|
|
242
|
+
appName="Many Items Demo"
|
|
243
|
+
enableScaffolding={true}
|
|
244
|
+
navigationItems={manyItems}
|
|
245
|
+
>
|
|
246
|
+
<Page route="/many">
|
|
247
|
+
<Section padding="large">
|
|
248
|
+
<Content title="Navigation with Many Items" centered>
|
|
249
|
+
<p>This example demonstrates how the Material UI guidelines handle overflow items:</p>
|
|
250
|
+
<ul>
|
|
251
|
+
<li><strong>Mobile:</strong> First 5 items in bottom nav, rest in drawer</li>
|
|
252
|
+
<li><strong>Tablet:</strong> First 7 items in rail, rest in drawer</li>
|
|
253
|
+
<li><strong>Desktop:</strong> First 7 items in app bar, rest in drawer</li>
|
|
254
|
+
</ul>
|
|
255
|
+
<p>Try opening the hamburger menu to see the overflow items.</p>
|
|
256
|
+
</Content>
|
|
257
|
+
</Section>
|
|
258
|
+
</Page>
|
|
259
|
+
</QwickApp>
|
|
260
|
+
);
|
|
261
|
+
},
|
|
262
262
|
};
|
|
263
263
|
|
|
264
264
|
export const WithPageMenuItems: Story = {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
265
|
+
render: () => (
|
|
266
|
+
<QwickApp
|
|
267
|
+
appName="Page Menu Demo"
|
|
268
|
+
enableScaffolding={true}
|
|
269
|
+
navigationItems={sampleMenuItems.slice(0, 3)}
|
|
270
|
+
>
|
|
271
|
+
<Page
|
|
272
|
+
route="/page-menu"
|
|
273
|
+
menuItems={[
|
|
274
|
+
{
|
|
275
|
+
id: 'page-action-1',
|
|
276
|
+
label: 'Page Action 1',
|
|
277
|
+
icon: <span></span>,
|
|
278
|
+
onClick: () => { alert('Page Action 1'); },
|
|
279
|
+
priority: 1000,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: 'page-action-2',
|
|
283
|
+
label: 'Page Action 2',
|
|
284
|
+
icon: <span></span>,
|
|
285
|
+
onClick: () => { alert('Page Action 2'); },
|
|
286
|
+
priority: 1001,
|
|
287
|
+
},
|
|
288
|
+
]}
|
|
289
|
+
>
|
|
290
|
+
<Section padding="large">
|
|
291
|
+
<Content title="Page-Specific Menu Items" centered>
|
|
292
|
+
<p>This page adds its own menu items to the navigation. These items appear after the main navigation items and are only visible when this page is active.</p>
|
|
293
|
+
<p>Check the navigation (bottom nav, rail, or drawer) to see the additional page-specific items.</p>
|
|
294
|
+
</Content>
|
|
295
|
+
</Section>
|
|
296
|
+
</Page>
|
|
297
|
+
</QwickApp>
|
|
298
|
+
),
|
|
299
299
|
};
|