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