@qwickapps/react-framework 1.4.8 → 1.5.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 +36 -3
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +9 -9
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -1
- package/dist/components/AccessibilityProvider.d.ts +1 -1
- package/dist/components/AccessibilityProvider.d.ts.map +1 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/Html.d.ts +8 -8
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Logo.d.ts +2 -2
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +5 -5
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/ProductLogo.d.ts +60 -0
- package/dist/components/ProductLogo.d.ts.map +1 -0
- package/dist/components/QwickAppsLogo.d.ts +1 -1
- package/dist/components/QwickAppsLogo.d.ts.map +1 -1
- package/dist/components/ResponsiveMenu.d.ts.map +1 -1
- package/dist/components/SafeSpan.d.ts +4 -4
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/Scaffold.d.ts.map +1 -1
- package/dist/components/base/Container.d.ts +3 -2
- package/dist/components/base/Container.d.ts.map +1 -1
- package/dist/components/base/ModelView.d.ts +16 -16
- package/dist/components/base/ModelView.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +1 -1
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/blocks/Article.d.ts +4 -18
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/CardListGrid.d.ts +3 -3
- package/dist/components/blocks/CardListGrid.d.ts.map +1 -1
- package/dist/components/blocks/Code.d.ts +5 -31
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/Content.d.ts +2 -17
- package/dist/components/blocks/Content.d.ts.map +1 -1
- package/dist/components/blocks/CoverImageHeader.d.ts +2 -12
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
- package/dist/components/blocks/FeatureCard.d.ts +0 -17
- 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 +2 -14
- package/dist/components/blocks/Footer.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +35 -26
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +23 -23
- package/dist/components/blocks/Image.d.ts.map +1 -1
- package/dist/components/blocks/PageBannerHeader.d.ts +2 -13
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
- package/dist/components/blocks/ProductCard.d.ts +0 -9
- package/dist/components/blocks/ProductCard.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +16 -24
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +5 -20
- package/dist/components/blocks/Text.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +19 -23
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/buttons/PaletteSwitcher.d.ts +2 -2
- package/dist/components/buttons/PaletteSwitcher.d.ts.map +1 -1
- package/dist/components/buttons/ThemeSwitcher.d.ts +2 -2
- package/dist/components/buttons/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/dialogs/Dialog.d.ts +35 -0
- package/dist/components/dialogs/Dialog.d.ts.map +1 -0
- package/dist/components/dialogs/index.d.ts +8 -0
- package/dist/components/dialogs/index.d.ts.map +1 -0
- package/dist/components/forms/Captcha.d.ts +55 -0
- package/dist/components/forms/Captcha.d.ts.map +1 -0
- package/dist/components/forms/FormBlock.d.ts +6 -6
- package/dist/components/forms/FormBlock.d.ts.map +1 -1
- package/dist/components/forms/FormCheckbox.d.ts +27 -0
- package/dist/components/forms/FormCheckbox.d.ts.map +1 -0
- package/dist/components/forms/FormField.d.ts +43 -0
- package/dist/components/forms/FormField.d.ts.map +1 -0
- package/dist/components/forms/FormSelect.d.ts +35 -0
- package/dist/components/forms/FormSelect.d.ts.map +1 -0
- package/dist/components/forms/index.d.ts +8 -0
- package/dist/components/forms/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +10 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +13 -19
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +16 -17
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +14 -17
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/input/SwitchInputField.d.ts +11 -18
- package/dist/components/input/SwitchInputField.d.ts.map +1 -1
- package/dist/components/input/TextInputField.d.ts +16 -19
- package/dist/components/input/TextInputField.d.ts.map +1 -1
- package/dist/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -1
- package/dist/components/layout/GridCell.d.ts +18 -19
- package/dist/components/layout/GridCell.d.ts.map +1 -1
- package/dist/components/layout/GridLayout.d.ts +36 -25
- package/dist/components/layout/GridLayout.d.ts.map +1 -1
- package/dist/components/menu/MenuItem.d.ts +2 -2
- package/dist/components/menu/MenuItem.d.ts.map +1 -1
- package/dist/components/pages/FormPage.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +1 -1
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/shared/createSerializableView.d.ts +22 -10
- package/dist/components/shared/createSerializableView.d.ts.map +1 -1
- package/dist/components/shared/viewProps.d.ts +3 -3
- package/dist/components/shared/viewProps.d.ts.map +1 -1
- package/dist/config/AppConfig.d.ts +2 -2
- package/dist/config/AppConfig.d.ts.map +1 -1
- package/dist/config/types.d.ts +1 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/contexts/DataContext.d.ts +3 -3
- package/dist/contexts/DataContext.d.ts.map +1 -1
- package/dist/contexts/PaletteContext.d.ts.map +1 -1
- package/dist/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/hooks/useDataBinding.d.ts +2 -2
- package/dist/hooks/useDataBinding.d.ts.map +1 -1
- package/dist/hooks/usePrintMode.d.ts +2 -2
- package/dist/hooks/usePrintMode.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +4929 -2942
- package/dist/index.js +4426 -2410
- package/dist/palettes/manifest.json +90 -0
- package/dist/palettes/palette-autumn.1.4.9.min.css +1 -0
- package/dist/palettes/palette-autumn.1.5.0.css +172 -0
- package/dist/palettes/palette-autumn.1.5.0.min.css +1 -0
- package/dist/palettes/palette-autumn.latest.css +172 -0
- package/dist/palettes/palette-autumn.latest.min.css +1 -0
- package/dist/palettes/palette-cosmic.1.4.9.min.css +1 -0
- package/dist/palettes/palette-cosmic.1.5.0.css +172 -0
- package/dist/palettes/palette-cosmic.1.5.0.min.css +1 -0
- package/dist/palettes/palette-cosmic.latest.css +172 -0
- package/dist/palettes/palette-cosmic.latest.min.css +1 -0
- package/dist/palettes/palette-default.1.4.9.min.css +1 -0
- package/dist/palettes/palette-default.1.5.0.css +178 -0
- package/dist/palettes/palette-default.1.5.0.min.css +1 -0
- package/dist/palettes/palette-default.latest.css +178 -0
- package/dist/palettes/palette-default.latest.min.css +1 -0
- package/dist/palettes/palette-ocean.1.4.9.min.css +1 -0
- package/dist/palettes/palette-ocean.1.5.0.css +172 -0
- package/dist/palettes/palette-ocean.1.5.0.min.css +1 -0
- package/dist/palettes/palette-ocean.latest.css +172 -0
- package/dist/palettes/palette-ocean.latest.min.css +1 -0
- package/dist/palettes/palette-spring.1.4.9.min.css +1 -0
- package/dist/palettes/palette-spring.1.5.0.css +160 -0
- package/dist/palettes/palette-spring.1.5.0.min.css +1 -0
- package/dist/palettes/palette-spring.latest.css +160 -0
- package/dist/palettes/palette-spring.latest.min.css +1 -0
- package/dist/palettes/palette-winter.1.4.9.min.css +1 -0
- package/dist/palettes/palette-winter.1.5.0.css +172 -0
- package/dist/palettes/palette-winter.1.5.0.min.css +1 -0
- package/dist/palettes/palette-winter.latest.css +172 -0
- package/dist/palettes/palette-winter.latest.min.css +1 -0
- package/dist/schemas/ButtonSchema.d.ts +5 -2
- package/dist/schemas/ButtonSchema.d.ts.map +1 -1
- package/dist/schemas/CardListGridSchema.d.ts +4 -4
- package/dist/schemas/CardListGridSchema.d.ts.map +1 -1
- package/dist/schemas/ChoiceInputFieldSchema.d.ts +2 -2
- package/dist/schemas/ChoiceInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/CodeSchema.d.ts +1 -2
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/FormBlockSchema.d.ts +2 -2
- package/dist/schemas/FormBlockSchema.d.ts.map +1 -1
- package/dist/schemas/GridCellSchema.d.ts +2 -4
- package/dist/schemas/GridCellSchema.d.ts.map +1 -1
- package/dist/schemas/GridLayoutSchema.d.ts +3 -5
- package/dist/schemas/GridLayoutSchema.d.ts.map +1 -1
- package/dist/schemas/HeroBlockSchema.d.ts +2 -2
- package/dist/schemas/HeroBlockSchema.d.ts.map +1 -1
- package/dist/schemas/HtmlInputFieldSchema.d.ts +2 -2
- package/dist/schemas/HtmlInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/ImageSchema.d.ts +2 -2
- package/dist/schemas/ImageSchema.d.ts.map +1 -1
- package/dist/schemas/SectionSchema.d.ts +2 -4
- package/dist/schemas/SectionSchema.d.ts.map +1 -1
- package/dist/schemas/SelectInputFieldSchema.d.ts +2 -2
- package/dist/schemas/SelectInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/SwitchInputFieldSchema.d.ts +2 -2
- package/dist/schemas/SwitchInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/TextInputFieldSchema.d.ts +2 -2
- package/dist/schemas/TextInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/ViewSchema.d.ts +8 -7
- package/dist/schemas/ViewSchema.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +2 -2
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts +2 -2
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/registry.d.ts +0 -7
- package/dist/schemas/transformers/registry.d.ts.map +1 -1
- package/dist/schemas/types/Serializable.d.ts +3 -3
- package/dist/schemas/types/Serializable.d.ts.map +1 -1
- package/dist/stories/_templates/SerializationTemplate.d.ts.map +1 -0
- package/dist/types/CollapsibleLayout.d.ts +3 -3
- package/dist/types/CollapsibleLayout.d.ts.map +1 -1
- package/dist/types/ContentProxy.d.ts +4 -4
- package/dist/types/ContentProxy.d.ts.map +1 -1
- package/dist/types/DataTypes.d.ts +4 -4
- package/dist/types/DataTypes.d.ts.map +1 -1
- package/dist/types/TemplateProvider.d.ts +1 -1
- package/dist/types/TemplateProvider.d.ts.map +1 -1
- package/dist/types/TemplateResolver.d.ts +1 -1
- package/dist/types/TemplateResolver.d.ts.map +1 -1
- package/dist/utils/htmlTransform.d.ts +1 -1
- package/dist/utils/htmlTransform.d.ts.map +1 -1
- package/dist/utils/iconMap.d.ts +48 -0
- package/dist/utils/iconMap.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +11 -7
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/paletteLoader.d.ts +34 -0
- package/dist/utils/paletteLoader.d.ts.map +1 -0
- package/dist/utils/paletteManifest.d.ts +51 -0
- package/dist/utils/paletteManifest.d.ts.map +1 -0
- package/dist/utils/paletteUtils.d.ts.map +1 -1
- package/dist/utils/reactUtils.d.ts +12 -6
- package/dist/utils/reactUtils.d.ts.map +1 -1
- package/dist/utils/spacing.d.ts +2 -2
- package/dist/utils/spacing.d.ts.map +1 -1
- package/dist/utils/themePerformanceMonitor.d.ts.map +1 -1
- package/dist/utils/themeUtils.d.ts.map +1 -1
- package/package.json +28 -9
- package/scripts/build-palettes.cjs +120 -0
- package/src/__tests__/components/Article.test.tsx +1 -1
- package/src/__tests__/components/Breadcrumbs.test.tsx +2 -2
- package/src/__tests__/components/Button.test.tsx +3 -3
- package/src/__tests__/components/CardListGrid.test.tsx +5 -5
- package/src/__tests__/components/ChoiceInputField.test.tsx +2 -2
- package/src/__tests__/components/Code.test.tsx +2 -2
- package/src/__tests__/components/Content.integration.test.tsx +1 -1
- package/src/__tests__/components/Content.test.tsx +5 -5
- package/src/__tests__/components/CoverImageHeader.test.tsx +3 -3
- package/src/__tests__/components/FeatureCard.integration.test.tsx +1 -1
- package/src/__tests__/components/FeatureGrid.integration.test.tsx +1 -1
- package/src/__tests__/components/FeatureGrid.test.tsx +3 -3
- package/src/__tests__/components/Footer.test.tsx +3 -3
- package/src/__tests__/components/FormBlock.test.tsx +2 -2
- package/src/__tests__/components/HeroBlock.integration.test.tsx +1 -1
- package/src/__tests__/components/HeroBlock.test.tsx +4 -4
- package/src/__tests__/components/HtmlInputField.test.tsx +8 -8
- package/src/__tests__/components/PageBannerHeader.test.tsx +7 -7
- package/src/__tests__/components/PaletteSwitcher.test.tsx +3 -3
- package/src/__tests__/components/ProductCard.test.tsx +1 -1
- package/src/__tests__/components/Section.integration.test.tsx +1 -1
- package/src/__tests__/components/Section.test.tsx +1 -1
- package/src/__tests__/components/SelectInputField.test.tsx +2 -2
- package/src/__tests__/components/TextInputField.test.tsx +4 -4
- package/src/__tests__/components/ThemeSwitcher.test.tsx +3 -3
- package/src/__tests__/components/base/Container.test.tsx +22 -21
- package/src/__tests__/components/blocks/Code.performance.test.tsx +10 -10
- package/src/__tests__/components/blocks/Code.serialization.test.tsx +9 -9
- package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +2 -3
- package/src/__tests__/components/blocks/Image.serialization.test.tsx +8 -7
- package/src/__tests__/components/blocks/Section.serialization.test.tsx +8 -8
- package/src/__tests__/components/blocks/Text.performance.test.tsx +5 -5
- package/src/__tests__/components/blocks/Text.serialization.test.tsx +9 -9
- package/src/__tests__/components/buttons/Button.serialization.test.tsx +4 -4
- package/src/__tests__/components/input/FormComponents.serialization.test.tsx +9 -9
- package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +16 -18
- package/src/__tests__/components/input/TextInputField.serialization.test.tsx +9 -9
- package/src/__tests__/components/layout/CollapsibleLayout.test.tsx +5 -9
- package/src/__tests__/components/layout/GridCell.serialization.test.tsx +5 -5
- package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +5 -5
- package/src/__tests__/hooks/usePrintMode.test.ts +1 -0
- package/src/__tests__/schemas/builders.test.ts +2 -2
- package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +28 -28
- package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +5 -5
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +11 -11
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +10 -10
- package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +15 -15
- package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +19 -19
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +15 -15
- package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +19 -21
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +15 -15
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +3 -3
- package/src/__tests__/schemas/transformers/nested-serialization.test.tsx +1 -1
- package/src/__tests__/schemas/transformers/round-trip-component-serialization.test.tsx +10 -10
- package/src/__tests__/utils/optional-logging.test.ts +3 -3
- package/src/components/AccessibilityProvider.tsx +4 -2
- package/src/components/ErrorBoundary.tsx +1 -1
- package/src/components/Html.tsx +14 -17
- package/src/components/Logo.tsx +44 -33
- package/src/components/Markdown.tsx +9 -9
- package/src/components/ProductLogo.tsx +118 -0
- package/src/components/QwickApp.css +46 -1063
- package/src/components/QwickApp.tsx +1 -1
- package/src/components/QwickAppsLogo.tsx +1 -1
- package/src/components/ResponsiveMenu.tsx +13 -2
- package/src/components/SafeSpan.tsx +8 -9
- package/src/components/Scaffold.css +14 -0
- package/src/components/Scaffold.tsx +71 -27
- package/src/components/base/Container.tsx +2 -2
- package/src/components/base/ModelView.tsx +28 -27
- package/src/components/base/index.ts +1 -1
- package/src/components/blocks/Article.tsx +251 -36
- package/src/components/blocks/CardListGrid.tsx +18 -14
- package/src/components/blocks/Code.tsx +18 -13
- package/src/components/blocks/Content.tsx +15 -10
- package/src/components/blocks/CoverImageHeader.tsx +15 -10
- package/src/components/blocks/FeatureCard.tsx +16 -11
- package/src/components/blocks/FeatureGrid.tsx +13 -8
- package/src/components/blocks/Footer.tsx +44 -35
- package/src/components/blocks/HeroBlock.tsx +12 -13
- package/src/components/blocks/Image.tsx +16 -8
- package/src/components/blocks/PageBannerHeader.tsx +16 -12
- package/src/components/blocks/ProductCard.tsx +32 -25
- package/src/components/blocks/Section.tsx +21 -13
- package/src/components/blocks/Text.tsx +33 -15
- package/src/components/buttons/Button.tsx +110 -30
- package/src/components/buttons/PaletteSwitcher.tsx +11 -8
- package/src/components/buttons/ThemeSwitcher.tsx +20 -16
- package/src/components/dialogs/Dialog.tsx +126 -0
- package/src/components/dialogs/index.ts +15 -0
- package/src/components/forms/Captcha.tsx +291 -0
- package/src/components/forms/FormBlock.tsx +22 -15
- package/src/components/forms/FormCheckbox.tsx +116 -0
- package/src/components/forms/FormField.tsx +180 -0
- package/src/components/forms/FormSelect.tsx +140 -0
- package/src/components/forms/index.ts +13 -1
- package/src/components/index.ts +13 -2
- package/src/components/input/ChoiceInputField.tsx +1 -2
- package/src/components/input/HtmlInputField.tsx +2 -3
- package/src/components/input/SelectInputField.tsx +31 -5
- package/src/components/input/SwitchInputField.tsx +3 -4
- package/src/components/input/TextField.tsx +2 -2
- package/src/components/input/TextInputField.tsx +32 -6
- package/src/components/layout/CollapsibleLayout/CollapsibleLayout.tsx +13 -13
- package/src/components/layout/GridCell.tsx +10 -9
- package/src/components/layout/GridCellWrapper.tsx +1 -1
- package/src/components/layout/GridLayout.tsx +29 -32
- package/src/components/menu/MenuItem.tsx +2 -2
- package/src/components/pages/FormPage.tsx +0 -1
- package/src/components/pages/Page.tsx +2 -2
- package/src/components/shared/createSerializableView.tsx +24 -23
- package/src/components/shared/viewProps.ts +11 -11
- package/src/config/AppConfig.ts +2 -2
- package/src/config/__tests__/AppConfig.test.ts +3 -3
- package/src/config/__tests__/AppConfigBuilder.test.ts +10 -11
- package/src/config/types.ts +1 -1
- package/src/contexts/DataContext.tsx +58 -52
- package/src/contexts/PaletteContext.tsx +22 -9
- package/src/contexts/PrintModeContext.tsx +4 -4
- package/src/contexts/ThemeContext.tsx +3 -2
- package/src/hooks/useBaseProps.ts +10 -10
- package/src/hooks/useDataBinding.ts +15 -18
- package/src/hooks/usePrintMode.ts +3 -3
- package/src/index.ts +2 -0
- package/src/palettes/manifest.json +72 -0
- package/src/palettes/manifest.schema.json +74 -0
- package/src/schemas/ButtonSchema.ts +33 -0
- package/src/schemas/CardListGridSchema.ts +3 -3
- package/src/schemas/CodeSchema.ts +0 -1
- package/src/schemas/FeatureGridSchema.ts +1 -1
- package/src/schemas/FormBlockSchema.ts +1 -1
- package/src/schemas/GridCellSchema.ts +0 -1
- package/src/schemas/GridLayoutSchema.ts +0 -1
- package/src/schemas/SectionSchema.ts +0 -1
- package/src/schemas/ViewSchema.ts +7 -7
- package/src/schemas/transformers/ComponentTransformer.ts +39 -28
- package/src/schemas/transformers/ReactNodeTransformer.ts +18 -17
- package/src/schemas/transformers/registry.ts +28 -24
- package/src/schemas/types/Serializable.ts +3 -3
- package/src/setupTests.js +9 -0
- package/src/stories/AccessibilityProvider.stories.tsx +0 -1
- package/src/stories/Article.stories.tsx +1 -1
- package/src/stories/CardListGrid.stories.tsx +1 -1
- package/src/stories/ChoiceInputField.stories.tsx +2 -2
- package/src/stories/Code.stories.tsx +2 -3
- package/src/stories/CollapsibleLayout.stories.tsx +41 -37
- package/src/stories/Container.stories.tsx +1 -2
- package/src/stories/DataBinding.advanced.stories.tsx +15 -9
- package/src/stories/DataProvider.stories.tsx +33 -16
- package/src/stories/ErrorBoundary.stories.tsx +28 -26
- package/src/stories/FeatureGrid.stories.tsx +0 -1
- package/src/stories/FormBlock.stories.tsx +8 -8
- package/src/stories/FormComponents.stories.tsx +15 -11
- package/src/stories/GridCell.stories.tsx +5 -5
- package/src/stories/GridLayout.stories.tsx +5 -5
- package/src/stories/Image.stories.tsx +5 -7
- package/src/stories/Introduction.stories.tsx +0 -1
- package/src/stories/ModelView.stories.tsx +7 -7
- package/src/stories/SafeSpan.stories.tsx +7 -3
- package/src/stories/Section.stories.tsx +2 -2
- package/src/stories/Text.stories.tsx +1 -3
- package/src/stories/_templates/SerializationTemplate.tsx +0 -1
- package/src/templates/TemplateResolver.ts +2 -2
- package/src/types/CollapsibleLayout.ts +2 -2
- package/src/types/ContentProxy.ts +6 -6
- package/src/types/DataTypes.ts +4 -4
- package/src/types/TemplateProvider.ts +1 -1
- package/src/types/TemplateResolver.ts +1 -1
- package/src/utils/htmlTransform.tsx +17 -11
- package/src/utils/iconMap.tsx +221 -0
- package/src/utils/index.ts +4 -1
- package/src/utils/logger.ts +20 -14
- package/src/utils/paletteLoader.ts +218 -0
- package/src/utils/paletteManifest.ts +268 -0
- package/src/utils/paletteUtils.ts +19 -1
- package/src/utils/reactUtils.tsx +34 -33
- package/src/utils/spacing.ts +16 -17
- package/src/utils/themePerformanceMonitor.js +14 -6
- package/src/utils/themeUtils.ts +17 -2
- package/dist/components/base/ContainerView.d.ts +0 -65
- package/dist/components/base/ContainerView.d.ts.map +0 -1
- package/dist/components/blocks/Code-factory.d.ts +0 -22
- package/dist/components/blocks/Code-factory.d.ts.map +0 -1
- package/dist/components/blocks/Code-old.d.ts +0 -31
- package/dist/components/blocks/Code-old.d.ts.map +0 -1
- package/dist/qa/ConsoleWarningTest.d.ts +0 -5
- package/dist/qa/ConsoleWarningTest.d.ts.map +0 -1
- package/dist/qa/StorageKeyTest.d.ts +0 -6
- package/dist/qa/StorageKeyTest.d.ts.map +0 -1
- package/dist/qa/ThemeStorageKeyTest.d.ts +0 -6
- package/dist/qa/ThemeStorageKeyTest.d.ts.map +0 -1
- package/dist/schemas/ViewModelSchema.d.ts +0 -63
- package/dist/schemas/ViewModelSchema.d.ts.map +0 -1
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +0 -66
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +0 -1
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts +0 -66
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +0 -1
- package/dist/src/components/AccessibilityChecker.d.ts +0 -12
- package/dist/src/components/AccessibilityChecker.d.ts.map +0 -1
- package/dist/src/components/AccessibilityProvider.d.ts +0 -64
- package/dist/src/components/AccessibilityProvider.d.ts.map +0 -1
- package/dist/src/components/Breadcrumbs.d.ts +0 -39
- package/dist/src/components/Breadcrumbs.d.ts.map +0 -1
- package/dist/src/components/ErrorBoundary.d.ts +0 -46
- package/dist/src/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/src/components/Html.d.ts +0 -58
- package/dist/src/components/Html.d.ts.map +0 -1
- package/dist/src/components/Logo.d.ts +0 -56
- package/dist/src/components/Logo.d.ts.map +0 -1
- package/dist/src/components/Markdown.d.ts +0 -51
- package/dist/src/components/Markdown.d.ts.map +0 -1
- package/dist/src/components/QwickApp.d.ts +0 -69
- package/dist/src/components/QwickApp.d.ts.map +0 -1
- package/dist/src/components/QwickAppsLogo.d.ts +0 -25
- package/dist/src/components/QwickAppsLogo.d.ts.map +0 -1
- package/dist/src/components/QwickIcon.d.ts +0 -23
- package/dist/src/components/QwickIcon.d.ts.map +0 -1
- package/dist/src/components/ResponsiveMenu.d.ts +0 -38
- package/dist/src/components/ResponsiveMenu.d.ts.map +0 -1
- package/dist/src/components/SafeSpan.d.ts +0 -29
- package/dist/src/components/SafeSpan.d.ts.map +0 -1
- package/dist/src/components/Scaffold.d.ts +0 -57
- package/dist/src/components/Scaffold.d.ts.map +0 -1
- package/dist/src/components/base/Container.d.ts +0 -33
- package/dist/src/components/base/Container.d.ts.map +0 -1
- package/dist/src/components/base/ModelView.d.ts +0 -92
- package/dist/src/components/base/ModelView.d.ts.map +0 -1
- package/dist/src/components/base/index.d.ts +0 -12
- package/dist/src/components/base/index.d.ts.map +0 -1
- package/dist/src/components/blocks/Article.d.ts +0 -32
- package/dist/src/components/blocks/Article.d.ts.map +0 -1
- package/dist/src/components/blocks/CardListGrid.d.ts +0 -23
- package/dist/src/components/blocks/CardListGrid.d.ts.map +0 -1
- package/dist/src/components/blocks/Code.d.ts +0 -37
- package/dist/src/components/blocks/Code.d.ts.map +0 -1
- package/dist/src/components/blocks/Content.d.ts +0 -24
- package/dist/src/components/blocks/Content.d.ts.map +0 -1
- package/dist/src/components/blocks/CoverImageHeader.d.ts +0 -44
- package/dist/src/components/blocks/CoverImageHeader.d.ts.map +0 -1
- package/dist/src/components/blocks/FeatureCard.d.ts +0 -66
- package/dist/src/components/blocks/FeatureCard.d.ts.map +0 -1
- package/dist/src/components/blocks/FeatureGrid.d.ts +0 -48
- package/dist/src/components/blocks/FeatureGrid.d.ts.map +0 -1
- package/dist/src/components/blocks/Footer.d.ts +0 -56
- package/dist/src/components/blocks/Footer.d.ts.map +0 -1
- package/dist/src/components/blocks/HeroBlock.d.ts +0 -55
- package/dist/src/components/blocks/HeroBlock.d.ts.map +0 -1
- package/dist/src/components/blocks/Image.d.ts +0 -40
- package/dist/src/components/blocks/Image.d.ts.map +0 -1
- package/dist/src/components/blocks/PageBannerHeader.d.ts +0 -30
- package/dist/src/components/blocks/PageBannerHeader.d.ts.map +0 -1
- package/dist/src/components/blocks/ProductCard.d.ts +0 -57
- package/dist/src/components/blocks/ProductCard.d.ts.map +0 -1
- package/dist/src/components/blocks/Section.d.ts +0 -45
- package/dist/src/components/blocks/Section.d.ts.map +0 -1
- package/dist/src/components/blocks/Text.d.ts +0 -34
- package/dist/src/components/blocks/Text.d.ts.map +0 -1
- package/dist/src/components/blocks/index.d.ts +0 -41
- package/dist/src/components/blocks/index.d.ts.map +0 -1
- package/dist/src/components/buttons/Button.d.ts +0 -41
- package/dist/src/components/buttons/Button.d.ts.map +0 -1
- package/dist/src/components/buttons/PaletteSwitcher.d.ts +0 -24
- package/dist/src/components/buttons/PaletteSwitcher.d.ts.map +0 -1
- package/dist/src/components/buttons/ThemeSwitcher.d.ts +0 -24
- package/dist/src/components/buttons/ThemeSwitcher.d.ts.map +0 -1
- package/dist/src/components/buttons/index.d.ts +0 -11
- package/dist/src/components/buttons/index.d.ts.map +0 -1
- package/dist/src/components/forms/FormBlock.d.ts +0 -51
- package/dist/src/components/forms/FormBlock.d.ts.map +0 -1
- package/dist/src/components/forms/index.d.ts +0 -8
- package/dist/src/components/forms/index.d.ts.map +0 -1
- package/dist/src/components/index.d.ts +0 -41
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/components/input/ChoiceInputField.d.ts +0 -29
- package/dist/src/components/input/ChoiceInputField.d.ts.map +0 -1
- package/dist/src/components/input/HtmlInputField.d.ts +0 -33
- package/dist/src/components/input/HtmlInputField.d.ts.map +0 -1
- package/dist/src/components/input/SelectInputField.d.ts +0 -31
- package/dist/src/components/input/SelectInputField.d.ts.map +0 -1
- package/dist/src/components/input/SwitchInputField.d.ts +0 -27
- package/dist/src/components/input/SwitchInputField.d.ts.map +0 -1
- package/dist/src/components/input/TextField.d.ts +0 -18
- package/dist/src/components/input/TextField.d.ts.map +0 -1
- package/dist/src/components/input/TextInputField.d.ts +0 -34
- package/dist/src/components/input/TextInputField.d.ts.map +0 -1
- package/dist/src/components/input/index.d.ts +0 -19
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts +0 -34
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +0 -1
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts +0 -9
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts.map +0 -1
- package/dist/src/components/layout/GridCell.d.ts +0 -32
- package/dist/src/components/layout/GridCell.d.ts.map +0 -1
- package/dist/src/components/layout/GridCellWrapper.d.ts +0 -46
- package/dist/src/components/layout/GridCellWrapper.d.ts.map +0 -1
- package/dist/src/components/layout/GridLayout.d.ts +0 -50
- package/dist/src/components/layout/GridLayout.d.ts.map +0 -1
- package/dist/src/components/layout/index.d.ts +0 -14
- package/dist/src/components/layout/index.d.ts.map +0 -1
- package/dist/src/components/menu/Menu.d.ts +0 -1
- package/dist/src/components/menu/Menu.d.ts.map +0 -1
- package/dist/src/components/menu/MenuItem.d.ts +0 -31
- package/dist/src/components/menu/MenuItem.d.ts.map +0 -1
- package/dist/src/components/menu/index.d.ts +0 -7
- package/dist/src/components/menu/index.d.ts.map +0 -1
- package/dist/src/components/pages/FormPage.d.ts +0 -66
- package/dist/src/components/pages/FormPage.d.ts.map +0 -1
- package/dist/src/components/pages/Page.d.ts +0 -68
- package/dist/src/components/pages/Page.d.ts.map +0 -1
- package/dist/src/components/pages/index.d.ts +0 -10
- package/dist/src/components/pages/index.d.ts.map +0 -1
- package/dist/src/components/shared/createSerializableView.d.ts +0 -81
- package/dist/src/components/shared/createSerializableView.d.ts.map +0 -1
- package/dist/src/components/shared/viewProps.d.ts +0 -37
- package/dist/src/components/shared/viewProps.d.ts.map +0 -1
- package/dist/src/config/AppConfig.d.ts +0 -49
- package/dist/src/config/AppConfig.d.ts.map +0 -1
- package/dist/src/config/AppConfigBuilder.d.ts +0 -75
- package/dist/src/config/AppConfigBuilder.d.ts.map +0 -1
- package/dist/src/config/index.d.ts +0 -13
- package/dist/src/config/index.d.ts.map +0 -1
- package/dist/src/config/types.d.ts +0 -130
- package/dist/src/config/types.d.ts.map +0 -1
- package/dist/src/config.d.ts +0 -15
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/contexts/DataContext.d.ts +0 -139
- package/dist/src/contexts/DataContext.d.ts.map +0 -1
- package/dist/src/contexts/DimensionsContext.d.ts +0 -42
- package/dist/src/contexts/DimensionsContext.d.ts.map +0 -1
- package/dist/src/contexts/PaletteContext.d.ts +0 -53
- package/dist/src/contexts/PaletteContext.d.ts.map +0 -1
- package/dist/src/contexts/PrintModeContext.d.ts +0 -27
- package/dist/src/contexts/PrintModeContext.d.ts.map +0 -1
- package/dist/src/contexts/QwickAppContext.d.ts +0 -71
- package/dist/src/contexts/QwickAppContext.d.ts.map +0 -1
- package/dist/src/contexts/ThemeContext.d.ts +0 -65
- package/dist/src/contexts/ThemeContext.d.ts.map +0 -1
- package/dist/src/contexts/index.d.ts +0 -11
- package/dist/src/contexts/index.d.ts.map +0 -1
- package/dist/src/hooks/index.d.ts +0 -12
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/useBaseProps.d.ts +0 -101
- package/dist/src/hooks/useBaseProps.d.ts.map +0 -1
- package/dist/src/hooks/useDataBinding.d.ts +0 -22
- package/dist/src/hooks/useDataBinding.d.ts.map +0 -1
- package/dist/src/hooks/usePrintMode.d.ts +0 -39
- package/dist/src/hooks/usePrintMode.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -9
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/palettes/PaletteAutumn.d.ts +0 -10
- package/dist/src/palettes/PaletteAutumn.d.ts.map +0 -1
- package/dist/src/palettes/PaletteCosmic.d.ts +0 -10
- package/dist/src/palettes/PaletteCosmic.d.ts.map +0 -1
- package/dist/src/palettes/PaletteDefault.d.ts +0 -10
- package/dist/src/palettes/PaletteDefault.d.ts.map +0 -1
- package/dist/src/palettes/PaletteOcean.d.ts +0 -10
- package/dist/src/palettes/PaletteOcean.d.ts.map +0 -1
- package/dist/src/palettes/PaletteSpring.d.ts +0 -10
- package/dist/src/palettes/PaletteSpring.d.ts.map +0 -1
- package/dist/src/palettes/PaletteWinter.d.ts +0 -10
- package/dist/src/palettes/PaletteWinter.d.ts.map +0 -1
- package/dist/src/palettes/index.d.ts +0 -13
- package/dist/src/palettes/index.d.ts.map +0 -1
- package/dist/src/schemas/ActionSchema.d.ts +0 -21
- package/dist/src/schemas/ActionSchema.d.ts.map +0 -1
- package/dist/src/schemas/ArticleSchema.d.ts +0 -13
- package/dist/src/schemas/ArticleSchema.d.ts.map +0 -1
- package/dist/src/schemas/ButtonSchema.d.ts +0 -19
- package/dist/src/schemas/ButtonSchema.d.ts.map +0 -1
- package/dist/src/schemas/CardListGridSchema.d.ts +0 -17
- package/dist/src/schemas/CardListGridSchema.d.ts.map +0 -1
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/CodeSchema.d.ts +0 -18
- package/dist/src/schemas/CodeSchema.d.ts.map +0 -1
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts +0 -32
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts.map +0 -1
- package/dist/src/schemas/ContainerSchema.d.ts +0 -12
- package/dist/src/schemas/ContainerSchema.d.ts.map +0 -1
- package/dist/src/schemas/ContentSchema.d.ts +0 -21
- package/dist/src/schemas/ContentSchema.d.ts.map +0 -1
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts +0 -28
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureCardSchema.d.ts +0 -28
- package/dist/src/schemas/FeatureCardSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureGridSchema.d.ts +0 -17
- package/dist/src/schemas/FeatureGridSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureItemSchema.d.ts +0 -16
- package/dist/src/schemas/FeatureItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterItemSchema.d.ts +0 -15
- package/dist/src/schemas/FooterItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterSchema.d.ts +0 -20
- package/dist/src/schemas/FooterSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterSectionSchema.d.ts +0 -15
- package/dist/src/schemas/FooterSectionSchema.d.ts.map +0 -1
- package/dist/src/schemas/FormBlockSchema.d.ts +0 -19
- package/dist/src/schemas/FormBlockSchema.d.ts.map +0 -1
- package/dist/src/schemas/GridCellSchema.d.ts +0 -23
- package/dist/src/schemas/GridCellSchema.d.ts.map +0 -1
- package/dist/src/schemas/GridLayoutSchema.d.ts +0 -21
- package/dist/src/schemas/GridLayoutSchema.d.ts.map +0 -1
- package/dist/src/schemas/HeaderActionSchema.d.ts +0 -17
- package/dist/src/schemas/HeaderActionSchema.d.ts.map +0 -1
- package/dist/src/schemas/HeroBlockSchema.d.ts +0 -22
- package/dist/src/schemas/HeroBlockSchema.d.ts.map +0 -1
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/HtmlSchema.d.ts +0 -14
- package/dist/src/schemas/HtmlSchema.d.ts.map +0 -1
- package/dist/src/schemas/ImageSchema.d.ts +0 -32
- package/dist/src/schemas/ImageSchema.d.ts.map +0 -1
- package/dist/src/schemas/LogoSchema.d.ts +0 -35
- package/dist/src/schemas/LogoSchema.d.ts.map +0 -1
- package/dist/src/schemas/MarkdownSchema.d.ts +0 -14
- package/dist/src/schemas/MarkdownSchema.d.ts.map +0 -1
- package/dist/src/schemas/MetadataItemSchema.d.ts +0 -13
- package/dist/src/schemas/MetadataItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts +0 -28
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts.map +0 -1
- package/dist/src/schemas/PageTemplateSchema.d.ts +0 -31
- package/dist/src/schemas/PageTemplateSchema.d.ts.map +0 -1
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts +0 -16
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts.map +0 -1
- package/dist/src/schemas/PrintConfigSchema.d.ts +0 -31
- package/dist/src/schemas/PrintConfigSchema.d.ts.map +0 -1
- package/dist/src/schemas/ProductCardSchema.d.ts +0 -39
- package/dist/src/schemas/ProductCardSchema.d.ts.map +0 -1
- package/dist/src/schemas/SafeSpanSchema.d.ts +0 -13
- package/dist/src/schemas/SafeSpanSchema.d.ts.map +0 -1
- package/dist/src/schemas/SectionSchema.d.ts +0 -16
- package/dist/src/schemas/SectionSchema.d.ts.map +0 -1
- package/dist/src/schemas/SelectInputFieldSchema.d.ts +0 -27
- package/dist/src/schemas/SelectInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/TextInputFieldSchema.d.ts +0 -22
- package/dist/src/schemas/TextInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/TextSchema.d.ts +0 -37
- package/dist/src/schemas/TextSchema.d.ts.map +0 -1
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts +0 -19
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts.map +0 -1
- package/dist/src/schemas/ViewSchema.d.ts +0 -66
- package/dist/src/schemas/ViewSchema.d.ts.map +0 -1
- package/dist/src/schemas/index.d.ts +0 -47
- package/dist/src/schemas/index.d.ts.map +0 -1
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts +0 -128
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts.map +0 -1
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts +0 -53
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts.map +0 -1
- package/dist/src/schemas/transformers/registry.d.ts +0 -18
- package/dist/src/schemas/transformers/registry.d.ts.map +0 -1
- package/dist/src/schemas/types/Serializable.d.ts +0 -46
- package/dist/src/schemas/types/Serializable.d.ts.map +0 -1
- package/dist/src/stories/_templates/SerializationTemplate.d.ts.map +0 -1
- package/dist/src/templates/TemplateResolver.d.ts +0 -52
- package/dist/src/templates/TemplateResolver.d.ts.map +0 -1
- package/dist/src/templates/index.d.ts +0 -7
- package/dist/src/templates/index.d.ts.map +0 -1
- package/dist/src/types/CacheProvider.d.ts +0 -18
- package/dist/src/types/CacheProvider.d.ts.map +0 -1
- package/dist/src/types/CollapsibleLayout.d.ts +0 -142
- package/dist/src/types/CollapsibleLayout.d.ts.map +0 -1
- package/dist/src/types/ContentProxy.d.ts +0 -47
- package/dist/src/types/ContentProxy.d.ts.map +0 -1
- package/dist/src/types/DataTypes.d.ts +0 -185
- package/dist/src/types/DataTypes.d.ts.map +0 -1
- package/dist/src/types/TemplateProvider.d.ts +0 -10
- package/dist/src/types/TemplateProvider.d.ts.map +0 -1
- package/dist/src/types/TemplateResolver.d.ts +0 -23
- package/dist/src/types/TemplateResolver.d.ts.map +0 -1
- package/dist/src/types/index.d.ts +0 -82
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/utils/breakpoints.d.ts +0 -35
- package/dist/src/utils/breakpoints.d.ts.map +0 -1
- package/dist/src/utils/cssUtils.d.ts +0 -17
- package/dist/src/utils/cssUtils.d.ts.map +0 -1
- package/dist/src/utils/customPaletteManager.d.ts +0 -8
- package/dist/src/utils/customPaletteManager.d.ts.map +0 -1
- package/dist/src/utils/dimensions.d.ts +0 -34
- package/dist/src/utils/dimensions.d.ts.map +0 -1
- package/dist/src/utils/htmlTransform.d.ts +0 -44
- package/dist/src/utils/htmlTransform.d.ts.map +0 -1
- package/dist/src/utils/index.d.ts +0 -16
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/logger.d.ts +0 -26
- package/dist/src/utils/logger.d.ts.map +0 -1
- package/dist/src/utils/paletteUtils.d.ts +0 -38
- package/dist/src/utils/paletteUtils.d.ts.map +0 -1
- package/dist/src/utils/persistenceUtils.d.ts +0 -31
- package/dist/src/utils/persistenceUtils.d.ts.map +0 -1
- package/dist/src/utils/reactUtils.d.ts +0 -33
- package/dist/src/utils/reactUtils.d.ts.map +0 -1
- package/dist/src/utils/spacing.d.ts +0 -34
- package/dist/src/utils/spacing.d.ts.map +0 -1
- package/dist/src/utils/themePerformanceMonitor.d.ts +0 -32
- package/dist/src/utils/themePerformanceMonitor.d.ts.map +0 -1
- package/dist/src/utils/themeUtils.d.ts +0 -27
- package/dist/src/utils/themeUtils.d.ts.map +0 -1
- package/dist/tests/ConsoleWarningTest.d.ts +0 -5
- package/dist/tests/ConsoleWarningTest.d.ts.map +0 -1
- package/dist/tests/StorageKeyTest.d.ts +0 -6
- package/dist/tests/StorageKeyTest.d.ts.map +0 -1
- package/dist/tests/ThemeStorageKeyTest.d.ts +0 -6
- package/dist/tests/ThemeStorageKeyTest.d.ts.map +0 -1
- /package/dist/palettes/{PaletteAutumn.css → palette-autumn.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteCosmic.css → palette-cosmic.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteDefault.css → palette-default.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteOcean.css → palette-ocean.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteSpring.css → palette-spring.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteWinter.css → palette-winter.1.4.9.css} +0 -0
- /package/dist/{src/stories → stories}/_templates/SerializationTemplate.d.ts +0 -0
|
@@ -55,7 +55,7 @@ function SectionView({
|
|
|
55
55
|
component = 'section',
|
|
56
56
|
gridProps,
|
|
57
57
|
...props
|
|
58
|
-
}: SectionProps & { gridProps?:
|
|
58
|
+
}: SectionProps & { gridProps?: unknown }) {
|
|
59
59
|
|
|
60
60
|
// Return empty state if no content
|
|
61
61
|
if (!children) {
|
|
@@ -63,7 +63,7 @@ function SectionView({
|
|
|
63
63
|
<Box
|
|
64
64
|
component={component}
|
|
65
65
|
{...props}
|
|
66
|
-
{...(gridProps
|
|
66
|
+
{...(gridProps ? { 'data-grid': JSON.stringify(gridProps) } : {})}
|
|
67
67
|
sx={{
|
|
68
68
|
backgroundColor: background,
|
|
69
69
|
color,
|
|
@@ -117,7 +117,7 @@ function SectionView({
|
|
|
117
117
|
<Box
|
|
118
118
|
component={component}
|
|
119
119
|
{...props}
|
|
120
|
-
{...(gridProps
|
|
120
|
+
{...(gridProps ? { 'data-grid': JSON.stringify(gridProps) } : {})}
|
|
121
121
|
sx={{
|
|
122
122
|
backgroundColor: background,
|
|
123
123
|
color,
|
|
@@ -153,35 +153,42 @@ export const Section: SerializableComponent<SectionProps> = createSerializableVi
|
|
|
153
153
|
View: SectionView,
|
|
154
154
|
finalize: (props: SectionProps) => {
|
|
155
155
|
// Handle type conversion for contentMaxWidth - convert "false" string to boolean false
|
|
156
|
-
if ((props.contentMaxWidth as
|
|
156
|
+
if ((props.contentMaxWidth as unknown) === "false") {
|
|
157
157
|
return { ...props, contentMaxWidth: false as BreakpointValue };
|
|
158
158
|
}
|
|
159
159
|
return props;
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
162
|
|
|
163
|
+
// Type for pattern registry with basic methods
|
|
164
|
+
interface PatternRegistry {
|
|
165
|
+
hasPattern(pattern: string): boolean;
|
|
166
|
+
registerPattern(pattern: string, handler: (element: Element) => unknown): void;
|
|
167
|
+
}
|
|
168
|
+
|
|
163
169
|
// Register HTML patterns that Section component can handle
|
|
164
|
-
(Section as
|
|
170
|
+
(Section as unknown as { registerPatternHandlers: (registry: PatternRegistry) => void }).registerPatternHandlers = (registry: PatternRegistry): void => {
|
|
165
171
|
// Register section element pattern
|
|
166
172
|
if (!registry.hasPattern('section')) {
|
|
167
|
-
registry.registerPattern('section', (Section as
|
|
173
|
+
registry.registerPattern('section', (Section as unknown as { transformSection: (element: Element) => unknown }).transformSection);
|
|
168
174
|
}
|
|
169
|
-
|
|
175
|
+
|
|
170
176
|
// Register section with specific classes
|
|
171
177
|
if (!registry.hasPattern('section.blog-section')) {
|
|
172
|
-
registry.registerPattern('section.blog-section', (Section as
|
|
178
|
+
registry.registerPattern('section.blog-section', (Section as unknown as { transformBlogSection: (element: Element) => unknown }).transformBlogSection);
|
|
173
179
|
}
|
|
174
180
|
};
|
|
175
181
|
|
|
176
182
|
// Transform generic section elements to Section component
|
|
177
|
-
(Section as
|
|
183
|
+
(Section as unknown as { transformSection: (element: Element) => unknown }).transformSection = (element: Element): unknown => {
|
|
178
184
|
const padding = element.getAttribute('data-padding') || 'medium';
|
|
179
185
|
const background = element.getAttribute('data-background');
|
|
180
186
|
const contentMaxWidth = element.getAttribute('data-max-width') || 'lg';
|
|
181
187
|
|
|
182
188
|
return {
|
|
183
189
|
tagName: 'Section',
|
|
184
|
-
|
|
190
|
+
version: '1.0.0',
|
|
191
|
+
data: {
|
|
185
192
|
padding,
|
|
186
193
|
background,
|
|
187
194
|
contentMaxWidth,
|
|
@@ -191,13 +198,14 @@ export const Section: SerializableComponent<SectionProps> = createSerializableVi
|
|
|
191
198
|
};
|
|
192
199
|
|
|
193
200
|
// Transform blog section elements to Section component with specific styling
|
|
194
|
-
(Section as
|
|
201
|
+
(Section as unknown as { transformBlogSection: (element: Element) => unknown }).transformBlogSection = (element: Element): unknown => {
|
|
195
202
|
const padding = element.getAttribute('data-padding') || 'large';
|
|
196
203
|
const background = element.getAttribute('data-background') || 'var(--theme-surface)';
|
|
197
|
-
|
|
204
|
+
|
|
198
205
|
return {
|
|
199
206
|
tagName: 'Section',
|
|
200
|
-
|
|
207
|
+
version: '1.0.0',
|
|
208
|
+
data: {
|
|
201
209
|
padding,
|
|
202
210
|
background,
|
|
203
211
|
contentMaxWidth: 'md',
|
|
@@ -19,7 +19,6 @@ import { Typography } from '@mui/material';
|
|
|
19
19
|
import React from 'react';
|
|
20
20
|
import { createSerializableView, SerializableComponent } from '../shared/createSerializableView';
|
|
21
21
|
import { ViewProps } from '../shared/viewProps';
|
|
22
|
-
import { ComponentTransformer } from '../../schemas/transformers/ComponentTransformer';
|
|
23
22
|
import TextSchema from '../../schemas/TextSchema';
|
|
24
23
|
import type { SchemaProps } from '@qwickapps/schema/src/types/ModelProps';
|
|
25
24
|
|
|
@@ -90,7 +89,7 @@ function TextView({
|
|
|
90
89
|
<Typography
|
|
91
90
|
{...restProps}
|
|
92
91
|
variant={variant}
|
|
93
|
-
color={color as
|
|
92
|
+
color={color as 'initial' | 'inherit' | 'primary' | 'secondary' | 'textPrimary' | 'textSecondary' | 'error'}
|
|
94
93
|
align={align}
|
|
95
94
|
component={component}
|
|
96
95
|
noWrap={noWrap}
|
|
@@ -115,32 +114,49 @@ export const Text: SerializableComponent<TextProps> = createSerializableView<Tex
|
|
|
115
114
|
childrenStrategy: { mode: 'content-prop', propName: 'content' }
|
|
116
115
|
});
|
|
117
116
|
|
|
117
|
+
// Type for pattern registry with basic methods
|
|
118
|
+
interface PatternRegistry {
|
|
119
|
+
hasPattern(pattern: string): boolean;
|
|
120
|
+
registerPattern(pattern: string, handler: (element: Element) => unknown): void;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Type for Text component with pattern handlers
|
|
124
|
+
interface TextComponentWithPatterns {
|
|
125
|
+
registerPatternHandlers: (registry: PatternRegistry) => void;
|
|
126
|
+
transformParagraph: (element: Element) => unknown;
|
|
127
|
+
transformHeading: (element: Element, tagName: string) => unknown;
|
|
128
|
+
transformSpan: (element: Element) => unknown;
|
|
129
|
+
}
|
|
130
|
+
|
|
118
131
|
// Register HTML patterns that Text component can handle
|
|
119
|
-
(Text as
|
|
132
|
+
(Text as unknown as TextComponentWithPatterns).registerPatternHandlers = (registry: PatternRegistry): void => {
|
|
133
|
+
const textComponent = Text as unknown as TextComponentWithPatterns;
|
|
134
|
+
|
|
120
135
|
// Register paragraph elements
|
|
121
136
|
if (!registry.hasPattern('p')) {
|
|
122
|
-
registry.registerPattern('p',
|
|
137
|
+
registry.registerPattern('p', textComponent.transformParagraph);
|
|
123
138
|
}
|
|
124
|
-
|
|
139
|
+
|
|
125
140
|
// Register heading elements
|
|
126
141
|
const headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
127
142
|
headings.forEach(heading => {
|
|
128
143
|
if (!registry.hasPattern(heading)) {
|
|
129
|
-
registry.registerPattern(heading, (element: Element) =>
|
|
144
|
+
registry.registerPattern(heading, (element: Element) => textComponent.transformHeading(element, heading));
|
|
130
145
|
}
|
|
131
146
|
});
|
|
132
|
-
|
|
147
|
+
|
|
133
148
|
// Register span elements
|
|
134
149
|
if (!registry.hasPattern('span')) {
|
|
135
|
-
registry.registerPattern('span',
|
|
150
|
+
registry.registerPattern('span', textComponent.transformSpan);
|
|
136
151
|
}
|
|
137
152
|
};
|
|
138
153
|
|
|
139
154
|
// Transform paragraph elements to Text component
|
|
140
|
-
(Text as
|
|
155
|
+
(Text as unknown as TextComponentWithPatterns).transformParagraph = (element: Element): unknown => {
|
|
141
156
|
return {
|
|
142
157
|
tagName: 'Text',
|
|
143
|
-
|
|
158
|
+
version: '1.0.0',
|
|
159
|
+
data: {
|
|
144
160
|
variant: 'body1',
|
|
145
161
|
component: 'p',
|
|
146
162
|
content: element.textContent || ''
|
|
@@ -149,10 +165,10 @@ export const Text: SerializableComponent<TextProps> = createSerializableView<Tex
|
|
|
149
165
|
};
|
|
150
166
|
|
|
151
167
|
// Transform heading elements to Text component
|
|
152
|
-
(Text as
|
|
168
|
+
(Text as unknown as TextComponentWithPatterns).transformHeading = (element: Element, tagName: string): unknown => {
|
|
153
169
|
const variantMap: { [key: string]: string } = {
|
|
154
170
|
'h1': 'h1',
|
|
155
|
-
'h2': 'h2',
|
|
171
|
+
'h2': 'h2',
|
|
156
172
|
'h3': 'h3',
|
|
157
173
|
'h4': 'h4',
|
|
158
174
|
'h5': 'h5',
|
|
@@ -161,7 +177,8 @@ export const Text: SerializableComponent<TextProps> = createSerializableView<Tex
|
|
|
161
177
|
|
|
162
178
|
return {
|
|
163
179
|
tagName: 'Text',
|
|
164
|
-
|
|
180
|
+
version: '1.0.0',
|
|
181
|
+
data: {
|
|
165
182
|
variant: variantMap[tagName] || 'h4',
|
|
166
183
|
component: tagName,
|
|
167
184
|
content: element.textContent || ''
|
|
@@ -170,10 +187,11 @@ export const Text: SerializableComponent<TextProps> = createSerializableView<Tex
|
|
|
170
187
|
};
|
|
171
188
|
|
|
172
189
|
// Transform span elements to Text component
|
|
173
|
-
(Text as
|
|
190
|
+
(Text as unknown as TextComponentWithPatterns).transformSpan = (element: Element): unknown => {
|
|
174
191
|
return {
|
|
175
192
|
tagName: 'Text',
|
|
176
|
-
|
|
193
|
+
version: '1.0.0',
|
|
194
|
+
data: {
|
|
177
195
|
variant: 'body2',
|
|
178
196
|
component: 'span',
|
|
179
197
|
content: element.textContent || ''
|
|
@@ -14,11 +14,19 @@
|
|
|
14
14
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import React
|
|
17
|
+
import React from 'react';
|
|
18
18
|
import { Button as MuiButton, ButtonProps as MuiButtonProps, CircularProgress } from '@mui/material';
|
|
19
19
|
import ButtonModel from '../../schemas/ButtonSchema';
|
|
20
20
|
import { createSerializableView, SerializableComponent } from '../shared/createSerializableView';
|
|
21
21
|
import { ViewProps } from '../shared/viewProps';
|
|
22
|
+
import type { SchemaProps } from '@qwickapps/schema/src/types/ModelProps';
|
|
23
|
+
import { getIconComponent } from '../../utils/iconMap';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Re-export getIconComponent from iconMap for backwards compatibility
|
|
27
|
+
* Other components (Scaffold, ResponsiveMenu, etc.) may import from this file
|
|
28
|
+
*/
|
|
29
|
+
export { getIconComponent, iconMap } from '../../utils/iconMap';
|
|
22
30
|
|
|
23
31
|
// Action serialization pattern for button clicks
|
|
24
32
|
export interface ButtonAction {
|
|
@@ -29,27 +37,30 @@ export interface ButtonAction {
|
|
|
29
37
|
customHandler?: string;
|
|
30
38
|
}
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// Additional props for enhanced functionality
|
|
40
|
+
/**
|
|
41
|
+
* Props interface for Button component
|
|
42
|
+
* Uses SchemaProps<typeof ButtonSchema> for schema-driven typing
|
|
43
|
+
* Icons are transformed from strings to React components by finalize function
|
|
44
|
+
*
|
|
45
|
+
* Note: We omit 'icon' and 'endIcon' from schema props because they are strings in the schema
|
|
46
|
+
* but get transformed to ReactElements by the finalize function.
|
|
47
|
+
*/
|
|
48
|
+
export type ButtonProps = ViewProps & Omit<SchemaProps<typeof ButtonModel>, 'icon' | 'endIcon'> & {
|
|
49
|
+
// Runtime props (transformed from schema strings by finalize function)
|
|
43
50
|
icon?: React.ReactNode;
|
|
44
51
|
endIcon?: React.ReactNode;
|
|
52
|
+
// Additional runtime-only props
|
|
45
53
|
action?: ButtonAction;
|
|
46
|
-
|
|
54
|
+
// HTML button attributes
|
|
55
|
+
type?: 'button' | 'submit' | 'reset';
|
|
56
|
+
};
|
|
47
57
|
|
|
48
58
|
// View component - handles the actual rendering
|
|
49
59
|
const ButtonView = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
|
|
50
60
|
const {
|
|
51
61
|
label,
|
|
52
62
|
variant = 'primary',
|
|
63
|
+
color,
|
|
53
64
|
buttonSize = 'medium',
|
|
54
65
|
icon,
|
|
55
66
|
endIcon,
|
|
@@ -82,8 +93,14 @@ const ButtonView = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref)
|
|
|
82
93
|
}
|
|
83
94
|
};
|
|
84
95
|
|
|
85
|
-
//
|
|
86
|
-
const
|
|
96
|
+
// Get theme color name - prioritize explicit color prop over variant-derived color
|
|
97
|
+
const getThemeColorName = (): string => {
|
|
98
|
+
// If color prop is explicitly provided, use it
|
|
99
|
+
if (color) {
|
|
100
|
+
return color;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Otherwise derive from variant
|
|
87
104
|
switch (variant) {
|
|
88
105
|
case 'primary':
|
|
89
106
|
return 'primary';
|
|
@@ -100,6 +117,54 @@ const ButtonView = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref)
|
|
|
100
117
|
}
|
|
101
118
|
};
|
|
102
119
|
|
|
120
|
+
// Get CSS theme variable styles based on variant and color
|
|
121
|
+
const getColorStyles = () => {
|
|
122
|
+
const muiVariant = getMuiVariant();
|
|
123
|
+
const colorName = getThemeColorName();
|
|
124
|
+
|
|
125
|
+
// For contained buttons: use solid background
|
|
126
|
+
if (muiVariant === 'contained') {
|
|
127
|
+
return {
|
|
128
|
+
backgroundColor: `var(--theme-${colorName})`,
|
|
129
|
+
color: `var(--theme-on-${colorName})`,
|
|
130
|
+
'&:hover': {
|
|
131
|
+
backgroundColor: `var(--theme-${colorName}-dark)`,
|
|
132
|
+
},
|
|
133
|
+
'&.Mui-disabled': {
|
|
134
|
+
backgroundColor: 'var(--theme-text-disabled)',
|
|
135
|
+
color: 'var(--theme-on-surface)',
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// For outlined buttons: border and text color
|
|
141
|
+
if (muiVariant === 'outlined') {
|
|
142
|
+
return {
|
|
143
|
+
borderColor: `var(--theme-${colorName})`,
|
|
144
|
+
color: `var(--theme-${colorName})`,
|
|
145
|
+
'&:hover': {
|
|
146
|
+
borderColor: `var(--theme-${colorName}-dark)`,
|
|
147
|
+
backgroundColor: `var(--theme-${colorName}-light)`,
|
|
148
|
+
},
|
|
149
|
+
'&.Mui-disabled': {
|
|
150
|
+
borderColor: 'var(--theme-border-main)',
|
|
151
|
+
color: 'var(--theme-text-disabled)',
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// For text buttons: just text color
|
|
157
|
+
return {
|
|
158
|
+
color: `var(--theme-${colorName})`,
|
|
159
|
+
'&:hover': {
|
|
160
|
+
backgroundColor: `var(--theme-${colorName}-light)`,
|
|
161
|
+
},
|
|
162
|
+
'&.Mui-disabled': {
|
|
163
|
+
color: 'var(--theme-text-disabled)',
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
|
|
103
168
|
// Handle action serialization pattern for onClick
|
|
104
169
|
const handleActionClick = React.useCallback((event: React.MouseEvent<HTMLButtonElement>) => {
|
|
105
170
|
if (action) {
|
|
@@ -111,15 +176,8 @@ const ButtonView = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref)
|
|
|
111
176
|
if (action.target === '_blank') {
|
|
112
177
|
window.open(action.url, '_blank', 'noopener,noreferrer');
|
|
113
178
|
} else {
|
|
114
|
-
//
|
|
115
|
-
|
|
116
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
117
|
-
const navigate = require('react-router-dom').useNavigate();
|
|
118
|
-
navigate(action.url);
|
|
119
|
-
} catch {
|
|
120
|
-
// Fallback to regular navigation
|
|
121
|
-
window.location.href = action.url;
|
|
122
|
-
}
|
|
179
|
+
// Fallback to regular navigation
|
|
180
|
+
window.location.href = action.url;
|
|
123
181
|
}
|
|
124
182
|
}
|
|
125
183
|
break;
|
|
@@ -142,7 +200,7 @@ const ButtonView = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref)
|
|
|
142
200
|
case 'custom':
|
|
143
201
|
if (action.customHandler && typeof window !== 'undefined') {
|
|
144
202
|
// Look for custom handler function on window
|
|
145
|
-
const handler = (window as
|
|
203
|
+
const handler = (window as Record<string, unknown>)[action.customHandler];
|
|
146
204
|
if (typeof handler === 'function') {
|
|
147
205
|
handler(event);
|
|
148
206
|
}
|
|
@@ -163,12 +221,13 @@ const ButtonView = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref)
|
|
|
163
221
|
// Base button props
|
|
164
222
|
const baseProps: Partial<MuiButtonProps> = {
|
|
165
223
|
variant: getMuiVariant(),
|
|
166
|
-
color: getMuiColor(),
|
|
167
224
|
size: buttonSize,
|
|
168
225
|
disabled: disabled || loading,
|
|
169
226
|
fullWidth,
|
|
170
227
|
...restProps,
|
|
171
228
|
sx: {
|
|
229
|
+
// Apply CSS theme variable colors
|
|
230
|
+
...getColorStyles(),
|
|
172
231
|
// Ensure consistent text transform
|
|
173
232
|
textTransform: 'none',
|
|
174
233
|
// Loading state adjustments
|
|
@@ -177,6 +236,7 @@ const ButtonView = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref)
|
|
|
177
236
|
marginRight: 1,
|
|
178
237
|
},
|
|
179
238
|
}),
|
|
239
|
+
// Merge user-provided sx prop last to allow overrides
|
|
180
240
|
...(restProps.sx || {}),
|
|
181
241
|
},
|
|
182
242
|
startIcon: loading ? (
|
|
@@ -229,10 +289,30 @@ export const Button: SerializableComponent<ButtonProps> = createSerializableView
|
|
|
229
289
|
role: 'view',
|
|
230
290
|
View: ButtonView,
|
|
231
291
|
// Button component uses default react-children strategy for potential child content
|
|
292
|
+
finalize: (props: ButtonProps) => {
|
|
293
|
+
// Transform icon string names to React icon components
|
|
294
|
+
const transformedProps = { ...props };
|
|
295
|
+
|
|
296
|
+
if (typeof (props as Record<string, unknown>).icon === 'string') {
|
|
297
|
+
const iconComponent = getIconComponent((props as Record<string, unknown>).icon as string);
|
|
298
|
+
if (iconComponent) {
|
|
299
|
+
transformedProps.icon = iconComponent;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (typeof (props as Record<string, unknown>).endIcon === 'string') {
|
|
304
|
+
const endIconComponent = getIconComponent((props as Record<string, unknown>).endIcon as string);
|
|
305
|
+
if (endIconComponent) {
|
|
306
|
+
transformedProps.endIcon = endIconComponent;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return transformedProps;
|
|
311
|
+
}
|
|
232
312
|
});
|
|
233
313
|
|
|
234
314
|
// Register HTML patterns that Button component can handle
|
|
235
|
-
(Button as
|
|
315
|
+
(Button as Record<string, unknown>).registerPatternHandlers = (registry: Record<string, (...args: unknown[]) => unknown>): void => {
|
|
236
316
|
// Register button elements
|
|
237
317
|
if (!registry.hasPattern('button')) {
|
|
238
318
|
registry.registerPattern('button', transformButton);
|
|
@@ -250,7 +330,7 @@ export const Button: SerializableComponent<ButtonProps> = createSerializableView
|
|
|
250
330
|
};
|
|
251
331
|
|
|
252
332
|
// Transform button elements to Button component
|
|
253
|
-
function transformButton(element: Element):
|
|
333
|
+
function transformButton(element: Element): unknown {
|
|
254
334
|
const variant = element.getAttribute('data-variant') ||
|
|
255
335
|
(element.className.includes('btn-primary') ? 'primary' :
|
|
256
336
|
element.className.includes('btn-outlined') ? 'outlined' : 'secondary');
|
|
@@ -271,7 +351,7 @@ function transformButton(element: Element): any {
|
|
|
271
351
|
}
|
|
272
352
|
|
|
273
353
|
// Transform input type="button" elements to Button component
|
|
274
|
-
function transformInputButton(element: Element):
|
|
354
|
+
function transformInputButton(element: Element): unknown {
|
|
275
355
|
const disabled = element.hasAttribute('disabled');
|
|
276
356
|
const value = element.getAttribute('value') || 'Button';
|
|
277
357
|
|
|
@@ -286,7 +366,7 @@ function transformInputButton(element: Element): any {
|
|
|
286
366
|
}
|
|
287
367
|
|
|
288
368
|
// Transform input type="submit" elements to Button component
|
|
289
|
-
function transformSubmitButton(element: Element):
|
|
369
|
+
function transformSubmitButton(element: Element): unknown {
|
|
290
370
|
const disabled = element.hasAttribute('disabled');
|
|
291
371
|
const value = element.getAttribute('value') || 'Submit';
|
|
292
372
|
|
|
@@ -207,18 +207,21 @@ function PaletteSwitcherView({
|
|
|
207
207
|
function PaletteSwitcher(props: PaletteSwitcherProps) {
|
|
208
208
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
209
209
|
|
|
210
|
+
// Always call hooks unconditionally
|
|
211
|
+
const bindingResult = useDataBinding<PaletteSwitcherModel>(
|
|
212
|
+
dataSource || '',
|
|
213
|
+
restProps as Partial<PaletteSwitcherModel>,
|
|
214
|
+
PaletteSwitcherModel.getSchema(),
|
|
215
|
+
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
216
|
+
);
|
|
217
|
+
|
|
210
218
|
// If no dataSource, use traditional props
|
|
211
219
|
if (!dataSource) {
|
|
212
220
|
return <PaletteSwitcherView {...restProps} />;
|
|
213
221
|
}
|
|
214
222
|
|
|
215
|
-
// Use data binding
|
|
216
|
-
const {
|
|
217
|
-
dataSource,
|
|
218
|
-
restProps as Partial<PaletteSwitcherModel>,
|
|
219
|
-
PaletteSwitcherModel.getSchema(),
|
|
220
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
221
|
-
);
|
|
223
|
+
// Use data binding result
|
|
224
|
+
const { loading, error, ...paletteSwitcherProps } = bindingResult;
|
|
222
225
|
|
|
223
226
|
// Show loading state
|
|
224
227
|
if (loading) {
|
|
@@ -263,6 +266,6 @@ function PaletteSwitcher(props: PaletteSwitcherProps) {
|
|
|
263
266
|
}
|
|
264
267
|
|
|
265
268
|
// Mark as QwickApp component
|
|
266
|
-
(PaletteSwitcher as
|
|
269
|
+
(PaletteSwitcher as Record<string, unknown>)[QWICKAPP_COMPONENT] = true;
|
|
267
270
|
|
|
268
271
|
export default PaletteSwitcher;
|
|
@@ -140,7 +140,7 @@ function ThemeSwitcherView({
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
const themeSwitcher = (
|
|
143
|
-
|
|
143
|
+
<span suppressHydrationWarning>
|
|
144
144
|
<IconButton
|
|
145
145
|
{...htmlProps}
|
|
146
146
|
onClick={handleClick}
|
|
@@ -150,6 +150,7 @@ function ThemeSwitcherView({
|
|
|
150
150
|
aria-controls={open ? 'theme-menu' : undefined}
|
|
151
151
|
aria-haspopup="true"
|
|
152
152
|
aria-expanded={open ? 'true' : undefined}
|
|
153
|
+
suppressHydrationWarning
|
|
153
154
|
sx={{
|
|
154
155
|
color: 'var(--theme-on-surface, inherit)',
|
|
155
156
|
'&:hover': {
|
|
@@ -164,7 +165,7 @@ function ThemeSwitcherView({
|
|
|
164
165
|
>
|
|
165
166
|
{getCurrentIcon()}
|
|
166
167
|
</IconButton>
|
|
167
|
-
|
|
168
|
+
|
|
168
169
|
<Menu
|
|
169
170
|
id="theme-menu"
|
|
170
171
|
anchorEl={anchorEl}
|
|
@@ -179,7 +180,7 @@ function ThemeSwitcherView({
|
|
|
179
180
|
transformOrigin={getMenuTransformOrigin()}
|
|
180
181
|
>
|
|
181
182
|
{showLightTheme && (
|
|
182
|
-
<MenuItem
|
|
183
|
+
<MenuItem
|
|
183
184
|
onClick={() => handleThemeSelect('light')}
|
|
184
185
|
selected={currentTheme === 'light'}
|
|
185
186
|
>
|
|
@@ -189,9 +190,9 @@ function ThemeSwitcherView({
|
|
|
189
190
|
<ListItemText>Light</ListItemText>
|
|
190
191
|
</MenuItem>
|
|
191
192
|
)}
|
|
192
|
-
|
|
193
|
+
|
|
193
194
|
{showDarkTheme && (
|
|
194
|
-
<MenuItem
|
|
195
|
+
<MenuItem
|
|
195
196
|
onClick={() => handleThemeSelect('dark')}
|
|
196
197
|
selected={currentTheme === 'dark'}
|
|
197
198
|
>
|
|
@@ -201,9 +202,9 @@ function ThemeSwitcherView({
|
|
|
201
202
|
<ListItemText>Dark</ListItemText>
|
|
202
203
|
</MenuItem>
|
|
203
204
|
)}
|
|
204
|
-
|
|
205
|
+
|
|
205
206
|
{showSystemTheme && (
|
|
206
|
-
<MenuItem
|
|
207
|
+
<MenuItem
|
|
207
208
|
onClick={() => handleThemeSelect('system')}
|
|
208
209
|
selected={currentTheme === 'system'}
|
|
209
210
|
>
|
|
@@ -214,7 +215,7 @@ function ThemeSwitcherView({
|
|
|
214
215
|
</MenuItem>
|
|
215
216
|
)}
|
|
216
217
|
</Menu>
|
|
217
|
-
|
|
218
|
+
</span>
|
|
218
219
|
);
|
|
219
220
|
|
|
220
221
|
return showTooltip ? (
|
|
@@ -231,18 +232,21 @@ function ThemeSwitcherView({
|
|
|
231
232
|
function ThemeSwitcher(props: ThemeSwitcherProps) {
|
|
232
233
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
233
234
|
|
|
235
|
+
// Always call hooks unconditionally
|
|
236
|
+
const bindingResult = useDataBinding<ThemeSwitcherModel>(
|
|
237
|
+
dataSource || '',
|
|
238
|
+
restProps as Partial<ThemeSwitcherModel>,
|
|
239
|
+
ThemeSwitcherModel.getSchema(),
|
|
240
|
+
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
241
|
+
);
|
|
242
|
+
|
|
234
243
|
// If no dataSource, use traditional props
|
|
235
244
|
if (!dataSource) {
|
|
236
245
|
return <ThemeSwitcherView {...restProps} />;
|
|
237
246
|
}
|
|
238
247
|
|
|
239
|
-
// Use data binding
|
|
240
|
-
const {
|
|
241
|
-
dataSource,
|
|
242
|
-
restProps as Partial<ThemeSwitcherModel>,
|
|
243
|
-
ThemeSwitcherModel.getSchema(),
|
|
244
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
245
|
-
);
|
|
248
|
+
// Use data binding result
|
|
249
|
+
const { loading, error, ...themeSwitcherProps } = bindingResult;
|
|
246
250
|
|
|
247
251
|
// Show loading state
|
|
248
252
|
if (loading) {
|
|
@@ -278,6 +282,6 @@ function ThemeSwitcher(props: ThemeSwitcherProps) {
|
|
|
278
282
|
}
|
|
279
283
|
|
|
280
284
|
// Mark as QwickApp component
|
|
281
|
-
(ThemeSwitcher as
|
|
285
|
+
(ThemeSwitcher as Record<string, unknown>)[QWICKAPP_COMPONENT] = true;
|
|
282
286
|
|
|
283
287
|
export default ThemeSwitcher;
|