@digiform/wizard 0.2.3 → 0.2.5

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/index.cjs CHANGED
@@ -26,9 +26,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
26
26
  const jsxRuntime = require("react/jsx-runtime");
27
27
  const React = require("react");
28
28
  const clsx$g = require("clsx");
29
- const reactQuery = require("@tanstack/react-query");
30
- const lucideReact = require("lucide-react");
31
29
  const reactSlot = require("@radix-ui/react-slot");
30
+ const CheckboxPrimitive = require("@radix-ui/react-checkbox");
31
+ const lucideReact = require("lucide-react");
32
+ const RadioGroupPrimitive = require("@radix-ui/react-radio-group");
33
+ const SelectPrimitive = require("@radix-ui/react-select");
34
+ const reactQuery = require("@tanstack/react-query");
32
35
  const reactForm = require("@tanstack/react-form");
33
36
  const react = require("@xstate/react");
34
37
  const xstate = require("xstate");
@@ -52,526 +55,178 @@ function _interopNamespaceDefault(e) {
52
55
  return Object.freeze(n);
53
56
  }
54
57
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
58
+ const CheckboxPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CheckboxPrimitive);
59
+ const RadioGroupPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadioGroupPrimitive);
60
+ const SelectPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SelectPrimitive);
55
61
  const DialogPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DialogPrimitive);
56
- const TYPE_COMPATIBILITY = {
57
- string: ["text", "email", "tel", "password", "textarea", "select"],
58
- number: ["number", "range"],
59
- boolean: ["checkbox", "radio"],
60
- array: ["select", "checkbox-group", "radio-group"],
61
- object: [],
62
- null: []
62
+ const alert = "fb-alert_5UcaT";
63
+ const alertTitle = "fb-alertTitle_-KE5o";
64
+ const alertDescription = "fb-alertDescription_cg7Ke";
65
+ const styles$u = {
66
+ alert,
67
+ "variant-default": "fb-variant-default_yhEpY",
68
+ "variant-destructive": "fb-variant-destructive_rafp5",
69
+ alertTitle,
70
+ alertDescription
63
71
  };
64
- const FormComponentSchema = zod.z.object({
65
- id: zod.z.string(),
66
- type: zod.z.string(),
67
- label: zod.z.string().optional(),
68
- required: zod.z.boolean().optional(),
69
- validation: zod.z.record(zod.z.unknown()).optional(),
70
- triggers: zod.z.array(
71
- zod.z.object({
72
- type: zod.z.string(),
73
- condition: zod.z.unknown().optional(),
74
- actions: zod.z.array(
75
- zod.z.object({
76
- type: zod.z.string(),
77
- config: zod.z.unknown().optional()
78
- })
79
- )
80
- })
81
- ).optional()
82
- }).passthrough();
83
- const FormSectionSchema = zod.z.object({
84
- id: zod.z.string(),
85
- title: zod.z.string().optional(),
86
- mode: zod.z.enum(["readOnly", "editable", "default", "isEditable"]).optional(),
87
- components: zod.z.array(FormComponentSchema),
88
- showTitle: zod.z.boolean().optional(),
89
- showActionLink: zod.z.boolean().optional(),
90
- editText: zod.z.string().optional(),
91
- cancelText: zod.z.string().optional(),
92
- saveText: zod.z.string().optional(),
93
- // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
94
- genericTriggerActions: zod.z.any().optional(),
95
- visibilityConditions: zod.z.unknown().optional(),
96
- triggerContexts: zod.z.object({
97
- supportsSectionSave: zod.z.boolean(),
98
- showSaveButton: zod.z.boolean(),
99
- autoSaveOnNavigate: zod.z.boolean()
100
- }).optional(),
101
- fieldValidation: zod.z.unknown().optional()
102
- // Complex nested structure, validate at runtime
103
- }).passthrough();
104
- const StepNavigationSchema = zod.z.object({
105
- next: zod.z.object({
106
- label: zod.z.string(),
107
- enabled: zod.z.boolean()
108
- }),
109
- previous: zod.z.object({
110
- label: zod.z.string(),
111
- enabled: zod.z.boolean()
112
- })
113
- });
114
- const StepLoaderConfigSchema = zod.z.object({
115
- label: zod.z.string().optional(),
116
- showPercentage: zod.z.boolean().optional(),
117
- duration: zod.z.number().optional(),
118
- size: zod.z.enum(["sm", "md", "lg"]).optional(),
119
- variant: zod.z.enum(["default", "minimal", "branded", "striped"]).optional(),
120
- animationSpeed: zod.z.enum(["slow", "normal", "fast"]).optional(),
121
- completionMessage: zod.z.string().optional(),
122
- apiEndpoint: zod.z.object({
123
- endpoint: zod.z.string(),
124
- method: zod.z.enum(["GET", "POST", "PUT", "DELETE"]).optional(),
125
- successStatus: zod.z.union([zod.z.number(), zod.z.array(zod.z.number())]).optional()
126
- }).optional()
127
- }).optional();
128
- const FormStepSchema = zod.z.object({
129
- id: zod.z.string(),
130
- title: zod.z.string(),
131
- displayTitle: zod.z.boolean().optional(),
132
- showStepNumber: zod.z.boolean().optional(),
133
- sections: zod.z.array(FormSectionSchema).optional(),
134
- navigation: StepNavigationSchema,
135
- actions: zod.z.array(zod.z.unknown()).optional(),
136
- // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
137
- genericTriggerActions: zod.z.any().optional(),
138
- waitForLoader: zod.z.boolean().optional(),
139
- loaderConfig: StepLoaderConfigSchema
140
- }).passthrough();
141
- const TemplateStepSchema = zod.z.object({
142
- id: zod.z.string(),
143
- templateId: zod.z.string(),
144
- navigation: StepNavigationSchema.partial().optional(),
145
- readonly: zod.z.boolean().optional(),
146
- title: zod.z.string().optional(),
147
- stepIndex: zod.z.number().optional(),
148
- componentOverrides: zod.z.record(zod.z.unknown()).optional(),
149
- sectionOverrides: zod.z.record(zod.z.unknown()).optional(),
150
- showStepNumber: zod.z.boolean().optional(),
151
- actions: zod.z.array(zod.z.unknown()).optional()
152
- }).passthrough();
153
- const FormWizardConfigSchema = zod.z.object({
154
- schemaVersion: zod.z.number().optional(),
155
- // Version tracking for lazy migration
156
- id: zod.z.string(),
157
- title: zod.z.string(),
158
- description: zod.z.string().optional(),
159
- steps: zod.z.array(zod.z.union([FormStepSchema, TemplateStepSchema])),
160
- validationMessageStyle: zod.z.enum(["withLabel", "simple"]).optional(),
161
- // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
162
- genericTriggerActions: zod.z.any().optional()
163
- }).passthrough();
164
- function validateFormConfig(data) {
165
- return FormWizardConfigSchema.safeParse(data);
166
- }
167
- function getSchemaVersion(config) {
168
- return config?.["schemaVersion"] ?? 1;
169
- }
170
- const TemplateStorageConfigSchema = zod.z.object({
171
- team: zod.z.string()
172
- });
173
- const StoragePathsSchema = zod.z.object({
174
- primaryStorage: zod.z.string(),
175
- fallbackPaths: zod.z.array(zod.z.string()).optional(),
176
- staticAssets: zod.z.string().optional(),
177
- templates: zod.z.union([zod.z.string(), TemplateStorageConfigSchema]).optional()
178
- });
179
- const BackupConfigSchema = zod.z.object({
180
- enabled: zod.z.boolean(),
181
- maxBackups: zod.z.number().int().positive(),
182
- backupPath: zod.z.string()
183
- });
184
- const StorageConfigSchema = zod.z.object({
185
- strategy: zod.z.enum(["filesystem", "memory", "database"]),
186
- paths: StoragePathsSchema,
187
- fileExtension: zod.z.string(),
188
- createDirectories: zod.z.boolean(),
189
- backup: BackupConfigSchema.optional()
190
- });
191
- const ValidationConfigSchema = zod.z.object({
192
- strictMode: zod.z.boolean(),
193
- validateOnLoad: zod.z.boolean(),
194
- allowMigration: zod.z.boolean()
195
- });
196
- const CompatibilitySchema = zod.z.object({
197
- minVersion: zod.z.string(),
198
- maxVersion: zod.z.string()
199
- });
200
- const MetadataConfigSchema = zod.z.object({
201
- version: zod.z.string(),
202
- lastUpdated: zod.z.string().datetime(),
203
- compatibility: CompatibilitySchema
204
- });
205
- const FeaturesConfigSchema = zod.z.object({
206
- autoBackup: zod.z.boolean(),
207
- formTemplates: zod.z.boolean(),
208
- formVersioning: zod.z.boolean(),
209
- formSharing: zod.z.boolean()
210
- });
211
- const MigrationConfigSchema = zod.z.object({
212
- enabled: zod.z.boolean(),
213
- sourceDirectories: zod.z.array(zod.z.string()),
214
- preserveOriginals: zod.z.boolean(),
215
- logMigration: zod.z.boolean()
216
- });
217
- const FormConfigSchema = zod.z.object({
218
- $schema: zod.z.string().optional(),
219
- storage: StorageConfigSchema,
220
- validation: ValidationConfigSchema.optional(),
221
- metadata: MetadataConfigSchema.optional(),
222
- features: FeaturesConfigSchema.optional(),
223
- migration: MigrationConfigSchema.optional()
224
- });
225
- function isTemplateStep$1(step) {
226
- return typeof step === "object" && step !== null && "templateId" in step;
227
- }
228
- function getTemplateSteps(template) {
229
- return template.stepsData || [];
230
- }
231
- function isTemplateDialogConfig$1(config) {
232
- return config && typeof config.template === "object" && typeof config.template.typeId === "string";
233
- }
234
- function isLegacyDialogConfigWithTemplate(config) {
235
- return config && (config.templateTypeId || config.emailVerificationConfig);
72
+ const Alert$2 = React__namespace.forwardRef(
73
+ ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
74
+ "div",
75
+ {
76
+ ref,
77
+ role: "alert",
78
+ className: clsx$g.clsx(
79
+ styles$u.alert,
80
+ styles$u[`variant-${variant ?? "default"}`],
81
+ className
82
+ ),
83
+ ...props
84
+ }
85
+ )
86
+ );
87
+ Alert$2.displayName = "Alert";
88
+ const AlertTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h5", { ref, className: clsx$g.clsx(styles$u.alertTitle, className), ...props }));
89
+ AlertTitle.displayName = "AlertTitle";
90
+ const AlertDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$u.alertDescription, className), ...props }));
91
+ AlertDescription.displayName = "AlertDescription";
92
+ const button = "fb-button_MJLDl";
93
+ const styles$t = {
94
+ button,
95
+ "variant-default": "fb-variant-default_KLx8b",
96
+ "variant-destructive": "fb-variant-destructive_vQKZ2",
97
+ "variant-outline": "fb-variant-outline_1Mb0E",
98
+ "variant-secondary": "fb-variant-secondary_-bohS",
99
+ "variant-ghost": "fb-variant-ghost_qml-f",
100
+ "variant-link": "fb-variant-link_aNj3r",
101
+ "size-default": "fb-size-default_9qKVU",
102
+ "size-sm": "fb-size-sm_MvjvS",
103
+ "size-lg": "fb-size-lg_v6n8j",
104
+ "size-icon": "fb-size-icon_MYsET"
105
+ };
106
+ const Button$1 = React__namespace.forwardRef(
107
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
108
+ const Comp = asChild ? reactSlot.Slot : "button";
109
+ return /* @__PURE__ */ jsxRuntime.jsx(
110
+ Comp,
111
+ {
112
+ className: clsx$g.clsx(
113
+ styles$t.button,
114
+ styles$t[`variant-${variant ?? "default"}`],
115
+ styles$t[`size-${size ?? "default"}`],
116
+ className
117
+ ),
118
+ ref,
119
+ ...props
120
+ }
121
+ );
122
+ }
123
+ );
124
+ Button$1.displayName = "Button";
125
+ const badge = "fb-badge_Q1h-y";
126
+ const styles$s = {
127
+ badge,
128
+ "variant-default": "fb-variant-default_7HL-r",
129
+ "variant-secondary": "fb-variant-secondary_knrZF",
130
+ "variant-destructive": "fb-variant-destructive_YUruN",
131
+ "variant-outline": "fb-variant-outline_EHC5j"
132
+ };
133
+ function Badge({ className, variant, ...props }) {
134
+ return /* @__PURE__ */ jsxRuntime.jsx(
135
+ "div",
136
+ {
137
+ className: clsx$g.clsx(
138
+ styles$s.badge,
139
+ styles$s[`variant-${variant ?? "default"}`],
140
+ className
141
+ ),
142
+ ...props
143
+ }
144
+ );
236
145
  }
