@simple-builder/react 1.0.8 → 1.0.10

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.
@@ -1,13 +1,13 @@
1
1
  'use client';
2
- import './chunk-EFA2EAPD.mjs';
3
- import { buttonVariants, Button, useBuilder } from './chunk-4Z4JII4A.mjs';
4
- import { cn, tv, DesignWrapper, builder, Image, spacing } from './chunk-S3NVED5S.mjs';
5
- import * as React15 from 'react';
6
- import { PlusIcon, ArrowUp, ArrowDown, Edit2Icon, Trash2Icon, ImageIcon, CalendarIcon, MonitorIcon, SmartphoneIcon, AlignHorizontalSpaceAroundIcon, AlignHorizontalJustifyStartIcon, ScanIcon, ChevronLeftIcon, ChevronRightIcon, PaintbrushIcon, Loader2Icon } from 'lucide-react';
2
+ import './chunk-BP6PJZIZ.mjs';
3
+ import { buttonVariants, Button, useBuilder } from './chunk-2PY5SZFT.mjs';
4
+ import { cn, tv, DesignWrapper, builder, Image } from './chunk-LEULOM72.mjs';
5
+ import * as React11 from 'react';
6
+ import { PlusIcon, ArrowUp, ArrowDown, Edit2Icon, Trash2Icon, ImageIcon, XIcon, PlusCircleIcon, CalendarIcon, MonitorIcon, SmartphoneIcon, ChevronLeftIcon, ChevronRightIcon, PaintbrushIcon, Loader2Icon, AlignHorizontalSpaceAroundIcon, AlignHorizontalJustifyStartIcon, ScanIcon } from 'lucide-react';
7
7
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
8
8
  import * as PopoverPrimitive from '@radix-ui/react-popover';
9
9
  import { format } from 'date-fns';
10
- import { useFormContext, useForm, FormProvider, Controller } from 'react-hook-form';
10
+ import { useFormContext, useForm, useFieldArray, FormProvider, Controller } from 'react-hook-form';
11
11
  import { DayPicker } from 'react-day-picker';
12
12
  import { Slot } from '@radix-ui/react-slot';
13
13
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -16,11 +16,12 @@ import { zodResolver } from '@hookform/resolvers/zod';
16
16
  import { z } from 'zod';
17
17
  import * as TabsPrimitive from '@radix-ui/react-tabs';
18
18
  import * as TogglePrimitive from '@radix-ui/react-toggle';
19
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
19
20
 
20
21
  var AlertDialog = AlertDialogPrimitive.Root;
21
22
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
22
23
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
23
- var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
24
+ var AlertDialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
24
25
  AlertDialogPrimitive.Overlay,
