@rocapine/react-native-onboarding 1.10.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/onboarding-example.d.ts +109 -15
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +44 -1
- package/dist/onboarding-example.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts +28 -6
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js +11 -2
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts +22 -10
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.js +0 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts +67 -0
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts.map +1 -0
- package/dist/steps/ComposableScreen/elements/CarouselElement.js +19 -0
- package/dist/steps/ComposableScreen/elements/CarouselElement.js.map +1 -0
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts +17 -4
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts +17 -4
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts +16 -4
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts +17 -4
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts +22 -4
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/InputElement.js +3 -0
- package/dist/steps/ComposableScreen/elements/InputElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts +17 -4
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts +17 -4
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts +19 -6
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RiveElement.js +1 -1
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts +31 -50
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/StackElement.js +2 -22
- package/dist/steps/ComposableScreen/elements/StackElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts +35 -23
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/TextElement.js +2 -12
- package/dist/steps/ComposableScreen/elements/TextElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts +17 -4
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/types.d.ts +8 -0
- package/dist/steps/ComposableScreen/types.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/types.js +8 -0
- package/dist/steps/ComposableScreen/types.js.map +1 -1
- package/package.json +1 -1
- package/src/onboarding-example.ts +44 -1
- package/src/steps/ComposableScreen/elements/BaseBoxProps.ts +22 -4
- package/src/steps/ComposableScreen/elements/ButtonElement.ts +0 -2
- package/src/steps/ComposableScreen/elements/CarouselElement.ts +30 -0
- package/src/steps/ComposableScreen/elements/InputElement.ts +6 -0
- package/src/steps/ComposableScreen/elements/RiveElement.ts +2 -2
- package/src/steps/ComposableScreen/elements/StackElement.ts +3 -44
- package/src/steps/ComposableScreen/elements/TextElement.ts +3 -24
- package/src/steps/ComposableScreen/types.ts +16 -0
|
@@ -2,31 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StackElementPropsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
const BaseBoxProps_1 = require("./BaseBoxProps");
|
|
6
|
+
exports.StackElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
|
|
6
7
|
gap: zod_1.z.number().optional(),
|
|
7
|
-
padding: zod_1.z.number().optional(),
|
|
8
|
-
paddingHorizontal: zod_1.z.number().optional(),
|
|
9
|
-
paddingVertical: zod_1.z.number().optional(),
|
|
10
|
-
margin: zod_1.z.number().optional(),
|
|
11
|
-
marginHorizontal: zod_1.z.number().optional(),
|
|
12
|
-
marginVertical: zod_1.z.number().optional(),
|
|
13
|
-
flex: zod_1.z.number().optional(),
|
|
14
|
-
width: zod_1.z.number().optional(),
|
|
15
|
-
height: zod_1.z.number().optional(),
|
|
16
|
-
minWidth: zod_1.z.number().optional(),
|
|
17
|
-
maxWidth: zod_1.z.number().optional(),
|
|
18
|
-
minHeight: zod_1.z.number().optional(),
|
|
19
|
-
maxHeight: zod_1.z.number().optional(),
|
|
20
8
|
alignItems: zod_1.z.enum(["flex-start", "center", "flex-end", "stretch"]).optional(),
|
|
21
|
-
alignSelf: zod_1.z.enum(["auto", "flex-start", "flex-end", "center", "stretch", "baseline"]).optional(),
|
|
22
9
|
justifyContent: zod_1.z.enum(["flex-start", "center", "flex-end", "space-between", "space-around"]).optional(),
|
|
23
|
-
backgroundColor: zod_1.z.string().optional(),
|
|
24
10
|
flexWrap: zod_1.z.enum(["wrap", "nowrap"]).optional(),
|
|
25
|
-
flexShrink: zod_1.z.number().optional(),
|
|
26
|
-
borderWidth: zod_1.z.number().optional(),
|
|
27
|
-
borderRadius: zod_1.z.number().optional(),
|
|
28
|
-
borderColor: zod_1.z.string().optional(),
|
|
29
|
-
overflow: zod_1.z.enum(["hidden", "visible", "scroll"]).optional(),
|
|
30
|
-
opacity: zod_1.z.number().min(0).max(1).optional(),
|
|
31
11
|
});
|
|
32
12
|
//# sourceMappingURL=StackElement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackElement.js","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/StackElement.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"StackElement.js","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/StackElement.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAkE;AASrD,QAAA,uBAAuB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC/D,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,UAAU,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC9E,cAAc,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,EAAE;IACxG,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
import { BaseBoxProps } from "./BaseBoxProps";
|
|
3
|
+
export type TextElementProps = BaseBoxProps & {
|
|
3
4
|
content: string;
|
|
4
5
|
mode?: "plain" | "expression";
|
|
5
6
|
fontSize?: number;
|
|
@@ -9,19 +10,41 @@ export type TextElementProps = {
|
|
|
9
10
|
textAlign?: "left" | "center" | "right";
|
|
10
11
|
letterSpacing?: number;
|
|
11
12
|
lineHeight?: number;
|
|
12
|
-
backgroundColor?: string;
|
|
13
|
-
padding?: number;
|
|
14
|
-
paddingHorizontal?: number;
|
|
15
|
-
paddingVertical?: number;
|
|
16
|
-
margin?: number;
|
|
17
|
-
marginHorizontal?: number;
|
|
18
|
-
marginVertical?: number;
|
|
19
|
-
borderWidth?: number;
|
|
20
|
-
borderRadius?: number;
|
|
21
|
-
borderColor?: string;
|
|
22
|
-
opacity?: number;
|
|
23
13
|
};
|
|
24
14
|
export declare const TextElementPropsSchema: z.ZodObject<{
|
|
15
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
16
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
17
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
flexShrink: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
flexGrow: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
alignSelf: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
auto: "auto";
|
|
26
|
+
"flex-start": "flex-start";
|
|
27
|
+
"flex-end": "flex-end";
|
|
28
|
+
center: "center";
|
|
29
|
+
stretch: "stretch";
|
|
30
|
+
baseline: "baseline";
|
|
31
|
+
}>>;
|
|
32
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
34
|
+
overflow: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
hidden: "hidden";
|
|
36
|
+
visible: "visible";
|
|
37
|
+
scroll: "scroll";
|
|
38
|
+
}>>;
|
|
39
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
paddingHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
paddingVertical: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
borderWidth: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
25
48
|
content: z.ZodString;
|
|
26
49
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
27
50
|
plain: "plain";
|
|
@@ -38,16 +61,5 @@ export declare const TextElementPropsSchema: z.ZodObject<{
|
|
|
38
61
|
}>>;
|
|
39
62
|
letterSpacing: z.ZodOptional<z.ZodNumber>;
|
|
40
63
|
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
41
|
-
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
42
|
-
padding: z.ZodOptional<z.ZodNumber>;
|
|
43
|
-
paddingHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
44
|
-
paddingVertical: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
margin: z.ZodOptional<z.ZodNumber>;
|
|
46
|
-
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
47
|
-
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
48
|
-
borderWidth: z.ZodOptional<z.ZodNumber>;
|
|
49
|
-
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
borderColor: z.ZodOptional<z.ZodString>;
|
|
51
|
-
opacity: z.ZodOptional<z.ZodNumber>;
|
|
52
64
|
}, z.core.$strip>;
|
|
53
65
|
//# sourceMappingURL=TextElement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/TextElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/TextElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUjC,CAAC"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TextElementPropsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
const BaseBoxProps_1 = require("./BaseBoxProps");
|
|
6
|
+
exports.TextElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
|
|
6
7
|
content: zod_1.z.string(),
|
|
7
8
|
mode: zod_1.z.enum(["plain", "expression"]).optional(),
|
|
8
9
|
fontSize: zod_1.z.number().optional(),
|
|
@@ -12,16 +13,5 @@ exports.TextElementPropsSchema = zod_1.z.object({
|
|
|
12
13
|
textAlign: zod_1.z.enum(["left", "center", "right"]).optional(),
|
|
13
14
|
letterSpacing: zod_1.z.number().optional(),
|
|
14
15
|
lineHeight: zod_1.z.number().optional(),
|
|
15
|
-
backgroundColor: zod_1.z.string().optional(),
|
|
16
|
-
padding: zod_1.z.number().optional(),
|
|
17
|
-
paddingHorizontal: zod_1.z.number().optional(),
|
|
18
|
-
paddingVertical: zod_1.z.number().optional(),
|
|
19
|
-
margin: zod_1.z.number().optional(),
|
|
20
|
-
marginHorizontal: zod_1.z.number().optional(),
|
|
21
|
-
marginVertical: zod_1.z.number().optional(),
|
|
22
|
-
borderWidth: zod_1.z.number().optional(),
|
|
23
|
-
borderRadius: zod_1.z.number().optional(),
|
|
24
|
-
borderColor: zod_1.z.string().optional(),
|
|
25
|
-
opacity: zod_1.z.number().min(0).max(1).optional(),
|
|
26
16
|
});
|
|
27
17
|
//# sourceMappingURL=TextElement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextElement.js","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/TextElement.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"TextElement.js","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/TextElement.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAkE;AAcrD,QAAA,sBAAsB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC9D,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,SAAS,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzD,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC"}
|
|
@@ -8,17 +8,30 @@ export type VideoElementProps = BaseBoxProps & {
|
|
|
8
8
|
controls?: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare const VideoElementPropsSchema: z.ZodObject<{
|
|
11
|
-
width: z.ZodOptional<z.ZodNumber
|
|
12
|
-
height: z.ZodOptional<z.ZodNumber
|
|
11
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
12
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
13
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
flexShrink: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
flexGrow: z.ZodOptional<z.ZodNumber>;
|
|
13
20
|
alignSelf: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
auto: "auto";
|
|
14
22
|
"flex-start": "flex-start";
|
|
15
|
-
center: "center";
|
|
16
23
|
"flex-end": "flex-end";
|
|
24
|
+
center: "center";
|
|
17
25
|
stretch: "stretch";
|
|
18
|
-
auto: "auto";
|
|
19
26
|
baseline: "baseline";
|
|
20
27
|
}>>;
|
|
21
28
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
30
|
+
overflow: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
hidden: "hidden";
|
|
32
|
+
visible: "visible";
|
|
33
|
+
scroll: "scroll";
|
|
34
|
+
}>>;
|
|
22
35
|
margin: z.ZodOptional<z.ZodNumber>;
|
|
23
36
|
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
24
37
|
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/VideoElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"VideoElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/VideoElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMlC,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { type ButtonElementProps } from "./elements/ButtonElement";
|
|
|
11
11
|
import { type RadioGroupElementProps } from "./elements/RadioGroupElement";
|
|
12
12
|
import { type CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
|
|
13
13
|
import { type DatePickerElementProps } from "./elements/DatePickerElement";
|
|
14
|
+
import { type CarouselElementProps } from "./elements/CarouselElement";
|
|
14
15
|
export type { BaseBoxProps } from "./elements/BaseBoxProps";
|
|
15
16
|
export { BaseBoxPropsSchema } from "./elements/BaseBoxProps";
|
|
16
17
|
export type { StackElementProps } from "./elements/StackElement";
|
|
@@ -25,6 +26,7 @@ export type { ButtonElementProps } from "./elements/ButtonElement";
|
|
|
25
26
|
export type { RadioGroupElementProps } from "./elements/RadioGroupElement";
|
|
26
27
|
export type { CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
|
|
27
28
|
export type { DatePickerElementProps } from "./elements/DatePickerElement";
|
|
29
|
+
export type { CarouselElementProps } from "./elements/CarouselElement";
|
|
28
30
|
type UIElement = {
|
|
29
31
|
id: string;
|
|
30
32
|
name?: string;
|
|
@@ -86,6 +88,12 @@ type UIElement = {
|
|
|
86
88
|
name?: string;
|
|
87
89
|
type: "DatePicker";
|
|
88
90
|
props: DatePickerElementProps;
|
|
91
|
+
} | {
|
|
92
|
+
id: string;
|
|
93
|
+
name?: string;
|
|
94
|
+
type: "Carousel";
|
|
95
|
+
props: CarouselElementProps;
|
|
96
|
+
children: UIElement[];
|
|
89
97
|
};
|
|
90
98
|
export declare const ComposableScreenStepPayloadSchema: z.ZodObject<{
|
|
91
99
|
elements: z.ZodArray<z.ZodType<UIElement, unknown, z.core.$ZodTypeInternals<UIElement, unknown>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/steps/ComposableScreen/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;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AE,QAAQ,CAAC;IACf,KAAK,EAAE,kBAAkB,CAAC;CAC3B,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,sBAAsB,CAAC;CAC/B,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,yBAAyB,CAAC;CAClC,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,sBAAsB,CAAC;CAC/B,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAAC;AAuFN,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;iBASzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -15,6 +15,7 @@ const ButtonElement_1 = require("./elements/ButtonElement");
|
|
|
15
15
|
const RadioGroupElement_1 = require("./elements/RadioGroupElement");
|
|
16
16
|
const CheckboxGroupElement_1 = require("./elements/CheckboxGroupElement");
|
|
17
17
|
const DatePickerElement_1 = require("./elements/DatePickerElement");
|
|
18
|
+
const CarouselElement_1 = require("./elements/CarouselElement");
|
|
18
19
|
var BaseBoxProps_1 = require("./elements/BaseBoxProps");
|
|
19
20
|
Object.defineProperty(exports, "BaseBoxPropsSchema", { enumerable: true, get: function () { return BaseBoxProps_1.BaseBoxPropsSchema; } });
|
|
20
21
|
const UIElementSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
@@ -91,6 +92,13 @@ const UIElementSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
|
91
92
|
type: zod_1.z.literal("DatePicker"),
|
|
92
93
|
props: DatePickerElement_1.DatePickerElementPropsSchema,
|
|
93
94
|
}),
|
|
95
|
+
zod_1.z.object({
|
|
96
|
+
id: zod_1.z.string(),
|
|
97
|
+
name: zod_1.z.string().optional(),
|
|
98
|
+
type: zod_1.z.literal("Carousel"),
|
|
99
|
+
props: CarouselElement_1.CarouselElementPropsSchema,
|
|
100
|
+
children: zod_1.z.array(UIElementSchema),
|
|
101
|
+
}),
|
|
94
102
|
]));
|
|
95
103
|
exports.ComposableScreenStepPayloadSchema = zod_1.z.object({
|
|
96
104
|
elements: zod_1.z.array(UIElementSchema),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/ComposableScreen/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAsD;AACtD,0DAA0F;AAC1F,wDAAuF;AACvF,0DAA0F;AAC1F,4DAA6F;AAC7F,wDAAuF;AACvF,wDAAuF;AACvF,0DAA0F;AAC1F,0DAA0F;AAC1F,4DAA6F;AAC7F,oEAAyG;AACzG,0EAAkH;AAClH,oEAAyG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/ComposableScreen/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAsD;AACtD,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;AAmG3B,MAAM,eAAe,GAAyB,OAAC,CAAC,IAAI,CAAC,GAAG,E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,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocapine/react-native-onboarding",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "Headless React Native SDK for Rocapine Onboarding Studio - Data fetching, state management, and hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -116,7 +116,7 @@ export const onboardingExample = {
|
|
|
116
116
|
props: {
|
|
117
117
|
url: "https://cdn.rive.app/animations/vehicles.riv",
|
|
118
118
|
height: 180,
|
|
119
|
-
|
|
119
|
+
autoPlay: true,
|
|
120
120
|
fit: "Contain",
|
|
121
121
|
},
|
|
122
122
|
},
|
|
@@ -277,6 +277,49 @@ export const onboardingExample = {
|
|
|
277
277
|
marginVertical: 4,
|
|
278
278
|
},
|
|
279
279
|
},
|
|
280
|
+
{
|
|
281
|
+
id: "hero-carousel",
|
|
282
|
+
type: "Carousel",
|
|
283
|
+
props: {
|
|
284
|
+
carouselType: "parallax",
|
|
285
|
+
autoPlay: true,
|
|
286
|
+
autoPlayInterval: 3000,
|
|
287
|
+
loop: true,
|
|
288
|
+
showDots: true,
|
|
289
|
+
height: 220,
|
|
290
|
+
borderRadius: 16,
|
|
291
|
+
marginVertical: 8,
|
|
292
|
+
},
|
|
293
|
+
children: [
|
|
294
|
+
{
|
|
295
|
+
id: "carousel-slide-1",
|
|
296
|
+
type: "Image",
|
|
297
|
+
props: {
|
|
298
|
+
url: "https://picsum.photos/400/220?random=10",
|
|
299
|
+
height: 220,
|
|
300
|
+
resizeMode: "cover",
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: "carousel-slide-2",
|
|
305
|
+
type: "Image",
|
|
306
|
+
props: {
|
|
307
|
+
url: "https://picsum.photos/400/220?random=11",
|
|
308
|
+
height: 220,
|
|
309
|
+
resizeMode: "cover",
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: "carousel-slide-3",
|
|
314
|
+
type: "Image",
|
|
315
|
+
props: {
|
|
316
|
+
url: "https://picsum.photos/400/220?random=12",
|
|
317
|
+
height: 220,
|
|
318
|
+
resizeMode: "cover",
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
],
|
|
322
|
+
},
|
|
280
323
|
{
|
|
281
324
|
id: "hero-button",
|
|
282
325
|
type: "Button",
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
export type BaseBoxProps = {
|
|
4
|
-
width?: number;
|
|
5
|
-
height?: number;
|
|
4
|
+
width?: number | string;
|
|
5
|
+
height?: number | string;
|
|
6
|
+
minWidth?: number;
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
minHeight?: number;
|
|
9
|
+
maxHeight?: number;
|
|
10
|
+
flex?: number;
|
|
11
|
+
flexShrink?: number;
|
|
12
|
+
flexGrow?: number;
|
|
6
13
|
alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
7
14
|
opacity?: number;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
overflow?: "hidden" | "visible" | "scroll";
|
|
8
17
|
margin?: number;
|
|
9
18
|
marginHorizontal?: number;
|
|
10
19
|
marginVertical?: number;
|
|
@@ -17,10 +26,19 @@ export type BaseBoxProps = {
|
|
|
17
26
|
};
|
|
18
27
|
|
|
19
28
|
export const BaseBoxPropsSchema = z.object({
|
|
20
|
-
width: z.number().min(0).optional(),
|
|
21
|
-
height: z.number().min(0).optional(),
|
|
29
|
+
width: z.union([z.number().min(0), z.string()]).optional(),
|
|
30
|
+
height: z.union([z.number().min(0), z.string()]).optional(),
|
|
31
|
+
minWidth: z.number().min(0).optional(),
|
|
32
|
+
maxWidth: z.number().min(0).optional(),
|
|
33
|
+
minHeight: z.number().min(0).optional(),
|
|
34
|
+
maxHeight: z.number().min(0).optional(),
|
|
35
|
+
flex: z.number().min(0).optional(),
|
|
36
|
+
flexShrink: z.number().min(0).optional(),
|
|
37
|
+
flexGrow: z.number().min(0).optional(),
|
|
22
38
|
alignSelf: z.enum(["auto", "flex-start", "flex-end", "center", "stretch", "baseline"]).optional(),
|
|
23
39
|
opacity: z.number().min(0).max(1).optional(),
|
|
40
|
+
backgroundColor: z.string().optional(),
|
|
41
|
+
overflow: z.enum(["hidden", "visible", "scroll"]).optional(),
|
|
24
42
|
margin: z.number().optional(),
|
|
25
43
|
marginHorizontal: z.number().optional(),
|
|
26
44
|
marginVertical: z.number().optional(),
|
|
@@ -11,7 +11,6 @@ export type ButtonElementProps = BaseBoxProps & {
|
|
|
11
11
|
fontWeight?: string;
|
|
12
12
|
fontFamily?: string;
|
|
13
13
|
textAlign?: "left" | "center" | "right";
|
|
14
|
-
alignSelf?: "auto" | "flex-start" | "center" | "flex-end" | "stretch";
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
export const ButtonElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
@@ -24,5 +23,4 @@ export const ButtonElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
|
24
23
|
fontWeight: z.string().optional(),
|
|
25
24
|
fontFamily: z.string().optional(),
|
|
26
25
|
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
27
|
-
alignSelf: z.enum(["auto", "flex-start", "center", "flex-end", "stretch"]).optional(),
|
|
28
26
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
|
|
3
|
+
|
|
4
|
+
export type CarouselElementProps = BaseBoxProps & {
|
|
5
|
+
carouselType?: "left-align" | "normal" | "parallax" | "stack";
|
|
6
|
+
autoPlay?: boolean;
|
|
7
|
+
autoPlayInterval?: number;
|
|
8
|
+
loop?: boolean;
|
|
9
|
+
showDots?: boolean;
|
|
10
|
+
dotColor?: string;
|
|
11
|
+
activeDotColor?: string;
|
|
12
|
+
dotWidth?: number;
|
|
13
|
+
dotHeight?: number;
|
|
14
|
+
dotsGap?: number;
|
|
15
|
+
dotsMarginTop?: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const CarouselElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
19
|
+
carouselType: z.enum(["left-align", "normal", "parallax", "stack"]).optional().default("normal"),
|
|
20
|
+
autoPlay: z.boolean().optional().default(false),
|
|
21
|
+
autoPlayInterval: z.number().nonnegative().optional().default(3000),
|
|
22
|
+
loop: z.boolean().optional().default(true),
|
|
23
|
+
showDots: z.boolean().optional().default(true),
|
|
24
|
+
dotColor: z.string().optional(),
|
|
25
|
+
activeDotColor: z.string().optional(),
|
|
26
|
+
dotWidth: z.number().nonnegative().optional().default(20),
|
|
27
|
+
dotHeight: z.number().nonnegative().optional().default(4),
|
|
28
|
+
dotsGap: z.number().nonnegative().optional().default(8),
|
|
29
|
+
dotsMarginTop: z.number().optional().default(12),
|
|
30
|
+
});
|
|
@@ -17,6 +17,9 @@ export type InputElementProps = BaseBoxProps & {
|
|
|
17
17
|
backgroundColor?: string;
|
|
18
18
|
fontSize?: number;
|
|
19
19
|
fontWeight?: string;
|
|
20
|
+
fontFamily?: string;
|
|
21
|
+
lineHeight?: number;
|
|
22
|
+
letterSpacing?: number;
|
|
20
23
|
textAlign?: "left" | "center" | "right";
|
|
21
24
|
placeholderColor?: string;
|
|
22
25
|
};
|
|
@@ -37,6 +40,9 @@ export const InputElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
|
37
40
|
backgroundColor: z.string().optional(),
|
|
38
41
|
fontSize: z.number().optional(),
|
|
39
42
|
fontWeight: z.string().optional(),
|
|
43
|
+
fontFamily: z.string().optional(),
|
|
44
|
+
lineHeight: z.number().optional(),
|
|
45
|
+
letterSpacing: z.number().optional(),
|
|
40
46
|
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
41
47
|
placeholderColor: z.string().optional(),
|
|
42
48
|
});
|
|
@@ -3,7 +3,7 @@ import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
|
|
|
3
3
|
|
|
4
4
|
export type RiveElementProps = BaseBoxProps & {
|
|
5
5
|
url: string;
|
|
6
|
-
|
|
6
|
+
autoPlay?: boolean;
|
|
7
7
|
fit?: "Contain" | "Cover" | "Fill" | "FitWidth" | "FitHeight" | "None" | "ScaleDown" | "Layout";
|
|
8
8
|
alignment?: "TopLeft" | "TopCenter" | "TopRight" | "CenterLeft" | "Center" | "CenterRight" | "BottomLeft" | "BottomCenter" | "BottomRight";
|
|
9
9
|
artboardName?: string;
|
|
@@ -12,7 +12,7 @@ export type RiveElementProps = BaseBoxProps & {
|
|
|
12
12
|
|
|
13
13
|
export const RiveElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
14
14
|
url: z.string().min(1, "url must not be empty"),
|
|
15
|
-
|
|
15
|
+
autoPlay: z.boolean().optional(),
|
|
16
16
|
fit: z.enum(["Contain", "Cover", "Fill", "FitWidth", "FitHeight", "None", "ScaleDown", "Layout"]).optional(),
|
|
17
17
|
alignment: z.enum(["TopLeft", "TopCenter", "TopRight", "CenterLeft", "Center", "CenterRight", "BottomLeft", "BottomCenter", "BottomRight"]).optional(),
|
|
18
18
|
artboardName: z.string().optional(),
|
|
@@ -1,57 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
|
|
2
3
|
|
|
3
|
-
export type StackElementProps = {
|
|
4
|
+
export type StackElementProps = BaseBoxProps & {
|
|
4
5
|
gap?: number;
|
|
5
|
-
padding?: number;
|
|
6
|
-
paddingHorizontal?: number;
|
|
7
|
-
paddingVertical?: number;
|
|
8
|
-
margin?: number;
|
|
9
|
-
marginHorizontal?: number;
|
|
10
|
-
marginVertical?: number;
|
|
11
|
-
flex?: number;
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
minWidth?: number;
|
|
15
|
-
maxWidth?: number;
|
|
16
|
-
minHeight?: number;
|
|
17
|
-
maxHeight?: number;
|
|
18
6
|
alignItems?: "flex-start" | "center" | "flex-end" | "stretch";
|
|
19
|
-
alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
20
7
|
justifyContent?: "flex-start" | "center" | "flex-end" | "space-between" | "space-around";
|
|
21
|
-
backgroundColor?: string;
|
|
22
8
|
flexWrap?: "wrap" | "nowrap";
|
|
23
|
-
flexShrink?: number;
|
|
24
|
-
borderWidth?: number;
|
|
25
|
-
borderRadius?: number;
|
|
26
|
-
borderColor?: string;
|
|
27
|
-
overflow?: "hidden" | "visible" | "scroll";
|
|
28
|
-
opacity?: number;
|
|
29
9
|
};
|
|
30
10
|
|
|
31
|
-
export const StackElementPropsSchema =
|
|
11
|
+
export const StackElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
32
12
|
gap: z.number().optional(),
|
|
33
|
-
padding: z.number().optional(),
|
|
34
|
-
paddingHorizontal: z.number().optional(),
|
|
35
|
-
paddingVertical: z.number().optional(),
|
|
36
|
-
margin: z.number().optional(),
|
|
37
|
-
marginHorizontal: z.number().optional(),
|
|
38
|
-
marginVertical: z.number().optional(),
|
|
39
|
-
flex: z.number().optional(),
|
|
40
|
-
width: z.number().optional(),
|
|
41
|
-
height: z.number().optional(),
|
|
42
|
-
minWidth: z.number().optional(),
|
|
43
|
-
maxWidth: z.number().optional(),
|
|
44
|
-
minHeight: z.number().optional(),
|
|
45
|
-
maxHeight: z.number().optional(),
|
|
46
13
|
alignItems: z.enum(["flex-start", "center", "flex-end", "stretch"]).optional(),
|
|
47
|
-
alignSelf: z.enum(["auto", "flex-start", "flex-end", "center", "stretch", "baseline"]).optional(),
|
|
48
14
|
justifyContent: z.enum(["flex-start", "center", "flex-end", "space-between", "space-around"]).optional(),
|
|
49
|
-
backgroundColor: z.string().optional(),
|
|
50
15
|
flexWrap: z.enum(["wrap", "nowrap"]).optional(),
|
|
51
|
-
flexShrink: z.number().optional(),
|
|
52
|
-
borderWidth: z.number().optional(),
|
|
53
|
-
borderRadius: z.number().optional(),
|
|
54
|
-
borderColor: z.string().optional(),
|
|
55
|
-
overflow: z.enum(["hidden", "visible", "scroll"]).optional(),
|
|
56
|
-
opacity: z.number().min(0).max(1).optional(),
|
|
57
16
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
|
|
2
3
|
|
|
3
|
-
export type TextElementProps = {
|
|
4
|
+
export type TextElementProps = BaseBoxProps & {
|
|
4
5
|
content: string;
|
|
5
6
|
mode?: "plain" | "expression";
|
|
6
7
|
fontSize?: number;
|
|
@@ -10,20 +11,9 @@ export type TextElementProps = {
|
|
|
10
11
|
textAlign?: "left" | "center" | "right";
|
|
11
12
|
letterSpacing?: number;
|
|
12
13
|
lineHeight?: number;
|
|
13
|
-
backgroundColor?: string;
|
|
14
|
-
padding?: number;
|
|
15
|
-
paddingHorizontal?: number;
|
|
16
|
-
paddingVertical?: number;
|
|
17
|
-
margin?: number;
|
|
18
|
-
marginHorizontal?: number;
|
|
19
|
-
marginVertical?: number;
|
|
20
|
-
borderWidth?: number;
|
|
21
|
-
borderRadius?: number;
|
|
22
|
-
borderColor?: string;
|
|
23
|
-
opacity?: number;
|
|
24
14
|
};
|
|
25
15
|
|
|
26
|
-
export const TextElementPropsSchema =
|
|
16
|
+
export const TextElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
27
17
|
content: z.string(),
|
|
28
18
|
mode: z.enum(["plain", "expression"]).optional(),
|
|
29
19
|
fontSize: z.number().optional(),
|
|
@@ -33,15 +23,4 @@ export const TextElementPropsSchema = z.object({
|
|
|
33
23
|
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
34
24
|
letterSpacing: z.number().optional(),
|
|
35
25
|
lineHeight: z.number().optional(),
|
|
36
|
-
backgroundColor: z.string().optional(),
|
|
37
|
-
padding: z.number().optional(),
|
|
38
|
-
paddingHorizontal: z.number().optional(),
|
|
39
|
-
paddingVertical: z.number().optional(),
|
|
40
|
-
margin: z.number().optional(),
|
|
41
|
-
marginHorizontal: z.number().optional(),
|
|
42
|
-
marginVertical: z.number().optional(),
|
|
43
|
-
borderWidth: z.number().optional(),
|
|
44
|
-
borderRadius: z.number().optional(),
|
|
45
|
-
borderColor: z.string().optional(),
|
|
46
|
-
opacity: z.number().min(0).max(1).optional(),
|
|
47
26
|
});
|
|
@@ -12,6 +12,7 @@ import { type ButtonElementProps, ButtonElementPropsSchema } from "./elements/Bu
|
|
|
12
12
|
import { type RadioGroupElementProps, RadioGroupElementPropsSchema } from "./elements/RadioGroupElement";
|
|
13
13
|
import { type CheckboxGroupElementProps, CheckboxGroupElementPropsSchema } from "./elements/CheckboxGroupElement";
|
|
14
14
|
import { type DatePickerElementProps, DatePickerElementPropsSchema } from "./elements/DatePickerElement";
|
|
15
|
+
import { type CarouselElementProps, CarouselElementPropsSchema } from "./elements/CarouselElement";
|
|
15
16
|
|
|
16
17
|
export type { BaseBoxProps } from "./elements/BaseBoxProps";
|
|
17
18
|
export { BaseBoxPropsSchema } from "./elements/BaseBoxProps";
|
|
@@ -27,6 +28,7 @@ export type { ButtonElementProps } from "./elements/ButtonElement";
|
|
|
27
28
|
export type { RadioGroupElementProps } from "./elements/RadioGroupElement";
|
|
28
29
|
export type { CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
|
|
29
30
|
export type { DatePickerElementProps } from "./elements/DatePickerElement";
|
|
31
|
+
export type { CarouselElementProps } from "./elements/CarouselElement";
|
|
30
32
|
|
|
31
33
|
// UIElement union — must live here (not in elements/) to avoid circular deps
|
|
32
34
|
// because the Stack variant's children: UIElement[] references itself.
|
|
@@ -103,6 +105,13 @@ type UIElement =
|
|
|
103
105
|
name?: string;
|
|
104
106
|
type: "DatePicker";
|
|
105
107
|
props: DatePickerElementProps;
|
|
108
|
+
}
|
|
109
|
+
| {
|
|
110
|
+
id: string;
|
|
111
|
+
name?: string;
|
|
112
|
+
type: "Carousel";
|
|
113
|
+
props: CarouselElementProps;
|
|
114
|
+
children: UIElement[];
|
|
106
115
|
};
|
|
107
116
|
|
|
108
117
|
const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
|
|
@@ -180,6 +189,13 @@ const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
|
|
|
180
189
|
type: z.literal("DatePicker"),
|
|
181
190
|
props: DatePickerElementPropsSchema,
|
|
182
191
|
}),
|
|
192
|
+
z.object({
|
|
193
|
+
id: z.string(),
|
|
194
|
+
name: z.string().optional(),
|
|
195
|
+
type: z.literal("Carousel"),
|
|
196
|
+
props: CarouselElementPropsSchema,
|
|
197
|
+
children: z.array(UIElementSchema),
|
|
198
|
+
}),
|
|
183
199
|
])
|
|
184
200
|
);
|
|
185
201
|
|