@qwickapps/react-framework 1.4.9 → 1.5.1
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 +23 -0
- 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 +4143 -2318
- package/dist/index.js +4169 -2315
- 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.1.5.1.css +172 -0
- package/dist/palettes/palette-autumn.1.5.1.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.1.5.1.css +172 -0
- package/dist/palettes/palette-cosmic.1.5.1.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.1.5.1.css +178 -0
- package/dist/palettes/palette-default.1.5.1.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.1.5.1.css +172 -0
- package/dist/palettes/palette-ocean.1.5.1.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.1.5.1.css +160 -0
- package/dist/palettes/palette-spring.1.5.1.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.1.5.1.css +172 -0
- package/dist/palettes/palette-winter.1.5.1.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 +20 -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 +13 -16
- package/src/components/Logo.tsx +42 -29
- package/src/components/Markdown.tsx +9 -9
- package/src/components/ProductLogo.tsx +118 -0
- package/src/components/QwickApp.css +37 -1060
- package/src/components/QwickApp.tsx +1 -1
- package/src/components/QwickAppsLogo.tsx +1 -1
- package/src/components/ResponsiveMenu.tsx +1 -1
- package/src/components/SafeSpan.tsx +8 -8
- package/src/components/Scaffold.css +11 -1
- package/src/components/Scaffold.tsx +55 -25
- 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 +213 -69
- 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 +14 -9
- package/src/components/blocks/FeatureCard.tsx +16 -11
- package/src/components/blocks/FeatureGrid.tsx +13 -8
- package/src/components/blocks/Footer.tsx +25 -16
- package/src/components/blocks/HeroBlock.tsx +12 -13
- package/src/components/blocks/Image.tsx +16 -8
- package/src/components/blocks/PageBannerHeader.tsx +15 -11
- package/src/components/blocks/ProductCard.tsx +32 -25
- package/src/components/blocks/Section.tsx +21 -13
- package/src/components/blocks/Text.tsx +26 -11
- package/src/components/buttons/Button.tsx +22 -118
- 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/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 +2 -1
- 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/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 +6 -6
- package/src/schemas/transformers/ComponentTransformer.ts +37 -20
- package/src/schemas/transformers/ReactNodeTransformer.ts +18 -16
- 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/CardListGrid.stories.tsx +1 -1
- 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 +244 -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 -57
- 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 -22
- 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
|
@@ -15,12 +15,12 @@ describe('Optional logging dependency', () => {
|
|
|
15
15
|
|
|
16
16
|
afterEach(() => {
|
|
17
17
|
// Restore original require
|
|
18
|
-
(global as
|
|
18
|
+
(global as unknown as { require: typeof require }).require = originalRequire;
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
it('should use console fallback when @qwickapps/logging is not available', () => {
|
|
22
22
|
// Mock require to throw an error (simulating missing package)
|
|
23
|
-
(global as
|
|
23
|
+
(global as unknown as { require: jest.Mock }).require = jest.fn().mockImplementation((module: string) => {
|
|
24
24
|
if (module === '@qwickapps/logging') {
|
|
25
25
|
throw new Error('Cannot find module');
|
|
26
26
|
}
|
|
@@ -63,7 +63,7 @@ describe('Optional logging dependency', () => {
|
|
|
63
63
|
process.env.NODE_ENV = 'production';
|
|
64
64
|
|
|
65
65
|
// Mock require to throw an error (use fallback)
|
|
66
|
-
(global as
|
|
66
|
+
(global as unknown as { require: jest.Mock }).require = jest.fn().mockImplementation((module: string) => {
|
|
67
67
|
if (module === '@qwickapps/logging') {
|
|
68
68
|
throw new Error('Cannot find module');
|
|
69
69
|
}
|
|
@@ -9,7 +9,7 @@ export interface AccessibilityState {
|
|
|
9
9
|
isKeyboardUser: boolean;
|
|
10
10
|
issues: AccessibilityIssue[];
|
|
11
11
|
lastAnnouncement: Announcement | null;
|
|
12
|
-
preferences: Record<string,
|
|
12
|
+
preferences: Record<string, unknown>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface AccessibilityIssue {
|
|
@@ -415,10 +415,12 @@ export const AccessibilityProvider: React.FC<AccessibilityProviderProps> = ({
|
|
|
415
415
|
if (typeof document === 'undefined') return;
|
|
416
416
|
|
|
417
417
|
const { highContrast, reducedMotion, largeText } = state;
|
|
418
|
-
|
|
418
|
+
|
|
419
419
|
document.body.classList.toggle('high-contrast', highContrast);
|
|
420
420
|
document.body.classList.toggle('reduced-motion', reducedMotion);
|
|
421
421
|
document.body.classList.toggle('large-text', largeText);
|
|
422
|
+
// Using specific properties is more granular than using entire state object
|
|
423
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
422
424
|
}, [state.highContrast, state.reducedMotion, state.largeText]);
|
|
423
425
|
|
|
424
426
|
return (
|
|
@@ -68,7 +68,7 @@ export class ErrorBoundary extends Component<Props, State> {
|
|
|
68
68
|
|
|
69
69
|
// Send error to logging service if available
|
|
70
70
|
if (typeof window !== 'undefined') {
|
|
71
|
-
// @ts-
|
|
71
|
+
// @ts-expect-error - Global error logging service may not be defined
|
|
72
72
|
if (window.qwickapps?.logError) {
|
|
73
73
|
window.qwickapps.logError(error, errorInfo);
|
|
74
74
|
}
|
package/src/components/Html.tsx
CHANGED
|
@@ -26,16 +26,16 @@ import { Box } from '@mui/material';
|
|
|
26
26
|
import React, { ReactElement } from 'react';
|
|
27
27
|
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
28
28
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../hooks';
|
|
29
|
-
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
30
29
|
import HtmlModel from '../schemas/HtmlSchema';
|
|
30
|
+
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
31
31
|
import { ModelView } from './base/ModelView';
|
|
32
32
|
import SafeSpan from './SafeSpan';
|
|
33
33
|
|
|
34
34
|
// Legacy types for backward compatibility (now unused internally but maintained for API)
|
|
35
35
|
export interface TransformConfig {
|
|
36
|
-
rules?:
|
|
36
|
+
rules?: unknown[];
|
|
37
37
|
sanitize?: boolean;
|
|
38
|
-
sanitizeOptions?:
|
|
38
|
+
sanitizeOptions?: Record<string, unknown>;
|
|
39
39
|
fallbackComponent?: (element: Element, key: string) => React.ReactNode;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -45,20 +45,17 @@ type HtmlViewProps = SchemaProps<HtmlModel> & {
|
|
|
45
45
|
/** Whether to sanitize HTML (legacy - now handled internally) */
|
|
46
46
|
sanitize?: boolean;
|
|
47
47
|
/** Custom sanitization options (legacy - now handled internally) */
|
|
48
|
-
sanitizeOptions?:
|
|
48
|
+
sanitizeOptions?: Record<string, unknown>;
|
|
49
49
|
/** Container element type (React.ElementType for internal use, string in model for serialization) */
|
|
50
50
|
component?: React.ElementType;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
export interface HtmlProps extends HtmlViewProps, WithDataBinding {
|
|
53
|
+
export interface HtmlProps extends HtmlViewProps, WithDataBinding {}
|
|
54
54
|
|
|
55
55
|
// View component - handles the actual rendering
|
|
56
56
|
function HtmlView({
|
|
57
57
|
children = '',
|
|
58
|
-
transformConfig,
|
|
59
58
|
stripHeaders = false,
|
|
60
|
-
sanitize = true,
|
|
61
|
-
sanitizeOptions,
|
|
62
59
|
placeholder,
|
|
63
60
|
component = 'div',
|
|
64
61
|
...restProps
|
|
@@ -66,7 +63,7 @@ function HtmlView({
|
|
|
66
63
|
const { styleProps, htmlProps, restProps: otherProps } = useBaseProps(restProps);
|
|
67
64
|
|
|
68
65
|
// Mark as QwickApp component
|
|
69
|
-
(HtmlView as
|
|
66
|
+
(HtmlView as Record<string, unknown>)[QWICKAPP_COMPONENT] = true;
|
|
70
67
|
|
|
71
68
|
// Return placeholder if no HTML content
|
|
72
69
|
if (!children || !children.trim()) {
|
|
@@ -186,7 +183,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
186
183
|
static readonly version = '1.0.0';
|
|
187
184
|
|
|
188
185
|
// Deserialization: JSON data → React element
|
|
189
|
-
static fromJson(jsonData:
|
|
186
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
190
187
|
const { tagName, version, data } = jsonData;
|
|
191
188
|
if (tagName !== Html.tagName) {
|
|
192
189
|
throw new Error(`Cannot deserialize: Expected tagName 'Html' but got '${tagName}'`);
|
|
@@ -200,7 +197,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
200
197
|
}
|
|
201
198
|
|
|
202
199
|
// Component-specific serialization properties
|
|
203
|
-
protected getComponentSpecificProps():
|
|
200
|
+
protected getComponentSpecificProps(): Record<string, unknown> {
|
|
204
201
|
return {
|
|
205
202
|
children: this.props.children,
|
|
206
203
|
stripHeaders: this.props.stripHeaders,
|
|
@@ -210,7 +207,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
210
207
|
|
|
211
208
|
// Html component renders traditional props view
|
|
212
209
|
protected renderView(): React.ReactElement {
|
|
213
|
-
const {
|
|
210
|
+
const { ...restProps } = this.props;
|
|
214
211
|
return <HtmlView {...restProps} />;
|
|
215
212
|
}
|
|
216
213
|
|
|
@@ -220,7 +217,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
220
217
|
}
|
|
221
218
|
|
|
222
219
|
// Register HTML patterns that Html component can handle
|
|
223
|
-
static registerPatternHandlers(registry:
|
|
220
|
+
static registerPatternHandlers(registry: Record<string, unknown>): void {
|
|
224
221
|
// Register div elements with specific classes for Html transformation
|
|
225
222
|
if (!registry.hasPattern('div.html-content')) {
|
|
226
223
|
registry.registerPattern('div.html-content', Html.transformHtmlDiv);
|
|
@@ -233,7 +230,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
233
230
|
}
|
|
234
231
|
|
|
235
232
|
// Transform div with html-content class to Html component
|
|
236
|
-
private static transformHtmlDiv(element: Element):
|
|
233
|
+
private static transformHtmlDiv(element: Element): Record<string, unknown> {
|
|
237
234
|
const stripHeaders = element.getAttribute('data-strip-headers') === 'true';
|
|
238
235
|
const placeholder = element.getAttribute('data-placeholder');
|
|
239
236
|
|
|
@@ -248,7 +245,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
248
245
|
}
|
|
249
246
|
|
|
250
247
|
// Transform elements with data-html attribute to Html component
|
|
251
|
-
private static transformDataHtml(element: Element):
|
|
248
|
+
private static transformDataHtml(element: Element): Record<string, unknown> {
|
|
252
249
|
const htmlContent = element.getAttribute('data-html') || element.innerHTML;
|
|
253
250
|
const stripHeaders = element.getAttribute('data-strip-headers') === 'true';
|
|
254
251
|
const placeholder = element.getAttribute('data-placeholder');
|
|
@@ -269,7 +266,7 @@ function HtmlWithDataBinding(props: HtmlProps) {
|
|
|
269
266
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
270
267
|
|
|
271
268
|
// Use data binding
|
|
272
|
-
const {
|
|
269
|
+
const { loading, error, ...htmlProps } = useDataBinding<HtmlModel>(
|
|
273
270
|
dataSource!,
|
|
274
271
|
restProps as Partial<HtmlModel>,
|
|
275
272
|
HtmlModel.getSchema(),
|
package/src/components/Logo.tsx
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
|
-
import React, { useRef, useEffect, useState, useCallback } from 'react';
|
|
38
|
+
import React, { useRef, useEffect, useState, useCallback, useMemo } from 'react';
|
|
39
39
|
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
40
40
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../hooks';
|
|
41
41
|
import LogoModel from '../schemas/LogoSchema';
|
|
@@ -73,13 +73,16 @@ function LogoView({
|
|
|
73
73
|
className,
|
|
74
74
|
...restProps
|
|
75
75
|
}: LogoViewProps) {
|
|
76
|
-
const { styleProps, htmlProps
|
|
77
|
-
|
|
78
|
-
// Convert separate offset values to BadgeOffset object
|
|
79
|
-
const badgeOffset: BadgeOffset | undefined = (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
const { styleProps, htmlProps } = useBaseProps(restProps);
|
|
77
|
+
|
|
78
|
+
// Convert separate offset values to BadgeOffset object - memoize to prevent unnecessary re-renders
|
|
79
|
+
const badgeOffset: BadgeOffset | undefined = useMemo(
|
|
80
|
+
() => (badgeOffsetX !== undefined || badgeOffsetY !== undefined)
|
|
81
|
+
? { x: badgeOffsetX, y: badgeOffsetY }
|
|
82
|
+
: undefined,
|
|
83
|
+
[badgeOffsetX, badgeOffsetY]
|
|
84
|
+
);
|
|
85
|
+
|
|
83
86
|
const textRef = useRef<SVGTextElement>(null);
|
|
84
87
|
const [calculatedBadgePosition, setCalculatedBadgePosition] = useState({ x: 155, y: 20 });
|
|
85
88
|
const [svgWidth, setSvgWidth] = useState(180);
|
|
@@ -156,7 +159,7 @@ function LogoView({
|
|
|
156
159
|
const { fontSize, height } = getSizeConfig(size, isNewLine);
|
|
157
160
|
|
|
158
161
|
// Calculate badge position based on semantic positioning system
|
|
159
|
-
const calculateBadgePosition = useCallback((textBBox: DOMRect
|
|
162
|
+
const calculateBadgePosition = useCallback((textBBox: DOMRect) => {
|
|
160
163
|
// Scale factor based on font size (medium/28px is the baseline)
|
|
161
164
|
const scale = fontSize / 28; // 28 is the medium/default font size
|
|
162
165
|
const scaledOffset = 8 * scale;
|
|
@@ -223,14 +226,14 @@ function LogoView({
|
|
|
223
226
|
if (textRef.current) {
|
|
224
227
|
const textBBox = textRef.current.getBBox();
|
|
225
228
|
// Calculate badge position using semantic positioning
|
|
226
|
-
const badgePos = calculateBadgePosition(textBBox
|
|
229
|
+
const badgePos = calculateBadgePosition(textBBox);
|
|
227
230
|
// Ensure SVG is wide enough to accommodate text and badge
|
|
228
231
|
const requiredWidth = Math.max(180, textBBox.x + textBBox.width + 20);
|
|
229
|
-
|
|
232
|
+
|
|
230
233
|
setCalculatedBadgePosition(badgePos);
|
|
231
234
|
setSvgWidth(requiredWidth);
|
|
232
235
|
}
|
|
233
|
-
}, [name, badge, badgeOffset, calculateBadgePosition, fontSize, height, parseNameParts]);
|
|
236
|
+
}, [name, badge, badgeOffset, calculateBadgePosition, fontSize, height, parseNameParts, svgWidth]);
|
|
234
237
|
|
|
235
238
|
// Determine CSS class for variant
|
|
236
239
|
let variantClass = '';
|
|
@@ -268,23 +271,24 @@ function LogoView({
|
|
|
268
271
|
<animate attributeName="r" values={`${badgeRadius};${badgeRadius + 1};${badgeRadius}`} dur="1.5s" repeatCount="indefinite" />
|
|
269
272
|
</circle>
|
|
270
273
|
);
|
|
271
|
-
case 'star':
|
|
274
|
+
case 'star': {
|
|
272
275
|
const starScale = scale;
|
|
273
276
|
return (
|
|
274
|
-
<polygon
|
|
277
|
+
<polygon
|
|
275
278
|
points={`${x},${y-5*starScale} ${x+2*starScale},${y} ${x+7*starScale},${y} ${x+3*starScale},${y+3*starScale} ${x+5*starScale},${y+8*starScale} ${x},${y+5*starScale} ${x-5*starScale},${y+8*starScale} ${x-3*starScale},${y+3*starScale} ${x-7*starScale},${y} ${x-2*starScale},${y}`}
|
|
276
279
|
{...baseProps}
|
|
277
280
|
>
|
|
278
281
|
<animate attributeName="opacity" values="0.8;1;0.8" dur="1.5s" repeatCount="indefinite" />
|
|
279
282
|
</polygon>
|
|
280
283
|
);
|
|
284
|
+
}
|
|
281
285
|
case 'square':
|
|
282
286
|
return (
|
|
283
287
|
<rect x={x-badgeRadius} y={y-badgeRadius} width={badgeSize} height={badgeSize} {...baseProps}>
|
|
284
288
|
<animate attributeName="opacity" values="0.8;1;0.8" dur="1.5s" repeatCount="indefinite" />
|
|
285
289
|
</rect>
|
|
286
290
|
);
|
|
287
|
-
case 'heart':
|
|
291
|
+
case 'heart': {
|
|
288
292
|
const heartScale = scale;
|
|
289
293
|
return (
|
|
290
294
|
<path
|
|
@@ -294,6 +298,7 @@ function LogoView({
|
|
|
294
298
|
<animate attributeName="fill-opacity" values="0.7;1;0.7" dur="1.5s" repeatCount="indefinite" />
|
|
295
299
|
</path>
|
|
296
300
|
);
|
|
301
|
+
}
|
|
297
302
|
default:
|
|
298
303
|
return (
|
|
299
304
|
<circle cx={x} cy={y} r={badgeRadius} {...baseProps}>
|
|
@@ -365,7 +370,7 @@ function LogoView({
|
|
|
365
370
|
}
|
|
366
371
|
|
|
367
372
|
// Create container with image positioned based on imagePosition
|
|
368
|
-
|
|
373
|
+
const containerStyle: React.CSSProperties = {
|
|
369
374
|
display: 'flex',
|
|
370
375
|
alignItems: 'center',
|
|
371
376
|
gap: '8px',
|
|
@@ -421,20 +426,28 @@ function LogoView({
|
|
|
421
426
|
// Main Logo component with data binding support
|
|
422
427
|
function Logo(props: LogoProps) {
|
|
423
428
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
424
|
-
|
|
429
|
+
|
|
430
|
+
// Always call hooks unconditionally
|
|
431
|
+
const bindingResult = useDataBinding<LogoModel>(
|
|
432
|
+
dataSource || '',
|
|
433
|
+
{
|
|
434
|
+
initialData: restProps,
|
|
435
|
+
schema: LogoModel.getSchema(),
|
|
436
|
+
cache: true,
|
|
437
|
+
cacheTTL: 300000,
|
|
438
|
+
strict: false,
|
|
439
|
+
...bindingOptions
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
|
|
425
443
|
// If no dataSource, use traditional props
|
|
426
444
|
if (!dataSource) {
|
|
427
445
|
return <LogoView {...restProps} />;
|
|
428
446
|
}
|
|
429
|
-
|
|
430
|
-
// Use data binding
|
|
431
|
-
const {
|
|
432
|
-
|
|
433
|
-
restProps as Partial<LogoModel>,
|
|
434
|
-
LogoModel.getSchema(),
|
|
435
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
436
|
-
);
|
|
437
|
-
|
|
447
|
+
|
|
448
|
+
// Use data binding result
|
|
449
|
+
const { loading, error, ...logoProps } = bindingResult;
|
|
450
|
+
|
|
438
451
|
// Show loading state
|
|
439
452
|
if (loading) {
|
|
440
453
|
return (
|
|
@@ -443,7 +456,7 @@ function Logo(props: LogoProps) {
|
|
|
443
456
|
</div>
|
|
444
457
|
);
|
|
445
458
|
}
|
|
446
|
-
|
|
459
|
+
|
|
447
460
|
// Show error state
|
|
448
461
|
if (error) {
|
|
449
462
|
return (
|
|
@@ -452,12 +465,12 @@ function Logo(props: LogoProps) {
|
|
|
452
465
|
</div>
|
|
453
466
|
);
|
|
454
467
|
}
|
|
455
|
-
|
|
468
|
+
|
|
456
469
|
return <LogoView {...logoProps} />;
|
|
457
470
|
}
|
|
458
471
|
|
|
459
472
|
// Mark as QwickApp component
|
|
460
|
-
(Logo
|
|
473
|
+
Object.defineProperty(Logo, QWICKAPP_COMPONENT, { value: true, enumerable: false, configurable: true });
|
|
461
474
|
|
|
462
475
|
// Export types for external use
|
|
463
476
|
export type { LogoVariant, LogoSize, LogoBadgeShape, PositionType, BadgeOffset };
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import { Box } from '@mui/material';
|
|
24
24
|
import { marked } from 'marked';
|
|
25
|
-
import React
|
|
25
|
+
import React from 'react';
|
|
26
26
|
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
27
27
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../hooks';
|
|
28
28
|
import MarkdownModel from '../schemas/MarkdownSchema';
|
|
@@ -35,7 +35,7 @@ type MarkdownViewProps = SchemaProps<MarkdownModel> & {
|
|
|
35
35
|
/** Custom transformation configuration for HTML conversion */
|
|
36
36
|
htmlTransformConfig?: TransformConfig;
|
|
37
37
|
/** Custom sanitization options */
|
|
38
|
-
sanitizeOptions?:
|
|
38
|
+
sanitizeOptions?: unknown;
|
|
39
39
|
/** Container element type */
|
|
40
40
|
component?: React.ElementType;
|
|
41
41
|
/** Marked options for Markdown parsing */
|
|
@@ -78,7 +78,7 @@ function MarkdownView({
|
|
|
78
78
|
const { styleProps, htmlProps, restProps: otherProps } = useBaseProps(restProps);
|
|
79
79
|
|
|
80
80
|
// Mark as QwickApp component
|
|
81
|
-
(MarkdownView as
|
|
81
|
+
(MarkdownView as Record<string, unknown>)[QWICKAPP_COMPONENT] = true;
|
|
82
82
|
|
|
83
83
|
// Return placeholder if no Markdown content
|
|
84
84
|
if (!children || !children.trim()) {
|
|
@@ -192,7 +192,7 @@ export class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
|
192
192
|
static readonly version = '1.0.0';
|
|
193
193
|
|
|
194
194
|
// Component-specific serialization properties
|
|
195
|
-
protected getComponentSpecificProps():
|
|
195
|
+
protected getComponentSpecificProps(): unknown {
|
|
196
196
|
return {
|
|
197
197
|
children: this.props.children,
|
|
198
198
|
sanitize: this.props.sanitize,
|
|
@@ -202,7 +202,7 @@ export class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
|
202
202
|
|
|
203
203
|
// Markdown component renders traditional props view
|
|
204
204
|
protected renderView(): React.ReactElement {
|
|
205
|
-
const {
|
|
205
|
+
const { ...restProps } = this.props;
|
|
206
206
|
return <MarkdownView {...restProps} />;
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -212,7 +212,7 @@ export class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
// Register HTML patterns that Markdown component can handle
|
|
215
|
-
static registerPatternHandlers(registry:
|
|
215
|
+
static registerPatternHandlers(registry: unknown): void {
|
|
216
216
|
// Register div elements with specific classes for Markdown transformation
|
|
217
217
|
if (!registry.hasPattern('div.markdown-content')) {
|
|
218
218
|
registry.registerPattern('div.markdown-content', Markdown.transformMarkdownDiv);
|
|
@@ -225,7 +225,7 @@ export class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
// Transform div with markdown-content class to Markdown component
|
|
228
|
-
private static transformMarkdownDiv(element: Element):
|
|
228
|
+
private static transformMarkdownDiv(element: Element): unknown {
|
|
229
229
|
const sanitize = element.getAttribute('data-sanitize') !== 'false';
|
|
230
230
|
const placeholder = element.getAttribute('data-placeholder');
|
|
231
231
|
|
|
@@ -240,7 +240,7 @@ export class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
// Transform elements with data-markdown attribute to Markdown component
|
|
243
|
-
private static transformDataMarkdown(element: Element):
|
|
243
|
+
private static transformDataMarkdown(element: Element): unknown {
|
|
244
244
|
const markdownContent = element.getAttribute('data-markdown') || element.textContent;
|
|
245
245
|
const sanitize = element.getAttribute('data-sanitize') !== 'false';
|
|
246
246
|
const placeholder = element.getAttribute('data-placeholder');
|
|
@@ -261,7 +261,7 @@ function MarkdownWithDataBinding(props: MarkdownProps) {
|
|
|
261
261
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
262
262
|
|
|
263
263
|
// Use data binding
|
|
264
|
-
const {
|
|
264
|
+
const { loading, error, ...markdownProps } = useDataBinding<MarkdownModel>(
|
|
265
265
|
dataSource!,
|
|
266
266
|
restProps as Partial<MarkdownModel>,
|
|
267
267
|
MarkdownModel.getSchema(),
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProductLogo - Simplified QwickApps product logo component
|
|
3
|
+
*
|
|
4
|
+
* A convenience wrapper around the Logo component specifically designed for
|
|
5
|
+
* QwickApps product branding. Automatically handles icon positioning and
|
|
6
|
+
* styling to create consistent product logos across the QwickApps suite.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Automatically positions the icon close to the product name
|
|
10
|
+
* - Consistent styling across all QwickApps products
|
|
11
|
+
* - Simple API: just provide icon and name
|
|
12
|
+
* - Supports all Logo component features (size, variant, badge, etc.)
|
|
13
|
+
*
|
|
14
|
+
* Example Usage:
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { ProductLogo, QwickIcon } from '@qwickapps/react-framework';
|
|
17
|
+
*
|
|
18
|
+
* // Simple usage
|
|
19
|
+
* <ProductLogo icon={<QwickIcon />} name="wick Press" />
|
|
20
|
+
*
|
|
21
|
+
* // With custom size
|
|
22
|
+
* <ProductLogo
|
|
23
|
+
* icon={<QwickIcon size={32} />}
|
|
24
|
+
* name="wick Forge"
|
|
25
|
+
* size="small"
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* // With click handler
|
|
29
|
+
* <ProductLogo
|
|
30
|
+
* icon={<QwickIcon />}
|
|
31
|
+
* name="wick Apps"
|
|
32
|
+
* onClick={() => window.location.href = '/'}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
import React, { cloneElement, isValidElement } from 'react';
|
|
40
|
+
import Logo from './Logo';
|
|
41
|
+
import type { LogoProps } from './Logo';
|
|
42
|
+
import QwickIcon from './QwickIcon';
|
|
43
|
+
|
|
44
|
+
export interface ProductLogoProps extends Omit<LogoProps, 'image' | 'imagePosition'> {
|
|
45
|
+
/** The icon element (defaults to QwickIcon) */
|
|
46
|
+
icon?: React.ReactElement;
|
|
47
|
+
/** The product name (e.g., "wick Press", "wick Forge") */
|
|
48
|
+
name: string;
|
|
49
|
+
/** Optional click handler */
|
|
50
|
+
onClick?: (event: React.MouseEvent<SVGSVGElement | HTMLDivElement>) => void;
|
|
51
|
+
/** Additional inline styles */
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
/** Additional CSS class names */
|
|
54
|
+
className?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* ProductLogo Component
|
|
59
|
+
*
|
|
60
|
+
* Creates a branded product logo by combining a QwickIcon with a product name.
|
|
61
|
+
* The icon is automatically positioned close to the text with proper styling.
|
|
62
|
+
*/
|
|
63
|
+
const ProductLogo: React.FC<ProductLogoProps> = ({
|
|
64
|
+
icon,
|
|
65
|
+
name,
|
|
66
|
+
size = 'small',
|
|
67
|
+
onClick,
|
|
68
|
+
style,
|
|
69
|
+
className,
|
|
70
|
+
...restProps
|
|
71
|
+
}) => {
|
|
72
|
+
// Calculate icon size based on logo size
|
|
73
|
+
const getIconSize = (logoSize: string = 'small'): number => {
|
|
74
|
+
const sizeMap: Record<string, number> = {
|
|
75
|
+
'tiny': 20,
|
|
76
|
+
'small': 32,
|
|
77
|
+
'medium': 40,
|
|
78
|
+
'large': 52,
|
|
79
|
+
'extra-large': 68
|
|
80
|
+
};
|
|
81
|
+
return sizeMap[logoSize] || 32;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// Use QwickIcon as default if no icon provided
|
|
85
|
+
const iconElement = icon || <QwickIcon />;
|
|
86
|
+
|
|
87
|
+
// Clone the icon element and apply positioning styles
|
|
88
|
+
const styledIcon = isValidElement(iconElement)
|
|
89
|
+
? cloneElement(iconElement, {
|
|
90
|
+
size: (iconElement.props as Record<string, unknown>).size || getIconSize(size as string),
|
|
91
|
+
style: {
|
|
92
|
+
position: 'relative',
|
|
93
|
+
left: '25px',
|
|
94
|
+
zIndex: 999,
|
|
95
|
+
...((iconElement.props as Record<string, unknown>).style as React.CSSProperties | undefined)
|
|
96
|
+
}
|
|
97
|
+
} as Record<string, unknown>)
|
|
98
|
+
: iconElement;
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Logo
|
|
102
|
+
name={name}
|
|
103
|
+
size={size}
|
|
104
|
+
image={styledIcon}
|
|
105
|
+
imagePosition="start"
|
|
106
|
+
style={{
|
|
107
|
+
cursor: onClick ? 'pointer' : 'default',
|
|
108
|
+
zIndex: 1000,
|
|
109
|
+
...style
|
|
110
|
+
}}
|
|
111
|
+
className={className}
|
|
112
|
+
onClick={onClick}
|
|
113
|
+
{...restProps}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export default ProductLogo;
|