@rocapine/react-native-onboarding-ui 1.6.0 → 1.8.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.
Files changed (84) hide show
  1. package/dist/UI/OnboardingPage.js +1 -1
  2. package/dist/UI/OnboardingPage.js.map +1 -1
  3. package/dist/UI/Pages/ComposableScreen/Renderer.d.ts +0 -2
  4. package/dist/UI/Pages/ComposableScreen/Renderer.d.ts.map +1 -1
  5. package/dist/UI/Pages/ComposableScreen/Renderer.js +13 -273
  6. package/dist/UI/Pages/ComposableScreen/Renderer.js.map +1 -1
  7. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.d.ts +30 -0
  8. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.d.ts.map +1 -0
  9. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.js +19 -0
  10. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.js.map +1 -0
  11. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.d.ts +67 -0
  12. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.d.ts.map +1 -0
  13. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.js +65 -0
  14. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.js.map +1 -0
  15. package/dist/UI/Pages/ComposableScreen/elements/IconElement.d.ts +41 -0
  16. package/dist/UI/Pages/ComposableScreen/elements/IconElement.d.ts.map +1 -0
  17. package/dist/UI/Pages/ComposableScreen/elements/IconElement.js +37 -0
  18. package/dist/UI/Pages/ComposableScreen/elements/IconElement.js.map +1 -0
  19. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts +42 -0
  20. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts.map +1 -0
  21. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.js +34 -0
  22. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.js.map +1 -0
  23. package/dist/UI/Pages/ComposableScreen/elements/InputElement.d.ts +102 -0
  24. package/dist/UI/Pages/ComposableScreen/elements/InputElement.d.ts.map +1 -0
  25. package/dist/UI/Pages/ComposableScreen/elements/InputElement.js +68 -0
  26. package/dist/UI/Pages/ComposableScreen/elements/InputElement.js.map +1 -0
  27. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.d.ts +39 -0
  28. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.d.ts.map +1 -0
  29. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.js +60 -0
  30. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.js.map +1 -0
  31. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts +78 -0
  32. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -0
  33. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.js +119 -0
  34. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.js.map +1 -0
  35. package/dist/UI/Pages/ComposableScreen/elements/RiveElement.d.ts +62 -0
  36. package/dist/UI/Pages/ComposableScreen/elements/RiveElement.d.ts.map +1 -0
  37. package/dist/UI/Pages/ComposableScreen/elements/RiveElement.js +68 -0
  38. package/dist/UI/Pages/ComposableScreen/elements/RiveElement.js.map +1 -0
  39. package/dist/UI/Pages/ComposableScreen/elements/StackElement.d.ts +85 -0
  40. package/dist/UI/Pages/ComposableScreen/elements/StackElement.d.ts.map +1 -0
  41. package/dist/UI/Pages/ComposableScreen/elements/StackElement.js +64 -0
  42. package/dist/UI/Pages/ComposableScreen/elements/StackElement.js.map +1 -0
  43. package/dist/UI/Pages/ComposableScreen/elements/TextElement.d.ts +66 -0
  44. package/dist/UI/Pages/ComposableScreen/elements/TextElement.d.ts.map +1 -0
  45. package/dist/UI/Pages/ComposableScreen/elements/TextElement.js +59 -0
  46. package/dist/UI/Pages/ComposableScreen/elements/TextElement.js.map +1 -0
  47. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.d.ts +41 -0
  48. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.d.ts.map +1 -0
  49. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.js +84 -0
  50. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.js.map +1 -0
  51. package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts +5 -0
  52. package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts.map +1 -0
  53. package/dist/UI/Pages/ComposableScreen/elements/renderElement.js +49 -0
  54. package/dist/UI/Pages/ComposableScreen/elements/renderElement.js.map +1 -0
  55. package/dist/UI/Pages/ComposableScreen/elements/shared.d.ts +13 -0
  56. package/dist/UI/Pages/ComposableScreen/elements/shared.d.ts.map +1 -0
  57. package/dist/UI/Pages/ComposableScreen/elements/shared.js +6 -0
  58. package/dist/UI/Pages/ComposableScreen/elements/shared.js.map +1 -0
  59. package/dist/UI/Pages/ComposableScreen/types.d.ts +40 -113
  60. package/dist/UI/Pages/ComposableScreen/types.d.ts.map +1 -1
  61. package/dist/UI/Pages/ComposableScreen/types.js +33 -121
  62. package/dist/UI/Pages/ComposableScreen/types.js.map +1 -1
  63. package/dist/UI/Provider/OnboardingProgressProvider.d.ts +6 -2
  64. package/dist/UI/Provider/OnboardingProgressProvider.d.ts.map +1 -1
  65. package/dist/UI/Provider/OnboardingProgressProvider.js +4 -3
  66. package/dist/UI/Provider/OnboardingProgressProvider.js.map +1 -1
  67. package/package.json +2 -2
  68. package/src/UI/OnboardingPage.tsx +1 -1
  69. package/src/UI/Pages/ComposableScreen/Renderer.tsx +22 -430
  70. package/src/UI/Pages/ComposableScreen/elements/BaseBoxProps.ts +31 -0
  71. package/src/UI/Pages/ComposableScreen/elements/ButtonElement.tsx +96 -0
  72. package/src/UI/Pages/ComposableScreen/elements/IconElement.tsx +67 -0
  73. package/src/UI/Pages/ComposableScreen/elements/ImageElement.tsx +52 -0
  74. package/src/UI/Pages/ComposableScreen/elements/InputElement.tsx +115 -0
  75. package/src/UI/Pages/ComposableScreen/elements/LottieElement.tsx +97 -0
  76. package/src/UI/Pages/ComposableScreen/elements/RadioGroupElement.tsx +181 -0
  77. package/src/UI/Pages/ComposableScreen/elements/RiveElement.tsx +105 -0
  78. package/src/UI/Pages/ComposableScreen/elements/StackElement.tsx +103 -0
  79. package/src/UI/Pages/ComposableScreen/elements/TextElement.tsx +95 -0
  80. package/src/UI/Pages/ComposableScreen/elements/VideoElement.tsx +113 -0
  81. package/src/UI/Pages/ComposableScreen/elements/renderElement.tsx +61 -0
  82. package/src/UI/Pages/ComposableScreen/elements/shared.ts +15 -0
  83. package/src/UI/Pages/ComposableScreen/types.ts +56 -233
  84. package/src/UI/Provider/OnboardingProgressProvider.tsx +8 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/IconElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;iBAMjC,CAAC;AAEH,KAAK,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE1D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,aAAa,CAAC;IACvB,GAAG,EAAE,aAAa,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,kBAAkB,KAAK,KAAG,KAAK,CAAC,YAoCpE,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IconElementComponent = exports.IconElementPropsSchema = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const zod_1 = require("zod");
