@simple-builder/react 1.0.2 → 1.0.4
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-LHGW2FFR.js → build-container-client-PDM3LRIQ.js} +380 -412
- package/dist/build-container-client-QJL5MQR6.css +1123 -0
- package/dist/{build-container-client-SL4TZBOD.mjs → build-container-client-Y55WZE6M.mjs} +338 -364
- package/dist/{builder-content-FCQHSHSY.mjs → builder-content-GELONUMY.mjs} +2 -3
- package/dist/{builder-content-66LHSBUX.js → builder-content-QNCUQJUB.js} +7 -8
- package/dist/builder-content-YW6SKGMM.css +1123 -0
- package/dist/chunk-BSE6WW6Q.mjs +115 -0
- package/dist/{chunk-BXL6F5AB.mjs → chunk-EQMVGJ6X.mjs} +2 -35
- package/dist/chunk-J36K7WVK.js +145 -0
- package/dist/{chunk-5ZDNACOH.js → chunk-KOBGFPWB.js} +16 -12
- package/dist/chunk-NP2NHVJP.mjs +20 -0
- package/dist/{chunk-3S4FFEHM.js → chunk-XEMUNFCV.js} +5 -40
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -40
- package/dist/index.mjs +2 -22
- package/package.json +11 -11
- package/dist/chunk-7K7IGTF3.mjs +0 -40
- package/dist/chunk-NROQCSBF.mjs +0 -16
- package/dist/chunk-VMHWPKU4.js +0 -42
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
'use client';
|
|
2
|
+
import './chunk-NP2NHVJP.mjs';
|
|
3
|
+
import { buttonVariants, Button, useBuilder } from './chunk-EQMVGJ6X.mjs';
|
|
4
|
+
import { cn, DesignWrapper, builder, spacing, Image } from './chunk-BSE6WW6Q.mjs';
|
|
5
|
+
import * as React12 from 'react';
|
|
6
|
+
import { PlusIcon, ArrowUp, ArrowDown, Edit2Icon, Trash2Icon, ImageIcon, AlignHorizontalSpaceAroundIcon, AlignHorizontalJustifyStartIcon, ScanIcon, CalendarIcon, Loader2Icon, PaintbrushIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
7
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
8
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
5
9
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
6
|
-
import { format } from 'date-fns';
|
|
7
10
|
import { useFormContext, useForm, FormProvider, Controller } from 'react-hook-form';
|
|
8
11
|
import { z } from 'zod';
|
|
9
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
10
12
|
import { Slot } from '@radix-ui/react-slot';
|
|
11
13
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
12
14
|
import { cva } from 'class-variance-authority';
|
|
13
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
14
15
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
15
|
-
import NextImage from 'next/image';
|
|
16
|
-
import { DayPicker } from 'react-day-picker';
|
|
17
16
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
18
17
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
18
|
+
import { format } from 'date-fns';
|
|
19
|
+
import { DayPicker } from 'react-day-picker';
|
|
19
20
|
|
|
20
21
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
21
22
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
22
23
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
23
|
-
var AlertDialogOverlay =
|
|
24
|
+
var AlertDialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.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 =
|
|
36
|
+
var AlertDialogContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(AlertDialogPortal, null, /* @__PURE__ */ React12.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React12.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__ */
|
|
51
|
+
}) => /* @__PURE__ */ React12.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 =
|
|
62
|
+
var AlertDialogTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.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 =
|
|
71
|
+
var AlertDialogDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.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 =
|
|
80
|
+
var AlertDialogAction = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.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 =
|
|
89
|
+
var AlertDialogCancel = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
89
90
|
AlertDialogPrimitive.Cancel,
|
|
90
91
|
{
|
|
91
92
|
ref,
|
|
@@ -98,10 +99,27 @@ var AlertDialogCancel = React15.forwardRef(({ className, ...props }, ref) => /*
|
|
|
98
99
|
}
|
|
99
100
|
));
|
|
100
101
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
102
|
+
var Popover = PopoverPrimitive.Root;
|
|
103
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
104
|
+
var PopoverClose = PopoverPrimitive.Close;
|
|
105
|
+
var PopoverContent = React12.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React12.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React12.createElement(
|
|
106
|
+
PopoverPrimitive.Content,
|
|
107
|
+
{
|
|
108
|
+
ref,
|
|
109
|
+
align,
|
|
110
|
+
sideOffset,
|
|
111
|
+
className: cn(
|
|
112
|
+
"sb-z-50 sb-w-72 sb-font-roboto sb-rounded-md sb-border sb-bg-popover sb-p-4 sb-text-popover-foreground sb-shadow-md sb-outline-none data-[state=open]:sb-animate-in data-[state=closed]:sb-animate-out data-[state=closed]:sb-fade-out-0 data-[state=open]:sb-fade-in-0 data-[state=closed]:sb-zoom-out-95 data-[state=open]:sb-zoom-in-95 data-[side=bottom]:sb-slide-in-from-top-2 data-[side=left]:sb-slide-in-from-right-2 data-[side=right]:sb-slide-in-from-left-2 data-[side=top]:sb-slide-in-from-bottom-2",
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
)));
|
|
118
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
101
119
|
var labelVariants = cva(
|
|
102
120
|
"sb-text-sm sb-font-medium sb-font-roboto sb-leading-none peer-disabled:sb-cursor-not-allowed peer-disabled:sb-opacity-70"
|
|
103
121
|
);
|
|
104
|
-
var Label =
|
|
122
|
+
var Label = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
105
123
|
LabelPrimitive.Root,
|
|
106
124
|
{
|
|
107
125
|
ref,
|
|
@@ -113,17 +131,17 @@ Label.displayName = LabelPrimitive.Root.displayName;
|
|
|
113
131
|
|
|
114
132
|
// src/components/ui/form.tsx
|
|
115
133
|
var Form = FormProvider;
|
|
116
|
-
var FormFieldContext =
|
|
134
|
+
var FormFieldContext = React12.createContext(
|
|
117
135
|
{}
|
|
118
136
|
);
|
|
119
137
|
var FormField = ({
|
|
120
138
|
...props
|
|
121
139
|
}) => {
|
|
122
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ React12.createElement(FormFieldContext.Provider, { value: { name: props.name } }, /* @__PURE__ */ React12.createElement(Controller, { ...props }));
|
|
123
141
|
};
|
|
124
142
|
var useFormField = () => {
|
|
125
|
-
const fieldContext =
|
|
126
|
-
const itemContext =
|
|
143
|
+
const fieldContext = React12.useContext(FormFieldContext);
|
|
144
|
+
const itemContext = React12.useContext(FormItemContext);
|
|
127
145
|
const { getFieldState, formState } = useFormContext();
|
|
128
146
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
129
147
|
if (!fieldContext) {
|
|
@@ -139,17 +157,17 @@ var useFormField = () => {
|
|
|
139
157
|
...fieldState
|
|
140
158
|
};
|
|
141
159
|
};
|
|
142
|
-
var FormItemContext =
|
|
160
|
+
var FormItemContext = React12.createContext(
|
|
143
161
|
{}
|
|
144
162
|
);
|
|
145
|
-
var FormItem =
|
|
146
|
-
const id =
|
|
147
|
-
return /* @__PURE__ */
|
|
163
|
+
var FormItem = React12.forwardRef(({ className, ...props }, ref) => {
|
|
164
|
+
const id = React12.useId();
|
|
165
|
+
return /* @__PURE__ */ React12.createElement(FormItemContext.Provider, { value: { id } }, /* @__PURE__ */ React12.createElement("div", { ref, className: cn("sb-space-y-2", className), ...props }));
|
|
148
166
|
});
|
|
149
167
|
FormItem.displayName = "FormItem";
|
|
150
|
-
var FormLabel =
|
|
168
|
+
var FormLabel = React12.forwardRef(({ className, ...props }, ref) => {
|
|
151
169
|
const { error, formItemId } = useFormField();
|
|
152
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ React12.createElement(
|
|
153
171
|
Label,
|
|
154
172
|
{
|
|
155
173
|
ref,
|
|
@@ -160,9 +178,9 @@ var FormLabel = React15.forwardRef(({ className, ...props }, ref) => {
|
|
|
160
178
|
);
|
|
161
179
|
});
|
|
162
180
|
FormLabel.displayName = "FormLabel";
|
|
163
|
-
var FormControl =
|
|
181
|
+
var FormControl = React12.forwardRef(({ ...props }, ref) => {
|
|
164
182
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
165
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ React12.createElement(
|
|
166
184
|
Slot,
|
|
167
185
|
{
|
|
168
186
|
ref,
|
|
@@ -174,9 +192,9 @@ var FormControl = React15.forwardRef(({ ...props }, ref) => {
|
|
|
174
192
|
);
|
|
175
193
|
});
|
|
176
194
|
FormControl.displayName = "FormControl";
|
|
177
|
-
var FormDescription =
|
|
195
|
+
var FormDescription = React12.forwardRef(({ className, ...props }, ref) => {
|
|
178
196
|
const { formDescriptionId } = useFormField();
|
|
179
|
-
return /* @__PURE__ */
|
|
197
|
+
return /* @__PURE__ */ React12.createElement(
|
|
180
198
|
"p",
|
|
181
199
|
{
|
|
182
200
|
ref,
|
|
@@ -190,13 +208,13 @@ var FormDescription = React15.forwardRef(({ className, ...props }, ref) => {
|
|
|
190
208
|
);
|
|
191
209
|
});
|
|
192
210
|
FormDescription.displayName = "FormDescription";
|
|
193
|
-
var FormMessage =
|
|
211
|
+
var FormMessage = React12.forwardRef(({ className, children, ...props }, ref) => {
|
|
194
212
|
const { error, formMessageId } = useFormField();
|
|
195
213
|
const body = error ? String(error?.message) : children;
|
|
196
214
|
if (!body) {
|
|
197
215
|
return null;
|
|
198
216
|
}
|
|
199
|
-
return /* @__PURE__ */
|
|
217
|
+
return /* @__PURE__ */ React12.createElement(
|
|
200
218
|
"p",
|
|
201
219
|
{
|
|
202
220
|
ref,
|
|
@@ -211,25 +229,8 @@ var FormMessage = React15.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
211
229
|
);
|
|
212
230
|
});
|
|
213
231
|
FormMessage.displayName = "FormMessage";
|
|
214
|
-
var Popover = PopoverPrimitive.Root;
|
|
215
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
216
|
-
var PopoverClose = PopoverPrimitive.Close;
|
|
217
|
-
var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React15.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React15.createElement(
|
|
218
|
-
PopoverPrimitive.Content,
|
|
219
|
-
{
|
|
220
|
-
ref,
|
|
221
|
-
align,
|
|
222
|
-
sideOffset,
|
|
223
|
-
className: cn(
|
|
224
|
-
"sb-z-50 sb-w-72 sb-font-roboto sb-rounded-md sb-border sb-bg-popover sb-p-4 sb-text-popover-foreground sb-shadow-md sb-outline-none data-[state=open]:sb-animate-in data-[state=closed]:sb-animate-out data-[state=closed]:sb-fade-out-0 data-[state=open]:sb-fade-in-0 data-[state=closed]:sb-zoom-out-95 data-[state=open]:sb-zoom-in-95 data-[side=bottom]:sb-slide-in-from-top-2 data-[side=left]:sb-slide-in-from-right-2 data-[side=right]:sb-slide-in-from-left-2 data-[side=top]:sb-slide-in-from-bottom-2",
|
|
225
|
-
className
|
|
226
|
-
),
|
|
227
|
-
...props
|
|
228
|
-
}
|
|
229
|
-
)));
|
|
230
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
231
232
|
var Tabs = TabsPrimitive.Root;
|
|
232
|
-
var TabsList =
|
|
233
|
+
var TabsList = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
233
234
|
TabsPrimitive.List,
|
|
234
235
|
{
|
|
235
236
|
ref,
|
|
@@ -241,7 +242,7 @@ var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
241
242
|
}
|
|
242
243
|
));
|
|
243
244
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
244
|
-
var TabsTrigger =
|
|
245
|
+
var TabsTrigger = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
245
246
|
TabsPrimitive.Trigger,
|
|
246
247
|
{
|
|
247
248
|
ref,
|
|
@@ -253,7 +254,7 @@ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
253
254
|
}
|
|
254
255
|
));
|
|
255
256
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
256
|
-
var TabsContent =
|
|
257
|
+
var TabsContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
257
258
|
TabsPrimitive.Content,
|
|
258
259
|
{
|
|
259
260
|
ref,
|
|
@@ -265,21 +266,13 @@ var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
265
266
|
}
|
|
266
267
|
));
|
|
267
268
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
268
|
-
var Image = (props) => {
|
|
269
|
-
if (typeof NextImage !== "undefined") {
|
|
270
|
-
return /* @__PURE__ */ React15.createElement(NextImage.default, { ...props });
|
|
271
|
-
}
|
|
272
|
-
return /* @__PURE__ */ React15.createElement("img", { ...props });
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
// src/components/ui/media-input.tsx
|
|
276
269
|
var MediaInput = (props) => {
|
|
277
270
|
const { onFilesChange, limit = 32, multiple = false, onError } = props;
|
|
278
|
-
const id =
|
|
279
|
-
const [queue, setQueue] =
|
|
280
|
-
const [sources, setSources] =
|
|
271
|
+
const id = React12.useId();
|
|
272
|
+
const [queue, setQueue] = React12.useState([]);
|
|
273
|
+
const [sources, setSources] = React12.useState(props.files ?? []);
|
|
281
274
|
const maxConcurrentUploads = 3;
|
|
282
|
-
const uploadingCountRef =
|
|
275
|
+
const uploadingCountRef = React12.useRef(0);
|
|
283
276
|
const handleFilesAdd = async (e) => {
|
|
284
277
|
const files = e.target.files;
|
|
285
278
|
if (!files || files.length === 0) {
|
|
@@ -350,7 +343,7 @@ var MediaInput = (props) => {
|
|
|
350
343
|
body: JSON.stringify({ src })
|
|
351
344
|
});
|
|
352
345
|
};
|
|
353
|
-
return /* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ React12.createElement("div", { className: cn("flex flex-wrap gap-4", props.className) }, sources.map((src) => /* @__PURE__ */ React12.createElement(MediaInputItem, { key: src, className: cn("group", props.itemClassName) }, /* @__PURE__ */ React12.createElement(
|
|
354
347
|
Image,
|
|
355
348
|
{
|
|
356
349
|
src,
|
|
@@ -358,14 +351,14 @@ var MediaInput = (props) => {
|
|
|
358
351
|
fill: true,
|
|
359
352
|
className: "sb-absolute sb-inset-0 sb-object-cover sb-pointer-events-none"
|
|
360
353
|
}
|
|
361
|
-
), /* @__PURE__ */
|
|
354
|
+
), /* @__PURE__ */ React12.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__ */ React12.createElement(
|
|
362
355
|
"button",
|
|
363
356
|
{
|
|
364
357
|
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",
|
|
365
358
|
onClick: () => handleSourceDelete(src)
|
|
366
359
|
},
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
)))), queue.map((_, i) => /* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ React12.createElement(Trash2Icon, { className: "sb-h-4 sb-w-4" })
|
|
361
|
+
)))), queue.map((_, i) => /* @__PURE__ */ React12.createElement(
|
|
369
362
|
MediaInputItem,
|
|
370
363
|
{
|
|
371
364
|
key: i,
|
|
@@ -374,8 +367,8 @@ var MediaInput = (props) => {
|
|
|
374
367
|
props.itemClassName
|
|
375
368
|
)
|
|
376
369
|
},
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
)), multiple || !multiple && !sources.length && !queue.length ? /* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ React12.createElement(Loader2Icon, { className: "sb-h-6 sb-w-6 sb-animate-spin" })
|
|
371
|
+
)), multiple || !multiple && !sources.length && !queue.length ? /* @__PURE__ */ React12.createElement(
|
|
379
372
|
"label",
|
|
380
373
|
{
|
|
381
374
|
htmlFor: id,
|
|
@@ -384,8 +377,8 @@ var MediaInput = (props) => {
|
|
|
384
377
|
props.itemClassName
|
|
385
378
|
)
|
|
386
379
|
},
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ React12.createElement(PlusIcon, { className: "sb-h-6 sb-w-6" }),
|
|
381
|
+
/* @__PURE__ */ React12.createElement(
|
|
389
382
|
"input",
|
|
390
383
|
{
|
|
391
384
|
id,
|
|
@@ -399,7 +392,7 @@ var MediaInput = (props) => {
|
|
|
399
392
|
) : null);
|
|
400
393
|
};
|
|
401
394
|
var MediaInputItem = (props) => {
|
|
402
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ React12.createElement(
|
|
403
396
|
"div",
|
|
404
397
|
{
|
|
405
398
|
className: cn(
|
|
@@ -442,14 +435,14 @@ var BackgroundPicker = (props) => {
|
|
|
442
435
|
"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)",
|
|
443
436
|
"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)"
|
|
444
437
|
];
|
|
445
|
-
const defaultTab =
|
|
438
|
+
const defaultTab = React12.useMemo(() => {
|
|
446
439
|
if (background.includes("url"))
|
|
447
440
|
return "image";
|
|
448
441
|
if (background.includes("gradient"))
|
|
449
442
|
return "gradient";
|
|
450
443
|
return "solid";
|
|
451
444
|
}, [background]);
|
|
452
|
-
return /* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ React12.createElement(Popover, null, /* @__PURE__ */ React12.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React12.createElement(
|
|
453
446
|
Button,
|
|
454
447
|
{
|
|
455
448
|
variant: "outline",
|
|
@@ -460,20 +453,20 @@ var BackgroundPicker = (props) => {
|
|
|
460
453
|
className
|
|
461
454
|
)
|
|
462
455
|
},
|
|
463
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ React12.createElement("div", { className: "sb-w-full sb-flex sb-items-center sb-gap-2" }, background ? /* @__PURE__ */ React12.createElement(
|
|
464
457
|
"div",
|
|
465
458
|
{
|
|
466
459
|
className: "sb-h-4 sb-w-4 sb-rounded !sb-bg-center !sb-bg-cover sb-transition-all sb-border",
|
|
467
460
|
style: { background }
|
|
468
461
|
}
|
|
469
|
-
) : /* @__PURE__ */
|
|
470
|
-
)), /* @__PURE__ */
|
|
462
|
+
) : /* @__PURE__ */ React12.createElement(PaintbrushIcon, { className: "sb-h-4 sb-w-4" }), /* @__PURE__ */ React12.createElement("div", { className: "sb-truncate sb-flex-1" }, background ? background : "Kies een achtergrond"))
|
|
463
|
+
)), /* @__PURE__ */ React12.createElement(PopoverContent, { className: "sb-w-64 sb-p-0" }, /* @__PURE__ */ React12.createElement(Tabs, { defaultValue: defaultTab }, /* @__PURE__ */ React12.createElement(TabsList, { className: "sb-w-full" }, /* @__PURE__ */ React12.createElement(TabsTrigger, { className: "sb-flex-1", value: "solid" }, "Solid"), /* @__PURE__ */ React12.createElement(TabsTrigger, { className: "sb-flex-1", value: "gradient" }, "Gradient"), /* @__PURE__ */ React12.createElement(TabsTrigger, { className: "sb-flex-1", value: "image" }, "Image")), /* @__PURE__ */ React12.createElement(
|
|
471
464
|
TabsContent,
|
|
472
465
|
{
|
|
473
466
|
value: "solid",
|
|
474
467
|
className: "data-[state=active]:sb-flex sb-flex-wrap sb-gap-1 sb-p-4"
|
|
475
468
|
},
|
|
476
|
-
solids.map((s) => /* @__PURE__ */
|
|
469
|
+
solids.map((s) => /* @__PURE__ */ React12.createElement(
|
|
477
470
|
"div",
|
|
478
471
|
{
|
|
479
472
|
key: s,
|
|
@@ -482,13 +475,13 @@ var BackgroundPicker = (props) => {
|
|
|
482
475
|
onClick: () => onBackgroundChange(s)
|
|
483
476
|
}
|
|
484
477
|
))
|
|
485
|
-
), /* @__PURE__ */
|
|
478
|
+
), /* @__PURE__ */ React12.createElement(
|
|
486
479
|
TabsContent,
|
|
487
480
|
{
|
|
488
481
|
value: "gradient",
|
|
489
482
|
className: "data-[state=active]:sb-flex sb-flex-wrap sb-gap-1 sb-p-4"
|
|
490
483
|
},
|
|
491
|
-
gradients.map((s) => /* @__PURE__ */
|
|
484
|
+
gradients.map((s) => /* @__PURE__ */ React12.createElement(
|
|
492
485
|
"div",
|
|
493
486
|
{
|
|
494
487
|
key: s,
|
|
@@ -497,7 +490,7 @@ var BackgroundPicker = (props) => {
|
|
|
497
490
|
onClick: () => onBackgroundChange(s)
|
|
498
491
|
}
|
|
499
492
|
))
|
|
500
|
-
), /* @__PURE__ */
|
|
493
|
+
), /* @__PURE__ */ React12.createElement(TabsContent, { value: "image" }, /* @__PURE__ */ React12.createElement("div", { className: "sb-p-4 sb-border-b" }, /* @__PURE__ */ React12.createElement(
|
|
501
494
|
MediaInput,
|
|
502
495
|
{
|
|
503
496
|
className: "sb-grid sb-grid-cols-2 sb-gap-1",
|
|
@@ -513,7 +506,7 @@ var BackgroundPicker = (props) => {
|
|
|
513
506
|
"media-input: Error: " + e?.description
|
|
514
507
|
)
|
|
515
508
|
}
|
|
516
|
-
)), /* @__PURE__ */
|
|
509
|
+
)), /* @__PURE__ */ React12.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-gap-1 sb-p-4" }, images.map((s) => /* @__PURE__ */ React12.createElement(
|
|
517
510
|
"div",
|
|
518
511
|
{
|
|
519
512
|
key: s,
|
|
@@ -523,60 +516,6 @@ var BackgroundPicker = (props) => {
|
|
|
523
516
|
}
|
|
524
517
|
)))))));
|
|
525
518
|
};
|
|
526
|
-
function Calendar({
|
|
527
|
-
className,
|
|
528
|
-
classNames,
|
|
529
|
-
showOutsideDays = true,
|
|
530
|
-
...props
|
|
531
|
-
}) {
|
|
532
|
-
return /* @__PURE__ */ React15.createElement(
|
|
533
|
-
DayPicker,
|
|
534
|
-
{
|
|
535
|
-
showOutsideDays,
|
|
536
|
-
className: cn("sb-p-3 sb-font-roboto", className),
|
|
537
|
-
classNames: {
|
|
538
|
-
months: "sb-flex sb-flex-col sm:sb-flex-row sb-space-y-4 sm:sb-space-x-4 sm:sb-space-y-0",
|
|
539
|
-
month: "sb-space-y-4",
|
|
540
|
-
caption: "sb-flex sb-justify-center sb-pt-1 sb-relative sb-items-center",
|
|
541
|
-
caption_label: "sb-text-sm sb-font-medium",
|
|
542
|
-
nav: "sb-space-x-1 sb-flex sb-items-center",
|
|
543
|
-
nav_button: cn(
|
|
544
|
-
buttonVariants({ variant: "outline" }),
|
|
545
|
-
"sb-h-7 sb-w-7 sb-bg-transparent sb-p-0 sb-opacity-50 hover:sb-opacity-100"
|
|
546
|
-
),
|
|
547
|
-
nav_button_previous: "sb-absolute sb-left-1",
|
|
548
|
-
nav_button_next: "sb-absolute sb-right-1",
|
|
549
|
-
table: "sb-w-full sb-border-collapse sb-space-y-1",
|
|
550
|
-
head_row: "sb-flex",
|
|
551
|
-
head_cell: "sb-text-muted-foreground sb-rounded-md sb-w-8 sb-font-normal sb-text-[0.8rem]",
|
|
552
|
-
row: "sb-flex sb-w-full sb-mt-2",
|
|
553
|
-
cell: cn(
|
|
554
|
-
"sb-relative sb-p-0 sb-text-center sb-text-sm focus-within:sb-relative focus-within:sb-z-20 [&:has([aria-selected])]:sb-bg-accent [&:has([aria-selected].day-outside)]:sb-bg-accent/50 [&:has([aria-selected].day-range-end)]:sb-rounded-r-md",
|
|
555
|
-
props.mode === "range" ? "[&:has(>.day-range-end)]:sb-rounded-r-md [&:has(>.day-range-start)]:sb-rounded-l-md first:[&:has([aria-selected])]:sb-rounded-l-md last:[&:has([aria-selected])]:sb-rounded-r-md" : "[&:has([aria-selected])]:sb-rounded-md"
|
|
556
|
-
),
|
|
557
|
-
day: cn(
|
|
558
|
-
buttonVariants({ variant: "ghost" }),
|
|
559
|
-
"sb-h-8 sb-w-8 sb-p-0 sb-font-normal aria-selected:sb-opacity-100"
|
|
560
|
-
),
|
|
561
|
-
day_range_start: "day-range-start",
|
|
562
|
-
day_range_end: "day-range-end",
|
|
563
|
-
day_selected: "sb-bg-primary sb-text-primary-foreground hover:sb-bg-primary hover:sb-text-primary-foreground focus:sb-bg-primary focus:sb-text-primary-foreground",
|
|
564
|
-
day_today: "sb-bg-accent sb-text-accent-foreground",
|
|
565
|
-
day_outside: "day-outside sb-text-muted-foreground sb-opacity-50 aria-selected:sb-bg-accent/50 aria-selected:sb-text-muted-foreground aria-selected:sb-opacity-30",
|
|
566
|
-
day_disabled: "sb-text-muted-foreground sb-opacity-50",
|
|
567
|
-
day_range_middle: "aria-selected:sb-bg-accent aria-selected:sb-text-accent-foreground",
|
|
568
|
-
day_hidden: "invisible",
|
|
569
|
-
...classNames
|
|
570
|
-
},
|
|
571
|
-
components: {
|
|
572
|
-
IconLeft: () => /* @__PURE__ */ React15.createElement(ChevronLeftIcon, { className: "sb-h-4 sb-w-4" }),
|
|
573
|
-
IconRight: () => /* @__PURE__ */ React15.createElement(ChevronRightIcon, { className: "sb-h-4 sb-w-4" })
|
|
574
|
-
},
|
|
575
|
-
...props
|
|
576
|
-
}
|
|
577
|
-
);
|
|
578
|
-
}
|
|
579
|
-
Calendar.displayName = "Calendar";
|
|
580
519
|
var ColorPicker = (props) => {
|
|
581
520
|
const { color, onColorChange, className } = props;
|
|
582
521
|
const colors = props.colors ?? [
|
|
@@ -590,7 +529,7 @@ var ColorPicker = (props) => {
|
|
|
590
529
|
"#009DD1",
|
|
591
530
|
"#FF0000"
|
|
592
531
|
];
|
|
593
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ React12.createElement(Popover, null, /* @__PURE__ */ React12.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React12.createElement(
|
|
594
533
|
Button,
|
|
595
534
|
{
|
|
596
535
|
variant: "outline",
|
|
@@ -601,14 +540,14 @@ var ColorPicker = (props) => {
|
|
|
601
540
|
className
|
|
602
541
|
)
|
|
603
542
|
},
|
|
604
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ React12.createElement("div", { className: "sb-w-full sb-flex sb-items-center sb-gap-2" }, color ? /* @__PURE__ */ React12.createElement(
|
|
605
544
|
"div",
|
|
606
545
|
{
|
|
607
546
|
className: "sb-h-4 sb-w-4 sb-rounded !sb-bg-center !sb-bg-cover sb-transition-all sb-border",
|
|
608
547
|
style: { background: color }
|
|
609
548
|
}
|
|
610
|
-
) : /* @__PURE__ */
|
|
611
|
-
)), /* @__PURE__ */
|
|
549
|
+
) : /* @__PURE__ */ React12.createElement(PaintbrushIcon, { className: "sb-h-4 sb-w-4" }), /* @__PURE__ */ React12.createElement("div", { className: "sb-truncate sb-flex-1" }, color ? color : "Kies een kleur"))
|
|
550
|
+
)), /* @__PURE__ */ React12.createElement(PopoverContent, { className: "sb-w-64 sb-p-4 sb-flex sb-flex-wrap sb-gap-1" }, colors.map((s) => /* @__PURE__ */ React12.createElement(
|
|
612
551
|
"div",
|
|
613
552
|
{
|
|
614
553
|
key: s,
|
|
@@ -618,9 +557,9 @@ var ColorPicker = (props) => {
|
|
|
618
557
|
}
|
|
619
558
|
))));
|
|
620
559
|
};
|
|
621
|
-
var Input =
|
|
560
|
+
var Input = React12.forwardRef(
|
|
622
561
|
({ className, type, ...props }, ref) => {
|
|
623
|
-
return /* @__PURE__ */
|
|
562
|
+
return /* @__PURE__ */ React12.createElement(
|
|
624
563
|
"input",
|
|
625
564
|
{
|
|
626
565
|
type,
|
|
@@ -635,13 +574,13 @@ var Input = React15.forwardRef(
|
|
|
635
574
|
}
|
|
636
575
|
);
|
|
637
576
|
Input.displayName = "Input";
|
|
638
|
-
var AdvancedInput =
|
|
577
|
+
var AdvancedInput = React12.forwardRef(
|
|
639
578
|
({ prepend, append, ...props }, ref) => {
|
|
640
|
-
return /* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ React12.createElement("div", { className: "sb-relative" }, /* @__PURE__ */ React12.createElement(Input, { ref, className: "sb-pl-9 sb-pr-7 sb-text-right", ...props }), prepend && /* @__PURE__ */ React12.createElement("div", { className: "sb-absolute sb-font-roboto sb-top-1/2 sb-left-3 sb--translate-y-1/2" }, prepend), append && /* @__PURE__ */ React12.createElement("div", { className: "sb-absolute sb-font-roboto sb-top-1/2 sb-right-3 sb--translate-y-1/2" }, append));
|
|
641
580
|
}
|
|
642
581
|
);
|
|
643
582
|
AdvancedInput.displayName = "AdvancedInput";
|
|
644
|
-
var Switch =
|
|
583
|
+
var Switch = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
645
584
|
SwitchPrimitives.Root,
|
|
646
585
|
{
|
|
647
586
|
className: cn(
|
|
@@ -651,7 +590,7 @@ var Switch = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
651
590
|
...props,
|
|
652
591
|
ref
|
|
653
592
|
},
|
|
654
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ React12.createElement(
|
|
655
594
|
SwitchPrimitives.Thumb,
|
|
656
595
|
{
|
|
657
596
|
className: cn(
|
|
@@ -661,22 +600,6 @@ var Switch = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
661
600
|
)
|
|
662
601
|
));
|
|
663
602
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
664
|
-
var Textarea = React15.forwardRef(
|
|
665
|
-
({ className, ...props }, ref) => {
|
|
666
|
-
return /* @__PURE__ */ React15.createElement(
|
|
667
|
-
"textarea",
|
|
668
|
-
{
|
|
669
|
-
className: cn(
|
|
670
|
-
"sb-flex sb-min-h-[60px] sb-font-roboto sb-w-full sb-rounded-md sb-border sb-border-input sb-bg-transparent sb-px-3 sb-py-2 sb-text-sm sb-shadow-sm placeholder:sb-text-muted-foreground focus-visible:sb-outline-none focus-visible:sb-ring-1 focus-visible:sb-ring-ring disabled:sb-cursor-not-allowed disabled:sb-opacity-50",
|
|
671
|
-
className
|
|
672
|
-
),
|
|
673
|
-
ref,
|
|
674
|
-
...props
|
|
675
|
-
}
|
|
676
|
-
);
|
|
677
|
-
}
|
|
678
|
-
);
|
|
679
|
-
Textarea.displayName = "Textarea";
|
|
680
603
|
var toggleVariants = cva(
|
|
681
604
|
"sb-inline-flex sb-items-center sb-justify-center sb-rounded-md sb-text-sm sb-font-medium sb-ring-offset-background sb-transition-colors hover:sb-bg-muted hover:sb-text-muted-foreground focus-visible:sb-outline-none focus-visible:sb-ring-1 focus-visible:sb-ring-ring focus-visible:sb-ring-offset-2 disabled:sb-pointer-events-none disabled:sb-opacity-50 data-[state=on]:sb-bg-accent data-[state=on]:sb-text-accent-foreground",
|
|
682
605
|
{
|
|
@@ -697,7 +620,7 @@ var toggleVariants = cva(
|
|
|
697
620
|
}
|
|
698
621
|
}
|
|
699
622
|
);
|
|
700
|
-
var Toggle =
|
|
623
|
+
var Toggle = React12.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
701
624
|
TogglePrimitive.Root,
|
|
702
625
|
{
|
|
703
626
|
ref,
|
|
@@ -707,92 +630,7 @@ var Toggle = React15.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
707
630
|
));
|
|
708
631
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
709
632
|
|
|
710
|
-
// src/components/
|
|
711
|
-
var ContainerItemToolbar = (props) => {
|
|
712
|
-
const { contentId, canBringUp = false, canBringDown = false } = props;
|
|
713
|
-
const { bringUp, bringDown } = useBuilder();
|
|
714
|
-
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(
|
|
715
|
-
Button,
|
|
716
|
-
{
|
|
717
|
-
variant: "ghost",
|
|
718
|
-
className: "sb-w-8 sb-h-8 sb-p-0",
|
|
719
|
-
onClick: () => bringUp(contentId),
|
|
720
|
-
disabled: !canBringUp
|
|
721
|
-
},
|
|
722
|
-
/* @__PURE__ */ React15.createElement(ArrowUp, { className: "sb-h-5 sb-w-5" })
|
|
723
|
-
), /* @__PURE__ */ React15.createElement(
|
|
724
|
-
Button,
|
|
725
|
-
{
|
|
726
|
-
variant: "ghost",
|
|
727
|
-
className: "sb-w-8 sb-h-8 sb-p-0",
|
|
728
|
-
onClick: () => bringDown(contentId),
|
|
729
|
-
disabled: !canBringDown
|
|
730
|
-
},
|
|
731
|
-
/* @__PURE__ */ React15.createElement(ArrowDown, { className: "sb-h-5 sb-w-5" })
|
|
732
|
-
), /* @__PURE__ */ React15.createElement(DeleteButton, { contentId })));
|
|
733
|
-
};
|
|
734
|
-
var EditButton = ({ id }) => {
|
|
735
|
-
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(
|
|
736
|
-
PopoverContent,
|
|
737
|
-
{
|
|
738
|
-
side: "left",
|
|
739
|
-
align: "start",
|
|
740
|
-
sideOffset: 16,
|
|
741
|
-
alignOffset: -8,
|
|
742
|
-
className: "sb-p-0",
|
|
743
|
-
collisionPadding: 16
|
|
744
|
-
},
|
|
745
|
-
/* @__PURE__ */ React15.createElement(EditPopoverInner, { id })
|
|
746
|
-
));
|
|
747
|
-
};
|
|
748
|
-
var EditPopoverInner = (props) => {
|
|
749
|
-
const { id } = props;
|
|
750
|
-
const { getItem } = useBuilder();
|
|
751
|
-
const item = getItem(id);
|
|
752
|
-
if (!item) {
|
|
753
|
-
throw new Error(
|
|
754
|
-
`[simple-builder]: Item with id ${id} not found in container item form component`
|
|
755
|
-
);
|
|
756
|
-
}
|
|
757
|
-
return /* @__PURE__ */ React15.createElement(Tabs, null, /* @__PURE__ */ React15.createElement(TabsList, { defaultValue: "content" }, /* @__PURE__ */ React15.createElement(TabsTrigger, { value: "content" }, "Inhoud"), /* @__PURE__ */ React15.createElement(TabsTrigger, { 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 })));
|
|
758
|
-
};
|
|
759
|
-
var ContainerItemForm = (props) => {
|
|
760
|
-
const { item } = props;
|
|
761
|
-
const { patchItem } = useBuilder();
|
|
762
|
-
const component = builder.getComponent(item.component);
|
|
763
|
-
if (!component) {
|
|
764
|
-
throw new Error(
|
|
765
|
-
`[simple-builder]: Component with id ${item.component} not found in container item form component`
|
|
766
|
-
);
|
|
767
|
-
}
|
|
768
|
-
const form = useForm({
|
|
769
|
-
defaultValues: (component.inputs || []).reduce(
|
|
770
|
-
(acc, input) => ({
|
|
771
|
-
...acc,
|
|
772
|
-
[input.name]: item?.props?.[input.name] ?? input.defaultValue
|
|
773
|
-
}),
|
|
774
|
-
{}
|
|
775
|
-
)
|
|
776
|
-
});
|
|
777
|
-
const onSubmit = (values) => {
|
|
778
|
-
patchItem(item.id, {
|
|
779
|
-
props: values
|
|
780
|
-
});
|
|
781
|
-
};
|
|
782
|
-
React15.useEffect(() => {
|
|
783
|
-
const subscription = form.watch(() => form.handleSubmit(onSubmit)());
|
|
784
|
-
return () => subscription.unsubscribe();
|
|
785
|
-
}, [form.watch, form.handleSubmit]);
|
|
786
|
-
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(
|
|
787
|
-
FormField,
|
|
788
|
-
{
|
|
789
|
-
key: input.name,
|
|
790
|
-
control: form.control,
|
|
791
|
-
name: input.name,
|
|
792
|
-
render: ({ field }) => /* @__PURE__ */ React15.createElement(RenderInput, { type: input.type, input, field })
|
|
793
|
-
}
|
|
794
|
-
)))));
|
|
795
|
-
};
|
|
633
|
+
// src/components/item-design-form.tsx
|
|
796
634
|
var spacingSchema = z.discriminatedUnion("indipendent", [
|
|
797
635
|
z.object({
|
|
798
636
|
indipendent: z.literal(false),
|
|
@@ -863,7 +701,7 @@ var ItemDesignForm = (props) => {
|
|
|
863
701
|
}
|
|
864
702
|
});
|
|
865
703
|
};
|
|
866
|
-
|
|
704
|
+
React12.useEffect(() => {
|
|
867
705
|
const subscription = form.watch(() => form.handleSubmit(onSubmit)());
|
|
868
706
|
return () => subscription.unsubscribe();
|
|
869
707
|
}, [form.watch, form.handleSubmit]);
|
|
@@ -871,135 +709,135 @@ var ItemDesignForm = (props) => {
|
|
|
871
709
|
"padding.indipendent",
|
|
872
710
|
"margin.indipendent"
|
|
873
711
|
]);
|
|
874
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ React12.createElement(Form, { ...form }, /* @__PURE__ */ React12.createElement("form", { onSubmit: form.handleSubmit(onSubmit) }, /* @__PURE__ */ React12.createElement("div", { className: "sb-space-y-4 sb-p-4" }, /* @__PURE__ */ React12.createElement(
|
|
875
713
|
FormField,
|
|
876
714
|
{
|
|
877
715
|
control: form.control,
|
|
878
716
|
name: "background",
|
|
879
|
-
render: ({ field }) => /* @__PURE__ */
|
|
717
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, "Achtergrond"), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
880
718
|
BackgroundPicker,
|
|
881
719
|
{
|
|
882
720
|
background: field.value,
|
|
883
721
|
onBackgroundChange: field.onChange
|
|
884
722
|
}
|
|
885
|
-
)), /* @__PURE__ */
|
|
723
|
+
)), /* @__PURE__ */ React12.createElement(FormMessage, null))
|
|
886
724
|
}
|
|
887
|
-
), /* @__PURE__ */
|
|
725
|
+
), /* @__PURE__ */ React12.createElement(
|
|
888
726
|
FormField,
|
|
889
727
|
{
|
|
890
728
|
control: form.control,
|
|
891
729
|
name: "color",
|
|
892
|
-
render: ({ field }) => /* @__PURE__ */
|
|
730
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, "Inhoud kleur"), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
893
731
|
ColorPicker,
|
|
894
732
|
{
|
|
895
733
|
color: field.value,
|
|
896
734
|
onColorChange: field.onChange
|
|
897
735
|
}
|
|
898
|
-
)), /* @__PURE__ */
|
|
736
|
+
)), /* @__PURE__ */ React12.createElement(FormMessage, null))
|
|
899
737
|
}
|
|
900
|
-
), /* @__PURE__ */
|
|
738
|
+
), /* @__PURE__ */ React12.createElement("hr", null), /* @__PURE__ */ React12.createElement(
|
|
901
739
|
FormField,
|
|
902
740
|
{
|
|
903
741
|
control: form.control,
|
|
904
742
|
name: "container",
|
|
905
|
-
render: ({ field }) => /* @__PURE__ */
|
|
743
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, { className: "sb-flex sb-flex-row sb-items-center sb-justify-between sb-space-y-0" }, /* @__PURE__ */ React12.createElement(FormLabel, null, "Volledige breedte"), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
906
744
|
Switch,
|
|
907
745
|
{
|
|
908
746
|
checked: !field.value,
|
|
909
747
|
onCheckedChange: (v) => field.onChange(!v)
|
|
910
748
|
}
|
|
911
|
-
)), /* @__PURE__ */
|
|
749
|
+
)), /* @__PURE__ */ React12.createElement(FormMessage, null))
|
|
912
750
|
}
|
|
913
|
-
), /* @__PURE__ */
|
|
751
|
+
), /* @__PURE__ */ React12.createElement("hr", null), /* @__PURE__ */ React12.createElement("div", { className: "sb-space-y-2" }, /* @__PURE__ */ React12.createElement(FormLabel, null, "Padding"), /* @__PURE__ */ React12.createElement("div", { className: "sb-grid sb-grid-cols-[1fr,auto] sb-gap-3" }, /* @__PURE__ */ React12.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-items-center sb-gap-3" }, !indipendentPadding ? /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
914
752
|
FormField,
|
|
915
753
|
{
|
|
916
754
|
control: form.control,
|
|
917
755
|
name: "padding.horizontal",
|
|
918
|
-
render: ({ field }) => /* @__PURE__ */
|
|
756
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
919
757
|
AdvancedInput,
|
|
920
758
|
{
|
|
921
759
|
...field,
|
|
922
|
-
prepend: /* @__PURE__ */
|
|
923
|
-
append: /* @__PURE__ */
|
|
760
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4" }),
|
|
761
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
924
762
|
}
|
|
925
763
|
)))
|
|
926
764
|
}
|
|
927
|
-
), /* @__PURE__ */
|
|
765
|
+
), /* @__PURE__ */ React12.createElement(
|
|
928
766
|
FormField,
|
|
929
767
|
{
|
|
930
768
|
control: form.control,
|
|
931
769
|
name: "padding.vertical",
|
|
932
|
-
render: ({ field }) => /* @__PURE__ */
|
|
770
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
933
771
|
AdvancedInput,
|
|
934
772
|
{
|
|
935
773
|
...field,
|
|
936
|
-
prepend: /* @__PURE__ */
|
|
937
|
-
append: /* @__PURE__ */
|
|
774
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
|
|
775
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
938
776
|
}
|
|
939
777
|
)))
|
|
940
778
|
}
|
|
941
|
-
)) : /* @__PURE__ */
|
|
779
|
+
)) : /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
942
780
|
FormField,
|
|
943
781
|
{
|
|
944
782
|
control: form.control,
|
|
945
783
|
name: "padding.left",
|
|
946
|
-
render: ({ field }) => /* @__PURE__ */
|
|
784
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
947
785
|
AdvancedInput,
|
|
948
786
|
{
|
|
949
787
|
...field,
|
|
950
|
-
prepend: /* @__PURE__ */
|
|
951
|
-
append: /* @__PURE__ */
|
|
788
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4" }),
|
|
789
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
952
790
|
}
|
|
953
791
|
)))
|
|
954
792
|
}
|
|
955
|
-
), /* @__PURE__ */
|
|
793
|
+
), /* @__PURE__ */ React12.createElement(
|
|
956
794
|
FormField,
|
|
957
795
|
{
|
|
958
796
|
control: form.control,
|
|
959
797
|
name: "padding.top",
|
|
960
|
-
render: ({ field }) => /* @__PURE__ */
|
|
798
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
961
799
|
AdvancedInput,
|
|
962
800
|
{
|
|
963
801
|
...field,
|
|
964
|
-
prepend: /* @__PURE__ */
|
|
965
|
-
append: /* @__PURE__ */
|
|
802
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
|
|
803
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
966
804
|
}
|
|
967
805
|
)))
|
|
968
806
|
}
|
|
969
|
-
), /* @__PURE__ */
|
|
807
|
+
), /* @__PURE__ */ React12.createElement(
|
|
970
808
|
FormField,
|
|
971
809
|
{
|
|
972
810
|
control: form.control,
|
|
973
811
|
name: "padding.right",
|
|
974
|
-
render: ({ field }) => /* @__PURE__ */
|
|
812
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
975
813
|
AdvancedInput,
|
|
976
814
|
{
|
|
977
815
|
...field,
|
|
978
|
-
prepend: /* @__PURE__ */
|
|
979
|
-
append: /* @__PURE__ */
|
|
816
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-180" }),
|
|
817
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
980
818
|
}
|
|
981
819
|
)))
|
|
982
820
|
}
|
|
983
|
-
), /* @__PURE__ */
|
|
821
|
+
), /* @__PURE__ */ React12.createElement(
|
|
984
822
|
FormField,
|
|
985
823
|
{
|
|
986
824
|
control: form.control,
|
|
987
825
|
name: "padding.bottom",
|
|
988
|
-
render: ({ field }) => /* @__PURE__ */
|
|
826
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
989
827
|
AdvancedInput,
|
|
990
828
|
{
|
|
991
829
|
...field,
|
|
992
|
-
prepend: /* @__PURE__ */
|
|
993
|
-
append: /* @__PURE__ */
|
|
830
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb--rotate-90" }),
|
|
831
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
994
832
|
}
|
|
995
833
|
)))
|
|
996
834
|
}
|
|
997
|
-
))), /* @__PURE__ */
|
|
835
|
+
))), /* @__PURE__ */ React12.createElement("div", { className: "sb-shrink-0" }, /* @__PURE__ */ React12.createElement(
|
|
998
836
|
FormField,
|
|
999
837
|
{
|
|
1000
838
|
control: form.control,
|
|
1001
839
|
name: "padding.indipendent",
|
|
1002
|
-
render: ({ field }) => /* @__PURE__ */
|
|
840
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1003
841
|
Toggle,
|
|
1004
842
|
{
|
|
1005
843
|
className: "sb-shrink-0 sb-flex sb-w-8 sb-h-8 sb-p-0",
|
|
@@ -1008,99 +846,99 @@ var ItemDesignForm = (props) => {
|
|
|
1008
846
|
pressed: field.value,
|
|
1009
847
|
onPressedChange: field.onChange
|
|
1010
848
|
},
|
|
1011
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ React12.createElement(ScanIcon, { className: "sb-h-4 sb-w-4" })
|
|
1012
850
|
))
|
|
1013
851
|
}
|
|
1014
|
-
))), /* @__PURE__ */
|
|
852
|
+
))), /* @__PURE__ */ React12.createElement(FormMessage, null)), /* @__PURE__ */ React12.createElement("div", { className: "sb-space-y-2" }, /* @__PURE__ */ React12.createElement(FormLabel, null, "Margin"), /* @__PURE__ */ React12.createElement("div", { className: "sb-grid sb-grid-cols-[1fr,auto] sb-gap-3" }, /* @__PURE__ */ React12.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-items-center sb-gap-3" }, !indipendentMargin ? /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
1015
853
|
FormField,
|
|
1016
854
|
{
|
|
1017
855
|
control: form.control,
|
|
1018
856
|
name: "margin.horizontal",
|
|
1019
|
-
render: ({ field }) => /* @__PURE__ */
|
|
857
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1020
858
|
AdvancedInput,
|
|
1021
859
|
{
|
|
1022
860
|
...field,
|
|
1023
|
-
prepend: /* @__PURE__ */
|
|
1024
|
-
append: /* @__PURE__ */
|
|
861
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4" }),
|
|
862
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
1025
863
|
}
|
|
1026
864
|
)))
|
|
1027
865
|
}
|
|
1028
|
-
), /* @__PURE__ */
|
|
866
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1029
867
|
FormField,
|
|
1030
868
|
{
|
|
1031
869
|
control: form.control,
|
|
1032
870
|
name: "margin.vertical",
|
|
1033
|
-
render: ({ field }) => /* @__PURE__ */
|
|
871
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1034
872
|
AdvancedInput,
|
|
1035
873
|
{
|
|
1036
874
|
...field,
|
|
1037
|
-
prepend: /* @__PURE__ */
|
|
1038
|
-
append: /* @__PURE__ */
|
|
875
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalSpaceAroundIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
|
|
876
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
1039
877
|
}
|
|
1040
878
|
)))
|
|
1041
879
|
}
|
|
1042
|
-
)) : /* @__PURE__ */
|
|
880
|
+
)) : /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
1043
881
|
FormField,
|
|
1044
882
|
{
|
|
1045
883
|
control: form.control,
|
|
1046
884
|
name: "margin.left",
|
|
1047
|
-
render: ({ field }) => /* @__PURE__ */
|
|
885
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1048
886
|
AdvancedInput,
|
|
1049
887
|
{
|
|
1050
888
|
...field,
|
|
1051
|
-
prepend: /* @__PURE__ */
|
|
1052
|
-
append: /* @__PURE__ */
|
|
889
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4" }),
|
|
890
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
1053
891
|
}
|
|
1054
892
|
)))
|
|
1055
893
|
}
|
|
1056
|
-
), /* @__PURE__ */
|
|
894
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1057
895
|
FormField,
|
|
1058
896
|
{
|
|
1059
897
|
control: form.control,
|
|
1060
898
|
name: "margin.top",
|
|
1061
|
-
render: ({ field }) => /* @__PURE__ */
|
|
899
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1062
900
|
AdvancedInput,
|
|
1063
901
|
{
|
|
1064
902
|
...field,
|
|
1065
|
-
prepend: /* @__PURE__ */
|
|
1066
|
-
append: /* @__PURE__ */
|
|
903
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-90" }),
|
|
904
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
1067
905
|
}
|
|
1068
906
|
)))
|
|
1069
907
|
}
|
|
1070
|
-
), /* @__PURE__ */
|
|
908
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1071
909
|
FormField,
|
|
1072
910
|
{
|
|
1073
911
|
control: form.control,
|
|
1074
912
|
name: "margin.right",
|
|
1075
|
-
render: ({ field }) => /* @__PURE__ */
|
|
913
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1076
914
|
AdvancedInput,
|
|
1077
915
|
{
|
|
1078
916
|
...field,
|
|
1079
|
-
prepend: /* @__PURE__ */
|
|
1080
|
-
append: /* @__PURE__ */
|
|
917
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb-rotate-180" }),
|
|
918
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
1081
919
|
}
|
|
1082
920
|
)))
|
|
1083
921
|
}
|
|
1084
|
-
), /* @__PURE__ */
|
|
922
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1085
923
|
FormField,
|
|
1086
924
|
{
|
|
1087
925
|
control: form.control,
|
|
1088
926
|
name: "margin.bottom",
|
|
1089
|
-
render: ({ field }) => /* @__PURE__ */
|
|
927
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1090
928
|
AdvancedInput,
|
|
1091
929
|
{
|
|
1092
930
|
...field,
|
|
1093
|
-
prepend: /* @__PURE__ */
|
|
1094
|
-
append: /* @__PURE__ */
|
|
931
|
+
prepend: /* @__PURE__ */ React12.createElement(AlignHorizontalJustifyStartIcon, { className: "sb-h-4 sb-w-4 sb--rotate-90" }),
|
|
932
|
+
append: /* @__PURE__ */ React12.createElement("span", { className: "sb-text-muted-foreground" }, "px")
|
|
1095
933
|
}
|
|
1096
934
|
)))
|
|
1097
935
|
}
|
|
1098
|
-
))), /* @__PURE__ */
|
|
936
|
+
))), /* @__PURE__ */ React12.createElement("div", { className: "sb-shrink-0" }, /* @__PURE__ */ React12.createElement(
|
|
1099
937
|
FormField,
|
|
1100
938
|
{
|
|
1101
939
|
control: form.control,
|
|
1102
940
|
name: "margin.indipendent",
|
|
1103
|
-
render: ({ field }) => /* @__PURE__ */
|
|
941
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1104
942
|
Toggle,
|
|
1105
943
|
{
|
|
1106
944
|
className: "sb-shrink-0 sb-flex sb-w-8 sb-h-8 sb-p-0",
|
|
@@ -1109,26 +947,135 @@ var ItemDesignForm = (props) => {
|
|
|
1109
947
|
pressed: field.value,
|
|
1110
948
|
onPressedChange: field.onChange
|
|
1111
949
|
},
|
|
1112
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ React12.createElement(ScanIcon, { className: "sb-h-4 sb-w-4" })
|
|
1113
951
|
))
|
|
1114
952
|
}
|
|
1115
|
-
))), /* @__PURE__ */
|
|
953
|
+
))), /* @__PURE__ */ React12.createElement(FormMessage, null)))));
|
|
954
|
+
};
|
|
955
|
+
function Calendar({
|
|
956
|
+
className,
|
|
957
|
+
classNames,
|
|
958
|
+
showOutsideDays = true,
|
|
959
|
+
...props
|
|
960
|
+
}) {
|
|
961
|
+
return /* @__PURE__ */ React12.createElement(
|
|
962
|
+
DayPicker,
|
|
963
|
+
{
|
|
964
|
+
showOutsideDays,
|
|
965
|
+
className: cn("sb-p-3 sb-font-roboto", className),
|
|
966
|
+
classNames: {
|
|
967
|
+
months: "sb-flex sb-flex-col sm:sb-flex-row sb-space-y-4 sm:sb-space-x-4 sm:sb-space-y-0",
|
|
968
|
+
month: "sb-space-y-4",
|
|
969
|
+
caption: "sb-flex sb-justify-center sb-pt-1 sb-relative sb-items-center",
|
|
970
|
+
caption_label: "sb-text-sm sb-font-medium",
|
|
971
|
+
nav: "sb-space-x-1 sb-flex sb-items-center",
|
|
972
|
+
nav_button: cn(
|
|
973
|
+
buttonVariants({ variant: "outline" }),
|
|
974
|
+
"sb-h-7 sb-w-7 sb-bg-transparent sb-p-0 sb-opacity-50 hover:sb-opacity-100"
|
|
975
|
+
),
|
|
976
|
+
nav_button_previous: "sb-absolute sb-left-1",
|
|
977
|
+
nav_button_next: "sb-absolute sb-right-1",
|
|
978
|
+
table: "sb-w-full sb-border-collapse sb-space-y-1",
|
|
979
|
+
head_row: "sb-flex",
|
|
980
|
+
head_cell: "sb-text-muted-foreground sb-rounded-md sb-w-8 sb-font-normal sb-text-[0.8rem]",
|
|
981
|
+
row: "sb-flex sb-w-full sb-mt-2",
|
|
982
|
+
cell: cn(
|
|
983
|
+
"sb-relative sb-p-0 sb-text-center sb-text-sm focus-within:sb-relative focus-within:sb-z-20 [&:has([aria-selected])]:sb-bg-accent [&:has([aria-selected].day-outside)]:sb-bg-accent/50 [&:has([aria-selected].day-range-end)]:sb-rounded-r-md",
|
|
984
|
+
props.mode === "range" ? "[&:has(>.day-range-end)]:sb-rounded-r-md [&:has(>.day-range-start)]:sb-rounded-l-md first:[&:has([aria-selected])]:sb-rounded-l-md last:[&:has([aria-selected])]:sb-rounded-r-md" : "[&:has([aria-selected])]:sb-rounded-md"
|
|
985
|
+
),
|
|
986
|
+
day: cn(
|
|
987
|
+
buttonVariants({ variant: "ghost" }),
|
|
988
|
+
"sb-h-8 sb-w-8 sb-p-0 sb-font-normal aria-selected:sb-opacity-100"
|
|
989
|
+
),
|
|
990
|
+
day_range_start: "day-range-start",
|
|
991
|
+
day_range_end: "day-range-end",
|
|
992
|
+
day_selected: "sb-bg-primary sb-text-primary-foreground hover:sb-bg-primary hover:sb-text-primary-foreground focus:sb-bg-primary focus:sb-text-primary-foreground",
|
|
993
|
+
day_today: "sb-bg-accent sb-text-accent-foreground",
|
|
994
|
+
day_outside: "day-outside sb-text-muted-foreground sb-opacity-50 aria-selected:sb-bg-accent/50 aria-selected:sb-text-muted-foreground aria-selected:sb-opacity-30",
|
|
995
|
+
day_disabled: "sb-text-muted-foreground sb-opacity-50",
|
|
996
|
+
day_range_middle: "aria-selected:sb-bg-accent aria-selected:sb-text-accent-foreground",
|
|
997
|
+
day_hidden: "invisible",
|
|
998
|
+
...classNames
|
|
999
|
+
},
|
|
1000
|
+
components: {
|
|
1001
|
+
IconLeft: () => /* @__PURE__ */ React12.createElement(ChevronLeftIcon, { className: "sb-h-4 sb-w-4" }),
|
|
1002
|
+
IconRight: () => /* @__PURE__ */ React12.createElement(ChevronRightIcon, { className: "sb-h-4 sb-w-4" })
|
|
1003
|
+
},
|
|
1004
|
+
...props
|
|
1005
|
+
}
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
1008
|
+
Calendar.displayName = "Calendar";
|
|
1009
|
+
var Textarea = React12.forwardRef(
|
|
1010
|
+
({ className, ...props }, ref) => {
|
|
1011
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1012
|
+
"textarea",
|
|
1013
|
+
{
|
|
1014
|
+
className: cn(
|
|
1015
|
+
"sb-flex sb-min-h-[60px] sb-font-roboto sb-w-full sb-rounded-md sb-border sb-border-input sb-bg-transparent sb-px-3 sb-py-2 sb-text-sm sb-shadow-sm placeholder:sb-text-muted-foreground focus-visible:sb-outline-none focus-visible:sb-ring-1 focus-visible:sb-ring-ring disabled:sb-cursor-not-allowed disabled:sb-opacity-50",
|
|
1016
|
+
className
|
|
1017
|
+
),
|
|
1018
|
+
ref,
|
|
1019
|
+
...props
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
}
|
|
1023
|
+
);
|
|
1024
|
+
Textarea.displayName = "Textarea";
|
|
1025
|
+
|
|
1026
|
+
// src/components/container-item-form.tsx
|
|
1027
|
+
var ContainerItemForm = (props) => {
|
|
1028
|
+
const { item } = props;
|
|
1029
|
+
const { patchItem } = useBuilder();
|
|
1030
|
+
const component = builder.getComponent(item.component);
|
|
1031
|
+
if (!component) {
|
|
1032
|
+
throw new Error(
|
|
1033
|
+
`[simple-builder]: Component with id ${item.component} not found in container item form component`
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
1036
|
+
const form = useForm({
|
|
1037
|
+
defaultValues: (component.inputs || []).reduce(
|
|
1038
|
+
(acc, input) => ({
|
|
1039
|
+
...acc,
|
|
1040
|
+
[input.name]: item?.props?.[input.name] ?? input.defaultValue
|
|
1041
|
+
}),
|
|
1042
|
+
{}
|
|
1043
|
+
)
|
|
1044
|
+
});
|
|
1045
|
+
const onSubmit = (values) => {
|
|
1046
|
+
patchItem(item.id, {
|
|
1047
|
+
props: values
|
|
1048
|
+
});
|
|
1049
|
+
};
|
|
1050
|
+
React12.useEffect(() => {
|
|
1051
|
+
const subscription = form.watch(() => form.handleSubmit(onSubmit)());
|
|
1052
|
+
return () => subscription.unsubscribe();
|
|
1053
|
+
}, [form.watch, form.handleSubmit]);
|
|
1054
|
+
return /* @__PURE__ */ React12.createElement(Form, { ...form }, /* @__PURE__ */ React12.createElement("form", { onSubmit: form.handleSubmit(onSubmit) }, /* @__PURE__ */ React12.createElement("div", { className: "sb-space-y-4 sb-p-4" }, (component.inputs || []).map((input) => /* @__PURE__ */ React12.createElement(
|
|
1055
|
+
FormField,
|
|
1056
|
+
{
|
|
1057
|
+
key: input.name,
|
|
1058
|
+
control: form.control,
|
|
1059
|
+
name: input.name,
|
|
1060
|
+
render: ({ field }) => /* @__PURE__ */ React12.createElement(RenderInput, { type: input.type, input, field })
|
|
1061
|
+
}
|
|
1062
|
+
)))));
|
|
1116
1063
|
};
|
|
1117
1064
|
var RenderInput = (props) => {
|
|
1118
1065
|
const { type, input, field } = props;
|
|
1119
1066
|
switch (type) {
|
|
1120
1067
|
case "string":
|
|
1121
|
-
return /* @__PURE__ */
|
|
1068
|
+
return /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(Input, { ...field })), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1122
1069
|
case "longText":
|
|
1123
|
-
return /* @__PURE__ */
|
|
1070
|
+
return /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(Textarea, { ...field })), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1124
1071
|
case "richText":
|
|
1125
|
-
return /* @__PURE__ */
|
|
1072
|
+
return /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(Textarea, { ...field })), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1126
1073
|
case "number":
|
|
1127
|
-
return /* @__PURE__ */
|
|
1074
|
+
return /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(Input, { type: "number", ...field })), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1128
1075
|
case "color":
|
|
1129
|
-
return /* @__PURE__ */
|
|
1076
|
+
return /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(ColorPicker, { color: field.value, onColorChange: field.onChange })), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1130
1077
|
case "date":
|
|
1131
|
-
return /* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(Popover, null, /* @__PURE__ */ React12.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React12.createElement(
|
|
1132
1079
|
Button,
|
|
1133
1080
|
{
|
|
1134
1081
|
variant: "outline",
|
|
@@ -1138,9 +1085,9 @@ var RenderInput = (props) => {
|
|
|
1138
1085
|
!field.value && "sb-text-muted-foreground"
|
|
1139
1086
|
)
|
|
1140
1087
|
},
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
field.value ? format(field.value, "PPP") : /* @__PURE__ */
|
|
1143
|
-
)), /* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ React12.createElement(CalendarIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }),
|
|
1089
|
+
field.value ? format(field.value, "PPP") : /* @__PURE__ */ React12.createElement("span", null, "Pick a date")
|
|
1090
|
+
)), /* @__PURE__ */ React12.createElement(PopoverContent, { className: "sb-w-auto sb-p-0", align: "start" }, /* @__PURE__ */ React12.createElement(
|
|
1144
1091
|
Calendar,
|
|
1145
1092
|
{
|
|
1146
1093
|
mode: "single",
|
|
@@ -1148,11 +1095,11 @@ var RenderInput = (props) => {
|
|
|
1148
1095
|
onSelect: field.onChange,
|
|
1149
1096
|
initialFocus: true
|
|
1150
1097
|
}
|
|
1151
|
-
)))), input.helperText && /* @__PURE__ */
|
|
1098
|
+
)))), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1152
1099
|
case "boolean":
|
|
1153
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ React12.createElement(FormItem, { className: "sb-flex sb-flex-row sb-items-center sb-justify-between sb-space-y-0" }, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(Switch, { checked: field.value, onCheckedChange: field.onChange })), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1154
1101
|
case "file":
|
|
1155
|
-
return /* @__PURE__ */
|
|
1102
|
+
return /* @__PURE__ */ React12.createElement(FormItem, null, /* @__PURE__ */ React12.createElement(FormLabel, null, input.friendlyName || input.name), /* @__PURE__ */ React12.createElement(FormControl, null, /* @__PURE__ */ React12.createElement(
|
|
1156
1103
|
MediaInput,
|
|
1157
1104
|
{
|
|
1158
1105
|
className: "sb-grid sb-grid-cols-2 sb-gap-1",
|
|
@@ -1164,23 +1111,73 @@ var RenderInput = (props) => {
|
|
|
1164
1111
|
"media-input: Error: " + e?.description
|
|
1165
1112
|
)
|
|
1166
1113
|
}
|
|
1167
|
-
)), input.helperText && /* @__PURE__ */
|
|
1114
|
+
)), input.helperText && /* @__PURE__ */ React12.createElement(FormDescription, null, input.helperText), /* @__PURE__ */ React12.createElement(FormMessage, null));
|
|
1168
1115
|
default:
|
|
1169
1116
|
throw new Error(
|
|
1170
1117
|
`[simple-builder]: Input type "${props.type}" not supported`
|
|
1171
1118
|
);
|
|
1172
1119
|
}
|
|
1173
1120
|
};
|
|
1121
|
+
|
|
1122
|
+
// src/components/container-item-toolbar.tsx
|
|
1123
|
+
var ContainerItemToolbar = (props) => {
|
|
1124
|
+
const { contentId, canBringUp = false, canBringDown = false } = props;
|
|
1125
|
+
const { bringUp, bringDown } = useBuilder();
|
|
1126
|
+
return /* @__PURE__ */ React12.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__ */ React12.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__ */ React12.createElement(EditButton, { id: contentId }), /* @__PURE__ */ React12.createElement(
|
|
1127
|
+
Button,
|
|
1128
|
+
{
|
|
1129
|
+
variant: "ghost",
|
|
1130
|
+
className: "sb-w-8 sb-h-8 sb-p-0",
|
|
1131
|
+
onClick: () => bringUp(contentId),
|
|
1132
|
+
disabled: !canBringUp
|
|
1133
|
+
},
|
|
1134
|
+
/* @__PURE__ */ React12.createElement(ArrowUp, { className: "sb-h-5 sb-w-5" })
|
|
1135
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1136
|
+
Button,
|
|
1137
|
+
{
|
|
1138
|
+
variant: "ghost",
|
|
1139
|
+
className: "sb-w-8 sb-h-8 sb-p-0",
|
|
1140
|
+
onClick: () => bringDown(contentId),
|
|
1141
|
+
disabled: !canBringDown
|
|
1142
|
+
},
|
|
1143
|
+
/* @__PURE__ */ React12.createElement(ArrowDown, { className: "sb-h-5 sb-w-5" })
|
|
1144
|
+
), /* @__PURE__ */ React12.createElement(DeleteButton, { contentId })));
|
|
1145
|
+
};
|
|
1146
|
+
var EditButton = ({ id }) => {
|
|
1147
|
+
return /* @__PURE__ */ React12.createElement(Popover, null, /* @__PURE__ */ React12.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React12.createElement(Button, { variant: "ghost", className: "sb-w-8 sb-h-8 sb-p-0" }, /* @__PURE__ */ React12.createElement(Edit2Icon, { className: "sb-h-5 sb-w-5" }))), /* @__PURE__ */ React12.createElement(
|
|
1148
|
+
PopoverContent,
|
|
1149
|
+
{
|
|
1150
|
+
side: "left",
|
|
1151
|
+
align: "start",
|
|
1152
|
+
sideOffset: 16,
|
|
1153
|
+
alignOffset: -8,
|
|
1154
|
+
className: "sb-p-0",
|
|
1155
|
+
collisionPadding: 16
|
|
1156
|
+
},
|
|
1157
|
+
/* @__PURE__ */ React12.createElement(EditPopoverInner, { id })
|
|
1158
|
+
));
|
|
1159
|
+
};
|
|
1160
|
+
var EditPopoverInner = (props) => {
|
|
1161
|
+
const { id } = props;
|
|
1162
|
+
const { getItem } = useBuilder();
|
|
1163
|
+
const item = getItem(id);
|
|
1164
|
+
if (!item) {
|
|
1165
|
+
throw new Error(
|
|
1166
|
+
`[simple-builder]: Item with id ${id} not found in container item form component`
|
|
1167
|
+
);
|
|
1168
|
+
}
|
|
1169
|
+
return /* @__PURE__ */ React12.createElement(Tabs, null, /* @__PURE__ */ React12.createElement(TabsList, { defaultValue: "content" }, /* @__PURE__ */ React12.createElement(TabsTrigger, { value: "content" }, "Inhoud"), /* @__PURE__ */ React12.createElement(TabsTrigger, { value: "design" }, "Design")), /* @__PURE__ */ React12.createElement(TabsContent, { value: "content" }, /* @__PURE__ */ React12.createElement(ContainerItemForm, { item })), /* @__PURE__ */ React12.createElement(TabsContent, { value: "design" }, /* @__PURE__ */ React12.createElement(ItemDesignForm, { item })));
|
|
1170
|
+
};
|
|
1174
1171
|
var DeleteButton = ({ contentId }) => {
|
|
1175
1172
|
const { deleteContent } = useBuilder();
|
|
1176
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ React12.createElement(AlertDialog, null, /* @__PURE__ */ React12.createElement(AlertDialogTrigger, { asChild: true }, /* @__PURE__ */ React12.createElement(
|
|
1177
1174
|
Button,
|
|
1178
1175
|
{
|
|
1179
1176
|
variant: "ghost",
|
|
1180
1177
|
className: "sb-w-8 sb-h-8 sb-p-0 sb-text-destructive"
|
|
1181
1178
|
},
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
)), /* @__PURE__ */
|
|
1179
|
+
/* @__PURE__ */ React12.createElement(Trash2Icon, { className: "sb-h-5 sb-w-5" })
|
|
1180
|
+
)), /* @__PURE__ */ React12.createElement(AlertDialogContent, null, /* @__PURE__ */ React12.createElement(AlertDialogDescription, null, "Weet je zeker dat je dit blok wilt verwijderen?"), /* @__PURE__ */ React12.createElement(AlertDialogFooter, null, /* @__PURE__ */ React12.createElement(AlertDialogCancel, null, "Annuleren"), /* @__PURE__ */ React12.createElement(
|
|
1184
1181
|
AlertDialogAction,
|
|
1185
1182
|
{
|
|
1186
1183
|
className: buttonVariants({ variant: "destructive" }),
|
|
@@ -1189,29 +1186,6 @@ var DeleteButton = ({ contentId }) => {
|
|
|
1189
1186
|
"Verwijderen"
|
|
1190
1187
|
))));
|
|
1191
1188
|
};
|
|
1192
|
-
var DesignWrapper = (props) => {
|
|
1193
|
-
const { children, className, styles } = props;
|
|
1194
|
-
const { container = true, background, ...rest } = styles || {};
|
|
1195
|
-
const matches = typeof background === "string" ? background.match(/url\(["']?(.*?)["']?\)/) : void 0;
|
|
1196
|
-
const src = matches ? matches[1] : void 0;
|
|
1197
|
-
return /* @__PURE__ */ React15.createElement(
|
|
1198
|
-
"div",
|
|
1199
|
-
{
|
|
1200
|
-
className: cn("sb-relative", className),
|
|
1201
|
-
style: { ...!src && { background }, ...rest }
|
|
1202
|
-
},
|
|
1203
|
-
src && /* @__PURE__ */ React15.createElement(
|
|
1204
|
-
Image,
|
|
1205
|
-
{
|
|
1206
|
-
src,
|
|
1207
|
-
alt: "",
|
|
1208
|
-
fill: true,
|
|
1209
|
-
className: "sb-object-cover sb-absolute sb-inset-0 sb-pointer-events-none sb--z-[1]"
|
|
1210
|
-
}
|
|
1211
|
-
),
|
|
1212
|
-
container ? /* @__PURE__ */ React15.createElement("div", { className: "sb-container sb-mx-auto" }, children) : children
|
|
1213
|
-
);
|
|
1214
|
-
};
|
|
1215
1189
|
|
|
1216
1190
|
// src/components/build-container-client.tsx
|
|
1217
1191
|
var BuildContainerInner = (props) => {
|
|
@@ -1222,14 +1196,14 @@ var BuildContainerInner = (props) => {
|
|
|
1222
1196
|
"[simple-builder]: Multiple content blocks detected when using property multiple false."
|
|
1223
1197
|
);
|
|
1224
1198
|
}
|
|
1225
|
-
return /* @__PURE__ */
|
|
1199
|
+
return /* @__PURE__ */ React12.createElement("div", null, items.length <= 0 ? /* @__PURE__ */ React12.createElement(AddContentPlaceholder, { parent: id, container: name, index: 0 }) : multiple && /* @__PURE__ */ React12.createElement(AddContentDividerButton, { parent: id, container: name, index: 0 }), items.map((item, i) => /* @__PURE__ */ React12.createElement(React12.Fragment, { key: item.id }, /* @__PURE__ */ React12.createElement("div", { className: "sb-relative sb-container-item" }, /* @__PURE__ */ React12.createElement(DesignWrapper, { styles: item.styles }, builder.bindComponent(item, true)), /* @__PURE__ */ React12.createElement(
|
|
1226
1200
|
ContainerItemToolbar,
|
|
1227
1201
|
{
|
|
1228
1202
|
contentId: item.id,
|
|
1229
1203
|
canBringUp: i > 0,
|
|
1230
1204
|
canBringDown: i < items.length - 1
|
|
1231
1205
|
}
|
|
1232
|
-
)), multiple && /* @__PURE__ */
|
|
1206
|
+
)), multiple && /* @__PURE__ */ React12.createElement(
|
|
1233
1207
|
AddContentDividerButton,
|
|
1234
1208
|
{
|
|
1235
1209
|
parent: id,
|
|
@@ -1242,9 +1216,9 @@ var build_container_client_default = BuildContainerInner;
|
|
|
1242
1216
|
var AddContentButton = (props) => {
|
|
1243
1217
|
const components = builder.getComponents();
|
|
1244
1218
|
const { addContent } = useBuilder();
|
|
1245
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ React12.createElement(Popover, null, /* @__PURE__ */ React12.createElement(PopoverTrigger, { asChild: true }, props.children), /* @__PURE__ */ React12.createElement(PopoverContent, { className: "sb-p-1" }, /* @__PURE__ */ React12.createElement("div", { className: "sb-grid sb-grid-cols-2 sb-gap-2" }, components.map((component) => {
|
|
1246
1220
|
const Icon = component.icon ?? ImageIcon;
|
|
1247
|
-
return /* @__PURE__ */
|
|
1221
|
+
return /* @__PURE__ */ React12.createElement(PopoverClose, { key: component.name, asChild: true }, /* @__PURE__ */ React12.createElement(
|
|
1248
1222
|
Button,
|
|
1249
1223
|
{
|
|
1250
1224
|
variant: "ghost",
|
|
@@ -1258,24 +1232,24 @@ var AddContentButton = (props) => {
|
|
|
1258
1232
|
);
|
|
1259
1233
|
}
|
|
1260
1234
|
},
|
|
1261
|
-
/* @__PURE__ */
|
|
1235
|
+
/* @__PURE__ */ React12.createElement(Icon, { className: "sb-mr-2 sb-h-4 sb-w-4 sb-shrink-0" }),
|
|
1262
1236
|
component.friendlyName ?? component.name
|
|
1263
1237
|
));
|
|
1264
1238
|
}))));
|
|
1265
1239
|
};
|
|
1266
1240
|
var AddContentPlaceholder = (props) => {
|
|
1267
|
-
return /* @__PURE__ */
|
|
1241
|
+
return /* @__PURE__ */ React12.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React12.createElement("div", { className: "sb-flex sb-justify-center sb-bg-primary/50 p-4" }, /* @__PURE__ */ React12.createElement(Button, { size: "sm" }, /* @__PURE__ */ React12.createElement(PlusIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }), "Blok Toevoegen")));
|
|
1268
1242
|
};
|
|
1269
1243
|
var AddContentDividerButton = (props) => {
|
|
1270
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ React12.createElement(AddContentButton, { ...props }, /* @__PURE__ */ React12.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__ */ React12.createElement(
|
|
1271
1245
|
Button,
|
|
1272
1246
|
{
|
|
1273
1247
|
size: "sm",
|
|
1274
1248
|
className: "sb-absolute sb-left-1/2 sb-top-1/2 sb--translate-y-1/2 sb--translate-x-1/2 sb-shadow"
|
|
1275
1249
|
},
|
|
1276
|
-
/* @__PURE__ */
|
|
1250
|
+
/* @__PURE__ */ React12.createElement(PlusIcon, { className: "sb-mr-2 sb-h-4 sb-w-4" }),
|
|
1277
1251
|
"Blok Toevoegen"
|
|
1278
1252
|
)));
|
|
1279
1253
|
};
|
|
1280
1254
|
|
|
1281
|
-
export {
|
|
1255
|
+
export { build_container_client_default as default };
|