237
- const DEFAULT_VALIDATION_MESSAGES = {
238
- required: {
239
- withLabel: (label) => `${label} is verplicht`,
240
- simple: () => "Dit veld is verplicht"
241
- },
242
- minLength: {
243
- withLabel: (label, value) => `${label} moet minimaal ${value} tekens lang zijn`,
244
- simple: (value) => `Dit veld moet minimaal ${value} tekens lang zijn`
245
- },
246
- maxLength: {
247
- withLabel: (label, value) => `${label} moet maximaal ${value} tekens lang zijn`,
248
- simple: (value) => `Dit veld moet maximaal ${value} tekens lang zijn`
249
- },
250
- pattern: {
251
- withLabel: (label) => `${label} formaat is ongeldig`,
252
- simple: () => "Dit veld formaat is ongeldig"
253
- },
254
- email: {
255
- withLabel: (label) => `${label} moet een geldig e-mailadres zijn`,
256
- simple: () => "Dit veld moet een geldig e-mailadres zijn"
257
- },
258
- min: {
259
- withLabel: (label, value) => `${label} moet minimaal ${value} zijn`,
260
- simple: (value) => `Dit veld moet minimaal ${value} zijn`
261
- },
262
- max: {
263
- withLabel: (label, value) => `${label} moet maximaal ${value} zijn`,
264
- simple: (value) => `Dit veld moet maximaal ${value} zijn`
265
- },
266
- minItems: {
267
- withLabel: (label, value) => `${label} moet minimaal ${value} items hebben`,
268
- simple: (value) => `Dit veld moet minimaal ${value} items hebben`
269
- },
270
- maxItems: {
271
- withLabel: (label, value) => `${label} moet maximaal ${value} items hebben`,
272
- simple: (value) => `Dit veld moet maximaal ${value} items hebben`
273
- },
274
- url: {
275
- withLabel: (label) => `${label} moet een geldige URL zijn`,
276
- simple: () => "Dit veld moet een geldige URL zijn"
277
- },
278
- phone: {
279
- withLabel: (label) => `${label} moet een geldig telefoonnummer zijn`,
280
- simple: () => "Dit veld moet een geldig telefoonnummer zijn"
281
- }
146
+ const card$1 = "fb-card_Ry9d9";
147
+ const cardHeader = "fb-cardHeader_exSCY";
148
+ const cardTitle = "fb-cardTitle_mLAib";
149
+ const cardDescription = "fb-cardDescription_iLv2K";
150
+ const cardContent$1 = "fb-cardContent_HJ92K";
151
+ const cardFooter = "fb-cardFooter_BAcjS";
152
+ const styles$r = {
153
+ card: card$1,
154
+ cardHeader,
155
+ cardTitle,
156
+ cardDescription,
157
+ cardContent: cardContent$1,
158
+ cardFooter
282
159
  };
283
- const getValidationMessage = {
284
- // For components that need labeled messages (ValidationBuilder, etc.)
285
- withLabel: (type, label, ...args) => {
286
- const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
287
- return messageConfig.withLabel(label, ...args);
288
- },
289
- // For components that need simple messages (createZodSchema, etc.)
290
- simple: (type, ...args) => {
291
- const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
292
- return messageConfig.simple(...args);
293
- },
294
- // Dynamic message selection based on form configuration (defaults to withLabel)
295
- auto: (type, label, messageStyle = "withLabel", ...args) => {
296
- const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
297
- if (messageStyle === "simple") {
298
- return messageConfig.simple(...args);
299
- }
300
- return messageConfig.withLabel(label, ...args);
301
- }
160
+ const Card$1 = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$r.card, className), ...props }));
161
+ Card$1.displayName = "Card";
162
+ const CardHeader = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$r.cardHeader, className), ...props }));
163
+ CardHeader.displayName = "CardHeader";
164
+ const CardTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: clsx$g.clsx(styles$r.cardTitle, className), ...props }));
165
+ CardTitle.displayName = "CardTitle";
166
+ const CardDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: clsx$g.clsx(styles$r.cardDescription, className), ...props }));
167
+ CardDescription.displayName = "CardDescription";
168
+ const CardContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$r.cardContent, className), ...props }));
169
+ CardContent.displayName = "CardContent";
170
+ const CardFooter = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$r.cardFooter, className), ...props }));
171
+ CardFooter.displayName = "CardFooter";
172
+ const checkbox = "fb-checkbox_wsic0";
173
+ const checkboxIndicator = "fb-checkboxIndicator_31Q4N";
174
+ const styles$q = {
175
+ checkbox,
176
+ checkboxIndicator
302
177
  };
303
- function compileApiRequestBody(config, formData) {
304
- if (config.body) {
305
- if (typeof config.body === "string") {
306
- return interpolateTemplate(config.body, formData);
307
- } else if (typeof config.body === "object") {
308
- const interpolatedBody = interpolateObjectTemplate(config.body, formData);
309
- return JSON.stringify(interpolatedBody);
310
- }
311
- }
312
- if (config.bodyFields) {
313
- const bodyObject = {};
314
- for (const field of config.bodyFields) {
315
- if (!field.key.trim()) continue;
316
- let value;
317
- if (field.type === "static") {
318
- value = field.value;
319
- } else if (field.type === "dynamic" && field.fieldPath) {
320
- value = getValueFromFormData(formData, field.fieldPath);
321
- } else {
322
- value = field.value;
323
- }
324
- setNestedValue(bodyObject, field.key, value);
325
- }
326
- return JSON.stringify(bodyObject);
327
- }
328
- return void 0;
329
- }
330
- function getValueFromFormData(formData, path) {
331
- return path.split(".").reduce((current2, key) => {
332
- return current2?.[key];
333
- }, formData);
334
- }
335
- function interpolateTemplate(template, formData) {
336
- let result = template.replace(/\$\{data\.([^}]+)\}/g, (match, fieldPath) => {
337
- const value = getValueFromFormData(formData, fieldPath);
338
- return value != null ? String(value) : match;
339
- });
340
- result = result.replace(/\$\{([^}]+)\}/g, (match, fieldPath) => {
341
- if (match.includes("data.")) return match;
342
- if (fieldPath.includes(".")) {
343
- const parts = fieldPath.split(".");
344
- const fieldName = parts[parts.length - 1];
345
- const value2 = formData[fieldName];
346
- return value2 != null ? String(value2) : match;
347
- }
348
- const value = getValueFromFormData(formData, fieldPath);
349
- return value != null ? String(value) : match;
350
- });
351
- return result;
352
- }
353
- function interpolateObjectTemplate(obj, formData) {
354
- const result = {};
355
- for (const [key, value] of Object.entries(obj)) {
356
- if (typeof value === "string") {
357
- result[key] = interpolateTemplate(value, formData);
358
- } else if (value && typeof value === "object" && !Array.isArray(value)) {
359
- result[key] = interpolateObjectTemplate(
360
- value,
361
- formData
362
- );
363
- } else if (Array.isArray(value)) {
364
- result[key] = value.map(
365
- (item) => typeof item === "string" ? interpolateTemplate(item, formData) : item && typeof item === "object" ? interpolateObjectTemplate(
366
- item,
367
- formData
368
- ) : item
369
- );
370
- } else {
371
- result[key] = value;
372
- }
373
- }
374
- return result;
375
- }
376
- function setNestedValue(obj, path, value) {
377
- const keys = path.split(".");
378
- const lastKey = keys.pop();
379
- const target = keys.reduce((current2, key) => {
380
- if (typeof current2[key] !== "object" || current2[key] === null) {
381
- current2[key] = {};
382
- }
383
- return current2[key];
384
- }, obj);
385
- target[lastKey] = value;
386
- }
387
- function getAvailableFormFields(steps, currentStepId) {
388
- const fields = [];
389
- const currentStepIndex = steps.findIndex((step) => step.id === currentStepId);
390
- for (let i = 0; i <= currentStepIndex; i++) {
391
- const step = steps[i];
392
- if (!step) continue;
393
- const sections = step.sections || [];
394
- for (const section2 of sections) {
395
- const components = section2.components || [];
396
- for (const component of components) {
397
- if (isInputComponent(component)) {
398
- fields.push({
399
- id: component.id,
400
- label: component.label,
401
- path: component.id,
402
- // For now, use component ID as path
403
- stepTitle: step.title,
404
- stepIndex: i + 1
405
- });
406
- }
407
- }
408
- }
178
+ const Checkbox$2 = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
179
+ CheckboxPrimitive__namespace.Root,
180
+ {
181
+ ref,
182
+ className: clsx$g.clsx(styles$q.checkbox, className),
183
+ ...props,
184
+ children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: styles$q.checkboxIndicator, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: styles$q.checkboxIcon }) })
409
185
  }
410
- return fields;
411
- }
412
- function isInputComponent(component) {
413
- const inputTypes = [
414
- "text",
415
- "email",
416
- "number",
417
- "checkbox",
418
- "radioGroup",
419
- "dropdown"
420
- ];
421
- return inputTypes.includes(component.type);
422
- }
423
- const alert = "fb-alert_5UcaT";
424
- const alertTitle = "fb-alertTitle_-KE5o";
425
- const alertDescription = "fb-alertDescription_cg7Ke";
186
+ ));
187
+ Checkbox$2.displayName = CheckboxPrimitive__namespace.Root.displayName;
188
+ const dialogOverlay = "fb-dialogOverlay_GSMVm";
189
+ const dialogContent$2 = "fb-dialogContent_neUay";
190
+ const dialogClose = "fb-dialogClose_QbWkj";
191
+ const dialogCloseIcon = "fb-dialogCloseIcon_kK8c6";
192
+ const dialogHeader = "fb-dialogHeader_df1-u";
193
+ const dialogTitle = "fb-dialogTitle_FS7k8";
194
+ const dialogDescription = "fb-dialogDescription_uEgTa";
426
195
  const styles$p = {
427
- alert,
428
- "variant-default": "fb-variant-default_yhEpY",
429
- "variant-destructive": "fb-variant-destructive_rafp5",
430
- alertTitle,
431
- alertDescription
196
+ dialogOverlay,
197
+ dialogContent: dialogContent$2,
198
+ dialogClose,
199
+ dialogCloseIcon,
200
+ dialogHeader,
201
+ dialogTitle,
202
+ dialogDescription
432
203
  };