25
26
  {
26
27
  className: cn(
@@ -32,7 +33,7 @@ var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /*
32
33
  }
33
34
  ));
34
35
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
35
- var AlertDialogContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(AlertDialogPortal, null, /* @__PURE__ */ React15.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React15.createElement(
36
+ var AlertDialogContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(AlertDialogPortal, null, /* @__PURE__ */ React11.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React11.createElement(
36
37
  AlertDialogPrimitive.Content,
37
38
  {
38
39
  ref,
@@ -47,7 +48,7 @@ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
47
48
  var AlertDialogFooter = ({
48
49
  className,
49
50
  ...props
50
- }) => /* @__PURE__ */ React15.createElement(
51
+ }) => /* @__PURE__ */ React11.createElement(
51
52
  "div",
52
53
  {
53
54
  className: cn(
@@ -58,7 +59,7 @@ var AlertDialogFooter = ({
58
59
  }
59
60
  );
60
61
  AlertDialogFooter.displayName = "AlertDialogFooter";
61
- var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
62
+ var AlertDialogTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
62
63
  AlertDialogPrimitive.Title,
63
64
  {
64
65
  ref,
@@ -67,7 +68,7 @@ var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @
67
68
  }
68
69
  ));
69
70
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
70
- var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
71
+ var AlertDialogDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
71
72
  AlertDialogPrimitive.Description,
72
73
  {
73
74
  ref,
@@ -76,7 +77,7 @@ var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) =
76
77
  }
77
78
  ));
78
79
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
79
- var AlertDialogAction = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
80
+ var AlertDialogAction = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
80
81
  AlertDialogPrimitive.Action,
81
82
  {
82
83
  ref,
@@ -85,7 +86,7 @@ var AlertDialogAction = React15.forwardRef(({ className, ...props }, ref) => /*
85
86
  }
86
87
  ));
87
88
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
88
- var AlertDialogCancel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
89
+ var AlertDialogCancel = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
89
90
  AlertDialogPrimitive.Cancel,
90
91
  {
91
92
  ref,
@@ -101,7 +102,7 @@ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
101
102
  var Popover = PopoverPrimitive.Root;
102
103
  var PopoverTrigger = PopoverPrimitive.Trigger;
103
104
  var PopoverClose = PopoverPrimitive.Close;
104
- var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React15.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React15.createElement(
105
+ var PopoverContent = React11.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React11.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React11.createElement(
105
106
  PopoverPrimitive.Content,
106
107
  {
107
108
  ref,
@@ -121,7 +122,7 @@ function Calendar({
121
122
  showOutsideDays = true,
122
123
  ...props
123
124
  }) {
124
- return /* @__PURE__ */ React15.createElement(
125
+ return /* @__PURE__ */ React11.createElement(
125
126
  DayPicker,
126
127
  {
127
128
  showOutsideDays,
@@ -161,8 +162,8 @@ function Calendar({
161
162
  ...classNames
162
163
  },
163
164
  components: {
164
- IconLeft: () => /* @__PURE__ */ React15.createElement(ChevronLeftIcon, { className: "sb-h-4 sb-w-4" }),
165
- IconRight: () => /* @__PURE__ */ React15.createElement(ChevronRightIcon, { className: "sb-h-4 sb-w-4" })
165
+ IconLeft: () => /* @__PURE__ */ React11.createElement(ChevronLeftIcon, { className: "sb-h-4 sb-w-4" }),
166
+ IconRight: () => /* @__PURE__ */ React11.createElement(ChevronRightIcon, { className: "sb-h-4 sb-w-4" })
166
167
  },
167
168
  ...props
168
169
  }
@@ -182,7 +183,7 @@ var ColorPicker = (props) => {
182
183
  "#009DD1",
183
184
  "#FF0000"
184
185
  ];
185
- return /* @__PURE__ */ React15.createElement(Popover, null, /* @__PURE__ */ React15.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15.createElement(
186
+ return /* @__PURE__ */ React11.createElement(Popover, null, /* @__PURE__ */ React11.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React11.createElement(
186
187
  Button,
187
188
  {
188
189
  variant: "outline",
@@ -193,14 +194,14 @@ var ColorPicker = (props) => {
193
194
  className
194
195
  )
195
196
  },
196
- /* @__PURE__ */ React15.createElement("div", { className: "sb-w-full sb-flex sb-items-center sb-gap-2" }, color ? /* @__PURE__ */ React15.createElement(
197
+ /* @__PURE__ */ React11.createElement("div", { className: "sb-w-full sb-flex sb-items-center sb-gap-2" }, color ? /* @__PURE__ */ React11.createElement(
197
198
  "div",
198
199
  {
199
200
  className: "sb-h-4 sb-w-4 sb-rounded !sb-bg-center !sb-bg-cover sb-transition-all sb-border",
200
201
  style: { background: color }
201
202
  }
202
- ) : /* @__PURE__ */ React15.createElement(PaintbrushIcon, { className: "sb-h-4 sb-w-4" }), /* @__PURE__ */ React15.createElement("div", { className: "sb-truncate sb-flex-1" }, color ? color : "Kies een kleur"))
203
- )), /* @__PURE__ */ React15.createElement(PopoverContent, { className: "sb-w-64 sb-p-4 sb-flex sb-flex-wrap sb-gap-1" }, colors.map((s) => /* @__PURE__ */ React15.createElement(
203
+ ) : /* @__PURE__ */ React11.createElement(PaintbrushIcon, { className: "sb-h-4 sb-w-4" }), /* @__PURE__ */ React11.createElement("div", { className: "sb-truncate sb-flex-1" }, color ? color : "Kies een kleur"))
204
+ )), /* @__PURE__ */ React11.createElement(PopoverContent, { className: "sb-w-64 sb-p-4 sb-flex sb-flex-wrap sb-gap-1" }, colors.map((s) => /* @__PURE__ */ React11.createElement(
204
205
  "div",
205
206
  {
206
207
  key: s,
@@ -213,7 +214,7 @@ var ColorPicker = (props) => {
213
214
  var labelVariants = tv({
214
215
  base: "sb-text-sm sb-font-medium sb-font-roboto sb-leading-none peer-disabled:sb-cursor-not-allowed peer-disabled:sb-opacity-70"
215
216
  });
216
- var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
217
+ var Label = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
217
218
  LabelPrimitive.Root,
218
219
  {
219
220
  ref,
@@ -225,17 +226,17 @@ Label.displayName = LabelPrimitive.Root.displayName;
225
226
 
226
227
  // src/components/ui/form.tsx
227
228
  var Form = FormProvider;
228
- var FormFieldContext = React15.createContext(
229
+ var FormFieldContext = React11.createContext(
229
230
  {}
230
231
  );
231
232
  var FormField = ({
232
233
  ...props
233
234
  }) => {
234
- return /* @__PURE__ */ React15.createElement(FormFieldContext.Provider, { value: { name: props.name } }, /* @__PURE__ */ React15.createElement(Controller, { ...props }));
235
+ return /* @__PURE__ */ React11.createElement(FormFieldContext.Provider, { value: { name: props.name } }, /* @__PURE__ */ React11.createElement(Controller, { ...props }));
235
236
  };
236
237
  var useFormField = () => {
237
- const fieldContext = React15.useContext(FormFieldContext);
238
- const itemContext = React15.useContext(FormItemContext);
238
+ const fieldContext = React11.useContext(FormFieldContext);
239
+ const itemContext = React11.useContext(FormItemContext);
239
240
  const { getFieldState, formState } = useFormContext();
240
241
  const fieldState = getFieldState(fieldContext.name, formState);
241
242
  if (!fieldContext) {
@@ -251,17 +252,17 @@ var useFormField = () => {
251
252
  ...fieldState
252
253
  };
253
254
  };
254
- var FormItemContext = React15.createContext(
255
+ var FormItemContext = React11.createContext(
255
256
  {}
256
257
  );
257
- var FormItem = React15.forwardRef(({ className, ...props }, ref) => {
258
- const id = React15.useId();
259
- return /* @__PURE__ */ React15.createElement(FormItemContext.Provider, { value: { id } }, /* @__PURE__ */ React15.createElement("div", { ref, className: cn("sb-space-y-2", className), ...props }));
258
+ var FormItem = React11.forwardRef(({ className, ...props }, ref) => {
259
+ const id = React11.useId();
260
+ return /* @__PURE__ */ React11.createElement(FormItemContext.Provider, { value: { id } }, /* @__PURE__ */ React11.createElement("div", { ref, className: cn("sb-space-y-2", className), ...props }));
260
261
  });
261
262
  FormItem.displayName = "FormItem";
262
- var FormLabel = React15.forwardRef(({ className, ...props }, ref) => {
263
+ var FormLabel = React11.forwardRef(({ className, ...props }, ref) => {
263
264
  const { error, formItemId } = useFormField();
264
- return /* @__PURE__ */ React15.createElement(
265
+ return /* @__PURE__ */ React11.createElement(
265
266
  Label,
266
267
  {
267
268
  ref,
@@ -272,9 +273,9 @@ var FormLabel = React15.forwardRef(({ className, ...props }, ref) => {
272
273
  );
273
274
  });
274
275
  FormLabel.displayName = "FormLabel";
275
- var FormControl = React15.forwardRef(({ ...props }, ref) => {
276
+ var FormControl = React11.forwardRef(({ ...props }, ref) => {
276
277
  const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
277
- return /* @__PURE__ */ React15.createElement(
278
+ return /* @__PURE__ */ React11.createElement(
278
279
  Slot,
279
280
  {
280
281
  ref,
@@ -286,9 +287,9 @@ var FormControl = React15.forwardRef(({ ...props }, ref) => {
286
287
  );
287
288
  });
288
289
  FormControl.displayName = "FormControl";
289
- var FormDescription = React15.forwardRef(({ className, ...props }, ref) => {
290
+ var FormDescription = React11.forwardRef(({ className, ...props }, ref) => {
290
291
  const { formDescriptionId } = useFormField();
291
- return /* @__PURE__ */ React15.createElement(
292
+ return /* @__PURE__ */ React11.createElement(
292
293
  "p",
293
294
  {
294
295
  ref,
@@ -302,13 +303,13 @@ var FormDescription = React15.forwardRef(({ className, ...props }, ref) => {
302
303
  );
303
304
  });
304
305
  FormDescription.displayName = "FormDescription";
305
- var FormMessage = React15.forwardRef(({ className, children, ...props }, ref) => {
306
+ var FormMessage = React11.forwardRef(({ className, children, ...props }, ref) => {
306
307
  const { error, formMessageId } = useFormField();
307
308
  const body = error ? String(error?.message) : children;
308
309
  if (!body) {
309
310
  return null;
310
311
  }
311
- return /* @__PURE__ */ React15.createElement(
312
+ return /* @__PURE__ */ React11.createElement(
312
313
  "p",
313
314
  {
314
315
  ref,
@@ -323,9 +324,9 @@ var FormMessage = React15.forwardRef(({ className, children, ...props }, ref) =>
323
324
  );
324
325
  });
325
326
  FormMessage.displayName = "FormMessage";
326
- var Input = React15.forwardRef(
327
+ var Input = React11.forwardRef(
327
328
  ({ className, type, ...props }, ref) => {
328
- return /* @__PURE__ */ React15.createElement(
329
+ return /* @__PURE__ */ React11.createElement(
329
330
  "input",
330
331
  {
331
332
  type,
@@ -340,19 +341,19 @@ var Input = React15.forwardRef(
340
341
  }
341
342
  );
342
343
  Input.displayName = "Input";
343
- var AdvancedInput = React15.forwardRef(
344
+ var AdvancedInput = React11.forwardRef(
344
345
  ({ prepend, append, ...props }, ref) => {
345
- return /* @__PURE__ */ React15.createElement("div", { className: "sb-relative" }, /* @__PURE__ */ React15.createElement(Input, { ref, className: "sb-pl-9 sb-pr-7 sb-text-right", ...props }), prepend && /* @__PURE__ */ React15.createElement("div", { className: "sb-absolute sb-font-roboto sb-top-1/2 sb-left-3 sb--translate-y-1/2" }, prepend), append && /* @__PURE__ */ React15.createElement("div", { className: "sb-absolute sb-font-roboto sb-top-1/2 sb-right-3 sb--translate-y-1/2" }, append));
346
+ return /* @__PURE__ */ React11.createElement("div", { className: "sb-relative" }, /* @__PURE__ */ React11.createElement(Input, { ref, className: "sb-pl-9 sb-pr-7 sb-text-right", ...props }), prepend && /* @__PURE__ */ React11.createElement("div", { className: "sb-absolute sb-font-roboto sb-top-1/2 sb-left-3 sb--translate-y-1/2" }, prepend), append && /* @__PURE__ */ React11.createElement("div", { className: "sb-absolute sb-font-roboto sb-top-1/2 sb-right-3 sb--translate-y-1/2" }, append));
346
347
  }
347
348
  );
348
349
  AdvancedInput.displayName = "AdvancedInput";
349
350
  var MediaInput = (props) => {
350
351
  const { onFilesChange, limit = 32, multiple = false, onError } = props;
351
- const id = React15.useId();
352
- const [queue, setQueue] = React15.useState([]);
353
- const [sources, setSources] = React15.useState(props.files ?? []);
352
+ const id = React11.useId();
353
+ const [queue, setQueue] = React11.useState([]);
354
+ const [sources, setSources] = React11.useState(props.files ?? []);
354
355
  const maxConcurrentUploads = 3;
355
- const uploadingCountRef = React15.useRef(0);
356
+ const uploadingCountRef = React11.useRef(0);
356
357
  const handleFilesAdd = async (e) => {
357
358
  const files = e.target.files;
358
359
  if (!files || files.length === 0) {
@@ -423,7 +424,7 @@ var MediaInput = (props) => {
423
424
  body: JSON.stringify({ src })
424
425
  });
425
426
  };
426
- return /* @__PURE__ */ React15.createElement("div", { className: cn("flex flex-wrap gap-4", props.className) }, sources.map((src) => /* @__PURE__ */ React15.createElement(MediaInputItem, { key: src, className: cn("group", props.itemClassName) }, /* @__PURE__ */ React15.createElement(
427
+ return /* @__PURE__ */ React11.createElement("div", { className: cn("flex flex-wrap gap-4", props.className) }, sources.map((src) => /* @__PURE__ */ React11.createElement(MediaInputItem, { key: src, className: cn("group", props.itemClassName) }, /* @__PURE__ */ React11.createElement(
427
428
  Image,
428
429
  {
429
430
  src,
@@ -431,14 +432,14 @@ var MediaInput = (props) => {
431
432
  fill: true,
432
433
  className: "sb-absolute sb-inset-0 sb-object-cover sb-pointer-events-none"
433
434
  }
434
- ), /* @__PURE__ */ React15.createElement("div", { className: "sb-absolute sb-right-1 sb-top-1 sb-z-30 sb-flex sb-items-center sb-justify-end sb-gap-3 sb-opacity-0 sb-transition-opacity group-hover:sb-opacity-100" }, /* @__PURE__ */ React15.createElement(
435
+ ), /* @__PURE__ */ React11.createElement("div", { className: "sb-absolute sb-right-1 sb-top-1 sb-z-30 sb-flex sb-items-center sb-justify-end sb-gap-3 sb-opacity-0 sb-transition-opacity group-hover:sb-opacity-100" }, /* @__PURE__ */ React11.createElement(
435
436
  "button",
436
437
  {
437
438
  className: "sb-flex sb-h-8 sb-w-8 sb-items-center sb-justify-center sb-rounded-full sb-border sb-bg-secondary sb-text-secondary-foreground sb-opacity-90 sb-shadow sb-transition-opacity hover:sb-opacity-100",
438
439
  onClick: () => handleSourceDelete(src)
439
440
  },
440
- /* @__PURE__ */ React15.createElement(Trash2Icon, { className: "sb-h-4 sb-w-4" })
441
- )))), queue.map((_, i) => /* @__PURE__ */ React15.createElement(
441
+ /* @__PURE__ */ React11.createElement(Trash2Icon, { className: "sb-h-4 sb-w-4" })
442
+ )))), queue.map((_, i) => /* @__PURE__ */ React11.createElement(
442
443
  MediaInputItem,
443
444
  {
444
445
  key: i,
@@ -447,8 +448,8 @@ var MediaInput = (props) => {
447
448
  props.itemClassName
448
449
  )
449
450
  },
450
- /* @__PURE__ */ React15.createElement(Loader2Icon, { className: "sb-h-6 sb-w-6 sb-animate-spin" })
451
- )), multiple || !multiple && !sources.length && !queue.length ? /* @__PURE__ */ React15.createElement(
451
+ /* @__PURE__ */ React11.createElement(Loader2Icon, { className: "sb-h-6 sb-w-6 sb-animate-spin" })
452
+ )), multiple || !multiple && !sources.length && !queue.length ? /* @__PURE__ */ React11.createElement(
452
453
  "label",
453
454
  {
454
455
  htmlFor: id,
@@ -457,8 +458,8 @@ var MediaInput = (props) => {
457
458
  props.itemClassName
458
459
  )
459
460
  },
460
- /* @__PURE__ */ React15.createElement(PlusIcon, { className: "sb-h-6 sb-w-6" }),
461
- /* @__PURE__ */ React15.createElement(
461
+ /* @__PURE__ */ React11.createElement(PlusIcon, { className: "sb-h-6 sb-w-6" }),
462
+ /* @__PURE__ */ React11.createElement(
462
463
  "input",
463
464
  {
464
465
  id,
@@ -472,7 +473,7 @@ var MediaInput = (props) => {
472
473
  ) : null);
473
474
  };
474
475
  var MediaInputItem = (props) => {
475
- return /* @__PURE__ */ React15.createElement(
476
+ return /* @__PURE__ */ React11.createElement(
476
477
  "div",
477
478
  {
478
479
  className: cn(
@@ -492,7 +493,7 @@ var MediaInputError = class extends Error {
492
493
  this.description = description;
493
494
  }
494
495
  };
495
- var Switch = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
496
+ var Switch = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
496
497
  SwitchPrimitives.Root,
497
498
  {
498
499
  className: cn(
@@ -502,7 +503,7 @@ var Switch = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
502
503
  ...props,
503
504
  ref
504
505
  },
505
- /* @__PURE__ */ React15.createElement(
506
+ /* @__PURE__ */ React11.createElement(
506
507
  SwitchPrimitives.Thumb,
507
508
  {
508
509
  className: cn(
@@ -512,9 +513,9 @@ var Switch = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
512
513
  )
513
514
  ));
514
515
  Switch.displayName = SwitchPrimitives.Root.displayName;
515
- var Textarea = React15.forwardRef(
516
+ var Textarea = React11.forwardRef(
516
517
  ({ className, ...props }, ref) => {
517
- return /* @__PURE__ */ React15.createElement(
518
+ return /* @__PURE__ */ React11.createElement(
518
519
  "textarea",
519
520
  {
520
521
  className: cn(
@@ -553,35 +554,133 @@ var ContainerItemForm = (props) => {
553
554
  props: values
554
555
  });
555
556
  };
556
- React15.useEffect(() => {
557
+ React11.useEffect(() => {
557
558
  const subscription = form.watch(() => form.handleSubmit(onSubmit)());
558
559
  return () => subscription.unsubscribe();
559
560
  }, [form.watch, form.handleSubmit]);
560
- return /* @__PURE__ */ React15.createElement(Form, { ...form }, /* @__PURE__ */ React15.createElement("form", { onSubmit: form.handleSubmit(onSubmit) }, /* @__PURE__ */ React15.createElement("div", { className: "sb-space-y-4 sb-p-4" }, (component.inputs || []).map((input) => /* @__PURE__ */ React15.createElement(
561
- FormField,
561
+ return /* @__PURE__ */ React11.createElement(Form, { ...form }, /* @__PURE__ */ React11.createElement("form", { onSubmit: form.handleSubmit(onSubmit) }, /* @__PURE__ */ React11.createElement("div", { className: "sb-space-y-4 sb-p-4" }, (component.inputs || []).map((input) => /* @__PURE__ */ React11.createElement(
562
+ RenderFormField,
562
563
  {
563
564
  key: input.name,
564
- control: form.control,
565
- name: input.name,
566
- render: ({ field }) => /* @__PURE__ */ React15.createElement(RenderInput, { type: input.type, input, field })
565
+ type: input.type,
566
+ input,
567
+ form
567
568
  }
568
569
  )))));
569
570
  };
571
+ var RenderFormField = (props) => {
572
+ const { type, input, form } = props;
573
+ const fieldArray = useFieldArray({
574
+ control: form.control,
575
+ name: input.name
576
+ });
577
+ if (input.multiple) {
578
+ return /* @__PURE__ */ React11.createElement("fieldset", { className: "sb-space-y-2" }, /* @__PURE__ */ React11.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React11.createElement("div", { className: "sb-space-y-4" }, fieldArray.fields.map(
579
+ (field, i) => type !== "grouped" ? /* @__PURE__ */ React11.createElement(
580
+ FormField,
581
+ {
582
+ key: field.id,
583
+ control: form.control,
584
+ name: `${input.name}.${i}`,
585
+ render: ({ field: field2 }) => /* @__PURE__ */ React11.createElement("div", { className: "sb-flex sb-items-center sb-gap-3" }, /* @__PURE__ */ React11.createElement(RenderInput, { field: field2, type: input.type }), /* @__PURE__ */ React11.createElement("button", { type: "button", onClick: () => fieldArray.remove(i) }, /* @__PURE__ */ React11.createElement(XIcon, { className: "sb-h-4 sb-w-4" })))
586
+ }
587
+ ) : /* @__PURE__ */ React11.createElement("div", { className: "sb-flex sb-items-center sb-relative" }, /* @__PURE__ */ React11.createElement(
588
+ RenderFormField,
589
+ {
590
+ key: field.id,
591
+ form,
592
+ type,
593
+ input: {
594
+ ...input,
595
+ name: `${input.name}.${i}`,
596
+ multiple: false,
597
+ friendlyName: ""
598
+ }
599
+ }
600
+ ), /* @__PURE__ */ React11.createElement(
601
+ "button",
602
+ {
603
+ type: "button",
604
+ onClick: () => fieldArray.remove(i),
605
+ className: "sb-absolute sb-top-2 sb-right-2 sb-text-foreground/70 hover:sb-text-foreground"
606
+ },
607
+ /* @__PURE__ */ React11.createElement(XIcon, { className: "sb-h-4 sb-w-4" })
608
+ ))
609
+ ), /* @__PURE__ */ React11.createElement(
610
+ Button,
611
+ {
612
+ type: "button",
613
+ variant: "outline",
614
+ size: "sm",
615
+ className: cn(
616
+ "sb-w-[89%] sb-border-2 sb-border-dashed sb-text-muted-foreground",
617
+ type === "grouped" && "sb-w-full"
618
+ ),
619
+ onClick: () => fieldArray.append(void 0)
620
+ },
621
+ /* @__PURE__ */ React11.createElement(PlusCircleIcon, { className: "sb-h-4 sb-w-4" })
622
+ )));
623
+ }
624
+ switch (type) {
625
+ case "string":
626
+ case "number":
627
+ case "longText":
628
+ case "richText":
629
+ case "color":
630
+ case "date":
631
+ case "file":
632
+ return /* @__PURE__ */ React11.createElement(
633
+ FormField,
634
+ {
635
+ key: input.name,
636
+ control: form.control,
637
+ name: input.name,
638
+ render: ({ field }) => /* @__PURE__ */ React11.createElement(FormItem, null, /* @__PURE__ */ React11.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(RenderInput, { type, field })), input.helperText && /* @__PURE__ */ React11.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React11.createElement(FormMessage, null))
639
+ }
640
+ );
641
+ case "boolean":
642
+ return /* @__PURE__ */ React11.createElement(
643
+ FormField,
644
+ {
645
+ key: input.name,
646
+ control: form.control,
647
+ name: input.name,
648
+ render: ({ field }) => /* @__PURE__ */ React11.createElement(FormItem, { className: "sb-flex sb-flex-row sb-items-center sb-justify-between sb-space-y-0" }, /* @__PURE__ */ React11.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(RenderInput, { type, field })), input.helperText && /* @__PURE__ */ React11.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React11.createElement(FormMessage, null))
649
+ }
650
+ );
651
+ case "grouped":
652
+ return /* @__PURE__ */ React11.createElement("div", { className: "sb-space-y-2 sb-w-full" }, input.friendlyName !== "" && /* @__PURE__ */ React11.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React11.createElement("div", { className: "sb-space-y-2 sb-p-3 sb-w-full sb-border sb-rounded-lg" }, input.inputs.map((sub) => /* @__PURE__ */ React11.createElement(
653
+ RenderFormField,
654
+ {
655
+ key: `${input.name}.${sub.name}`,
656
+ type: sub.type,
657
+ input: {
658
+ ...sub,
659
+ name: `${input.name}.${sub.name}`
660
+ },
661
+ form
662
+ }
663
+ ))));
664
+ default:
665
+ throw new Error(
666
+ `[simple-builder]: Input type "${props.type}" not supported in render form field.`
667
+ );
668
+ }
669
+ };
570
670
  var RenderInput = (props) => {
571
- const { type, input, field } = props;
671
+ const { type, field } = props;
572
672
  switch (type) {
573
673
  case "string":
574
- return /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(Input, { ...field })), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
674
+ return /* @__PURE__ */ React11.createElement(Input, { ...field });
575
675
  case "longText":
576
- return /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(Textarea, { ...field })), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
577
676
  case "richText":
578
- return /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(Textarea, { ...field })), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
677
+ return /* @__PURE__ */ React11.createElement(Textarea, { ...field });
579
678
  case "number":
580
- return /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(Input, { type: "number", ...field })), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
679
+ return /* @__PURE__ */ React11.createElement(Input, { type: "number", ...field });
581
680
  case "color":
582
- return /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(ColorPicker, { color: field.value, onColorChange: field.onChange })), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
681
+ return /* @__PURE__ */ React11.createElement(ColorPicker, { color: field.value, onColorChange: field.onChange });
583
682
  case "date":
584
- return /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(Popover, null, /* @__PURE__ */ React15.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15.createElement(
683
+ return /* @__PURE__ */ React11.createElement(Popover, null, /* @__PURE__ */ React11.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React11.createElement(
585
684
  Button,
586
685
  {
587
686
  variant: "outline",
@@ -591,9 +690,9 @@ var RenderInput = (props) => {
591
690
  !field.value && "sb-text-muted-foreground"
592
691
  )
593
692
  },
594
- /* @__PURE__ */ React15.createElement(CalendarIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }),
595
- field.value ? format(field.value, "PPP") : /* @__PURE__ */ React15.createElement("span", null, "Pick a date")
596
- )), /* @__PURE__ */ React15.createElement(PopoverContent, { className: "sb-w-auto sb-p-0", align: "start" }, /* @__PURE__ */ React15.createElement(
693
+ /* @__PURE__ */ React11.createElement(CalendarIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }),
694
+ field.value ? format(field.value, "PPP") : /* @__PURE__ */ React11.createElement("span", null, "Pick a date")
695
+ )), /* @__PURE__ */ React11.createElement(PopoverContent, { className: "sb-w-auto sb-p-0", align: "start" }, /* @__PURE__ */ React11.createElement(
597
696
  Calendar,
598
697
  {
599
698
  mode: "single",
@@ -601,11 +700,11 @@ var RenderInput = (props) => {
601
700
  onSelect: field.onChange,
602
701
  initialFocus: true
603
702
  }
604
- )))), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
703
+ )));
605
704
  case "boolean":
606
- return /* @__PURE__ */ React15.createElement(FormItem, { className: "sb-flex sb-flex-row sb-items-center sb-justify-between sb-space-y-0" }, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(Switch, { checked: field.value, onCheckedChange: field.onChange })), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
705
+ return /* @__PURE__ */ React11.createElement(Switch, { checked: field.value, onCheckedChange: field.onChange });
607
706
  case "file":
608
- return /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
707
+ return /* @__PURE__ */ React11.createElement(
609
708
  MediaInput,
610
709
  {
611
710
  className: "sb-grid sb-grid-cols-2 sb-gap-1",
@@ -617,10 +716,10 @@ var RenderInput = (props) => {
617
716
  "media-input: Error: " + e?.description
618
717
  )
619
718
  }
620
- )), input.helperText && /* @__PURE__ */ React15.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15.createElement(FormMessage, null));
719
+ );
621
720
  default:
622
721
  throw new Error(
623
- `[simple-builder]: Input type "${props.type}" not supported`
722
+ `[simple-builder]: Input type "${props.type}" not supported in render input.`
624
723
  );
625
724
  }
626
725
  };
@@ -636,7 +735,7 @@ var tabsListVariants = tv({
636
735
  variant: "contained"
637
736
  }
638
737
  });
639
- var TabsList = React15.forwardRef(({ variant, className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
738
+ var TabsList = React11.forwardRef(({ variant, className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
640
739
  TabsPrimitive.List,
641
740
  {
642
741
  ref,
@@ -656,7 +755,7 @@ var tabsTriggerVariants = tv({
656
755
  variant: "contained"
657
756
  }
658
757
  });
659
- var TabsTrigger = React15.forwardRef(({ variant, className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
758
+ var TabsTrigger = React11.forwardRef(({ variant, className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
660
759
  TabsPrimitive.Trigger,
661
760
  {
662
761
  ref,
@@ -665,7 +764,7 @@ var TabsTrigger = React15.forwardRef(({ variant, className, ...props }, ref) =>
665
764
  }
666
765
  ));
667
766
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
668
- var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
767
+ var TabsContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
669
768
  TabsPrimitive.Content,
670
769
  {
671
770
  ref,
@@ -700,14 +799,14 @@ var BackgroundPicker = (props) => {
700
799
  "url(https://images.unsplash.com/photo-1688822863426-8c5f9b257090?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2532&q=90)",
701
800
  "url(https://images.unsplash.com/photo-1691225850735-6e4e51834cad?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2532&q=90)"
702
801
  ];
703
- const defaultTab = React15.useMemo(() => {
802
+ const defaultTab = React11.useMemo(() => {
704
803
  if (background.includes("url"))
705
804
  return "image";
706
805
  if (background.includes("gradient"))
707
806
  return "gradient";
708
807
  return "solid";
709
808
  }, [background]);
710
- return /* @__PURE__ */ React15.createElement(Popover, null, /* @__PURE__ */ React15.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15.createElement(
809
+ return /* @__PURE__ */ React11.createElement(Popover, null, /* @__PURE__ */ React11.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React11.createElement(
711
810
  Button,
712
811
  {
713
812
  variant: "outline",
@@ -718,20 +817,20 @@ var BackgroundPicker = (props) => {
718
817
  className
719
818
  )
720
819
  },
721
- /* @__PURE__ */ React15.createElement("div", { className: "sb-w-full sb-flex sb-items-center sb-gap-2" }, background ? /* @__PURE__ */ React15.createElement(
820
+ /* @__PURE__ */ React11.createElement("div", { className: "sb-w-full sb-flex sb-items-center sb-gap-2" }, background ? /* @__PURE__ */ React11.createElement(
722
821
  "div",
723
822
  {
724
823
  className: "sb-h-4 sb-w-4 sb-rounded !sb-bg-center !sb-bg-cover sb-transition-all sb-border",
725
824
  style: { background }
726
825
  }
727
- ) : /* @__PURE__ */ React15.createElement(PaintbrushIcon, { className: "sb-h-4 sb-w-4" }), /* @__PURE__ */ React15.createElement("div", { className: "sb-truncate sb-flex-1" }, background ? background : "Kies een achtergrond"))
728
- )), /* @__PURE__ */ React15.createElement(PopoverContent, { className: "sb-w-64 sb-p-0" }, /* @__PURE__ */ React15.createElement(Tabs, { defaultValue: defaultTab }, /* @__PURE__ */ React15.createElement(TabsList, { className: "sb-w-full" }, /* @__PURE__ */ React15.createElement(TabsTrigger, { className: "sb-flex-1", value: "solid" }, "Solid"), /* @__PURE__ */ React15.createElement(TabsTrigger, { className: "sb-flex-1", value: "gradient" }, "Gradient"), /* @__PURE__ */ React15.createElement(TabsTrigger, { className: "sb-flex-1", value: "image" }, "Image")), /* @__PURE__ */ React15.createElement(
826
+ ) : /* @__PURE__ */ React11.createElement(PaintbrushIcon, { className: "sb-h-4 sb-w-4" }), /* @__PURE__ */ React11.createElement("div", { className: "sb-truncate sb-flex-1" }, background ? background : "Kies een achtergrond"))
827
+ )), /* @__PURE__ */ React11.createElement(PopoverContent, { className: "sb-w-64 sb-p-0" }, /* @__PURE__ */ React11.createElement(Tabs, { defaultValue: defaultTab }, /* @__PURE__ */ React11.createElement(TabsList, { className: "sb-w-full" }, /* @__PURE__ */ React11.createElement(TabsTrigger, { className: "sb-flex-1", value: "solid" }, "Solid"), /* @__PURE__ */ React11.createElement(TabsTrigger, { className: "sb-flex-1", value: "gradient" }, "Gradient"), /* @__PURE__ */ React11.createElement(TabsTrigger, { className: "sb-flex-1", value: "image" }, "Image")), /* @__PURE__ */ React11.createElement(
729
828
  TabsContent,
730
829
  {
731
830
  value: "solid",
732
831
  className: "data-[state=active]:sb-flex sb-flex-wrap sb-gap-1 sb-p-4"
733
832
  },
734
- solids.map((s) => /* @__PURE__ */ React15.createElement(
833
+ solids.map((s) => /* @__PURE__ */ React11.createElement(
735
834
  "div",
736
835
  {
737
836
  key: s,
@@ -740,13 +839,13 @@ var BackgroundPicker = (props) => {
740
839
  onClick: () => onBackgroundChange(s)
741
840
  }
742
841
  ))
743
- ), /* @__PURE__ */ React15.createElement(
842
+ ), /* @__PURE__ */ React11.createElement(
744
843
  TabsContent,
745
844
  {
746
845
  value: "gradient",
747
846
  className: "data-[state=active]:sb-flex sb-flex-wrap sb-gap-1 sb-p-4"
748
847
  },
749
- gradients.map((s) => /* @__PURE__ */ React15.createElement(
848
+ gradients.map((s) => /* @__PURE__ */ React11.createElement(
750
849
  "div",
751
850
  {
752
851
  key: s,
@@ -755,7 +854,7 @@ var BackgroundPicker = (props) => {
755
854
  onClick: () => onBackgroundChange(s)
756
855
  }
757
856
  ))
758
- ), /* @__PURE__ */ React15.createElement(TabsContent, { value: "image" }, /* @__PURE__ */ React15.createElement("div", { className: "sb-p-4 sb-border-b" }, /* @__PURE__ */ React15.createElement(
857
+ ), /* @__PURE__ */ React11.createElement(TabsContent, { value: "image" }, /* @__PURE__ */ React11.createElement("div", { className: "sb-p-4 sb-border-b" }, /* @__PURE__ */ React11.createElement(
759
858
  MediaInput,
760
859
  {
761
860
  className: "sb-grid sb-grid-cols-2 sb-gap-1",
@@ -771,7 +870,7 @@ var BackgroundPicker = (props) => {
771
870
  "media-input: Error: " + e?.description
772
871
  )
773
872
  }
774
- )), /* @__PURE__ */ React15.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-gap-1 sb-p-4" }, images.map((s) => /* @__PURE__ */ React15.createElement(
873
+ )), /* @__PURE__ */ React11.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-gap-1 sb-p-4" }, images.map((s) => /* @__PURE__ */ React11.createElement(
775
874
  "div",
776
875
  {
777
876
  key: s,
@@ -799,7 +898,7 @@ var toggleVariants = tv({
799
898
  size: "default"
800
899
  }
801
900
  });
802
- var Toggle = React15.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ React15.createElement(
901
+ var Toggle = React11.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ React11.createElement(
803
902
  TogglePrimitive.Root,
804
903
  {
805
904
  ref,
@@ -809,32 +908,131 @@ var Toggle = React15.forwardRef(({ className, variant, size, ...props }, ref) =>
809
908
  ));
810
909
  Toggle.displayName = TogglePrimitive.Root.displayName;
811
910
 
911
+ // src/components/ui/spacing-input.tsx
912
+ var SpacingInput = (props) => {
913
+ const [value, setValue] = React11.useState(parse(props.value || "0px"));
914
+ const [indipendent, setIndipendent] = React11.useState(
915
+ isIndipendent(parse(props.value || "0px"))
916
+ );
917
+ React11.useEffect(() => {
918
+ if (!props.onChange)
919
+ return;
920
+ props.onChange(stringify(value));
921
+ }, [value, props.onChange]);
922
+ return /* @__PURE__ */ React11.createElement("div", { className: "sb-grid sb-grid-cols-[1fr,auto] sb-gap-3" }, /* @__PURE__ */ React11.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-items-center sb-gap-3" }, !indipendent ? /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
923
+ AdvancedInput,
924
+ {
925
+ value: value.left,
926
+ pattern: "\\d+",
927
+ onChange: ({ target: { value: value2 } }) => setValue((prev) => ({ ...prev, left: +value2, right: +value2 })),
928
+ prepend: /* @__PURE__ */ React11.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4" }),
929
+ append: /* @__PURE__ */ React11.createElement("span", { className: "sb-text-muted-foreground" }, "px")
930
+ }
931
+ ), /* @__PURE__ */ React11.createElement(
932
+ AdvancedInput,
933
+ {
934
+ value: value.top,
935
+ pattern: "\\d+",
936
+ onChange: ({ target: { value: value2 } }) => setValue((prev) => ({ ...prev, top: +value2, bottom: +value2 })),
937
+ prepend: /* @__PURE__ */ React11.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
938
+ append: /* @__PURE__ */ React11.createElement("span", { className: "sb-text-muted-foreground" }, "px")
939
+ }
940
+ )) : /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
941
+ AdvancedInput,
942
+ {
943
+ value: value.left,
944
+ pattern: "\\d+",
945
+ onChange: ({ target: { value: value2 } }) => setValue((prev) => ({ ...prev, left: +value2 })),
946
+ prepend: /* @__PURE__ */ React11.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4" }),
947
+ append: /* @__PURE__ */ React11.createElement("span", { className: "sb-text-muted-foreground" }, "px")
948
+ }
949
+ ), /* @__PURE__ */ React11.createElement(
950
+ AdvancedInput,
951
+ {
952
+ value: value.top,
953
+ pattern: "\\d+",
954
+ onChange: ({ target: { value: value2 } }) => setValue((prev) => ({ ...prev, top: +value2 })),
955
+ prepend: /* @__PURE__ */ React11.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
956
+ append: /* @__PURE__ */ React11.createElement("span", { className: "sb-text-muted-foreground" }, "px")
957
+ }
958
+ ), /* @__PURE__ */ React11.createElement(
959
+ AdvancedInput,
960
+ {
961
+ value: value.right,
962
+ pattern: "\\d+",
963
+ onChange: ({ target: { value: value2 } }) => setValue((prev) => ({ ...prev, right: +value2 })),
964
+ prepend: /* @__PURE__ */ React11.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-180" }),
965
+ append: /* @__PURE__ */ React11.createElement("span", { className: "sb-text-muted-foreground" }, "px")
966
+ }
967
+ ), /* @__PURE__ */ React11.createElement(
968
+ AdvancedInput,
969
+ {
970
+ value: value.bottom,
971
+ pattern: "\\d+",
972
+ onChange: ({ target: { value: value2 } }) => setValue((prev) => ({ ...prev, bottom: +value2 })),
973
+ prepend: /* @__PURE__ */ React11.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb--rotate-90" }),
974
+ append: /* @__PURE__ */ React11.createElement("span", { className: "sb-text-muted-foreground" }, "px")
975
+ }
976
+ ))), /* @__PURE__ */ React11.createElement("div", { className: "sb-shrink-0" }, /* @__PURE__ */ React11.createElement(
977
+ Toggle,
978
+ {
979
+ className: "sb-shrink-0 sb-flex sb-w-8 sb-h-8 sb-p-0",
980
+ variant: "outline",
981
+ size: "sm",
982
+ pressed: indipendent,
983
+ onPressedChange: setIndipendent
984
+ },
985
+ /* @__PURE__ */ React11.createElement(ScanIcon, { className: "sb-h-4 sb-w-4" })
986
+ )));
987
+ };
988
+ var isIndipendent = (value) => {
989
+ const { top, right, bottom, left } = value;
990
+ return top !== bottom || right !== left;
991
+ };
992
+ var parse = (value) => {
993
+ const matches = value.match(/(\d+)/gm);
994
+ const [top = 0, right = 0, bottom = 0, left = 0] = matches?.map((match) => +match) || [];
995
+ switch (matches?.length) {
996
+ case 1:
997
+ return { top, right: top, bottom: top, left: top };
998
+ case 2:
999
+ return { top, bottom: top, left: right, right };
1000
+ case 3:
1001
+ return { top, right, left: right, bottom };
1002
+ default:
1003
+ return { top, right, bottom, left };
1004
+ }
1005
+ };
1006
+ var stringify = (value) => {
1007
+ const { top, right, bottom, left } = value;
1008
+ if (top === right && top === bottom && top === left) {
1009
+ return `${top}px`;
1010
+ }
1011
+ if (top === bottom && right === left) {
1012
+ return `${top}px ${right}px`;
1013
+ }
1014
+ if (right === left) {
1015
+ return `${top}px ${right}px ${bottom}px`;
1016
+ }
1017
+ return `${top}px ${right}px ${bottom}px ${left}px`;
1018
+ };
1019
+
812
1020
  // src/components/item-design-form.tsx
813
- var spacingSchema = z.discriminatedUnion("indipendent", [
814
- z.object({
815
- indipendent: z.literal(false),
816
- horizontal: z.coerce.number(),
817
- vertical: z.coerce.number()
818
- }),
819
- z.object({
820
- indipendent: z.literal(true),
821
- left: z.coerce.number(),
822
- right: z.coerce.number(),
823
- top: z.coerce.number(),
824
- bottom: z.coerce.number()
825
- })
826
- ]);
827
1021
  var designSchema = z.object({
828
- container: z.boolean(),
1022
+ container: z.coerce.boolean(),
829
1023
  desktop: z.object({
830
- padding: spacingSchema.optional(),
831
- margin: spacingSchema.optional()
832
- }).passthrough().optional(),
1024
+ background: z.string(),
1025
+ color: z.string(),
1026
+ padding: z.string(),
1027
+ margin: z.string()
1028
+ }),
833
1029
  mobile: z.object({
834
- padding: spacingSchema.optional(),
835
- margin: spacingSchema.optional()
836
- }).passthrough().optional()
837
- }).passthrough();
1030
+ background: z.string(),
1031
+ color: z.string(),
1032
+ padding: z.string(),
1033
+ margin: z.string()
1034
+ })
1035
+ });
838
1036
  var ItemDesignForm = (props) => {
839
1037
  const { item } = props;
840
1038
  const component = builder.getComponent(item.component);
@@ -843,376 +1041,196 @@ var ItemDesignForm = (props) => {
843
1041
  `[simple-builder]: Component "${item.component}" not found`
844
1042
  );
845
1043
  }
846
- const defaults = component.defaultStyles || {};
847
- const { patchItem } = useBuilder();
848
- const [device, setDevice] = React15.useState("desktop");
849
- const getDefaultDesktopValue = (key, initial = "") => {
850
- const value = item.styles?.desktop?.[key];
851
- const def = defaults?.desktop?.[key];
852
- if (value !== void 0) {
853
- return value;
854
- } else if (def !== void 0) {
855
- return def;
856
- } else {
857
- return initial;
1044
+ const getDefaultDeviceValue = (params) => {
1045
+ const { device: device2 = "desktop", key, fallback = "" } = params;
1046
+ if (item.styles?.[device2]?.[key] !== void 0) {
1047
+ return item.styles[device2][key];
858
1048
  }
859
- };
860
- const getDefaultMobileValue = (key, initial = "") => {
861
- const value = item.styles?.mobile?.[key];
862
- const desktopValue = item.styles?.desktop?.[key];
863
- const def = defaults?.mobile?.[key];
864
- const desktopDef = defaults?.desktop?.[key];
865
- if (value !== void 0) {
866
- return value;
867
- } else if (def !== void 0) {
868
- return def;
869
- } else if (desktopValue !== void 0) {
870
- return desktopValue;
871
- } else if (desktopDef !== void 0) {
872
- return desktopDef;
873
- } else {
874
- return initial;
1049
+ if (component.defaultStyles?.[device2]?.[key] !== void 0) {
1050
+ return component.defaultStyles[device2][key];
875
1051
  }
1052
+ if (device2 === "mobile") {
1053
+ const desktopValue = getDefaultDeviceValue({
1054
+ ...params,
1055
+ device: "desktop"
1056
+ });
1057
+ if (desktopValue !== void 0) {
1058
+ return desktopValue;
1059
+ }
1060
+ }
1061
+ return fallback;
876
1062
  };
877
- const getSpacingValue = (str) => {
878
- const parsed = spacing.parse(str);
1063
+ const getDefaultDeviceValues = (device2) => {
879
1064
  return {
880
- indipendent: spacing.isIndipendent(str),
881
- horizontal: parsed.left,
882
- vertical: parsed.top,
883
- ...parsed
1065
+ background: getDefaultDeviceValue({ device: device2, key: "background" }),
1066
+ color: getDefaultDeviceValue({ device: device2, key: "color" }),
1067
+ padding: getDefaultDeviceValue({ device: device2, key: "padding" }),
1068
+ margin: getDefaultDeviceValue({ device: device2, key: "margin" })
884
1069
  };
885
1070
  };
886
1071
  const form = useForm({
887
1072
  resolver: zodResolver(designSchema),
888
- defaultValues: {
889
- container: item.styles?.container || defaults.container || true,
890
- desktop: {
891
- background: getDefaultDesktopValue("background"),
892
- color: getDefaultDesktopValue("color"),
893
- padding: getSpacingValue(getDefaultDesktopValue("padding")),
894
- margin: getSpacingValue(getDefaultDesktopValue("margin"))
895
- },
896
- mobile: {
897
- background: getDefaultMobileValue("background"),
898
- color: getDefaultMobileValue("color"),
899
- padding: getSpacingValue(getDefaultMobileValue("padding")),
900
- margin: getSpacingValue(getDefaultMobileValue("margin"))
901
- }
1073
+ values: {
1074
+ container: item.styles?.container ?? true,
1075
+ desktop: getDefaultDeviceValues("desktop"),
1076
+ mobile: getDefaultDeviceValues("mobile")
902
1077
  }
903
1078
  });
1079
+ const { patchItem } = useBuilder();
904
1080
  const onSubmit = (values) => {
905
- const { container } = values;
906
- const getPatchedDeviceValues = (device2 = "desktop") => {
907
- const initital = Object.keys(item.styles?.[device2] || {}).filter((key) => !Object.keys(values[device2]).includes(key)).reduce(
908
- (acc, key) => ({ ...acc, [key]: item.styles?.[device2][key] }),
909
- {}
910
- );
911
- return Object.entries(values[device2]).reduce((acc, [key, value]) => {
912
- let res = value;
913
- if (key === "padding" || key === "margin") {
914
- const data = value;
915
- const params = data.indipendent ? data : {
916
- top: data.vertical,
917
- bottom: data.vertical,
918
- left: data.horizontal,
919
- right: data.horizontal
920
- };
921
- res = spacing.stringify(params);
1081
+ const { container, desktop, mobile } = values;
1082
+ const dirtyFields = form.formState.dirtyFields;
1083
+ const desktopPatch = Object.entries(desktop).reduce(
1084
+ (acc, [key, value]) => ({
1085
+ ...acc,
1086
+ ...value && { [key]: value }
1087
+ }),
1088
+ { ...item.styles?.desktop }
1089
+ );
1090
+ const mobilePatch = Object.entries(mobile).reduce(
1091
+ (acc, [key, value]) => {
1092
+ const desktopValue = desktop[key];
1093
+ const isDirty = dirtyFields.desktop?.[key];
1094
+ if (value === desktopValue || isDirty) {
1095
+ return acc;
1096
+ }
1097
+ if (["padding", "margin"].includes(key)) {
1098
+ if (value === "0px" && desktopValue === "0px") {
1099
+ return acc;
1100
+ }
922
1101
  }
923
1102
  return {
924
1103
  ...acc,
925
- ...res ? { [key]: res } : {}
1104
+ ...value && { [key]: value }
926
1105
  };
927
- }, initital);
928
- };
929
- const patchedDesktopValues = getPatchedDeviceValues();
930
- const patchedMobileValues = getPatchedDeviceValues("mobile");
1106
+ },
1107
+ { ...item.styles?.mobile }
1108
+ );
931
1109
  patchItem(item.id, {
932
1110
  styles: {
933
1111
  ...container === false && { container },
934
- ...Object.keys(patchedDesktopValues).length && {
935
- desktop: patchedDesktopValues
936
- },
937
- ...Object.keys(patchedMobileValues).length && {
938
- mobile: patchedMobileValues
939
- }
1112
+ ...Object.keys(desktopPatch).length && { desktop: desktopPatch },
1113
+ ...Object.keys(mobilePatch).length && { mobile: mobilePatch }
940
1114
  }
941
1115
  });
942
1116
  };
943
- React15.useEffect(() => {
1117
+ const [device, setDevice] = React11.useState("desktop");
1118
+ React11.useEffect(() => {
944
1119
  const subscription = form.watch(() => form.handleSubmit(onSubmit)());
945
1120
  return () => subscription.unsubscribe();
946
1121
  }, [form.watch, form.handleSubmit]);
947
- const [indipendentPadding, indipendentMargin] = form.watch([
948
- `${device}.padding.indipendent`,
949
- `${device}.margin.indipendent`
950
- ]);
951
- return /* @__PURE__ */ React15.createElement(Form, { ...form }, /* @__PURE__ */ React15.createElement("form", { onSubmit: form.handleSubmit(onSubmit) }, /* @__PURE__ */ React15.createElement("div", { className: "sb-space-y-4 sb-p-4" }, /* @__PURE__ */ React15.createElement(Tabs, { defaultValue: device, onValueChange: setDevice }, /* @__PURE__ */ React15.createElement(TabsList, { className: "sb-h-9 sb-grid sb-w-full sb-grid-cols-2" }, /* @__PURE__ */ React15.createElement(TabsTrigger, { value: "desktop", className: "sb-text-xs" }, /* @__PURE__ */ React15.createElement(MonitorIcon, { className: "sb-h-4 sb-w-4 sb-mr-2" }), /* @__PURE__ */ React15.createElement("span", null, "Desktop")), /* @__PURE__ */ React15.createElement(TabsTrigger, { value: "mobile", className: "sb-text-xs" }, /* @__PURE__ */ React15.createElement(SmartphoneIcon, { className: "sb-h-4 sb-w-4 sb-mr-2" }), /* @__PURE__ */ React15.createElement("span", null, "Mobiel")))), /* @__PURE__ */ React15.createElement("div", { className: "sb-space-y-4" }, /* @__PURE__ */ React15.createElement(
1122
+ return /* @__PURE__ */ React11.createElement(Form, { ...form }, /* @__PURE__ */ React11.createElement("form", { onSubmit: form.handleSubmit(onSubmit) }, /* @__PURE__ */ React11.createElement("div", { className: "sb-space-y-4 sb-p-4" }, /* @__PURE__ */ React11.createElement(
1123
+ Tabs,
1124
+ {
1125
+ defaultValue: device,
1126
+ onValueChange: (device2) => setDevice(device2)
1127
+ },
1128
+ /* @__PURE__ */ React11.createElement(TabsList, { className: "sb-h-9 sb-grid sb-w-full sb-grid-cols-2" }, /* @__PURE__ */ React11.createElement(TabsTrigger, { value: "desktop", className: "sb-text-xs" }, /* @__PURE__ */ React11.createElement(MonitorIcon, { className: "sb-h-4 sb-w-4 sb-mr-2" }), /* @__PURE__ */ React11.createElement("span", null, "Desktop")), /* @__PURE__ */ React11.createElement(TabsTrigger, { value: "mobile", className: "sb-text-xs" }, /* @__PURE__ */ React11.createElement(SmartphoneIcon, { className: "sb-h-4 sb-w-4 sb-mr-2" }), /* @__PURE__ */ React11.createElement("span", null, "Mobiel")))
1129
+ ), /* @__PURE__ */ React11.createElement("div", { className: "sb-space-y-4" }, /* @__PURE__ */ React11.createElement(
952
1130
  FormField,
953
1131
  {
954
1132
  control: form.control,
955
1133
  key: `${device}.background`,
956
1134
  name: `${device}.background`,
957
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, "Achtergrond"), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1135
+ render: ({ field }) => /* @__PURE__ */ React11.createElement(FormItem, null, /* @__PURE__ */ React11.createElement(FormLabel, null, "Achtergrond"), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(
958
1136
  BackgroundPicker,
959
1137
  {
960
1138
  background: field.value,
961
1139
  onBackgroundChange: field.onChange
962
1140
  }
963
- )), /* @__PURE__ */ React15.createElement(FormMessage, null))
1141
+ )), /* @__PURE__ */ React11.createElement(FormMessage, null))
964
1142
  }
965
- ), /* @__PURE__ */ React15.createElement(
1143
+ ), /* @__PURE__ */ React11.createElement(
966
1144
  FormField,
967
1145
  {
968
1146
  control: form.control,
969
1147
  key: `${device}.color`,
970
1148
  name: `${device}.color`,
971
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormLabel, null, "Inhoud kleur"), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1149
+ render: ({ field }) => /* @__PURE__ */ React11.createElement(FormItem, null, /* @__PURE__ */ React11.createElement(FormLabel, null, "Inhoud kleur"), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(
972
1150
  ColorPicker,
973
1151
  {
974
1152
  color: field.value,
975
1153
  onColorChange: field.onChange
976
1154
  }
977
- )), /* @__PURE__ */ React15.createElement(FormMessage, null))
1155
+ )), /* @__PURE__ */ React11.createElement(FormMessage, null))
978
1156
  }
979
- ), /* @__PURE__ */ React15.createElement("hr", null), /* @__PURE__ */ React15.createElement(
1157
+ ), /* @__PURE__ */ React11.createElement("hr", null), /* @__PURE__ */ React11.createElement(
980
1158
  FormField,
981
1159
  {
982
1160
  control: form.control,
983
1161
  name: "container",
984
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, { className: "sb-flex sb-flex-row sb-items-center sb-justify-between sb-space-y-0" }, /* @__PURE__ */ React15.createElement(FormLabel, null, "Volledige breedte"), /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1162
+ render: ({ field }) => /* @__PURE__ */ React11.createElement(FormItem, { className: "sb-flex sb-flex-row sb-items-center sb-justify-between sb-space-y-0" }, /* @__PURE__ */ React11.createElement(FormLabel, null, "Volledige breedte"), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(
985
1163
  Switch,
986
1164
  {
987
1165
  checked: !field.value,
988
1166
  onCheckedChange: (v) => field.onChange(!v)
989
1167
  }
990
- )), /* @__PURE__ */ React15.createElement(FormMessage, null))
1168
+ )), /* @__PURE__ */ React11.createElement(FormMessage, null))
991
1169
  }
992
- ), /* @__PURE__ */ React15.createElement("hr", null), /* @__PURE__ */ React15.createElement("div", { className: "sb-space-y-2" }, /* @__PURE__ */ React15.createElement(FormLabel, null, "Padding"), /* @__PURE__ */ React15.createElement("div", { className: "sb-grid sb-grid-cols-[1fr,auto] sb-gap-3" }, /* @__PURE__ */ React15.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-items-center sb-gap-3" }, !indipendentPadding ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
1170
+ ), /* @__PURE__ */ React11.createElement("hr", null), /* @__PURE__ */ React11.createElement(
993
1171
  FormField,
994
1172
  {
995
1173
  control: form.control,
996
- key: `${device}.padding.horizontal`,
997
- name: `${device}.padding.horizontal`,
998
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
999
- AdvancedInput,
1174
+ key: `${device}.padding`,
1175
+ name: `${device}.padding`,
1176
+ render: ({ field }) => /* @__PURE__ */ React11.createElement(FormItem, null, /* @__PURE__ */ React11.createElement(FormLabel, null, "Padding"), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(
1177
+ SpacingInput,
1000
1178
  {
1001
- ...field,
1002
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4" }),
1003
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1179
+ value: field.value,
1180
+ onChange: field.onChange
1004
1181
  }
1005
- )))
1182
+ )), /* @__PURE__ */ React11.createElement(FormMessage, null))
1006
1183
  }
1007
- ), /* @__PURE__ */ React15.createElement(
1184
+ ), /* @__PURE__ */ React11.createElement(
1008
1185
  FormField,
1009
1186
  {
1010
1187
  control: form.control,
1011
- key: `${device}.padding.vertical`,
1012
- name: `${device}.padding.vertical`,
1013
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1014
- AdvancedInput,
1188
+ key: `${device}.margin`,
1189
+ name: `${device}.margin`,
1190
+ render: ({ field }) => /* @__PURE__ */ React11.createElement(FormItem, null, /* @__PURE__ */ React11.createElement(FormLabel, null, "Margin"), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(
1191
+ SpacingInput,
1015
1192
  {
1016
- ...field,
1017
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
1018
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1193
+ value: field.value,
1194
+ onChange: field.onChange
1019
1195
  }
1020
- )))
1196
+ )), /* @__PURE__ */ React11.createElement(FormMessage, null))
1021
1197
  }
1022
- )) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
1023
- FormField,
1024
- {
1025
- control: form.control,
1026
- key: `${device}.padding.left`,
1027
- name: `${device}.padding.left`,
1028
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1029
- AdvancedInput,
1030
- {
1031
- ...field,
1032
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4" }),
1033
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1034
- }
1035
- )))
1036
- }
1037
- ), /* @__PURE__ */ React15.createElement(
1038
- FormField,
1039
- {
1040
- control: form.control,
1041
- key: `${device}.padding.top`,
1042
- name: `${device}.padding.top`,
1043
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1044
- AdvancedInput,
1045
- {
1046
- ...field,
1047
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
1048
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1049
- }
1050
- )))
1051
- }
1052
- ), /* @__PURE__ */ React15.createElement(
1053
- FormField,
1054
- {
1055
- control: form.control,
1056
- key: `${device}.padding.right`,
1057
- name: `${device}.padding.right`,
1058
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1059
- AdvancedInput,
1060
- {
1061
- ...field,
1062
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-180" }),
1063
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1064
- }
1065
- )))
1066
- }
1067
- ), /* @__PURE__ */ React15.createElement(
1068
- FormField,
1069
- {
1070
- control: form.control,
1071
- key: `${device}.padding.bottom`,
1072
- name: `${device}.padding.bottom`,
1073
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1074
- AdvancedInput,
1075
- {
1076
- ...field,
1077
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb--rotate-90" }),
1078
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1079
- }
1080
- )))
1081
- }
1082
- ))), /* @__PURE__ */ React15.createElement("div", { className: "sb-shrink-0" }, /* @__PURE__ */ React15.createElement(
1083
- FormField,
1084
- {
1085
- control: form.control,
1086
- key: `${device}.padding.indipendent`,
1087
- name: `${device}.padding.indipendent`,
1088
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1089
- Toggle,
1090
- {
1091
- className: "sb-shrink-0 sb-flex sb-w-8 sb-h-8 sb-p-0",
1092
- variant: "outline",
1093
- size: "sm",
1094
- pressed: field.value,
1095
- onPressedChange: field.onChange
1096
- },
1097
- /* @__PURE__ */ React15.createElement(ScanIcon, { className: "sb-h-4 sb-w-4" })
1098
- ))
1099
- }
1100
- ))), /* @__PURE__ */ React15.createElement(FormMessage, null)), /* @__PURE__ */ React15.createElement("div", { className: "sb-space-y-2" }, /* @__PURE__ */ React15.createElement(FormLabel, null, "Margin"), /* @__PURE__ */ React15.createElement("div", { className: "sb-grid sb-grid-cols-[1fr,auto] sb-gap-3" }, /* @__PURE__ */ React15.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-items-center sb-gap-3" }, !indipendentMargin ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
1101
- FormField,
1102
- {
1103
- control: form.control,
1104
- key: `${device}.margin.horizontal`,
1105
- name: `${device}.margin.horizontal`,
1106
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1107
- AdvancedInput,
1108
- {
1109
- ...field,
1110
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4" }),
1111
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1112
- }
1113
- )))
1114
- }
1115
- ), /* @__PURE__ */ React15.createElement(
1116
- FormField,
1117
- {
1118
- control: form.control,
1119
- key: `${device}.margin.vertical`,
1120
- name: `${device}.margin.vertical`,
1121
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1122
- AdvancedInput,
1123
- {
1124
- ...field,
1125
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
1126
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1127
- }
1128
- )))
1129
- }
1130
- )) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
1131
- FormField,
1132
- {
1133
- control: form.control,
1134
- key: `${device}.margin.left`,
1135
- name: `${device}.margin.left`,
1136
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1137
- AdvancedInput,
1138
- {
1139
- ...field,
1140
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4" }),
1141
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1142
- }
1143
- )))
1144
- }
1145
- ), /* @__PURE__ */ React15.createElement(
1146
- FormField,
1147
- {
1148
- control: form.control,
1149
- key: `${device}.margin.top`,
1150
- name: `${device}.margin.top`,
1151
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1152
- AdvancedInput,
1153
- {
1154
- ...field,
1155
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
1156
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1157
- }
1158
- )))
1159
- }
1160
- ), /* @__PURE__ */ React15.createElement(
1161
- FormField,
1162
- {
1163
- control: form.control,
1164
- key: `${device}.margin.right`,
1165
- name: `${device}.margin.right`,
1166
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1167
- AdvancedInput,
1168
- {
1169
- ...field,
1170
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-180" }),
1171
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1172
- }
1173
- )))
1174
- }
1175
- ), /* @__PURE__ */ React15.createElement(
1176
- FormField,
1177
- {
1178
- control: form.control,
1179
- key: `${device}.margin.bottom`,
1180
- name: `${device}.margin.bottom`,
1181
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormItem, null, /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1182
- AdvancedInput,
1183
- {
1184
- ...field,
1185
- prepend: /* @__PURE__ */ React15.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb--rotate-90" }),
1186
- append: /* @__PURE__ */ React15.createElement("span", { className: "sb-text-muted-foreground" }, "px")
1187
- }
1188
- )))
1189
- }
1190
- ))), /* @__PURE__ */ React15.createElement("div", { className: "sb-shrink-0" }, /* @__PURE__ */ React15.createElement(
1191
- FormField,
1192
- {
1193
- control: form.control,
1194
- key: `${device}.margin.indipendent`,
1195
- name: `${device}.margin.indipendent`,
1196
- render: ({ field }) => /* @__PURE__ */ React15.createElement(FormControl, null, /* @__PURE__ */ React15.createElement(
1197
- Toggle,
1198
- {
1199
- className: "sb-shrink-0 sb-flex sb-w-8 sb-h-8 sb-p-0",
1200
- variant: "outline",
1201
- size: "sm",
1202
- pressed: field.value,
1203
- onPressedChange: field.onChange
1204
- },
1205
- /* @__PURE__ */ React15.createElement(ScanIcon, { className: "sb-h-4 sb-w-4" })
1206
- ))
1207
- }
1208
- ))), /* @__PURE__ */ React15.createElement(FormMessage, null))))));
1198
+ )))));
1209
1199
  };
1200
+ var ScrollArea = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(
1201
+ ScrollAreaPrimitive.Root,
1202
+ {
1203
+ ref,
1204
+ className: cn("sb-relative sb-overflow-hidden", className),
1205
+ ...props
1206
+ },
1207
+ /* @__PURE__ */ React11.createElement(ScrollAreaPrimitive.Viewport, { className: "sb-h-full sb-max-h-[80vh] sb-w-full sb-rounded-[inherit]" }, children),
1208
+ /* @__PURE__ */ React11.createElement(ScrollBar, null),
1209
+ /* @__PURE__ */ React11.createElement(ScrollAreaPrimitive.Corner, null)
1210
+ ));
1211
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1212
+ var ScrollBar = React11.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React11.createElement(
1213
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
1214
+ {
1215
+ ref,
1216
+ orientation,
1217
+ className: cn(
1218
+ "sb-flex sb-touch-none sb-select-none sb-transition-colors",
1219
+ orientation === "vertical" && "sb-h-full sb-w-2.5 sb-border-l sb-border-l-transparent sb-p-[1px]",
1220
+ orientation === "horizontal" && "sb-h-2.5 sb-flex-col sb-border-t sb-border-t-transparent sb-p-[1px]",
1221
+ className
1222
+ ),
1223
+ ...props
1224
+ },
1225
+ /* @__PURE__ */ React11.createElement(ScrollAreaPrimitive.ScrollAreaThumb, { className: "sb-relative sb-flex-1 sb-rounded-full sb-bg-border" })
1226
+ ));
1227
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
1210
1228
 
1211
1229
  // src/components/container-item-toolbar.tsx
1212
1230
  var ContainerItemToolbar = (props) => {
1213
1231
  const { contentId, canBringUp = false, canBringDown = false } = props;
1214
1232
  const { bringUp, bringDown } = useBuilder();
1215
- return /* @__PURE__ */ React15.createElement("div", { className: "sb-absolute sb-z-20 sb-top-1 sb-right-1 sb-rounded-md sb-shadow sb-flex sb-flex-col sb-gap-1 sb-p-1 sb-bg-card sb-text-card-foreground sb-item-toolbar sb-opacity-0 sb-transition-opacity" }, /* @__PURE__ */ React15.createElement("div", { className: "sb-h-10 sb-p-1 sb-border sb-border-input sb-bg-background sb-rounded-md sb-text-sm sb-font-medium sb-flex sb-gap-1 sb-items-center sb-justify-start" }, /* @__PURE__ */ React15.createElement(EditButton, { id: contentId }), /* @__PURE__ */ React15.createElement(
1233
+ return /* @__PURE__ */ React11.createElement("div", { className: "sb-absolute sb-z-20 sb-top-1 sb-right-1 sb-rounded-md sb-shadow sb-flex sb-flex-col sb-gap-1 sb-p-1 sb-bg-card sb-text-card-foreground sb-item-toolbar sb-opacity-0 sb-transition-opacity" }, /* @__PURE__ */ React11.createElement("div", { className: "sb-h-10 sb-p-1 sb-border sb-border-input sb-bg-background sb-rounded-md sb-text-sm sb-font-medium sb-flex sb-gap-1 sb-items-center sb-justify-start" }, /* @__PURE__ */ React11.createElement(EditButton, { id: contentId }), /* @__PURE__ */ React11.createElement(
1216
1234
  Button,
1217
1235
  {
1218
1236
  variant: "ghost",
@@ -1220,8 +1238,8 @@ var ContainerItemToolbar = (props) => {
1220
1238
  onClick: () => bringUp(contentId),
1221
1239
  disabled: !canBringUp
1222
1240
  },
1223
- /* @__PURE__ */ React15.createElement(ArrowUp, { className: "sb-h-5 sb-w-5" })
1224
- ), /* @__PURE__ */ React15.createElement(
1241
+ /* @__PURE__ */ React11.createElement(ArrowUp, { className: "sb-h-5 sb-w-5" })
1242
+ ), /* @__PURE__ */ React11.createElement(
1225
1243
  Button,
1226
1244
  {
1227
1245
  variant: "ghost",
@@ -1229,21 +1247,21 @@ var ContainerItemToolbar = (props) => {
1229
1247
  onClick: () => bringDown(contentId),
1230
1248
  disabled: !canBringDown
1231
1249
  },
1232
- /* @__PURE__ */ React15.createElement(ArrowDown, { className: "sb-h-5 sb-w-5" })
1233
- ), /* @__PURE__ */ React15.createElement(DeleteButton, { contentId })));
1250
+ /* @__PURE__ */ React11.createElement(ArrowDown, { className: "sb-h-5 sb-w-5" })
1251
+ ), /* @__PURE__ */ React11.createElement(DeleteButton, { contentId })));
1234
1252
  };
1235
1253
  var EditButton = ({ id }) => {
1236
- return /* @__PURE__ */ React15.createElement(Popover, null, /* @__PURE__ */ React15.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15.createElement(Button, { variant: "ghost", className: "sb-w-8 sb-h-8 sb-p-0" }, /* @__PURE__ */ React15.createElement(Edit2Icon, { className: "sb-h-5 sb-w-5" }))), /* @__PURE__ */ React15.createElement(
1254
+ return /* @__PURE__ */ React11.createElement(Popover, { modal: true }, /* @__PURE__ */ React11.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React11.createElement(Button, { variant: "ghost", className: "sb-w-8 sb-h-8 sb-p-0" }, /* @__PURE__ */ React11.createElement(Edit2Icon, { className: "sb-h-5 sb-w-5" }))), /* @__PURE__ */ React11.createElement(
1237
1255
  PopoverContent,
1238
1256
  {
1239
1257
  side: "left",
1240
1258
  align: "start",
1241
1259
  sideOffset: 16,
1242
1260
  alignOffset: -8,
1243
- className: "sb-p-0",
1261
+ className: "sb-p-0 sb-relative",
1244
1262
  collisionPadding: 16
1245
1263
  },
1246
- /* @__PURE__ */ React15.createElement(EditPopoverInner, { id })
1264
+ /* @__PURE__ */ React11.createElement(EditPopoverInner, { id })
1247
1265
  ));
1248
1266
  };
1249
1267
  var EditPopoverInner = (props) => {
@@ -1255,18 +1273,18 @@ var EditPopoverInner = (props) => {
1255
1273
  `[simple-builder]: Item with id ${id} not found in container item form component`
1256
1274
  );
1257
1275
  }
1258
- return /* @__PURE__ */ React15.createElement(Tabs, null, /* @__PURE__ */ React15.createElement(TabsList, { variant: "text", defaultValue: "content" }, /* @__PURE__ */ React15.createElement(TabsTrigger, { variant: "text", value: "content" }, "Inhoud"), /* @__PURE__ */ React15.createElement(TabsTrigger, { variant: "text", value: "design" }, "Design")), /* @__PURE__ */ React15.createElement(TabsContent, { value: "content" }, /* @__PURE__ */ React15.createElement(ContainerItemForm, { item })), /* @__PURE__ */ React15.createElement(TabsContent, { value: "design" }, /* @__PURE__ */ React15.createElement(ItemDesignForm, { item })));
1276
+ return /* @__PURE__ */ React11.createElement(Tabs, null, /* @__PURE__ */ React11.createElement(TabsList, { variant: "text", defaultValue: "content" }, /* @__PURE__ */ React11.createElement(TabsTrigger, { variant: "text", value: "content" }, "Inhoud"), /* @__PURE__ */ React11.createElement(TabsTrigger, { variant: "text", value: "design" }, "Design")), /* @__PURE__ */ React11.createElement(TabsContent, { value: "content" }, /* @__PURE__ */ React11.createElement(ScrollArea, null, /* @__PURE__ */ React11.createElement(ContainerItemForm, { item }))), /* @__PURE__ */ React11.createElement(TabsContent, { value: "design" }, /* @__PURE__ */ React11.createElement(ItemDesignForm, { item })));
1259
1277
  };
1260
1278
  var DeleteButton = ({ contentId }) => {
1261
1279
  const { deleteContent } = useBuilder();
1262
- return /* @__PURE__ */ React15.createElement(AlertDialog, null, /* @__PURE__ */ React15.createElement(AlertDialogTrigger, { asChild: true }, /* @__PURE__ */ React15.createElement(
1280
+ return /* @__PURE__ */ React11.createElement(AlertDialog, null, /* @__PURE__ */ React11.createElement(AlertDialogTrigger, { asChild: true }, /* @__PURE__ */ React11.createElement(
1263
1281
  Button,
1264
1282
  {
1265
1283
  variant: "ghost",
1266
1284
  className: "sb-w-8 sb-h-8 sb-p-0 sb-text-destructive"
1267
1285
  },
1268
- /* @__PURE__ */ React15.createElement(Trash2Icon, { className: "sb-h-5 sb-w-5" })
1269
- )), /* @__PURE__ */ React15.createElement(AlertDialogContent, null, /* @__PURE__ */ React15.createElement(AlertDialogDescription, null, "Weet je zeker dat je dit blok wilt verwijderen?"), /* @__PURE__ */ React15.createElement(AlertDialogFooter, null, /* @__PURE__ */ React15.createElement(AlertDialogCancel, null, "Annuleren"), /* @__PURE__ */ React15.createElement(
1286
+ /* @__PURE__ */ React11.createElement(Trash2Icon, { className: "sb-h-5 sb-w-5" })
1287
+ )), /* @__PURE__ */ React11.createElement(AlertDialogContent, null, /* @__PURE__ */ React11.createElement(AlertDialogDescription, null, "Weet je zeker dat je dit blok wilt verwijderen?"), /* @__PURE__ */ React11.createElement(AlertDialogFooter, null, /* @__PURE__ */ React11.createElement(AlertDialogCancel, null, "Annuleren"), /* @__PURE__ */ React11.createElement(
1270
1288
  AlertDialogAction,
1271
1289
  {
1272
1290
  className: buttonVariants({ variant: "destructive" }),
@@ -1285,14 +1303,14 @@ var BuildContainerInner = (props) => {
1285
1303
  "[simple-builder]: Multiple content blocks detected when using property multiple false."
1286
1304
  );
1287
1305
  }
1288
- return /* @__PURE__ */ React15.createElement("div", null, items.length <= 0 ? /* @__PURE__ */ React15.createElement(AddContentPlaceholder, { parent: id, container: name, index: 0 }) : multiple && /* @__PURE__ */ React15.createElement(AddContentDividerButton, { parent: id, container: name, index: 0 }), items.map((item, i) => /* @__PURE__ */ React15.createElement(React15.Fragment, { key: item.id }, /* @__PURE__ */ React15.createElement("div", { className: "sb-relative sb-container-item" }, /* @__PURE__ */ React15.createElement(DesignWrapper, { styles: item.styles }, builder.bindComponent(item, true)), /* @__PURE__ */ React15.createElement(
1306
+ return /* @__PURE__ */ React11.createElement("div", null, items.length <= 0 ? /* @__PURE__ */ React11.createElement(AddContentPlaceholder, { parent: id, container: name, index: 0 }) : multiple && /* @__PURE__ */ React11.createElement(AddContentDividerButton, { parent: id, container: name, index: 0 }), items.map((item, i) => /* @__PURE__ */ React11.createElement(React11.Fragment, { key: item.id }, /* @__PURE__ */ React11.createElement("div", { className: "sb-relative sb-container-item" }, /* @__PURE__ */ React11.createElement(DesignWrapper, { styles: item.styles }, builder.bindComponent(item, true)), /* @__PURE__ */ React11.createElement(
1289
1307
  ContainerItemToolbar,
1290
1308
  {
1291
1309
  contentId: item.id,
1292
1310
  canBringUp: i > 0,
1293
1311
  canBringDown: i < items.length - 1
1294
1312
  }
1295
- )), multiple && /* @__PURE__ */ React15.createElement(
1313
+ )), multiple && /* @__PURE__ */ React11.createElement(
1296
1314
  AddContentDividerButton,
1297
1315
  {
1298
1316
  parent: id,
@@ -1305,9 +1323,9 @@ var build_container_client_default = BuildContainerInner;
1305
1323
  var AddContentButton = (props) => {
1306
1324
  const components = builder.getComponents();
1307
1325
  const { addContent } = useBuilder();
1308
- return /* @__PURE__ */ React15.createElement(Popover, null, /* @__PURE__ */ React15.createElement(PopoverTrigger, { asChild: true }, props.children), /* @__PURE__ */ React15.createElement(PopoverContent, { className: "sb-p-1" }, /* @__PURE__ */ React15.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-gap-2" }, components.map((component) => {
1326
+ return /* @__PURE__ */ React11.createElement(Popover, null, /* @__PURE__ */ React11.createElement(PopoverTrigger, { asChild: true }, props.children), /* @__PURE__ */ React11.createElement(PopoverContent, { className: "sb-p-1" }, /* @__PURE__ */ React11.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-gap-2" }, components.map((component) => {
1309
1327
  const Icon = component.icon ?? ImageIcon;
1310
- return /* @__PURE__ */ React15.createElement(PopoverClose, { key: component.name, asChild: true }, /* @__PURE__ */ React15.createElement(
1328
+ return /* @__PURE__ */ React11.createElement(PopoverClose, { key: component.name, asChild: true }, /* @__PURE__ */ React11.createElement(
1311
1329
  Button,
1312
1330
  {
1313
1331
  variant: "ghost",
@@ -1321,22 +1339,22 @@ var AddContentButton = (props) => {
1321
1339
  );
1322
1340
  }
1323
1341
  },
1324
- /* @__PURE__ */ React15.createElement(Icon, { className: "sb-mr-2 sb-h-4 sb-w-4 sb-shrink-0" }),
1342
+ /* @__PURE__ */ React11.createElement(Icon, { className: "sb-mr-2 sb-h-4 sb-w-4 sb-shrink-0" }),
1325
1343
  component.friendlyName ?? component.name
1326
1344
  ));
1327
1345
  }))));
1328
1346
  };
1329
1347
  var AddContentPlaceholder = (props) => {
1330
- return /* @__PURE__ */ React15.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React15.createElement("div", { className: "sb-flex sb-justify-center sb-bg-primary/50 p-4" }, /* @__PURE__ */ React15.createElement(Button, { size: "sm" }, /* @__PURE__ */ React15.createElement(PlusIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }), "Blok Toevoegen")));
1348
+ return /* @__PURE__ */ React11.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React11.createElement("div", { className: "sb-flex sb-justify-center sb-bg-primary/50 p-4" }, /* @__PURE__ */ React11.createElement(Button, { size: "sm" }, /* @__PURE__ */ React11.createElement(PlusIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }), "Blok Toevoegen")));
1331
1349
  };
1332
1350
  var AddContentDividerButton = (props) => {
1333
- return /* @__PURE__ */ React15.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React15.createElement("div", { className: "sb-w-full sb-h-1 sb--my-[2px] sb-bg-primary sb-relative sb-z-20 sb-opacity-0 add-content-divider-button sb-transition-opacity" }, /* @__PURE__ */ React15.createElement(
1351
+ return /* @__PURE__ */ React11.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React11.createElement("div", { className: "sb-w-full sb-h-1 sb--my-[2px] sb-bg-primary sb-relative sb-z-20 sb-opacity-0 add-content-divider-button sb-transition-opacity" }, /* @__PURE__ */ React11.createElement(
1334
1352
  Button,
1335
1353
  {
1336
1354
  size: "sm",
1337
1355
  className: "sb-absolute sb-left-1/2 sb-top-1/2 sb--translate-y-1/2 sb--translate-x-1/2 sb-shadow"
1338
1356
  },
1339
- /* @__PURE__ */ React15.createElement(PlusIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }),
1357
+ /* @__PURE__ */ React11.createElement(PlusIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }),
1340
1358
  "Blok Toevoegen"
1341
1359
  )));
1342
1360
  };