@veridid/workflow-ui 0.0.0-stage → 0.1.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/LICENSE +202 -0
- package/README.md +202 -2
- package/build/module/WorkflowFontScaleContext.js +67 -0
- package/build/module/WorkflowFontScaleContext.js.map +1 -0
- package/build/module/adapter/WalletAdapter.js +152 -0
- package/build/module/adapter/WalletAdapter.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.js +8 -0
- package/build/module/components/FallbackVideoPlayer.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.native.js +10 -0
- package/build/module/components/FallbackVideoPlayer.native.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.web.js +35 -0
- package/build/module/components/FallbackVideoPlayer.web.js.map +1 -0
- package/build/module/components/WorkflowButtonLabel.js +32 -0
- package/build/module/components/WorkflowButtonLabel.js.map +1 -0
- package/build/module/components/WorkflowCalendarIcon.js +73 -0
- package/build/module/components/WorkflowCalendarIcon.js.map +1 -0
- package/build/module/components/WorkflowText.js +92 -0
- package/build/module/components/WorkflowText.js.map +1 -0
- package/build/module/content/BadgeContent.js +73 -0
- package/build/module/content/BadgeContent.js.map +1 -0
- package/build/module/content/BarChartContent.js +97 -0
- package/build/module/content/BarChartContent.js.map +1 -0
- package/build/module/content/BarcodeContent.js +78 -0
- package/build/module/content/BarcodeContent.js.map +1 -0
- package/build/module/content/BasicTableContent.js +145 -0
- package/build/module/content/BasicTableContent.js.map +1 -0
- package/build/module/content/ButtonContent.js +130 -0
- package/build/module/content/ButtonContent.js.map +1 -0
- package/build/module/content/CalendarContent.js +173 -0
- package/build/module/content/CalendarContent.js.map +1 -0
- package/build/module/content/CardContent.js +114 -0
- package/build/module/content/CardContent.js.map +1 -0
- package/build/module/content/CarouselContent.js +173 -0
- package/build/module/content/CarouselContent.js.map +1 -0
- package/build/module/content/ChipContent.js +214 -0
- package/build/module/content/ChipContent.js.map +1 -0
- package/build/module/content/ChipRowContent.js +127 -0
- package/build/module/content/ChipRowContent.js.map +1 -0
- package/build/module/content/CredentialOfferContent.js +312 -0
- package/build/module/content/CredentialOfferContent.js.map +1 -0
- package/build/module/content/DialContent.js +101 -0
- package/build/module/content/DialContent.js.map +1 -0
- package/build/module/content/DividerContent.js +26 -0
- package/build/module/content/DividerContent.js.map +1 -0
- package/build/module/content/DonutChartContent.js +118 -0
- package/build/module/content/DonutChartContent.js.map +1 -0
- package/build/module/content/FormContent.js +141 -0
- package/build/module/content/FormContent.js.map +1 -0
- package/build/module/content/FormFieldBridge.js +157 -0
- package/build/module/content/FormFieldBridge.js.map +1 -0
- package/build/module/content/GaugeContent.js +77 -0
- package/build/module/content/GaugeContent.js.map +1 -0
- package/build/module/content/GridLayoutContent.js +227 -0
- package/build/module/content/GridLayoutContent.js.map +1 -0
- package/build/module/content/ImageContent.js +190 -0
- package/build/module/content/ImageContent.js.map +1 -0
- package/build/module/content/ListContent.js +107 -0
- package/build/module/content/ListContent.js.map +1 -0
- package/build/module/content/LocationContent.js +148 -0
- package/build/module/content/LocationContent.js.map +1 -0
- package/build/module/content/MapContent.js +213 -0
- package/build/module/content/MapContent.js.map +1 -0
- package/build/module/content/MultipleChoiceContent.js +91 -0
- package/build/module/content/MultipleChoiceContent.js.map +1 -0
- package/build/module/content/OpenBadgePreviewContent.js +141 -0
- package/build/module/content/OpenBadgePreviewContent.js.map +1 -0
- package/build/module/content/PhotoContent.js +154 -0
- package/build/module/content/PhotoContent.js.map +1 -0
- package/build/module/content/PieChartContent.js +129 -0
- package/build/module/content/PieChartContent.js.map +1 -0
- package/build/module/content/ProofPresentationContent.js +154 -0
- package/build/module/content/ProofPresentationContent.js.map +1 -0
- package/build/module/content/RadioButtonContent.js +136 -0
- package/build/module/content/RadioButtonContent.js.map +1 -0
- package/build/module/content/RowContent.js +539 -0
- package/build/module/content/RowContent.js.map +1 -0
- package/build/module/content/SectionContent.js +123 -0
- package/build/module/content/SectionContent.js.map +1 -0
- package/build/module/content/ShareEntryContent.js +111 -0
- package/build/module/content/ShareEntryContent.js.map +1 -0
- package/build/module/content/SimulatedHint.js +33 -0
- package/build/module/content/SimulatedHint.js.map +1 -0
- package/build/module/content/SliderContent.js +46 -0
- package/build/module/content/SliderContent.js.map +1 -0
- package/build/module/content/SpacerContent.js +21 -0
- package/build/module/content/SpacerContent.js.map +1 -0
- package/build/module/content/SpinnerContent.js +33 -0
- package/build/module/content/SpinnerContent.js.map +1 -0
- package/build/module/content/SubmitButtonContent.js +281 -0
- package/build/module/content/SubmitButtonContent.js.map +1 -0
- package/build/module/content/TextContent.js +127 -0
- package/build/module/content/TextContent.js.map +1 -0
- package/build/module/content/TileContent.js +237 -0
- package/build/module/content/TileContent.js.map +1 -0
- package/build/module/content/TimelineContent.js +120 -0
- package/build/module/content/TimelineContent.js.map +1 -0
- package/build/module/content/TitleContent.js +55 -0
- package/build/module/content/TitleContent.js.map +1 -0
- package/build/module/content/VideoContent.js +142 -0
- package/build/module/content/VideoContent.js.map +1 -0
- package/build/module/content/WebLinkContent.js +95 -0
- package/build/module/content/WebLinkContent.js.map +1 -0
- package/build/module/content/index.js +48 -0
- package/build/module/content/index.js.map +1 -0
- package/build/module/form-fields/CheckboxField.js +47 -0
- package/build/module/form-fields/CheckboxField.js.map +1 -0
- package/build/module/form-fields/DateField.js +8 -0
- package/build/module/form-fields/DateField.js.map +1 -0
- package/build/module/form-fields/DateField.native.js +141 -0
- package/build/module/form-fields/DateField.native.js.map +1 -0
- package/build/module/form-fields/DateField.web.js +45 -0
- package/build/module/form-fields/DateField.web.js.map +1 -0
- package/build/module/form-fields/DropdownField.js +172 -0
- package/build/module/form-fields/DropdownField.js.map +1 -0
- package/build/module/form-fields/MCQField.js +100 -0
- package/build/module/form-fields/MCQField.js.map +1 -0
- package/build/module/form-fields/RadioField.js +56 -0
- package/build/module/form-fields/RadioField.js.map +1 -0
- package/build/module/form-fields/SliderField.js +8 -0
- package/build/module/form-fields/SliderField.js.map +1 -0
- package/build/module/form-fields/SliderField.native.js +77 -0
- package/build/module/form-fields/SliderField.native.js.map +1 -0
- package/build/module/form-fields/SliderField.web.js +82 -0
- package/build/module/form-fields/SliderField.web.js.map +1 -0
- package/build/module/form-fields/SubmitButtonField.js +42 -0
- package/build/module/form-fields/SubmitButtonField.js.map +1 -0
- package/build/module/form-fields/TextField.js +56 -0
- package/build/module/form-fields/TextField.js.map +1 -0
- package/build/module/form-fields/index.js +15 -0
- package/build/module/form-fields/index.js.map +1 -0
- package/build/module/i18n/WorkflowI18n.js +94 -0
- package/build/module/i18n/WorkflowI18n.js.map +1 -0
- package/build/module/icons/WorkflowIcon.js +50 -0
- package/build/module/icons/WorkflowIcon.js.map +1 -0
- package/build/module/imageUriCache.js +25 -0
- package/build/module/imageUriCache.js.map +1 -0
- package/build/module/index.js +49 -0
- package/build/module/index.js.map +1 -0
- package/build/module/modal/WorkflowModal.js +115 -0
- package/build/module/modal/WorkflowModal.js.map +1 -0
- package/build/module/package.json +1 -0
- package/build/module/platform/platformName.js +10 -0
- package/build/module/platform/platformName.js.map +1 -0
- package/build/module/platform/platformName.web.js +5 -0
- package/build/module/platform/platformName.web.js.map +1 -0
- package/build/module/protocol/controlSnapshotStore.js +19 -0
- package/build/module/protocol/controlSnapshotStore.js.map +1 -0
- package/build/module/protocol/useProtocolExchange.js +168 -0
- package/build/module/protocol/useProtocolExchange.js.map +1 -0
- package/build/module/registries/ContentRegistry.js +53 -0
- package/build/module/registries/ContentRegistry.js.map +1 -0
- package/build/module/registries/FormFieldRegistry.js +56 -0
- package/build/module/registries/FormFieldRegistry.js.map +1 -0
- package/build/module/render/NodeBoundary.js +73 -0
- package/build/module/render/NodeBoundary.js.map +1 -0
- package/build/module/render/RenderTree.js +52 -0
- package/build/module/render/RenderTree.js.map +1 -0
- package/build/module/render/WorkflowRenderContext.js +34 -0
- package/build/module/render/WorkflowRenderContext.js.map +1 -0
- package/build/module/render/nodes.js +103 -0
- package/build/module/render/nodes.js.map +1 -0
- package/build/module/responsive/ResponsiveProvider.js +63 -0
- package/build/module/responsive/ResponsiveProvider.js.map +1 -0
- package/build/module/responsive/index.js +4 -0
- package/build/module/responsive/index.js.map +1 -0
- package/build/module/responsive/responsive.js +56 -0
- package/build/module/responsive/responsive.js.map +1 -0
- package/build/module/style/resolveDisplayHintStyle.js +145 -0
- package/build/module/style/resolveDisplayHintStyle.js.map +1 -0
- package/build/module/theme/WorkflowTheme.js +200 -0
- package/build/module/theme/WorkflowTheme.js.map +1 -0
- package/build/module/utils/testable.js +12 -0
- package/build/module/utils/testable.js.map +1 -0
- package/build/typescript/WorkflowFontScaleContext.d.ts +7 -0
- package/build/typescript/WorkflowFontScaleContext.d.ts.map +1 -0
- package/build/typescript/adapter/WalletAdapter.d.ts +145 -0
- package/build/typescript/adapter/WalletAdapter.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.d.ts +6 -0
- package/build/typescript/components/FallbackVideoPlayer.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.native.d.ts +7 -0
- package/build/typescript/components/FallbackVideoPlayer.native.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.web.d.ts +9 -0
- package/build/typescript/components/FallbackVideoPlayer.web.d.ts.map +1 -0
- package/build/typescript/components/WorkflowButtonLabel.d.ts +11 -0
- package/build/typescript/components/WorkflowButtonLabel.d.ts.map +1 -0
- package/build/typescript/components/WorkflowCalendarIcon.d.ts +11 -0
- package/build/typescript/components/WorkflowCalendarIcon.d.ts.map +1 -0
- package/build/typescript/components/WorkflowText.d.ts +13 -0
- package/build/typescript/components/WorkflowText.d.ts.map +1 -0
- package/build/typescript/content/BadgeContent.d.ts +5 -0
- package/build/typescript/content/BadgeContent.d.ts.map +1 -0
- package/build/typescript/content/BarChartContent.d.ts +5 -0
- package/build/typescript/content/BarChartContent.d.ts.map +1 -0
- package/build/typescript/content/BarcodeContent.d.ts +11 -0
- package/build/typescript/content/BarcodeContent.d.ts.map +1 -0
- package/build/typescript/content/BasicTableContent.d.ts +5 -0
- package/build/typescript/content/BasicTableContent.d.ts.map +1 -0
- package/build/typescript/content/ButtonContent.d.ts +5 -0
- package/build/typescript/content/ButtonContent.d.ts.map +1 -0
- package/build/typescript/content/CalendarContent.d.ts +19 -0
- package/build/typescript/content/CalendarContent.d.ts.map +1 -0
- package/build/typescript/content/CardContent.d.ts +5 -0
- package/build/typescript/content/CardContent.d.ts.map +1 -0
- package/build/typescript/content/CarouselContent.d.ts +5 -0
- package/build/typescript/content/CarouselContent.d.ts.map +1 -0
- package/build/typescript/content/ChipContent.d.ts +5 -0
- package/build/typescript/content/ChipContent.d.ts.map +1 -0
- package/build/typescript/content/ChipRowContent.d.ts +8 -0
- package/build/typescript/content/ChipRowContent.d.ts.map +1 -0
- package/build/typescript/content/CredentialOfferContent.d.ts +98 -0
- package/build/typescript/content/CredentialOfferContent.d.ts.map +1 -0
- package/build/typescript/content/DialContent.d.ts +5 -0
- package/build/typescript/content/DialContent.d.ts.map +1 -0
- package/build/typescript/content/DividerContent.d.ts +5 -0
- package/build/typescript/content/DividerContent.d.ts.map +1 -0
- package/build/typescript/content/DonutChartContent.d.ts +5 -0
- package/build/typescript/content/DonutChartContent.d.ts.map +1 -0
- package/build/typescript/content/FormContent.d.ts +19 -0
- package/build/typescript/content/FormContent.d.ts.map +1 -0
- package/build/typescript/content/FormFieldBridge.d.ts +2 -0
- package/build/typescript/content/FormFieldBridge.d.ts.map +1 -0
- package/build/typescript/content/GaugeContent.d.ts +5 -0
- package/build/typescript/content/GaugeContent.d.ts.map +1 -0
- package/build/typescript/content/GridLayoutContent.d.ts +5 -0
- package/build/typescript/content/GridLayoutContent.d.ts.map +1 -0
- package/build/typescript/content/ImageContent.d.ts +5 -0
- package/build/typescript/content/ImageContent.d.ts.map +1 -0
- package/build/typescript/content/ListContent.d.ts +5 -0
- package/build/typescript/content/ListContent.d.ts.map +1 -0
- package/build/typescript/content/LocationContent.d.ts +32 -0
- package/build/typescript/content/LocationContent.d.ts.map +1 -0
- package/build/typescript/content/MapContent.d.ts +11 -0
- package/build/typescript/content/MapContent.d.ts.map +1 -0
- package/build/typescript/content/MultipleChoiceContent.d.ts +5 -0
- package/build/typescript/content/MultipleChoiceContent.d.ts.map +1 -0
- package/build/typescript/content/OpenBadgePreviewContent.d.ts +14 -0
- package/build/typescript/content/OpenBadgePreviewContent.d.ts.map +1 -0
- package/build/typescript/content/PhotoContent.d.ts +57 -0
- package/build/typescript/content/PhotoContent.d.ts.map +1 -0
- package/build/typescript/content/PieChartContent.d.ts +5 -0
- package/build/typescript/content/PieChartContent.d.ts.map +1 -0
- package/build/typescript/content/ProofPresentationContent.d.ts +14 -0
- package/build/typescript/content/ProofPresentationContent.d.ts.map +1 -0
- package/build/typescript/content/RadioButtonContent.d.ts +5 -0
- package/build/typescript/content/RadioButtonContent.d.ts.map +1 -0
- package/build/typescript/content/RowContent.d.ts +5 -0
- package/build/typescript/content/RowContent.d.ts.map +1 -0
- package/build/typescript/content/SectionContent.d.ts +5 -0
- package/build/typescript/content/SectionContent.d.ts.map +1 -0
- package/build/typescript/content/ShareEntryContent.d.ts +15 -0
- package/build/typescript/content/ShareEntryContent.d.ts.map +1 -0
- package/build/typescript/content/SimulatedHint.d.ts +9 -0
- package/build/typescript/content/SimulatedHint.d.ts.map +1 -0
- package/build/typescript/content/SliderContent.d.ts +10 -0
- package/build/typescript/content/SliderContent.d.ts.map +1 -0
- package/build/typescript/content/SpacerContent.d.ts +5 -0
- package/build/typescript/content/SpacerContent.d.ts.map +1 -0
- package/build/typescript/content/SpinnerContent.d.ts +5 -0
- package/build/typescript/content/SpinnerContent.d.ts.map +1 -0
- package/build/typescript/content/SubmitButtonContent.d.ts +9 -0
- package/build/typescript/content/SubmitButtonContent.d.ts.map +1 -0
- package/build/typescript/content/TextContent.d.ts +5 -0
- package/build/typescript/content/TextContent.d.ts.map +1 -0
- package/build/typescript/content/TileContent.d.ts +5 -0
- package/build/typescript/content/TileContent.d.ts.map +1 -0
- package/build/typescript/content/TimelineContent.d.ts +5 -0
- package/build/typescript/content/TimelineContent.d.ts.map +1 -0
- package/build/typescript/content/TitleContent.d.ts +5 -0
- package/build/typescript/content/TitleContent.d.ts.map +1 -0
- package/build/typescript/content/VideoContent.d.ts +10 -0
- package/build/typescript/content/VideoContent.d.ts.map +1 -0
- package/build/typescript/content/WebLinkContent.d.ts +5 -0
- package/build/typescript/content/WebLinkContent.d.ts.map +1 -0
- package/build/typescript/content/index.d.ts +46 -0
- package/build/typescript/content/index.d.ts.map +1 -0
- package/build/typescript/form-fields/CheckboxField.d.ts +5 -0
- package/build/typescript/form-fields/CheckboxField.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.d.ts +6 -0
- package/build/typescript/form-fields/DateField.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.native.d.ts +5 -0
- package/build/typescript/form-fields/DateField.native.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.web.d.ts +9 -0
- package/build/typescript/form-fields/DateField.web.d.ts.map +1 -0
- package/build/typescript/form-fields/DropdownField.d.ts +5 -0
- package/build/typescript/form-fields/DropdownField.d.ts.map +1 -0
- package/build/typescript/form-fields/MCQField.d.ts +5 -0
- package/build/typescript/form-fields/MCQField.d.ts.map +1 -0
- package/build/typescript/form-fields/RadioField.d.ts +5 -0
- package/build/typescript/form-fields/RadioField.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.d.ts +6 -0
- package/build/typescript/form-fields/SliderField.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.native.d.ts +5 -0
- package/build/typescript/form-fields/SliderField.native.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.web.d.ts +11 -0
- package/build/typescript/form-fields/SliderField.web.d.ts.map +1 -0
- package/build/typescript/form-fields/SubmitButtonField.d.ts +5 -0
- package/build/typescript/form-fields/SubmitButtonField.d.ts.map +1 -0
- package/build/typescript/form-fields/TextField.d.ts +5 -0
- package/build/typescript/form-fields/TextField.d.ts.map +1 -0
- package/build/typescript/form-fields/index.d.ts +13 -0
- package/build/typescript/form-fields/index.d.ts.map +1 -0
- package/build/typescript/i18n/WorkflowI18n.d.ts +75 -0
- package/build/typescript/i18n/WorkflowI18n.d.ts.map +1 -0
- package/build/typescript/icons/WorkflowIcon.d.ts +27 -0
- package/build/typescript/icons/WorkflowIcon.d.ts.map +1 -0
- package/build/typescript/imageUriCache.d.ts +7 -0
- package/build/typescript/imageUriCache.d.ts.map +1 -0
- package/build/typescript/index.d.ts +47 -0
- package/build/typescript/index.d.ts.map +1 -0
- package/build/typescript/modal/WorkflowModal.d.ts +33 -0
- package/build/typescript/modal/WorkflowModal.d.ts.map +1 -0
- package/build/typescript/package.json +1 -0
- package/build/typescript/platform/platformName.d.ts +8 -0
- package/build/typescript/platform/platformName.d.ts.map +1 -0
- package/build/typescript/platform/platformName.web.d.ts +3 -0
- package/build/typescript/platform/platformName.web.d.ts.map +1 -0
- package/build/typescript/protocol/controlSnapshotStore.d.ts +12 -0
- package/build/typescript/protocol/controlSnapshotStore.d.ts.map +1 -0
- package/build/typescript/protocol/useProtocolExchange.d.ts +40 -0
- package/build/typescript/protocol/useProtocolExchange.d.ts.map +1 -0
- package/build/typescript/registries/ContentRegistry.d.ts +57 -0
- package/build/typescript/registries/ContentRegistry.d.ts.map +1 -0
- package/build/typescript/registries/FormFieldRegistry.d.ts +37 -0
- package/build/typescript/registries/FormFieldRegistry.d.ts.map +1 -0
- package/build/typescript/render/NodeBoundary.d.ts +25 -0
- package/build/typescript/render/NodeBoundary.d.ts.map +1 -0
- package/build/typescript/render/RenderTree.d.ts +23 -0
- package/build/typescript/render/RenderTree.d.ts.map +1 -0
- package/build/typescript/render/WorkflowRenderContext.d.ts +57 -0
- package/build/typescript/render/WorkflowRenderContext.d.ts.map +1 -0
- package/build/typescript/render/nodes.d.ts +49 -0
- package/build/typescript/render/nodes.d.ts.map +1 -0
- package/build/typescript/responsive/ResponsiveProvider.d.ts +39 -0
- package/build/typescript/responsive/ResponsiveProvider.d.ts.map +1 -0
- package/build/typescript/responsive/index.d.ts +3 -0
- package/build/typescript/responsive/index.d.ts.map +1 -0
- package/build/typescript/responsive/responsive.d.ts +24 -0
- package/build/typescript/responsive/responsive.d.ts.map +1 -0
- package/build/typescript/style/resolveDisplayHintStyle.d.ts +23 -0
- package/build/typescript/style/resolveDisplayHintStyle.d.ts.map +1 -0
- package/build/typescript/theme/WorkflowTheme.d.ts +177 -0
- package/build/typescript/theme/WorkflowTheme.d.ts.map +1 -0
- package/build/typescript/utils/testable.d.ts +8 -0
- package/build/typescript/utils/testable.d.ts.map +1 -0
- package/package.json +101 -3
- package/src/WorkflowFontScaleContext.tsx +74 -0
- package/src/adapter/WalletAdapter.tsx +225 -0
- package/src/components/FallbackVideoPlayer.native.tsx +9 -0
- package/src/components/FallbackVideoPlayer.tsx +5 -0
- package/src/components/FallbackVideoPlayer.web.tsx +24 -0
- package/src/components/WorkflowButtonLabel.tsx +41 -0
- package/src/components/WorkflowCalendarIcon.tsx +52 -0
- package/src/components/WorkflowText.tsx +121 -0
- package/src/content/BadgeContent.tsx +57 -0
- package/src/content/BarChartContent.tsx +76 -0
- package/src/content/BarcodeContent.tsx +59 -0
- package/src/content/BasicTableContent.tsx +139 -0
- package/src/content/ButtonContent.tsx +124 -0
- package/src/content/CalendarContent.tsx +178 -0
- package/src/content/CardContent.tsx +137 -0
- package/src/content/CarouselContent.tsx +197 -0
- package/src/content/ChipContent.tsx +209 -0
- package/src/content/ChipRowContent.tsx +133 -0
- package/src/content/CredentialOfferContent.tsx +229 -0
- package/src/content/DialContent.tsx +96 -0
- package/src/content/DividerContent.tsx +33 -0
- package/src/content/DonutChartContent.tsx +110 -0
- package/src/content/FormContent.tsx +158 -0
- package/src/content/FormFieldBridge.tsx +144 -0
- package/src/content/GaugeContent.tsx +66 -0
- package/src/content/GridLayoutContent.tsx +285 -0
- package/src/content/ImageContent.tsx +222 -0
- package/src/content/ListContent.tsx +98 -0
- package/src/content/LocationContent.tsx +135 -0
- package/src/content/MapContent.tsx +232 -0
- package/src/content/MultipleChoiceContent.tsx +74 -0
- package/src/content/OpenBadgePreviewContent.tsx +93 -0
- package/src/content/PhotoContent.tsx +110 -0
- package/src/content/PieChartContent.tsx +121 -0
- package/src/content/ProofPresentationContent.tsx +127 -0
- package/src/content/RadioButtonContent.tsx +129 -0
- package/src/content/RowContent.tsx +627 -0
- package/src/content/SectionContent.tsx +133 -0
- package/src/content/ShareEntryContent.tsx +109 -0
- package/src/content/SimulatedHint.tsx +20 -0
- package/src/content/SliderContent.tsx +56 -0
- package/src/content/SpacerContent.tsx +15 -0
- package/src/content/SpinnerContent.tsx +24 -0
- package/src/content/SubmitButtonContent.tsx +256 -0
- package/src/content/TextContent.tsx +140 -0
- package/src/content/TileContent.tsx +216 -0
- package/src/content/TimelineContent.tsx +91 -0
- package/src/content/TitleContent.tsx +49 -0
- package/src/content/VideoContent.tsx +131 -0
- package/src/content/WebLinkContent.tsx +87 -0
- package/src/content/index.ts +45 -0
- package/src/form-fields/CheckboxField.tsx +29 -0
- package/src/form-fields/DateField.native.tsx +123 -0
- package/src/form-fields/DateField.tsx +5 -0
- package/src/form-fields/DateField.web.tsx +32 -0
- package/src/form-fields/DropdownField.tsx +137 -0
- package/src/form-fields/MCQField.tsx +68 -0
- package/src/form-fields/RadioField.tsx +53 -0
- package/src/form-fields/SliderField.native.tsx +53 -0
- package/src/form-fields/SliderField.tsx +5 -0
- package/src/form-fields/SliderField.web.tsx +58 -0
- package/src/form-fields/SubmitButtonField.tsx +33 -0
- package/src/form-fields/TextField.tsx +49 -0
- package/src/form-fields/index.ts +12 -0
- package/src/i18n/WorkflowI18n.tsx +100 -0
- package/src/icons/WorkflowIcon.tsx +43 -0
- package/src/imageUriCache.ts +27 -0
- package/src/index.ts +96 -0
- package/src/modal/WorkflowModal.tsx +119 -0
- package/src/platform/platformName.ts +7 -0
- package/src/platform/platformName.web.ts +2 -0
- package/src/protocol/controlSnapshotStore.ts +25 -0
- package/src/protocol/useProtocolExchange.ts +185 -0
- package/src/registries/ContentRegistry.tsx +130 -0
- package/src/registries/FormFieldRegistry.tsx +83 -0
- package/src/render/NodeBoundary.tsx +69 -0
- package/src/render/RenderTree.tsx +63 -0
- package/src/render/WorkflowRenderContext.tsx +71 -0
- package/src/render/nodes.ts +104 -0
- package/src/responsive/ResponsiveProvider.tsx +103 -0
- package/src/responsive/index.ts +7 -0
- package/src/responsive/responsive.ts +67 -0
- package/src/style/resolveDisplayHintStyle.ts +153 -0
- package/src/theme/WorkflowTheme.tsx +162 -0
- package/src/utils/testable.ts +10 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { createContext, useContext, useMemo } from 'react';
|
|
4
|
+
import { useWindowDimensions } from 'react-native';
|
|
5
|
+
import { BASE_HEIGHT, BASE_WIDTH, clampScaled, contentMaxWidth, createTypography, horizontalPadding, moderateScale, SCREEN_PAD_BASE, scale, verticalScale } from "./responsive.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const ResponsiveContextInstance = /*#__PURE__*/createContext(null);
|
|
8
|
+
function buildResponsiveContext(width, height, fontScale) {
|
|
9
|
+
const shortestSide = Math.min(width, height);
|
|
10
|
+
const s = n => scale(n, width);
|
|
11
|
+
const vs = n => verticalScale(n, height);
|
|
12
|
+
const ms = n => moderateScale(n, width);
|
|
13
|
+
return {
|
|
14
|
+
width,
|
|
15
|
+
height,
|
|
16
|
+
fontScale,
|
|
17
|
+
isTablet: shortestSide >= 600,
|
|
18
|
+
isSmall: width <= 375 || height <= 667,
|
|
19
|
+
s,
|
|
20
|
+
vs,
|
|
21
|
+
ms,
|
|
22
|
+
padH: horizontalPadding(width),
|
|
23
|
+
screenPad: s(SCREEN_PAD_BASE),
|
|
24
|
+
contentMaxWidth: contentMaxWidth(width, height),
|
|
25
|
+
typo: createTypography(ms),
|
|
26
|
+
clamp: clampScaled,
|
|
27
|
+
baseWidth: BASE_WIDTH,
|
|
28
|
+
baseHeight: BASE_HEIGHT
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function useResponsiveInternal(size, fontScaleOverride) {
|
|
32
|
+
const window = useWindowDimensions();
|
|
33
|
+
const width = size?.width ?? window.width;
|
|
34
|
+
const height = size?.height ?? window.height;
|
|
35
|
+
const fontScale = fontScaleOverride ?? window.fontScale;
|
|
36
|
+
return useMemo(() => buildResponsiveContext(width, height, fontScale), [fontScale, height, width]);
|
|
37
|
+
}
|
|
38
|
+
export const ResponsiveProvider = ({
|
|
39
|
+
children,
|
|
40
|
+
size,
|
|
41
|
+
fontScale
|
|
42
|
+
}) => {
|
|
43
|
+
const value = useResponsiveInternal(size, fontScale);
|
|
44
|
+
return /*#__PURE__*/_jsx(ResponsiveContextInstance.Provider, {
|
|
45
|
+
value: value,
|
|
46
|
+
children: children
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
export const ResponsiveRule = ResponsiveProvider;
|
|
50
|
+
export function useResponsive() {
|
|
51
|
+
const context = useContext(ResponsiveContextInstance);
|
|
52
|
+
// Hooks must run unconditionally and in the same order every render, so we
|
|
53
|
+
// always compute the standalone fallback and prefer the provider value when
|
|
54
|
+
// one is present.
|
|
55
|
+
const fallback = useResponsiveInternal();
|
|
56
|
+
return context ?? fallback;
|
|
57
|
+
}
|
|
58
|
+
export function useDigiCredStyles(factory) {
|
|
59
|
+
const ctx = useResponsive();
|
|
60
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: callers pass inline factories; styles are recomputed only when the responsive context changes
|
|
61
|
+
return useMemo(() => factory(ctx), [ctx]);
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=ResponsiveProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","useMemo","useWindowDimensions","BASE_HEIGHT","BASE_WIDTH","clampScaled","contentMaxWidth","createTypography","horizontalPadding","moderateScale","SCREEN_PAD_BASE","scale","verticalScale","jsx","_jsx","ResponsiveContextInstance","buildResponsiveContext","width","height","fontScale","shortestSide","Math","min","s","n","vs","ms","isTablet","isSmall","padH","screenPad","typo","clamp","baseWidth","baseHeight","useResponsiveInternal","size","fontScaleOverride","window","ResponsiveProvider","children","value","Provider","ResponsiveRule","useResponsive","context","fallback","useDigiCredStyles","factory","ctx"],"sourceRoot":"../../../src","sources":["responsive/ResponsiveProvider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AACjE,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SACEC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,EACjBC,aAAa,EACbC,eAAe,EACfC,KAAK,EACLC,aAAa,QACR,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoBrB,MAAMC,yBAAyB,gBAAGhB,aAAa,CAA2B,IAAI,CAAC;AAE/E,SAASiB,sBAAsBA,CAACC,KAAa,EAAEC,MAAc,EAAEC,SAAiB,EAAqB;EACnG,MAAMC,YAAY,GAAGC,IAAI,CAACC,GAAG,CAACL,KAAK,EAAEC,MAAM,CAAC;EAC5C,MAAMK,CAAC,GAAIC,CAAS,IAAKb,KAAK,CAACa,CAAC,EAAEP,KAAK,CAAC;EACxC,MAAMQ,EAAE,GAAID,CAAS,IAAKZ,aAAa,CAACY,CAAC,EAAEN,MAAM,CAAC;EAClD,MAAMQ,EAAE,GAAIF,CAAS,IAAKf,aAAa,CAACe,CAAC,EAAEP,KAAK,CAAC;EAEjD,OAAO;IACLA,KAAK;IACLC,MAAM;IACNC,SAAS;IACTQ,QAAQ,EAAEP,YAAY,IAAI,GAAG;IAC7BQ,OAAO,EAAEX,KAAK,IAAI,GAAG,IAAIC,MAAM,IAAI,GAAG;IACtCK,CAAC;IACDE,EAAE;IACFC,EAAE;IACFG,IAAI,EAAErB,iBAAiB,CAACS,KAAK,CAAC;IAC9Ba,SAAS,EAAEP,CAAC,CAACb,e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AO,SAASC,iBAAiBA,CAAIC,OAAsC,EAAK;EAC9E,MAAMC,GAAG,GAAGL,aAAa,CAAC,CAAC;EAC3B;EACA,OAAO3C,OAAO,CAAC,MAAM+C,OAAO,CAACC,GAAG,CAAC,EAAE,CAACA,GAAG,CAAC,CAAC;AAC3C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ResponsiveProvider","ResponsiveRule","useDigiCredStyles","useResponsive"],"sourceRoot":"../../../src","sources":["responsive/index.ts"],"mappings":";;AACA,SACEA,kBAAkB,EAClBC,cAAc,EACdC,iBAAiB,EACjBC,aAAa,QACR,yBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const BASE_WIDTH = 390;
|
|
4
|
+
export const BASE_HEIGHT = 844;
|
|
5
|
+
export const SCREEN_PAD_BASE = 10;
|
|
6
|
+
export function scale(size, width) {
|
|
7
|
+
return width / BASE_WIDTH * size;
|
|
8
|
+
}
|
|
9
|
+
export function verticalScale(size, height) {
|
|
10
|
+
return height / BASE_HEIGHT * size;
|
|
11
|
+
}
|
|
12
|
+
export function moderateScale(size, width, factor = 0.5) {
|
|
13
|
+
return size + (scale(size, width) - size) * factor;
|
|
14
|
+
}
|
|
15
|
+
export function clampScaled(value, min, max) {
|
|
16
|
+
return Math.min(Math.max(value, min), max);
|
|
17
|
+
}
|
|
18
|
+
export function horizontalPadding(width) {
|
|
19
|
+
return clampScaled(width * 0.025, SCREEN_PAD_BASE, 24);
|
|
20
|
+
}
|
|
21
|
+
export function contentMaxWidth(width, height) {
|
|
22
|
+
if (Math.min(width, height) >= 600) {
|
|
23
|
+
return 480;
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Estimates a single font scale that lets the longest label in a sibling
|
|
29
|
+
// button group fit on one line, so every button in the group renders at the
|
|
30
|
+
// same size instead of each shrinking independently via adjustsFontSizeToFit.
|
|
31
|
+
export function estimateGroupButtonScale(labels, availableWidth, fontSize, opts) {
|
|
32
|
+
const avgCharWidthRatio = opts?.avgCharWidthRatio ?? 0.62;
|
|
33
|
+
const minScale = opts?.minScale ?? 0.75;
|
|
34
|
+
let minRequiredScale = 1;
|
|
35
|
+
for (const label of labels) {
|
|
36
|
+
if (!label) continue;
|
|
37
|
+
const estimatedWidth = label.length * fontSize * avgCharWidthRatio;
|
|
38
|
+
if (estimatedWidth > availableWidth) {
|
|
39
|
+
minRequiredScale = Math.min(minRequiredScale, availableWidth / estimatedWidth);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return clampScaled(minRequiredScale, minScale, 1);
|
|
43
|
+
}
|
|
44
|
+
export function createTypography(ms) {
|
|
45
|
+
return {
|
|
46
|
+
display: ms(32),
|
|
47
|
+
h1: ms(28),
|
|
48
|
+
h2: ms(22),
|
|
49
|
+
h3: ms(18),
|
|
50
|
+
body: ms(16),
|
|
51
|
+
bodySm: ms(14),
|
|
52
|
+
caption: ms(12),
|
|
53
|
+
micro: ms(11)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=responsive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BASE_WIDTH","BASE_HEIGHT","SCREEN_PAD_BASE","scale","size","width","verticalScale","height","moderateScale","factor","clampScaled","value","min","max","Math","horizontalPadding","contentMaxWidth","undefined","estimateGroupButtonScale","labels","availableWidth","fontSize","opts","avgCharWidthRatio","minScale","minRequiredScale","label","estimatedWidth","length","createTypography","ms","display","h1","h2","h3","body","bodySm","caption","micro"],"sourceRoot":"../../../src","sources":["responsive/responsive.ts"],"mappings":";;AAAA,OAAO,MAAMA,UAAU,GAAG,GAAG;AAC7B,OAAO,MAAMC,WAAW,GAAG,GAAG;AAC9B,OAAO,MAAMC,eAAe,GAAG,EAAE;AAEjC,OAAO,SAASC,KAAKA,CAACC,IAAY,EAAEC,KAA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,GAAGP,QAAQ,GAAGE,iBAAiB;IAClE,IAAII,cAAc,GAAGP,cAAc,EAAE;MACnCK,gBAAgB,GAAGX,IAAI,CAACF,GAAG,CAACa,gBAAgB,EAAEL,cAAc,GAAGO,cAAc,CAAC;IAChF;EACF;EAEA,OAAOjB,WAAW,CAACe,gBAAgB,EAAED,QAAQ,EAAE,CAAC,CAAC;AACnD;AAEA,OAAO,SAASK,gBAAgBA,CAACC,EAA4B,EAAE;EAC7D,OAAO;IACLC,OAAO,EAAED,EAAE,CAAC,EAAE,CAAC;IACfE,EAAE,EAAEF,EAAE,CAAC,EAAE,CAAC;IACVG,EAAE,EAAEH,EAAE,CAAC,EAAE,CAAC;IACVI,EAAE,EAAEJ,EAAE,CAAC,EAAE,CAAC;IACVK,IAAI,EAAEL,EAAE,CAAC,EAAE,CAAC;IACZM,MAAM,EAAEN,EAAE,CAAC,EAAE,CAAC;IACdO,OAAO,EAAEP,EAAE,CAAC,EAAE,CAAC;IACfQ,KAAK,EAAER,EAAE,CAAC,EAAE;EACd,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
export function resolveItemBackgroundColor(item) {
|
|
5
|
+
const candidates = [item.bgColor, item.background, item.backgroundColor];
|
|
6
|
+
for (const value of candidates) {
|
|
7
|
+
if (typeof value === 'string' && value.trim().length > 0) {
|
|
8
|
+
return value.trim();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
export function resolveSurfaceBackground(bgColor) {
|
|
14
|
+
if (typeof bgColor === 'string' && bgColor.trim().length > 0) {
|
|
15
|
+
return bgColor;
|
|
16
|
+
}
|
|
17
|
+
return 'transparent';
|
|
18
|
+
}
|
|
19
|
+
export function resolveSurfacePadding(padding) {
|
|
20
|
+
if (padding === undefined || padding === null || padding === '') {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
if (typeof padding === 'number' && Number.isFinite(padding)) {
|
|
24
|
+
return padding;
|
|
25
|
+
}
|
|
26
|
+
const parsed = parseInt(String(padding), 10);
|
|
27
|
+
return Number.isFinite(parsed) ? parsed : undefined;
|
|
28
|
+
}
|
|
29
|
+
export function resolveAspectRatio(value) {
|
|
30
|
+
if (value === undefined || value === null || value === '') {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
if (typeof value === 'string' && value.includes(':')) {
|
|
34
|
+
const [w, h] = value.split(':').map(part => Number(part.trim()));
|
|
35
|
+
if (Number.isFinite(w) && Number.isFinite(h) && h > 0 && w > 0) {
|
|
36
|
+
return w / h;
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const parsed = Number(value);
|
|
41
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
42
|
+
}
|
|
43
|
+
export function resolveAlignSelf(align) {
|
|
44
|
+
if (align === 'center') {
|
|
45
|
+
return 'center';
|
|
46
|
+
}
|
|
47
|
+
if (align === 'end' || align === 'right') {
|
|
48
|
+
return 'flex-end';
|
|
49
|
+
}
|
|
50
|
+
if (align === 'start' || align === 'left') {
|
|
51
|
+
return 'flex-start';
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
export function resolveItemSurfaceStyle(item) {
|
|
56
|
+
const style = {};
|
|
57
|
+
const backgroundColor = resolveItemBackgroundColor(item);
|
|
58
|
+
if (backgroundColor) {
|
|
59
|
+
style.backgroundColor = backgroundColor;
|
|
60
|
+
}
|
|
61
|
+
const padding = resolveSurfacePadding(item.padding);
|
|
62
|
+
if (padding !== undefined) {
|
|
63
|
+
style.padding = padding;
|
|
64
|
+
}
|
|
65
|
+
const alignSelf = resolveAlignSelf(item.align);
|
|
66
|
+
if (alignSelf) {
|
|
67
|
+
style.alignSelf = alignSelf;
|
|
68
|
+
}
|
|
69
|
+
return style;
|
|
70
|
+
}
|
|
71
|
+
export function resolveButtonFillStyle(item, options) {
|
|
72
|
+
const style = {};
|
|
73
|
+
const backgroundColor = resolveItemBackgroundColor(item);
|
|
74
|
+
if (backgroundColor) {
|
|
75
|
+
style.backgroundColor = backgroundColor;
|
|
76
|
+
}
|
|
77
|
+
if (options?.includePadding !== false) {
|
|
78
|
+
const padding = resolveSurfacePadding(item.padding);
|
|
79
|
+
if (padding !== undefined) {
|
|
80
|
+
style.paddingVertical = Math.max(8, Math.floor(padding / 2));
|
|
81
|
+
style.paddingHorizontal = padding;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return style;
|
|
85
|
+
}
|
|
86
|
+
export function resolveButtonLabelColor(bgColor, fallbackOnFill, fallbackOnTransparent) {
|
|
87
|
+
return resolveSurfaceBackground(bgColor) === 'transparent' ? fallbackOnTransparent : fallbackOnFill;
|
|
88
|
+
}
|
|
89
|
+
export function resolveFilledControlShadow(bgColor) {
|
|
90
|
+
const fill = resolveSurfaceBackground(bgColor);
|
|
91
|
+
if (fill === 'transparent') {
|
|
92
|
+
return {};
|
|
93
|
+
}
|
|
94
|
+
if (Platform.OS === 'android') {
|
|
95
|
+
return {
|
|
96
|
+
shadowColor: '#000000',
|
|
97
|
+
shadowOffset: {
|
|
98
|
+
width: 0,
|
|
99
|
+
height: 4
|
|
100
|
+
},
|
|
101
|
+
shadowOpacity: 0.45,
|
|
102
|
+
shadowRadius: 6,
|
|
103
|
+
elevation: 8
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
shadowColor: '#000000',
|
|
108
|
+
shadowOffset: {
|
|
109
|
+
width: 0,
|
|
110
|
+
height: 4
|
|
111
|
+
},
|
|
112
|
+
shadowOpacity: 0.35,
|
|
113
|
+
shadowRadius: 8,
|
|
114
|
+
elevation: 6
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function resolveFrameShadow(enabled) {
|
|
118
|
+
const on = enabled === true || enabled === 1 || enabled === '1' || String(enabled || '').toLowerCase() === 'true';
|
|
119
|
+
if (!on) {
|
|
120
|
+
return {};
|
|
121
|
+
}
|
|
122
|
+
if (Platform.OS === 'android') {
|
|
123
|
+
return {
|
|
124
|
+
shadowColor: '#000000',
|
|
125
|
+
shadowOffset: {
|
|
126
|
+
width: 0,
|
|
127
|
+
height: 6
|
|
128
|
+
},
|
|
129
|
+
shadowOpacity: 0.6,
|
|
130
|
+
shadowRadius: 10,
|
|
131
|
+
elevation: 18
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
shadowColor: '#000000',
|
|
136
|
+
shadowOffset: {
|
|
137
|
+
width: 0,
|
|
138
|
+
height: 8
|
|
139
|
+
},
|
|
140
|
+
shadowOpacity: 0.32,
|
|
141
|
+
shadowRadius: 16,
|
|
142
|
+
elevation: 10
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=resolveDisplayHintStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","resolveItemBackgroundColor","item","candidates","bgColor","background","backgroundColor","value","trim","length","undefined","resolveSurfaceBackground","resolveSurfacePadding","padding","Number","isFinite","parsed","parseInt","String","resolveAspectRatio","includes","w","h","split","map","part","resolveAlignSelf","align","resolveItemSurfaceStyle","style","alignSelf","resolveButtonFillStyle","options","includePadding","paddingVertical","Math","max","floor","paddingHorizontal","resolveButtonLabelColor","fallbackOnFill","fallbackOnTransparent","resolveFilledControlShadow","fill","OS","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","resolveFrameShadow","enabled","on","toLowerCase"],"sourceRoot":"../../../src","sources":["style/resolveDisplayHintStyle.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAwB,cAAc;AAWvD,OAAO,SAASC,0BAA0BA,CAACC,IAAqB,EAAsB;EACpF,MAAMC,UAAU,GAAG,CAACD,IAAI,CAACE,OAAO,EAAEF,IAAI,CAACG,UAAU,EAAEH,IA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EAAE;IACb,CAAC;EACH;EACA,OAAO;IACLN,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC;AACH;AAEA,OAAO,SAASC,kBAAkBA,CAACC,OAAmC,EAAa;EACjF,MAAMC,EAAE,GAAGD,OAAO,KAAK,IAAI,IAAIA,OAAO,KAAK,CAAC,IAAIA,OAAO,KAAK,GAAG,IAAInC,MAAM,CAACmC,OAAO,IAAI,EAAE,CAAC,CAACE,WAAW,CAAC,CAAC,KAAK,MAAM;EACjH,IAAI,CAACD,EAAE,EAAE;IACP,OAAO,CAAC,CAAC;EACX;EACA,IAAItD,QAAQ,CAAC4C,EAAE,KAAK,SAAS,EAAE;IAC7B,OAAO;MACLC,WAAW,EAAE,SAAS;MACtBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE,EAAE;MAChBC,SAAS,EAAE;IACb,CAAC;EACH;EACA,OAAO;IACLN,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE;EACb,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext, useMemo } from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Colours of the credential-offer / proof-presentation cards (from the
|
|
8
|
+
* designer's original preview). Display hints on the item still override them.
|
|
9
|
+
*/
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
/** The DigiCred wallet's workflow screen (WorkflowDetails), the reference look. */
|
|
12
|
+
export const DEFAULT_WORKFLOW_COLORS = {
|
|
13
|
+
primary: '#0D7377',
|
|
14
|
+
text: '#FFFFFF',
|
|
15
|
+
background: '#0C3733',
|
|
16
|
+
border: '#0D7377',
|
|
17
|
+
buttonText: '#FFFFFF',
|
|
18
|
+
workflowButton: '#0D7377',
|
|
19
|
+
workflowButtonText: '#FFFFFF',
|
|
20
|
+
screenBackground: '#062826',
|
|
21
|
+
muted: '#7FB6AF',
|
|
22
|
+
danger: '#FF7A6E',
|
|
23
|
+
success: '#2E8540'
|
|
24
|
+
};
|
|
25
|
+
export const DEFAULT_WORKFLOW_CARD_COLORS = {
|
|
26
|
+
surface: '#FFFFFF',
|
|
27
|
+
border: '#D1D5DB',
|
|
28
|
+
text: '#1F2937',
|
|
29
|
+
mutedId: '#9CA3AF',
|
|
30
|
+
offerKicker: '#166534',
|
|
31
|
+
accent: '#F76707',
|
|
32
|
+
buttonText: '#FFFFFF'
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Host styles from the wallet's WorkflowDetails screen plus the form field styles. */
|
|
36
|
+
export const DEFAULT_WORKFLOW_STYLES = StyleSheet.create({
|
|
37
|
+
fieldContainer: {
|
|
38
|
+
marginBottom: 12
|
|
39
|
+
},
|
|
40
|
+
image: {
|
|
41
|
+
width: '100%',
|
|
42
|
+
height: 180,
|
|
43
|
+
marginBottom: 12,
|
|
44
|
+
borderRadius: 8
|
|
45
|
+
},
|
|
46
|
+
title: {
|
|
47
|
+
fontSize: 18,
|
|
48
|
+
fontWeight: '700',
|
|
49
|
+
marginBottom: 8,
|
|
50
|
+
color: '#FFFFFF'
|
|
51
|
+
},
|
|
52
|
+
label: {
|
|
53
|
+
fontSize: 14,
|
|
54
|
+
fontWeight: '600',
|
|
55
|
+
color: '#FFFFFF',
|
|
56
|
+
marginBottom: 8
|
|
57
|
+
},
|
|
58
|
+
formLabel: {
|
|
59
|
+
fontSize: 14,
|
|
60
|
+
fontWeight: '600',
|
|
61
|
+
color: '#FFFFFF',
|
|
62
|
+
marginBottom: 8
|
|
63
|
+
},
|
|
64
|
+
description: {
|
|
65
|
+
fontSize: 14,
|
|
66
|
+
color: '#FFFFFF',
|
|
67
|
+
lineHeight: 22,
|
|
68
|
+
marginBottom: 8
|
|
69
|
+
},
|
|
70
|
+
button: {
|
|
71
|
+
flexDirection: 'row',
|
|
72
|
+
width: '100%',
|
|
73
|
+
alignSelf: 'stretch',
|
|
74
|
+
paddingVertical: 12,
|
|
75
|
+
paddingHorizontal: 16,
|
|
76
|
+
justifyContent: 'center',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
borderRadius: 16,
|
|
79
|
+
borderWidth: 1,
|
|
80
|
+
minHeight: 50
|
|
81
|
+
},
|
|
82
|
+
buttonText: {
|
|
83
|
+
fontSize: 16,
|
|
84
|
+
fontWeight: '700',
|
|
85
|
+
lineHeight: 24,
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
color: '#FFFFFF'
|
|
88
|
+
},
|
|
89
|
+
input: {
|
|
90
|
+
borderWidth: 1,
|
|
91
|
+
borderRadius: 8,
|
|
92
|
+
paddingHorizontal: 12,
|
|
93
|
+
paddingVertical: 10,
|
|
94
|
+
fontSize: 15,
|
|
95
|
+
marginTop: 4
|
|
96
|
+
},
|
|
97
|
+
dateButton: {
|
|
98
|
+
borderWidth: 1,
|
|
99
|
+
borderRadius: 8,
|
|
100
|
+
paddingHorizontal: 12,
|
|
101
|
+
paddingVertical: 12,
|
|
102
|
+
marginTop: 4
|
|
103
|
+
},
|
|
104
|
+
dropdown: {
|
|
105
|
+
borderWidth: 1,
|
|
106
|
+
borderRadius: 8,
|
|
107
|
+
paddingHorizontal: 12,
|
|
108
|
+
paddingVertical: 12,
|
|
109
|
+
marginTop: 4,
|
|
110
|
+
flexDirection: 'row',
|
|
111
|
+
alignItems: 'center'
|
|
112
|
+
},
|
|
113
|
+
checkboxRow: {
|
|
114
|
+
flexDirection: 'row',
|
|
115
|
+
alignItems: 'center',
|
|
116
|
+
paddingVertical: 8
|
|
117
|
+
},
|
|
118
|
+
checkbox: {
|
|
119
|
+
width: 22,
|
|
120
|
+
height: 22,
|
|
121
|
+
borderRadius: 4,
|
|
122
|
+
borderWidth: 2,
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
justifyContent: 'center',
|
|
125
|
+
marginRight: 10
|
|
126
|
+
},
|
|
127
|
+
checkboxLabel: {
|
|
128
|
+
fontSize: 15,
|
|
129
|
+
flex: 1
|
|
130
|
+
},
|
|
131
|
+
radioRow: {
|
|
132
|
+
flexDirection: 'row',
|
|
133
|
+
alignItems: 'center',
|
|
134
|
+
paddingVertical: 8
|
|
135
|
+
},
|
|
136
|
+
radioOuter: {
|
|
137
|
+
width: 22,
|
|
138
|
+
height: 22,
|
|
139
|
+
borderRadius: 11,
|
|
140
|
+
borderWidth: 2,
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
justifyContent: 'center',
|
|
143
|
+
marginRight: 10
|
|
144
|
+
},
|
|
145
|
+
radioInner: {
|
|
146
|
+
width: 10,
|
|
147
|
+
height: 10,
|
|
148
|
+
borderRadius: 5,
|
|
149
|
+
backgroundColor: '#FFFFFF'
|
|
150
|
+
},
|
|
151
|
+
radioLabel: {
|
|
152
|
+
fontSize: 15,
|
|
153
|
+
flex: 1
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
export const DEFAULT_WORKFLOW_THEME = {
|
|
157
|
+
colors: DEFAULT_WORKFLOW_COLORS,
|
|
158
|
+
styles: DEFAULT_WORKFLOW_STYLES,
|
|
159
|
+
card: DEFAULT_WORKFLOW_CARD_COLORS
|
|
160
|
+
};
|
|
161
|
+
/** Merges overrides into a theme; each style key is merged, not replaced. */
|
|
162
|
+
export function mergeWorkflowTheme(base, overrides) {
|
|
163
|
+
if (!overrides) return base;
|
|
164
|
+
const styles = {
|
|
165
|
+
...base.styles
|
|
166
|
+
};
|
|
167
|
+
for (const [key, value] of Object.entries(overrides.styles ?? {})) {
|
|
168
|
+
styles[key] = styles[key] ? StyleSheet.flatten([styles[key], value]) : value;
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
colors: {
|
|
172
|
+
...base.colors,
|
|
173
|
+
...overrides.colors
|
|
174
|
+
},
|
|
175
|
+
styles,
|
|
176
|
+
card: {
|
|
177
|
+
...base.card,
|
|
178
|
+
...overrides.card
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
const WorkflowThemeContext = /*#__PURE__*/createContext(DEFAULT_WORKFLOW_THEME);
|
|
183
|
+
/**
|
|
184
|
+
* Colours and host styles for every workflow control below it. Overrides are
|
|
185
|
+
* merged onto the enclosing theme (or the wallet defaults). Props passed to a
|
|
186
|
+
* control directly (`colors`, `styles`) still win over the theme.
|
|
187
|
+
*/
|
|
188
|
+
export function WorkflowThemeProvider({
|
|
189
|
+
theme,
|
|
190
|
+
children
|
|
191
|
+
}) {
|
|
192
|
+
const parent = useContext(WorkflowThemeContext);
|
|
193
|
+
const value = useMemo(() => mergeWorkflowTheme(parent, theme), [parent, theme]);
|
|
194
|
+
return /*#__PURE__*/_jsx(WorkflowThemeContext.Provider, {
|
|
195
|
+
value: value,
|
|
196
|
+
children: children
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
export const useWorkflowTheme = () => useContext(WorkflowThemeContext);
|
|
200
|
+
//# sourceMappingURL=WorkflowTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useMemo","StyleSheet","jsx","_jsx","DEFAULT_WORKFLOW_COLORS","primary","text","background","border","buttonText","workflowButton","workflowButtonText","screenBackground","muted","danger","success","DEFAULT_WORKFLOW_CARD_COLORS","surface","mutedId","offerKicker","accent","DEFAULT_WORKFLOW_STYLES","create","fieldContainer","marginBottom","image","width","height","borderRadius","title","fontSize","fontWeight","color","label","formLabel","description","lineHeight","button","flexDirection","alignSelf","paddingVertical","paddingHorizontal","justifyContent","alignItems","borderWidth","minHeight","textAlign","input","marginTop","dateButton","dropdown","checkboxRow","checkbox","marginRight","checkboxLabel","flex","radioRow","radioOuter","radioInner","backgroundColor","radioLabel","DEFAULT_WORKFLOW_THEME","colors","styles","card","mergeWorkflowTheme","base","overrides","key","value","Object","entries","flatten","WorkflowThemeContext","WorkflowThemeProvider","theme","children","parent","Provider","useWorkflowTheme"],"sourceRoot":"../../../src","sources":["theme/WorkflowTheme.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAkBC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC1E,SAASC,UAAU,QAAQ,cAAc;;AAYzC;AACA;AACA;AACA;AAHA,SAAAC,GAAA,IAAAC,IAAA;AAyBA;AACA,OAAO,MAAMC,uBAAuC,GAAG;EACrDC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,UAAU,EAAE,SAAS;EACrBC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,SAAS;EACrBC,cAAc,EAAE,SAAS;EACzBC,kBAAkB,EAAE,SAAS;EAC7BC,gBAAgB,EAAE,SAAS;EAC3BC,KAAK,EAAE,SAAS;EAChBC,MAAM,EAAE,SAAS;EACjBC,OAAO,EAAE;AACX,CAAC;AAED,OAAO,MAAMC,4BAAgD,GAAG;EAC9DC,OAAO,EAAE,SAAS;EAClBT,MAAM,EAAE,SAAS;EACjBF,IAAI,EAAE,SAAS;EACfY,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EACtBC,MAAM,EAAE,SAAS;EACjBX,UAAU,EAAE;AACd,CAAC;;AAED;AACA,OAAO,MAAMY,uBAAuB,GAAGpB,UAAU,CAACqB,MAAM,CAAC;EACvDC,cAAc,EAAE;IAAEC,YAAY,EAAE;EAAG,CAAC;EACpCC,KAAK,EAAE;IAAEC,KAAK,EAAE,MAAM;IAAEC,MAAM,EAAE,GAAG;IAAEH,YAAY,EAAE,EAAE;IA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AQ,CAAgC,CAAC;AAChG;AAEA,OAAO,MAAMG,gBAAgB,GAAGA,CAAA,KAAqBhF,UAAU,CAAC0E,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Test IDs used by the wallet's end-to-end tests. The prefix matches the
|
|
5
|
+
* wallet's existing IDs (bifold's `testIdPrefix`), so moving components here
|
|
6
|
+
* does not break those tests.
|
|
7
|
+
*/
|
|
8
|
+
export const testIdPrefix = 'com.ariesbifold:id/';
|
|
9
|
+
export const testIdWithKey = key => {
|
|
10
|
+
return `${testIdPrefix}${key}`;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=testable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["testIdPrefix","testIdWithKey","key"],"sourceRoot":"../../../src","sources":["utils/testable.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,YAAY,GAAG,qBAAqB;AAEjD,OAAO,MAAMC,aAAa,GAAIC,GAAW,IAAa;EACpD,OAAO,GAAGF,YAAY,GAAGE,GAAG,EAAE;AAChC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const WorkflowFontScaleProvider: React.FC<{
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function useWorkflowTitleScale(): number;
|
|
6
|
+
export declare function useRegisterTitleGroupScale(id: string, scale: number): void;
|
|
7
|
+
//# sourceMappingURL=WorkflowFontScaleContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowFontScaleContext.d.ts","sourceRoot":"","sources":["../../src/WorkflowFontScaleContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuF,MAAM,OAAO,CAAA;AAuB3G,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAiC7E,CAAA;AAGD,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAKD,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAO1E"}
|