433
- const Alert$2 = React__namespace.forwardRef(
434
- ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
435
- "div",
204
+ const Dialog = DialogPrimitive__namespace.Root;
205
+ const DialogPortal = DialogPrimitive__namespace.Portal;
206
+ const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
207
+ DialogPrimitive__namespace.Overlay,
208
+ {
209
+ ref,
210
+ className: clsx$g.clsx(styles$p.dialogOverlay, className),
211
+ ...props
212
+ }
213
+ ));
214
+ DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
215
+ const DialogContent = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
216
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
217
+ /* @__PURE__ */ jsxRuntime.jsxs(
218
+ DialogPrimitive__namespace.Content,
436
219
  {
437
220
  ref,
438
- role: "alert",
439
- className: clsx$g.clsx(
440
- styles$p.alert,
441
- styles$p[`variant-${variant ?? "default"}`],
442
- className
443
- ),
444
- ...props
445
- }
446
- )
447
- );
448
- Alert$2.displayName = "Alert";
449
- const AlertTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h5", { ref, className: clsx$g.clsx(styles$p.alertTitle, className), ...props }));
450
- AlertTitle.displayName = "AlertTitle";
451
- const AlertDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$p.alertDescription, className), ...props }));
452
- AlertDescription.displayName = "AlertDescription";
453
- const button = "fb-button_MJLDl";
454
- const styles$o = {
455
- button,
456
- "variant-default": "fb-variant-default_KLx8b",
457
- "variant-destructive": "fb-variant-destructive_vQKZ2",
458
- "variant-outline": "fb-variant-outline_1Mb0E",
459
- "variant-secondary": "fb-variant-secondary_-bohS",
460
- "variant-ghost": "fb-variant-ghost_qml-f",
461
- "variant-link": "fb-variant-link_aNj3r",
462
- "size-default": "fb-size-default_9qKVU",
463
- "size-sm": "fb-size-sm_MvjvS",
464
- "size-lg": "fb-size-lg_v6n8j",
465
- "size-icon": "fb-size-icon_MYsET"
466
- };
467
- const Button$1 = React__namespace.forwardRef(
468
- ({ className, variant, size, asChild = false, ...props }, ref) => {
469
- const Comp = asChild ? reactSlot.Slot : "button";
470
- return /* @__PURE__ */ jsxRuntime.jsx(
471
- Comp,
472
- {
473
- className: clsx$g.clsx(
474
- styles$o.button,
475
- styles$o[`variant-${variant ?? "default"}`],
476
- styles$o[`size-${size ?? "default"}`],
477
- className
478
- ),
479
- ref,
480
- ...props
481
- }
482
- );
483
- }
484
- );
485
- Button$1.displayName = "Button";
486
- const badge = "fb-badge_Q1h-y";
487
- const styles$n = {
488
- badge,
489
- "variant-default": "fb-variant-default_7HL-r",
490
- "variant-secondary": "fb-variant-secondary_knrZF",
491
- "variant-destructive": "fb-variant-destructive_YUruN",
492
- "variant-outline": "fb-variant-outline_EHC5j"
493
- };
494
- function Badge({ className, variant, ...props }) {
495
- return /* @__PURE__ */ jsxRuntime.jsx(
496
- "div",
497
- {
498
- className: clsx$g.clsx(
499
- styles$n.badge,
500
- styles$n[`variant-${variant ?? "default"}`],
501
- className
502
- ),
503
- ...props
504
- }
505
- );
506
- }
507
- const card$1 = "fb-card_Ry9d9";
508
- const cardHeader = "fb-cardHeader_exSCY";
509
- const cardTitle = "fb-cardTitle_mLAib";
510
- const cardDescription = "fb-cardDescription_iLv2K";
511
- const cardContent$1 = "fb-cardContent_HJ92K";
512
- const cardFooter = "fb-cardFooter_BAcjS";
513
- const styles$m = {
514
- card: card$1,
515
- cardHeader,
516
- cardTitle,
517
- cardDescription,
518
- cardContent: cardContent$1,
519
- cardFooter
520
- };
521
- const Card$1 = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$m.card, className), ...props }));
522
- Card$1.displayName = "Card";
523
- const CardHeader = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$m.cardHeader, className), ...props }));
524
- CardHeader.displayName = "CardHeader";
525
- const CardTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: clsx$g.clsx(styles$m.cardTitle, className), ...props }));
526
- CardTitle.displayName = "CardTitle";
527
- const CardDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: clsx$g.clsx(styles$m.cardDescription, className), ...props }));
528
- CardDescription.displayName = "CardDescription";
529
- const CardContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$m.cardContent, className), ...props }));
530
- CardContent.displayName = "CardContent";
531
- const CardFooter = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx$g.clsx(styles$m.cardFooter, className), ...props }));
532
- CardFooter.displayName = "CardFooter";
533
- const dialogOverlay = "fb-dialogOverlay_GSMVm";
534
- const dialogContent$2 = "fb-dialogContent_neUay";
535
- const dialogClose = "fb-dialogClose_QbWkj";
536
- const dialogCloseIcon = "fb-dialogCloseIcon_kK8c6";
537
- const dialogHeader = "fb-dialogHeader_df1-u";
538
- const dialogTitle = "fb-dialogTitle_FS7k8";
539
- const dialogDescription = "fb-dialogDescription_uEgTa";
540
- const styles$l = {
541
- dialogOverlay,
542
- dialogContent: dialogContent$2,
543
- dialogClose,
544
- dialogCloseIcon,
545
- dialogHeader,
546
- dialogTitle,
547
- dialogDescription
548
- };
549
- const Dialog = DialogPrimitive__namespace.Root;
550
- const DialogPortal = DialogPrimitive__namespace.Portal;
551
- const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
552
- DialogPrimitive__namespace.Overlay,
553
- {
554
- ref,
555
- className: clsx$g.clsx(styles$l.dialogOverlay, className),
556
- ...props
557
- }
558
- ));
559
- DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
560
- const DialogContent = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
561
- /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
562
- /* @__PURE__ */ jsxRuntime.jsxs(
563
- DialogPrimitive__namespace.Content,
564
- {
565
- ref,
566
- className: clsx$g.clsx(styles$l.dialogContent, className),
567
- ...props,
568
- children: [
569
- children,
570
- /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: styles$l.dialogClose, children: [
571
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: styles$l.dialogCloseIcon }),
572
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Close" })
573
- ] })
574
- ]
221
+ className: clsx$g.clsx(styles$p.dialogContent, className),
222
+ ...props,
223
+ children: [
224
+ children,
225
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: styles$p.dialogClose, children: [
226
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: styles$p.dialogCloseIcon }),
227
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Close" })
228
+ ] })
229
+ ]
575
230
  }
576
231
  )
577
232
  ] }));
@@ -579,13 +234,13 @@ DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
579
234
  const DialogHeader = ({
580
235
  className,
581
236
  ...props
582
- }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$l.dialogHeader, className), ...props });
237
+ }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$p.dialogHeader, className), ...props });
583
238
  DialogHeader.displayName = "DialogHeader";
584
239
  const DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
585
240
  DialogPrimitive__namespace.Title,
586
241
  {
587
242
  ref,
588
- className: clsx$g.clsx(styles$l.dialogTitle, className),
243
+ className: clsx$g.clsx(styles$p.dialogTitle, className),
589
244
  ...props
590
245
  }
591
246
  ));
@@ -594,24 +249,24 @@ const DialogDescription = React__namespace.forwardRef(({ className, ...props },
594
249
  DialogPrimitive__namespace.Description,
595
250
  {
596
251
  ref,
597
- className: clsx$g.clsx(styles$l.dialogDescription, className),
252
+ className: clsx$g.clsx(styles$p.dialogDescription, className),
598
253
  ...props
599
254
  }
600
255
  ));
601
256
  DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
602
257
  const boxContainer = "fb-boxContainer_oXGAN";
603
- const styles$k = {
258
+ const styles$o = {
604
259
  boxContainer
605
260
  };
606
261
  const Box = ({ className, children, ...rest }) => {
607
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$k.boxContainer, className), ...rest, children });
262
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$o.boxContainer, className), ...rest, children });
608
263
  };
609
264
  const luxGridLayoutContainer = "fb-luxGridLayoutContainer_Co4nr";
610
265
  const luxGridLayoutContainerWithoutPadding = "fb-luxGridLayoutContainerWithoutPadding_VpIVN";
611
266
  const luxGridLayoutContainerFullWidth = "fb-luxGridLayoutContainerFullWidth_ROl0Y";
612
267
  const luxGridLayout = "fb-luxGridLayout_Jsul6";
613
268
  const luxGridLayoutFullWidth = "fb-luxGridLayoutFullWidth_0O2LE";
