@rocapine/react-native-onboarding-ui 1.12.0 → 1.14.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 (90) hide show
  1. package/dist/UI/Pages/ComposableScreen/Renderer.js.map +1 -1
  2. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.d.ts +67 -0
  3. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.d.ts.map +1 -1
  4. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.js +15 -1
  5. package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.js.map +1 -1
  6. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.d.ts +27 -0
  7. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
  8. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.js +40 -14
  9. package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.js.map +1 -1
  10. package/dist/UI/Pages/ComposableScreen/elements/CarouselElement.d.ts +27 -0
  11. package/dist/UI/Pages/ComposableScreen/elements/CarouselElement.d.ts.map +1 -1
  12. package/dist/UI/Pages/ComposableScreen/elements/CarouselElement.js +3 -2
  13. package/dist/UI/Pages/ComposableScreen/elements/CarouselElement.js.map +1 -1
  14. package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.d.ts +27 -0
  15. package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
  16. package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.js +3 -1
  17. package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.js.map +1 -1
  18. package/dist/UI/Pages/ComposableScreen/elements/DatePickerElement.d.ts +27 -0
  19. package/dist/UI/Pages/ComposableScreen/elements/DatePickerElement.d.ts.map +1 -1
  20. package/dist/UI/Pages/ComposableScreen/elements/DatePickerElement.js +4 -2
  21. package/dist/UI/Pages/ComposableScreen/elements/DatePickerElement.js.map +1 -1
  22. package/dist/UI/Pages/ComposableScreen/elements/GradientBox.d.ts +11 -0
  23. package/dist/UI/Pages/ComposableScreen/elements/GradientBox.d.ts.map +1 -0
  24. package/dist/UI/Pages/ComposableScreen/elements/GradientBox.js +33 -0
  25. package/dist/UI/Pages/ComposableScreen/elements/GradientBox.js.map +1 -0
  26. package/dist/UI/Pages/ComposableScreen/elements/IconElement.d.ts +27 -0
  27. package/dist/UI/Pages/ComposableScreen/elements/IconElement.d.ts.map +1 -1
  28. package/dist/UI/Pages/ComposableScreen/elements/IconElement.js +3 -3
  29. package/dist/UI/Pages/ComposableScreen/elements/IconElement.js.map +1 -1
  30. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts +27 -0
  31. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts.map +1 -1
  32. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.js +51 -23
  33. package/dist/UI/Pages/ComposableScreen/elements/ImageElement.js.map +1 -1
  34. package/dist/UI/Pages/ComposableScreen/elements/InputElement.d.ts +27 -0
  35. package/dist/UI/Pages/ComposableScreen/elements/InputElement.d.ts.map +1 -1
  36. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.d.ts +27 -0
  37. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.d.ts.map +1 -1
  38. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.js +4 -3
  39. package/dist/UI/Pages/ComposableScreen/elements/LottieElement.js.map +1 -1
  40. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts +27 -0
  41. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
  42. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.js +3 -1
  43. package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.js.map +1 -1
  44. package/dist/UI/Pages/ComposableScreen/elements/RiveElement.d.ts +27 -0
  45. package/dist/UI/Pages/ComposableScreen/elements/RiveElement.d.ts.map +1 -1
  46. package/dist/UI/Pages/ComposableScreen/elements/StackElement.d.ts +28 -1
  47. package/dist/UI/Pages/ComposableScreen/elements/StackElement.d.ts.map +1 -1
  48. package/dist/UI/Pages/ComposableScreen/elements/StackElement.js +3 -3
  49. package/dist/UI/Pages/ComposableScreen/elements/StackElement.js.map +1 -1
  50. package/dist/UI/Pages/ComposableScreen/elements/TextElement.d.ts +28 -1
  51. package/dist/UI/Pages/ComposableScreen/elements/TextElement.d.ts.map +1 -1
  52. package/dist/UI/Pages/ComposableScreen/elements/TextElement.js +48 -21
  53. package/dist/UI/Pages/ComposableScreen/elements/TextElement.js.map +1 -1
  54. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.d.ts +33 -0
  55. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.d.ts.map +1 -1
  56. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.js +7 -5
  57. package/dist/UI/Pages/ComposableScreen/elements/VideoElement.js.map +1 -1
  58. package/dist/UI/Pages/ComposableScreen/elements/ZStackElement.d.ts +77 -0
  59. package/dist/UI/Pages/ComposableScreen/elements/ZStackElement.d.ts.map +1 -0
  60. package/dist/UI/Pages/ComposableScreen/elements/ZStackElement.js +39 -0
  61. package/dist/UI/Pages/ComposableScreen/elements/ZStackElement.js.map +1 -0
  62. package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts +1 -1
  63. package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts.map +1 -1
  64. package/dist/UI/Pages/ComposableScreen/elements/renderElement.js +4 -0
  65. package/dist/UI/Pages/ComposableScreen/elements/renderElement.js.map +1 -1
  66. package/dist/UI/Pages/ComposableScreen/elements/shared.d.ts +1 -1
  67. package/dist/UI/Pages/ComposableScreen/elements/shared.d.ts.map +1 -1
  68. package/dist/UI/Pages/ComposableScreen/types.d.ts +9 -1
  69. package/dist/UI/Pages/ComposableScreen/types.d.ts.map +1 -1
  70. package/dist/UI/Pages/ComposableScreen/types.js +9 -1
  71. package/dist/UI/Pages/ComposableScreen/types.js.map +1 -1
  72. package/package.json +6 -2
  73. package/src/UI/Pages/ComposableScreen/Renderer.tsx +1 -1
  74. package/src/UI/Pages/ComposableScreen/elements/BaseBoxProps.ts +42 -0
  75. package/src/UI/Pages/ComposableScreen/elements/ButtonElement.tsx +56 -12
  76. package/src/UI/Pages/ComposableScreen/elements/CarouselElement.tsx +5 -4
  77. package/src/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.tsx +5 -3
  78. package/src/UI/Pages/ComposableScreen/elements/DatePickerElement.tsx +6 -4
  79. package/src/UI/Pages/ComposableScreen/elements/GradientBox.tsx +56 -0
  80. package/src/UI/Pages/ComposableScreen/elements/IconElement.tsx +5 -4
  81. package/src/UI/Pages/ComposableScreen/elements/ImageElement.tsx +64 -24
  82. package/src/UI/Pages/ComposableScreen/elements/LottieElement.tsx +10 -6
  83. package/src/UI/Pages/ComposableScreen/elements/RadioGroupElement.tsx +5 -3
  84. package/src/UI/Pages/ComposableScreen/elements/StackElement.tsx +6 -5
  85. package/src/UI/Pages/ComposableScreen/elements/TextElement.tsx +57 -21
  86. package/src/UI/Pages/ComposableScreen/elements/VideoElement.tsx +13 -6
  87. package/src/UI/Pages/ComposableScreen/elements/ZStackElement.tsx +60 -0
  88. package/src/UI/Pages/ComposableScreen/elements/renderElement.tsx +6 -1
  89. package/src/UI/Pages/ComposableScreen/elements/shared.ts +1 -1
  90. package/src/UI/Pages/ComposableScreen/types.ts +17 -1
