@simple-builder/react 1.0.0 → 1.0.1

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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import { cn, buttonVariants, Button, useBuilder, spacing } from './chunk-KZNIT2AQ.mjs';
1
+ import { cn, buttonVariants, Button, useBuilder, spacing } from './chunk-YHA5XZL4.mjs';
2
2
  import { builder } from './chunk-7K7IGTF3.mjs';
3
3
  import * as React15 from 'react';
4
4
  import { PlusIcon, ArrowUp, ArrowDown, Edit2Icon, AlignHorizontalSpaceAroundIcon, AlignHorizontalJustifyStartIcon, ScanIcon, CalendarIcon, Trash2Icon, ImageIcon, Loader2Icon, PaintbrushIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkTEAHH2DG_js = require('./chunk-TEAHH2DG.js');
5
+ var chunkAAKS5YHL_js = require('./chunk-AAKS5YHL.js');
6
6
  var chunkVMHWPKU4_js = require('./chunk-VMHWPKU4.js');
7
7
  var React15 = require('react');
8
8
  var lucideReact = require('lucide-react');
@@ -56,7 +56,7 @@ var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
56
56
  var AlertDialogOverlay = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15__namespace.createElement(
57
57
  AlertDialogPrimitive__namespace.Overlay,
58
58
  {
59
- className: chunkTEAHH2DG_js.cn(
59
+ className: chunkAAKS5YHL_js.cn(
60
60
  "fixed inset-0 z-50 bg-sb-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
61
61
  className
62
62
  ),
@@ -69,7 +69,7 @@ var AlertDialogContent = React15__namespace.forwardRef(({ className, ...props },
69
69
  AlertDialogPrimitive__namespace.Content,
70
70
  {
71
71
  ref,
72
- className: chunkTEAHH2DG_js.cn(
72
+ className: chunkAAKS5YHL_js.cn(
73
73
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-sb-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
74
74
  className
75
75
  ),
@@ -83,7 +83,7 @@ var AlertDialogFooter = ({
83
83
  }) => /* @__PURE__ */ React15__namespace.createElement(
84
84
  "div",
85
85
  {
86
- className: chunkTEAHH2DG_js.cn(
86
+ className: chunkAAKS5YHL_js.cn(
87
87
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
88
88
  className
89
89
  ),
@@ -95,7 +95,7 @@ var AlertDialogTitle = React15__namespace.forwardRef(({ className, ...props }, r
95
95
  AlertDialogPrimitive__namespace.Title,
96
96
  {
97
97
  ref,
98
- className: chunkTEAHH2DG_js.cn("text-lg font-semibold", className),
98
+ className: chunkAAKS5YHL_js.cn("text-lg font-semibold", className),
99
99
  ...props
100
100
  }
101
101
  ));
@@ -104,7 +104,7 @@ var AlertDialogDescription = React15__namespace.forwardRef(({ className, ...prop
104
104
  AlertDialogPrimitive__namespace.Description,
105
105
  {
106
106
  ref,
107
- className: chunkTEAHH2DG_js.cn("text-sm text-sb-muted-foreground", className),
107
+ className: chunkAAKS5YHL_js.cn("text-sm text-sb-muted-foreground", className),
108
108
  ...props
109
109
  }
110
110
  ));
@@ -113,7 +113,7 @@ var AlertDialogAction = React15__namespace.forwardRef(({ className, ...props },
113
113
  AlertDialogPrimitive__namespace.Action,
114
114
  {
115
115
  ref,
116
- className: chunkTEAHH2DG_js.cn(chunkTEAHH2DG_js.buttonVariants(), className),
116
+ className: chunkAAKS5YHL_js.cn(chunkAAKS5YHL_js.buttonVariants(), className),
117
117
  ...props
118
118
  }
119
119
  ));
@@ -122,8 +122,8 @@ var AlertDialogCancel = React15__namespace.forwardRef(({ className, ...props },
122
122
  AlertDialogPrimitive__namespace.Cancel,
123
123
  {
124
124
  ref,
125
- className: chunkTEAHH2DG_js.cn(
126
- chunkTEAHH2DG_js.buttonVariants({ variant: "outline" }),
125
+ className: chunkAAKS5YHL_js.cn(
126
+ chunkAAKS5YHL_js.buttonVariants({ variant: "outline" }),
127
127
  "mt-2 sm:mt-0",
128
128
  className
129
129
  ),
@@ -138,7 +138,7 @@ var Label = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @
138
138
  LabelPrimitive__namespace.Root,
139
139
  {
140
140
  ref,
141
- className: chunkTEAHH2DG_js.cn(labelVariants(), className),
141
+ className: chunkAAKS5YHL_js.cn(labelVariants(), className),
142
142
  ...props
143
143
  }
144
144
  ));
@@ -177,7 +177,7 @@ var FormItemContext = React15__namespace.createContext(
177
177
  );
178
178
  var FormItem = React15__namespace.forwardRef(({ className, ...props }, ref) => {
179
179
  const id = React15__namespace.useId();
180
- return /* @__PURE__ */ React15__namespace.createElement(FormItemContext.Provider, { value: { id } }, /* @__PURE__ */ React15__namespace.createElement("div", { ref, className: chunkTEAHH2DG_js.cn("space-y-2", className), ...props }));
180
+ return /* @__PURE__ */ React15__namespace.createElement(FormItemContext.Provider, { value: { id } }, /* @__PURE__ */ React15__namespace.createElement("div", { ref, className: chunkAAKS5YHL_js.cn("space-y-2", className), ...props }));
181
181
  });
182
182
  FormItem.displayName = "FormItem";
183
183
  var FormLabel = React15__namespace.forwardRef(({ className, ...props }, ref) => {
@@ -186,7 +186,7 @@ var FormLabel = React15__namespace.forwardRef(({ className, ...props }, ref) =>
186
186
  Label,
187
187
  {
188
188
  ref,
189
- className: chunkTEAHH2DG_js.cn(error && "text-sb-destructive", className),
189
+ className: chunkAAKS5YHL_js.cn(error && "text-sb-destructive", className),
190
190
  htmlFor: formItemId,
191
191
  ...props
192
192
  }
@@ -214,7 +214,7 @@ var FormDescription = React15__namespace.forwardRef(({ className, ...props }, re
214
214
  {
215
215
  ref,
216
216
  id: formDescriptionId,
217
- className: chunkTEAHH2DG_js.cn("text-sm text-sb-muted-foreground", className),
217
+ className: chunkAAKS5YHL_js.cn("text-sm text-sb-muted-foreground", className),
218
218
  ...props
219
219
  }
220
220
  );
@@ -231,7 +231,7 @@ var FormMessage = React15__namespace.forwardRef(({ className, children, ...props
231
231
  {
232
232
  ref,
233
233
  id: formMessageId,
234
- className: chunkTEAHH2DG_js.cn("text-sm font-medium text-sb-destructive", className),
234
+ className: chunkAAKS5YHL_js.cn("text-sm font-medium text-sb-destructive", className),
235
235
  ...props
236
236
  },
237
237
  body
@@ -247,7 +247,7 @@ var PopoverContent = React15__namespace.forwardRef(({ className, align = "center
247
247
  ref,
248
248
  align,
249
249
  sideOffset,
250
- className: chunkTEAHH2DG_js.cn(
250
+ className: chunkAAKS5YHL_js.cn(
251
251
  "z-50 w-72 rounded-md border bg-sb-popover p-4 text-sb-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
252
252
  className
253
253
  ),
@@ -260,7 +260,7 @@ var TabsList = React15__namespace.forwardRef(({ className, ...props }, ref) => /
260
260
  TabsPrimitive__namespace.List,
261
261
  {
262
262
  ref,
263
- className: chunkTEAHH2DG_js.cn("flex items-center border-b px-4 space-x-6", className),
263
+ className: chunkAAKS5YHL_js.cn("flex items-center border-b px-4 space-x-6", className),
264
264
  ...props
265
265
  }
266
266
  ));
@@ -269,7 +269,7 @@ var TabsTrigger = React15__namespace.forwardRef(({ className, ...props }, ref) =
269
269
  TabsPrimitive__namespace.Trigger,
270
270
  {
271
271
  ref,
272
- className: chunkTEAHH2DG_js.cn(
272
+ className: chunkAAKS5YHL_js.cn(
273
273
  "inline-flex items-center justify-center whitespace-nowrap py-3 text-sm font-medium transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-black border-b-2 border-transparent data-[state=active]:text-sb-foreground text-sb-muted-sb-foreground",
274
274
  className
275
275
  ),
@@ -281,7 +281,7 @@ var TabsContent = React15__namespace.forwardRef(({ className, ...props }, ref) =
281
281
  TabsPrimitive__namespace.Content,
282
282
  {
283
283
  ref,
284
- className: chunkTEAHH2DG_js.cn(
284
+ className: chunkAAKS5YHL_js.cn(
285
285
  "ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
286
286
  className
287
287
  ),
@@ -374,7 +374,7 @@ var MediaInput = (props) => {
374
374
  body: JSON.stringify({ src })
375
375
  });
376
376
  };
377
- return /* @__PURE__ */ React15__namespace.createElement("div", { className: chunkTEAHH2DG_js.cn("flex flex-wrap gap-4", props.className) }, sources.map((src) => /* @__PURE__ */ React15__namespace.createElement(MediaInputItem, { key: src, className: chunkTEAHH2DG_js.cn("group", props.itemClassName) }, /* @__PURE__ */ React15__namespace.createElement(
377
+ return /* @__PURE__ */ React15__namespace.createElement("div", { className: chunkAAKS5YHL_js.cn("flex flex-wrap gap-4", props.className) }, sources.map((src) => /* @__PURE__ */ React15__namespace.createElement(MediaInputItem, { key: src, className: chunkAAKS5YHL_js.cn("group", props.itemClassName) }, /* @__PURE__ */ React15__namespace.createElement(
378
378
  Image,
379
379
  {
380
380
  src,
@@ -393,7 +393,7 @@ var MediaInput = (props) => {
393
393
  MediaInputItem,
394
394
  {
395
395
  key: i,
396
- className: chunkTEAHH2DG_js.cn(
396
+ className: chunkAAKS5YHL_js.cn(
397
397
  "flex h-28 w-28 items-center justify-center",
398
398
  props.itemClassName
399
399
  )
@@ -403,7 +403,7 @@ var MediaInput = (props) => {
403
403
  "label",
404
404
  {
405
405
  htmlFor: id,
406
- className: chunkTEAHH2DG_js.cn(
406
+ className: chunkAAKS5YHL_js.cn(
407
407
  "flex h-28 w-28 cursor-pointer items-center justify-center rounded-lg border",
408
408
  props.itemClassName
409
409
  )
@@ -426,7 +426,7 @@ var MediaInputItem = (props) => {
426
426
  return /* @__PURE__ */ React15__namespace.createElement(
427
427
  "div",
428
428
  {
429
- className: chunkTEAHH2DG_js.cn(
429
+ className: chunkAAKS5YHL_js.cn(
430
430
  "relative h-28 w-28 overflow-hidden rounded-lg border",
431
431
  props.className
432
432
  )
@@ -474,11 +474,11 @@ var BackgroundPicker = (props) => {
474
474
  return "solid";
475
475
  }, [background]);
476
476
  return /* @__PURE__ */ React15__namespace.createElement(Popover, null, /* @__PURE__ */ React15__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15__namespace.createElement(
477
- chunkTEAHH2DG_js.Button,
477
+ chunkAAKS5YHL_js.Button,
478
478
  {
479
479
  variant: "outline",
480
480
  size: "sm",
481
- className: chunkTEAHH2DG_js.cn(
481
+ className: chunkAAKS5YHL_js.cn(
482
482
  "justify-start text-left font-normal normal-case w-full",
483
483
  !background && "text-sb-muted-foreground",
484
484
  className
@@ -557,15 +557,15 @@ function Calendar({
557
557
  reactDayPicker.DayPicker,
558
558
  {
559
559
  showOutsideDays,
560
- className: chunkTEAHH2DG_js.cn("p-3", className),
560
+ className: chunkAAKS5YHL_js.cn("p-3", className),
561
561
  classNames: {
562
562
  months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
563
563
  month: "space-y-4",
564
564
  caption: "flex justify-center pt-1 relative items-center",
565
565
  caption_label: "text-sm font-medium",
566
566
  nav: "space-x-1 flex items-center",
567
- nav_button: chunkTEAHH2DG_js.cn(
568
- chunkTEAHH2DG_js.buttonVariants({ variant: "outline" }),
567
+ nav_button: chunkAAKS5YHL_js.cn(
568
+ chunkAAKS5YHL_js.buttonVariants({ variant: "outline" }),
569
569
  "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
570
570
  ),
571
571
  nav_button_previous: "absolute left-1",
@@ -574,12 +574,12 @@ function Calendar({
574
574
  head_row: "flex",
575
575
  head_cell: "text-sb-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
576
576
  row: "flex w-full mt-2",
577
- cell: chunkTEAHH2DG_js.cn(
577
+ cell: chunkAAKS5YHL_js.cn(
578
578
  "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-sb-accent [&:has([aria-selected].day-outside)]:bg-sb-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
579
579
  props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
580
580
  ),
581
- day: chunkTEAHH2DG_js.cn(
582
- chunkTEAHH2DG_js.buttonVariants({ variant: "ghost" }),
581
+ day: chunkAAKS5YHL_js.cn(
582
+ chunkAAKS5YHL_js.buttonVariants({ variant: "ghost" }),
583
583
  "h-8 w-8 p-0 font-normal aria-selected:opacity-100"
584
584
  ),
585
585
  day_range_start: "day-range-start",
@@ -615,11 +615,11 @@ var ColorPicker = (props) => {
615
615
  "#FF0000"
616
616
  ];
617
617
  return /* @__PURE__ */ React15__namespace.createElement(Popover, null, /* @__PURE__ */ React15__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15__namespace.createElement(
618
- chunkTEAHH2DG_js.Button,
618
+ chunkAAKS5YHL_js.Button,
619
619
  {
620
620
  variant: "outline",
621
621
  size: "sm",
622
- className: chunkTEAHH2DG_js.cn(
622
+ className: chunkAAKS5YHL_js.cn(
623
623
  "justify-start text-left font-normal normal-case w-full",
624
624
  !color && "text-sb-muted-foreground",
625
625
  className
@@ -648,7 +648,7 @@ var Input = React15__namespace.forwardRef(
648
648
  "input",
649
649
  {
650
650
  type,
651
- className: chunkTEAHH2DG_js.cn(
651
+ className: chunkAAKS5YHL_js.cn(
652
652
  "flex h-8 w-full rounded-md border border-sb-input bg-sb-background px-3 py-1 text-sm ring-offset-sb-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-sb-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sb-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
653
653
  className
654
654
  ),
@@ -668,7 +668,7 @@ AdvancedInput.displayName = "AdvancedInput";
668
668
  var Switch = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15__namespace.createElement(
669
669
  SwitchPrimitives__namespace.Root,
670
670
  {
671
- className: chunkTEAHH2DG_js.cn(
671
+ className: chunkAAKS5YHL_js.cn(
672
672
  "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sb-ring focus-visible:ring-offset-2 focus-visible:ring-offset-sb-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-sb-primary data-[state=unchecked]:bg-sb-input",
673
673
  className
674
674
  ),
@@ -678,7 +678,7 @@ var Switch = React15__namespace.forwardRef(({ className, ...props }, ref) => /*
678
678
  /* @__PURE__ */ React15__namespace.createElement(
679
679
  SwitchPrimitives__namespace.Thumb,
680
680
  {
681
- className: chunkTEAHH2DG_js.cn(
681
+ className: chunkAAKS5YHL_js.cn(
682
682
  "pointer-events-none block h-5 w-5 rounded-full bg-sb-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
683
683
  )
684
684
  }
@@ -690,7 +690,7 @@ var Textarea = React15__namespace.forwardRef(
690
690
  return /* @__PURE__ */ React15__namespace.createElement(
691
691
  "textarea",
692
692
  {
693
- className: chunkTEAHH2DG_js.cn(
693
+ className: chunkAAKS5YHL_js.cn(
694
694
  "flex min-h-[60px] w-full rounded-md border border-sb-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-sb-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sb-ring disabled:cursor-not-allowed disabled:opacity-50",
695
695
  className
696
696
  ),
@@ -725,7 +725,7 @@ var Toggle = React15__namespace.forwardRef(({ className, variant, size, ...props
725
725
  TogglePrimitive__namespace.Root,
726
726
  {
727
727
  ref,
728
- className: chunkTEAHH2DG_js.cn(toggleVariants({ variant, size, className })),
728
+ className: chunkAAKS5YHL_js.cn(toggleVariants({ variant, size, className })),
729
729
  ...props
730
730
  }
731
731
  ));
@@ -734,9 +734,9 @@ Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
734
734
  // src/components/container-item-toolbar.tsx
735
735
  var ContainerItemToolbar = (props) => {
736
736
  const { contentId, canBringUp = false, canBringDown = false } = props;
737
- const { bringUp, bringDown } = chunkTEAHH2DG_js.useBuilder();
737
+ const { bringUp, bringDown } = chunkAAKS5YHL_js.useBuilder();
738
738
  return /* @__PURE__ */ React15__namespace.createElement("div", { className: "absolute z-20 top-1 right-1 rounded-md shadow flex flex-col gap-1 p-1 bg-sb-card text-sb-card-sb-foreground sb-item-toolbar opacity-0 transition-opacity" }, /* @__PURE__ */ React15__namespace.createElement("div", { className: "h-10 p-1 border border-sb-input bg-sb-background rounded-md text-sm font-medium flex gap-1 items-center justify-start" }, /* @__PURE__ */ React15__namespace.createElement(EditButton, { id: contentId }), /* @__PURE__ */ React15__namespace.createElement(
739
- chunkTEAHH2DG_js.Button,
739
+ chunkAAKS5YHL_js.Button,
740
740
  {
741
741
  variant: "ghost",
742
742
  className: "w-8 h-8 p-0",
@@ -745,7 +745,7 @@ var ContainerItemToolbar = (props) => {
745
745
  },
746
746
  /* @__PURE__ */ React15__namespace.createElement(lucideReact.ArrowUp, { className: "h-5 w-5" })
747
747
  ), /* @__PURE__ */ React15__namespace.createElement(
748
- chunkTEAHH2DG_js.Button,
748
+ chunkAAKS5YHL_js.Button,
749
749
  {
750
750
  variant: "ghost",
751
751
  className: "w-8 h-8 p-0",
@@ -756,7 +756,7 @@ var ContainerItemToolbar = (props) => {
756
756
  ), /* @__PURE__ */ React15__namespace.createElement(DeleteButton, { contentId })));
757
757
  };
758
758
  var EditButton = ({ id }) => {
759
- return /* @__PURE__ */ React15__namespace.createElement(Popover, null, /* @__PURE__ */ React15__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15__namespace.createElement(chunkTEAHH2DG_js.Button, { variant: "ghost", className: "w-8 h-8 p-0" }, /* @__PURE__ */ React15__namespace.createElement(lucideReact.Edit2Icon, { className: "h-5 w-5" }))), /* @__PURE__ */ React15__namespace.createElement(
759
+ return /* @__PURE__ */ React15__namespace.createElement(Popover, null, /* @__PURE__ */ React15__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15__namespace.createElement(chunkAAKS5YHL_js.Button, { variant: "ghost", className: "w-8 h-8 p-0" }, /* @__PURE__ */ React15__namespace.createElement(lucideReact.Edit2Icon, { className: "h-5 w-5" }))), /* @__PURE__ */ React15__namespace.createElement(
760
760
  PopoverContent,
761
761
  {
762
762
  side: "left",
@@ -771,7 +771,7 @@ var EditButton = ({ id }) => {
771
771
  };
772
772
  var EditPopoverInner = (props) => {
773
773
  const { id } = props;
774
- const { getItem } = chunkTEAHH2DG_js.useBuilder();
774
+ const { getItem } = chunkAAKS5YHL_js.useBuilder();
775
775
  const item = getItem(id);
776
776
  if (!item) {
777
777
  throw new Error(
@@ -782,7 +782,7 @@ var EditPopoverInner = (props) => {
782
782
  };
783
783
  var ContainerItemForm = (props) => {
784
784
  const { item } = props;
785
- const { patchItem } = chunkTEAHH2DG_js.useBuilder();
785
+ const { patchItem } = chunkAAKS5YHL_js.useBuilder();
786
786
  const component = chunkVMHWPKU4_js.builder.getComponent(item.component);
787
787
  if (!component) {
788
788
  throw new Error(
@@ -840,9 +840,9 @@ var designSchema = zod.z.object({
840
840
  });
841
841
  var ItemDesignForm = (props) => {
842
842
  const { item } = props;
843
- const { patchItem } = chunkTEAHH2DG_js.useBuilder();
844
- const initialPadding = chunkTEAHH2DG_js.spacing.parse(item.styles?.padding ?? "");
845
- const initialMargin = chunkTEAHH2DG_js.spacing.parse(item.styles?.margin ?? "");
843
+ const { patchItem } = chunkAAKS5YHL_js.useBuilder();
844
+ const initialPadding = chunkAAKS5YHL_js.spacing.parse(item.styles?.padding ?? "");
845
+ const initialMargin = chunkAAKS5YHL_js.spacing.parse(item.styles?.margin ?? "");
846
846
  const form = reactHookForm.useForm({
847
847
  resolver: zod$1.zodResolver(designSchema),
848
848
  defaultValues: {
@@ -850,7 +850,7 @@ var ItemDesignForm = (props) => {
850
850
  background: item.styles?.background ?? "",
851
851
  color: item.styles?.color ?? "",
852
852
  padding: {
853
- indipendent: chunkTEAHH2DG_js.spacing.isIndipendent(
853
+ indipendent: chunkAAKS5YHL_js.spacing.isIndipendent(
854
854
  item.styles?.padding ?? ""
855
855
  ),
856
856
  horizontal: initialPadding.left,
@@ -861,7 +861,7 @@ var ItemDesignForm = (props) => {
861
861
  bottom: initialPadding.bottom
862
862
  },
863
863
  margin: {
864
- indipendent: chunkTEAHH2DG_js.spacing.isIndipendent(
864
+ indipendent: chunkAAKS5YHL_js.spacing.isIndipendent(
865
865
  item.styles?.margin ?? ""
866
866
  ),
867
867
  horizontal: initialMargin.left,
@@ -1156,11 +1156,11 @@ var RenderInput = (props) => {
1156
1156
  return /* @__PURE__ */ React15__namespace.createElement(FormItem, null, /* @__PURE__ */ React15__namespace.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15__namespace.createElement(FormControl, null, /* @__PURE__ */ React15__namespace.createElement(ColorPicker, { color: field.value, onColorChange: field.onChange })), input.helperText && /* @__PURE__ */ React15__namespace.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React15__namespace.createElement(FormMessage, null));
1157
1157
  case "date":
1158
1158
  return /* @__PURE__ */ React15__namespace.createElement(FormItem, null, /* @__PURE__ */ React15__namespace.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React15__namespace.createElement(FormControl, null, /* @__PURE__ */ React15__namespace.createElement(Popover, null, /* @__PURE__ */ React15__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React15__namespace.createElement(
1159
- chunkTEAHH2DG_js.Button,
1159
+ chunkAAKS5YHL_js.Button,
1160
1160
  {
1161
1161
  variant: "outline",
1162
1162
  size: "sm",
1163
- className: chunkTEAHH2DG_js.cn(
1163
+ className: chunkAAKS5YHL_js.cn(
1164
1164
  "w-full flex justify-start text-left font-normal",
1165
1165
  !field.value && "text-muted-foreground"
1166
1166
  )
@@ -1199,11 +1199,11 @@ var RenderInput = (props) => {
1199
1199
  }
1200
1200
  };
1201
1201
  var DeleteButton = ({ contentId }) => {
1202
- const { deleteContent } = chunkTEAHH2DG_js.useBuilder();
1203
- return /* @__PURE__ */ React15__namespace.createElement(AlertDialog, null, /* @__PURE__ */ React15__namespace.createElement(AlertDialogTrigger, { asChild: true }, /* @__PURE__ */ React15__namespace.createElement(chunkTEAHH2DG_js.Button, { variant: "ghost", className: "w-8 h-8 p-0 text-sb-destructive" }, /* @__PURE__ */ React15__namespace.createElement(lucideReact.Trash2Icon, { className: "h-5 w-5" }))), /* @__PURE__ */ React15__namespace.createElement(AlertDialogContent, null, /* @__PURE__ */ React15__namespace.createElement(AlertDialogDescription, null, "Weet je zeker dat je dit blok wilt verwijderen?"), /* @__PURE__ */ React15__namespace.createElement(AlertDialogFooter, null, /* @__PURE__ */ React15__namespace.createElement(AlertDialogCancel, null, "Annuleren"), /* @__PURE__ */ React15__namespace.createElement(
1202
+ const { deleteContent } = chunkAAKS5YHL_js.useBuilder();
1203
+ return /* @__PURE__ */ React15__namespace.createElement(AlertDialog, null, /* @__PURE__ */ React15__namespace.createElement(AlertDialogTrigger, { asChild: true }, /* @__PURE__ */ React15__namespace.createElement(chunkAAKS5YHL_js.Button, { variant: "ghost", className: "w-8 h-8 p-0 text-sb-destructive" }, /* @__PURE__ */ React15__namespace.createElement(lucideReact.Trash2Icon, { className: "h-5 w-5" }))), /* @__PURE__ */ React15__namespace.createElement(AlertDialogContent, null, /* @__PURE__ */ React15__namespace.createElement(AlertDialogDescription, null, "Weet je zeker dat je dit blok wilt verwijderen?"), /* @__PURE__ */ React15__namespace.createElement(AlertDialogFooter, null, /* @__PURE__ */ React15__namespace.createElement(AlertDialogCancel, null, "Annuleren"), /* @__PURE__ */ React15__namespace.createElement(
1204
1204
  AlertDialogAction,
1205
1205
  {
1206
- className: chunkTEAHH2DG_js.buttonVariants({ variant: "destructive" }),
1206
+ className: chunkAAKS5YHL_js.buttonVariants({ variant: "destructive" }),
1207
1207
  onClick: () => deleteContent(contentId)
1208
1208
  },
1209
1209
  "Verwijderen"
@@ -1217,7 +1217,7 @@ var DesignWrapper = (props) => {
1217
1217
  return /* @__PURE__ */ React15__namespace.createElement(
1218
1218
  "div",
1219
1219
  {
1220
- className: chunkTEAHH2DG_js.cn("relative", className),
1220
+ className: chunkAAKS5YHL_js.cn("relative", className),
1221
1221
  style: { ...!src && { background }, ...rest }
1222
1222
  },
1223
1223
  src && /* @__PURE__ */ React15__namespace.createElement(
@@ -1261,11 +1261,11 @@ var BuildContainerInner = (props) => {
1261
1261
  var build_container_client_default = BuildContainerInner;
1262
1262
  var AddContentButton = (props) => {
1263
1263
  const components = chunkVMHWPKU4_js.builder.getComponents();
1264
- const { addContent } = chunkTEAHH2DG_js.useBuilder();
1264
+ const { addContent } = chunkAAKS5YHL_js.useBuilder();
1265
1265
  return /* @__PURE__ */ React15__namespace.createElement(Popover, null, /* @__PURE__ */ React15__namespace.createElement(PopoverTrigger, { asChild: true }, props.children), /* @__PURE__ */ React15__namespace.createElement(PopoverContent, { className: "p-1" }, /* @__PURE__ */ React15__namespace.createElement("div", { className: "grid grid-cols-2 gap-2" }, components.map((component) => {
1266
1266
  const Icon = component.icon ?? lucideReact.ImageIcon;
1267
1267
  return /* @__PURE__ */ React15__namespace.createElement(PopoverClose, { key: component.name, asChild: true }, /* @__PURE__ */ React15__namespace.createElement(
1268
- chunkTEAHH2DG_js.Button,
1268
+ chunkAAKS5YHL_js.Button,
1269
1269
  {
1270
1270
  variant: "ghost",
1271
1271
  className: "justify-start",
@@ -1284,11 +1284,11 @@ var AddContentButton = (props) => {
1284
1284
  }))));
1285
1285
  };
1286
1286
  var AddContentPlaceholder = (props) => {
1287
- return /* @__PURE__ */ React15__namespace.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React15__namespace.createElement("div", { className: "flex justify-center bg-sb-primary/50 p-4" }, /* @__PURE__ */ React15__namespace.createElement(chunkTEAHH2DG_js.Button, { size: "sm" }, /* @__PURE__ */ React15__namespace.createElement(lucideReact.PlusIcon, { className: "mr-2 h-4 w-4" }), "Blok Toevoegen")));
1287
+ return /* @__PURE__ */ React15__namespace.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React15__namespace.createElement("div", { className: "flex justify-center bg-sb-primary/50 p-4" }, /* @__PURE__ */ React15__namespace.createElement(chunkAAKS5YHL_js.Button, { size: "sm" }, /* @__PURE__ */ React15__namespace.createElement(lucideReact.PlusIcon, { className: "mr-2 h-4 w-4" }), "Blok Toevoegen")));
1288
1288
  };
1289
1289
  var AddContentDividerButton = (props) => {
1290
1290
  return /* @__PURE__ */ React15__namespace.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React15__namespace.createElement("div", { className: "w-full h-1 -my-[2px] bg-sb-primary relative z-20 opacity-0 add-content-divider-button transition-opacity" }, /* @__PURE__ */ React15__namespace.createElement(
1291
- chunkTEAHH2DG_js.Button,
1291
+ chunkAAKS5YHL_js.Button,
1292
1292
  {
1293
1293
  size: "sm",
1294
1294
  className: "absolute left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 shadow"
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk4CD23J5W_js = require('./chunk-4CD23J5W.js');
4
- var chunkTEAHH2DG_js = require('./chunk-TEAHH2DG.js');
3
+ var chunkW544L5I2_js = require('./chunk-W544L5I2.js');
4
+ var chunkAAKS5YHL_js = require('./chunk-AAKS5YHL.js');
5
5
  require('./chunk-VMHWPKU4.js');
6
6
  var React2 = require('react');
7
7
 
@@ -26,17 +26,17 @@ function _interopNamespace(e) {
26
26
  var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
27
27
 
28
28
  var BuilderHeader = () => {
29
- const { save } = chunkTEAHH2DG_js.useBuilder();
30
- return /* @__PURE__ */ React2__namespace.createElement("div", { className: "grid grid-cols-3 gap-4 items-center p-2 shadow-lg sticky inset-x-0 top-0 bg-sb-background z-30" }, /* @__PURE__ */ React2__namespace.createElement("div", { className: "flex gap-4 items-center" }, /* @__PURE__ */ React2__namespace.createElement(chunkTEAHH2DG_js.Button, { variant: "ghost", size: "sm", onClick: save }, "Opslaan")));
29
+ const { save } = chunkAAKS5YHL_js.useBuilder();
30
+ return /* @__PURE__ */ React2__namespace.createElement("div", { className: "grid grid-cols-3 gap-4 items-center p-2 shadow-lg sticky inset-x-0 top-0 bg-sb-background z-30" }, /* @__PURE__ */ React2__namespace.createElement("div", { className: "flex gap-4 items-center" }, /* @__PURE__ */ React2__namespace.createElement(chunkAAKS5YHL_js.Button, { variant: "ghost", size: "sm", onClick: save }, "Opslaan")));
31
31
  };
32
32
 
33
33
  // src/components/builder-content.tsx
34
34
  var BuilderContent = (props) => {
35
- return /* @__PURE__ */ React2__namespace.createElement(chunkTEAHH2DG_js.BuilderProvider, { content: props.content }, /* @__PURE__ */ React2__namespace.createElement(BuilderContentInner, null));
35
+ return /* @__PURE__ */ React2__namespace.createElement(chunkAAKS5YHL_js.BuilderProvider, { content: props.content }, /* @__PURE__ */ React2__namespace.createElement(BuilderContentInner, null));
36
36
  };
37
37
  var BuilderContentInner = () => {
38
- const { content } = chunkTEAHH2DG_js.useBuilder();
39
- return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(BuilderHeader, null), /* @__PURE__ */ React2__namespace.createElement(chunk4CD23J5W_js.BuildContainer, { name: "root", edit: true, multiple: true, content }));
38
+ const { content } = chunkAAKS5YHL_js.useBuilder();
39
+ return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(BuilderHeader, null), /* @__PURE__ */ React2__namespace.createElement(chunkW544L5I2_js.BuildContainer, { name: "root", edit: true, multiple: true, content }));
40
40
  };
41
41
  var builder_content_default = BuilderContent;
42
42
 
@@ -1,5 +1,5 @@
1
- import { BuildContainer } from './chunk-LKNRLBTK.mjs';
2
- import { BuilderProvider, useBuilder, Button } from './chunk-KZNIT2AQ.mjs';
1
+ import { BuildContainer } from './chunk-6C6XHDMD.mjs';
2
+ import { BuilderProvider, useBuilder, Button } from './chunk-YHA5XZL4.mjs';
3
3
  import './chunk-7K7IGTF3.mjs';
4
4
  import * as React2 from 'react';
5
5
 
@@ -2,7 +2,7 @@ import { builder } from './chunk-7K7IGTF3.mjs';
2
2
  import * as React from 'react';
3
3
 
4
4
  var BuildContainerInner = React.lazy(
5
- () => import('./build-container-client-FBOVSG6E.mjs')
5
+ () => import('./build-container-client-6LLYJPDM.mjs')
6
6
  );
7
7
  var BuildContainer = (props) => {
8
8
  const { content, edit, name } = props;
@@ -250,7 +250,7 @@ var findRecursive = (items, predicate, key = "content") => {
250
250
  }
251
251
  };
252
252
  var buttonVariants = classVarianceAuthority.cva(
253
- "inline-flex uppercase items-center justify-center whitespace-nowrap rounded-md text-xs font-semibold ring-offset-sb-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sb-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
253
+ "inline-flex uppercase font-roboto items-center justify-center whitespace-nowrap rounded-md text-xs font-semibold ring-offset-sb-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sb-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
254
254
  {
255
255
  variants: {
256
256
  variant: {
@@ -24,7 +24,7 @@ function _interopNamespace(e) {
24
24
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
25
25
 
26
26
  var BuildContainerInner = React__namespace.lazy(
27
- () => import('./build-container-client-JPFTBMJ3.js')
27
+ () => import('./build-container-client-DICNH7KJ.js')
28
28
  );
29
29
  var BuildContainer = (props) => {
30
30
  const { content, edit, name } = props;
@@ -228,7 +228,7 @@ var findRecursive = (items, predicate, key = "content") => {
228
228
  }
229
229
  };
230
230
  var buttonVariants = cva(
231
- "inline-flex uppercase items-center justify-center whitespace-nowrap rounded-md text-xs font-semibold ring-offset-sb-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sb-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
231
+ "inline-flex uppercase font-roboto items-center justify-center whitespace-nowrap rounded-md text-xs font-semibold ring-offset-sb-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sb-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
232
232
  {
233
233
  variants: {
234
234
  variant: {
package/dist/index.css CHANGED
@@ -604,6 +604,9 @@
604
604
  .text-right {
605
605
  text-align: right;
606
606
  }
607
+ .font-roboto {
608
+ font-family: Roboto, sans-serif;
609
+ }
607
610
  .text-\[0\.8rem\] {
608
611
  font-size: 0.8rem;
609
612
  }
@@ -769,6 +772,72 @@
769
772
  .duration-200 {
770
773
  animation-duration: 200ms;
771
774
  }
775
+ @font-face {
776
+ font-family: "Roboto";
777
+ src: local("Roboto"), url("./Roboto-Thin-SNTZUTYN.ttf") format("truetype");
778
+ font-weight: 100;
779
+ }
780
+ @font-face {
781
+ font-family: "Roboto";
782
+ src: local("Roboto"), url("./Roboto-ThinItalic-VWZDITN2.ttf") format("truetype");
783
+ font-weight: 100;
784
+ font-style: italic;
785
+ }
786
+ @font-face {
787
+ font-family: "Roboto";
788
+ src: local("Roboto"), url("./Roboto-Light-DLKQXCNL.ttf") format("truetype");
789
+ font-weight: 300;
790
+ }
791
+ @font-face {
792
+ font-family: "Roboto";
793
+ src: local("Roboto"), url("./Roboto-LightItalic-EZWBKOF2.ttf") format("truetype");
794
+ font-weight: 300;
795
+ font-style: italic;
796
+ }
797
+ @font-face {
798
+ font-family: "Roboto";
799
+ src: local("Roboto"), url("./Roboto-Regular-2C6IPKAZ.ttf") format("truetype");
800
+ font-weight: 400;
801
+ }
802
+ @font-face {
803
+ font-family: "Roboto";
804
+ src: local("Roboto"), url("./Roboto-Italic-P4UPYB3F.ttf") format("truetype");
805
+ font-weight: 400;
806
+ font-style: italic;
807
+ }
808
+ @font-face {
809
+ font-family: "Roboto";
810
+ src: local("Roboto"), url("./Roboto-Medium-SICMFKQK.ttf") format("truetype");
811
+ font-weight: 500;
812
+ }
813
+ @font-face {
814
+ font-family: "Roboto";
815
+ src: local("Roboto"), url("./Roboto-MediumItalic-X7VW5CZA.ttf") format("truetype");
816
+ font-weight: 500;
817
+ font-style: italic;
818
+ }
819
+ @font-face {
820
+ font-family: "Roboto";
821
+ src: local("Roboto"), url("./Roboto-Bold-YNVD7YCC.ttf") format("truetype");
822
+ font-weight: 700;
823
+ }
824
+ @font-face {
825
+ font-family: "Roboto";
826
+ src: local("Roboto"), url("./Roboto-BoldItalic-UDVRGYMT.ttf") format("truetype");
827
+ font-weight: 700;
828
+ font-style: italic;
829
+ }
830
+ @font-face {
831
+ font-family: "Roboto";
832
+ src: local("Roboto"), url("./Roboto-Black-N3JSMGNF.ttf") format("truetype");
833
+ font-weight: 900;
834
+ }
835
+ @font-face {
836
+ font-family: "Roboto";
837
+ src: local("Roboto"), url("./Roboto-BlackItalic-Q4DQVNXP.ttf") format("truetype");
838
+ font-weight: 900;
839
+ font-style: italic;
840
+ }
772
841
  .add-content-divider-button:hover,
773
842
  .add-content-divider-button:has(> [data-state=open]),
774
843
  .add-content-divider-button:has(+ .sb-container-item:hover),
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk4CD23J5W_js = require('./chunk-4CD23J5W.js');
3
+ var chunkW544L5I2_js = require('./chunk-W544L5I2.js');
4
4
  var chunkVMHWPKU4_js = require('./chunk-VMHWPKU4.js');
5
5
  var React = require('react');
6
6
 
@@ -26,7 +26,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
26
26
 
27
27
  var StaticContent = (props) => {
28
28
  return /* @__PURE__ */ React__namespace.createElement(
29
- chunk4CD23J5W_js.BuildContainer,
29
+ chunkW544L5I2_js.BuildContainer,
30
30
  {
31
31
  name: "root",
32
32
  edit: false,
@@ -37,11 +37,11 @@ var StaticContent = (props) => {
37
37
  };
38
38
 
39
39
  // src/index.ts
40
- var BuilderContent = React.lazy(() => import('./builder-content-XP2KWHHT.js'));
40
+ var BuilderContent = React.lazy(() => import('./builder-content-4E6TBF6O.js'));
41
41
 
42
42
  Object.defineProperty(exports, "BuildContainer", {
43
43
  enumerable: true,
44
- get: function () { return chunk4CD23J5W_js.BuildContainer; }
44
+ get: function () { return chunkW544L5I2_js.BuildContainer; }
45
45
  });
46
46
  Object.defineProperty(exports, "builder", {
47
47
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { BuildContainer } from './chunk-LKNRLBTK.mjs';
2
- export { BuildContainer } from './chunk-LKNRLBTK.mjs';
1
+ import { BuildContainer } from './chunk-6C6XHDMD.mjs';
2
+ export { BuildContainer } from './chunk-6C6XHDMD.mjs';
3
3
  export { builder } from './chunk-7K7IGTF3.mjs';
4
4
  import * as React from 'react';
5
5
  import { lazy } from 'react';
@@ -17,6 +17,6 @@ var StaticContent = (props) => {
17
17
  };
18
18
 
19
19
  // src/index.ts
20
- var BuilderContent = lazy(() => import('./builder-content-I65E3YF2.mjs'));
20
+ var BuilderContent = lazy(() => import('./builder-content-DEBYN2B4.mjs'));
21
21
 
22
22
  export { BuilderContent, StaticContent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-builder/react",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "description": "React package for the simple builder package.",
6
6
  "repository": "https://github.com/pieter-berkel/simple-builder.git",