614
- const styles$j = {
269
+ const styles$n = {
615
270
  luxGridLayoutContainer,
616
271
  luxGridLayoutContainerWithoutPadding,
617
272
  luxGridLayoutContainerFullWidth,
@@ -644,9 +299,9 @@ function GridLayout({
644
299
  return /* @__PURE__ */ jsxRuntime.jsx(
645
300
  "div",
646
301
  {
647
- className: clsx$g.clsx(styles$j.luxGridLayoutContainer, {
648
- [styles$j.luxGridLayoutContainerWithoutPadding]: !containerPadding,
649
- [styles$j.luxGridLayoutContainerFullWidth]: fullWidth
302
+ className: clsx$g.clsx(styles$n.luxGridLayoutContainer, {
303
+ [styles$n.luxGridLayoutContainerWithoutPadding]: !containerPadding,
304
+ [styles$n.luxGridLayoutContainerFullWidth]: fullWidth
650
305
  }),
651
306
  style: {
652
307
  "--grid-container-background-color": containerBackGroundColor
@@ -656,9 +311,9 @@ function GridLayout({
656
311
  {
657
312
  ...otherProps,
658
313
  className: clsx$g.clsx(
659
- styles$j.luxGridLayout,
314
+ styles$n.luxGridLayout,
660
315
  {
661
- [styles$j.luxGridLayoutFullWidth]: fullWidth
316
+ [styles$n.luxGridLayoutFullWidth]: fullWidth
662
317
  },
663
318
  className
664
319
  ),
@@ -675,7 +330,7 @@ function GridLayout({
675
330
  );
676
331
  }
677
332
  const gridLayoutColumn = "fb-gridLayoutColumn_5TCzp";
678
- const styles$i = {
333
+ const styles$m = {
679
334
  gridLayoutColumn
680
335
  };
681
336
  function GridLayoutColumn({
@@ -698,7 +353,7 @@ function GridLayoutColumn({
698
353
  ...style,
699
354
  ...cssVariables
700
355
  },
701
- className: clsx$g.clsx(className, styles$i.gridLayoutColumn),
356
+ className: clsx$g.clsx(className, styles$m.gridLayoutColumn),
702
357
  children
703
358
  }
704
359
  );
@@ -710,7 +365,7 @@ const rightColumn = "fb-rightColumn_P0J6U";
710
365
  const footerSection = "fb-footerSection_eW4js";
711
366
  const contentBorder = "fb-contentBorder_yYFFn";
712
367
  const mainContent = "fb-mainContent_9ZW4m";
713
- const styles$h = {
368
+ const styles$l = {
714
369
  formLayoutWrapper,
715
370
  titleSection,
716
371
  leftColumn,
@@ -801,7 +456,7 @@ function FormLayoutBase({
801
456
  const leftWidth = hasLeftColumn ? leftColumnWidth : 0;
802
457
  const mainContentStart = leftWidth + 1;
803
458
  const mainContentEnd = 10;
804
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...otherProps, className: clsx$g.clsx(styles$h.formLayoutWrapper, className), children: /* @__PURE__ */ jsxRuntime.jsxs(
459
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...otherProps, className: clsx$g.clsx(styles$l.formLayoutWrapper, className), children: /* @__PURE__ */ jsxRuntime.jsxs(
805
460
  GridLayout,
806
461
  {
807
462
  containerBackGroundColor,
@@ -810,13 +465,13 @@ function FormLayoutBase({
810
465
  columnGap,
811
466
  fullWidth,
812
467
  children: [
813
- title2 && /* @__PURE__ */ jsxRuntime.jsx(GridLayoutColumn, { startSlice: 4, endSlice: 13, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$h.titleSection), children: title2 }) }),
468
+ title2 && /* @__PURE__ */ jsxRuntime.jsx(GridLayoutColumn, { startSlice: 4, endSlice: 13, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$l.titleSection), children: title2 }) }),
814
469
  hasLeftColumn && leftColumn2 && /* @__PURE__ */ jsxRuntime.jsx(GridLayoutColumn, { startSlice: 1, endSlice: leftColumnWidth + 1, children: /* @__PURE__ */ jsxRuntime.jsx(
815
470
  "div",
816
471
  {
817
472
  className: clsx$g.clsx(
818
- styles$h.leftColumn,
819
- showContentBorder && styles$h.contentBorder
473
+ styles$l.leftColumn,
474
+ showContentBorder && styles$l.contentBorder
820
475
  ),
821
476
  children: leftColumn2
822
477
  }
@@ -827,8 +482,8 @@ function FormLayoutBase({
827
482
  startSlice: mainContentStart,
828
483
  endSlice: mainContentEnd,
829
484
  className: clsx$g.clsx(
830
- styles$h.mainContent,
831
- showContentBorder && styles$h.contentBorder
485
+ styles$l.mainContent,
486
+ showContentBorder && styles$l.contentBorder
832
487
  ),
833
488
  children: /* @__PURE__ */ jsxRuntime.jsx(Box, { children: mainContent2 })
834
489
  }
@@ -837,13 +492,13 @@ function FormLayoutBase({
837
492
  Box,
838
493
  {
839
494
  className: clsx$g.clsx(
840
- styles$h.rightColumn,
841
- showContentBorder && styles$h.contentBorder
495
+ styles$l.rightColumn,
496
+ showContentBorder && styles$l.contentBorder
842
497
  ),
843
498
  children: rightColumn2
844
499
  }
845
500
  ) }),
846
- footerContent && /* @__PURE__ */ jsxRuntime.jsx(GridLayoutColumn, { startSlice: 4, endSlice: 10, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$h.footerSection), children: footerContent }) })
501
+ footerContent && /* @__PURE__ */ jsxRuntime.jsx(GridLayoutColumn, { startSlice: 4, endSlice: 10, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$l.footerSection), children: footerContent }) })
847
502
  ]
848
503
  }
849
504
  ) });
@@ -1064,12 +719,12 @@ function clsx$8() {
1064
719
  for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r$8(e)) && (n && (n += " "), n += t);
1065
720
  return n;
1066
721
  }
1067
- const FormField$2 = React.forwardRef(({ className, children, description, errorMessage: errorMessage2, input, invalid, label, type, ...restProps }, ref) => jsxRuntime.jsxs("div", { ...restProps, ref, className: clsx$8("utrecht-form-field", {
722
+ const FormField$2 = React.forwardRef(({ className, children, description, errorMessage: errorMessage2, input: input2, invalid, label, type, ...restProps }, ref) => jsxRuntime.jsxs("div", { ...restProps, ref, className: clsx$8("utrecht-form-field", {
1068
723
  "utrecht-form-field--invalid": invalid,
1069
724
  "utrecht-form-field--checkbox": type === "checkbox",
1070
725
  "utrecht-form-field--radio": type === "radio",
1071
726
  "utrecht-form-field--text": !type || type === "text"
1072
- }, className), children: [label && jsxRuntime.jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsxRuntime.jsx("div", { className: "utrecht-form-field__description", children: description }), input && jsxRuntime.jsx("div", { className: "utrecht-form-field__input", children: input }), errorMessage2 && jsxRuntime.jsx("div", { className: "utrecht-form-field__error-message", children: errorMessage2 }), children] }));
727
+ }, className), children: [label && jsxRuntime.jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsxRuntime.jsx("div", { className: "utrecht-form-field__description", children: description }), input2 && jsxRuntime.jsx("div", { className: "utrecht-form-field__input", children: input2 }), errorMessage2 && jsxRuntime.jsx("div", { className: "utrecht-form-field__error-message", children: errorMessage2 }), children] }));
1073
728
  FormField$2.displayName = "FormField";
1074
729
  function r$5$1(e) {
1075
730
  var t, f, n = "";
@@ -1144,12 +799,12 @@ function clsx$2$1() {
1144
799
  for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r$2$1(e)) && (n && (n += " "), n += t);
1145
800
  return n;
1146
801
  }
1147
- const FormField$1 = React.forwardRef(({ className, children, description, errorMessage: errorMessage2, input, invalid, label, type, ...restProps }, ref) => jsxRuntime.jsxs("div", { ...restProps, ref, className: clsx$2$1("utrecht-form-field", {
802
+ const FormField$1 = React.forwardRef(({ className, children, description, errorMessage: errorMessage2, input: input2, invalid, label, type, ...restProps }, ref) => jsxRuntime.jsxs("div", { ...restProps, ref, className: clsx$2$1("utrecht-form-field", {
1148
803
  "utrecht-form-field--invalid": invalid,
1149
804
  "utrecht-form-field--checkbox": type === "checkbox",
1150
805
  "utrecht-form-field--radio": type === "radio",
1151
806
  "utrecht-form-field--text": !type || type === "text"
1152
- }, className), children: [label && jsxRuntime.jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsxRuntime.jsx("div", { className: "utrecht-form-field__description", children: description }), input && jsxRuntime.jsx("div", { className: "utrecht-form-field__input", children: input }), errorMessage2 && jsxRuntime.jsx("div", { className: "utrecht-form-field__error-message", children: errorMessage2 }), children] }));
807
+ }, className), children: [label && jsxRuntime.jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsxRuntime.jsx("div", { className: "utrecht-form-field__description", children: description }), input2 && jsxRuntime.jsx("div", { className: "utrecht-form-field__input", children: input2 }), errorMessage2 && jsxRuntime.jsx("div", { className: "utrecht-form-field__error-message", children: errorMessage2 }), children] }));
1153
808
  FormField$1.displayName = "FormField";
1154
809
  function r$1$1(e) {
1155
810
  var t, f, n = "";
@@ -2439,7 +2094,7 @@ function _objectSpread$X(e) {
2439
2094
  }
2440
2095
  return e;
2441
2096
  }
2442
- var Textarea = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
2097
+ var Textarea$1 = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
2443
2098
  var dir = _ref.dir, disabled2 = _ref.disabled, inputRequired = _ref.inputRequired, invalid = _ref.invalid, readOnly = _ref.readOnly, required = _ref.required, className = _ref.className, restProps = _objectWithoutProperties(_ref, _excluded$W);
2444
2099
  return jsxRuntime.jsx("textarea", _objectSpread$X(_objectSpread$X({}, restProps), {}, {
2445
2100
  ref,
@@ -2452,7 +2107,7 @@ var Textarea = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
2452
2107
  "aria-invalid": invalid || void 0
2453
2108
  }));
2454
2109
  });
2455
- Textarea.displayName = "Textarea";
2110
+ Textarea$1.displayName = "Textarea";
2456
2111
  var _excluded$V = ["autoComplete", "children", "cols", "defaultValue", "description", "disabled", "errorMessage", "inputDir", "inputRequired", "invalid", "label", "maxLength", "minLength", "name", "onBlur", "onChange", "onFocus", "onInput", "placeholder", "readOnly", "required", "rows", "status", "inputRef", "value"];
2457
2112
  function ownKeys$W(e, r2) {
2458
2113
  var t = Object.keys(e);
@@ -2501,7 +2156,7 @@ var FormFieldTextarea = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
2501
2156
  children: errorMessage2
2502
2157
  }), jsxRuntime.jsx("div", {
2503
2158
  className: "utrecht-form-field__input",
2504
- children: jsxRuntime.jsx(Textarea, {
2159
+ children: jsxRuntime.jsx(Textarea$1, {
2505
2160
  "aria-describedby": clsx$g(_defineProperty(_defineProperty(_defineProperty({}, descriptionId, description), errorMessageId, invalid), statusId, status)) || void 0,
2506
2161
  autoComplete,
2507
2162
  cols,
@@ -3996,7 +3651,7 @@ function _objectSpread$l(e) {
3996
3651
  }
3997
3652
  return e;
3998
3653
  }
3999
- var Select = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
3654
+ var Select$1 = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
4000
3655
  var busy = _ref.busy, invalid = _ref.invalid, required = _ref.required, className = _ref.className, noscript = _ref.noscript, children = _ref.children, restProps = _objectWithoutProperties(_ref, _excluded$l);
4001
3656
  return jsxRuntime.jsx("select", _objectSpread$l(_objectSpread$l({
4002
3657
  "aria-busy": busy || void 0,
@@ -4009,7 +3664,7 @@ var Select = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
4009
3664
  children
4010
3665
  }));
4011
3666
  });
4012
- Select.displayName = "Select";
3667
+ Select$1.displayName = "Select";
4013
3668
  var SelectOption = /* @__PURE__ */ React.forwardRef(function(_ref2, ref) {
4014
3669
  var disabled2 = _ref2.disabled, invalid = _ref2.invalid, value = _ref2.value, children = _ref2.children, className = _ref2.className, restProps = _objectWithoutProperties(_ref2, _excluded2$1);
4015
3670
  return jsxRuntime.jsx("option", _objectSpread$l(_objectSpread$l({}, restProps), {}, {
@@ -7942,10 +7597,10 @@ function FormFieldWrapper({
7942
7597
  invalid,
7943
7598
  errorMessage: errorMessage2,
7944
7599
  className = "",
7945
- input
7600
+ input: input2
7946
7601
  }) {
7947
7602
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `form-field-wrapper ${className}`, children: [
7948
- input,
7603
+ input2,
7949
7604
  invalid && errorMessage2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "form-field-error mt-2 text-sm text-red-600", children: errorMessage2 })
7950
7605
  ] });
7951
7606
  }
@@ -7953,7 +7608,7 @@ const container = "fb-container_p6qC4";
7953
7608
  const disabled = "fb-disabled_EuvTp";
7954
7609
  const prevButtonDisabled = "fb-prevButtonDisabled_Wj2Qp";
7955
7610
  const additionalContent = "fb-additionalContent_0tppE";
7956
- const styles$g = {
7611
+ const styles$k = {
7957
7612
  container,
7958
7613
  disabled,
7959
7614
  prevButtonDisabled,
@@ -7976,7 +7631,7 @@ const FlowPrevButton = ({
7976
7631
  appearance: "subtle-button",
7977
7632
  onClick: handleClick,
7978
7633
  disabled: disabled2 || isDisplayOnly,
7979
- className: isDisplayOnly ? styles$g.prevButtonDisabled : "",
7634
+ className: isDisplayOnly ? styles$k.prevButtonDisabled : "",
7980
7635
  ...otherProps,
7981
7636
  children: [
7982
7637
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, {}),
@@ -7996,7 +7651,7 @@ const FormHeaderBase = ({
7996
7651
  isDisplayOnly = false
7997
7652
  }) => {
7998
7653
  const isDisabled = isEditing || isDisplayOnly;
7999
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx$g.clsx(styles$g.container, isDisabled && styles$g.disabled), children: [
7654
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx$g.clsx(styles$k.container, isDisabled && styles$k.disabled), children: [
8000
7655
  navigation?.previous?.enabled && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
8001
7656
  FlowPrevButton,
8002
7657
  {
@@ -8010,9 +7665,27 @@ const FormHeaderBase = ({
8010
7665
  showStepNumber && stepNumber2 ? /* @__PURE__ */ jsxRuntime.jsx(PreHeading, { heading: title2 ? /* @__PURE__ */ jsxRuntime.jsx(Heading7, { level: 2, children: title2 }) : /* @__PURE__ */ jsxRuntime.jsx(Heading7, { level: 2, children: "" }), children: typeof stepNumber2 === "number" ? `Stap ${stepNumber2}` : `Stap ${stepNumber2?.current} van ${stepNumber2?.total}` }) : null,
8011
7666
  title2 && !(showStepNumber && stepNumber2) && /* @__PURE__ */ jsxRuntime.jsx(Heading7, { level: 2, children: title2 })
8012
7667
  ] }),
8013
- children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$g.additionalContent, children })
7668
+ children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$k.additionalContent, children })
8014
7669
  ] });
8015
7670
  };
7671
+ const input = "fb-input_RJ7IM";
7672
+ const styles$j = {
7673
+ input
7674
+ };
7675
+ const Input = React__namespace.forwardRef(
7676
+ ({ className, type, ...props }, ref) => {
7677
+ return /* @__PURE__ */ jsxRuntime.jsx(
7678
+ "input",
7679
+ {
7680
+ type,
7681
+ className: clsx$g.clsx(styles$j.input, className),
7682
+ ref,
7683
+ ...props
7684
+ }
7685
+ );
7686
+ }
7687
+ );
7688
+ Input.displayName = "Input";
8016
7689
  function useProgressAnimation(targetProgress, duration, onUpdate, isActive = true) {
8017
7690
  const stateRef = React.useRef({
8018
7691
  displayProgress: 0,
@@ -8071,7 +7744,7 @@ const completionMessage = "fb-completionMessage_OyQ9C";
8071
7744
  const errorMessage = "fb-errorMessage_B8dGO";
8072
7745
  const errorContent = "fb-errorContent_2TAc5";
8073
7746
  const retryButton = "fb-retryButton_0HfjY";
8074
- const styles$f = {
7747
+ const styles$i = {
8075
7748
  wrapper,
8076
7749
  progress,
8077
7750
  progressLabel,
@@ -8139,7 +7812,7 @@ const ProgressLoaderBar = React__namespace.forwardRef(
8139
7812
  return /* @__PURE__ */ jsxRuntime.jsxs(
8140
7813
  "div",
8141
7814
  {
8142
- className: clsx$g.clsx(styles$f.wrapper, className),
7815
+ className: clsx$g.clsx(styles$i.wrapper, className),
8143
7816
  role: "progressbar",
8144
7817
  "aria-label": props["aria-label"] || label || "Progress",
8145
7818
  "aria-valuenow": mode === "determinate" ? roundedProgress : void 0,
@@ -8152,7 +7825,7 @@ const ProgressLoaderBar = React__namespace.forwardRef(
8152
7825
  "progress",
8153
7826
  {
8154
7827
  ref,
8155
- className: styles$f.progress,
7828
+ className: styles$i.progress,
8156
7829
  value: displayProgress,
8157
7830
  max: 100,
8158
7831
  style: {
@@ -8160,17 +7833,17 @@ const ProgressLoaderBar = React__namespace.forwardRef(
8160
7833
  }
8161
7834
  }
8162
7835
  ),
8163
- (label || showPercentage) && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: styles$f.progressLabel, children: [
7836
+ (label || showPercentage) && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: styles$i.progressLabel, children: [
8164
7837
  label,
8165
7838
  label && showPercentage && mode === "determinate" && " - ",
8166
7839
  showPercentage && mode === "determinate" && `${roundedProgress}%`
8167
7840
  ] }),
8168
- status === "complete" && completionConfig?.showMessage?.enabled && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$f.completionMessage, children: [
7841
+ status === "complete" && completionConfig?.showMessage?.enabled && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$i.completionMessage, children: [
8169
7842
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4" }),
8170
7843
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: completionConfig.showMessage.text })
8171
7844
  ] }),
8172
- status === "error" && errorConfig?.showErrorMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$f.errorMessage, children: [
8173
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$f.errorContent, children: [
7845
+ status === "error" && errorConfig?.showErrorMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$i.errorMessage, children: [
7846
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$i.errorContent, children: [
8174
7847
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4" }),
8175
7848
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: errorConfig.errorText })
8176
7849
  ] }),
@@ -8179,7 +7852,7 @@ const ProgressLoaderBar = React__namespace.forwardRef(
8179
7852
  {
8180
7853
  type: "button",
8181
7854
  onClick: onRetry,
8182
- className: styles$f.retryButton,
7855
+ className: styles$i.retryButton,
8183
7856
  children: [
8184
7857
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-3 w-3" }),
8185
7858
  errorConfig.retryButtonText
@@ -8193,6 +7866,166 @@ const ProgressLoaderBar = React__namespace.forwardRef(
8193
7866
  }
8194
7867
  );
8195
7868
  ProgressLoaderBar.displayName = "ProgressLoaderBar";
7869
+ const radioGroup = "fb-radioGroup_PqpPn";
7870
+ const radioGroupItem = "fb-radioGroupItem_r91M1";
7871
+ const radioIndicator = "fb-radioIndicator_PFyGX";
7872
+ const radioIndicatorIcon = "fb-radioIndicatorIcon_vSsbY";
7873
+ const styles$h = {
7874
+ radioGroup,
7875
+ radioGroupItem,
7876
+ radioIndicator,
7877
+ radioIndicatorIcon
7878
+ };
7879
+ const RadioGroup = React__namespace.forwardRef(({ className, ...props }, ref) => {
7880
+ return /* @__PURE__ */ jsxRuntime.jsx(
7881
+ RadioGroupPrimitive__namespace.Root,
7882
+ {
7883
+ className: clsx$g.clsx(styles$h.radioGroup, className),
7884
+ ...props,
7885
+ ref
7886
+ }
7887
+ );
7888
+ });
7889
+ RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
7890
+ const RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
7891
+ return /* @__PURE__ */ jsxRuntime.jsx(
7892
+ RadioGroupPrimitive__namespace.Item,
7893
+ {
7894
+ ref,
7895
+ className: clsx$g.clsx(styles$h.radioGroupItem, className),
7896
+ ...props,
7897
+ children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: styles$h.radioIndicator, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: styles$h.radioIndicatorIcon }) })
7898
+ }
7899
+ );
7900
+ });
7901
+ RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
7902
+ const selectTrigger = "fb-selectTrigger_dj84x";
7903
+ const selectTriggerIcon = "fb-selectTriggerIcon_V8dav";
7904
+ const selectScrollUpButton = "fb-selectScrollUpButton_c6WZR";
7905
+ const selectScrollDownButton = "fb-selectScrollDownButton_kmWY4";
7906
+ const selectScrollIcon = "fb-selectScrollIcon_IZbZG";
7907
+ const selectContent = "fb-selectContent_uJ-ZX";
7908
+ const popper = "fb-popper_uKkq9";
7909
+ const selectViewport = "fb-selectViewport_wcTaR";
7910
+ const selectLabel = "fb-selectLabel_hb7ig";
7911
+ const selectItem = "fb-selectItem_f23oZ";
7912
+ const selectItemIndicator = "fb-selectItemIndicator_PD-WQ";
7913
+ const selectItemIndicatorIcon = "fb-selectItemIndicatorIcon_kgB1I";
7914
+ const selectSeparator = "fb-selectSeparator_DS7X2";
7915
+ const styles$g = {
7916
+ selectTrigger,
7917
+ selectTriggerIcon,
7918
+ selectScrollUpButton,
7919
+ selectScrollDownButton,
7920
+ selectScrollIcon,
7921
+ selectContent,
7922
+ popper,
7923
+ selectViewport,
7924
+ selectLabel,
7925
+ selectItem,
7926
+ selectItemIndicator,
7927
+ selectItemIndicatorIcon,
7928
+ selectSeparator
7929
+ };
7930
+ const Select = SelectPrimitive__namespace.Root;
7931
+ const SelectValue = SelectPrimitive__namespace.Value;
7932
+ const SelectTrigger = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7933
+ SelectPrimitive__namespace.Trigger,
7934
+ {
7935
+ ref,
7936
+ className: clsx$g.clsx(styles$g.selectTrigger, className),
7937
+ ...props,
7938
+ children: [
7939
+ children,
7940
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: styles$g.selectTriggerIcon }) })
7941
+ ]
7942
+ }
7943
+ ));
7944
+ SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
7945
+ const SelectScrollUpButton = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7946
+ SelectPrimitive__namespace.ScrollUpButton,
7947
+ {
7948
+ ref,
7949
+ className: clsx$g.clsx(styles$g.selectScrollUpButton, className),
7950
+ ...props,
7951
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: styles$g.selectScrollIcon })
7952
+ }
7953
+ ));
7954
+ SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
7955
+ const SelectScrollDownButton = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7956
+ SelectPrimitive__namespace.ScrollDownButton,
7957
+ {
7958
+ ref,
7959
+ className: clsx$g.clsx(styles$g.selectScrollDownButton, className),
7960
+ ...props,
7961
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: styles$g.selectScrollIcon })
7962
+ }
7963
+ ));
7964
+ SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
7965
+ const SelectContent = React__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
7966
+ SelectPrimitive__namespace.Content,
7967
+ {
7968
+ ref,
7969
+ className: clsx$g.clsx(
7970
+ styles$g.selectContent,
7971
+ position === "popper" && styles$g.popper,
7972
+ className
7973
+ ),
7974
+ position,
7975
+ avoidCollisions: true,
7976
+ collisionPadding: 10,
7977
+ sideOffset: 5,
7978
+ alignOffset: 0,
7979
+ hideWhenDetached: false,
7980
+ ...props,
7981
+ children: [
7982
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
7983
+ /* @__PURE__ */ jsxRuntime.jsx(
7984
+ SelectPrimitive__namespace.Viewport,
7985
+ {
7986
+ className: clsx$g.clsx(
7987
+ styles$g.selectViewport,
7988
+ position === "popper" && styles$g.popper
7989
+ ),
7990
+ children
7991
+ }
7992
+ ),
7993
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
7994
+ ]
7995
+ }
7996
+ ) }));
7997
+ SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
7998
+ const SelectLabel = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7999
+ SelectPrimitive__namespace.Label,
8000
+ {
8001
+ ref,
8002
+ className: clsx$g.clsx(styles$g.selectLabel, className),
8003
+ ...props
8004
+ }
8005
+ ));
8006
+ SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
8007
+ const SelectItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
8008
+ SelectPrimitive__namespace.Item,
8009
+ {
8010
+ ref,
8011
+ className: clsx$g.clsx(styles$g.selectItem, className),
8012
+ ...props,
8013
+ children: [
8014
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$g.selectItemIndicator, children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: styles$g.selectItemIndicatorIcon }) }) }),
8015
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
8016
+ ]
8017
+ }
8018
+ ));
8019
+ SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
8020
+ const SelectSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8021
+ SelectPrimitive__namespace.Separator,
8022
+ {
8023
+ ref,
8024
+ className: clsx$g.clsx(styles$g.selectSeparator, className),
8025
+ ...props
8026
+ }
8027
+ ));
8028
+ SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
8196
8029
  const sheetOverlay = "fb-sheetOverlay_2nFRz";
