@uipath/apollo-wind 0.9.1 → 0.10.0-pr257.13842f9

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