@simple-builder/react 1.0.9 → 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.
- package/dist/{build-container-client-2WP7AN5U.css → build-container-client-MHISDNJL.css} +65 -0
- package/dist/{build-container-client-PB2K64X3.js → build-container-client-SEAT672S.js} +213 -80
- package/dist/{build-container-client-BOFDDL56.mjs → build-container-client-WS5CHAV7.mjs} +158 -26
- package/dist/{builder-content-SSON3UB4.js → builder-content-FXMV6TNF.js} +7 -7
- package/dist/{builder-content-XM6XI2VA.css → builder-content-N7Z4YJMT.css} +65 -0
- package/dist/{builder-content-DNX5TNK2.mjs → builder-content-O76OYDYN.mjs} +2 -2
- package/dist/{chunk-2GQCSML3.mjs → chunk-2PY5SZFT.mjs} +1 -1
- package/dist/{chunk-LULPEBSO.mjs → chunk-BP6PJZIZ.mjs} +2 -2
- package/dist/{chunk-ECJUPPTG.js → chunk-GP4CVRJO.js} +1 -1
- package/dist/{chunk-OCMLPCSW.mjs → chunk-LEULOM72.mjs} +1 -1
- package/dist/{chunk-YGI2WZVP.js → chunk-NKBSQAU6.js} +5 -5
- package/dist/{chunk-VFH3LVDU.js → chunk-QNNLXAGD.js} +3 -3
- package/dist/index.css +65 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +2 -2
- package/package.json +3 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { buttonVariants, Button, useBuilder } from './chunk-
|
|
4
|
-
import { cn, tv, DesignWrapper, builder, Image } from './chunk-
|
|
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
5
|
import * as React11 from 'react';
|
|
6
|
-
import { PlusIcon, ArrowUp, ArrowDown, Edit2Icon, Trash2Icon, ImageIcon, CalendarIcon, MonitorIcon, SmartphoneIcon, ChevronLeftIcon, ChevronRightIcon, PaintbrushIcon, Loader2Icon, AlignHorizontalSpaceAroundIcon, AlignHorizontalJustifyStartIcon, ScanIcon } from 'lucide-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,6 +16,7 @@ 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;
|
|
@@ -558,30 +559,128 @@ var ContainerItemForm = (props) => {
|
|
|
558
559
|
return () => subscription.unsubscribe();
|
|
559
560
|
}, [form.watch, form.handleSubmit]);
|
|
560
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(
|
|
561
|
-
|
|
562
|
+
RenderFormField,
|
|
562
563
|
{
|
|
563
564
|
key: input.name,
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
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,
|
|
671
|
+
const { type, field } = props;
|
|
572
672
|
switch (type) {
|
|
573
673
|
case "string":
|
|
574
|
-
return /* @__PURE__ */ React11.createElement(
|
|
674
|
+
return /* @__PURE__ */ React11.createElement(Input, { ...field });
|
|
575
675
|
case "longText":
|
|
576
|
-
return /* @__PURE__ */ React11.createElement(FormItem, null, /* @__PURE__ */ React11.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React11.createElement(FormControl, null, /* @__PURE__ */ React11.createElement(Textarea, { ...field })), input.helperText && /* @__PURE__ */ React11.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React11.createElement(FormMessage, null));
|
|
577
676
|
case "richText":
|
|
578
|
-
return /* @__PURE__ */ React11.createElement(
|
|
677
|
+
return /* @__PURE__ */ React11.createElement(Textarea, { ...field });
|
|
579
678
|
case "number":
|
|
580
|
-
return /* @__PURE__ */ React11.createElement(
|
|
679
|
+
return /* @__PURE__ */ React11.createElement(Input, { type: "number", ...field });
|
|
581
680
|
case "color":
|
|
582
|
-
return /* @__PURE__ */ React11.createElement(
|
|
681
|
+
return /* @__PURE__ */ React11.createElement(ColorPicker, { color: field.value, onColorChange: field.onChange });
|
|
583
682
|
case "date":
|
|
584
|
-
return /* @__PURE__ */ React11.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",
|
|
@@ -601,11 +700,11 @@ var RenderInput = (props) => {
|
|
|
601
700
|
onSelect: field.onChange,
|
|
602
701
|
initialFocus: true
|
|
603
702
|
}
|
|
604
|
-
)))
|
|
703
|
+
)));
|
|
605
704
|
case "boolean":
|
|
606
|
-
return /* @__PURE__ */ React11.createElement(
|
|
705
|
+
return /* @__PURE__ */ React11.createElement(Switch, { checked: field.value, onCheckedChange: field.onChange });
|
|
607
706
|
case "file":
|
|
608
|
-
return /* @__PURE__ */ React11.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
|
-
)
|
|
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
|
};
|
|
@@ -995,6 +1094,11 @@ var ItemDesignForm = (props) => {
|
|
|
995
1094
|
if (value === desktopValue || isDirty) {
|
|
996
1095
|
return acc;
|
|
997
1096
|
}
|
|
1097
|
+
if (["padding", "margin"].includes(key)) {
|
|
1098
|
+
if (value === "0px" && desktopValue === "0px") {
|
|
1099
|
+
return acc;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
998
1102
|
return {
|
|
999
1103
|
...acc,
|
|
1000
1104
|
...value && { [key]: value }
|
|
@@ -1005,8 +1109,8 @@ var ItemDesignForm = (props) => {
|
|
|
1005
1109
|
patchItem(item.id, {
|
|
1006
1110
|
styles: {
|
|
1007
1111
|
...container === false && { container },
|
|
1008
|
-
desktop: desktopPatch,
|
|
1009
|
-
mobile: mobilePatch
|
|
1112
|
+
...Object.keys(desktopPatch).length && { desktop: desktopPatch },
|
|
1113
|
+
...Object.keys(mobilePatch).length && { mobile: mobilePatch }
|
|
1010
1114
|
}
|
|
1011
1115
|
});
|
|
1012
1116
|
};
|
|
@@ -1093,6 +1197,34 @@ var ItemDesignForm = (props) => {
|
|
|
1093
1197
|
}
|
|
1094
1198
|
)))));
|
|
1095
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;
|
|
1096
1228
|
|
|
1097
1229
|
// src/components/container-item-toolbar.tsx
|
|
1098
1230
|
var ContainerItemToolbar = (props) => {
|
|
@@ -1119,14 +1251,14 @@ var ContainerItemToolbar = (props) => {
|
|
|
1119
1251
|
), /* @__PURE__ */ React11.createElement(DeleteButton, { contentId })));
|
|
1120
1252
|
};
|
|
1121
1253
|
var EditButton = ({ id }) => {
|
|
1122
|
-
return /* @__PURE__ */ React11.createElement(Popover,
|
|
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(
|
|
1123
1255
|
PopoverContent,
|
|
1124
1256
|
{
|
|
1125
1257
|
side: "left",
|
|
1126
1258
|
align: "start",
|
|
1127
1259
|
sideOffset: 16,
|
|
1128
1260
|
alignOffset: -8,
|
|
1129
|
-
className: "sb-p-0",
|
|
1261
|
+
className: "sb-p-0 sb-relative",
|
|
1130
1262
|
collisionPadding: 16
|
|
1131
1263
|
},
|
|
1132
1264
|
/* @__PURE__ */ React11.createElement(EditPopoverInner, { id })
|
|
@@ -1141,7 +1273,7 @@ var EditPopoverInner = (props) => {
|
|
|
1141
1273
|
`[simple-builder]: Item with id ${id} not found in container item form component`
|
|
1142
1274
|
);
|
|
1143
1275
|
}
|
|
1144
|
-
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(ContainerItemForm, { item })), /* @__PURE__ */ React11.createElement(TabsContent, { value: "design" }, /* @__PURE__ */ React11.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 })));
|
|
1145
1277
|
};
|
|
1146
1278
|
var DeleteButton = ({ contentId }) => {
|
|
1147
1279
|
const { deleteContent } = useBuilder();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkNKBSQAU6_js = require('./chunk-NKBSQAU6.js');
|
|
4
|
+
var chunkGP4CVRJO_js = require('./chunk-GP4CVRJO.js');
|
|
5
5
|
var React2 = require('react');
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
@@ -25,17 +25,17 @@ function _interopNamespace(e) {
|
|
|
25
25
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
26
26
|
|
|
27
27
|
var BuilderHeader = () => {
|
|
28
|
-
const { save } =
|
|
29
|
-
return /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb-grid sb-grid-cols-3 sb-gap-4 sb-items-center sb-p-2 sb-shadow-lg sb-sticky sb-inset-x-0 sb-top-0 sb-bg-background sb-z-30" }, /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb-flex sb-gap-4 sb-items-center" }, /* @__PURE__ */ React2__namespace.createElement(
|
|
28
|
+
const { save } = chunkNKBSQAU6_js.useBuilder();
|
|
29
|
+
return /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb-grid sb-grid-cols-3 sb-gap-4 sb-items-center sb-p-2 sb-shadow-lg sb-sticky sb-inset-x-0 sb-top-0 sb-bg-background sb-z-30" }, /* @__PURE__ */ React2__namespace.createElement("div", { className: "sb-flex sb-gap-4 sb-items-center" }, /* @__PURE__ */ React2__namespace.createElement(chunkNKBSQAU6_js.Button, { variant: "ghost", size: "sm", onClick: save }, "Opslaan")));
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// src/components/builder-content.tsx
|
|
33
33
|
var BuilderContent = (props) => {
|
|
34
|
-
return /* @__PURE__ */ React2__namespace.createElement(
|
|
34
|
+
return /* @__PURE__ */ React2__namespace.createElement(chunkNKBSQAU6_js.BuilderProvider, { content: props.content }, /* @__PURE__ */ React2__namespace.createElement(BuilderContentInner, null));
|
|
35
35
|
};
|
|
36
36
|
var BuilderContentInner = () => {
|
|
37
|
-
const { content } =
|
|
38
|
-
return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(BuilderHeader, null), /* @__PURE__ */ React2__namespace.createElement(
|
|
37
|
+
const { content } = chunkNKBSQAU6_js.useBuilder();
|
|
38
|
+
return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(BuilderHeader, null), /* @__PURE__ */ React2__namespace.createElement(chunkGP4CVRJO_js.BuildContainer, { name: "root", edit: true, multiple: true, content }));
|
|
39
39
|
};
|
|
40
40
|
var builder_content_default = BuilderContent;
|
|
41
41
|
|
|
@@ -186,6 +186,9 @@
|
|
|
186
186
|
.sb-right-1 {
|
|
187
187
|
right: 0.25rem;
|
|
188
188
|
}
|
|
189
|
+
.sb-right-2 {
|
|
190
|
+
right: 0.5rem;
|
|
191
|
+
}
|
|
189
192
|
.sb-right-3 {
|
|
190
193
|
right: 0.75rem;
|
|
191
194
|
}
|
|
@@ -198,6 +201,9 @@
|
|
|
198
201
|
.sb-top-1\/2 {
|
|
199
202
|
top: 50%;
|
|
200
203
|
}
|
|
204
|
+
.sb-top-2 {
|
|
205
|
+
top: 0.5rem;
|
|
206
|
+
}
|
|
201
207
|
.sb-top-\[50\%\] {
|
|
202
208
|
top: 50%;
|
|
203
209
|
}
|
|
@@ -254,6 +260,12 @@
|
|
|
254
260
|
.sb-h-11 {
|
|
255
261
|
height: 2.75rem;
|
|
256
262
|
}
|
|
263
|
+
.sb-h-2 {
|
|
264
|
+
height: 0.5rem;
|
|
265
|
+
}
|
|
266
|
+
.sb-h-2\.5 {
|
|
267
|
+
height: 0.625rem;
|
|
268
|
+
}
|
|
257
269
|
.sb-h-28 {
|
|
258
270
|
height: 7rem;
|
|
259
271
|
}
|
|
@@ -278,12 +290,24 @@
|
|
|
278
290
|
.sb-h-auto {
|
|
279
291
|
height: auto;
|
|
280
292
|
}
|
|
293
|
+
.sb-h-full {
|
|
294
|
+
height: 100%;
|
|
295
|
+
}
|
|
296
|
+
.sb-max-h-\[80vh\] {
|
|
297
|
+
max-height: 80vh;
|
|
298
|
+
}
|
|
281
299
|
.sb-min-h-\[60px\] {
|
|
282
300
|
min-height: 60px;
|
|
283
301
|
}
|
|
284
302
|
.sb-w-11 {
|
|
285
303
|
width: 2.75rem;
|
|
286
304
|
}
|
|
305
|
+
.sb-w-2 {
|
|
306
|
+
width: 0.5rem;
|
|
307
|
+
}
|
|
308
|
+
.sb-w-2\.5 {
|
|
309
|
+
width: 0.625rem;
|
|
310
|
+
}
|
|
287
311
|
.sb-w-28 {
|
|
288
312
|
width: 7rem;
|
|
289
313
|
}
|
|
@@ -308,6 +332,9 @@
|
|
|
308
332
|
.sb-w-8 {
|
|
309
333
|
width: 2rem;
|
|
310
334
|
}
|
|
335
|
+
.sb-w-\[89\%\] {
|
|
336
|
+
width: 89%;
|
|
337
|
+
}
|
|
311
338
|
.sb-w-auto {
|
|
312
339
|
width: auto;
|
|
313
340
|
}
|
|
@@ -365,6 +392,14 @@
|
|
|
365
392
|
.sb-cursor-pointer {
|
|
366
393
|
cursor: pointer;
|
|
367
394
|
}
|
|
395
|
+
.sb-touch-none {
|
|
396
|
+
touch-action: none;
|
|
397
|
+
}
|
|
398
|
+
.sb-select-none {
|
|
399
|
+
-webkit-user-select: none;
|
|
400
|
+
-moz-user-select: none;
|
|
401
|
+
user-select: none;
|
|
402
|
+
}
|
|
368
403
|
.sb-grid-cols-2 {
|
|
369
404
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
370
405
|
}
|
|
@@ -457,6 +492,9 @@
|
|
|
457
492
|
.sb-rounded {
|
|
458
493
|
border-radius: 0.25rem;
|
|
459
494
|
}
|
|
495
|
+
.sb-rounded-\[inherit\] {
|
|
496
|
+
border-radius: inherit;
|
|
497
|
+
}
|
|
460
498
|
.sb-rounded-full {
|
|
461
499
|
border-radius: 9999px;
|
|
462
500
|
}
|
|
@@ -481,12 +519,27 @@
|
|
|
481
519
|
.sb-border-b-2 {
|
|
482
520
|
border-bottom-width: 2px;
|
|
483
521
|
}
|
|
522
|
+
.sb-border-l {
|
|
523
|
+
border-left-width: 1px;
|
|
524
|
+
}
|
|
525
|
+
.sb-border-t {
|
|
526
|
+
border-top-width: 1px;
|
|
527
|
+
}
|
|
528
|
+
.sb-border-dashed {
|
|
529
|
+
border-style: dashed;
|
|
530
|
+
}
|
|
484
531
|
.sb-border-input {
|
|
485
532
|
border-color: hsl(var(--sb-input));
|
|
486
533
|
}
|
|
487
534
|
.sb-border-transparent {
|
|
488
535
|
border-color: transparent;
|
|
489
536
|
}
|
|
537
|
+
.sb-border-l-transparent {
|
|
538
|
+
border-left-color: transparent;
|
|
539
|
+
}
|
|
540
|
+
.sb-border-t-transparent {
|
|
541
|
+
border-top-color: transparent;
|
|
542
|
+
}
|
|
490
543
|
.sb-bg-accent {
|
|
491
544
|
background-color: hsl(var(--sb-accent));
|
|
492
545
|
}
|
|
@@ -496,6 +549,9 @@
|
|
|
496
549
|
.sb-bg-background\/80 {
|
|
497
550
|
background-color: hsl(var(--sb-background) / 0.8);
|
|
498
551
|
}
|
|
552
|
+
.sb-bg-border {
|
|
553
|
+
background-color: hsl(var(--sb-border));
|
|
554
|
+
}
|
|
499
555
|
.sb-bg-card {
|
|
500
556
|
background-color: hsl(var(--sb-card));
|
|
501
557
|
}
|
|
@@ -554,6 +610,9 @@
|
|
|
554
610
|
.sb-p-6 {
|
|
555
611
|
padding: 1.5rem;
|
|
556
612
|
}
|
|
613
|
+
.sb-p-\[1px\] {
|
|
614
|
+
padding: 1px;
|
|
615
|
+
}
|
|
557
616
|
.sb-px-2 {
|
|
558
617
|
padding-left: 0.5rem;
|
|
559
618
|
padding-right: 0.5rem;
|
|
@@ -656,6 +715,9 @@
|
|
|
656
715
|
.sb-text-destructive-foreground {
|
|
657
716
|
color: hsl(var(--sb-destructive-foreground));
|
|
658
717
|
}
|
|
718
|
+
.sb-text-foreground\/70 {
|
|
719
|
+
color: hsl(var(--sb-foreground) / 0.7);
|
|
720
|
+
}
|
|
659
721
|
.sb-text-muted-foreground {
|
|
660
722
|
color: hsl(var(--sb-muted-foreground));
|
|
661
723
|
}
|
|
@@ -901,6 +963,9 @@
|
|
|
901
963
|
.hover\:sb-text-accent-foreground:hover {
|
|
902
964
|
color: hsl(var(--sb-accent-foreground));
|
|
903
965
|
}
|
|
966
|
+
.hover\:sb-text-foreground:hover {
|
|
967
|
+
color: hsl(var(--sb-foreground));
|
|
968
|
+
}
|
|
904
969
|
.hover\:sb-text-muted-foreground:hover {
|
|
905
970
|
color: hsl(var(--sb-muted-foreground));
|
|
906
971
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuilderProvider, useBuilder, Button } from './chunk-
|
|
2
|
-
import { BuildContainer } from './chunk-
|
|
1
|
+
import { BuilderProvider, useBuilder, Button } from './chunk-2PY5SZFT.mjs';
|
|
2
|
+
import { BuildContainer } from './chunk-LEULOM72.mjs';
|
|
3
3
|
import * as React2 from 'react';
|
|
4
4
|
|
|
5
5
|
var BuilderHeader = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildContainer } from './chunk-
|
|
1
|
+
import { BuildContainer } from './chunk-LEULOM72.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { lazy } from 'react';
|
|
4
4
|
|
|
@@ -15,6 +15,6 @@ var StaticContent = (props) => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
// src/index.ts
|
|
18
|
-
var BuilderContent = lazy(() => import('./builder-content-
|
|
18
|
+
var BuilderContent = lazy(() => import('./builder-content-O76OYDYN.mjs'));
|
|
19
19
|
|
|
20
20
|
export { BuilderContent, StaticContent };
|
|
@@ -116,7 +116,7 @@ var DesignWrapper = (props) => {
|
|
|
116
116
|
`.replace(/\s\s+/g, " ")));
|
|
117
117
|
};
|
|
118
118
|
var BuildContainerInner = React3__namespace.lazy(
|
|
119
|
-
() => import('./build-container-client-
|
|
119
|
+
() => import('./build-container-client-SEAT672S.js')
|
|
120
120
|
);
|
|
121
121
|
var BuildContainer = (props) => {
|
|
122
122
|
const { content, edit, name } = props;
|
|
@@ -92,7 +92,7 @@ var DesignWrapper = (props) => {
|
|
|
92
92
|
`.replace(/\s\s+/g, " ")));
|
|
93
93
|
};
|
|
94
94
|
var BuildContainerInner = React3.lazy(
|
|
95
|
-
() => import('./build-container-client-
|
|
95
|
+
() => import('./build-container-client-WS5CHAV7.mjs')
|
|
96
96
|
);
|
|
97
97
|
var BuildContainer = (props) => {
|
|
98
98
|
const { content, edit, name } = props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkGP4CVRJO_js = require('./chunk-GP4CVRJO.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
|
|
@@ -56,7 +56,7 @@ var BuilderProvider = (props) => {
|
|
|
56
56
|
);
|
|
57
57
|
const addContent = React__namespace.useCallback(
|
|
58
58
|
(name, container, parent, index = 0) => {
|
|
59
|
-
const component =
|
|
59
|
+
const component = chunkGP4CVRJO_js.builder.getComponent(name);
|
|
60
60
|
if (!component) {
|
|
61
61
|
throw new Error(`[simple-builder]: Component "${name}" not found`);
|
|
62
62
|
}
|
|
@@ -78,7 +78,7 @@ var BuilderProvider = (props) => {
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
if (!parent) {
|
|
81
|
-
setContent((content2) =>
|
|
81
|
+
setContent((content2) => chunkGP4CVRJO_js.insertAt(content2, index, entry));
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
setContent(
|
|
@@ -88,7 +88,7 @@ var BuilderProvider = (props) => {
|
|
|
88
88
|
...item,
|
|
89
89
|
content: {
|
|
90
90
|
...item.content,
|
|
91
|
-
[container]:
|
|
91
|
+
[container]: chunkGP4CVRJO_js.insertAt(item.content?.[container], index, entry)
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
}
|
|
@@ -216,7 +216,7 @@ var findRecursive = (items, predicate, key = "content") => {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
-
var buttonVariants =
|
|
219
|
+
var buttonVariants = chunkGP4CVRJO_js.tv({
|
|
220
220
|
base: "sb-inline-flex sb-uppercase sb-font-roboto sb-items-center sb-justify-center sb-whitespace-nowrap sb-rounded-md sb-text-xs sb-font-semibold ring-offset-background sb-transition-colors focus-visible:sb-outline-none focus-visible:sb-ring-2 focus-visible:ring-ring focus-visible:sb-ring-offset-2 disabled:sb-pointer-events-none disabled:sb-opacity-50",
|
|
221
221
|
variants: {
|
|
222
222
|
variant: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkGP4CVRJO_js = require('./chunk-GP4CVRJO.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
|
|
6
6
|
function _interopNamespace(e) {
|
|
@@ -25,7 +25,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
25
25
|
|
|
26
26
|
var StaticContent = (props) => {
|
|
27
27
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
28
|
-
|
|
28
|
+
chunkGP4CVRJO_js.BuildContainer,
|
|
29
29
|
{
|
|
30
30
|
name: "root",
|
|
31
31
|
edit: false,
|
|
@@ -36,7 +36,7 @@ var StaticContent = (props) => {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
// src/index.ts
|
|
39
|
-
var BuilderContent = React.lazy(() => import('./builder-content-
|
|
39
|
+
var BuilderContent = React.lazy(() => import('./builder-content-FXMV6TNF.js'));
|
|
40
40
|
|
|
41
41
|
exports.BuilderContent = BuilderContent;
|
|
42
42
|
exports.StaticContent = StaticContent;
|