8197
8030
  const sheetOverlayFadeIn = "fb-sheetOverlayFadeIn_AS-42";
8198
8031
  const sheetOverlayFadeOut = "fb-sheetOverlayFadeOut_Y-hE4";
@@ -8211,7 +8044,7 @@ const sheetHeader = "fb-sheetHeader_w9TtP";
8211
8044
  const sheetFooter = "fb-sheetFooter_XN1p0";
8212
8045
  const sheetTitle = "fb-sheetTitle_F6nNH";
8213
8046
  const sheetDescription = "fb-sheetDescription_AzWJb";
8214
- const styles$e = {
8047
+ const styles$f = {
8215
8048
  sheetOverlay,
8216
8049
  sheetOverlayFadeIn,
8217
8050
  sheetOverlayFadeOut,
@@ -8240,7 +8073,7 @@ const SheetPortal = DialogPrimitive__namespace.Portal;
8240
8073
  const SheetOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8241
8074
  DialogPrimitive__namespace.Overlay,
8242
8075
  {
8243
- className: clsx$g.clsx(styles$e.sheetOverlay, className),
8076
+ className: clsx$g.clsx(styles$f.sheetOverlay, className),
8244
8077
  ...props,
8245
8078
  ref
8246
8079
  }
@@ -8253,15 +8086,15 @@ const SheetContent = React__namespace.forwardRef(({ side = "right", className, c
8253
8086
  {
8254
8087
  ref,
8255
8088
  className: clsx$g.clsx(
8256
- styles$e.sheetContent,
8257
- styles$e[`side-${side}`],
8089
+ styles$f.sheetContent,
8090
+ styles$f[`side-${side}`],
8258
8091
  className
8259
8092
  ),
8260
8093
  ...props,
8261
8094
  children: [
8262
8095
  children,
8263
- /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: styles$e.sheetClose, children: [
8264
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: styles$e.sheetCloseIcon }),
8096
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: styles$f.sheetClose, children: [
8097
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: styles$f.sheetCloseIcon }),
8265
8098
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Close" })
8266
8099
  ] })
8267
8100
  ]
@@ -8272,13 +8105,13 @@ SheetContent.displayName = DialogPrimitive__namespace.Content.displayName;
8272
8105
  const SheetHeader = ({
8273
8106
  className,
8274
8107
  ...props
8275
- }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$e.sheetHeader, className), ...props });
8108
+ }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx$g.clsx(styles$f.sheetHeader, className), ...props });
8276
8109
  SheetHeader.displayName = "SheetHeader";
8277
8110
  const SheetTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8278
8111
  DialogPrimitive__namespace.Title,
8279
8112
  {
8280
8113
  ref,
8281
- className: clsx$g.clsx(styles$e.sheetTitle, className),
8114
+ className: clsx$g.clsx(styles$f.sheetTitle, className),
8282
8115
  ...props
8283
8116
  }
8284
8117
  ));
@@ -8287,11 +8120,28 @@ const SheetDescription = React__namespace.forwardRef(({ className, ...props }, r
8287
8120
  DialogPrimitive__namespace.Description,
8288
8121
  {
8289
8122
  ref,
8290
- className: clsx$g.clsx(styles$e.sheetDescription, className),
8123
+ className: clsx$g.clsx(styles$f.sheetDescription, className),
8291
8124
  ...props
8292
8125
  }
8293
8126
  ));
8294
8127
  SheetDescription.displayName = DialogPrimitive__namespace.Description.displayName;
8128
+ const textarea = "fb-textarea_p4K5i";
8129
+ const styles$e = {
8130
+ textarea
8131
+ };
8132
+ const Textarea = React__namespace.forwardRef(
8133
+ ({ className, ...props }, ref) => {
8134
+ return /* @__PURE__ */ jsxRuntime.jsx(
8135
+ "textarea",
8136
+ {
8137
+ className: clsx$g.clsx(styles$e.textarea, className),
8138
+ ref,
8139
+ ...props
8140
+ }
8141
+ );
8142
+ }
8143
+ );
8144
+ Textarea.displayName = "Textarea";
8295
8145
  const vcContainer = "fb-vcContainer_oHl8H";
8296
8146
  const vcInput = "fb-vcInput_Nb8NL";
8297
8147
  const vcGroup = "fb-vcGroup_5z3tY";