@@ -12,6 +12,7 @@ import { type RadioGroupElementProps } from "./elements/RadioGroupElement";
12
12
  import { type CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
13
13
  import { type DatePickerElementProps } from "./elements/DatePickerElement";
14
14
  import { type CarouselElementProps } from "./elements/CarouselElement";
15
+ import { type ZStackElementProps } from "./elements/ZStackElement";
15
16
  export type { BaseBoxProps } from "./elements/BaseBoxProps";
16
17
  export { BaseBoxPropsSchema } from "./elements/BaseBoxProps";
17
18
  export type { StackElementProps } from "./elements/StackElement";
@@ -27,6 +28,7 @@ export type { RadioGroupElementProps } from "./elements/RadioGroupElement";
27
28
  export type { CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
28
29
  export type { DatePickerElementProps } from "./elements/DatePickerElement";
29
30
  export type { CarouselElementProps } from "./elements/CarouselElement";
31
+ export type { ZStackElementProps } from "./elements/ZStackElement";
30
32
  export type UIElement = {
31
33
  id: string;
32
34
  name?: string;
@@ -94,6 +96,12 @@ export type UIElement = {
94
96
  type: "Carousel";
95
97
  props: CarouselElementProps;
96
98
  children: UIElement[];
99
+ } | {
100
+ id: string;
101
+ name?: string;
102
+ type: "ZStack";
103
+ props: ZStackElementProps;
104
+ children: UIElement[];
97
105
  };
98
106
  export declare const UIElementSchema: z.ZodType<UIElement>;
99
107
  export declare const ComposableScreenStepPayloadSchema: z.ZodObject<{
@@ -109,7 +117,7 @@ export declare const ComposableScreenStepTypeSchema: z.ZodObject<{
109
117
  }, z.core.$strip>;
110
118
  customPayload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
111
119
  continueButtonLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
112
- figmaUrl: z.ZodNullable<z.ZodString>;
120
+ figmaUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
121
  }, z.core.$strip>;
114
122
  export type ComposableScreenStepType = z.infer<typeof ComposableScreenStepTypeSchema>;
115
123
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/UI/Pages/ComposableScreen/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,KAAK,kBAAk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EAAE,SAAS,EAAE,CAAC;CACvB,CAAC;AAEN,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CA0FhD,CAAC;AAEF,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;iBASzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -16,6 +16,7 @@ const RadioGroupElement_1 = require("./elements/RadioGroupElement");
16
16
  const CheckboxGroupElement_1 = require("./elements/CheckboxGroupElement");
17
17
  const DatePickerElement_1 = require("./elements/DatePickerElement");
18
18
  const CarouselElement_1 = require("./elements/CarouselElement");
19
+ const ZStackElement_1 = require("./elements/ZStackElement");
19
20
  var BaseBoxProps_1 = require("./elements/BaseBoxProps");
20
21
  Object.defineProperty(exports, "BaseBoxPropsSchema", { enumerable: true, get: function () { return BaseBoxProps_1.BaseBoxPropsSchema; } });
21
22
  exports.UIElementSchema = zod_1.z.lazy(() => zod_1.z.union([
@@ -99,6 +100,13 @@ exports.UIElementSchema = zod_1.z.lazy(() => zod_1.z.union([
99
100
  props: CarouselElement_1.CarouselElementPropsSchema,
100
101
  children: zod_1.z.array(exports.UIElementSchema),
101
102
  }),
103
+ zod_1.z.object({
104
+ id: zod_1.z.string(),
105
+ name: zod_1.z.string().optional(),
106
+ type: zod_1.z.literal("ZStack"),
107
+ props: ZStackElement_1.ZStackElementPropsSchema,
108
+ children: zod_1.z.array(exports.UIElementSchema),
109
+ }),
102
110
  ]));
103
111
  exports.ComposableScreenStepPayloadSchema = zod_1.z.object({
104
112
  elements: zod_1.z.array(exports.UIElementSchema),
@@ -111,6 +119,6 @@ exports.ComposableScreenStepTypeSchema = zod_1.z.object({
111
119
  payload: exports.ComposableScreenStepPayloadSchema,
112
120
  customPayload: types_1.CustomPayloadSchema,
113
121
  continueButtonLabel: zod_1.z.string().optional().default("Continue"),
114
- figmaUrl: zod_1.z.string().nullable(),
122
+ figmaUrl: zod_1.z.string().nullish(),
115
123
  });
116
124
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/UI/Pages/ComposableScreen/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oCAA+C;AAC/C,0DAA0F;AAC1F,wDAAuF;AACvF,0DAA0F;AAC1F,4DAA6F;AAC7F,wDAAuF;AACvF,wDAAuF;AACvF,0DAA0F;AAC1F,0DAA0F;AAC1F,4DAA6F;AAC7F,oEAAyG;AACzG,0EAAkH;AAClH,oEAAyG;AACzG,gEAAmG;AAGnG,wDAA6D;AAApD,kHAAA,kBAAkB,OAAA;AAmGd,QAAA,eAAe,GAAyB,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/D,OAAC,CAAC,KAAK,CAAC;IACN,OAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACzD,KAAK,EAAE,sCAAuB;QAC9B,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,uBAAe,CAAC;KACnC,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACvB,KAAK,EAAE,oCAAsB;KAC9B,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,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C,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;IAC9D,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;CAC/B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocapine/react-native-onboarding-ui",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "UI components and renderers for Rocapine Onboarding Studio - Built on top of the headless SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -46,12 +46,13 @@
46
46
  "peerDependencies": {
47
47
  "@react-native-community/datetimepicker": "*",
48
48
  "@react-native-picker/picker": "*",
49
- "@rocapine/react-native-onboarding": "^1.11.1",
49
+ "@rocapine/react-native-onboarding": "^1.14.0",
50
50
  "@shopify/react-native-skia": ">=1.0.0",
51
51
  "@tanstack/react-query": ">=5.0.0",
52
52
  "@types/react": "*",
53
53
  "expo-router": ">=3.0.0",
54
54
  "expo-store-review": "*",
55
+ "expo-linear-gradient": "*",
55
56
  "expo-video": "*",
56
57
  "lottie-react-native": "*",
57
58
  "react": "*",
@@ -70,6 +71,9 @@
70
71
  "@shopify/react-native-skia": {
71
72
  "optional": true
72
73
  },
74
+ "expo-linear-gradient": {
75
+ "optional": true
76
+ },
73
77
  "expo-store-review": {
74
78
  "optional": true
75
79
  },
@@ -29,7 +29,7 @@ const ComposableScreenRendererBase = ({ step, onContinue }: ContentProps) => {
29
29
  [setComposableVariable, setHeadlessVariable]
30
30
  );
31
31
 
32
- const renderChildren = (children: UIElement[], parentType: "XStack" | "YStack") =>
32
+ const renderChildren = (children: UIElement[], parentType: "XStack" | "YStack" | "ZStack") =>
33
33
  children.map((child) => renderElement(child, ctx, parentType));
34
34
 
35
35
  const ctx: RenderContext = {
@@ -1,5 +1,45 @@
1
1
  import { z } from "zod";
2
2
 
3
+ export type GradientStop = {
4
+ color: string;
5
+ position?: number;
6
+ };
7
+
8
+ export type GradientEdge =
9
+ | "top"
10
+ | "bottom"
11
+ | "left"
12
+ | "right"
13
+ | "topLeft"
14
+ | "topRight"
15
+ | "bottomLeft"
16
+ | "bottomRight";
17
+
18
+ export type LinearGradientConfig = {
19
+ type: "linear";
20
+ from: GradientEdge;
21
+ to: GradientEdge;
22
+ stops: GradientStop[];
23
+ };
24
+
25
+ export type GradientBackground = LinearGradientConfig;
26
+
27
+ const GradientEdgeSchema = z.enum(["top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"]);
28
+
29
+ const GradientStopSchema = z.object({
30
+ color: z.string(),
31
+ position: z.number().min(0).max(1).optional(),
32
+ });
33
+
34
+ export const GradientBackgroundSchema = z.discriminatedUnion("type", [
35
+ z.object({
36
+ type: z.literal("linear"),
37
+ from: GradientEdgeSchema,
38
+ to: GradientEdgeSchema,
39
+ stops: z.array(GradientStopSchema).min(2, "gradient requires at least 2 stops"),
40
+ }),
41
+ ]);
42
+
3
43
  export type BaseBoxProps = {
4
44
  width?: number | string;
5
45
  height?: number | string;
@@ -13,6 +53,7 @@ export type BaseBoxProps = {
13
53
  alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
14
54
  opacity?: number;
15
55
  backgroundColor?: string;
56
+ backgroundGradient?: GradientBackground;
16
57
  overflow?: "hidden" | "visible" | "scroll";
17
58
  margin?: number;
18
59
  marginHorizontal?: number;
@@ -38,6 +79,7 @@ export const BaseBoxPropsSchema = z.object({
38
79
  alignSelf: z.enum(["auto", "flex-start", "flex-end", "center", "stretch", "baseline"]).optional(),
39
80
  opacity: z.number().min(0).max(1).optional(),
40
81
  backgroundColor: z.string().optional(),
82
+ backgroundGradient: GradientBackgroundSchema.optional(),
41
83
  overflow: z.enum(["hidden", "visible", "scroll"]).optional(),
42
84
  margin: z.number().optional(),
43
85
  marginHorizontal: z.number().optional(),
@@ -4,6 +4,7 @@ import { Text, TouchableOpacity } from "react-native";
4
4
  import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
5
5
  import { UIElement } from "../types";
6
6
  import { RenderContext, dim } from "./shared";
7
+ import { GradientBox } from "./GradientBox";
7
8
 
8
9
  export type ButtonElementProps = BaseBoxProps & {
9
10
  label: string;
@@ -55,13 +56,66 @@ export const ButtonElementComponent = ({ element, ctx }: Props): React.ReactElem
55
56
  ? (element.props.color ?? theme.colors.text.opposite)
56
57
  : (element.props.color ?? theme.colors.primary);
57
58
 
59
+ const hasGradient = isFilled && !!element.props.backgroundGradient;
60
+ const borderRadius = element.props.borderRadius ?? 90;
61
+
62
+ const labelNode = (
63
+ <Text
64
+ style={{
65
+ color: textColor,
66
+ fontSize: element.props.fontSize ?? theme.typography.textStyles.button.fontSize,
67
+ fontWeight: (element.props.fontWeight as any) ?? theme.typography.textStyles.button.fontWeight,
68
+ fontFamily: element.props.fontFamily,
69
+ textAlign: element.props.textAlign ?? "center",
70
+ }}
71
+ >
72
+ {element.props.label}
73
+ </Text>
74
+ );
75
+
76
+ if (hasGradient) {
77
+ return (
78
+ <GradientBox
79
+ gradient={element.props.backgroundGradient}
80
+ style={{
81
+ borderRadius,
82
+ borderWidth: isOutlined ? (element.props.borderWidth ?? 1) : (element.props.borderWidth ?? 0),
83
+ borderColor: isOutlined ? (element.props.borderColor ?? theme.colors.primary) : element.props.borderColor,
84
+ width: dim(element.props.width),
85
+ height: dim(element.props.height),
86
+ margin: element.props.margin,
87
+ marginHorizontal: element.props.marginHorizontal,
88
+ marginVertical: element.props.marginVertical,
89
+ opacity: element.props.opacity,
90
+ alignSelf: element.props.alignSelf ?? (element.props.width ? undefined : "stretch"),
91
+ overflow: "hidden",
92
+ }}
93
+ >
94
+ <TouchableOpacity
95
+ activeOpacity={0.8}
96
+ onPress={handlePress}
97
+ style={{
98
+ flex: 1,
99
+ padding: element.props.padding,
100
+ paddingVertical: element.props.paddingVertical ?? 14,
101
+ paddingHorizontal: element.props.paddingHorizontal ?? 24,
102
+ alignItems: "center",
103
+ justifyContent: "center",
104
+ }}
105
+ >
106
+ {labelNode}
107
+ </TouchableOpacity>
108
+ </GradientBox>
109
+ );
110
+ }
111
+
58
112
  return (
59
113
  <TouchableOpacity
60
114
  activeOpacity={0.8}
61
115
  onPress={handlePress}
62
116
  style={{
63
117
  backgroundColor: bgColor,
64
- borderRadius: element.props.borderRadius ?? 90,
118
+ borderRadius,
65
119
  borderWidth: isOutlined ? (element.props.borderWidth ?? 1) : (element.props.borderWidth ?? 0),
66
120
  borderColor: isOutlined ? (element.props.borderColor ?? theme.colors.primary) : element.props.borderColor,
67
121
  padding: element.props.padding,
@@ -78,17 +132,7 @@ export const ButtonElementComponent = ({ element, ctx }: Props): React.ReactElem
78
132
  justifyContent: "center",
79
133
  }}
80
134
  >
81
- <Text
82
- style={{
83
- color: textColor,
84
- fontSize: element.props.fontSize ?? theme.typography.textStyles.button.fontSize,
85
- fontWeight: (element.props.fontWeight as any) ?? theme.typography.textStyles.button.fontWeight,
86
- fontFamily: element.props.fontFamily,
87
- textAlign: element.props.textAlign ?? "center",
88
- }}
89
- >
90
- {element.props.label}
91
- </Text>
135
+ {labelNode}
92
136
  </TouchableOpacity>
93
137
  );
94
138
  };
@@ -1,11 +1,12 @@
1
1
  import React, { useRef } from "react";
2
- import { useWindowDimensions, View } from "react-native";
2
+ import { useWindowDimensions } from "react-native";
3
3
  import { z } from "zod";
4
4
  import { useSharedValue } from "react-native-reanimated";
5
5
  import Carousel, { Pagination, ICarouselInstance } from "react-native-reanimated-carousel";
6
6
  import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
7
7
  import type { UIElement } from "../types";
8
8
  import { dim, type RenderContext } from "./shared";
9
+ import { GradientBox } from "./GradientBox";
9
10
 
10
11
  export type CarouselElementProps = BaseBoxProps & {
11
12
  carouselType?: "left-align" | "normal" | "parallax" | "stack";
@@ -79,7 +80,7 @@ export function CarouselElementComponent({ element, ctx }: Props): React.ReactEl
79
80
  borderRadius: props.borderRadius,
80
81
  borderWidth: props.borderWidth,
81
82
  borderColor: props.borderColor,
82
- backgroundColor: props.backgroundColor,
83
+ backgroundColor: props.backgroundGradient ? undefined : props.backgroundColor,
83
84
  opacity: props.opacity,
84
85
  // Left-align shows the next slide peeking — must not clip
85
86
  overflow: carouselType === "left-align" ? ("visible" as const) : (props.overflow ?? ("hidden" as const)),
@@ -108,7 +109,7 @@ export function CarouselElementComponent({ element, ctx }: Props): React.ReactEl
108
109
  console.log(props.autoPlay, props.autoPlayInterval);
109
110
  console.log(element);
110
111
  return (
111
- <View style={containerStyle}>
112
+ <GradientBox gradient={props.backgroundGradient} style={containerStyle as any}>
112
113
  <Carousel
113
114
  ref={ref}
114
115
  loop={props.loop}
@@ -147,6 +148,6 @@ export function CarouselElementComponent({ element, ctx }: Props): React.ReactEl
147
148
  }}
148
149
  />
149
150
  )}
150
- </View>
151
+ </GradientBox>
151
152
  );
152
153
  }
@@ -4,6 +4,7 @@ import { View, Text, TouchableOpacity } from "react-native";
4
4
  import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
5
5
  import type { UIElement } from "../types";
6
6
  import { dim, type RenderContext } from "./shared";
7
+ import { GradientBox } from "./GradientBox";
7
8
 
8
9
  export type CheckboxGroupElementProps = BaseBoxProps & {
9
10
  variableName?: string;
@@ -102,8 +103,8 @@ export const CheckboxGroupComponent = ({ element, ctx }: Props): React.ReactElem
102
103
  const isHorizontal = element.props.direction === "horizontal";
103
104
 
104
105
  return (
105
- <View
106
- accessibilityRole="list"
106
+ <GradientBox
107
+ gradient={element.props.backgroundGradient}
107
108
  style={{
108
109
  flexDirection: isHorizontal ? "row" : "column",
109
110
  flexWrap: isHorizontal ? "wrap" : undefined,
@@ -120,6 +121,7 @@ export const CheckboxGroupComponent = ({ element, ctx }: Props): React.ReactElem
120
121
  borderWidth: element.props.borderWidth,
121
122
  borderRadius: element.props.borderRadius,
122
123
  borderColor: element.props.borderColor,
124
+ backgroundColor: element.props.backgroundGradient ? undefined : element.props.backgroundColor,
123
125
  opacity: element.props.opacity,
124
126
  }}
125
127
  >
@@ -195,6 +197,6 @@ export const CheckboxGroupComponent = ({ element, ctx }: Props): React.ReactElem
195
197
  </TouchableOpacity>
196
198
  );
197
199
  })}
198
- </View>
200
+ </GradientBox>
199
201
  );
200
202
  };
@@ -5,6 +5,7 @@ import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
5
5
  import { z } from "zod";
6
6
  import type { UIElement } from "../types";
7
7
  import { dim, type RenderContext } from "./shared";
8
+ import { GradientBox } from "./GradientBox";
8
9
 
9
10
  export type DatePickerElementProps = BaseBoxProps & {
10
11
  variableName?: string;
@@ -105,6 +106,7 @@ export const DatePickerElementComponent = ({ element, ctx }: Props): React.React
105
106
  borderWidth: props.borderWidth,
106
107
  borderRadius: props.borderRadius,
107
108
  borderColor: props.borderColor,
109
+ backgroundColor: props.backgroundGradient ? undefined : props.backgroundColor,
108
110
  overflow: "hidden" as const,
109
111
  };
110
112
 
@@ -122,7 +124,7 @@ export const DatePickerElementComponent = ({ element, ctx }: Props): React.React
122
124
 
123
125
  if (Platform.OS === "android") {
124
126
  return (
125
- <View style={containerStyle}>
127
+ <GradientBox gradient={props.backgroundGradient} style={containerStyle as any}>
126
128
  <Pressable
127
129
  onPress={() => setPickerVisible(true)}
128
130
  style={{
@@ -157,16 +159,16 @@ export const DatePickerElementComponent = ({ element, ctx }: Props): React.React
157
159
  }}
158
160
  />
159
161
  )}
160
- </View>
162
+ </GradientBox>
161
163
  );
162
164
  }
163
165
 
164
166
  return (
165
- <View style={containerStyle}>
167
+ <GradientBox gradient={props.backgroundGradient} style={containerStyle as any}>
166
168
  <DateTimePicker
167
169
  {...pickerProps}
168
170
  display={(props.display ?? "spinner") as any}
169
171
  />
170
- </View>
172
+ </GradientBox>
171
173
  );
172
174
  };
@@ -0,0 +1,56 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import type { ViewStyle } from "react-native";
4
+ import type { GradientBackground } from "./BaseBoxProps";
5
+
6
+ let LinearGradient: React.ComponentType<{
7
+ colors: readonly [string, string, ...string[]];
8
+ start?: { x: number; y: number };
9
+ end?: { x: number; y: number };
10
+ locations?: number[];
11
+ style?: object;
12
+ children?: React.ReactNode;
13
+ }> | null = null;
14
+
15
+ try {
16
+ LinearGradient = require("expo-linear-gradient").LinearGradient;
17
+ } catch {
18
+ // expo-linear-gradient not installed
19
+ }
20
+
21
+ const EDGE_POINT: Record<string, { x: number; y: number }> = {
22
+ top: { x: 0.5, y: 0 },
23
+ bottom: { x: 0.5, y: 1 },
24
+ left: { x: 0, y: 0.5 },
25
+ right: { x: 1, y: 0.5 },
26
+ topLeft: { x: 0, y: 0 },
27
+ topRight: { x: 1, y: 0 },
28
+ bottomLeft: { x: 0, y: 1 },
29
+ bottomRight: { x: 1, y: 1 },
30
+ };
31
+
32
+ type Props = {
33
+ gradient?: GradientBackground;
34
+ style?: ViewStyle;
35
+ children?: React.ReactNode;
36
+ };
37
+
38
+ export const GradientBox = ({ gradient, style, children }: Props): React.ReactElement => {
39
+ if (gradient?.type === "linear" && LinearGradient) {
40
+ const colors = gradient.stops.map((s) => s.color) as [string, string, ...string[]];
41
+ const allHavePositions = gradient.stops.every((s) => s.position !== undefined);
42
+ const locations = allHavePositions ? (gradient.stops.map((s) => s.position!) as number[]) : undefined;
43
+ return (
44
+ <LinearGradient
45
+ colors={colors}
46
+ start={EDGE_POINT[gradient.from]}
47
+ end={EDGE_POINT[gradient.to]}
48
+ locations={locations}
49
+ style={style}
50
+ >
51
+ {children}
52
+ </LinearGradient>
53
+ );
54
+ }
55
+ return <View style={style}>{children}</View>;
56
+ };
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  import { z } from "zod";
3
- import { View } from "react-native";
4
3
  import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
5
4
  import { UIElement } from "../types";
6
5
  import { RenderContext, dim } from "./shared";
6
+ import { GradientBox } from "./GradientBox";
7
7
 
8
8
  export type IconElementProps = BaseBoxProps & {
9
9
  name: string;
@@ -38,7 +38,8 @@ export const IconElementComponent = ({ element, ctx }: Props): React.ReactElemen
38
38
  }> | undefined;
39
39
 
40
40
  return (
41
- <View
41
+ <GradientBox
42
+ gradient={element.props.backgroundGradient}
42
43
  style={{
43
44
  flex: element.props.flex,
44
45
  flexShrink: element.props.flexShrink,
@@ -60,7 +61,7 @@ export const IconElementComponent = ({ element, ctx }: Props): React.ReactElemen
60
61
  borderWidth: element.props.borderWidth,
61
62
  borderRadius: element.props.borderRadius,
62
63
  borderColor: element.props.borderColor,
63
- backgroundColor: element.props.backgroundColor,
64
+ backgroundColor: element.props.backgroundGradient ? undefined : element.props.backgroundColor,
64
65
  opacity: element.props.opacity,
65
66
  }}
66
67
  >
@@ -71,6 +72,6 @@ export const IconElementComponent = ({ element, ctx }: Props): React.ReactElemen
71
72
  strokeWidth={element.props.strokeWidth ?? 2}
72
73
  />
73
74
  ) : null}
