@velion-la/onboarding-sdk-react-native 1.4.0-beta.2 → 1.4.0-beta.3
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/CHANGELOG.md +6 -1
- package/README.md +22 -1
- package/lib/commonjs/camera/AddressSearchBar.js +9 -7
- package/lib/commonjs/camera/AddressSearchBar.js.map +1 -1
- package/lib/commonjs/camera/DocumentCapture.js +7 -6
- package/lib/commonjs/camera/DocumentCapture.js.map +1 -1
- package/lib/commonjs/camera/LivenessCamera.js +6 -5
- package/lib/commonjs/camera/LivenessCamera.js.map +1 -1
- package/lib/commonjs/camera/MapAddressPicker.js +2 -1
- package/lib/commonjs/camera/MapAddressPicker.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/steps/AddressInfoStep.js +4 -3
- package/lib/commonjs/steps/AddressInfoStep.js.map +1 -1
- package/lib/commonjs/steps/DocumentsOcrStep.js +4 -3
- package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -1
- package/lib/commonjs/steps/EconomicActivityStep.js +3 -2
- package/lib/commonjs/steps/EconomicActivityStep.js.map +1 -1
- package/lib/commonjs/steps/EmailOtpStep.js +2 -1
- package/lib/commonjs/steps/EmailOtpStep.js.map +1 -1
- package/lib/commonjs/steps/FaceMatchStep.js +3 -2
- package/lib/commonjs/steps/FaceMatchStep.js.map +1 -1
- package/lib/commonjs/steps/LivenessMatchStep.js +3 -2
- package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -1
- package/lib/commonjs/steps/PhoneOtpStep.js +2 -1
- package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -1
- package/lib/commonjs/steps/TermsAndConditionsStep.js +3 -2
- package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -1
- package/lib/commonjs/types/index.js +7 -6
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/ui/StepShell.js +3 -2
- package/lib/commonjs/ui/StepShell.js.map +1 -1
- package/lib/commonjs/ui/VelionOnboardingScreen.js +5 -4
- package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -1
- package/lib/commonjs/ui/icons/StepIcon.js +2 -2
- package/lib/commonjs/ui/icons/StepIcon.js.map +1 -1
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +3 -2
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -1
- package/lib/commonjs/ui/overlays/LoadingOverlay.js +2 -1
- package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -1
- package/lib/commonjs/ui/overlays/RetryDialog.js +4 -3
- package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -1
- package/lib/commonjs/ui/primitives/BackButton.js +2 -1
- package/lib/commonjs/ui/primitives/BackButton.js.map +1 -1
- package/lib/commonjs/ui/primitives/Banner.js +3 -2
- package/lib/commonjs/ui/primitives/Banner.js.map +1 -1
- package/lib/commonjs/ui/primitives/Button.js +8 -5
- package/lib/commonjs/ui/primitives/Button.js.map +1 -1
- package/lib/commonjs/ui/primitives/Checkbox.js +5 -4
- package/lib/commonjs/ui/primitives/Checkbox.js.map +1 -1
- package/lib/commonjs/ui/primitives/CountrySelect.js +16 -13
- package/lib/commonjs/ui/primitives/CountrySelect.js.map +1 -1
- package/lib/commonjs/ui/primitives/DatePicker.js +4 -3
- package/lib/commonjs/ui/primitives/DatePicker.js.map +1 -1
- package/lib/commonjs/ui/primitives/Input.js +9 -7
- package/lib/commonjs/ui/primitives/Input.js.map +1 -1
- package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js +8 -6
- package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js.map +1 -1
- package/lib/commonjs/ui/primitives/Select.js +11 -9
- package/lib/commonjs/ui/primitives/Select.js.map +1 -1
- package/lib/commonjs/ui/primitives/Text.js +67 -0
- package/lib/commonjs/ui/primitives/Text.js.map +1 -0
- package/lib/commonjs/ui/primitives/index.js +13 -0
- package/lib/commonjs/ui/primitives/index.js.map +1 -1
- package/lib/commonjs/ui/theme/ThemeProvider.js +14 -1
- package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -1
- package/lib/commonjs/ui/theme/fontLoader.js +77 -0
- package/lib/commonjs/ui/theme/fontLoader.js.map +1 -0
- package/lib/commonjs/ui/theme/fonts.js +200 -0
- package/lib/commonjs/ui/theme/fonts.js.map +1 -0
- package/lib/commonjs/ui/theme/index.js +31 -0
- package/lib/commonjs/ui/theme/index.js.map +1 -1
- package/lib/commonjs/ui/theme/tokens.js +32 -9
- package/lib/commonjs/ui/theme/tokens.js.map +1 -1
- package/lib/module/camera/AddressSearchBar.js +5 -3
- package/lib/module/camera/AddressSearchBar.js.map +1 -1
- package/lib/module/camera/DocumentCapture.js +2 -1
- package/lib/module/camera/DocumentCapture.js.map +1 -1
- package/lib/module/camera/LivenessCamera.js +2 -1
- package/lib/module/camera/LivenessCamera.js.map +1 -1
- package/lib/module/camera/MapAddressPicker.js +2 -1
- package/lib/module/camera/MapAddressPicker.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/steps/AddressInfoStep.js +2 -1
- package/lib/module/steps/AddressInfoStep.js.map +1 -1
- package/lib/module/steps/DocumentsOcrStep.js +2 -1
- package/lib/module/steps/DocumentsOcrStep.js.map +1 -1
- package/lib/module/steps/EconomicActivityStep.js +2 -1
- package/lib/module/steps/EconomicActivityStep.js.map +1 -1
- package/lib/module/steps/EmailOtpStep.js +2 -1
- package/lib/module/steps/EmailOtpStep.js.map +1 -1
- package/lib/module/steps/FaceMatchStep.js +2 -1
- package/lib/module/steps/FaceMatchStep.js.map +1 -1
- package/lib/module/steps/LivenessMatchStep.js +2 -1
- package/lib/module/steps/LivenessMatchStep.js.map +1 -1
- package/lib/module/steps/PhoneOtpStep.js +2 -1
- package/lib/module/steps/PhoneOtpStep.js.map +1 -1
- package/lib/module/steps/TermsAndConditionsStep.js +2 -1
- package/lib/module/steps/TermsAndConditionsStep.js.map +1 -1
- package/lib/module/types/index.js +7 -6
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/ui/StepShell.js +2 -1
- package/lib/module/ui/StepShell.js.map +1 -1
- package/lib/module/ui/VelionOnboardingScreen.js +2 -1
- package/lib/module/ui/VelionOnboardingScreen.js.map +1 -1
- package/lib/module/ui/icons/StepIcon.js +1 -1
- package/lib/module/ui/icons/StepIcon.js.map +1 -1
- package/lib/module/ui/overlays/AnalyzingOverlay.js +2 -1
- package/lib/module/ui/overlays/AnalyzingOverlay.js.map +1 -1
- package/lib/module/ui/overlays/LoadingOverlay.js +2 -1
- package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -1
- package/lib/module/ui/overlays/RetryDialog.js +2 -1
- package/lib/module/ui/overlays/RetryDialog.js.map +1 -1
- package/lib/module/ui/primitives/BackButton.js +2 -1
- package/lib/module/ui/primitives/BackButton.js.map +1 -1
- package/lib/module/ui/primitives/Banner.js +2 -1
- package/lib/module/ui/primitives/Banner.js.map +1 -1
- package/lib/module/ui/primitives/Button.js +7 -4
- package/lib/module/ui/primitives/Button.js.map +1 -1
- package/lib/module/ui/primitives/Checkbox.js +2 -1
- package/lib/module/ui/primitives/Checkbox.js.map +1 -1
- package/lib/module/ui/primitives/CountrySelect.js +8 -5
- package/lib/module/ui/primitives/CountrySelect.js.map +1 -1
- package/lib/module/ui/primitives/DatePicker.js +2 -1
- package/lib/module/ui/primitives/DatePicker.js.map +1 -1
- package/lib/module/ui/primitives/Input.js +6 -4
- package/lib/module/ui/primitives/Input.js.map +1 -1
- package/lib/module/ui/primitives/SearchableSingleSelectList.js +5 -3
- package/lib/module/ui/primitives/SearchableSingleSelectList.js.map +1 -1
- package/lib/module/ui/primitives/Select.js +5 -3
- package/lib/module/ui/primitives/Select.js.map +1 -1
- package/lib/module/ui/primitives/Text.js +65 -0
- package/lib/module/ui/primitives/Text.js.map +1 -0
- package/lib/module/ui/primitives/index.js +1 -0
- package/lib/module/ui/primitives/index.js.map +1 -1
- package/lib/module/ui/theme/ThemeProvider.js +13 -1
- package/lib/module/ui/theme/ThemeProvider.js.map +1 -1
- package/lib/module/ui/theme/fontLoader.js +70 -0
- package/lib/module/ui/theme/fontLoader.js.map +1 -0
- package/lib/module/ui/theme/fonts.js +191 -0
- package/lib/module/ui/theme/fonts.js.map +1 -0
- package/lib/module/ui/theme/index.js +3 -2
- package/lib/module/ui/theme/index.js.map +1 -1
- package/lib/module/ui/theme/tokens.js +31 -9
- package/lib/module/ui/theme/tokens.js.map +1 -1
- package/lib/typescript/camera/AddressSearchBar.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -1
- package/lib/typescript/steps/EconomicActivityStep.d.ts.map +1 -1
- package/lib/typescript/steps/EmailOtpStep.d.ts.map +1 -1
- package/lib/typescript/steps/FaceMatchStep.d.ts.map +1 -1
- package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -1
- package/lib/typescript/steps/PhoneOtpStep.d.ts.map +1 -1
- package/lib/typescript/steps/TermsAndConditionsStep.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +35 -7
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/ui/StepShell.d.ts.map +1 -1
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -1
- package/lib/typescript/ui/overlays/LoadingOverlay.d.ts.map +1 -1
- package/lib/typescript/ui/overlays/RetryDialog.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/BackButton.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/Banner.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/Button.d.ts +2 -1
- package/lib/typescript/ui/primitives/Button.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/Checkbox.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/CountrySelect.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/DatePicker.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/Input.d.ts +3 -3
- package/lib/typescript/ui/primitives/Input.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/Select.d.ts.map +1 -1
- package/lib/typescript/ui/primitives/Text.d.ts +19 -0
- package/lib/typescript/ui/primitives/Text.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/index.d.ts +1 -0
- package/lib/typescript/ui/primitives/index.d.ts.map +1 -1
- package/lib/typescript/ui/theme/ThemeProvider.d.ts +7 -0
- package/lib/typescript/ui/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/ui/theme/fontLoader.d.ts +28 -0
- package/lib/typescript/ui/theme/fontLoader.d.ts.map +1 -0
- package/lib/typescript/ui/theme/fonts.d.ts +157 -0
- package/lib/typescript/ui/theme/fonts.d.ts.map +1 -0
- package/lib/typescript/ui/theme/index.d.ts +3 -2
- package/lib/typescript/ui/theme/index.d.ts.map +1 -1
- package/lib/typescript/ui/theme/tokens.d.ts +25 -2
- package/lib/typescript/ui/theme/tokens.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/camera/AddressSearchBar.tsx +3 -4
- package/src/camera/DocumentCapture.tsx +1 -1
- package/src/camera/LivenessCamera.tsx +1 -1
- package/src/camera/MapAddressPicker.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/steps/AddressInfoStep.tsx +6 -1
- package/src/steps/DocumentsOcrStep.tsx +1 -1
- package/src/steps/EconomicActivityStep.tsx +6 -1
- package/src/steps/EmailOtpStep.tsx +6 -1
- package/src/steps/FaceMatchStep.tsx +6 -1
- package/src/steps/LivenessMatchStep.tsx +7 -1
- package/src/steps/PhoneOtpStep.tsx +6 -1
- package/src/steps/TermsAndConditionsStep.tsx +7 -1
- package/src/types/index.ts +35 -7
- package/src/ui/StepShell.tsx +6 -1
- package/src/ui/VelionOnboardingScreen.tsx +5 -1
- package/src/ui/icons/StepIcon.tsx +1 -1
- package/src/ui/overlays/AnalyzingOverlay.tsx +1 -1
- package/src/ui/overlays/LoadingOverlay.tsx +7 -1
- package/src/ui/overlays/RetryDialog.tsx +5 -1
- package/src/ui/primitives/BackButton.tsx +5 -1
- package/src/ui/primitives/Banner.tsx +5 -1
- package/src/ui/primitives/Button.tsx +5 -4
- package/src/ui/primitives/Checkbox.tsx +5 -1
- package/src/ui/primitives/CountrySelect.tsx +5 -6
- package/src/ui/primitives/DatePicker.tsx +7 -1
- package/src/ui/primitives/Input.tsx +6 -6
- package/src/ui/primitives/SearchableSingleSelectList.tsx +3 -4
- package/src/ui/primitives/Select.tsx +3 -3
- package/src/ui/primitives/Text.tsx +66 -0
- package/src/ui/primitives/index.ts +1 -0
- package/src/ui/theme/ThemeProvider.tsx +15 -2
- package/src/ui/theme/fontLoader.ts +92 -0
- package/src/ui/theme/fonts.ts +220 -0
- package/src/ui/theme/index.ts +9 -0
- package/src/ui/theme/tokens.ts +44 -6
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Closed font catalog for `VelionTheme.fontFamily` (OSDKR-45).
|
|
3
|
+
*
|
|
4
|
+
* The theme names a font by id; the SDK maps that id to the font files it
|
|
5
|
+
* downloads with `expo-font`. A URL never comes from configuration (R-B12 of
|
|
6
|
+
* the web-onboarding design): an id outside the catalog renders with the
|
|
7
|
+
* system font. The ids and the catalog must stay in sync with the web SDK
|
|
8
|
+
* (OSDKW-39), so a workflow looks the same on web and mobile.
|
|
9
|
+
*
|
|
10
|
+
* Each family ships four static faces (400 / 500 / 600 / 700) — the weights
|
|
11
|
+
* the SDK's text styles use. Lighter weights resolve to 400 and heavier ones
|
|
12
|
+
* to 700. The files are the Google Fonts TTF instances (iOS and Android do not
|
|
13
|
+
* load WOFF2); the URLs are immutable and versioned by Google.
|
|
14
|
+
*
|
|
15
|
+
* This module has no React Native imports so it can be unit-tested in Node.
|
|
16
|
+
*/
|
|
17
|
+
/** Weight slots the catalog ships a face for. */
|
|
18
|
+
export type FontWeightSlot = 400 | 500 | 600 | 700;
|
|
19
|
+
declare const CATALOG: {
|
|
20
|
+
readonly inter: {
|
|
21
|
+
readonly displayName: "Inter";
|
|
22
|
+
readonly faces: {
|
|
23
|
+
readonly 400: "https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf";
|
|
24
|
+
readonly 500: "https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf";
|
|
25
|
+
readonly 600: "https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf";
|
|
26
|
+
readonly 700: "https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly roboto: {
|
|
30
|
+
readonly displayName: "Roboto";
|
|
31
|
+
readonly faces: {
|
|
32
|
+
readonly 400: "https://fonts.gstatic.com/s/roboto/v51/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWubEbWmT.ttf";
|
|
33
|
+
readonly 500: "https://fonts.gstatic.com/s/roboto/v51/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWub2bWmT.ttf";
|
|
34
|
+
readonly 600: "https://fonts.gstatic.com/s/roboto/v51/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuYaammT.ttf";
|
|
35
|
+
readonly 700: "https://fonts.gstatic.com/s/roboto/v51/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuYjammT.ttf";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly 'open-sans': {
|
|
39
|
+
readonly displayName: "Open Sans";
|
|
40
|
+
readonly faces: {
|
|
41
|
+
readonly 400: "https://fonts.gstatic.com/s/opensans/v44/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4n.ttf";
|
|
42
|
+
readonly 500: "https://fonts.gstatic.com/s/opensans/v44/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjr0C4n.ttf";
|
|
43
|
+
readonly 600: "https://fonts.gstatic.com/s/opensans/v44/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsgH1y4n.ttf";
|
|
44
|
+
readonly 700: "https://fonts.gstatic.com/s/opensans/v44/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1y4n.ttf";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly montserrat: {
|
|
48
|
+
readonly displayName: "Montserrat";
|
|
49
|
+
readonly faces: {
|
|
50
|
+
readonly 400: "https://fonts.gstatic.com/s/montserrat/v31/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew-.ttf";
|
|
51
|
+
readonly 500: "https://fonts.gstatic.com/s/montserrat/v31/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Ew-.ttf";
|
|
52
|
+
readonly 600: "https://fonts.gstatic.com/s/montserrat/v31/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu170w-.ttf";
|
|
53
|
+
readonly 700: "https://fonts.gstatic.com/s/montserrat/v31/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM70w-.ttf";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly poppins: {
|
|
57
|
+
readonly displayName: "Poppins";
|
|
58
|
+
readonly faces: {
|
|
59
|
+
readonly 400: "https://fonts.gstatic.com/s/poppins/v24/pxiEyp8kv8JHgFVrFJA.ttf";
|
|
60
|
+
readonly 500: "https://fonts.gstatic.com/s/poppins/v24/pxiByp8kv8JHgFVrLGT9V1s.ttf";
|
|
61
|
+
readonly 600: "https://fonts.gstatic.com/s/poppins/v24/pxiByp8kv8JHgFVrLEj6V1s.ttf";
|
|
62
|
+
readonly 700: "https://fonts.gstatic.com/s/poppins/v24/pxiByp8kv8JHgFVrLCz7V1s.ttf";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly nunito: {
|
|
66
|
+
readonly displayName: "Nunito";
|
|
67
|
+
readonly faces: {
|
|
68
|
+
readonly 400: "https://fonts.gstatic.com/s/nunito/v32/XRXI3I6Li01BKofiOc5wtlZ2di8HDLshRTM.ttf";
|
|
69
|
+
readonly 500: "https://fonts.gstatic.com/s/nunito/v32/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhRTM.ttf";
|
|
70
|
+
readonly 600: "https://fonts.gstatic.com/s/nunito/v32/XRXI3I6Li01BKofiOc5wtlZ2di8HDGUmRTM.ttf";
|
|
71
|
+
readonly 700: "https://fonts.gstatic.com/s/nunito/v32/XRXI3I6Li01BKofiOc5wtlZ2di8HDFwmRTM.ttf";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly 'source-sans-3': {
|
|
75
|
+
readonly displayName: "Source Sans 3";
|
|
76
|
+
readonly faces: {
|
|
77
|
+
readonly 400: "https://fonts.gstatic.com/s/sourcesans3/v20/nwpBtKy2OAdR1K-IwhWudF-R9QMylBJAV3Bo8Ky461EN.ttf";
|
|
78
|
+
readonly 500: "https://fonts.gstatic.com/s/sourcesans3/v20/nwpBtKy2OAdR1K-IwhWudF-R9QMylBJAV3Bo8KyK61EN.ttf";
|
|
79
|
+
readonly 600: "https://fonts.gstatic.com/s/sourcesans3/v20/nwpBtKy2OAdR1K-IwhWudF-R9QMylBJAV3Bo8Kxm7FEN.ttf";
|
|
80
|
+
readonly 700: "https://fonts.gstatic.com/s/sourcesans3/v20/nwpBtKy2OAdR1K-IwhWudF-R9QMylBJAV3Bo8Kxf7FEN.ttf";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
readonly 'work-sans': {
|
|
84
|
+
readonly displayName: "Work Sans";
|
|
85
|
+
readonly faces: {
|
|
86
|
+
readonly 400: "https://fonts.gstatic.com/s/worksans/v24/QGY_z_wNahGAdqQ43RhVcIgYT2Xz5u32K0nXNig.ttf";
|
|
87
|
+
readonly 500: "https://fonts.gstatic.com/s/worksans/v24/QGY_z_wNahGAdqQ43RhVcIgYT2Xz5u32K3vXNig.ttf";
|
|
88
|
+
readonly 600: "https://fonts.gstatic.com/s/worksans/v24/QGY_z_wNahGAdqQ43RhVcIgYT2Xz5u32K5fQNig.ttf";
|
|
89
|
+
readonly 700: "https://fonts.gstatic.com/s/worksans/v24/QGY_z_wNahGAdqQ43RhVcIgYT2Xz5u32K67QNig.ttf";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
readonly 'ibm-plex-sans': {
|
|
93
|
+
readonly displayName: "IBM Plex Sans";
|
|
94
|
+
readonly faces: {
|
|
95
|
+
readonly 400: "https://fonts.gstatic.com/s/ibmplexsans/v23/zYXGKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1swZSAXcomDVmadSD6llzAA.ttf";
|
|
96
|
+
readonly 500: "https://fonts.gstatic.com/s/ibmplexsans/v23/zYXGKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1swZSAXcomDVmadSD2FlzAA.ttf";
|
|
97
|
+
readonly 600: "https://fonts.gstatic.com/s/ibmplexsans/v23/zYXGKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1swZSAXcomDVmadSDNF5zAA.ttf";
|
|
98
|
+
readonly 700: "https://fonts.gstatic.com/s/ibmplexsans/v23/zYXGKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1swZSAXcomDVmadSDDV5zAA.ttf";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly 'dm-sans': {
|
|
102
|
+
readonly displayName: "DM Sans";
|
|
103
|
+
readonly faces: {
|
|
104
|
+
readonly 400: "https://fonts.gstatic.com/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTg.ttf";
|
|
105
|
+
readonly 500: "https://fonts.gstatic.com/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTg.ttf";
|
|
106
|
+
readonly 600: "https://fonts.gstatic.com/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTg.ttf";
|
|
107
|
+
readonly 700: "https://fonts.gstatic.com/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTg.ttf";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
/** Id of a font in the catalog. */
|
|
112
|
+
export type VelionCatalogFontId = keyof typeof CATALOG;
|
|
113
|
+
/**
|
|
114
|
+
* Accepted values of `VelionTheme.fontFamily`: a catalog id, or `'system'`
|
|
115
|
+
* (the platform font, the default).
|
|
116
|
+
*/
|
|
117
|
+
export type VelionFontId = 'system' | VelionCatalogFontId;
|
|
118
|
+
/** Every accepted font id, `'system'` first. */
|
|
119
|
+
export declare const VELION_FONT_IDS: readonly VelionFontId[];
|
|
120
|
+
/**
|
|
121
|
+
* Resolves the `fontFamily` theme value to a catalog id, or `null` for the
|
|
122
|
+
* system font.
|
|
123
|
+
*
|
|
124
|
+
* Tolerates the CSS-style values the web theme used to take: only the first
|
|
125
|
+
* family of a comma-separated stack counts, quotes and case are ignored, and
|
|
126
|
+
* the Google Fonts name works as well as the id (`'Open Sans'` and
|
|
127
|
+
* `'"Open Sans", sans-serif'` both give `open-sans`). Anything else gives
|
|
128
|
+
* `null`.
|
|
129
|
+
*/
|
|
130
|
+
export declare function resolveFontId(value: string | null | undefined): VelionCatalogFontId | null;
|
|
131
|
+
/**
|
|
132
|
+
* Maps a React Native `fontWeight` to the face that renders it. Numeric
|
|
133
|
+
* weights round to the nearest slot (ties go up); `'bold'` is 700 and anything
|
|
134
|
+
* unrecognised, `'normal'` included, is 400.
|
|
135
|
+
*/
|
|
136
|
+
export declare function weightSlot(fontWeight: unknown): FontWeightSlot;
|
|
137
|
+
/**
|
|
138
|
+
* Name the face is registered under with `expo-font`. Prefixed so it cannot
|
|
139
|
+
* collide with a font the host app loads itself.
|
|
140
|
+
*/
|
|
141
|
+
export declare function fontFaceName(fontId: VelionCatalogFontId, weight: FontWeightSlot): string;
|
|
142
|
+
/** The `{ faceName: url }` map to hand to `expo-font`'s `loadAsync`. */
|
|
143
|
+
export declare function fontSources(fontId: VelionCatalogFontId): Record<string, string>;
|
|
144
|
+
/**
|
|
145
|
+
* Style that makes a text render with the loaded catalog font.
|
|
146
|
+
*
|
|
147
|
+
* Returns `undefined` when there is no font to apply, so the text keeps the
|
|
148
|
+
* system font. `fontWeight` is set to the slot of the face picked: on iOS the
|
|
149
|
+
* face is looked up by family and weight, so a mismatched weight would pick
|
|
150
|
+
* another face; on Android it stops a synthetic bold on top of a bold face.
|
|
151
|
+
*/
|
|
152
|
+
export declare function fontStyleFor(fontId: VelionCatalogFontId | null, fontWeight: unknown): {
|
|
153
|
+
fontFamily: string;
|
|
154
|
+
fontWeight: `${FontWeightSlot}`;
|
|
155
|
+
} | undefined;
|
|
156
|
+
export {};
|
|
157
|
+
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AASnD,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FuC,CAAC;AAErD,mCAAmC;AACnC,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,OAAO,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAE1D,gDAAgD;AAChD,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAGlD,CAAC;AAIF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/B,mBAAmB,GAAG,IAAI,CAY5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,OAAO,GAAG,cAAc,CAQ9D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,cAAc,GACrB,MAAM,CAER;AAED,wEAAwE;AACxE,wBAAgB,WAAW,CACzB,MAAM,EAAE,mBAAmB,GAC1B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,mBAAmB,GAAG,IAAI,EAClC,UAAU,EAAE,OAAO,GAClB;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,GAAG,cAAc,EAAE,CAAA;CAAE,GAAG,SAAS,CAOrE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { ThemeProvider, useTheme, useReducedMotion, type ThemeProviderProps, } from './ThemeProvider';
|
|
2
|
-
export { LIGHT_TOKENS, DARK_TOKENS, getDefaultThemeTokens, resolveTheme, mixHex, withAlpha, isHexDark, type ResolvedTheme, type ThemeTokenSet, } from './tokens';
|
|
1
|
+
export { ThemeProvider, useTheme, useOptionalTheme, useReducedMotion, type ThemeProviderProps, } from './ThemeProvider';
|
|
2
|
+
export { LIGHT_TOKENS, DARK_TOKENS, getDefaultThemeTokens, resolveTheme, mixHex, withAlpha, isHexDark, DEFAULT_CONTROL_HEIGHT_PX, type ResolvedTheme, type ThemeTokenSet, } from './tokens';
|
|
3
|
+
export { VELION_FONT_IDS, resolveFontId, fontStyleFor, type VelionFontId, type VelionCatalogFontId, } from './fonts';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,MAAM,EACN,SAAS,EACT,SAAS,EACT,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,eAAe,EACf,aAAa,EACb,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,SAAS,CAAC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* pairing). Consumer overrides from `VelionConfig.theme` are layered on top.
|
|
9
9
|
*/
|
|
10
10
|
import type { VelionTheme } from '../../types';
|
|
11
|
+
import type { VelionCatalogFontId } from './fonts';
|
|
11
12
|
/** Tonal token set. Shape matches `VelionTheme` (all required, no undefineds). */
|
|
12
13
|
export type ThemeTokenSet = Required<VelionTheme>;
|
|
13
14
|
/**
|
|
@@ -20,12 +21,29 @@ export interface ResolvedTheme extends ThemeTokenSet {
|
|
|
20
21
|
effectiveMode: 'light' | 'dark';
|
|
21
22
|
/** The numeric pixel value parsed from `borderRadius` (the SDK-wide default). */
|
|
22
23
|
borderRadiusPx: number;
|
|
24
|
+
/** Minimum height of inputs and selects, parsed from `inputHeight`. */
|
|
25
|
+
inputHeightPx: number;
|
|
26
|
+
/** Minimum height of buttons, parsed from `buttonHeight`. */
|
|
27
|
+
buttonHeightPx: number;
|
|
28
|
+
/**
|
|
29
|
+
* Catalog font every text renders with, or `null` for the system font.
|
|
30
|
+
* Set only once the font files are loaded, so a text never names a face the
|
|
31
|
+
* platform does not have yet.
|
|
32
|
+
*/
|
|
33
|
+
fontId: VelionCatalogFontId | null;
|
|
23
34
|
}
|
|
35
|
+
/** Default for `inputHeight` and `buttonHeight`: the 44 px tap target. */
|
|
36
|
+
export declare const DEFAULT_CONTROL_HEIGHT_PX = 44;
|
|
24
37
|
export declare const LIGHT_TOKENS: ThemeTokenSet;
|
|
25
38
|
export declare const DARK_TOKENS: ThemeTokenSet;
|
|
26
39
|
export declare function getDefaultThemeTokens(colorMode?: 'light' | 'dark'): ThemeTokenSet;
|
|
27
|
-
/**
|
|
28
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Layers consumer overrides on top of the base tokens for the requested mode.
|
|
42
|
+
*
|
|
43
|
+
* `loadedFontId` is the catalog font whose files are already loaded (see
|
|
44
|
+
* `ThemeProvider`); until then texts keep the system font.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveTheme(theme: VelionTheme | undefined, colorMode: 'light' | 'dark', loadedFontId?: VelionCatalogFontId | null): ResolvedTheme;
|
|
29
47
|
/** WCAG relative-luminance check. Returns false on unparsable input. */
|
|
30
48
|
export declare function isHexDark(hex: string): boolean;
|
|
31
49
|
/**
|
|
@@ -39,4 +57,9 @@ export declare function mixHex(a: string, b: string, ratioOfA: number): string;
|
|
|
39
57
|
* borders / fills that should not blend with the host background.
|
|
40
58
|
*/
|
|
41
59
|
export declare function withAlpha(hex: string, alpha: number): string;
|
|
60
|
+
/**
|
|
61
|
+
* Parses a `'12px'` theme length. A bare number (`'12'`) is read as pixels;
|
|
62
|
+
* anything else — other units, garbage, a missing value — gives `fallback`.
|
|
63
|
+
*/
|
|
64
|
+
export declare function parsePx(value: string | undefined, fallback: number): number;
|
|
42
65
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,8EAA8E;IAC9E,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,aAAa,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACpC;AAED,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,YAAY,EAAE,aAiB1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,aAiBzB,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,SAAS,GAAE,OAAO,GAAG,MAAgB,GACpC,aAAa,CAEf;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,SAAS,EAAE,OAAO,GAAG,MAAM,EAC3B,YAAY,GAAE,mBAAmB,GAAG,IAAW,GAC9C,aAAa,CAoBf;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAY9C;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASrE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAK5D;AA2BD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQ3E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velion-la/onboarding-sdk-react-native",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.3",
|
|
4
4
|
"description": "Native React Native SDK for the Velion Onboarding (KYC) flow: ID document OCR, passive + active liveness, device fingerprint, OTP verification, address picker, and personal / legal information forms.",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"expo-crypto": "~57.0.4",
|
|
72
72
|
"expo-device": "~57.0.2",
|
|
73
73
|
"expo-file-system": "~57.0.6",
|
|
74
|
+
"expo-font": "~57.0.4",
|
|
74
75
|
"expo-image-manipulator": "~57.0.21",
|
|
75
76
|
"expo-keep-awake": "~57.0.1",
|
|
76
77
|
"expo-location": "~57.0.22",
|
|
@@ -28,10 +28,9 @@ import {
|
|
|
28
28
|
Pressable,
|
|
29
29
|
ScrollView,
|
|
30
30
|
StyleSheet,
|
|
31
|
-
Text,
|
|
32
|
-
TextInput,
|
|
33
31
|
View,
|
|
34
32
|
} from 'react-native';
|
|
33
|
+
import { Text, TextInput } from '../ui/primitives/Text';
|
|
35
34
|
import * as Location from 'expo-location';
|
|
36
35
|
import { useTheme } from '../ui/theme';
|
|
37
36
|
import { log } from '../utils/log';
|
|
@@ -180,6 +179,7 @@ export function AddressSearchBar({
|
|
|
180
179
|
<View
|
|
181
180
|
style={[
|
|
182
181
|
styles.inputWrap,
|
|
182
|
+
{ minHeight: theme.inputHeightPx },
|
|
183
183
|
{
|
|
184
184
|
backgroundColor: theme.backgroundColor,
|
|
185
185
|
borderColor: theme.borderColor,
|
|
@@ -301,7 +301,6 @@ const styles = StyleSheet.create({
|
|
|
301
301
|
inputWrap: {
|
|
302
302
|
flexDirection: 'row',
|
|
303
303
|
alignItems: 'center',
|
|
304
|
-
minHeight: 44,
|
|
305
304
|
paddingHorizontal: 14,
|
|
306
305
|
borderWidth: 1,
|
|
307
306
|
// Float over the map — sombra propia para que se "levante" sin
|
|
@@ -314,7 +313,7 @@ const styles = StyleSheet.create({
|
|
|
314
313
|
},
|
|
315
314
|
input: {
|
|
316
315
|
flex: 1,
|
|
317
|
-
paddingVertical:
|
|
316
|
+
paddingVertical: 8,
|
|
318
317
|
fontSize: 15,
|
|
319
318
|
},
|
|
320
319
|
clearBtn: {
|
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
ActivityIndicator,
|
|
31
31
|
Pressable,
|
|
32
32
|
StyleSheet,
|
|
33
|
-
Text,
|
|
34
33
|
useWindowDimensions,
|
|
35
34
|
View,
|
|
36
35
|
} from 'react-native';
|
|
36
|
+
import { Text } from '../ui/primitives/Text';
|
|
37
37
|
import Svg, { Defs, Mask, Rect } from 'react-native-svg';
|
|
38
38
|
import {
|
|
39
39
|
Camera,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
Easing,
|
|
40
40
|
Platform,
|
|
41
41
|
StyleSheet,
|
|
42
|
-
Text,
|
|
43
42
|
useWindowDimensions,
|
|
44
43
|
View,
|
|
45
44
|
} from 'react-native';
|
|
45
|
+
import { Text } from '../ui/primitives/Text';
|
|
46
46
|
import Svg, { Defs, Ellipse, Mask, Rect } from 'react-native-svg';
|
|
47
47
|
import {
|
|
48
48
|
Camera,
|
|
@@ -34,9 +34,9 @@ import {
|
|
|
34
34
|
Keyboard,
|
|
35
35
|
Platform,
|
|
36
36
|
StyleSheet,
|
|
37
|
-
Text,
|
|
38
37
|
View,
|
|
39
38
|
} from 'react-native';
|
|
39
|
+
import { Text } from '../ui/primitives/Text';
|
|
40
40
|
import * as Location from 'expo-location';
|
|
41
41
|
import { Button } from '../ui/primitives/Button';
|
|
42
42
|
import { Banner } from '../ui/primitives/Banner';
|
package/src/index.ts
CHANGED
|
@@ -28,7 +28,12 @@ import {
|
|
|
28
28
|
type Dispatch,
|
|
29
29
|
type SetStateAction,
|
|
30
30
|
} from 'react';
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
Platform,
|
|
33
|
+
StyleSheet,
|
|
34
|
+
View,
|
|
35
|
+
} from 'react-native';
|
|
36
|
+
import { Text } from '../ui/primitives/Text';
|
|
32
37
|
import {
|
|
33
38
|
SdkErrorCode,
|
|
34
39
|
type AddressInfoPayload,
|
|
@@ -18,7 +18,12 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { useCallback, useMemo, useState } from 'react';
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
Keyboard,
|
|
23
|
+
StyleSheet,
|
|
24
|
+
View,
|
|
25
|
+
} from 'react-native';
|
|
26
|
+
import { Text } from '../ui/primitives/Text';
|
|
22
27
|
import {
|
|
23
28
|
SdkErrorCode,
|
|
24
29
|
type EconomicActivitySelectionPayload,
|
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { useCallback, useState } from 'react';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
Pressable,
|
|
15
|
+
StyleSheet,
|
|
16
|
+
View,
|
|
17
|
+
} from 'react-native';
|
|
18
|
+
import { Text } from '../ui/primitives/Text';
|
|
14
19
|
import { SdkErrorCode, type SdkError } from '../types';
|
|
15
20
|
import { Banner } from '../ui/primitives/Banner';
|
|
16
21
|
import { Button } from '../ui/primitives/Button';
|
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { useEffect, useRef } from 'react';
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
ActivityIndicator,
|
|
19
|
+
StyleSheet,
|
|
20
|
+
View,
|
|
21
|
+
} from 'react-native';
|
|
22
|
+
import { Text } from '../ui/primitives/Text';
|
|
18
23
|
import {
|
|
19
24
|
SdkErrorCode,
|
|
20
25
|
type OnboardingDtoResponse,
|
|
@@ -15,7 +15,13 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
Image,
|
|
20
|
+
ScrollView,
|
|
21
|
+
StyleSheet,
|
|
22
|
+
View,
|
|
23
|
+
} from 'react-native';
|
|
24
|
+
import { Text } from '../ui/primitives/Text';
|
|
19
25
|
// `expo-file-system` v19's `File` class wraps a `file://` path with a Blob-
|
|
20
26
|
// compatible API (`arrayBuffer`, `size`, `delete`). We read the recorded mp4
|
|
21
27
|
// to bytes in JS and PUT them with the global `fetch`. For the typical
|
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useCallback, useState } from 'react';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
Pressable,
|
|
13
|
+
StyleSheet,
|
|
14
|
+
View,
|
|
15
|
+
} from 'react-native';
|
|
16
|
+
import { Text } from '../ui/primitives/Text';
|
|
12
17
|
import { SdkErrorCode, type SdkError } from '../types';
|
|
13
18
|
import { Banner } from '../ui/primitives/Banner';
|
|
14
19
|
import { Button } from '../ui/primitives/Button';
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
Linking,
|
|
15
|
+
Pressable,
|
|
16
|
+
StyleSheet,
|
|
17
|
+
View,
|
|
18
|
+
} from 'react-native';
|
|
19
|
+
import { Text } from '../ui/primitives/Text';
|
|
14
20
|
import {
|
|
15
21
|
SdkErrorCode,
|
|
16
22
|
type SdkError,
|
package/src/types/index.ts
CHANGED
|
@@ -421,16 +421,17 @@ export interface SdkError {
|
|
|
421
421
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
422
422
|
|
|
423
423
|
/**
|
|
424
|
-
* White-labeling theme configuration.
|
|
425
|
-
*
|
|
426
|
-
* making all SDK UI elements styleable via `--vl-*` variables.
|
|
424
|
+
* White-labeling theme configuration. Same keys as the web SDK's
|
|
425
|
+
* `VelionTheme`, so one workflow appearance renders alike on web and mobile.
|
|
427
426
|
*
|
|
428
427
|
* @example
|
|
429
428
|
* ```typescript
|
|
430
429
|
* const theme: VelionTheme = {
|
|
431
|
-
* primaryColor: '#0052CC',
|
|
432
|
-
* borderRadius: '12px',
|
|
433
|
-
* fontFamily: '
|
|
430
|
+
* primaryColor: '#0052CC',
|
|
431
|
+
* borderRadius: '12px',
|
|
432
|
+
* fontFamily: 'inter',
|
|
433
|
+
* inputHeight: '48px',
|
|
434
|
+
* buttonHeight: '52px',
|
|
434
435
|
* };
|
|
435
436
|
* ```
|
|
436
437
|
*/
|
|
@@ -447,7 +448,20 @@ export interface VelionTheme {
|
|
|
447
448
|
textSecondaryColor?: string;
|
|
448
449
|
/** Border radius for cards, buttons, and inputs. */
|
|
449
450
|
borderRadius?: string;
|
|
450
|
-
/**
|
|
451
|
+
/**
|
|
452
|
+
* Font every SDK text renders with, by id from the closed catalog:
|
|
453
|
+
* `'system'` (default), `'inter'`, `'roboto'`, `'open-sans'`, `'montserrat'`,
|
|
454
|
+
* `'poppins'`, `'nunito'`, `'source-sans-3'`, `'work-sans'`,
|
|
455
|
+
* `'ibm-plex-sans'`, `'dm-sans'` (see `VELION_FONT_IDS`).
|
|
456
|
+
*
|
|
457
|
+
* The SDK downloads the font with `expo-font`; texts use the system font
|
|
458
|
+
* until it is loaded, and keep it if the download fails. The Google Fonts
|
|
459
|
+
* name works too (`'Open Sans'`), and only the first family of a CSS stack
|
|
460
|
+
* counts. Any other value renders with the system font: the SDK never loads
|
|
461
|
+
* a font from a URL in the configuration.
|
|
462
|
+
*
|
|
463
|
+
* @default 'system'
|
|
464
|
+
*/
|
|
451
465
|
fontFamily?: string;
|
|
452
466
|
/** Color used for error states and destructive actions. */
|
|
453
467
|
errorColor?: string;
|
|
@@ -459,6 +473,20 @@ export interface VelionTheme {
|
|
|
459
473
|
borderColor?: string;
|
|
460
474
|
/** Box shadow definition for elevated elements (cards, modals). */
|
|
461
475
|
cardShadow?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Minimum height of text inputs, selects and search fields, as a pixel
|
|
478
|
+
* length (`'48px'`). Taller content (a wrapped value) still grows the field.
|
|
479
|
+
*
|
|
480
|
+
* @default '44px'
|
|
481
|
+
*/
|
|
482
|
+
inputHeight?: string;
|
|
483
|
+
/**
|
|
484
|
+
* Minimum height of the SDK's buttons (primary, secondary and ghost), as a
|
|
485
|
+
* pixel length (`'48px'`). A label that wraps still grows the button.
|
|
486
|
+
*
|
|
487
|
+
* @default '44px'
|
|
488
|
+
*/
|
|
489
|
+
buttonHeight?: string;
|
|
462
490
|
/**
|
|
463
491
|
* When true, the SDK omits the round colored icon next to each step's
|
|
464
492
|
* title — only the title + subtitle are rendered. Useful for hosts that
|
package/src/ui/StepShell.tsx
CHANGED
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
import type { ReactNode } from 'react';
|
|
10
10
|
import { useRef } from 'react';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
Animated,
|
|
13
|
+
StyleSheet,
|
|
14
|
+
View,
|
|
15
|
+
} from 'react-native';
|
|
16
|
+
import { Text } from './primitives/Text';
|
|
12
17
|
import Svg, {
|
|
13
18
|
Defs,
|
|
14
19
|
LinearGradient as SvgLinearGradient,
|
|
@@ -15,7 +15,11 @@ import React, {
|
|
|
15
15
|
useState,
|
|
16
16
|
type ReactNode,
|
|
17
17
|
} from 'react';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
StyleSheet,
|
|
20
|
+
View,
|
|
21
|
+
} from 'react-native';
|
|
22
|
+
import { Text } from './primitives/Text';
|
|
19
23
|
import { VelionOnboarding, type VelionConfig } from '../core/VelionOnboarding';
|
|
20
24
|
import type {
|
|
21
25
|
OnboardingExit,
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
Animated,
|
|
18
18
|
Easing,
|
|
19
19
|
StyleSheet,
|
|
20
|
-
Text,
|
|
21
20
|
useWindowDimensions,
|
|
22
21
|
View,
|
|
23
22
|
} from 'react-native';
|
|
23
|
+
import { Text } from '../primitives/Text';
|
|
24
24
|
import Svg, { Circle, Path } from 'react-native-svg';
|
|
25
25
|
|
|
26
26
|
import { useTheme, withAlpha } from '../theme';
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { useEffect, useRef } from 'react';
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
Animated,
|
|
19
|
+
Easing,
|
|
20
|
+
StyleSheet,
|
|
21
|
+
View,
|
|
22
|
+
} from 'react-native';
|
|
23
|
+
import { Text } from '../primitives/Text';
|
|
18
24
|
import { useReducedMotion, useTheme } from '../theme';
|
|
19
25
|
|
|
20
26
|
export interface LoadingOverlayProps {
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* recover without losing their inputs.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
StyleSheet,
|
|
11
|
+
View,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
import { Text } from '../primitives/Text';
|
|
10
14
|
import { Button } from '../primitives/Button';
|
|
11
15
|
import { mixHex, useTheme, withAlpha } from '../theme';
|
|
12
16
|
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
* is unavailable the icon falls back gracefully and only the label shows.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
Pressable,
|
|
16
|
+
StyleSheet,
|
|
17
|
+
} from 'react-native';
|
|
18
|
+
import { Text } from './Text';
|
|
15
19
|
import { useTheme, withAlpha } from '../theme';
|
|
16
20
|
import { StepIcon } from '../icons/StepIcon';
|
|
17
21
|
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* inline warning icon (single "!" character to keep zero asset dependencies).
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
StyleSheet,
|
|
8
|
+
View,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { Text } from './Text';
|
|
7
11
|
import { mixHex, useTheme } from '../theme';
|
|
8
12
|
|
|
9
13
|
export interface BannerProps {
|