@@ -8369,33 +8219,33 @@ const ValidationCode = React__namespace.forwardRef(
8369
8219
  []
8370
8220
  );
8371
8221
  React__namespace.useEffect(() => {
8372
- const input = inputRef.current;
8222
+ const input2 = inputRef.current;
8373
8223
  const container2 = containerRef.current;
8374
- if (!input || !container2 && input == null) {
8224
+ if (!input2 || !container2 && input2 == null) {
8375
8225
  return;
8376
8226
  }
8377
- if (initialLoadRef.current.value !== input.value) {
8378
- initialLoadRef.current.onChange(input.value);
8227
+ if (initialLoadRef.current.value !== input2.value) {
8228
+ initialLoadRef.current.onChange(input2.value);
8379
8229
  }
8380
8230
  inputMetadataRef.current.prev = [
8381
- input.selectionStart,
8382
- input.selectionEnd,
8383
- input.selectionDirection
8231
+ input2.selectionStart,
8232
+ input2.selectionEnd,
8233
+ input2.selectionDirection
8384
8234
  ];
8385
8235
  function onDocumentSelectionChange() {
8386
- if (document.activeElement !== input) {
8236
+ if (document.activeElement !== input2) {
8387
8237
  setMirrorSelectionStart(null);
8388
8238
  setMirrorSelectionEnd(null);
8389
8239
  return;
8390
8240
  }
8391
- if (!input) {
8241
+ if (!input2) {
8392
8242
  return;
8393
8243
  }
8394
- const _s = input.selectionStart;
8395
- const _e = input.selectionEnd;
8396
- const _dir = input.selectionDirection;
8397
- const _ml = input.maxLength;
8398
- const _val = input.value;
8244
+ const _s = input2.selectionStart;
8245
+ const _e = input2.selectionEnd;
8246
+ const _dir = input2.selectionDirection;
8247
+ const _ml = input2.maxLength;
8248
+ const _val = input2.value;
8399
8249
  const _prev = inputMetadataRef.current.prev;
8400
8250
  let start = -1;
8401
8251
  let end = -1;
@@ -8485,8 +8335,8 @@ const ValidationCode = React__namespace.forwardRef(
8485
8335
  }, [maxLength]);
8486
8336
  const _pasteListener = React__namespace.useCallback(
8487
8337
  (e) => {
8488
- const input = inputRef.current;
8489
- if (!initialLoadRef.current.isIOS || !e.clipboardData || !input) {
8338
+ const input2 = inputRef.current;
8339
+ if (!initialLoadRef.current.isIOS || !e.clipboardData || !input2) {
8490
8340
  return;
8491
8341
  }
8492
8342
  const content2 = e.clipboardData.getData("text/plain");
@@ -8499,11 +8349,11 @@ const ValidationCode = React__namespace.forwardRef(
8499
8349
  if (newValue.length > 0 && regexp && !regexp.test(newValue)) {
8500
8350
  return;
8501
8351
  }
8502
- input.value = newValue;
8352
+ input2.value = newValue;
8503
8353
  onChange(newValue);
8504
8354
  const _start = Math.min(newValue.length, maxLength - 1);
8505
8355
  const _end = newValue.length;
8506
- input.setSelectionRange(_start, _end);
8356
+ input2.setSelectionRange(_start, _end);
8507
8357
  setMirrorSelectionStart(_start);
8508
8358
  setMirrorSelectionEnd(_end);
8509
8359
  },
@@ -8616,89 +8466,456 @@ const DEFAULT_VALUES = {
8616
8466
  const getDefaultValue = (componentType) => {
8617
8467
  return DEFAULT_VALUES[componentType] ?? "";
8618
8468
  };
8619
- function resolveTemplateDialog(actionConfig) {
8620
- if (actionConfig.template?.typeId === "verify-dialog") {
8621
- const templateConfig = actionConfig.template.config;
8622
- return {
8623
- title: templateConfig.title,
8624
- content: templateConfig.description,
8625
- type: "modal",
8626
- buttons: [
8627
- {
8628
- id: "cancel-btn",
8629
- label: templateConfig.cancelButtonLabel,
8630
- variant: "secondary",
8631
- action: templateConfig.onCancelAction || { type: "close" }
8632
- },
8633
- {
8634
- id: "verify-btn",
8635
- label: templateConfig.verifyButtonLabel,
8636
- variant: "primary",
8637
- action: { type: "custom", handler: "verifyEmail" }
8638
- }
8639
- ],
8640
- dismissible: true,
8641
- // Add template metadata for runtime behavior
8642
- templateMetadata: {
8643
- typeId: "verify-dialog",
8644
- codeLength: templateConfig.codeLength,
8645
- codeType: templateConfig.codeType,
8646
- enableAutoSubmit: templateConfig.enableAutoSubmit,
8647
- enableResend: templateConfig.enableResend,
8648
- resendTimer: templateConfig.resendTimer,
8649
- successTitle: templateConfig.successTitle,
8650
- successMessage: templateConfig.successMessage,
8651
- errorMessage: templateConfig.errorMessage,
8652
- continueButtonLabel: templateConfig.continueButtonLabel,
8653
- // Store configurable action for verification success
8654
- onVerifiedAction: templateConfig.onVerifiedAction || {
8655
- type: "navigate",
8656
- direction: "next"
8657
- }
8658
- }
8659
- };
8469
+ function resolveTemplateDialog(actionConfig) {
8470
+ if (actionConfig.template?.typeId === "verify-dialog") {
8471
+ const templateConfig = actionConfig.template.config;
8472
+ return {
8473
+ title: templateConfig.title,
8474
+ content: templateConfig.description,
8475
+ type: "modal",
8476
+ buttons: [
8477
+ {
8478
+ id: "cancel-btn",
8479
+ label: templateConfig.cancelButtonLabel,
8480
+ variant: "secondary",
8481
+ action: templateConfig.onCancelAction || { type: "close" }
8482
+ },
8483
+ {
8484
+ id: "verify-btn",
8485
+ label: templateConfig.verifyButtonLabel,
8486
+ variant: "primary",
8487
+ action: { type: "custom", handler: "verifyEmail" }
8488
+ }
8489
+ ],
8490
+ dismissible: true,
8491
+ // Add template metadata for runtime behavior
8492
+ templateMetadata: {
8493
+ typeId: "verify-dialog",
8494
+ codeLength: templateConfig.codeLength,
8495
+ codeType: templateConfig.codeType,
8496
+ enableAutoSubmit: templateConfig.enableAutoSubmit,
8497
+ enableResend: templateConfig.enableResend,
8498
+ resendTimer: templateConfig.resendTimer,
8499
+ successTitle: templateConfig.successTitle,
8500
+ successMessage: templateConfig.successMessage,
8501
+ errorMessage: templateConfig.errorMessage,
8502
+ continueButtonLabel: templateConfig.continueButtonLabel,
8503
+ // Store configurable action for verification success
8504
+ onVerifiedAction: templateConfig.onVerifiedAction || {
8505
+ type: "navigate",
8506
+ direction: "next"
8507
+ }
8508
+ }
8509
+ };
8510
+ }
8511
+ if (actionConfig.template?.typeId === "confirmation-dialog") {
8512
+ const templateConfig = actionConfig.template.config;
8513
+ return {
8514
+ title: templateConfig.title,
8515
+ content: templateConfig.content,
8516
+ type: "modal",
8517
+ buttons: [
8518
+ {
8519
+ id: "cancel-btn",
8520
+ label: templateConfig.cancelButtonLabel,
8521
+ variant: "secondary",
8522
+ action: templateConfig.onCancelAction || { type: "close" }
8523
+ },
8524
+ {
8525
+ id: "confirm-btn",
8526
+ label: templateConfig.confirmButtonLabel,
8527
+ variant: templateConfig.confirmButtonVariant || "primary",
8528
+ action: templateConfig.onConfirmAction || {
8529
+ type: "navigate",
8530
+ direction: "next"
8531
+ }
8532
+ }
8533
+ ],
8534
+ dismissible: true,
8535
+ // Add template metadata for runtime behavior
8536
+ templateMetadata: {
8537
+ typeId: "confirmation-dialog",
8538
+ showIcon: templateConfig.showIcon,
8539
+ iconType: templateConfig.iconType
8540
+ }
8541
+ };
8542
+ }
8543
+ if (actionConfig.templateTypeId === "verify-dialog" && actionConfig.templateConfig) {
8544
+ return resolveTemplateDialog({
8545
+ template: {
8546
+ typeId: actionConfig.templateTypeId,
8547
+ config: actionConfig.templateConfig
8548
+ }
8549
+ });
8550
+ }
8551
+ return actionConfig;
8552
+ }
8553
+ const TYPE_COMPATIBILITY = {
8554
+ string: ["text", "email", "tel", "password", "textarea", "select"],
8555
+ number: ["number", "range"],
8556
+ boolean: ["checkbox", "radio"],
8557
+ array: ["select", "checkbox-group", "radio-group"],
8558
+ object: [],
8559
+ null: []
8560
+ };
8561
+ const FormComponentSchema = zod.z.object({
8562
+ id: zod.z.string(),
8563
+ type: zod.z.string(),
8564
+ label: zod.z.string().optional(),
8565
+ required: zod.z.boolean().optional(),
8566
+ validation: zod.z.record(zod.z.unknown()).optional(),
8567
+ triggers: zod.z.array(
8568
+ zod.z.object({
8569
+ type: zod.z.string(),
8570
+ condition: zod.z.unknown().optional(),
8571
+ actions: zod.z.array(
8572
+ zod.z.object({
8573
+ type: zod.z.string(),
8574
+ config: zod.z.unknown().optional()
8575
+ })
8576
+ )
8577
+ })
8578
+ ).optional()
8579
+ }).passthrough();
8580
+ const FormSectionSchema = zod.z.object({
8581
+ id: zod.z.string(),
8582
+ title: zod.z.string().optional(),
8583
+ mode: zod.z.enum(["readOnly", "editable", "default", "isEditable"]).optional(),
8584
+ components: zod.z.array(FormComponentSchema),
8585
+ showTitle: zod.z.boolean().optional(),
8586
+ showActionLink: zod.z.boolean().optional(),
8587
+ editText: zod.z.string().optional(),
8588
+ cancelText: zod.z.string().optional(),
8589
+ saveText: zod.z.string().optional(),
8590
+ // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
8591
+ genericTriggerActions: zod.z.any().optional(),
8592
+ visibilityConditions: zod.z.unknown().optional(),
8593
+ triggerContexts: zod.z.object({
8594
+ supportsSectionSave: zod.z.boolean(),
8595
+ showSaveButton: zod.z.boolean(),
8596
+ autoSaveOnNavigate: zod.z.boolean()
8597
+ }).optional(),
8598
+ fieldValidation: zod.z.unknown().optional()
8599
+ // Complex nested structure, validate at runtime
8600
+ }).passthrough();
8601
+ const StepNavigationSchema = zod.z.object({
8602
+ next: zod.z.object({
8603
+ label: zod.z.string(),
8604
+ enabled: zod.z.boolean()
8605
+ }),
8606
+ previous: zod.z.object({
8607
+ label: zod.z.string(),
8608
+ enabled: zod.z.boolean()
8609
+ })
8610
+ });
8611
+ const StepLoaderConfigSchema = zod.z.object({
8612
+ label: zod.z.string().optional(),
8613
+ showPercentage: zod.z.boolean().optional(),
8614
+ duration: zod.z.number().optional(),
8615
+ size: zod.z.enum(["sm", "md", "lg"]).optional(),
8616
+ variant: zod.z.enum(["default", "minimal", "branded", "striped"]).optional(),
8617
+ animationSpeed: zod.z.enum(["slow", "normal", "fast"]).optional(),
8618
+ completionMessage: zod.z.string().optional(),
8619
+ apiEndpoint: zod.z.object({
8620
+ endpoint: zod.z.string(),
8621
+ method: zod.z.enum(["GET", "POST", "PUT", "DELETE"]).optional(),
8622
+ successStatus: zod.z.union([zod.z.number(), zod.z.array(zod.z.number())]).optional()
8623
+ }).optional()
8624
+ }).optional();
8625
+ const FormStepSchema = zod.z.object({
8626
+ id: zod.z.string(),
8627
+ title: zod.z.string(),
8628
+ displayTitle: zod.z.boolean().optional(),
8629
+ showStepNumber: zod.z.boolean().optional(),
8630
+ sections: zod.z.array(FormSectionSchema).optional(),
8631
+ navigation: StepNavigationSchema,
8632
+ actions: zod.z.array(zod.z.unknown()).optional(),
8633
+ // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
8634
+ genericTriggerActions: zod.z.any().optional(),
8635
+ waitForLoader: zod.z.boolean().optional(),
8636
+ loaderConfig: StepLoaderConfigSchema
8637
+ }).passthrough();
8638
+ const TemplateStepSchema = zod.z.object({
8639
+ id: zod.z.string(),
8640
+ templateId: zod.z.string(),
8641
+ navigation: StepNavigationSchema.partial().optional(),
8642
+ readonly: zod.z.boolean().optional(),
8643
+ title: zod.z.string().optional(),
8644
+ stepIndex: zod.z.number().optional(),
8645
+ componentOverrides: zod.z.record(zod.z.unknown()).optional(),
8646
+ sectionOverrides: zod.z.record(zod.z.unknown()).optional(),
8647
+ showStepNumber: zod.z.boolean().optional(),
8648
+ actions: zod.z.array(zod.z.unknown()).optional()
8649
+ }).passthrough();
8650
+ const FormWizardConfigSchema = zod.z.object({
8651
+ schemaVersion: zod.z.number().optional(),
8652
+ // Version tracking for lazy migration
8653
+ id: zod.z.string(),
8654
+ title: zod.z.string(),
8655
+ description: zod.z.string().optional(),
8656
+ steps: zod.z.array(zod.z.union([FormStepSchema, TemplateStepSchema])),
8657
+ validationMessageStyle: zod.z.enum(["withLabel", "simple"]).optional(),
8658
+ // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
8659
+ genericTriggerActions: zod.z.any().optional()
8660
+ }).passthrough();
8661
+ function validateFormConfig(data) {
8662
+ return FormWizardConfigSchema.safeParse(data);
8663
+ }
8664
+ function getSchemaVersion(config) {
8665
+ return config?.["schemaVersion"] ?? 1;
8666
+ }
8667
+ const TemplateStorageConfigSchema = zod.z.object({
8668
+ team: zod.z.string()
8669
+ });
8670
+ const StoragePathsSchema = zod.z.object({
8671
+ primaryStorage: zod.z.string(),
8672
+ fallbackPaths: zod.z.array(zod.z.string()).optional(),
8673
+ staticAssets: zod.z.string().optional(),
8674
+ templates: zod.z.union([zod.z.string(), TemplateStorageConfigSchema]).optional()
8675
+ });
8676
+ const BackupConfigSchema = zod.z.object({
8677
+ enabled: zod.z.boolean(),
8678
+ maxBackups: zod.z.number().int().positive(),
8679
+ backupPath: zod.z.string()
8680
+ });
8681
+ const StorageConfigSchema = zod.z.object({
8682
+ strategy: zod.z.enum(["filesystem", "memory", "database"]),
8683
+ paths: StoragePathsSchema,
8684
+ fileExtension: zod.z.string(),
8685
+ createDirectories: zod.z.boolean(),
8686
+ backup: BackupConfigSchema.optional()
8687
+ });
8688
+ const ValidationConfigSchema = zod.z.object({
8689
+ strictMode: zod.z.boolean(),
8690
+ validateOnLoad: zod.z.boolean(),
8691
+ allowMigration: zod.z.boolean()
8692
+ });
8693
+ const CompatibilitySchema = zod.z.object({
8694
+ minVersion: zod.z.string(),
8695
+ maxVersion: zod.z.string()
8696
+ });
8697
+ const MetadataConfigSchema = zod.z.object({
8698
+ version: zod.z.string(),
8699
+ lastUpdated: zod.z.string().datetime(),
8700
+ compatibility: CompatibilitySchema
8701
+ });
8702
+ const FeaturesConfigSchema = zod.z.object({
8703
+ autoBackup: zod.z.boolean(),
8704
+ formTemplates: zod.z.boolean(),
8705
+ formVersioning: zod.z.boolean(),
8706
+ formSharing: zod.z.boolean()
8707
+ });
8708
+ const MigrationConfigSchema = zod.z.object({
8709
+ enabled: zod.z.boolean(),
8710
+ sourceDirectories: zod.z.array(zod.z.string()),
8711
+ preserveOriginals: zod.z.boolean(),
8712
+ logMigration: zod.z.boolean()
8713
+ });
8714
+ const FormConfigSchema = zod.z.object({
8715
+ $schema: zod.z.string().optional(),
8716
+ storage: StorageConfigSchema,
8717
+ validation: ValidationConfigSchema.optional(),
8718
+ metadata: MetadataConfigSchema.optional(),
8719
+ features: FeaturesConfigSchema.optional(),
8720
+ migration: MigrationConfigSchema.optional()
8721
+ });
8722
+ function isTemplateStep$1(step) {
8723
+ return typeof step === "object" && step !== null && "templateId" in step;
8724
+ }
8725
+ function getTemplateSteps(template) {
8726
+ return template.stepsData || [];
8727
+ }
8728
+ function isTemplateDialogConfig$1(config) {
8729
+ return config && typeof config.template === "object" && typeof config.template.typeId === "string";
8730
+ }
8731
+ function isLegacyDialogConfigWithTemplate(config) {
8732
+ return config && (config.templateTypeId || config.emailVerificationConfig);
8733
+ }
8734
+ const DEFAULT_VALIDATION_MESSAGES = {
8735
+ required: {
8736
+ withLabel: (label) => `${label} is verplicht`,
8737
+ simple: () => "Dit veld is verplicht"
8738
+ },
8739
+ minLength: {
8740
+ withLabel: (label, value) => `${label} moet minimaal ${value} tekens lang zijn`,
8741
+ simple: (value) => `Dit veld moet minimaal ${value} tekens lang zijn`
8742
+ },
8743
+ maxLength: {
8744
+ withLabel: (label, value) => `${label} moet maximaal ${value} tekens lang zijn`,
8745
+ simple: (value) => `Dit veld moet maximaal ${value} tekens lang zijn`
8746
+ },
8747
+ pattern: {
8748
+ withLabel: (label) => `${label} formaat is ongeldig`,
8749
+ simple: () => "Dit veld formaat is ongeldig"
8750
+ },
8751
+ email: {
8752
+ withLabel: (label) => `${label} moet een geldig e-mailadres zijn`,
8753
+ simple: () => "Dit veld moet een geldig e-mailadres zijn"
8754
+ },
8755
+ min: {
8756
+ withLabel: (label, value) => `${label} moet minimaal ${value} zijn`,
8757
+ simple: (value) => `Dit veld moet minimaal ${value} zijn`
8758
+ },
8759
+ max: {
8760
+ withLabel: (label, value) => `${label} moet maximaal ${value} zijn`,
8761
+ simple: (value) => `Dit veld moet maximaal ${value} zijn`
8762
+ },
8763
+ minItems: {
8764
+ withLabel: (label, value) => `${label} moet minimaal ${value} items hebben`,
8765
+ simple: (value) => `Dit veld moet minimaal ${value} items hebben`
8766
+ },
8767
+ maxItems: {
8768
+ withLabel: (label, value) => `${label} moet maximaal ${value} items hebben`,
8769
+ simple: (value) => `Dit veld moet maximaal ${value} items hebben`
8770
+ },
8771
+ url: {
8772
+ withLabel: (label) => `${label} moet een geldige URL zijn`,
8773
+ simple: () => "Dit veld moet een geldige URL zijn"
8774
+ },
8775
+ phone: {
8776
+ withLabel: (label) => `${label} moet een geldig telefoonnummer zijn`,
8777
+ simple: () => "Dit veld moet een geldig telefoonnummer zijn"
8778
+ }
8779
+ };
8780
+ const getValidationMessage = {
8781
+ // For components that need labeled messages (ValidationBuilder, etc.)
8782
+ withLabel: (type, label, ...args) => {
8783
+ const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
8784
+ return messageConfig.withLabel(label, ...args);
8785
+ },
8786
+ // For components that need simple messages (createZodSchema, etc.)
8787
+ simple: (type, ...args) => {
8788
+ const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
8789
+ return messageConfig.simple(...args);
8790
+ },
8791
+ // Dynamic message selection based on form configuration (defaults to withLabel)
8792
+ auto: (type, label, messageStyle = "withLabel", ...args) => {
8793
+ const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
8794
+ if (messageStyle === "simple") {
8795
+ return messageConfig.simple(...args);
8796
+ }
8797
+ return messageConfig.withLabel(label, ...args);
8798
+ }
8799
+ };
8800
+ function compileApiRequestBody(config, formData) {
8801
+ if (config.body) {
8802
+ if (typeof config.body === "string") {
8803
+ return interpolateTemplate(config.body, formData);
8804
+ } else if (typeof config.body === "object") {
8805
+ const interpolatedBody = interpolateObjectTemplate(config.body, formData);
8806
+ return JSON.stringify(interpolatedBody);
8807
+ }
8660
8808
  }
8661
- if (actionConfig.template?.typeId === "confirmation-dialog") {
8662
- const templateConfig = actionConfig.template.config;
8663
- return {
8664
- title: templateConfig.title,
8665
- content: templateConfig.content,
8666
- type: "modal",
8667
- buttons: [
8668
- {
8669
- id: "cancel-btn",
8670
- label: templateConfig.cancelButtonLabel,
8671
- variant: "secondary",
8672
- action: templateConfig.onCancelAction || { type: "close" }
8673
- },
8674
- {
8675
- id: "confirm-btn",
8676
- label: templateConfig.confirmButtonLabel,
8677
- variant: templateConfig.confirmButtonVariant || "primary",
8678
- action: templateConfig.onConfirmAction || {
8679
- type: "navigate",
8680
- direction: "next"
8681
- }
8682
- }
8683
- ],
8684
- dismissible: true,
8685
- // Add template metadata for runtime behavior
8686
- templateMetadata: {
8687
- typeId: "confirmation-dialog",
8688
- showIcon: templateConfig.showIcon,
8689
- iconType: templateConfig.iconType
8809
+ if (config.bodyFields) {
8810
+ const bodyObject = {};
8811
+ for (const field of config.bodyFields) {
8812
+ if (!field.key.trim()) continue;
8813
+ let value;
8814
+ if (field.type === "static") {
8815
+ value = field.value;
8816
+ } else if (field.type === "dynamic" && field.fieldPath) {
8817
+ value = getValueFromFormData(formData, field.fieldPath);
8818
+ } else {
8819
+ value = field.value;
8690
8820
  }
8691
- };
8821
+ setNestedValue(bodyObject, field.key, value);
8822
+ }
8823
+ return JSON.stringify(bodyObject);
8692
8824
  }
8693
- if (actionConfig.templateTypeId === "verify-dialog" && actionConfig.templateConfig) {
8694
- return resolveTemplateDialog({
8695
- template: {
8696
- typeId: actionConfig.templateTypeId,
8697
- config: actionConfig.templateConfig
8825
+ return void 0;
8826
+ }
8827
+ function getValueFromFormData(formData, path) {
8828
+ return path.split(".").reduce((current2, key) => {
8829
+ return current2?.[key];
8830
+ }, formData);
8831
+ }
8832
+ function interpolateTemplate(template, formData) {
8833
+ let result = template.replace(/\$\{data\.([^}]+)\}/g, (match, fieldPath) => {
8834
+ const value = getValueFromFormData(formData, fieldPath);
8835
+ return value != null ? String(value) : match;
8836
+ });
8837
+ result = result.replace(/\$\{([^}]+)\}/g, (match, fieldPath) => {
8838
+ if (match.includes("data.")) return match;
8839
+ if (fieldPath.includes(".")) {
8840
+ const parts = fieldPath.split(".");
8841
+ const fieldName = parts[parts.length - 1];
8842
+ const value2 = formData[fieldName];
8843
+ return value2 != null ? String(value2) : match;
8844
+ }
8845
+ const value = getValueFromFormData(formData, fieldPath);
8846
+ return value != null ? String(value) : match;
8847
+ });
8848
+ return result;
8849
+ }
8850
+ function interpolateObjectTemplate(obj, formData) {
8851
+ const result = {};
8852
+ for (const [key, value] of Object.entries(obj)) {
8853
+ if (typeof value === "string") {
8854
+ result[key] = interpolateTemplate(value, formData);
8855
+ } else if (value && typeof value === "object" && !Array.isArray(value)) {
8856
+ result[key] = interpolateObjectTemplate(
8857
+ value,
8858
+ formData
8859
+ );
8860
+ } else if (Array.isArray(value)) {
8861
+ result[key] = value.map(
8862
+ (item) => typeof item === "string" ? interpolateTemplate(item, formData) : item && typeof item === "object" ? interpolateObjectTemplate(
8863
+ item,
8864
+ formData
8865
+ ) : item
8866
+ );
8867
+ } else {
8868
+ result[key] = value;
8869
+ }
8870
+ }
8871
+ return result;
8872
+ }
8873
+ function setNestedValue(obj, path, value) {
8874
+ const keys = path.split(".");
8875
+ const lastKey = keys.pop();
8876
+ const target = keys.reduce((current2, key) => {
8877
+ if (typeof current2[key] !== "object" || current2[key] === null) {
8878
+ current2[key] = {};
8879
+ }
8880
+ return current2[key];
8881
+ }, obj);
8882
+ target[lastKey] = value;
8883
+ }
8884
+ function getAvailableFormFields(steps, currentStepId) {
8885
+ const fields = [];
8886
+ const currentStepIndex = steps.findIndex((step) => step.id === currentStepId);
8887
+ for (let i = 0; i <= currentStepIndex; i++) {
8888
+ const step = steps[i];
8889
+ if (!step) continue;
8890
+ const sections = step.sections || [];
8891
+ for (const section2 of sections) {
8892
+ const components = section2.components || [];
8893
+ for (const component of components) {
8894
+ if (isInputComponent(component)) {
8895
+ fields.push({
8896
+ id: component.id,
8897
+ label: component.label,
8898
+ path: component.id,
8899
+ // For now, use component ID as path
8900
+ stepTitle: step.title,
8901
+ stepIndex: i + 1
8902
+ });
8903
+ }
8698
8904
  }
8699
- });
8905
+ }
8700
8906
  }
8701
- return actionConfig;
8907
+ return fields;
8908
+ }
8909
+ function isInputComponent(component) {
8910
+ const inputTypes = [
8911
+ "text",
8912
+ "email",
8913
+ "number",
8914
+ "checkbox",
8915
+ "radioGroup",
8916
+ "dropdown"
8917
+ ];
8918
+ return inputTypes.includes(component.type);
8702
8919
  }
8703
8920
  const TEMPLATE_PREFIXES = {
8704
8921
  GENERIC: "generic-",
@@ -9396,13 +9613,131 @@ const useThemeConfig = () => {
9396
9613
  name: "eva-light"
9397
9614
  };
9398
9615
  };
9616
+ let registeredRenderer = null;
9617
+ const registerRenderComponent = (fn) => {
9618
+ registeredRenderer = fn;
9619
+ };
9399
9620
  const renderComponent = (props) => {
9400
- {
9621
+ if (!registeredRenderer) {
9401
9622
  console.error(
9402
9623
  "[renderComponent] No renderer registered. Ensure @formbuilder/builder has been initialised before rendering form components."
9403
9624
  );
9404
9625
  return null;
9405
9626
  }
9627
+ return registeredRenderer(props);
9628
+ };
9629
+ const wizardDefaultRenderer = ({
9630
+ component,
9631
+ value,
9632
+ onChange,
9633
+ isFormView
9634
+ }) => {
9635
+ const props = component.properties ?? {};
9636
+ switch (component.type) {
9637
+ case "text":
9638
+ case "email":
9639
+ case "tel":
9640
+ case "number":
9641
+ case "date":
9642
+ return /* @__PURE__ */ jsxRuntime.jsx(
9643
+ Input,
9644
+ {
9645
+ type: component.type,
9646
+ value: typeof value === "string" ? value : "",
9647
+ disabled: Boolean(props.disabled),
9648
+ readOnly: Boolean(props.readOnly) || !isFormView,
9649
+ placeholder: typeof props.placeholder === "string" ? props.placeholder : void 0,
9650
+ onChange: isFormView ? (e) => onChange(e.target.value) : void 0
9651
+ }
9652
+ );
9653
+ case "textarea":
9654
+ return /* @__PURE__ */ jsxRuntime.jsx(
9655
+ Textarea,
9656
+ {
9657
+ value: typeof value === "string" ? value : "",
9658
+ disabled: Boolean(props.disabled),
9659
+ readOnly: Boolean(props.readOnly) || !isFormView,
9660
+ placeholder: typeof props.placeholder === "string" ? props.placeholder : void 0,
9661
+ onChange: isFormView ? (e) => onChange(e.target.value) : void 0
9662
+ }
9663
+ );
9664
+ case "checkbox":
9665
+ return /* @__PURE__ */ jsxRuntime.jsx(
9666
+ Checkbox$2,
9667
+ {
9668
+ checked: !!value,
9669
+ disabled: Boolean(props.disabled),
9670
+ onCheckedChange: isFormView ? (checked) => onChange(checked === true) : void 0
9671
+ }
9672
+ );
9673
+ case "radioGroup": {
9674
+ const options = Array.isArray(props.options) ? props.options : [];
9675
+ return /* @__PURE__ */ jsxRuntime.jsx(
9676
+ RadioGroup,
9677
+ {
9678
+ value: typeof value === "string" ? value : "",
9679
+ onValueChange: isFormView ? (val) => onChange(val) : void 0,
9680
+ disabled: Boolean(props.disabled),
9681
+ children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { value: opt.value, children: opt.label }, opt.value))
9682
+ }
9683
+ );
9684
+ }
9685
+ case "dropdown": {
9686
+ const options = Array.isArray(props.options) ? props.options : [];
9687
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9688
+ Select,
9689
+ {
9690
+ value: typeof value === "string" ? value : "",
9691
+ onValueChange: isFormView ? (val) => onChange(val) : void 0,
9692
+ disabled: Boolean(props.disabled),
9693
+ children: [
9694
+ /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
9695
+ SelectValue,
9696
+ {
9697
+ placeholder: typeof props.placeholder === "string" ? props.placeholder : ""
9698
+ }
9699
+ ) }),
9700
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
9701
+ ]
9702
+ }
9703
+ );
9704
+ }
9705
+ case "button":
9706
+ return /* @__PURE__ */ jsxRuntime.jsx(
9707
+ Button$1,
9708
+ {
9709
+ type: "button",
9710
+ disabled: Boolean(props.disabled),
9711
+ onClick: isFormView ? () => onChange(null) : void 0,
9712
+ children: typeof props.label === "string" ? props.label : "Submit"
9713
+ }
9714
+ );
9715
+ case "heading": {
9716
+ const rawLevel = typeof props.level === "number" ? props.level : void 0;
9717
+ const level = rawLevel !== void 0 ? Math.min(6, Math.max(1, rawLevel)) : 2;
9718
+ const text = typeof props.text === "string" ? props.text : "";
9719
+ const Tag = `h${level}`;
9720
+ return /* @__PURE__ */ jsxRuntime.jsx(Tag, { children: text });
9721
+ }
9722
+ case "paragraph":
9723
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { children: typeof props.text === "string" ? props.text : "" });
9724
+ case "alert":
9725
+ return /* @__PURE__ */ jsxRuntime.jsx(Alert$2, { variant: "default", children: /* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: typeof props.message === "string" ? props.message : "" }) });
9726
+ case "progress-loader":
9727
+ return /* @__PURE__ */ jsxRuntime.jsx(
9728
+ ProgressLoaderBar,
9729
+ {
9730
+ mode: typeof props.mode === "string" ? props.mode : "indeterminate",
9731
+ status: "loading",
9732
+ label: typeof props.label === "string" ? props.label : void 0
9733
+ }
9734
+ );
9735
+ default:
9736
+ console.warn(
9737
+ `[wizardRenderer] Unsupported component type: ${component.type}`
9738
+ );
9739
+ return null;
9740
+ }
9406
9741
  };
9407
9742
  class ActionValidationError extends Error {
9408
9743
  constructor(actionId, actionType, message, details) {
@@ -13661,45 +13996,45 @@ const memoryUtils = {
13661
13996
  const formMachine = xstate.createMachine({
13662
13997
  id: "formMachine",
13663
13998
  types: {},
13664
- context: ({ input }) => ({
13665
- config: input.config || { id: "", title: "", steps: [] },
13666
- currentStepId: input.currentStepId || "",
13667
- currentStepIndex: input.currentStepIndex || 0,
13668
- data: input.data || {},
13669
- errors: input.errors || {},
13670
- dirtyFields: input.dirtyFields || {},
13671
- touchedFields: input.touchedFields || {},
13672
- isValid: input.isValid ?? true,
13673
- isSubmitting: input.isSubmitting ?? false,
13674
- fieldStates: input.fieldStates || {},
13675
- sectionBackups: input.sectionBackups || {},
13676
- activeActions: input.activeActions || {},
13677
- actionResults: input.actionResults || {},
13678
- activeDialog: input.activeDialog || null,
13679
- executingTrigger: input.executingTrigger || null,
13680
- pendingNavigation: input.pendingNavigation || null,
13681
- canNavigate: input.canNavigate ?? true,
13682
- waitingForActions: input.waitingForActions ?? false,
13999
+ context: ({ input: input2 }) => ({
14000
+ config: input2.config || { id: "", title: "", steps: [] },
14001
+ currentStepId: input2.currentStepId || "",
14002
+ currentStepIndex: input2.currentStepIndex || 0,
14003
+ data: input2.data || {},
14004
+ errors: input2.errors || {},
14005
+ dirtyFields: input2.dirtyFields || {},
14006
+ touchedFields: input2.touchedFields || {},
14007
+ isValid: input2.isValid ?? true,
14008
+ isSubmitting: input2.isSubmitting ?? false,
14009
+ fieldStates: input2.fieldStates || {},
14010
+ sectionBackups: input2.sectionBackups || {},
14011
+ activeActions: input2.activeActions || {},
14012
+ actionResults: input2.actionResults || {},
14013
+ activeDialog: input2.activeDialog || null,
14014
+ executingTrigger: input2.executingTrigger || null,
14015
+ pendingNavigation: input2.pendingNavigation || null,
14016
+ canNavigate: input2.canNavigate ?? true,
14017
+ waitingForActions: input2.waitingForActions ?? false,
13683
14018
  // Initialize field change validation state
13684
- fieldChangeState: input.fieldChangeState || {},
13685
- fieldValidationState: input.fieldValidationState || {
14019
+ fieldChangeState: input2.fieldChangeState || {},
14020
+ fieldValidationState: input2.fieldValidationState || {
13686
14021
  activeWarnings: [],
13687
14022
  pendingVerifications: [],
13688
14023
  verificationResults: {}
13689
14024
  },
13690
14025
  // Initialize component trigger-action system state
13691
- componentTriggerState: input.componentTriggerState || {},
13692
- activeComponentActions: input.activeComponentActions || {},
13693
- componentAlerts: input.componentAlerts || {},
14026
+ componentTriggerState: input2.componentTriggerState || {},
14027
+ activeComponentActions: input2.activeComponentActions || {},
14028
+ componentAlerts: input2.componentAlerts || {},
13694
14029
  // Enhanced original value tracking
13695
- componentOriginalValues: input.componentOriginalValues || {},
14030
+ componentOriginalValues: input2.componentOriginalValues || {},
13696
14031
  // New simplified state machine context
13697
- activeExecutionPlan: input.activeExecutionPlan || null,
13698
- executionResults: input.executionResults || {},
14032
+ activeExecutionPlan: input2.activeExecutionPlan || null,
14033
+ executionResults: input2.executionResults || {},
13699
14034
  // Track completed context actions
13700
- contextActionCompletions: input.contextActionCompletions || {},
14035
+ contextActionCompletions: input2.contextActionCompletions || {},
13701
14036
  // Initialize enhanced save state tracking
13702
- saveState: input.saveState || {
14037
+ saveState: input2.saveState || {
13703
14038
  saveInProgress: false,
13704
14039
  saveInitiator: null,
13705
14040
  savingSection: null,
@@ -19660,6 +19995,7 @@ const FormWizard = (props) => {
19660
19995
  return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { config: themeConfig, children: /* @__PURE__ */ jsxRuntime.jsx(FormWizardCore, { ...props }) });
19661
19996
  };
19662
19997
  FormWizard.displayName = "FormWizard";
19998
+ registerRenderComponent(wizardDefaultRenderer);
19663
19999
  exports.ActionDialog = ActionDialog;
19664
20000
  exports.ActionExecutor = ActionExecutor;
19665
20001
  exports.ActionLoadingIndicator = ActionLoadingIndicator;