@uipath/apollo-wind 0.9.1 → 0.10.0-pr257.2a4b17b

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 (145) hide show
  1. package/dist/components/forms/field-renderer.cjs +120 -69
  2. package/dist/components/forms/field-renderer.js +120 -69
  3. package/dist/components/forms/form-designer.cjs +2352 -1488
  4. package/dist/components/forms/form-designer.js +2353 -1489
  5. package/dist/components/forms/form-examples.cjs +10 -10
  6. package/dist/components/forms/form-examples.js +10 -10
  7. package/dist/components/forms/form-state-viewer.cjs +988 -433
  8. package/dist/components/forms/form-state-viewer.js +988 -433
  9. package/dist/components/forms/metadata-form.cjs +446 -170
  10. package/dist/components/forms/metadata-form.js +446 -170
  11. package/dist/components/forms/schema-viewer.cjs +173 -80
  12. package/dist/components/forms/schema-viewer.js +173 -80
  13. package/dist/components/ui/accordion.cjs +131 -27
  14. package/dist/components/ui/accordion.js +131 -27
  15. package/dist/components/ui/alert-dialog.cjs +273 -45
  16. package/dist/components/ui/alert-dialog.js +273 -45
  17. package/dist/components/ui/alert.cjs +106 -17
  18. package/dist/components/ui/alert.js +106 -17
  19. package/dist/components/ui/avatar.cjs +100 -15
  20. package/dist/components/ui/avatar.js +100 -15
  21. package/dist/components/ui/badge.cjs +36 -6
  22. package/dist/components/ui/badge.js +36 -6
  23. package/dist/components/ui/breadcrumb.cjs +258 -52
  24. package/dist/components/ui/breadcrumb.js +258 -52
  25. package/dist/components/ui/button-group.cjs +119 -19
  26. package/dist/components/ui/button-group.js +119 -19
  27. package/dist/components/ui/button.cjs +48 -8
  28. package/dist/components/ui/button.js +48 -8
  29. package/dist/components/ui/calendar.cjs +88 -30
  30. package/dist/components/ui/calendar.js +88 -30
  31. package/dist/components/ui/card.cjs +199 -30
  32. package/dist/components/ui/card.js +199 -30
  33. package/dist/components/ui/checkbox.cjs +42 -8
  34. package/dist/components/ui/checkbox.js +42 -8
  35. package/dist/components/ui/combobox.cjs +150 -53
  36. package/dist/components/ui/combobox.js +150 -53
  37. package/dist/components/ui/command.cjs +291 -53
  38. package/dist/components/ui/command.js +291 -53
  39. package/dist/components/ui/context-menu.cjs +370 -72
  40. package/dist/components/ui/context-menu.js +370 -72
  41. package/dist/components/ui/data-table.cjs +76 -39
  42. package/dist/components/ui/data-table.js +76 -39
  43. package/dist/components/ui/date-picker.cjs +179 -68
  44. package/dist/components/ui/date-picker.js +179 -68
  45. package/dist/components/ui/datetime-picker.cjs +225 -104
  46. package/dist/components/ui/datetime-picker.js +225 -104
  47. package/dist/components/ui/dialog.cjs +290 -78
  48. package/dist/components/ui/dialog.js +290 -78
  49. package/dist/components/ui/drawer.cjs +220 -39
  50. package/dist/components/ui/drawer.js +220 -39
  51. package/dist/components/ui/dropdown-menu.cjs +376 -73
  52. package/dist/components/ui/dropdown-menu.js +376 -73
  53. package/dist/components/ui/editable-cell.cjs +106 -42
  54. package/dist/components/ui/editable-cell.js +106 -42
  55. package/dist/components/ui/empty-state.cjs +106 -33
  56. package/dist/components/ui/empty-state.js +106 -33
  57. package/dist/components/ui/file-upload.cjs +405 -187
  58. package/dist/components/ui/file-upload.d.ts +3 -1
  59. package/dist/components/ui/file-upload.js +405 -187
  60. package/dist/components/ui/hover-card.cjs +46 -7
  61. package/dist/components/ui/hover-card.js +46 -7
  62. package/dist/components/ui/index.cjs +22 -22
  63. package/dist/components/ui/input.cjs +39 -6
  64. package/dist/components/ui/input.js +39 -6
  65. package/dist/components/ui/label.cjs +34 -5
  66. package/dist/components/ui/label.js +34 -5
  67. package/dist/components/ui/layout/column.cjs +209 -41
  68. package/dist/components/ui/layout/column.js +209 -41
  69. package/dist/components/ui/layout/grid.cjs +275 -60
  70. package/dist/components/ui/layout/grid.js +275 -60
  71. package/dist/components/ui/layout/row.cjs +209 -41
  72. package/dist/components/ui/layout/row.js +209 -41
  73. package/dist/components/ui/menubar.cjs +540 -106
  74. package/dist/components/ui/menubar.js +540 -106
  75. package/dist/components/ui/multi-select.cjs +289 -135
  76. package/dist/components/ui/multi-select.js +289 -135
  77. package/dist/components/ui/navigation-menu.cjs +244 -47
  78. package/dist/components/ui/navigation-menu.js +244 -47
  79. package/dist/components/ui/pagination.cjs +301 -65
  80. package/dist/components/ui/pagination.js +301 -65
  81. package/dist/components/ui/popover.cjs +48 -9
  82. package/dist/components/ui/popover.js +48 -9
  83. package/dist/components/ui/progress.cjs +48 -8
  84. package/dist/components/ui/progress.js +48 -8
  85. package/dist/components/ui/radio-group.cjs +74 -12
  86. package/dist/components/ui/radio-group.js +74 -12
  87. package/dist/components/ui/resizable.cjs +75 -10
  88. package/dist/components/ui/resizable.js +75 -10
  89. package/dist/components/ui/scroll-area.cjs +113 -21
  90. package/dist/components/ui/scroll-area.js +113 -21
  91. package/dist/components/ui/search.cjs +280 -98
  92. package/dist/components/ui/search.js +280 -98
  93. package/dist/components/ui/select.cjs +334 -68
  94. package/dist/components/ui/select.js +334 -68
  95. package/dist/components/ui/separator.cjs +48 -7
  96. package/dist/components/ui/separator.js +48 -7
  97. package/dist/components/ui/sheet.cjs +236 -50
  98. package/dist/components/ui/sheet.js +236 -50
  99. package/dist/components/ui/skeleton.cjs +31 -5
  100. package/dist/components/ui/skeleton.js +31 -5
  101. package/dist/components/ui/slider.cjs +71 -21
  102. package/dist/components/ui/slider.js +71 -21
  103. package/dist/components/ui/sonner.cjs +43 -15
  104. package/dist/components/ui/sonner.js +43 -15
  105. package/dist/components/ui/spinner.cjs +83 -21
  106. package/dist/components/ui/spinner.js +83 -21
  107. package/dist/components/ui/stats-card.cjs +169 -60
  108. package/dist/components/ui/stats-card.js +169 -60
  109. package/dist/components/ui/stepper.cjs +126 -57
  110. package/dist/components/ui/stepper.js +126 -57
  111. package/dist/components/ui/switch.cjs +42 -8
  112. package/dist/components/ui/switch.js +42 -8
  113. package/dist/components/ui/table.cjs +267 -42
  114. package/dist/components/ui/table.js +267 -42
  115. package/dist/components/ui/tabs.cjs +100 -15
  116. package/dist/components/ui/tabs.js +100 -15
  117. package/dist/components/ui/textarea.cjs +34 -5
  118. package/dist/components/ui/textarea.js +34 -5
  119. package/dist/components/ui/toggle-group.cjs +112 -19
  120. package/dist/components/ui/toggle-group.js +112 -19
  121. package/dist/components/ui/toggle.cjs +43 -6
  122. package/dist/components/ui/toggle.js +43 -6
  123. package/dist/components/ui/tooltip.cjs +40 -6
  124. package/dist/components/ui/tooltip.js +40 -6
  125. package/dist/examples/admin-layout-example.cjs +879 -347
  126. package/dist/examples/admin-layout-example.js +879 -347
  127. package/dist/examples/app-shell-example.cjs +14 -14
  128. package/dist/examples/app-shell-example.js +14 -14
  129. package/dist/examples/dashboard-example.cjs +495 -334
  130. package/dist/examples/dashboard-example.js +495 -334
  131. package/dist/examples/data-management-example.cjs +501 -303
  132. package/dist/examples/data-management-example.js +502 -304
  133. package/dist/examples/flow-editor-layout-example.cjs +435 -231
  134. package/dist/examples/flow-editor-layout-example.js +436 -232
  135. package/dist/examples/flow-start-example.cjs +508 -251
  136. package/dist/examples/flow-start-example.js +509 -252
  137. package/dist/examples/form-builder-example.cjs +1006 -602
  138. package/dist/examples/form-builder-example.js +1007 -603
  139. package/dist/examples/new-project-example.cjs +806 -474
  140. package/dist/examples/new-project-example.js +807 -475
  141. package/dist/examples/settings-example.cjs +792 -704
  142. package/dist/examples/settings-example.js +792 -704
  143. package/dist/examples/vscode-example.cjs +731 -236
  144. package/dist/examples/vscode-example.js +731 -236
  145. package/package.json +4 -1
