@uipath/apollo-wind 0.8.0 → 0.9.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/archived-ui-path.svg +3 -0
- package/dist/components/ui/index.cjs +10 -10
- package/dist/components/ui/input.cjs +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/select.cjs +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/examples/admin-layout-example.cjs +490 -0
- package/dist/examples/admin-layout-example.js +411 -0
- package/dist/examples/app-shell-example.cjs +452 -0
- package/dist/examples/app-shell-example.js +418 -0
- package/dist/examples/dashboard-example.cjs +590 -0
- package/dist/examples/dashboard-example.js +556 -0
- package/dist/examples/data-management-example.cjs +584 -0
- package/dist/examples/data-management-example.js +550 -0
- package/dist/examples/flow-editor-layout-example.cjs +309 -0
- package/dist/examples/flow-editor-layout-example.js +269 -0
- package/dist/examples/flow-start-example.cjs +467 -0
- package/dist/examples/flow-start-example.js +433 -0
- package/dist/examples/form-builder-example.cjs +674 -0
- package/dist/examples/form-builder-example.js +640 -0
- package/dist/examples/new-project-example.cjs +550 -0
- package/dist/examples/new-project-example.js +516 -0
- package/dist/examples/settings-example.cjs +864 -0
- package/dist/examples/settings-example.js +830 -0
- package/dist/examples/vscode-example.cjs +340 -0
- package/dist/examples/vscode-example.js +270 -0
- package/dist/templates/admin-layout-example.d.ts +92 -0
- package/dist/templates/app-shell-example.d.ts +52 -0
- package/dist/templates/dashboard-example.d.ts +11 -0
- package/dist/templates/data-management-example.d.ts +1 -0
- package/dist/templates/flow-editor-layout-example.d.ts +22 -0
- package/dist/templates/flow-start-example.d.ts +30 -0
- package/dist/templates/form-builder-example.d.ts +1 -0
- package/dist/templates/new-project-example.d.ts +30 -0
- package/dist/templates/settings-example.d.ts +1 -0
- package/dist/templates/vscode-example.d.ts +80 -0
- package/dist/ui-path.svg +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Button } from "../components/ui/button.js";
|
|
4
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../components/ui/card.js";
|
|
5
|
+
import { Checkbox } from "../components/ui/checkbox.js";
|
|
6
|
+
import { Input } from "../components/ui/input.js";
|
|
7
|
+
import { Label } from "../components/ui/label.js";
|
|
8
|
+
import { RadioGroup, RadioGroupItem } from "../components/ui/radio-group.js";
|
|
9
|
+
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "../components/ui/resizable.js";
|
|
10
|
+
import { ScrollArea } from "../components/ui/scroll-area.js";
|
|
11
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../components/ui/select.js";
|
|
12
|
+
import { Slider } from "../components/ui/slider.js";
|
|
13
|
+
import { Switch } from "../components/ui/switch.js";
|
|
14
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../components/ui/tabs.js";
|
|
15
|
+
import { Textarea } from "../components/ui/textarea.js";
|
|
16
|
+
import { Column, Grid, Row } from "../components/ui/layout/index.js";
|
|
17
|
+
function FormBuilderExample() {
|
|
18
|
+
const [formData, setFormData] = useState({
|
|
19
|
+
firstName: '',
|
|
20
|
+
lastName: '',
|
|
21
|
+
email: '',
|
|
22
|
+
phone: '',
|
|
23
|
+
bio: '',
|
|
24
|
+
theme: 'system',
|
|
25
|
+
language: 'en',
|
|
26
|
+
notifications: true,
|
|
27
|
+
newsletter: false,
|
|
28
|
+
visibility: 'public',
|
|
29
|
+
experience: 5,
|
|
30
|
+
interests: [],
|
|
31
|
+
customJson: '{}'
|
|
32
|
+
});
|
|
33
|
+
const updateField = (field, value)=>{
|
|
34
|
+
setFormData((prev)=>({
|
|
35
|
+
...prev,
|
|
36
|
+
[field]: value
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
const handleReset = ()=>{
|
|
40
|
+
setFormData({
|
|
41
|
+
firstName: '',
|
|
42
|
+
lastName: '',
|
|
43
|
+
email: '',
|
|
44
|
+
phone: '',
|
|
45
|
+
bio: '',
|
|
46
|
+
theme: 'system',
|
|
47
|
+
language: 'en',
|
|
48
|
+
notifications: true,
|
|
49
|
+
newsletter: false,
|
|
50
|
+
visibility: 'public',
|
|
51
|
+
experience: 5,
|
|
52
|
+
interests: [],
|
|
53
|
+
customJson: '{}'
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const handleSubmit = (e)=>{
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
alert('Form submitted! Check the JSON preview.');
|
|
59
|
+
};
|
|
60
|
+
return /*#__PURE__*/ jsx(Column, {
|
|
61
|
+
h: "screen",
|
|
62
|
+
w: "full",
|
|
63
|
+
className: "bg-background",
|
|
64
|
+
children: /*#__PURE__*/ jsxs(ResizablePanelGroup, {
|
|
65
|
+
direction: "horizontal",
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ jsx(ResizablePanel, {
|
|
68
|
+
defaultSize: 50,
|
|
69
|
+
minSize: 30,
|
|
70
|
+
children: /*#__PURE__*/ jsx(ScrollArea, {
|
|
71
|
+
className: "h-screen",
|
|
72
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
73
|
+
className: "p-6",
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ jsxs("div", {
|
|
76
|
+
className: "mb-6",
|
|
77
|
+
children: [
|
|
78
|
+
/*#__PURE__*/ jsx("h1", {
|
|
79
|
+
className: "text-3xl font-bold tracking-tight",
|
|
80
|
+
children: "Form Builder"
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ jsx("p", {
|
|
83
|
+
className: "text-muted-foreground",
|
|
84
|
+
children: "A powerful example showcasing forms, tabs, and live JSON preview"
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}),
|
|
88
|
+
/*#__PURE__*/ jsxs("form", {
|
|
89
|
+
onSubmit: handleSubmit,
|
|
90
|
+
className: "space-y-6",
|
|
91
|
+
children: [
|
|
92
|
+
/*#__PURE__*/ jsxs(Tabs, {
|
|
93
|
+
defaultValue: "personal",
|
|
94
|
+
className: "w-full",
|
|
95
|
+
children: [
|
|
96
|
+
/*#__PURE__*/ jsxs(TabsList, {
|
|
97
|
+
className: "grid w-full grid-cols-4",
|
|
98
|
+
children: [
|
|
99
|
+
/*#__PURE__*/ jsx(TabsTrigger, {
|
|
100
|
+
value: "personal",
|
|
101
|
+
children: "Personal"
|
|
102
|
+
}),
|
|
103
|
+
/*#__PURE__*/ jsx(TabsTrigger, {
|
|
104
|
+
value: "preferences",
|
|
105
|
+
children: "Preferences"
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ jsx(TabsTrigger, {
|
|
108
|
+
value: "settings",
|
|
109
|
+
children: "Settings"
|
|
110
|
+
}),
|
|
111
|
+
/*#__PURE__*/ jsx(TabsTrigger, {
|
|
112
|
+
value: "advanced",
|
|
113
|
+
children: "Advanced"
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
}),
|
|
117
|
+
/*#__PURE__*/ jsx(TabsContent, {
|
|
118
|
+
value: "personal",
|
|
119
|
+
className: "space-y-4",
|
|
120
|
+
children: /*#__PURE__*/ jsxs(Card, {
|
|
121
|
+
children: [
|
|
122
|
+
/*#__PURE__*/ jsxs(CardHeader, {
|
|
123
|
+
children: [
|
|
124
|
+
/*#__PURE__*/ jsx(CardTitle, {
|
|
125
|
+
children: "Personal Information"
|
|
126
|
+
}),
|
|
127
|
+
/*#__PURE__*/ jsx(CardDescription, {
|
|
128
|
+
children: "Enter your personal details below"
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
}),
|
|
132
|
+
/*#__PURE__*/ jsxs(CardContent, {
|
|
133
|
+
className: "space-y-4",
|
|
134
|
+
children: [
|
|
135
|
+
/*#__PURE__*/ jsxs(Grid, {
|
|
136
|
+
gap: 4,
|
|
137
|
+
cols: 2,
|
|
138
|
+
className: "md:grid-cols-2",
|
|
139
|
+
children: [
|
|
140
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
141
|
+
gap: 2,
|
|
142
|
+
children: [
|
|
143
|
+
/*#__PURE__*/ jsx(Label, {
|
|
144
|
+
htmlFor: "firstName",
|
|
145
|
+
children: "First Name"
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ jsx(Input, {
|
|
148
|
+
id: "firstName",
|
|
149
|
+
placeholder: "John",
|
|
150
|
+
value: formData.firstName,
|
|
151
|
+
onChange: (e)=>updateField('firstName', e.target.value)
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
}),
|
|
155
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
156
|
+
gap: 2,
|
|
157
|
+
children: [
|
|
158
|
+
/*#__PURE__*/ jsx(Label, {
|
|
159
|
+
htmlFor: "lastName",
|
|
160
|
+
children: "Last Name"
|
|
161
|
+
}),
|
|
162
|
+
/*#__PURE__*/ jsx(Input, {
|
|
163
|
+
id: "lastName",
|
|
164
|
+
placeholder: "Doe",
|
|
165
|
+
value: formData.lastName,
|
|
166
|
+
onChange: (e)=>updateField('lastName', e.target.value)
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
})
|
|
170
|
+
]
|
|
171
|
+
}),
|
|
172
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
173
|
+
gap: 2,
|
|
174
|
+
children: [
|
|
175
|
+
/*#__PURE__*/ jsx(Label, {
|
|
176
|
+
htmlFor: "email",
|
|
177
|
+
children: "Email"
|
|
178
|
+
}),
|
|
179
|
+
/*#__PURE__*/ jsx(Input, {
|
|
180
|
+
id: "email",
|
|
181
|
+
type: "email",
|
|
182
|
+
placeholder: "john.doe@example.com",
|
|
183
|
+
value: formData.email,
|
|
184
|
+
onChange: (e)=>updateField('email', e.target.value)
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
}),
|
|
188
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
189
|
+
gap: 2,
|
|
190
|
+
children: [
|
|
191
|
+
/*#__PURE__*/ jsx(Label, {
|
|
192
|
+
htmlFor: "phone",
|
|
193
|
+
children: "Phone Number"
|
|
194
|
+
}),
|
|
195
|
+
/*#__PURE__*/ jsx(Input, {
|
|
196
|
+
id: "phone",
|
|
197
|
+
type: "tel",
|
|
198
|
+
placeholder: "+1 (555) 000-0000",
|
|
199
|
+
value: formData.phone,
|
|
200
|
+
onChange: (e)=>updateField('phone', e.target.value)
|
|
201
|
+
})
|
|
202
|
+
]
|
|
203
|
+
}),
|
|
204
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
205
|
+
gap: 2,
|
|
206
|
+
children: [
|
|
207
|
+
/*#__PURE__*/ jsx(Label, {
|
|
208
|
+
htmlFor: "bio",
|
|
209
|
+
children: "Bio"
|
|
210
|
+
}),
|
|
211
|
+
/*#__PURE__*/ jsx(Textarea, {
|
|
212
|
+
id: "bio",
|
|
213
|
+
placeholder: "Tell us about yourself...",
|
|
214
|
+
rows: 4,
|
|
215
|
+
value: formData.bio,
|
|
216
|
+
onChange: (e)=>updateField('bio', e.target.value)
|
|
217
|
+
})
|
|
218
|
+
]
|
|
219
|
+
})
|
|
220
|
+
]
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
})
|
|
224
|
+
}),
|
|
225
|
+
/*#__PURE__*/ jsx(TabsContent, {
|
|
226
|
+
value: "preferences",
|
|
227
|
+
className: "space-y-4",
|
|
228
|
+
children: /*#__PURE__*/ jsxs(Card, {
|
|
229
|
+
children: [
|
|
230
|
+
/*#__PURE__*/ jsxs(CardHeader, {
|
|
231
|
+
children: [
|
|
232
|
+
/*#__PURE__*/ jsx(CardTitle, {
|
|
233
|
+
children: "Preferences"
|
|
234
|
+
}),
|
|
235
|
+
/*#__PURE__*/ jsx(CardDescription, {
|
|
236
|
+
children: "Customize your experience"
|
|
237
|
+
})
|
|
238
|
+
]
|
|
239
|
+
}),
|
|
240
|
+
/*#__PURE__*/ jsxs(CardContent, {
|
|
241
|
+
className: "space-y-6",
|
|
242
|
+
children: [
|
|
243
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
244
|
+
gap: 2,
|
|
245
|
+
children: [
|
|
246
|
+
/*#__PURE__*/ jsx(Label, {
|
|
247
|
+
htmlFor: "theme",
|
|
248
|
+
children: "Theme"
|
|
249
|
+
}),
|
|
250
|
+
/*#__PURE__*/ jsxs(Select, {
|
|
251
|
+
value: formData.theme,
|
|
252
|
+
onValueChange: (value)=>updateField('theme', value),
|
|
253
|
+
children: [
|
|
254
|
+
/*#__PURE__*/ jsx(SelectTrigger, {
|
|
255
|
+
id: "theme",
|
|
256
|
+
children: /*#__PURE__*/ jsx(SelectValue, {
|
|
257
|
+
placeholder: "Select a theme"
|
|
258
|
+
})
|
|
259
|
+
}),
|
|
260
|
+
/*#__PURE__*/ jsxs(SelectContent, {
|
|
261
|
+
children: [
|
|
262
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
263
|
+
value: "light",
|
|
264
|
+
children: "Light"
|
|
265
|
+
}),
|
|
266
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
267
|
+
value: "dark",
|
|
268
|
+
children: "Dark"
|
|
269
|
+
}),
|
|
270
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
271
|
+
value: "system",
|
|
272
|
+
children: "System"
|
|
273
|
+
})
|
|
274
|
+
]
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
}),
|
|
280
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
281
|
+
gap: 2,
|
|
282
|
+
children: [
|
|
283
|
+
/*#__PURE__*/ jsx(Label, {
|
|
284
|
+
htmlFor: "language",
|
|
285
|
+
children: "Language"
|
|
286
|
+
}),
|
|
287
|
+
/*#__PURE__*/ jsxs(Select, {
|
|
288
|
+
value: formData.language,
|
|
289
|
+
onValueChange: (value)=>updateField('language', value),
|
|
290
|
+
children: [
|
|
291
|
+
/*#__PURE__*/ jsx(SelectTrigger, {
|
|
292
|
+
id: "language",
|
|
293
|
+
children: /*#__PURE__*/ jsx(SelectValue, {
|
|
294
|
+
placeholder: "Select a language"
|
|
295
|
+
})
|
|
296
|
+
}),
|
|
297
|
+
/*#__PURE__*/ jsxs(SelectContent, {
|
|
298
|
+
children: [
|
|
299
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
300
|
+
value: "en",
|
|
301
|
+
children: "English"
|
|
302
|
+
}),
|
|
303
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
304
|
+
value: "es",
|
|
305
|
+
children: "Spanish"
|
|
306
|
+
}),
|
|
307
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
308
|
+
value: "fr",
|
|
309
|
+
children: "French"
|
|
310
|
+
}),
|
|
311
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
312
|
+
value: "de",
|
|
313
|
+
children: "German"
|
|
314
|
+
}),
|
|
315
|
+
/*#__PURE__*/ jsx(SelectItem, {
|
|
316
|
+
value: "ja",
|
|
317
|
+
children: "Japanese"
|
|
318
|
+
})
|
|
319
|
+
]
|
|
320
|
+
})
|
|
321
|
+
]
|
|
322
|
+
})
|
|
323
|
+
]
|
|
324
|
+
}),
|
|
325
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
326
|
+
justify: "between",
|
|
327
|
+
align: "center",
|
|
328
|
+
children: [
|
|
329
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
330
|
+
gap: 0.5,
|
|
331
|
+
children: [
|
|
332
|
+
/*#__PURE__*/ jsx(Label, {
|
|
333
|
+
htmlFor: "notifications",
|
|
334
|
+
children: "Notifications"
|
|
335
|
+
}),
|
|
336
|
+
/*#__PURE__*/ jsx("p", {
|
|
337
|
+
className: "text-sm text-muted-foreground",
|
|
338
|
+
children: "Receive notifications about your account"
|
|
339
|
+
})
|
|
340
|
+
]
|
|
341
|
+
}),
|
|
342
|
+
/*#__PURE__*/ jsx(Switch, {
|
|
343
|
+
id: "notifications",
|
|
344
|
+
checked: formData.notifications,
|
|
345
|
+
onCheckedChange: (checked)=>updateField('notifications', checked)
|
|
346
|
+
})
|
|
347
|
+
]
|
|
348
|
+
}),
|
|
349
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
350
|
+
gap: 2,
|
|
351
|
+
align: "center",
|
|
352
|
+
children: [
|
|
353
|
+
/*#__PURE__*/ jsx(Checkbox, {
|
|
354
|
+
id: "newsletter",
|
|
355
|
+
checked: formData.newsletter,
|
|
356
|
+
onCheckedChange: (checked)=>updateField('newsletter', !!checked)
|
|
357
|
+
}),
|
|
358
|
+
/*#__PURE__*/ jsx(Label, {
|
|
359
|
+
htmlFor: "newsletter",
|
|
360
|
+
className: "text-sm font-normal leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
361
|
+
children: "Subscribe to newsletter"
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
})
|
|
365
|
+
]
|
|
366
|
+
})
|
|
367
|
+
]
|
|
368
|
+
})
|
|
369
|
+
}),
|
|
370
|
+
/*#__PURE__*/ jsx(TabsContent, {
|
|
371
|
+
value: "settings",
|
|
372
|
+
className: "space-y-4",
|
|
373
|
+
children: /*#__PURE__*/ jsxs(Card, {
|
|
374
|
+
children: [
|
|
375
|
+
/*#__PURE__*/ jsxs(CardHeader, {
|
|
376
|
+
children: [
|
|
377
|
+
/*#__PURE__*/ jsx(CardTitle, {
|
|
378
|
+
children: "Settings"
|
|
379
|
+
}),
|
|
380
|
+
/*#__PURE__*/ jsx(CardDescription, {
|
|
381
|
+
children: "Configure your account settings"
|
|
382
|
+
})
|
|
383
|
+
]
|
|
384
|
+
}),
|
|
385
|
+
/*#__PURE__*/ jsxs(CardContent, {
|
|
386
|
+
className: "space-y-6",
|
|
387
|
+
children: [
|
|
388
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
389
|
+
gap: 3,
|
|
390
|
+
children: [
|
|
391
|
+
/*#__PURE__*/ jsx(Label, {
|
|
392
|
+
children: "Profile Visibility"
|
|
393
|
+
}),
|
|
394
|
+
/*#__PURE__*/ jsxs(RadioGroup, {
|
|
395
|
+
value: formData.visibility,
|
|
396
|
+
onValueChange: (value)=>updateField('visibility', value),
|
|
397
|
+
children: [
|
|
398
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
399
|
+
gap: 2,
|
|
400
|
+
align: "center",
|
|
401
|
+
children: [
|
|
402
|
+
/*#__PURE__*/ jsx(RadioGroupItem, {
|
|
403
|
+
value: "public",
|
|
404
|
+
id: "public"
|
|
405
|
+
}),
|
|
406
|
+
/*#__PURE__*/ jsx(Label, {
|
|
407
|
+
htmlFor: "public",
|
|
408
|
+
className: "font-normal",
|
|
409
|
+
children: "Public - Anyone can see your profile"
|
|
410
|
+
})
|
|
411
|
+
]
|
|
412
|
+
}),
|
|
413
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
414
|
+
gap: 2,
|
|
415
|
+
align: "center",
|
|
416
|
+
children: [
|
|
417
|
+
/*#__PURE__*/ jsx(RadioGroupItem, {
|
|
418
|
+
value: "private",
|
|
419
|
+
id: "private"
|
|
420
|
+
}),
|
|
421
|
+
/*#__PURE__*/ jsx(Label, {
|
|
422
|
+
htmlFor: "private",
|
|
423
|
+
className: "font-normal",
|
|
424
|
+
children: "Private - Only you can see your profile"
|
|
425
|
+
})
|
|
426
|
+
]
|
|
427
|
+
}),
|
|
428
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
429
|
+
gap: 2,
|
|
430
|
+
align: "center",
|
|
431
|
+
children: [
|
|
432
|
+
/*#__PURE__*/ jsx(RadioGroupItem, {
|
|
433
|
+
value: "friends",
|
|
434
|
+
id: "friends"
|
|
435
|
+
}),
|
|
436
|
+
/*#__PURE__*/ jsx(Label, {
|
|
437
|
+
htmlFor: "friends",
|
|
438
|
+
className: "font-normal",
|
|
439
|
+
children: "Friends - Only friends can see your profile"
|
|
440
|
+
})
|
|
441
|
+
]
|
|
442
|
+
})
|
|
443
|
+
]
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
}),
|
|
447
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
448
|
+
gap: 3,
|
|
449
|
+
children: [
|
|
450
|
+
/*#__PURE__*/ jsx(Row, {
|
|
451
|
+
justify: "between",
|
|
452
|
+
align: "center",
|
|
453
|
+
children: /*#__PURE__*/ jsxs(Label, {
|
|
454
|
+
htmlFor: "experience",
|
|
455
|
+
children: [
|
|
456
|
+
"Experience Level: ",
|
|
457
|
+
formData.experience
|
|
458
|
+
]
|
|
459
|
+
})
|
|
460
|
+
}),
|
|
461
|
+
/*#__PURE__*/ jsx(Slider, {
|
|
462
|
+
id: "experience",
|
|
463
|
+
min: 0,
|
|
464
|
+
max: 10,
|
|
465
|
+
step: 1,
|
|
466
|
+
value: [
|
|
467
|
+
formData.experience
|
|
468
|
+
],
|
|
469
|
+
onValueChange: (value)=>updateField('experience', value[0])
|
|
470
|
+
}),
|
|
471
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
472
|
+
justify: "between",
|
|
473
|
+
className: "text-xs text-muted-foreground",
|
|
474
|
+
children: [
|
|
475
|
+
/*#__PURE__*/ jsx("span", {
|
|
476
|
+
children: "Beginner"
|
|
477
|
+
}),
|
|
478
|
+
/*#__PURE__*/ jsx("span", {
|
|
479
|
+
children: "Expert"
|
|
480
|
+
})
|
|
481
|
+
]
|
|
482
|
+
})
|
|
483
|
+
]
|
|
484
|
+
}),
|
|
485
|
+
/*#__PURE__*/ jsxs(Column, {
|
|
486
|
+
gap: 3,
|
|
487
|
+
children: [
|
|
488
|
+
/*#__PURE__*/ jsx(Label, {
|
|
489
|
+
children: "Interests"
|
|
490
|
+
}),
|
|
491
|
+
/*#__PURE__*/ jsx(Column, {
|
|
492
|
+
gap: 2,
|
|
493
|
+
children: [
|
|
494
|
+
'Technology',
|
|
495
|
+
'Design',
|
|
496
|
+
'Business',
|
|
497
|
+
'Science',
|
|
498
|
+
'Arts'
|
|
499
|
+
].map((interest)=>/*#__PURE__*/ jsxs(Row, {
|
|
500
|
+
gap: 2,
|
|
501
|
+
align: "center",
|
|
502
|
+
children: [
|
|
503
|
+
/*#__PURE__*/ jsx(Checkbox, {
|
|
504
|
+
id: interest,
|
|
505
|
+
checked: formData.interests.includes(interest),
|
|
506
|
+
onCheckedChange: (checked)=>{
|
|
507
|
+
checked ? updateField('interests', [
|
|
508
|
+
...formData.interests,
|
|
509
|
+
interest
|
|
510
|
+
]) : updateField('interests', formData.interests.filter((i)=>i !== interest));
|
|
511
|
+
}
|
|
512
|
+
}),
|
|
513
|
+
/*#__PURE__*/ jsx(Label, {
|
|
514
|
+
htmlFor: interest,
|
|
515
|
+
className: "text-sm font-normal leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
516
|
+
children: interest
|
|
517
|
+
})
|
|
518
|
+
]
|
|
519
|
+
}, interest))
|
|
520
|
+
})
|
|
521
|
+
]
|
|
522
|
+
})
|
|
523
|
+
]
|
|
524
|
+
})
|
|
525
|
+
]
|
|
526
|
+
})
|
|
527
|
+
}),
|
|
528
|
+
/*#__PURE__*/ jsx(TabsContent, {
|
|
529
|
+
value: "advanced",
|
|
530
|
+
className: "space-y-4",
|
|
531
|
+
children: /*#__PURE__*/ jsxs(Card, {
|
|
532
|
+
children: [
|
|
533
|
+
/*#__PURE__*/ jsxs(CardHeader, {
|
|
534
|
+
children: [
|
|
535
|
+
/*#__PURE__*/ jsx(CardTitle, {
|
|
536
|
+
children: "Advanced Settings"
|
|
537
|
+
}),
|
|
538
|
+
/*#__PURE__*/ jsx(CardDescription, {
|
|
539
|
+
children: "Configure advanced options with custom JSON"
|
|
540
|
+
})
|
|
541
|
+
]
|
|
542
|
+
}),
|
|
543
|
+
/*#__PURE__*/ jsx(CardContent, {
|
|
544
|
+
className: "space-y-4",
|
|
545
|
+
children: /*#__PURE__*/ jsxs(Column, {
|
|
546
|
+
gap: 2,
|
|
547
|
+
children: [
|
|
548
|
+
/*#__PURE__*/ jsx(Label, {
|
|
549
|
+
htmlFor: "customJson",
|
|
550
|
+
children: "Custom Configuration (JSON)"
|
|
551
|
+
}),
|
|
552
|
+
/*#__PURE__*/ jsx(Textarea, {
|
|
553
|
+
id: "customJson",
|
|
554
|
+
placeholder: '{"key": "value"}',
|
|
555
|
+
rows: 10,
|
|
556
|
+
className: "font-mono text-sm",
|
|
557
|
+
value: formData.customJson,
|
|
558
|
+
onChange: (e)=>updateField('customJson', e.target.value)
|
|
559
|
+
}),
|
|
560
|
+
/*#__PURE__*/ jsx("p", {
|
|
561
|
+
className: "text-xs text-muted-foreground",
|
|
562
|
+
children: "Enter valid JSON for custom configuration"
|
|
563
|
+
})
|
|
564
|
+
]
|
|
565
|
+
})
|
|
566
|
+
})
|
|
567
|
+
]
|
|
568
|
+
})
|
|
569
|
+
})
|
|
570
|
+
]
|
|
571
|
+
}),
|
|
572
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
573
|
+
gap: 4,
|
|
574
|
+
children: [
|
|
575
|
+
/*#__PURE__*/ jsx(Button, {
|
|
576
|
+
type: "submit",
|
|
577
|
+
children: "Submit"
|
|
578
|
+
}),
|
|
579
|
+
/*#__PURE__*/ jsx(Button, {
|
|
580
|
+
type: "button",
|
|
581
|
+
variant: "outline",
|
|
582
|
+
onClick: handleReset,
|
|
583
|
+
children: "Reset"
|
|
584
|
+
})
|
|
585
|
+
]
|
|
586
|
+
})
|
|
587
|
+
]
|
|
588
|
+
})
|
|
589
|
+
]
|
|
590
|
+
})
|
|
591
|
+
})
|
|
592
|
+
}),
|
|
593
|
+
/*#__PURE__*/ jsx(ResizableHandle, {
|
|
594
|
+
withHandle: true
|
|
595
|
+
}),
|
|
596
|
+
/*#__PURE__*/ jsx(ResizablePanel, {
|
|
597
|
+
defaultSize: 50,
|
|
598
|
+
minSize: 30,
|
|
599
|
+
children: /*#__PURE__*/ jsx(Column, {
|
|
600
|
+
h: "screen",
|
|
601
|
+
className: "border-l",
|
|
602
|
+
children: /*#__PURE__*/ jsx(ScrollArea, {
|
|
603
|
+
className: "h-full",
|
|
604
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
605
|
+
className: "p-6",
|
|
606
|
+
children: [
|
|
607
|
+
/*#__PURE__*/ jsxs("div", {
|
|
608
|
+
className: "mb-4",
|
|
609
|
+
children: [
|
|
610
|
+
/*#__PURE__*/ jsx("h2", {
|
|
611
|
+
className: "text-2xl font-bold tracking-tight",
|
|
612
|
+
children: "JSON Preview"
|
|
613
|
+
}),
|
|
614
|
+
/*#__PURE__*/ jsx("p", {
|
|
615
|
+
className: "text-muted-foreground",
|
|
616
|
+
children: "Live preview of your form data"
|
|
617
|
+
})
|
|
618
|
+
]
|
|
619
|
+
}),
|
|
620
|
+
/*#__PURE__*/ jsx(Card, {
|
|
621
|
+
children: /*#__PURE__*/ jsx(CardContent, {
|
|
622
|
+
className: "p-4",
|
|
623
|
+
children: /*#__PURE__*/ jsx("pre", {
|
|
624
|
+
className: "overflow-x-auto text-sm",
|
|
625
|
+
children: /*#__PURE__*/ jsx("code", {
|
|
626
|
+
children: JSON.stringify(formData, null, 2)
|
|
627
|
+
})
|
|
628
|
+
})
|
|
629
|
+
})
|
|
630
|
+
})
|
|
631
|
+
]
|
|
632
|
+
})
|
|
633
|
+
})
|
|
634
|
+
})
|
|
635
|
+
})
|
|
636
|
+
]
|
|
637
|
+
})
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
export { FormBuilderExample };
|