6
+ const react_native_1 = require("react-native");
7
+ const BaseBoxProps_1 = require("./BaseBoxProps");
8
+ exports.IconElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
9
+ name: zod_1.z.string().min(1, "icon name must not be empty"),
10
+ size: zod_1.z.number().nonnegative().optional(),
11
+ color: zod_1.z.string().optional(),
12
+ strokeWidth: zod_1.z.number().nonnegative().optional(),
13
+ backgroundColor: zod_1.z.string().optional(),
14
+ });
15
+ const IconElementComponent = ({ element, ctx }) => {
16
+ var _a, _b, _c;
17
+ const { theme } = ctx;
18
+ const icons = require("lucide-react-native");
19
+ const IconComp = icons[element.props.name];
20
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
21
+ width: element.props.width,
22
+ height: element.props.height,
23
+ margin: element.props.margin,
24
+ marginHorizontal: element.props.marginHorizontal,
25
+ marginVertical: element.props.marginVertical,
26
+ padding: element.props.padding,
27
+ paddingHorizontal: element.props.paddingHorizontal,
28
+ paddingVertical: element.props.paddingVertical,
29
+ borderWidth: element.props.borderWidth,
30
+ borderRadius: element.props.borderRadius,
31
+ borderColor: element.props.borderColor,
32
+ backgroundColor: element.props.backgroundColor,
33
+ opacity: element.props.opacity,
34
+ }, children: IconComp ? ((0, jsx_runtime_1.jsx)(IconComp, { size: (_a = element.props.size) !== null && _a !== void 0 ? _a : 24, color: (_b = element.props.color) !== null && _b !== void 0 ? _b : theme.colors.text.primary, strokeWidth: (_c = element.props.strokeWidth) !== null && _c !== void 0 ? _c : 2 })) : null }));
35
+ };
36
+ exports.IconElementComponent = IconElementComponent;
37
+ //# sourceMappingURL=IconElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/IconElement.tsx"],"names":[],"mappings":";;;;AACA,6BAAwB;AACxB,+CAAoC;AACpC,iDAAkE;AAYrD,QAAA,sBAAsB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC9D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;IACtD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IACzC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAChD,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AASI,MAAM,oBAAoB,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAS,EAAsB,EAAE;;IAClF,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC;IACtB,MAAM,KAAK,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAI3B,CAAC;IAEf,OAAO,CACL,uBAAC,mBAAI,IACH,KAAK,EAAE;YACL,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK;YAC1B,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;YAC5B,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;YAC5B,gBAAgB,EAAE,OAAO,CAAC,KAAK,CAAC,gBAAgB;YAChD,cAAc,EAAE,OAAO,CAAC,KAAK,CAAC,cAAc;YAC5C,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO;YAC9B,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC,iBAAiB;YAClD,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,eAAe;YAC9C,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW;YACtC,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,YAAY;YACxC,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW;YACtC,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,eAAe;YAC9C,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO;SAC/B,YAEA,QAAQ,CAAC,CAAC,CAAC,CACV,uBAAC,QAAQ,IACP,IAAI,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,EAC9B,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,KAAK,mCAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EACvD,WAAW,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,WAAW,mCAAI,CAAC,GAC3C,CACH,CAAC,CAAC,CAAC,IAAI,GACH,CACR,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,oBAAoB,wBAoC/B"}
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ import { z } from "zod";
3
+ import { BaseBoxProps } from "./BaseBoxProps";
4
+ import { UIElement } from "../types";
5
+ import { RenderContext } from "./shared";
6
+ export type ImageElementProps = BaseBoxProps & {
7
+ url: string;
8
+ aspectRatio?: number;
9
+ resizeMode?: "cover" | "contain" | "stretch" | "center";
10
+ };
11
+ export declare const ImageElementPropsSchema: z.ZodObject<{
12
+ width: z.ZodOptional<z.ZodNumber>;
13
+ height: z.ZodOptional<z.ZodNumber>;
14
+ opacity: z.ZodOptional<z.ZodNumber>;
15
+ margin: z.ZodOptional<z.ZodNumber>;
16
+ marginHorizontal: z.ZodOptional<z.ZodNumber>;
17
+ marginVertical: z.ZodOptional<z.ZodNumber>;
18
+ padding: z.ZodOptional<z.ZodNumber>;
19
+ paddingHorizontal: z.ZodOptional<z.ZodNumber>;
20
+ paddingVertical: z.ZodOptional<z.ZodNumber>;
21
+ borderWidth: z.ZodOptional<z.ZodNumber>;
22
+ borderRadius: z.ZodOptional<z.ZodNumber>;
23
+ borderColor: z.ZodOptional<z.ZodString>;
24
+ url: z.ZodString;
25
+ aspectRatio: z.ZodOptional<z.ZodNumber>;
26
+ resizeMode: z.ZodOptional<z.ZodEnum<{
27
+ center: "center";
28
+ contain: "contain";
29
+ stretch: "stretch";
30
+ cover: "cover";
31
+ }>>;
32
+ }, z.core.$strip>;
33
+ type ImageUIElement = Extract<UIElement, {
34
+ type: "Image";
35
+ }>;
36
+ type Props = {
37
+ element: ImageUIElement;
38
+ ctx: RenderContext;
39
+ };
40
+ export declare const ImageElementComponent: ({ element }: Props) => React.ReactElement;
41
+ export {};
42
+ //# sourceMappingURL=ImageElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/ImageElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;iBAIlC,CAAC;AAEH,KAAK,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE5D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,EAAE,aAAa,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,aAAa,KAAK,KAAG,KAAK,CAAC,YAyBhE,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageElementComponent = exports.ImageElementPropsSchema = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const zod_1 = require("zod");
6
+ const react_native_1 = require("react-native");
7
+ const BaseBoxProps_1 = require("./BaseBoxProps");
8
+ exports.ImageElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
9
+ url: zod_1.z.string().min(1, "url must not be empty"),
10
+ aspectRatio: zod_1.z.number().optional(),
11
+ resizeMode: zod_1.z.enum(["cover", "contain", "stretch", "center"]).optional(),
12
+ });
13
+ const ImageElementComponent = ({ element }) => {
14
+ var _a, _b, _c;
15
+ const hasExplicitHeight = element.props.height !== undefined;
16
+ const aspectRatio = hasExplicitHeight ? undefined : ((_a = element.props.aspectRatio) !== null && _a !== void 0 ? _a : 16 / 9);
17
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Image, { source: { uri: element.props.url }, resizeMode: (_b = element.props.resizeMode) !== null && _b !== void 0 ? _b : "cover", style: {
18
+ width: (_c = element.props.width) !== null && _c !== void 0 ? _c : "100%",
19
+ height: element.props.height,
20
+ aspectRatio,
21
+ borderRadius: element.props.borderRadius,
22
+ borderWidth: element.props.borderWidth,
23
+ borderColor: element.props.borderColor,
24
+ opacity: element.props.opacity,
25
+ margin: element.props.margin,
26
+ marginHorizontal: element.props.marginHorizontal,
27
+ marginVertical: element.props.marginVertical,
28
+ padding: element.props.padding,
29
+ paddingHorizontal: element.props.paddingHorizontal,
30
+ paddingVertical: element.props.paddingVertical,
31
+ } }));
32
+ };
33
+ exports.ImageElementComponent = ImageElementComponent;
34
+ //# sourceMappingURL=ImageElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/ImageElement.tsx"],"names":[],"mappings":";;;;AACA,6BAAwB;AACxB,+CAAqC;AACrC,iDAAkE;AAUrD,QAAA,uBAAuB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC/D,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;IAC/C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzE,CAAC,CAAC;AASI,MAAM,qBAAqB,GAAG,CAAC,EAAE,OAAO,EAAS,EAAsB,EAAE;;IAC9E,MAAM,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;IAC7D,MAAM,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,WAAW,mCAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IAE1F,OAAO,CACL,uBAAC,oBAAK,IACJ,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,EAClC,UAAU,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,UAAU,mCAAI,OAAO,EAC/C,KAAK,EAAE;YACL,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,KAAK,mCAAI,MAAM;YACpC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;YAC5B,WAAW;YACX,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,YAAY;YACxC,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW;YACtC,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW;YACtC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO;YAC9B,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;YAC5B,gBAAgB,EAAE,OAAO,CAAC,KAAK,CAAC,gBAAgB;YAChD,cAAc,EAAE,OAAO,CAAC,KAAK,CAAC,cAAc;YAC5C,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO;YAC9B,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC,iBAAiB;YAClD,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,eAAe;SAC/C,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,qBAAqB,yBAyBhC"}
@@ -0,0 +1,102 @@
1
+ import React from "react";
2
+ import { z } from "zod";
3
+ import { BaseBoxProps } from "./BaseBoxProps";
4
+ import { UIElement } from "../types";
5
+ import { RenderContext } from "./shared";
6
+ export type InputElementProps = BaseBoxProps & {
7
+ variableName?: string;
8
+ placeholder?: string;
9
+ defaultValue?: string;
10
+ keyboardType?: "default" | "email-address" | "numeric" | "phone-pad" | "decimal-pad" | "url" | "number-pad" | "ascii-capable" | "numbers-and-punctuation" | "name-phone-pad" | "twitter" | "web-search" | "visible-password";
11
+ returnKeyType?: "done" | "next" | "go" | "search" | "send" | "default" | "emergency-call" | "google" | "join" | "route" | "yahoo" | "none" | "previous";
12
+ autoCapitalize?: "none" | "sentences" | "words" | "characters";
13
+ secureTextEntry?: boolean;
14
+ maxLength?: number;
15
+ multiline?: boolean;
16
+ numberOfLines?: number;
17
+ editable?: boolean;
18
+ color?: string;
19
+ backgroundColor?: string;
20
+ fontSize?: number;
21
+ fontWeight?: string;
22
+ textAlign?: "left" | "center" | "right";
23
+ placeholderColor?: string;
24
+ };
25
+ export declare const InputElementPropsSchema: z.ZodObject<{
26
+ width: z.ZodOptional<z.ZodNumber>;
27
+ height: z.ZodOptional<z.ZodNumber>;
28
+ opacity: z.ZodOptional<z.ZodNumber>;
29
+ margin: z.ZodOptional<z.ZodNumber>;
30
+ marginHorizontal: z.ZodOptional<z.ZodNumber>;
31
+ marginVertical: z.ZodOptional<z.ZodNumber>;
32
+ padding: z.ZodOptional<z.ZodNumber>;
33
+ paddingHorizontal: z.ZodOptional<z.ZodNumber>;
34
+ paddingVertical: z.ZodOptional<z.ZodNumber>;
35
+ borderWidth: z.ZodOptional<z.ZodNumber>;
36
+ borderRadius: z.ZodOptional<z.ZodNumber>;
37
+ borderColor: z.ZodOptional<z.ZodString>;
38
+ variableName: z.ZodOptional<z.ZodString>;
39
+ placeholder: z.ZodOptional<z.ZodString>;
40
+ defaultValue: z.ZodOptional<z.ZodString>;
41
+ keyboardType: z.ZodOptional<z.ZodEnum<{
42
+ default: "default";
43
+ url: "url";
44
+ "email-address": "email-address";
45
+ numeric: "numeric";
46
+ "phone-pad": "phone-pad";
47
+ "decimal-pad": "decimal-pad";
48
+ "number-pad": "number-pad";
49
+ "ascii-capable": "ascii-capable";
50
+ "numbers-and-punctuation": "numbers-and-punctuation";
51
+ "name-phone-pad": "name-phone-pad";
52
+ twitter: "twitter";
53
+ "web-search": "web-search";
54
+ "visible-password": "visible-password";
55
+ }>>;
56
+ returnKeyType: z.ZodOptional<z.ZodEnum<{
57
+ default: "default";
58
+ none: "none";
59
+ join: "join";
60
+ done: "done";
61
+ search: "search";
62
+ next: "next";
63
+ go: "go";
64
+ send: "send";
65
+ "emergency-call": "emergency-call";
66
+ google: "google";
67
+ route: "route";
68
+ yahoo: "yahoo";
69
+ previous: "previous";
70
+ }>>;
71
+ autoCapitalize: z.ZodOptional<z.ZodEnum<{
72
+ none: "none";
73
+ sentences: "sentences";
74
+ words: "words";
75
+ characters: "characters";
76
+ }>>;
77
+ secureTextEntry: z.ZodOptional<z.ZodBoolean>;
78
+ maxLength: z.ZodOptional<z.ZodNumber>;
79
+ multiline: z.ZodOptional<z.ZodBoolean>;
80
+ numberOfLines: z.ZodOptional<z.ZodNumber>;
81
+ editable: z.ZodOptional<z.ZodBoolean>;
82
+ color: z.ZodOptional<z.ZodString>;
83
+ backgroundColor: z.ZodOptional<z.ZodString>;
84
+ fontSize: z.ZodOptional<z.ZodNumber>;
85
+ fontWeight: z.ZodOptional<z.ZodString>;
86
+ textAlign: z.ZodOptional<z.ZodEnum<{
87
+ left: "left";
88
+ right: "right";
89
+ center: "center";
90
+ }>>;
91
+ placeholderColor: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>;
93
+ type InputUIElement = Extract<UIElement, {
94
+ type: "Input";
95
+ }>;
96
+ type Props = {
97
+ element: InputUIElement;
98
+ ctx: RenderContext;
99
+ };
100
+ export declare const InputElementComponent: ({ element, ctx }: Props) => React.ReactElement;
101
+ export {};
102
+ //# sourceMappingURL=InputElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/InputElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,KAAK,GAAG,YAAY,GAAG,eAAe,GAAG,yBAAyB,GAAG,gBAAgB,GAAG,SAAS,GAAG,YAAY,GAAG,kBAAkB,CAAC;IAC7N,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;IACxJ,cAAc,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,YAAY,CAAC;IAC/D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBlC,CAAC;AAEH,KAAK,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE5D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,EAAE,aAAa,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,kBAAkB,KAAK,KAAG,KAAK,CAAC,YA4DrE,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputElementComponent = exports.InputElementPropsSchema = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const zod_1 = require("zod");
7
+ const react_native_1 = require("react-native");
8
+ const BaseBoxProps_1 = require("./BaseBoxProps");
9
+ exports.InputElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
10
+ variableName: zod_1.z.string().min(1).optional(),
11
+ placeholder: zod_1.z.string().optional(),
12
+ defaultValue: zod_1.z.string().optional(),
13
+ keyboardType: zod_1.z.enum(["default", "email-address", "numeric", "phone-pad", "decimal-pad", "url", "number-pad", "ascii-capable", "numbers-and-punctuation", "name-phone-pad", "twitter", "web-search", "visible-password"]).optional(),
14
+ returnKeyType: zod_1.z.enum(["done", "next", "go", "search", "send", "default", "emergency-call", "google", "join", "route", "yahoo", "none", "previous"]).optional(),
15
+ autoCapitalize: zod_1.z.enum(["none", "sentences", "words", "characters"]).optional(),
16
+ secureTextEntry: zod_1.z.boolean().optional(),
17
+ maxLength: zod_1.z.number().int().nonnegative().optional(),
18
+ multiline: zod_1.z.boolean().optional(),
19
+ numberOfLines: zod_1.z.number().int().nonnegative().optional(),
20
+ editable: zod_1.z.boolean().optional(),
21
+ color: zod_1.z.string().optional(),
22
+ backgroundColor: zod_1.z.string().optional(),
23
+ fontSize: zod_1.z.number().optional(),
24
+ fontWeight: zod_1.z.string().optional(),
25
+ textAlign: zod_1.z.enum(["left", "center", "right"]).optional(),
26
+ placeholderColor: zod_1.z.string().optional(),
27
+ });
28
+ const InputElementComponent = ({ element, ctx }) => {
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
30
+ const { theme, variables, setVariable } = ctx;
31
+ const persistedValue = element.props.variableName ? (_a = variables[element.props.variableName]) === null || _a === void 0 ? void 0 : _a.value : undefined;
32
+ const [value, setValue] = (0, react_1.useState)((_b = persistedValue !== null && persistedValue !== void 0 ? persistedValue : element.props.defaultValue) !== null && _b !== void 0 ? _b : "");
33
+ (0, react_1.useEffect)(() => {
34
+ if (element.props.variableName && element.props.defaultValue !== undefined && persistedValue === undefined) {
35
+ setVariable(element.props.variableName, { value: element.props.defaultValue });
36
+ }
37
+ }, [element.props.variableName, element.props.defaultValue, persistedValue]);
38
+ const handleChange = (text) => {
39
+ setValue(text);
40
+ if (element.props.variableName) {
41
+ setVariable(element.props.variableName, { value: text });
42
+ }
43
+ };
44
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
45
+ backgroundColor: (_c = element.props.backgroundColor) !== null && _c !== void 0 ? _c : theme.colors.neutral.lowest,
46
+ borderWidth: (_d = element.props.borderWidth) !== null && _d !== void 0 ? _d : 1,
47
+ borderRadius: (_e = element.props.borderRadius) !== null && _e !== void 0 ? _e : 8,
48
+ borderColor: (_f = element.props.borderColor) !== null && _f !== void 0 ? _f : theme.colors.neutral.low,
49
+ width: element.props.width,
50
+ height: element.props.height,
51
+ opacity: element.props.opacity,
52
+ margin: element.props.margin,
53
+ marginHorizontal: element.props.marginHorizontal,
54
+ marginVertical: element.props.marginVertical,
55
+ overflow: "hidden",
56
+ }, children: (0, jsx_runtime_1.jsx)(react_native_1.TextInput, { value: value, onChangeText: handleChange, placeholder: element.props.placeholder, placeholderTextColor: (_g = element.props.placeholderColor) !== null && _g !== void 0 ? _g : theme.colors.text.tertiary, keyboardType: (_h = element.props.keyboardType) !== null && _h !== void 0 ? _h : "default", returnKeyType: (_j = element.props.returnKeyType) !== null && _j !== void 0 ? _j : "done", autoCapitalize: (_k = element.props.autoCapitalize) !== null && _k !== void 0 ? _k : "sentences", secureTextEntry: (_l = element.props.secureTextEntry) !== null && _l !== void 0 ? _l : false, maxLength: element.props.maxLength, multiline: (_m = element.props.multiline) !== null && _m !== void 0 ? _m : false, numberOfLines: element.props.numberOfLines, editable: (_o = element.props.editable) !== null && _o !== void 0 ? _o : true, style: {
57
+ flex: 1,
58
+ color: (_p = element.props.color) !== null && _p !== void 0 ? _p : theme.colors.text.primary,
59
+ fontSize: (_q = element.props.fontSize) !== null && _q !== void 0 ? _q : theme.typography.textStyles.body.fontSize,
60
+ fontWeight: element.props.fontWeight,
61
+ textAlign: element.props.textAlign,
62
+ padding: (_r = element.props.padding) !== null && _r !== void 0 ? _r : 12,
63
+ paddingHorizontal: element.props.paddingHorizontal,
64
+ paddingVertical: element.props.paddingVertical,
65
+ } }) }));
66
+ };
67
+ exports.InputElementComponent = InputElementComponent;
68
+ //# sourceMappingURL=InputElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/InputElement.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,6BAAwB;AACxB,+CAA+C;AAC/C,iDAAkE;AAwBrD,QAAA,uBAAuB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC/D,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpO,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/J,cAAc,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,M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AO,CAAC,KAAK,CAAC,QAAQ,mCAAI,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ;gBAC7E,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,UAAiB;gBAC3C,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS;gBAClC,OAAO,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,OAAO,mCAAI,EAAE;gBACpC,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC,iBAAiB;gBAClD,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,eAAe;aAC/C,GACD,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AA5DW,QAAA,qBAAqB,yBA4DhC"}
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { z } from "zod";
3
+ import { BaseBoxProps } from "./BaseBoxProps";
4
+ import { UIElement } from "../types";
5
+ import { RenderContext } from "./shared";
6
+ export type LottieElementProps = BaseBoxProps & {
7
+ source: string;
8
+ autoPlay?: boolean;
9
+ loop?: boolean;
10
+ speed?: number;
11
+ };
12
+ export declare const LottieElementPropsSchema: z.ZodObject<{
13
+ width: z.ZodOptional<z.ZodNumber>;
14
+ height: z.ZodOptional<z.ZodNumber>;
15
+ opacity: z.ZodOptional<z.ZodNumber>;
16
+ margin: z.ZodOptional<z.ZodNumber>;
17
+ marginHorizontal: z.ZodOptional<z.ZodNumber>;
18
+ marginVertical: z.ZodOptional<z.ZodNumber>;
19
+ padding: z.ZodOptional<z.ZodNumber>;
20
+ paddingHorizontal: z.ZodOptional<z.ZodNumber>;
21
+ paddingVertical: z.ZodOptional<z.ZodNumber>;
22
+ borderWidth: z.ZodOptional<z.ZodNumber>;
23
+ borderRadius: z.ZodOptional<z.ZodNumber>;
24
+ borderColor: z.ZodOptional<z.ZodString>;
25
+ source: z.ZodString;
26
+ autoPlay: z.ZodOptional<z.ZodBoolean>;
27
+ loop: z.ZodOptional<z.ZodBoolean>;
28
+ speed: z.ZodOptional<z.ZodNumber>;
29
+ }, z.core.$strip>;
30
+ type LottieUIElement = Extract<UIElement, {
31
+ type: "Lottie";
32
+ }>;
33
+ type Props = {
34
+ element: LottieUIElement;
35
+ ctx: RenderContext;
36
+ };
37
+ export declare const LottieElementComponent: ({ element, ctx }: Props) => React.ReactElement;
38
+ export {};
39
+ //# sourceMappingURL=LottieElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LottieElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/LottieElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAKnC,CAAC;AAEH,KAAK,eAAe,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAe9D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,eAAe,CAAC;IACzB,GAAG,EAAE,aAAa,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,kBAAkB,KAAK,KAAG,KAAK,CAAC,YAuCtE,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LottieElementComponent = exports.LottieElementPropsSchema = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const zod_1 = require("zod");
6
+ const react_native_1 = require("react-native");
7
+ const BaseBoxProps_1 = require("./BaseBoxProps");
8
+ const helpers_1 = require("../../../Theme/helpers");
9
+ exports.LottieElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
10
+ source: zod_1.z.string().min(1, "source must not be empty"),
11
+ autoPlay: zod_1.z.boolean().optional(),
12
+ loop: zod_1.z.boolean().optional(),
13
+ speed: zod_1.z.number().optional(),
14
+ });
15
+ let LottieView = null;
16
+ try {
17
+ LottieView = require("lottie-react-native").default;
18
+ }
19
+ catch (_a) {
20
+ // lottie-react-native not installed
21
+ }
22
+ const LottieElementComponent = ({ element, ctx }) => {
23
+ var _a, _b, _c, _d;
24
+ const { theme } = ctx;
25
+ const wrapperStyle = {
26
+ width: (_a = element.props.width) !== null && _a !== void 0 ? _a : "100%",
27
+ height: (_b = element.props.height) !== null && _b !== void 0 ? _b : 200,
28
+ opacity: element.props.opacity,
29
+ margin: element.props.margin,
30
+ marginHorizontal: element.props.marginHorizontal,
31
+ marginVertical: element.props.marginVertical,
32
+ padding: element.props.padding,
33
+ paddingHorizontal: element.props.paddingHorizontal,
34
+ paddingVertical: element.props.paddingVertical,
35
+ borderWidth: element.props.borderWidth,
36
+ borderRadius: element.props.borderRadius,
37
+ borderColor: element.props.borderColor,
38
+ overflow: "hidden",
39
+ };
40
+ if (!LottieView) {
41
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [wrapperStyle, styles.mediaFallback, { backgroundColor: theme.colors.neutral.lowest }], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.mediaFallbackText, (0, helpers_1.getTextStyle)(theme, "caption"), { color: theme.colors.text.tertiary }], children: "Install lottie-react-native to render Lottie animations." }) }));
42
+ }
43
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: wrapperStyle, children: (0, jsx_runtime_1.jsx)(LottieView, { source: { uri: element.props.source }, autoPlay: (_c = element.props.autoPlay) !== null && _c !== void 0 ? _c : true, loop: (_d = element.props.loop) !== null && _d !== void 0 ? _d : true, speed: element.props.speed, style: styles.fill }) }));
44
+ };
45
+ exports.LottieElementComponent = LottieElementComponent;
46
+ const styles = react_native_1.StyleSheet.create({
47
+ fill: {
48
+ width: "100%",
49
+ height: "100%",
50
+ },
51
+ mediaFallback: {
52
+ alignItems: "center",
53
+ justifyContent: "center",
54
+ },
55
+ mediaFallbackText: {
56
+ textAlign: "center",
57
+ paddingHorizontal: 16,
58
+ },
59
+ });
60
+ //# sourceMappingURL=LottieElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LottieElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/LottieElement.tsx"],"names":[],"mappings":";;;;AACA,6BAAwB;AACxB,+CAAsD;AACtD,iDAAkE;AAGlE,oDAAsD;AASzC,QAAA,wBAAwB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAChE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;IACrD,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAIH,IAAI,UAAU,GAMF,IAAI,CAAC;AACjB,IAAI,CAAC;IACH,UAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC;AACtD,CAAC;AAAC,WAAM,CAAC;IACP,oCAAoC;AACtC,CAAC;AAOM,MAAM,sBAAsB,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAS,EAAsB,EAAE;;IACpF,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC;IACtB,MAAM,YAAY,GAAG;QACnB,KAAK,EAAE,MAAA,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Q,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,QAAQ,mCAAI,IAAI,EACxC,IAAI,EAAE,MAAA,OAAO,CAAC,KAAK,CAAC,IAAI,mCAAI,IAAI,EAChC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,EAC1B,KAAK,EAAE,MAAM,CAAC,IAAI,GAClB,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAvCW,QAAA,sBAAsB,0BAuCjC;AAEF,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;KACf;IACD,aAAa,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,iBAAiB,EAAE;QACjB,SAAS,EAAE,QAAQ;QACnB,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,CAAC"}
@@ -0,0 +1,78 @@
1
+ import React from "react";
2
+ import { z } from "zod";
3
+ import { BaseBoxProps } from "./BaseBoxProps";
4
+ import { UIElement } from "../types";
5
+ import { RenderContext } from "./shared";
6
+ export type RadioGroupElementProps = BaseBoxProps & {
7
+ variableName?: string;
8
+ defaultValue?: string;
9
+ gap?: number;
10
+ direction?: "vertical" | "horizontal";
11
+ items: Array<{
12
+ label: string;
13
+ value: string;
14
+ }>;
15
+ itemBackgroundColor?: string;
16
+ itemSelectedBackgroundColor?: string;
17
+ itemBorderColor?: string;
18
+ itemSelectedBorderColor?: string;
19
+ itemBorderRadius?: number;
20
+ itemBorderWidth?: number;
21
+ itemColor?: string;
22
+ itemSelectedColor?: string;
23
+ itemFontSize?: number;
24
+ itemFontWeight?: string;
25
+ itemFontFamily?: string;
26
+ itemPadding?: number;
27
+ itemPaddingHorizontal?: number;
28
+ itemPaddingVertical?: number;
29
+ };
30
+ export declare const RadioGroupElementPropsSchema: z.ZodObject<{
31
+ width: z.ZodOptional<z.ZodNumber>;
32
+ height: z.ZodOptional<z.ZodNumber>;
33
+ opacity: z.ZodOptional<z.ZodNumber>;
34
+ margin: z.ZodOptional<z.ZodNumber>;
35
+ marginHorizontal: z.ZodOptional<z.ZodNumber>;
36
+ marginVertical: z.ZodOptional<z.ZodNumber>;
37
+ padding: z.ZodOptional<z.ZodNumber>;
38
+ paddingHorizontal: z.ZodOptional<z.ZodNumber>;
39
+ paddingVertical: z.ZodOptional<z.ZodNumber>;
40
+ borderWidth: z.ZodOptional<z.ZodNumber>;
41
+ borderRadius: z.ZodOptional<z.ZodNumber>;
42
+ borderColor: z.ZodOptional<z.ZodString>;
43
+ variableName: z.ZodOptional<z.ZodString>;
44
+ defaultValue: z.ZodOptional<z.ZodString>;
45
+ gap: z.ZodOptional<z.ZodNumber>;
46
+ direction: z.ZodOptional<z.ZodEnum<{
47
+ horizontal: "horizontal";
48
+ vertical: "vertical";
49
+ }>>;
50
+ items: z.ZodArray<z.ZodObject<{
51
+ label: z.ZodString;
52
+ value: z.ZodString;
53
+ }, z.core.$strip>>;
54
+ itemBackgroundColor: z.ZodOptional<z.ZodString>;
55
+ itemSelectedBackgroundColor: z.ZodOptional<z.ZodString>;
56
+ itemBorderColor: z.ZodOptional<z.ZodString>;
57
+ itemSelectedBorderColor: z.ZodOptional<z.ZodString>;
58
+ itemBorderRadius: z.ZodOptional<z.ZodNumber>;
59
+ itemBorderWidth: z.ZodOptional<z.ZodNumber>;
60
+ itemColor: z.ZodOptional<z.ZodString>;
61
+ itemSelectedColor: z.ZodOptional<z.ZodString>;
62
+ itemFontSize: z.ZodOptional<z.ZodNumber>;
63
+ itemFontWeight: z.ZodOptional<z.ZodString>;
64
+ itemFontFamily: z.ZodOptional<z.ZodString>;
65
+ itemPadding: z.ZodOptional<z.ZodNumber>;
66
+ itemPaddingHorizontal: z.ZodOptional<z.ZodNumber>;
67
+ itemPaddingVertical: z.ZodOptional<z.ZodNumber>;
68
+ }, z.core.$strip>;
69
+ type RadioGroupUIElement = Extract<UIElement, {
70
+ type: "RadioGroup";
71
+ }>;
72
+ type Props = {
73
+ element: RadioGroupUIElement;
74
+ ctx: RenderContext;
75
+ };
76
+ export declare const RadioGroupComponent: ({ element, ctx }: Props) => React.ReactElement;
77
+ export {};
78
+ //# sourceMappingURL=RadioGroupElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioGroupElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/RadioGroupElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,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