@rocapine/react-native-onboarding 1.25.1 → 1.27.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.
- package/dist/evaluateCondition.d.ts.map +1 -1
- package/dist/evaluateCondition.js +44 -1
- package/dist/evaluateCondition.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/onboarding-example.d.ts +2215 -1976
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +592 -545
- package/dist/onboarding-example.js.map +1 -1
- package/dist/steps/Carousel/types.d.ts +5 -1
- package/dist/steps/Carousel/types.d.ts.map +1 -1
- package/dist/steps/Commitment/types.d.ts +5 -1
- package/dist/steps/Commitment/types.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts +5 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts +4 -0
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/IconElement.js +2 -0
- package/dist/steps/ComposableScreen/elements/IconElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/WheelPickerElement.d.ts +124 -0
- package/dist/steps/ComposableScreen/elements/WheelPickerElement.d.ts.map +1 -0
- package/dist/steps/ComposableScreen/elements/WheelPickerElement.js +96 -0
- package/dist/steps/ComposableScreen/elements/WheelPickerElement.js.map +1 -0
- package/dist/steps/ComposableScreen/types.d.ts +14 -1
- package/dist/steps/ComposableScreen/types.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/types.js +13 -1
- package/dist/steps/ComposableScreen/types.js.map +1 -1
- package/dist/steps/Loader/types.d.ts +5 -1
- package/dist/steps/Loader/types.d.ts.map +1 -1
- package/dist/steps/MediaContent/types.d.ts +5 -1
- package/dist/steps/MediaContent/types.d.ts.map +1 -1
- package/dist/steps/Picker/types.d.ts +5 -1
- package/dist/steps/Picker/types.d.ts.map +1 -1
- package/dist/steps/Question/types.d.ts +5 -1
- package/dist/steps/Question/types.d.ts.map +1 -1
- package/dist/steps/Ratings/types.d.ts +5 -1
- package/dist/steps/Ratings/types.d.ts.map +1 -1
- package/dist/steps/common.types.d.ts +30 -4
- package/dist/steps/common.types.d.ts.map +1 -1
- package/dist/steps/common.types.js +33 -3
- package/dist/steps/common.types.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/evaluateCondition.test.ts +35 -0
- package/src/evaluateCondition.ts +41 -1
- package/src/index.ts +8 -0
- package/src/onboarding-example.ts +47 -0
- package/src/steps/ComposableScreen/elements/IconElement.ts +4 -0
- package/src/steps/ComposableScreen/elements/WheelPickerElement.ts +115 -0
- package/src/steps/ComposableScreen/types.ts +17 -0
- package/src/steps/common.types.ts +38 -5
|
@@ -112,629 +112,676 @@ exports.onboardingExample = {
|
|
|
112
112
|
props: { flex: 1, edges: ["top", "bottom"] },
|
|
113
113
|
children: [
|
|
114
114
|
{
|
|
115
|
-
id: "root",
|
|
116
|
-
type: "
|
|
117
|
-
props: {
|
|
115
|
+
id: "scroll-root",
|
|
116
|
+
type: "ScrollView",
|
|
117
|
+
props: { flex: 1, showsVerticalScrollIndicator: false },
|
|
118
118
|
children: [
|
|
119
119
|
{
|
|
120
|
-
id: "
|
|
121
|
-
type: "
|
|
122
|
-
props: {
|
|
123
|
-
source: "https://raw.githubusercontent.com/airbnb/lottie-web/master/demo/adrock/data.json",
|
|
124
|
-
height: 180,
|
|
125
|
-
autoPlay: true,
|
|
126
|
-
loop: true,
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: "hero-rive",
|
|
131
|
-
type: "Rive",
|
|
132
|
-
props: {
|
|
133
|
-
url: "https://cdn.rive.app/animations/vehicles.riv",
|
|
134
|
-
width: "100%",
|
|
135
|
-
aspectRatio: 16 / 9,
|
|
136
|
-
autoPlay: true,
|
|
137
|
-
fit: "FitWidth",
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
id: "hero-image",
|
|
142
|
-
type: "Image",
|
|
143
|
-
props: {
|
|
144
|
-
url: "https://picsum.photos/800/400?grayscale",
|
|
145
|
-
height: 180,
|
|
146
|
-
resizeMode: "cover",
|
|
147
|
-
borderRadius: 16,
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
id: "hero-icon",
|
|
152
|
-
type: "Icon",
|
|
153
|
-
props: {
|
|
154
|
-
name: "Star",
|
|
155
|
-
size: 48,
|
|
156
|
-
color: "#007AFF",
|
|
157
|
-
marginVertical: 8,
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
id: "hero-video",
|
|
162
|
-
type: "Video",
|
|
163
|
-
props: {
|
|
164
|
-
url: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
|
|
165
|
-
height: 200,
|
|
166
|
-
borderRadius: 12,
|
|
167
|
-
controls: true,
|
|
168
|
-
muted: true,
|
|
169
|
-
contentFit: "cover",
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
id: "kav-input",
|
|
174
|
-
type: "KeyboardAvoidingView",
|
|
175
|
-
props: { keyboardVerticalOffset: 24 },
|
|
120
|
+
id: "root",
|
|
121
|
+
type: "YStack",
|
|
122
|
+
props: { gap: 24, padding: 24 },
|
|
176
123
|
children: [
|
|
177
124
|
{
|
|
178
|
-
id: "hero-
|
|
179
|
-
type: "
|
|
125
|
+
id: "hero-lottie",
|
|
126
|
+
type: "Lottie",
|
|
127
|
+
props: {
|
|
128
|
+
source: "https://raw.githubusercontent.com/airbnb/lottie-web/master/demo/adrock/data.json",
|
|
129
|
+
height: 180,
|
|
130
|
+
autoPlay: true,
|
|
131
|
+
loop: true,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "hero-rive",
|
|
136
|
+
type: "Rive",
|
|
137
|
+
props: {
|
|
138
|
+
url: "https://cdn.rive.app/animations/vehicles.riv",
|
|
139
|
+
width: "100%",
|
|
140
|
+
aspectRatio: 16 / 9,
|
|
141
|
+
autoPlay: true,
|
|
142
|
+
fit: "FitWidth",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "hero-image",
|
|
147
|
+
type: "Image",
|
|
148
|
+
props: {
|
|
149
|
+
url: "https://picsum.photos/800/400?grayscale",
|
|
150
|
+
height: 180,
|
|
151
|
+
resizeMode: "cover",
|
|
152
|
+
borderRadius: 16,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "hero-icon",
|
|
157
|
+
type: "Icon",
|
|
180
158
|
props: {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
159
|
+
name: "Star",
|
|
160
|
+
size: 48,
|
|
161
|
+
color: "#007AFF",
|
|
162
|
+
fill: "#007AFF",
|
|
163
|
+
fillOpacity: 0.2,
|
|
186
164
|
marginVertical: 8,
|
|
187
165
|
},
|
|
188
166
|
},
|
|
189
|
-
],
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
id: "scroll-demo",
|
|
193
|
-
type: "ScrollView",
|
|
194
|
-
props: {
|
|
195
|
-
horizontal: true,
|
|
196
|
-
showsHorizontalScrollIndicator: false,
|
|
197
|
-
contentContainerPadding: 4,
|
|
198
|
-
},
|
|
199
|
-
children: [
|
|
200
167
|
{
|
|
201
|
-
id: "
|
|
202
|
-
type: "
|
|
168
|
+
id: "hero-video",
|
|
169
|
+
type: "Video",
|
|
203
170
|
props: {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
height: 100,
|
|
207
|
-
marginHorizontal: 6,
|
|
208
|
-
borderWidth: 1,
|
|
171
|
+
url: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
|
|
172
|
+
height: 200,
|
|
209
173
|
borderRadius: 12,
|
|
210
|
-
|
|
211
|
-
|
|
174
|
+
controls: true,
|
|
175
|
+
muted: true,
|
|
176
|
+
contentFit: "cover",
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "kav-input",
|
|
181
|
+
type: "KeyboardAvoidingView",
|
|
182
|
+
props: { keyboardVerticalOffset: 24 },
|
|
183
|
+
children: [
|
|
184
|
+
{
|
|
185
|
+
id: "hero-input",
|
|
186
|
+
type: "Input",
|
|
187
|
+
props: {
|
|
188
|
+
variableName: "name",
|
|
189
|
+
placeholder: "Enter your name",
|
|
190
|
+
keyboardType: "default",
|
|
191
|
+
returnKeyType: "done",
|
|
192
|
+
autoCapitalize: "words",
|
|
193
|
+
marginVertical: 8,
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
// Only shown once `name` has a non-empty value — demonstrates
|
|
200
|
+
// the unary `is_not_empty` condition operator.
|
|
201
|
+
id: "name-greeting",
|
|
202
|
+
type: "Text",
|
|
203
|
+
renderWhen: { variable: "name", operator: "is_not_empty" },
|
|
204
|
+
props: {
|
|
205
|
+
content: "Nice to meet you, {{name}}!",
|
|
206
|
+
mode: "expression",
|
|
207
|
+
fontSize: 14,
|
|
212
208
|
textAlign: "center",
|
|
213
|
-
|
|
209
|
+
opacity: 0.6,
|
|
210
|
+
marginVertical: 4,
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: "scroll-demo",
|
|
215
|
+
type: "ScrollView",
|
|
216
|
+
props: {
|
|
217
|
+
horizontal: true,
|
|
218
|
+
showsHorizontalScrollIndicator: false,
|
|
219
|
+
contentContainerPadding: 4,
|
|
220
|
+
},
|
|
221
|
+
children: [
|
|
222
|
+
{
|
|
223
|
+
id: "scroll-card-1",
|
|
224
|
+
type: "Text",
|
|
225
|
+
props: {
|
|
226
|
+
content: "Card 1",
|
|
227
|
+
width: 160,
|
|
228
|
+
height: 100,
|
|
229
|
+
marginHorizontal: 6,
|
|
230
|
+
borderWidth: 1,
|
|
231
|
+
borderRadius: 12,
|
|
232
|
+
borderColor: "#00000020",
|
|
233
|
+
paddingVertical: 38,
|
|
234
|
+
textAlign: "center",
|
|
235
|
+
fontSize: 16,
|
|
236
|
+
fontWeight: "600",
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: "scroll-card-2",
|
|
241
|
+
type: "Text",
|
|
242
|
+
props: {
|
|
243
|
+
content: "Card 2",
|
|
244
|
+
width: 160,
|
|
245
|
+
height: 100,
|
|
246
|
+
marginHorizontal: 6,
|
|
247
|
+
borderWidth: 1,
|
|
248
|
+
borderRadius: 12,
|
|
249
|
+
borderColor: "#00000020",
|
|
250
|
+
paddingVertical: 38,
|
|
251
|
+
textAlign: "center",
|
|
252
|
+
fontSize: 16,
|
|
253
|
+
fontWeight: "600",
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "scroll-card-3",
|
|
258
|
+
type: "Text",
|
|
259
|
+
props: {
|
|
260
|
+
content: "Card 3",
|
|
261
|
+
width: 160,
|
|
262
|
+
height: 100,
|
|
263
|
+
marginHorizontal: 6,
|
|
264
|
+
borderWidth: 1,
|
|
265
|
+
borderRadius: 12,
|
|
266
|
+
borderColor: "#00000020",
|
|
267
|
+
paddingVertical: 38,
|
|
268
|
+
textAlign: "center",
|
|
269
|
+
fontSize: 16,
|
|
270
|
+
fontWeight: "600",
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
id: "scroll-card-4",
|
|
275
|
+
type: "Text",
|
|
276
|
+
props: {
|
|
277
|
+
content: "Card 4",
|
|
278
|
+
width: 160,
|
|
279
|
+
height: 100,
|
|
280
|
+
marginHorizontal: 6,
|
|
281
|
+
borderWidth: 1,
|
|
282
|
+
borderRadius: 12,
|
|
283
|
+
borderColor: "#00000020",
|
|
284
|
+
paddingVertical: 38,
|
|
285
|
+
textAlign: "center",
|
|
286
|
+
fontSize: 16,
|
|
287
|
+
fontWeight: "600",
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
],
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
id: "greeting",
|
|
294
|
+
type: "Text",
|
|
295
|
+
props: {
|
|
296
|
+
content: "Hello {{name}}!",
|
|
297
|
+
mode: "expression",
|
|
298
|
+
fontSize: 18,
|
|
214
299
|
fontWeight: "600",
|
|
300
|
+
textAlign: "center",
|
|
301
|
+
marginVertical: 4,
|
|
215
302
|
},
|
|
216
303
|
},
|
|
217
304
|
{
|
|
218
|
-
id: "
|
|
305
|
+
id: "headline",
|
|
219
306
|
type: "Text",
|
|
220
307
|
props: {
|
|
221
|
-
content: "
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
borderWidth: 1,
|
|
226
|
-
borderRadius: 12,
|
|
227
|
-
borderColor: "#00000020",
|
|
228
|
-
paddingVertical: 38,
|
|
308
|
+
content: "Built from the CMS",
|
|
309
|
+
fontSize: 28,
|
|
310
|
+
fontWeight: "700",
|
|
311
|
+
fontFamily: "Inter",
|
|
229
312
|
textAlign: "center",
|
|
230
|
-
fontSize: 16,
|
|
231
|
-
fontWeight: "600",
|
|
232
313
|
},
|
|
233
314
|
},
|
|
234
315
|
{
|
|
235
|
-
id: "
|
|
316
|
+
id: "headline-display",
|
|
236
317
|
type: "Text",
|
|
237
318
|
props: {
|
|
238
|
-
content: "
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
borderWidth: 1,
|
|
243
|
-
borderRadius: 12,
|
|
244
|
-
borderColor: "#00000020",
|
|
245
|
-
paddingVertical: 38,
|
|
319
|
+
content: "Runtime-loaded font",
|
|
320
|
+
fontSize: 32,
|
|
321
|
+
fontFamily: "Lobster",
|
|
322
|
+
fontStyle: "italic",
|
|
246
323
|
textAlign: "center",
|
|
247
|
-
|
|
248
|
-
fontWeight: "600",
|
|
324
|
+
marginVertical: 4,
|
|
249
325
|
},
|
|
250
326
|
},
|
|
251
327
|
{
|
|
252
|
-
id: "
|
|
328
|
+
id: "inherit-implicit",
|
|
253
329
|
type: "Text",
|
|
254
330
|
props: {
|
|
255
|
-
content: "
|
|
256
|
-
|
|
257
|
-
height: 100,
|
|
258
|
-
marginHorizontal: 6,
|
|
259
|
-
borderWidth: 1,
|
|
260
|
-
borderRadius: 12,
|
|
261
|
-
borderColor: "#00000020",
|
|
262
|
-
paddingVertical: 38,
|
|
331
|
+
content: "Inherits theme.typography.defaultFontFamily (omitted)",
|
|
332
|
+
fontSize: 14,
|
|
263
333
|
textAlign: "center",
|
|
264
|
-
|
|
265
|
-
fontWeight: "600",
|
|
334
|
+
opacity: 0.6,
|
|
266
335
|
},
|
|
267
336
|
},
|
|
268
|
-
],
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
id: "greeting",
|
|
272
|
-
type: "Text",
|
|
273
|
-
props: {
|
|
274
|
-
content: "Hello {{name}}!",
|
|
275
|
-
mode: "expression",
|
|
276
|
-
fontSize: 18,
|
|
277
|
-
fontWeight: "600",
|
|
278
|
-
textAlign: "center",
|
|
279
|
-
marginVertical: 4,
|
|
280
|
-
},
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
id: "headline",
|
|
284
|
-
type: "Text",
|
|
285
|
-
props: {
|
|
286
|
-
content: "Built from the CMS",
|
|
287
|
-
fontSize: 28,
|
|
288
|
-
fontWeight: "700",
|
|
289
|
-
fontFamily: "Inter",
|
|
290
|
-
textAlign: "center",
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
id: "headline-display",
|
|
295
|
-
type: "Text",
|
|
296
|
-
props: {
|
|
297
|
-
content: "Runtime-loaded font",
|
|
298
|
-
fontSize: 32,
|
|
299
|
-
fontFamily: "Lobster",
|
|
300
|
-
fontStyle: "italic",
|
|
301
|
-
textAlign: "center",
|
|
302
|
-
marginVertical: 4,
|
|
303
|
-
},
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
id: "inherit-implicit",
|
|
307
|
-
type: "Text",
|
|
308
|
-
props: {
|
|
309
|
-
content: "Inherits theme.typography.defaultFontFamily (omitted)",
|
|
310
|
-
fontSize: 14,
|
|
311
|
-
textAlign: "center",
|
|
312
|
-
opacity: 0.6,
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
id: "inherit-explicit",
|
|
317
|
-
type: "Text",
|
|
318
|
-
props: {
|
|
319
|
-
content: "Inherits theme.typography.defaultFontFamily (explicit \"inherit\")",
|
|
320
|
-
fontFamily: "inherit",
|
|
321
|
-
fontSize: 14,
|
|
322
|
-
textAlign: "center",
|
|
323
|
-
opacity: 0.6,
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
id: "subheadline",
|
|
328
|
-
type: "Text",
|
|
329
|
-
props: {
|
|
330
|
-
content: "This screen is composed entirely from a JSON payload — no custom renderer needed.",
|
|
331
|
-
fontSize: 15,
|
|
332
|
-
textAlign: "center",
|
|
333
|
-
lineHeight: 22,
|
|
334
|
-
opacity: 0.6,
|
|
335
|
-
},
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
id: "hero-radio",
|
|
339
|
-
type: "RadioGroup",
|
|
340
|
-
props: {
|
|
341
|
-
variableName: "plan",
|
|
342
|
-
defaultValue: "monthly",
|
|
343
|
-
gap: 8,
|
|
344
|
-
marginVertical: 8,
|
|
345
|
-
items: [
|
|
346
|
-
{ label: "Monthly", value: "monthly" },
|
|
347
|
-
{ label: "Yearly", value: "yearly" },
|
|
348
|
-
{ label: "Lifetime", value: "lifetime" },
|
|
349
|
-
],
|
|
350
|
-
},
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
id: "plan-display",
|
|
354
|
-
type: "Text",
|
|
355
|
-
props: {
|
|
356
|
-
content: "Selected: {{plan}}",
|
|
357
|
-
mode: "expression",
|
|
358
|
-
fontSize: 14,
|
|
359
|
-
textAlign: "center",
|
|
360
|
-
opacity: 0.6,
|
|
361
|
-
marginVertical: 4,
|
|
362
|
-
},
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
id: "lifetime-badge",
|
|
366
|
-
renderWhen: {
|
|
367
|
-
variable: "plan",
|
|
368
|
-
operator: "eq",
|
|
369
|
-
value: "lifetime",
|
|
370
|
-
},
|
|
371
|
-
type: "Text",
|
|
372
|
-
props: {
|
|
373
|
-
content: "🎉 Best value — lifetime access!",
|
|
374
|
-
fontSize: 14,
|
|
375
|
-
fontWeight: "600",
|
|
376
|
-
textAlign: "center",
|
|
377
|
-
marginVertical: 4,
|
|
378
|
-
},
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
id: "hero-checkbox",
|
|
382
|
-
type: "CheckboxGroup",
|
|
383
|
-
props: {
|
|
384
|
-
variableName: "goals",
|
|
385
|
-
defaultValues: ["health", "fitness"],
|
|
386
|
-
gap: 8,
|
|
387
|
-
marginVertical: 8,
|
|
388
|
-
items: [
|
|
389
|
-
{ label: "Improve health", value: "health" },
|
|
390
|
-
{ label: "Build fitness", value: "fitness" },
|
|
391
|
-
{ label: "Lose weight", value: "weight" },
|
|
392
|
-
{ label: "Gain muscle", value: "muscle" },
|
|
393
|
-
],
|
|
394
|
-
},
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
id: "goals-display",
|
|
398
|
-
type: "Text",
|
|
399
|
-
props: {
|
|
400
|
-
content: "Goals: {{goals}}",
|
|
401
|
-
mode: "expression",
|
|
402
|
-
fontSize: 14,
|
|
403
|
-
textAlign: "center",
|
|
404
|
-
opacity: 0.6,
|
|
405
|
-
marginVertical: 4,
|
|
406
|
-
},
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
id: "hero-date-picker",
|
|
410
|
-
type: "DatePicker",
|
|
411
|
-
props: {
|
|
412
|
-
variableName: "birthdate",
|
|
413
|
-
defaultValue: "1990-01-01T00:00:00.000Z",
|
|
414
|
-
mode: "date",
|
|
415
|
-
display: "spinner",
|
|
416
|
-
maximumDate: new Date().toISOString(), // static at module load time — suitable for demo; use a runtime value in production
|
|
417
|
-
marginVertical: 8,
|
|
418
|
-
},
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
id: "birthdate-display",
|
|
422
|
-
type: "Text",
|
|
423
|
-
props: {
|
|
424
|
-
content: "Birth date: {{birthdate}}",
|
|
425
|
-
mode: "expression",
|
|
426
|
-
fontSize: 14,
|
|
427
|
-
textAlign: "center",
|
|
428
|
-
opacity: 0.6,
|
|
429
|
-
marginVertical: 4,
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
id: "hero-carousel",
|
|
434
|
-
type: "Carousel",
|
|
435
|
-
props: {
|
|
436
|
-
carouselType: "parallax",
|
|
437
|
-
autoPlay: false,
|
|
438
|
-
loop: true,
|
|
439
|
-
showDots: true,
|
|
440
|
-
height: 220,
|
|
441
|
-
borderRadius: 16,
|
|
442
|
-
marginVertical: 8,
|
|
443
|
-
defaultIndex: 0,
|
|
444
|
-
variableName: "carouselPage",
|
|
445
|
-
},
|
|
446
|
-
children: [
|
|
447
337
|
{
|
|
448
|
-
id: "
|
|
449
|
-
type: "
|
|
338
|
+
id: "inherit-explicit",
|
|
339
|
+
type: "Text",
|
|
450
340
|
props: {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
341
|
+
content: "Inherits theme.typography.defaultFontFamily (explicit \"inherit\")",
|
|
342
|
+
fontFamily: "inherit",
|
|
343
|
+
fontSize: 14,
|
|
344
|
+
textAlign: "center",
|
|
345
|
+
opacity: 0.6,
|
|
454
346
|
},
|
|
455
347
|
},
|
|
456
348
|
{
|
|
457
|
-
id: "
|
|
458
|
-
type: "
|
|
349
|
+
id: "subheadline",
|
|
350
|
+
type: "Text",
|
|
459
351
|
props: {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
352
|
+
content: "This screen is composed entirely from a JSON payload — no custom renderer needed.",
|
|
353
|
+
fontSize: 15,
|
|
354
|
+
textAlign: "center",
|
|
355
|
+
lineHeight: 22,
|
|
356
|
+
opacity: 0.6,
|
|
463
357
|
},
|
|
464
358
|
},
|
|
465
359
|
{
|
|
466
|
-
id: "
|
|
467
|
-
type: "
|
|
360
|
+
id: "hero-radio",
|
|
361
|
+
type: "RadioGroup",
|
|
468
362
|
props: {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
363
|
+
variableName: "plan",
|
|
364
|
+
defaultValue: "monthly",
|
|
365
|
+
gap: 8,
|
|
366
|
+
marginVertical: 8,
|
|
367
|
+
items: [
|
|
368
|
+
{ label: "Monthly", value: "monthly" },
|
|
369
|
+
{ label: "Yearly", value: "yearly" },
|
|
370
|
+
{ label: "Lifetime", value: "lifetime" },
|
|
371
|
+
],
|
|
472
372
|
},
|
|
473
373
|
},
|
|
474
|
-
],
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
id: "carousel-page-label",
|
|
478
|
-
type: "Text",
|
|
479
|
-
props: {
|
|
480
|
-
content: "Carousel page: {{carouselPage}}",
|
|
481
|
-
mode: "expression",
|
|
482
|
-
fontSize: 14,
|
|
483
|
-
textAlign: "center",
|
|
484
|
-
opacity: 0.6,
|
|
485
|
-
marginVertical: 4,
|
|
486
|
-
},
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
id: "carousel-controls",
|
|
490
|
-
type: "XStack",
|
|
491
|
-
props: { gap: 8, marginVertical: 4 },
|
|
492
|
-
children: [
|
|
493
374
|
{
|
|
494
|
-
id: "
|
|
495
|
-
type: "
|
|
375
|
+
id: "plan-display",
|
|
376
|
+
type: "Text",
|
|
496
377
|
props: {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
378
|
+
content: "Selected: {{plan}}",
|
|
379
|
+
mode: "expression",
|
|
380
|
+
fontSize: 14,
|
|
381
|
+
textAlign: "center",
|
|
382
|
+
opacity: 0.6,
|
|
383
|
+
marginVertical: 4,
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
id: "lifetime-badge",
|
|
388
|
+
renderWhen: {
|
|
389
|
+
variable: "plan",
|
|
390
|
+
operator: "eq",
|
|
391
|
+
value: "lifetime",
|
|
392
|
+
},
|
|
393
|
+
type: "Text",
|
|
394
|
+
props: {
|
|
395
|
+
content: "🎉 Best value — lifetime access!",
|
|
396
|
+
fontSize: 14,
|
|
397
|
+
fontWeight: "600",
|
|
398
|
+
textAlign: "center",
|
|
399
|
+
marginVertical: 4,
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
id: "hero-checkbox",
|
|
404
|
+
type: "CheckboxGroup",
|
|
405
|
+
props: {
|
|
406
|
+
variableName: "goals",
|
|
407
|
+
defaultValues: ["health", "fitness"],
|
|
408
|
+
gap: 8,
|
|
409
|
+
marginVertical: 8,
|
|
410
|
+
items: [
|
|
411
|
+
{ label: "Improve health", value: "health" },
|
|
412
|
+
{ label: "Build fitness", value: "fitness" },
|
|
413
|
+
{ label: "Lose weight", value: "weight" },
|
|
414
|
+
{ label: "Gain muscle", value: "muscle" },
|
|
507
415
|
],
|
|
508
416
|
},
|
|
509
417
|
},
|
|
510
418
|
{
|
|
511
|
-
id: "
|
|
512
|
-
type: "
|
|
419
|
+
id: "goals-display",
|
|
420
|
+
type: "Text",
|
|
513
421
|
props: {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
422
|
+
content: "Goals: {{goals}}",
|
|
423
|
+
mode: "expression",
|
|
424
|
+
fontSize: 14,
|
|
425
|
+
textAlign: "center",
|
|
426
|
+
opacity: 0.6,
|
|
427
|
+
marginVertical: 4,
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: "hero-date-picker",
|
|
432
|
+
type: "DatePicker",
|
|
433
|
+
props: {
|
|
434
|
+
variableName: "birthdate",
|
|
435
|
+
defaultValue: "1990-01-01T00:00:00.000Z",
|
|
436
|
+
mode: "date",
|
|
437
|
+
display: "spinner",
|
|
438
|
+
maximumDate: new Date().toISOString(), // static at module load time — suitable for demo; use a runtime value in production
|
|
439
|
+
marginVertical: 8,
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
id: "birthdate-display",
|
|
444
|
+
type: "Text",
|
|
445
|
+
props: {
|
|
446
|
+
content: "Birth date: {{birthdate}}",
|
|
447
|
+
mode: "expression",
|
|
448
|
+
fontSize: 14,
|
|
449
|
+
textAlign: "center",
|
|
450
|
+
opacity: 0.6,
|
|
451
|
+
marginVertical: 4,
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
id: "hero-weight-wheel",
|
|
456
|
+
type: "WheelPicker",
|
|
457
|
+
props: {
|
|
458
|
+
variableName: "weight",
|
|
459
|
+
defaultValue: "70",
|
|
460
|
+
range: { min: 40, max: 200, step: 1, unit: "kg" },
|
|
461
|
+
height: 180,
|
|
462
|
+
marginVertical: 8,
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
id: "weight-display",
|
|
467
|
+
type: "Text",
|
|
468
|
+
props: {
|
|
469
|
+
content: "Weight: {{weight}}",
|
|
470
|
+
mode: "expression",
|
|
471
|
+
fontSize: 14,
|
|
472
|
+
textAlign: "center",
|
|
473
|
+
opacity: 0.6,
|
|
474
|
+
marginVertical: 4,
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
id: "hero-carousel",
|
|
479
|
+
type: "Carousel",
|
|
480
|
+
props: {
|
|
481
|
+
carouselType: "parallax",
|
|
482
|
+
autoPlay: false,
|
|
483
|
+
loop: true,
|
|
484
|
+
showDots: true,
|
|
485
|
+
height: 220,
|
|
486
|
+
borderRadius: 16,
|
|
487
|
+
marginVertical: 8,
|
|
488
|
+
defaultIndex: 0,
|
|
489
|
+
variableName: "carouselPage",
|
|
490
|
+
},
|
|
491
|
+
children: [
|
|
492
|
+
{
|
|
493
|
+
id: "carousel-slide-1",
|
|
494
|
+
type: "Image",
|
|
495
|
+
props: {
|
|
496
|
+
url: "https://picsum.photos/400/220?random=10",
|
|
497
|
+
height: 220,
|
|
498
|
+
resizeMode: "cover",
|
|
523
499
|
},
|
|
524
|
-
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: "carousel-slide-2",
|
|
503
|
+
type: "Image",
|
|
504
|
+
props: {
|
|
505
|
+
url: "https://picsum.photos/400/220?random=11",
|
|
506
|
+
height: 220,
|
|
507
|
+
resizeMode: "cover",
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
id: "carousel-slide-3",
|
|
512
|
+
type: "Image",
|
|
513
|
+
props: {
|
|
514
|
+
url: "https://picsum.photos/400/220?random=12",
|
|
515
|
+
height: 220,
|
|
516
|
+
resizeMode: "cover",
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
id: "carousel-page-label",
|
|
523
|
+
type: "Text",
|
|
524
|
+
props: {
|
|
525
|
+
content: "Carousel page: {{carouselPage}}",
|
|
526
|
+
mode: "expression",
|
|
527
|
+
fontSize: 14,
|
|
528
|
+
textAlign: "center",
|
|
529
|
+
opacity: 0.6,
|
|
530
|
+
marginVertical: 4,
|
|
525
531
|
},
|
|
526
532
|
},
|
|
527
|
-
],
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
id: "zstack-demo",
|
|
531
|
-
type: "ZStack",
|
|
532
|
-
props: {
|
|
533
|
-
height: 200,
|
|
534
|
-
borderRadius: 16,
|
|
535
|
-
overflow: "hidden",
|
|
536
|
-
marginVertical: 8,
|
|
537
|
-
},
|
|
538
|
-
children: [
|
|
539
533
|
{
|
|
540
|
-
id: "
|
|
541
|
-
type: "
|
|
534
|
+
id: "carousel-controls",
|
|
535
|
+
type: "XStack",
|
|
536
|
+
props: { gap: 8, marginVertical: 4 },
|
|
537
|
+
children: [
|
|
538
|
+
{
|
|
539
|
+
id: "carousel-go-prev",
|
|
540
|
+
type: "Button",
|
|
541
|
+
props: {
|
|
542
|
+
label: "Prev",
|
|
543
|
+
variant: "outlined",
|
|
544
|
+
flex: 1,
|
|
545
|
+
actions: [
|
|
546
|
+
{
|
|
547
|
+
type: "setVariable",
|
|
548
|
+
name: "carouselPage",
|
|
549
|
+
value: "{{carouselPage}} - 1",
|
|
550
|
+
valueMode: "expression",
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
id: "carousel-go-next",
|
|
557
|
+
type: "Button",
|
|
558
|
+
props: {
|
|
559
|
+
label: "Next",
|
|
560
|
+
variant: "outlined",
|
|
561
|
+
flex: 1,
|
|
562
|
+
actions: [
|
|
563
|
+
{
|
|
564
|
+
type: "setVariable",
|
|
565
|
+
name: "carouselPage",
|
|
566
|
+
value: "{{carouselPage}} + 1",
|
|
567
|
+
valueMode: "expression",
|
|
568
|
+
},
|
|
569
|
+
],
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
],
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
id: "zstack-demo",
|
|
576
|
+
type: "ZStack",
|
|
542
577
|
props: {
|
|
543
|
-
url: "https://picsum.photos/800/400?random=20",
|
|
544
578
|
height: 200,
|
|
545
|
-
|
|
579
|
+
borderRadius: 16,
|
|
580
|
+
overflow: "hidden",
|
|
581
|
+
marginVertical: 8,
|
|
582
|
+
},
|
|
583
|
+
children: [
|
|
584
|
+
{
|
|
585
|
+
id: "zstack-bg",
|
|
586
|
+
type: "Image",
|
|
587
|
+
props: {
|
|
588
|
+
url: "https://picsum.photos/800/400?random=20",
|
|
589
|
+
height: 200,
|
|
590
|
+
resizeMode: "cover",
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
id: "zstack-overlay",
|
|
595
|
+
type: "YStack",
|
|
596
|
+
props: {
|
|
597
|
+
flex: 1,
|
|
598
|
+
backgroundColor: "rgba(0,0,0,0.45)",
|
|
599
|
+
padding: 20,
|
|
600
|
+
justifyContent: "flex-end",
|
|
601
|
+
},
|
|
602
|
+
children: [
|
|
603
|
+
{
|
|
604
|
+
id: "zstack-label",
|
|
605
|
+
type: "Text",
|
|
606
|
+
props: {
|
|
607
|
+
content: "ZStack: layered elements",
|
|
608
|
+
fontSize: 18,
|
|
609
|
+
fontWeight: "700",
|
|
610
|
+
color: "#fff",
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
],
|
|
614
|
+
},
|
|
615
|
+
],
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
id: "hero-button",
|
|
619
|
+
type: "Button",
|
|
620
|
+
props: {
|
|
621
|
+
label: "Get Started",
|
|
622
|
+
variant: "filled",
|
|
623
|
+
marginVertical: 8,
|
|
624
|
+
actions: [
|
|
625
|
+
{ type: "custom", function: "trackCta", variables: ["name", "plan", "goals"] },
|
|
626
|
+
"continue",
|
|
627
|
+
],
|
|
546
628
|
},
|
|
547
629
|
},
|
|
548
630
|
{
|
|
549
|
-
id: "
|
|
631
|
+
id: "gradient-card",
|
|
550
632
|
type: "YStack",
|
|
551
633
|
props: {
|
|
552
|
-
flex: 1,
|
|
553
|
-
backgroundColor: "rgba(0,0,0,0.45)",
|
|
554
634
|
padding: 20,
|
|
555
|
-
|
|
635
|
+
gap: 8,
|
|
636
|
+
borderRadius: 16,
|
|
637
|
+
overflow: "hidden",
|
|
638
|
+
marginVertical: 4,
|
|
639
|
+
backgroundGradient: {
|
|
640
|
+
type: "linear",
|
|
641
|
+
from: "topLeft",
|
|
642
|
+
to: "bottomRight",
|
|
643
|
+
stops: [
|
|
644
|
+
{ color: "#6C63FF" },
|
|
645
|
+
{ color: "#FF6584" },
|
|
646
|
+
],
|
|
647
|
+
},
|
|
556
648
|
},
|
|
557
649
|
children: [
|
|
558
650
|
{
|
|
559
|
-
id: "
|
|
651
|
+
id: "gradient-card-title",
|
|
560
652
|
type: "Text",
|
|
561
|
-
props: {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
},
|
|
653
|
+
props: { content: "Linear gradient", fontSize: 15, fontWeight: "700", color: "#fff" },
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
id: "gradient-card-body",
|
|
657
|
+
type: "Text",
|
|
658
|
+
props: { content: "topLeft → bottomRight", fontSize: 12, color: "#fff", opacity: 0.85 },
|
|
567
659
|
},
|
|
568
660
|
],
|
|
569
661
|
},
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
type: "YStack",
|
|
588
|
-
props: {
|
|
589
|
-
padding: 20,
|
|
590
|
-
gap: 8,
|
|
591
|
-
borderRadius: 16,
|
|
592
|
-
overflow: "hidden",
|
|
593
|
-
marginVertical: 4,
|
|
594
|
-
backgroundGradient: {
|
|
595
|
-
type: "linear",
|
|
596
|
-
from: "topLeft",
|
|
597
|
-
to: "bottomRight",
|
|
598
|
-
stops: [
|
|
599
|
-
{ color: "#6C63FF" },
|
|
600
|
-
{ color: "#FF6584" },
|
|
601
|
-
],
|
|
662
|
+
{
|
|
663
|
+
id: "gradient-button",
|
|
664
|
+
type: "Button",
|
|
665
|
+
props: {
|
|
666
|
+
label: "Gradient Button",
|
|
667
|
+
variant: "filled",
|
|
668
|
+
marginVertical: 4,
|
|
669
|
+
backgroundGradient: {
|
|
670
|
+
type: "linear",
|
|
671
|
+
from: "left",
|
|
672
|
+
to: "right",
|
|
673
|
+
stops: [
|
|
674
|
+
{ color: "#FF6584", position: 0 },
|
|
675
|
+
{ color: "#6C63FF", position: 1 },
|
|
676
|
+
],
|
|
677
|
+
},
|
|
678
|
+
},
|
|
602
679
|
},
|
|
603
|
-
},
|
|
604
|
-
children: [
|
|
605
680
|
{
|
|
606
|
-
id: "
|
|
681
|
+
id: "states-heading",
|
|
607
682
|
type: "Text",
|
|
608
|
-
props: {
|
|
683
|
+
props: {
|
|
684
|
+
content: "Button states & shadow",
|
|
685
|
+
fontSize: 13,
|
|
686
|
+
fontWeight: "700",
|
|
687
|
+
marginVertical: 4,
|
|
688
|
+
opacity: 0.5,
|
|
689
|
+
},
|
|
609
690
|
},
|
|
610
691
|
{
|
|
611
|
-
id: "
|
|
612
|
-
type: "
|
|
613
|
-
props: {
|
|
692
|
+
id: "btn-shadow",
|
|
693
|
+
type: "Button",
|
|
694
|
+
props: {
|
|
695
|
+
label: "Elevated (shadow)",
|
|
696
|
+
variant: "filled",
|
|
697
|
+
marginVertical: 4,
|
|
698
|
+
backgroundColor: "#6C63FF",
|
|
699
|
+
shadowColor: "#6C63FF",
|
|
700
|
+
shadowOffset: { width: 0, height: 6 },
|
|
701
|
+
shadowOpacity: 0.4,
|
|
702
|
+
shadowRadius: 12,
|
|
703
|
+
elevation: 8,
|
|
704
|
+
},
|
|
614
705
|
},
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
{ color: "#FF6584", position: 0 },
|
|
630
|
-
{ color: "#6C63FF", position: 1 },
|
|
631
|
-
],
|
|
706
|
+
{
|
|
707
|
+
id: "btn-pressed",
|
|
708
|
+
type: "Button",
|
|
709
|
+
props: {
|
|
710
|
+
label: "Press me (hold)",
|
|
711
|
+
variant: "filled",
|
|
712
|
+
marginVertical: 4,
|
|
713
|
+
backgroundColor: "#10b981",
|
|
714
|
+
transitionDurationMs: 300,
|
|
715
|
+
pressedStyle: {
|
|
716
|
+
opacity: 0.6,
|
|
717
|
+
backgroundColor: "#065f46",
|
|
718
|
+
},
|
|
719
|
+
},
|
|
632
720
|
},
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
id: "consent-toggle",
|
|
698
|
-
type: "Button",
|
|
699
|
-
props: {
|
|
700
|
-
label: "I agree to the terms",
|
|
701
|
-
variant: "outlined",
|
|
702
|
-
marginVertical: 8,
|
|
703
|
-
actions: [
|
|
704
|
-
{ type: "setVariable", name: "consent_given", value: "yes", label: "Agreed" },
|
|
705
|
-
],
|
|
706
|
-
},
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
id: "gated-continue",
|
|
710
|
-
type: "Button",
|
|
711
|
-
props: {
|
|
712
|
-
label: "Continue (gated)",
|
|
713
|
-
variant: "filled",
|
|
714
|
-
marginVertical: 4,
|
|
715
|
-
actions: ["continue"],
|
|
716
|
-
disabledWhen: {
|
|
717
|
-
variable: "consent_given",
|
|
718
|
-
operator: "neq",
|
|
719
|
-
value: "yes",
|
|
720
|
-
},
|
|
721
|
-
transitionDurationMs: 180,
|
|
722
|
-
shadowColor: "#000",
|
|
723
|
-
shadowOffset: { width: 0, height: 4 },
|
|
724
|
-
shadowOpacity: 0.18,
|
|
725
|
-
shadowRadius: 8,
|
|
726
|
-
elevation: 4,
|
|
727
|
-
pressedStyle: {
|
|
728
|
-
opacity: 0.7,
|
|
729
|
-
backgroundColor: "#4f46e5",
|
|
730
|
-
},
|
|
731
|
-
disabledStyle: {
|
|
732
|
-
backgroundColor: "#d1d5db",
|
|
733
|
-
color: "#6b7280",
|
|
734
|
-
shadowOpacity: 0,
|
|
735
|
-
elevation: 0,
|
|
736
|
-
},
|
|
737
|
-
},
|
|
721
|
+
{
|
|
722
|
+
id: "btn-disabled",
|
|
723
|
+
type: "Button",
|
|
724
|
+
props: {
|
|
725
|
+
label: "Always disabled",
|
|
726
|
+
variant: "filled",
|
|
727
|
+
marginVertical: 4,
|
|
728
|
+
actions: ["continue"],
|
|
729
|
+
disabledWhen: {
|
|
730
|
+
variable: "never_enabled",
|
|
731
|
+
operator: "neq",
|
|
732
|
+
value: "yes",
|
|
733
|
+
},
|
|
734
|
+
disabledStyle: {
|
|
735
|
+
backgroundColor: "#fee2e2",
|
|
736
|
+
color: "#b91c1c",
|
|
737
|
+
borderRadius: 12,
|
|
738
|
+
},
|
|
739
|
+
},
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
id: "consent-toggle",
|
|
743
|
+
type: "Button",
|
|
744
|
+
props: {
|
|
745
|
+
label: "I agree to the terms",
|
|
746
|
+
variant: "outlined",
|
|
747
|
+
marginVertical: 8,
|
|
748
|
+
actions: [
|
|
749
|
+
{ type: "setVariable", name: "consent_given", value: "yes", label: "Agreed" },
|
|
750
|
+
],
|
|
751
|
+
},
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
id: "gated-continue",
|
|
755
|
+
type: "Button",
|
|
756
|
+
props: {
|
|
757
|
+
label: "Continue (gated)",
|
|
758
|
+
variant: "filled",
|
|
759
|
+
marginVertical: 4,
|
|
760
|
+
actions: ["continue"],
|
|
761
|
+
disabledWhen: {
|
|
762
|
+
variable: "consent_given",
|
|
763
|
+
operator: "neq",
|
|
764
|
+
value: "yes",
|
|
765
|
+
},
|
|
766
|
+
transitionDurationMs: 180,
|
|
767
|
+
shadowColor: "#000",
|
|
768
|
+
shadowOffset: { width: 0, height: 4 },
|
|
769
|
+
shadowOpacity: 0.18,
|
|
770
|
+
shadowRadius: 8,
|
|
771
|
+
elevation: 4,
|
|
772
|
+
pressedStyle: {
|
|
773
|
+
opacity: 0.7,
|
|
774
|
+
backgroundColor: "#4f46e5",
|
|
775
|
+
},
|
|
776
|
+
disabledStyle: {
|
|
777
|
+
backgroundColor: "#d1d5db",
|
|
778
|
+
color: "#6b7280",
|
|
779
|
+
shadowOpacity: 0,
|
|
780
|
+
elevation: 0,
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
},
|
|
784
|
+
],
|
|
738
785
|
},
|
|
739
786
|
],
|
|
740
787
|
},
|