@@ -1,4 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { useEffect, useMemo, useRef, useState } from "react";
3
4
  import { FormProvider, useForm } from "react-hook-form";
4
5
  import { z } from "zod/v4";
@@ -25,7 +26,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
25
26
  const { watch, handleSubmit, reset } = form;
26
27
  const valuesRef = useRef({});
27
28
  const watchedValues = watch();
28
- valuesRef.current = watchedValues;
29
+ useEffect(()=>{
30
+ valuesRef.current = watchedValues;
31
+ });
29
32
  const context = useMemo(()=>({
30
33
  schema,
31
34
  form,
@@ -59,7 +62,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
59
62
  currentStep
60
63
  ]);
61
64
  const contextRef = useRef(context);
62
- contextRef.current = context;
65
+ useEffect(()=>{
66
+ contextRef.current = context;
67
+ });
63
68
  useEffect(()=>{
64
69
  if (isInitialized) return;
65
70
  const initializeForm = async ()=>{
@@ -76,11 +81,11 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
76
81
  ]);
77
82
  useEffect(()=>{
78
83
  if (!isInitialized) return;
79
- const subscription = watch((value, { name })=>{
80
- if (name) {
84
+ const subscription = watch((value, { name: name_0 })=>{
85
+ if (name_0) {
81
86
  valuesRef.current = value;
82
- plugins.forEach((plugin)=>{
83
- plugin.onValueChange?.(name, value[name], contextRef.current);
87
+ plugins.forEach((plugin_0)=>{
88
+ plugin_0.onValueChange?.(name_0, value[name_0], contextRef.current);
84
89
  });
85
90
  }
86
91
  });
@@ -90,9 +95,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
90
95
  isInitialized,
91
96
  plugins
92
97
  ]);
93
- const handleFormSubmit = handleSubmit(async (data)=>{
94
- let finalData = data;
95
- for (const plugin of plugins)if (plugin.onSubmit) finalData = await plugin.onSubmit(finalData, context) || finalData;
98
+ const handleFormSubmit = handleSubmit(async (data_0)=>{
99
+ let finalData = data_0;
100
+ for (const plugin_1 of plugins)if (plugin_1.onSubmit) finalData = await plugin_1.onSubmit(finalData, context) || finalData;
96
101
  if (onSubmit) await onSubmit(finalData);
97
102
  });
98
103
  const renderContent = ()=>{
@@ -128,188 +133,459 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
128
133
  })
129
134
  });
130
135
  }
131
- function SinglePageForm({ schema, context, customComponents, disabled }) {
132
- const sections = schema.sections || [];
133
- const visibleSections = sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
134
- return /*#__PURE__*/ jsx("div", {
135
- className: "space-y-2",
136
- children: visibleSections.map((section)=>/*#__PURE__*/ jsx(FormSection, {
137
- section: section,
138
- context: context,
139
- customComponents: customComponents,
140
- disabled: disabled
141
- }, section.id))
142
- });
136
+ function SinglePageForm(t0) {
137
+ const $ = c(15);
138
+ const { schema, context, customComponents, disabled } = t0;
139
+ let t1;
140
+ let t2;
141
+ if ($[0] !== context || $[1] !== customComponents || $[2] !== disabled || $[3] !== schema.sections) {
142
+ const sections = schema.sections || [];
143
+ let t3;
144
+ if ($[6] !== context) {
145
+ t3 = (section)=>!section.conditions || context.evaluateConditions(section.conditions);
146
+ $[6] = context;
147
+ $[7] = t3;
148
+ } else t3 = $[7];
149
+ const visibleSections = sections.filter(t3);
150
+ t1 = "space-y-2";
151
+ let t4;
152
+ if ($[8] !== context || $[9] !== customComponents || $[10] !== disabled) {
153
+ t4 = (section_0)=>/*#__PURE__*/ jsx(FormSection, {
154
+ section: section_0,
155
+ context: context,
156
+ customComponents: customComponents,
157
+ disabled: disabled
158
+ }, section_0.id);
159
+ $[8] = context;
160
+ $[9] = customComponents;
161
+ $[10] = disabled;
162
+ $[11] = t4;
163
+ } else t4 = $[11];
164
+ t2 = visibleSections.map(t4);
165
+ $[0] = context;
166
+ $[1] = customComponents;
167
+ $[2] = disabled;
168
+ $[3] = schema.sections;
169
+ $[4] = t1;
170
+ $[5] = t2;
171
+ } else {
172
+ t1 = $[4];
173
+ t2 = $[5];
174
+ }
175
+ let t3;
176
+ if ($[12] !== t1 || $[13] !== t2) {
177
+ t3 = /*#__PURE__*/ jsx("div", {
178
+ className: t1,
179
+ children: t2
180
+ });
181
+ $[12] = t1;
182
+ $[13] = t2;
183
+ $[14] = t3;
184
+ } else t3 = $[14];
185
+ return t3;
143
186
  }
144
- function MultiStepForm({ schema, context, currentStep, setCurrentStep, customComponents, disabled }) {
145
- const steps = schema.steps || [];
187
+ function MultiStepForm(t0) {
188
+ const $ = c(43);
189
+ const { schema, context, currentStep, setCurrentStep, customComponents, disabled } = t0;
190
+ let t1;
191
+ if ($[0] !== schema.steps) {
192
+ t1 = schema.steps || [];
193
+ $[0] = schema.steps;
194
+ $[1] = t1;
195
+ } else t1 = $[1];
196
+ const steps = t1;
146
197
  const step = steps[currentStep];
147
198
  if (!step) return null;
148
199
  if (step.conditions && !context.evaluateConditions(step.conditions)) {
149
200
  if (currentStep < steps.length - 1) setCurrentStep(currentStep + 1);
150
201
  return null;
151
202
  }
152
- return /*#__PURE__*/ jsxs("div", {
153
- className: "space-y-6",
154
- children: [
155
- /*#__PURE__*/ jsxs("div", {
156
- className: "flex items-center justify-between",
157
- children: [
158
- /*#__PURE__*/ jsxs("div", {
159
- children: [
160
- /*#__PURE__*/ jsx("h2", {
161
- className: "text-2xl font-semibold",
162
- children: step.title
163
- }),
164
- step.description && /*#__PURE__*/ jsx("p", {
165
- className: "text-muted-foreground mt-1",
166
- children: step.description
167
- })
168
- ]
169
- }),
170
- /*#__PURE__*/ jsxs("div", {
171
- className: "text-sm text-muted-foreground",
172
- children: [
173
- "Step ",
174
- currentStep + 1,
175
- " of ",
176
- steps.length
177
- ]
178
- })
179
- ]
180
- }),
181
- /*#__PURE__*/ jsx("div", {
182
- className: "space-y-2",
183
- children: step.sections.map((section)=>/*#__PURE__*/ jsx(FormSection, {
184
- section: section,
185
- context: context,
186
- customComponents: customComponents,
187
- disabled: disabled
188
- }, section.id))
189
- }),
190
- /*#__PURE__*/ jsxs("div", {
191
- className: "flex justify-between pt-6",
192
- children: [
193
- /*#__PURE__*/ jsx(Button, {
194
- type: "button",
195
- onClick: ()=>setCurrentStep(Math.max(0, currentStep - 1)),
196
- disabled: 0 === currentStep,
197
- variant: "secondary",
198
- children: "Previous"
199
- }),
200
- currentStep < steps.length - 1 ? /*#__PURE__*/ jsx(Button, {
201
- type: "button",
202
- onClick: ()=>setCurrentStep(currentStep + 1),
203
- variant: "default",
204
- children: "Next"
205
- }) : /*#__PURE__*/ jsx(Button, {
206
- type: "submit",
207
- variant: "default",
208
- children: "Submit"
209
- })
210
- ]
211
- })
212
- ]
213
- });
203
+ let t2;
204
+ if ($[2] !== step.title) {
205
+ t2 = /*#__PURE__*/ jsx("h2", {
206
+ className: "text-2xl font-semibold",
207
+ children: step.title
208
+ });
209
+ $[2] = step.title;
210
+ $[3] = t2;
211
+ } else t2 = $[3];
212
+ let t3;
213
+ if ($[4] !== step.description) {
214
+ t3 = step.description && /*#__PURE__*/ jsx("p", {
215
+ className: "text-muted-foreground mt-1",
216
+ children: step.description
217
+ });
218
+ $[4] = step.description;
219
+ $[5] = t3;
220
+ } else t3 = $[5];
221
+ let t4;
222
+ if ($[6] !== t2 || $[7] !== t3) {
223
+ t4 = /*#__PURE__*/ jsxs("div", {
224
+ children: [
225
+ t2,
226
+ t3
227
+ ]
228
+ });
229
+ $[6] = t2;
230
+ $[7] = t3;
231
+ $[8] = t4;
232
+ } else t4 = $[8];
233
+ const t5 = currentStep + 1;
234
+ let t6;
235
+ if ($[9] !== steps.length || $[10] !== t5) {
236
+ t6 = /*#__PURE__*/ jsxs("div", {
237
+ className: "text-sm text-muted-foreground",
238
+ children: [
239
+ "Step ",
240
+ t5,
241
+ " of ",
242
+ steps.length
243
+ ]
244
+ });
245
+ $[9] = steps.length;
246
+ $[10] = t5;
247
+ $[11] = t6;
248
+ } else t6 = $[11];
249
+ let t7;
250
+ if ($[12] !== t4 || $[13] !== t6) {
251
+ t7 = /*#__PURE__*/ jsxs("div", {
252
+ className: "flex items-center justify-between",
253
+ children: [
254
+ t4,
255
+ t6
256
+ ]
257
+ });
258
+ $[12] = t4;
259
+ $[13] = t6;
260
+ $[14] = t7;
261
+ } else t7 = $[14];
262
+ let t8;
263
+ if ($[15] !== context || $[16] !== customComponents || $[17] !== disabled || $[18] !== step.sections) {
264
+ let t9;
265
+ if ($[20] !== context || $[21] !== customComponents || $[22] !== disabled) {
266
+ t9 = (section)=>/*#__PURE__*/ jsx(FormSection, {
267
+ section: section,
268
+ context: context,
269
+ customComponents: customComponents,
270
+ disabled: disabled
271
+ }, section.id);
272
+ $[20] = context;
273
+ $[21] = customComponents;
274
+ $[22] = disabled;
275
+ $[23] = t9;
276
+ } else t9 = $[23];
277
+ t8 = step.sections.map(t9);
278
+ $[15] = context;
279
+ $[16] = customComponents;
280
+ $[17] = disabled;
281
+ $[18] = step.sections;
282
+ $[19] = t8;
283
+ } else t8 = $[19];
284
+ let t9;
285
+ if ($[24] !== t8) {
286
+ t9 = /*#__PURE__*/ jsx("div", {
287
+ className: "space-y-2",
288
+ children: t8
289
+ });
290
+ $[24] = t8;
291
+ $[25] = t9;
292
+ } else t9 = $[25];
293
+ let t10;
294
+ if ($[26] !== currentStep || $[27] !== setCurrentStep) {
295
+ t10 = ()=>setCurrentStep(Math.max(0, currentStep - 1));
296
+ $[26] = currentStep;
297
+ $[27] = setCurrentStep;
298
+ $[28] = t10;
299
+ } else t10 = $[28];
300
+ const t11 = 0 === currentStep;
301
+ let t12;
302
+ if ($[29] !== t10 || $[30] !== t11) {
303
+ t12 = /*#__PURE__*/ jsx(Button, {
304
+ type: "button",
305
+ onClick: t10,
306
+ disabled: t11,
307
+ variant: "secondary",
308
+ children: "Previous"
309
+ });
310
+ $[29] = t10;
311
+ $[30] = t11;
312
+ $[31] = t12;
313
+ } else t12 = $[31];
314
+ let t13;
315
+ if ($[32] !== currentStep || $[33] !== setCurrentStep || $[34] !== steps.length) {
316
+ t13 = currentStep < steps.length - 1 ? /*#__PURE__*/ jsx(Button, {
317
+ type: "button",
318
+ onClick: ()=>setCurrentStep(currentStep + 1),
319
+ variant: "default",
320
+ children: "Next"
321
+ }) : /*#__PURE__*/ jsx(Button, {
322
+ type: "submit",
323
+ variant: "default",
324
+ children: "Submit"
325
+ });
326
+ $[32] = currentStep;
327
+ $[33] = setCurrentStep;
328
+ $[34] = steps.length;
329
+ $[35] = t13;
330
+ } else t13 = $[35];
331
+ let t14;
332
+ if ($[36] !== t12 || $[37] !== t13) {
333
+ t14 = /*#__PURE__*/ jsxs("div", {
334
+ className: "flex justify-between pt-6",
335
+ children: [
336
+ t12,
337
+ t13
338
+ ]
339
+ });
340
+ $[36] = t12;
341
+ $[37] = t13;
342
+ $[38] = t14;
343
+ } else t14 = $[38];
344
+ let t15;
345
+ if ($[39] !== t14 || $[40] !== t7 || $[41] !== t9) {
346
+ t15 = /*#__PURE__*/ jsxs("div", {
347
+ className: "space-y-6",
348
+ children: [
349
+ t7,
350
+ t9,
351
+ t14
352
+ ]
353
+ });
354
+ $[39] = t14;
355
+ $[40] = t7;
356
+ $[41] = t9;
357
+ $[42] = t15;
358
+ } else t15 = $[42];
359
+ return t15;
214
360
  }
215
- function FormSection({ section, context, customComponents, disabled }) {
361
+ function FormSection(t0) {
362
+ const $ = c(41);
363
+ const { section, context, customComponents, disabled } = t0;
216
364
  const gridColumns = context.schema.layout?.columns || 1;
217
365
  const gap = context.schema.layout?.gap || 4;
218
- const fieldsGrid = /*#__PURE__*/ jsx("div", {
219
- className: "grid",
220
- style: {
221
- gridTemplateColumns: `repeat(${gridColumns}, minmax(0, 1fr))`,
222
- gap: `${0.25 * gap}rem`
223
- },
224
- children: section.fields.map((field)=>/*#__PURE__*/ jsx(FormFieldRenderer, {
225
- field: field,
226
- context: context,
227
- customComponents: customComponents,
228
- disabled: disabled
229
- }, field.name))
230
- });
366
+ const t1 = `repeat(${gridColumns}, minmax(0, 1fr))`;
367
+ const t2 = `${0.25 * gap}rem`;
368
+ let t3;
369
+ if ($[0] !== t1 || $[1] !== t2) {
370
+ t3 = {
371
+ gridTemplateColumns: t1,
372
+ gap: t2
373
+ };
374
+ $[0] = t1;
375
+ $[1] = t2;
376
+ $[2] = t3;
377
+ } else t3 = $[2];
378
+ let t4;
379
+ if ($[3] !== context || $[4] !== customComponents || $[5] !== disabled || $[6] !== section.fields) {
380
+ let t5;
381
+ if ($[8] !== context || $[9] !== customComponents || $[10] !== disabled) {
382
+ t5 = (field)=>/*#__PURE__*/ jsx(FormFieldRenderer, {
383
+ field: field,
384
+ context: context,
385
+ customComponents: customComponents,
386
+ disabled: disabled
387
+ }, field.name);
388
+ $[8] = context;
389
+ $[9] = customComponents;
390
+ $[10] = disabled;
391
+ $[11] = t5;
392
+ } else t5 = $[11];
393
+ t4 = section.fields.map(t5);
394
+ $[3] = context;
395
+ $[4] = customComponents;
396
+ $[5] = disabled;
397
+ $[6] = section.fields;
398
+ $[7] = t4;
399
+ } else t4 = $[7];
400
+ let t5;
401
+ if ($[12] !== t3 || $[13] !== t4) {
402
+ t5 = /*#__PURE__*/ jsx("div", {
403
+ className: "grid",
404
+ style: t3,
405
+ children: t4
406
+ });
407
+ $[12] = t3;
408
+ $[13] = t4;
409
+ $[14] = t5;
410
+ } else t5 = $[14];
411
+ const fieldsGrid = t5;
231
412
  if (!section.title) return fieldsGrid;
232
- const innerContent = /*#__PURE__*/ jsxs("div", {
233
- className: "flex flex-col gap-4",
234
- children: [
235
- section.description && /*#__PURE__*/ jsx("p", {
236
- className: "text-sm text-muted-foreground",
237
- children: section.description
238
- }),
239
- fieldsGrid
240
- ]
241
- });
413
+ let t6;
414
+ if ($[15] !== section.description) {
415
+ t6 = section.description && /*#__PURE__*/ jsx("p", {
416
+ className: "text-sm text-muted-foreground",
417
+ children: section.description
418
+ });
419
+ $[15] = section.description;
420
+ $[16] = t6;
421
+ } else t6 = $[16];
422
+ let t7;
423
+ if ($[17] !== fieldsGrid || $[18] !== t6) {
424
+ t7 = /*#__PURE__*/ jsxs("div", {
425
+ className: "flex flex-col gap-4",
426
+ children: [
427
+ t6,
428
+ fieldsGrid
429
+ ]
430
+ });
431
+ $[17] = fieldsGrid;
432
+ $[18] = t6;
433
+ $[19] = t7;
434
+ } else t7 = $[19];
435
+ const innerContent = t7;
242
436
  if (section.collapsible) {
243
- const defaultValue = false !== section.defaultExpanded ? [
244
- section.id
245
- ] : [];
246
- return /*#__PURE__*/ jsx(Accordion, {
247
- type: "multiple",
248
- defaultValue: defaultValue,
249
- children: /*#__PURE__*/ jsxs(AccordionItem, {
437
+ let t8;
438
+ if ($[20] !== section.defaultExpanded || $[21] !== section.id) {
439
+ t8 = false !== section.defaultExpanded ? [
440
+ section.id
441
+ ] : [];
442
+ $[20] = section.defaultExpanded;
443
+ $[21] = section.id;
444
+ $[22] = t8;
445
+ } else t8 = $[22];
446
+ const defaultValue = t8;
447
+ let t9;
448
+ if ($[23] !== section.title) {
449
+ t9 = /*#__PURE__*/ jsx(AccordionTrigger, {
450
+ className: "text-sm font-medium",
451
+ children: section.title
452
+ });
453
+ $[23] = section.title;
454
+ $[24] = t9;
455
+ } else t9 = $[24];
456
+ let t10;
457
+ if ($[25] !== innerContent) {
458
+ t10 = /*#__PURE__*/ jsx(AccordionContent, {
459
+ children: innerContent
460
+ });
461
+ $[25] = innerContent;
462
+ $[26] = t10;
463
+ } else t10 = $[26];
464
+ let t11;
465
+ if ($[27] !== section.id || $[28] !== t10 || $[29] !== t9) {
466
+ t11 = /*#__PURE__*/ jsxs(AccordionItem, {
250
467
  value: section.id,
251
468
  className: "border rounded-lg px-3",
252
469
  children: [
253
- /*#__PURE__*/ jsx(AccordionTrigger, {
254
- className: "text-sm font-medium",
255
- children: section.title
256
- }),
257
- /*#__PURE__*/ jsx(AccordionContent, {
258
- children: innerContent
259
- })
470
+ t9,
471
+ t10
260
472
  ]
473
+ });
474
+ $[27] = section.id;
475
+ $[28] = t10;
476
+ $[29] = t9;
477
+ $[30] = t11;
478
+ } else t11 = $[30];
479
+ let t12;
480
+ if ($[31] !== defaultValue || $[32] !== t11) {
481
+ t12 = /*#__PURE__*/ jsx(Accordion, {
482
+ type: "multiple",
483
+ defaultValue: defaultValue,
484
+ children: t11
485
+ });
486
+ $[31] = defaultValue;
487
+ $[32] = t11;
488
+ $[33] = t12;
489
+ } else t12 = $[33];
490
+ return t12;
491
+ }
492
+ let t8;
493
+ if ($[34] !== section.title) {
494
+ t8 = /*#__PURE__*/ jsx("div", {
495
+ className: "flex",
496
+ children: /*#__PURE__*/ jsx("div", {
497
+ className: "flex flex-1 items-center justify-between py-4 text-sm font-medium",
498
+ children: section.title
261
499
  })
262
500
  });
263
- }
264
- return /*#__PURE__*/ jsxs("div", {
265
- className: "border rounded-lg px-3",
266
- children: [
267
- /*#__PURE__*/ jsx("div", {
268
- className: "flex",
269
- children: /*#__PURE__*/ jsx("div", {
270
- className: "flex flex-1 items-center justify-between py-4 text-sm font-medium",
271
- children: section.title
272
- })
273
- }),
274
- /*#__PURE__*/ jsx("div", {
275
- className: "text-sm",
276
- children: /*#__PURE__*/ jsx("div", {
277
- className: "pb-4 pt-0",
278
- children: innerContent
279
- })
501
+ $[34] = section.title;
502
+ $[35] = t8;
503
+ } else t8 = $[35];
504
+ let t9;
505
+ if ($[36] !== innerContent) {
506
+ t9 = /*#__PURE__*/ jsx("div", {
507
+ className: "text-sm",
508
+ children: /*#__PURE__*/ jsx("div", {
509
+ className: "pb-4 pt-0",
510
+ children: innerContent
280
511
  })
281
- ]
282
- });
512
+ });
513
+ $[36] = innerContent;
514
+ $[37] = t9;
515
+ } else t9 = $[37];
516
+ let t10;
517
+ if ($[38] !== t8 || $[39] !== t9) {
518
+ t10 = /*#__PURE__*/ jsxs("div", {
519
+ className: "border rounded-lg px-3",
520
+ children: [
521
+ t8,
522
+ t9
523
+ ]
524
+ });
525
+ $[38] = t8;
526
+ $[39] = t9;
527
+ $[40] = t10;
528
+ } else t10 = $[40];
529
+ return t10;
283
530
  }
284
- function FormActions({ schema, context, onReset }) {
285
- const actions = schema.actions || [
286
- {
287
- id: 'submit',
288
- type: 'submit',
289
- label: 'Submit',
290
- variant: 'default'
291
- }
292
- ];
531
+ function FormActions(t0) {
532
+ const $ = c(11);
533
+ const { schema, context, onReset } = t0;
534
+ let t1;
535
+ if ($[0] !== schema.actions) {
536
+ t1 = schema.actions || [
537
+ {
538
+ id: "submit",
539
+ type: "submit",
540
+ label: "Submit",
541
+ variant: "default"
542
+ }
543
+ ];
544
+ $[0] = schema.actions;
545
+ $[1] = t1;
546
+ } else t1 = $[1];
547
+ const actions = t1;
293
548
  if (0 === actions.length) return null;
294
- return /*#__PURE__*/ jsx("div", {
295
- className: "flex gap-2 pt-6",
296
- children: actions.map((action)=>{
297
- if (action.conditions && !context.evaluateConditions(action.conditions)) return null;
298
- if ('reset' === action.type) return /*#__PURE__*/ jsx(Button, {
299
- type: "button",
300
- onClick: onReset,
301
- variant: action.variant || 'secondary',
302
- disabled: action.disabled,
303
- children: action.label
304
- }, action.id);
305
- return /*#__PURE__*/ jsx(Button, {
306
- type: 'submit' === action.type ? 'submit' : 'button',
307
- variant: action.variant || 'default',
308
- disabled: action.disabled || 'submit' === action.type && context.isSubmitting,
309
- children: action.loading && context.isSubmitting ? 'Loading...' : action.label
310
- }, action.id);
311
- })
312
- });
549
+ let t2;
550
+ if ($[2] !== actions || $[3] !== context || $[4] !== onReset) {
551
+ let t3;
552
+ if ($[6] !== context || $[7] !== onReset) {
553
+ t3 = (action)=>{
554
+ if (action.conditions && !context.evaluateConditions(action.conditions)) return null;
555
+ if ("reset" === action.type) return /*#__PURE__*/ jsx(Button, {
556
+ type: "button",
557
+ onClick: onReset,
558
+ variant: action.variant || "secondary",
559
+ disabled: action.disabled,
560
+ children: action.label
561
+ }, action.id);
562
+ return /*#__PURE__*/ jsx(Button, {
563
+ type: "submit" === action.type ? "submit" : "button",
564
+ variant: action.variant || "default",
565
+ disabled: action.disabled || "submit" === action.type && context.isSubmitting,
566
+ children: action.loading && context.isSubmitting ? "Loading..." : action.label
567
+ }, action.id);
568
+ };
569
+ $[6] = context;
570
+ $[7] = onReset;
571
+ $[8] = t3;
572
+ } else t3 = $[8];
573
+ t2 = actions.map(t3);
574
+ $[2] = actions;
575
+ $[3] = context;
576
+ $[4] = onReset;
577
+ $[5] = t2;
578
+ } else t2 = $[5];
579
+ let t3;
580
+ if ($[9] !== t2) {
581
+ t3 = /*#__PURE__*/ jsx("div", {
582
+ className: "flex gap-2 pt-6",
583
+ children: t2
584
+ });
585
+ $[9] = t2;
586
+ $[10] = t3;
587
+ } else t3 = $[10];
588
+ return t3;
313
589
  }
314
590
  function buildZodSchema(schema) {
315
591
  const shape = {};