74
- </View>
75
+ </GradientBox>
75
76
  );
76
77
  };
@@ -4,6 +4,7 @@ import { Image } from "react-native";
4
4
  import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
5
5
  import { UIElement } from "../types";
6
6
  import { RenderContext, dim } from "./shared";
7
+ import { GradientBox } from "./GradientBox";
7
8
 
8
9
  export type ImageElementProps = BaseBoxProps & {
9
10
  url: string;
@@ -27,33 +28,72 @@ type Props = {
27
28
  export const ImageElementComponent = ({ element }: Props): React.ReactElement => {
28
29
  const hasExplicitHeight = element.props.height !== undefined;
29
30
 
31
+ const p = element.props;
32
+
33
+ if (p.backgroundGradient) {
34
+ return (
35
+ <GradientBox
36
+ gradient={p.backgroundGradient}
37
+ style={{
38
+ flex: p.flex,
39
+ flexShrink: p.flexShrink,
40
+ flexGrow: p.flexGrow,
41
+ alignSelf: p.alignSelf,
42
+ width: dim(p.width),
43
+ height: dim(p.height),
44
+ minWidth: p.minWidth,
45
+ maxWidth: p.maxWidth,
46
+ minHeight: p.minHeight,
47
+ maxHeight: p.maxHeight,
48
+ overflow: (p.overflow ?? "hidden") as any,
49
+ borderRadius: p.borderRadius,
50
+ borderWidth: p.borderWidth,
51
+ borderColor: p.borderColor,
52
+ opacity: p.opacity,
53
+ margin: p.margin,
54
+ marginHorizontal: p.marginHorizontal,
55
+ marginVertical: p.marginVertical,
56
+ padding: p.padding,
57
+ paddingHorizontal: p.paddingHorizontal,
58
+ paddingVertical: p.paddingVertical,
59
+ }}
60
+ >
61
+ <Image
62
+ source={{ uri: p.url }}
63
+ resizeMode={p.resizeMode}
64
+ style={{ width: "100%", height: "100%" }}
65
+ />
66
+ </GradientBox>
67
+ );
68
+ }
69
+
30
70
  return (
31
71
  <Image
32
- source={{ uri: element.props.url }}
33
- resizeMode={element.props.resizeMode}
72
+ source={{ uri: p.url }}
73
+ resizeMode={p.resizeMode}
34
74
  style={({
35
- flex: element.props.flex,
36
- flexShrink: element.props.flexShrink,
37
- flexGrow: element.props.flexGrow,
38
- alignSelf: element.props.alignSelf,
39
- width: dim(element.props.width),
40
- height: dim(element.props.height),
41
- minWidth: element.props.minWidth,
42
- maxWidth: element.props.maxWidth,
43
- minHeight: element.props.minHeight,
44
- maxHeight: element.props.maxHeight,
45
- backgroundColor: element.props.backgroundColor,
46
- overflow: element.props.overflow,
47
- borderRadius: element.props.borderRadius,
48
- borderWidth: element.props.borderWidth,
49
- borderColor: element.props.borderColor,
50
- opacity: element.props.opacity,
51
- margin: element.props.margin,
52
- marginHorizontal: element.props.marginHorizontal,
53
- marginVertical: element.props.marginVertical,
54
- padding: element.props.padding,
55
- paddingHorizontal: element.props.paddingHorizontal,
56
- paddingVertical: element.props.paddingVertical,
75
+ flex: p.flex,
76
+ flexShrink: p.flexShrink,
77
+ flexGrow: p.flexGrow,
78
+ alignSelf: p.alignSelf,
79
+ width: dim(p.width),
80
+ height: dim(p.height),
81
+ minWidth: p.minWidth,
82
+ maxWidth: p.maxWidth,
83
+ minHeight: p.minHeight,
84
+ maxHeight: p.maxHeight,
85
+ backgroundColor: p.backgroundColor,
86
+ overflow: p.overflow,
87
+ borderRadius: p.borderRadius,
88
+ borderWidth: p.borderWidth,
89
+ borderColor: p.borderColor,
90
+ opacity: p.opacity,
91
+ margin: p.margin,
92
+ marginHorizontal: p.marginHorizontal,
93
+ marginVertical: p.marginVertical,
94
+ padding: p.padding,
95
+ paddingHorizontal: p.paddingHorizontal,
96
+ paddingVertical: p.paddingVertical,
57
97
  }) as any}
58
98
  />
59
99
  );