@ringg/react-native 0.0.1-alpha.7 → 0.0.1-alpha.8

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 (28) hide show
  1. package/lib/module/components/RinggWidget.js +45 -11
  2. package/lib/module/components/RinggWidget.js.map +1 -1
  3. package/lib/module/components/steps/ButtonsStep.js +146 -0
  4. package/lib/module/components/steps/ButtonsStep.js.map +1 -0
  5. package/lib/module/components/steps/CalendarStep.js +190 -0
  6. package/lib/module/components/steps/CalendarStep.js.map +1 -0
  7. package/lib/module/components/steps/ConfirmationStep.js +175 -0
  8. package/lib/module/components/steps/ConfirmationStep.js.map +1 -0
  9. package/lib/module/components/steps/FormStep.js +346 -0
  10. package/lib/module/components/steps/FormStep.js.map +1 -0
  11. package/lib/module/components/steps/InteractiveFlow.js +249 -0
  12. package/lib/module/components/steps/InteractiveFlow.js.map +1 -0
  13. package/lib/module/index.js +7 -0
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/typescript/components/RinggWidget.d.ts.map +1 -1
  16. package/lib/typescript/components/steps/ButtonsStep.d.ts +17 -0
  17. package/lib/typescript/components/steps/ButtonsStep.d.ts.map +1 -0
  18. package/lib/typescript/components/steps/CalendarStep.d.ts +16 -0
  19. package/lib/typescript/components/steps/CalendarStep.d.ts.map +1 -0
  20. package/lib/typescript/components/steps/ConfirmationStep.d.ts +16 -0
  21. package/lib/typescript/components/steps/ConfirmationStep.d.ts.map +1 -0
  22. package/lib/typescript/components/steps/FormStep.d.ts +17 -0
  23. package/lib/typescript/components/steps/FormStep.d.ts.map +1 -0
  24. package/lib/typescript/components/steps/InteractiveFlow.d.ts +23 -0
  25. package/lib/typescript/components/steps/InteractiveFlow.d.ts.map +1 -0
  26. package/lib/typescript/index.d.ts +5 -0
  27. package/lib/typescript/index.d.ts.map +1 -1
  28. package/package.json +2 -2
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * ConfirmationStep — displays a success/info/warning/error confirmation.
5
+ *
6
+ * Shows an icon badge, title, message, and optional detail rows.
7
+ * Matches CDN confirmation-step.tsx behavior.
8
+ */
9
+
10
+ import React from "react";
11
+ import { View, Text, StyleSheet } from "react-native";
12
+ import { colorToSolid } from "@ringg/core";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ export function ConfirmationStep({
15
+ data,
16
+ theme,
17
+ collectedData
18
+ }) {
19
+ const iconType = data.icon || "success";
20
+ const getIconConfig = () => {
21
+ switch (iconType) {
22
+ case "success":
23
+ return {
24
+ emoji: "✓",
25
+ bgColor: theme.successColor
26
+ };
27
+ case "info":
28
+ return {
29
+ emoji: "i",
30
+ bgColor: colorToSolid(theme.primaryColor)
31
+ };
32
+ case "warning":
33
+ return {
34
+ emoji: "!",
35
+ bgColor: "#f59e0b"
36
+ };
37
+ case "error":
38
+ return {
39
+ emoji: "✕",
40
+ bgColor: theme.errorColor
41
+ };
42
+ default:
43
+ return {
44
+ emoji: "✓",
45
+ bgColor: theme.successColor
46
+ };
47
+ }
48
+ };
49
+ const {
50
+ emoji,
51
+ bgColor
52
+ } = getIconConfig();
53
+
54
+ // Build details to show
55
+ const priorityKeys = ["slot_date", "slot_time", "name", "email", "phone"];
56
+ const formatValue = value => {
57
+ if (Array.isArray(value)) return value.join(", ");
58
+ if (typeof value === "boolean") return value ? "Yes" : "No";
59
+ return String(value);
60
+ };
61
+ const formattedCollectedData = collectedData ? Object.entries(collectedData).filter(([key]) => priorityKeys.includes(key)).sort((a, b) => priorityKeys.indexOf(a[0]) - priorityKeys.indexOf(b[0])).map(([key, value]) => ({
62
+ label: key.replace(/slot_/g, "").replace(/_/g, " ").replace(/\b\w/g, l => l.toUpperCase()),
63
+ value: formatValue(value)
64
+ })) : [];
65
+ const detailsToShow = data.details && data.details.length > 0 ? data.details : formattedCollectedData;
66
+ return /*#__PURE__*/_jsxs(View, {
67
+ style: styles.container,
68
+ children: [/*#__PURE__*/_jsxs(View, {
69
+ style: styles.headerRow,
70
+ children: [/*#__PURE__*/_jsx(View, {
71
+ style: [styles.iconBadge, {
72
+ backgroundColor: bgColor
73
+ }],
74
+ children: /*#__PURE__*/_jsx(Text, {
75
+ style: styles.iconText,
76
+ children: emoji
77
+ })
78
+ }), /*#__PURE__*/_jsxs(View, {
79
+ style: styles.headerText,
80
+ children: [/*#__PURE__*/_jsx(Text, {
81
+ style: [styles.title, {
82
+ color: theme.textColor
83
+ }],
84
+ children: data.title
85
+ }), data.message ? /*#__PURE__*/_jsx(Text, {
86
+ style: [styles.message, {
87
+ color: theme.mutedTextColor
88
+ }],
89
+ children: data.message
90
+ }) : null]
91
+ })]
92
+ }), detailsToShow.length > 0 ? /*#__PURE__*/_jsx(View, {
93
+ style: [styles.detailsCard, {
94
+ backgroundColor: theme.surfaceColor,
95
+ borderColor: theme.borderColor
96
+ }],
97
+ children: detailsToShow.slice(0, 4).map((detail, index) => /*#__PURE__*/_jsxs(View, {
98
+ style: [styles.detailRow, index > 0 && {
99
+ borderTopWidth: StyleSheet.hairlineWidth,
100
+ borderTopColor: theme.borderColor
101
+ }],
102
+ children: [/*#__PURE__*/_jsx(Text, {
103
+ style: [styles.detailLabel, {
104
+ color: theme.mutedTextColor
105
+ }],
106
+ children: detail.label
107
+ }), /*#__PURE__*/_jsx(Text, {
108
+ style: [styles.detailValue, {
109
+ color: theme.textColor
110
+ }],
111
+ numberOfLines: 1,
112
+ children: detail.value
113
+ })]
114
+ }, index))
115
+ }) : null]
116
+ });
117
+ }
118
+ const styles = StyleSheet.create({
119
+ container: {
120
+ paddingVertical: 4
121
+ },
122
+ headerRow: {
123
+ flexDirection: "row",
124
+ alignItems: "flex-start",
125
+ gap: 10,
126
+ marginBottom: 12
127
+ },
128
+ iconBadge: {
129
+ width: 32,
130
+ height: 32,
131
+ borderRadius: 16,
132
+ alignItems: "center",
133
+ justifyContent: "center"
134
+ },
135
+ iconText: {
136
+ color: "#ffffff",
137
+ fontSize: 16,
138
+ fontWeight: "700"
139
+ },
140
+ headerText: {
141
+ flex: 1,
142
+ paddingTop: 2
143
+ },
144
+ title: {
145
+ fontSize: 14,
146
+ fontWeight: "600"
147
+ },
148
+ message: {
149
+ fontSize: 12,
150
+ marginTop: 2,
151
+ lineHeight: 18
152
+ },
153
+ detailsCard: {
154
+ borderRadius: 8,
155
+ borderWidth: StyleSheet.hairlineWidth,
156
+ overflow: "hidden"
157
+ },
158
+ detailRow: {
159
+ flexDirection: "row",
160
+ alignItems: "center",
161
+ paddingHorizontal: 12,
162
+ paddingVertical: 10,
163
+ gap: 8
164
+ },
165
+ detailLabel: {
166
+ fontSize: 11,
167
+ flexShrink: 0
168
+ },
169
+ detailValue: {
170
+ fontSize: 12,
171
+ fontWeight: "500",
172
+ marginLeft: "auto"
173
+ }
174
+ });
175
+ //# sourceMappingURL=ConfirmationStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Text","StyleSheet","colorToSolid","jsx","_jsx","jsxs","_jsxs","ConfirmationStep","data","theme","collectedData","iconType","icon","getIconConfig","emoji","bgColor","successColor","primaryColor","errorColor","priorityKeys","formatValue","value","Array","isArray","join","String","formattedCollectedData","Object","entries","filter","key","includes","sort","a","b","indexOf","map","label","replace","l","toUpperCase","detailsToShow","details","length","style","styles","container","children","headerRow","iconBadge","backgroundColor","iconText","headerText","title","color","textColor","message","mutedTextColor","detailsCard","surfaceColor","borderColor","slice","detail","index","detailRow","borderTopWidth","hairlineWidth","borderTopColor","detailLabel","detailValue","numberOfLines","create","paddingVertical","flexDirection","alignItems","gap","marginBottom","width","height","borderRadius","justifyContent","fontSize","fontWeight","flex","paddingTop","marginTop","lineHeight","borderWidth","overflow","paddingHorizontal","flexShrink","marginLeft"],"sourceRoot":"../../../../src","sources":["components/steps/ConfirmationStep.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;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;IACpBC,UAAU,EAAE,QAAQ;IACpBe,iBAAiB,EAAE,EAAE;IACrBjB,eAAe,EAAE,EAAE;IACnBG,GAAG,EAAE;EACP,CAAC;EACDP,WAAW,EAAE;IACXa,QAAQ,EAAE,EAAE;IACZS,UAAU,EAAE;EACd,CAAC;EACDrB,WAAW,EAAE;IACXY,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBS,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,346 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * FormStep — dynamic form renderer supporting 9 field types with validation.
5
+ *
6
+ * Field types: text, email, tel, number, select, multiselect, textarea, date, boolean.
7
+ * Matches CDN form-step.tsx behavior.
8
+ */
9
+
10
+ import React, { useState, useCallback } from "react";
11
+ import { View, Text, TextInput, TouchableOpacity, ActivityIndicator, Switch, ScrollView, StyleSheet } from "react-native";
12
+ import { colorToSolid, getButtonRadius } from "@ringg/core";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ export function FormStep({
15
+ payload,
16
+ theme,
17
+ isProcessing,
18
+ onComplete
19
+ }) {
20
+ const {
21
+ data
22
+ } = payload;
23
+ const buttonRadius = parseInt(getButtonRadius(theme.buttonStyle), 10) || 8;
24
+ const primarySolid = colorToSolid(theme.primaryColor);
25
+ const [formData, setFormData] = useState({});
26
+ const [fieldErrors, setFieldErrors] = useState({});
27
+ const getOptionLabel = option => typeof option === "string" ? option : option.label;
28
+ const getOptionValue = option => typeof option === "string" ? option : option.value;
29
+ const validateField = useCallback((field, value) => {
30
+ if (field.required) {
31
+ if (value === undefined || value === null || value === "" || Array.isArray(value) && value.length === 0 || typeof value === "string" && !value.trim()) {
32
+ return `${field.label} is required`;
33
+ }
34
+ }
35
+ if (typeof value === "string" && value) {
36
+ if (field.validation) {
37
+ if (field.validation.minLength && value.length < field.validation.minLength) {
38
+ return field.validation.message || `${field.label} must be at least ${field.validation.minLength} characters`;
39
+ }
40
+ if (field.validation.maxLength && value.length > field.validation.maxLength) {
41
+ return field.validation.message || `${field.label} must be at most ${field.validation.maxLength} characters`;
42
+ }
43
+ if (field.validation.pattern) {
44
+ const regex = new RegExp(field.validation.pattern);
45
+ if (!regex.test(value)) {
46
+ return field.validation.message || `${field.label} is invalid`;
47
+ }
48
+ }
49
+ }
50
+ if (field.type === "email") {
51
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
52
+ if (!emailRegex.test(value)) {
53
+ return "Please enter a valid email address";
54
+ }
55
+ }
56
+ if (field.type === "tel") {
57
+ const phoneRegex = /^[\d\s\-+()]{7,}$/;
58
+ if (!phoneRegex.test(value)) {
59
+ return "Please enter a valid phone number";
60
+ }
61
+ }
62
+ }
63
+ return null;
64
+ }, []);
65
+ const handleFieldChange = useCallback((fieldName, value) => {
66
+ setFormData(prev => ({
67
+ ...prev,
68
+ [fieldName]: value
69
+ }));
70
+ setFieldErrors(prev => {
71
+ if (prev[fieldName]) {
72
+ const next = {
73
+ ...prev
74
+ };
75
+ delete next[fieldName];
76
+ return next;
77
+ }
78
+ return prev;
79
+ });
80
+ }, []);
81
+ const handleMultiselectToggle = useCallback((fieldName, optionValue, checked) => {
82
+ setFormData(prev => {
83
+ const current = prev[fieldName] || [];
84
+ const next = checked ? [...current, optionValue] : current.filter(v => v !== optionValue);
85
+ return {
86
+ ...prev,
87
+ [fieldName]: next
88
+ };
89
+ });
90
+ setFieldErrors(prev => {
91
+ if (prev[fieldName]) {
92
+ const next = {
93
+ ...prev
94
+ };
95
+ delete next[fieldName];
96
+ return next;
97
+ }
98
+ return prev;
99
+ });
100
+ }, []);
101
+ const handleSubmit = useCallback(() => {
102
+ const errors = {};
103
+ let valid = true;
104
+ data.fields.forEach(field => {
105
+ const error = validateField(field, formData[field.name]);
106
+ if (error) {
107
+ errors[field.name] = error;
108
+ valid = false;
109
+ }
110
+ });
111
+ setFieldErrors(errors);
112
+ if (valid) {
113
+ onComplete(formData);
114
+ }
115
+ }, [data.fields, formData, validateField, onComplete]);
116
+ const inputStyle = hasError => ({
117
+ backgroundColor: "#ffffff",
118
+ color: theme.textColor,
119
+ borderColor: hasError ? theme.errorColor : theme.borderColor,
120
+ borderWidth: 1,
121
+ borderRadius: buttonRadius
122
+ });
123
+ return /*#__PURE__*/_jsxs(View, {
124
+ children: [/*#__PURE__*/_jsx(Text, {
125
+ style: [styles.title, {
126
+ color: theme.textColor
127
+ }],
128
+ children: data.title
129
+ }), data.description ? /*#__PURE__*/_jsx(Text, {
130
+ style: [styles.description, {
131
+ color: theme.mutedTextColor
132
+ }],
133
+ children: data.description
134
+ }) : null, /*#__PURE__*/_jsx(View, {
135
+ style: styles.fieldsContainer,
136
+ children: data.fields.map(field => {
137
+ const hasError = !!fieldErrors[field.name];
138
+ return /*#__PURE__*/_jsxs(View, {
139
+ style: styles.fieldWrapper,
140
+ children: [/*#__PURE__*/_jsxs(Text, {
141
+ style: [styles.fieldLabel, {
142
+ color: theme.mutedTextColor
143
+ }],
144
+ children: [field.label, field.required ? /*#__PURE__*/_jsx(Text, {
145
+ style: {
146
+ color: theme.errorColor
147
+ },
148
+ children: " *"
149
+ }) : null]
150
+ }), field.type === "select" && field.options ? /*#__PURE__*/_jsx(ScrollView, {
151
+ horizontal: true,
152
+ showsHorizontalScrollIndicator: false,
153
+ children: field.options.map((option, idx) => {
154
+ const val = getOptionValue(option);
155
+ const isSelected = formData[field.name] === val;
156
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
157
+ onPress: () => handleFieldChange(field.name, val),
158
+ style: [styles.selectPill, {
159
+ borderRadius: buttonRadius,
160
+ backgroundColor: isSelected ? primarySolid : "#ffffff",
161
+ borderColor: isSelected ? primarySolid : theme.borderColor,
162
+ borderWidth: 1
163
+ }],
164
+ activeOpacity: 0.8,
165
+ children: /*#__PURE__*/_jsx(Text, {
166
+ style: [styles.selectPillText, {
167
+ color: isSelected ? theme.primaryTextColor : theme.textColor
168
+ }],
169
+ children: getOptionLabel(option)
170
+ })
171
+ }, idx);
172
+ })
173
+ }) : null, field.type === "multiselect" && field.options ? /*#__PURE__*/_jsx(View, {
174
+ style: styles.multiselectContainer,
175
+ children: field.options.map((option, idx) => {
176
+ const val = getOptionValue(option);
177
+ const isChecked = (formData[field.name] || []).includes(val);
178
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
179
+ onPress: () => handleMultiselectToggle(field.name, val, !isChecked),
180
+ style: [styles.selectPill, {
181
+ borderRadius: buttonRadius,
182
+ backgroundColor: isChecked ? primarySolid : "#ffffff",
183
+ borderColor: isChecked ? primarySolid : theme.borderColor,
184
+ borderWidth: 1
185
+ }],
186
+ activeOpacity: 0.8,
187
+ children: /*#__PURE__*/_jsx(Text, {
188
+ style: [styles.selectPillText, {
189
+ color: isChecked ? theme.primaryTextColor : theme.textColor
190
+ }],
191
+ children: getOptionLabel(option)
192
+ })
193
+ }, idx);
194
+ })
195
+ }) : null, field.type === "boolean" ? /*#__PURE__*/_jsxs(View, {
196
+ style: styles.booleanRow,
197
+ children: [/*#__PURE__*/_jsx(Switch, {
198
+ value: formData[field.name] || false,
199
+ onValueChange: v => handleFieldChange(field.name, v),
200
+ trackColor: {
201
+ false: theme.borderColor,
202
+ true: primarySolid
203
+ },
204
+ thumbColor: "#ffffff"
205
+ }), /*#__PURE__*/_jsx(Text, {
206
+ style: [styles.booleanLabel, {
207
+ color: theme.mutedTextColor
208
+ }],
209
+ children: field.placeholder || "Yes"
210
+ })]
211
+ }) : null, field.type === "textarea" ? /*#__PURE__*/_jsx(TextInput, {
212
+ placeholder: field.placeholder || `Enter ${field.label.toLowerCase()}`,
213
+ placeholderTextColor: theme.mutedTextColor,
214
+ value: formData[field.name] || "",
215
+ onChangeText: v => handleFieldChange(field.name, v),
216
+ multiline: true,
217
+ numberOfLines: 3,
218
+ textAlignVertical: "top",
219
+ style: [styles.textArea, inputStyle(hasError)]
220
+ }) : null, field.type === "number" ? /*#__PURE__*/_jsx(TextInput, {
221
+ placeholder: field.placeholder || `Enter ${field.label.toLowerCase()}`,
222
+ placeholderTextColor: theme.mutedTextColor,
223
+ value: formData[field.name] !== undefined ? String(formData[field.name]) : "",
224
+ onChangeText: v => handleFieldChange(field.name, v ? Number(v) : ""),
225
+ keyboardType: "numeric",
226
+ style: [styles.textInput, inputStyle(hasError)]
227
+ }) : null, field.type !== "select" && field.type !== "multiselect" && field.type !== "boolean" && field.type !== "textarea" && field.type !== "number" ? /*#__PURE__*/_jsx(TextInput, {
228
+ placeholder: field.placeholder || `Enter ${field.label.toLowerCase()}`,
229
+ placeholderTextColor: theme.mutedTextColor,
230
+ value: formData[field.name] || "",
231
+ onChangeText: v => handleFieldChange(field.name, v),
232
+ keyboardType: field.type === "email" ? "email-address" : field.type === "tel" ? "phone-pad" : "default",
233
+ autoCapitalize: field.type === "email" ? "none" : "sentences",
234
+ style: [styles.textInput, inputStyle(hasError)]
235
+ }) : null, hasError ? /*#__PURE__*/_jsx(Text, {
236
+ style: [styles.errorText, {
237
+ color: theme.errorColor
238
+ }],
239
+ children: fieldErrors[field.name]
240
+ }) : null]
241
+ }, field.name);
242
+ })
243
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
244
+ onPress: handleSubmit,
245
+ disabled: isProcessing,
246
+ style: [styles.submitButton, {
247
+ borderRadius: buttonRadius,
248
+ backgroundColor: isProcessing ? theme.borderColor : primarySolid,
249
+ opacity: isProcessing ? 0.5 : 1
250
+ }],
251
+ activeOpacity: 0.9,
252
+ children: isProcessing ? /*#__PURE__*/_jsxs(View, {
253
+ style: styles.loadingRow,
254
+ children: [/*#__PURE__*/_jsx(ActivityIndicator, {
255
+ color: theme.primaryTextColor,
256
+ size: "small"
257
+ }), /*#__PURE__*/_jsx(Text, {
258
+ style: [styles.submitText, {
259
+ color: theme.primaryTextColor
260
+ }],
261
+ children: "Submitting..."
262
+ })]
263
+ }) : /*#__PURE__*/_jsx(Text, {
264
+ style: [styles.submitText, {
265
+ color: theme.primaryTextColor
266
+ }],
267
+ children: data.submit_label || "Next"
268
+ })
269
+ })]
270
+ });
271
+ }
272
+ const styles = StyleSheet.create({
273
+ title: {
274
+ fontSize: 14,
275
+ fontWeight: "500",
276
+ marginBottom: 4
277
+ },
278
+ description: {
279
+ fontSize: 12,
280
+ marginBottom: 10
281
+ },
282
+ fieldsContainer: {
283
+ gap: 10,
284
+ marginBottom: 12
285
+ },
286
+ fieldWrapper: {
287
+ gap: 4
288
+ },
289
+ fieldLabel: {
290
+ fontSize: 11,
291
+ fontWeight: "500"
292
+ },
293
+ textInput: {
294
+ paddingHorizontal: 12,
295
+ paddingVertical: 8,
296
+ fontSize: 13
297
+ },
298
+ textArea: {
299
+ paddingHorizontal: 12,
300
+ paddingVertical: 8,
301
+ fontSize: 13,
302
+ minHeight: 64
303
+ },
304
+ selectPill: {
305
+ paddingHorizontal: 12,
306
+ paddingVertical: 6,
307
+ marginRight: 6,
308
+ marginBottom: 4
309
+ },
310
+ selectPillText: {
311
+ fontSize: 12,
312
+ fontWeight: "500"
313
+ },
314
+ multiselectContainer: {
315
+ flexDirection: "row",
316
+ flexWrap: "wrap"
317
+ },
318
+ booleanRow: {
319
+ flexDirection: "row",
320
+ alignItems: "center",
321
+ gap: 8,
322
+ paddingVertical: 2
323
+ },
324
+ booleanLabel: {
325
+ fontSize: 12
326
+ },
327
+ errorText: {
328
+ fontSize: 11,
329
+ marginTop: 2
330
+ },
331
+ submitButton: {
332
+ height: 36,
333
+ alignItems: "center",
334
+ justifyContent: "center"
335
+ },
336
+ loadingRow: {
337
+ flexDirection: "row",
338
+ alignItems: "center",
339
+ gap: 8
340
+ },
341
+ submitText: {
342
+ fontSize: 13,
343
+ fontWeight: "600"
344
+ }
345
+ });
346
+ //# sourceMappingURL=FormStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","useCallback","View","Text","TextInput","TouchableOpacity","ActivityIndicator","Switch","ScrollView","StyleSheet","colorToSolid","getButtonRadius","jsx","_jsx","jsxs","_jsxs","FormStep","payload","theme","isProcessing","onComplete","data","buttonRadius","parseInt","buttonStyle","primarySolid","primaryColor","formData","setFormData","fieldErrors","setFieldErrors","getOptionLabel","option","label","getOptionValue","value","validateField","field","required","undefined","Array","isArray","length","trim","validation","minLength","message","maxLength","pattern","regex","RegExp","test","type","emailRegex","phoneRegex","handleFieldChange","fieldName","prev","next","handleMultiselectToggle","optionValue","checked","current","filter","v","handleSubmit","errors","valid","fields","forEach","error","name","inputStyle","hasError","backgroundColor","color","textColor","borderColor","errorColor","borderWidth","borderRadius","children","style","styles","title","description","mutedTextColor","fieldsContainer","map","fieldWrapper","fieldLabel","options","horizontal","showsHorizontalScrollIndicator","idx","val","isSelected","onPress","selectPill","activeOpacity","selectPillText","primaryTextColor","multiselectContainer","isChecked","includes","booleanRow","onValueChange","trackColor","false","true","thumbColor","booleanLabel","placeholder","toLowerCase","placeholderTextColor","onChangeText","multiline","numberOfLines","textAlignVertical","textArea","String","Number","keyboardType","textInput","autoCapitalize","errorText","disabled","submitButton","opacity","loadingRow","size","submitText","submit_label","create","fontSize","fontWeight","marginBottom","gap","paddingHorizontal","paddingVertical","minHeight","marginRight","flexDirection","flexWrap","alignItems","marginTop","height","justifyContent"],"sourceRoot":"../../../../src","sources":["components/steps/FormStep.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,iBAAiB,EAAEC,MAAM,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAGzH,SAASC,YAAY,EAAEC,eAAe,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAW5D,OAAO,SAASC,QAAQA,CAAC;EAAEC,OAAO;EAAEC,KAAK;EAAEC,YAAY;EAAEC;AAA0B,CAAC,EAAE;EACpF,MAAM;IAAEC;EAAK,C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