@janbox/storefront-builder 2.0.0 → 2.0.2
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/README.md +2 -2
- package/dist/anchor-target-CtXzdkBu.js +2918 -0
- package/dist/{color-picker-popover-B3AVFuei.js → color-picker-popover-XeaVfYS8.js} +104 -80
- package/dist/countdown-timer.node-Bh5fTSJ8.js +913 -0
- package/dist/date-picker-D9K6HWl-.js +157 -0
- package/dist/{dialog-header-DPLOS7TT.js → dialog-header-Bh3Dkw2q.js} +2440 -2122
- package/dist/dropzone-CF4CWXth.js +546 -0
- package/dist/editor/toolbars.js +171 -161
- package/dist/editor/ui/button-group/button-group.d.ts +1 -1
- package/dist/editor/ui/dialog/dialog-body/dialog-body.d.ts +1 -1
- package/dist/editor/ui/form-label/form-label.d.ts +1 -1
- package/dist/editor/ui/input/input.d.ts +1 -2
- package/dist/editor/ui/loading-overlay/loading-overlay.d.ts +1 -1
- package/dist/editor/ui/popover/popover-close.d.ts +1 -1
- package/dist/editor/ui/tabs/tab-content.d.ts +1 -1
- package/dist/editor/ui/tabs/tab-list.d.ts +2 -4
- package/dist/editor/ui/tabs/tab-panel.d.ts +1 -1
- package/dist/editor/ui/tabs/tab.d.ts +2 -5
- package/dist/editor/ui/tabs/tabs.d.ts +1 -1
- package/dist/editor/ui.js +82 -72
- package/dist/editor.js +822 -586
- package/dist/index-800HnUOi.js +4 -0
- package/dist/{index-CwrFnubn.js → index-CXyljfMv.js} +1729 -1584
- package/dist/index.js +287 -247
- package/dist/style.css +1 -1
- package/dist/templates.js +10 -12
- package/dist/theme/index.d.ts +293 -0
- package/dist/tooltip-CXOlTkGg.js +75 -0
- package/dist/utils/common.d.ts +0 -2
- package/package.json +1 -2
- package/dist/anchor-target-BlOvysAr.js +0 -2329
- package/dist/countdown-timer.node-OmDiT-pz.js +0 -825
- package/dist/date-picker-B4Rju7gG.js +0 -115
- package/dist/dropzone-Dbfed3jK.js +0 -490
- package/dist/index-BbiQ0n_-.js +0 -4
- package/dist/tooltip-KbIHELP2.js +0 -65
|
@@ -0,0 +1,2918 @@
|
|
|
1
|
+
import { jsx as e, jsxs as p, Fragment as O } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState as M, useRef as _, useEffect as Ve, Fragment as Be } from "react";
|
|
3
|
+
import { useQueryParams as Re } from "@janbox/storefront-ui/hooks";
|
|
4
|
+
import { screens as Te, paletteVars as Ae } from "@janbox/storefront-ui/theme";
|
|
5
|
+
import { getResponsiveProp as Ze, getColorShadesByVariant as Se } from "@janbox/storefront-ui/utils";
|
|
6
|
+
import { p as T, k as b, W as w, o as A, n as Z, t as u, z as ae, m as je, l as Ne, C as B, c as Y, d as de, P as ce, q as E, s as U, r as G, M as We, x as ue, A as le } from "./dialog-header-Bh3Dkw2q.js";
|
|
7
|
+
import { d as S, c as L, a as H, A as J, f as j, k as ze, i as Oe, g as ie, h as Pe, j as se, e as q, b as Fe } from "./dropzone-CF4CWXth.js";
|
|
8
|
+
import "@floating-ui/react";
|
|
9
|
+
import { isFunction as De, merge as Ee, set as he, parseInt as Ue, isNil as R, trimStart as Ge, get as pe, isString as Q, isNumber as ge } from "lodash-es";
|
|
10
|
+
import { useUpdateEffect as Ce, useToggle as Je } from "react-use";
|
|
11
|
+
import "react-colorful";
|
|
12
|
+
import "overlayscrollbars-react";
|
|
13
|
+
import "@tanstack/react-virtual";
|
|
14
|
+
import _e from "react-dropzone";
|
|
15
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
16
|
+
import "react-datepicker";
|
|
17
|
+
import { u as K, f as ve, I as Xe, C as ee, a as $e, i as Ye } from "./color-picker-popover-XeaVfYS8.js";
|
|
18
|
+
import "@tiptap/extension-text-style";
|
|
19
|
+
import "@tiptap/react";
|
|
20
|
+
import "@tiptap/react/menus";
|
|
21
|
+
import "@tiptap/starter-kit";
|
|
22
|
+
import "react-frame-component";
|
|
23
|
+
import { useNode as me } from "@craftjs/core";
|
|
24
|
+
import { flatten as fe } from "flat";
|
|
25
|
+
import "@emotion/react";
|
|
26
|
+
import { Draggable as qe, DragDropContext as Qe, Droppable as Ke } from "@hello-pangea/dnd";
|
|
27
|
+
import { W as et } from "./tooltip-CXOlTkGg.js";
|
|
28
|
+
const tt = (t = {}) => {
|
|
29
|
+
const { id: o } = me(), n = t?.nodeId ?? o, { nodeProps: l, actions: r } = K((a) => ({
|
|
30
|
+
nodeProps: a.nodes[n ?? o]?.data.props ?? {}
|
|
31
|
+
})), s = (a, d) => De(a) ? r.setProp(n, a) : r.setProp(n, (g) => {
|
|
32
|
+
if (d?.merge) {
|
|
33
|
+
Ee(g, a);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const m = fe(a);
|
|
37
|
+
Object.keys(m).forEach((h) => {
|
|
38
|
+
he(g, h, m[h]);
|
|
39
|
+
});
|
|
40
|
+
}), i = (a, d, g) => s(
|
|
41
|
+
d === "xs" ? a : {
|
|
42
|
+
[d]: a
|
|
43
|
+
},
|
|
44
|
+
g
|
|
45
|
+
);
|
|
46
|
+
return {
|
|
47
|
+
id: n,
|
|
48
|
+
nodeProps: t?.transform?.(l) ?? l,
|
|
49
|
+
setNodeProps: s,
|
|
50
|
+
setNodeResponsiveProps: i
|
|
51
|
+
};
|
|
52
|
+
}, wo = () => {
|
|
53
|
+
const {
|
|
54
|
+
queryParams: { screen: t }
|
|
55
|
+
} = we();
|
|
56
|
+
return { getResponsiveProp: (n, l, r, s) => Ze(n, l, r ?? t, s), currentScreen: t };
|
|
57
|
+
}, we = () => Re({
|
|
58
|
+
mode: {
|
|
59
|
+
parser(t) {
|
|
60
|
+
return ["full", "compact"].find((o) => o === t) ?? "full";
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
screen: {
|
|
64
|
+
parser(t) {
|
|
65
|
+
return Te.find((o) => o === t) ?? "xs";
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
action: {
|
|
69
|
+
parser(t) {
|
|
70
|
+
return t ?? void 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}), ot = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
74
|
+
<rect x="4.99707" y="2.99609" width="14.0058" height="18.0075" rx="2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
75
|
+
<path d="M9.4989 18.5031H14.501" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
76
|
+
</svg>
|
|
77
|
+
`, nt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
78
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.0025 14.0007H5.99754C4.89208 14.0007 3.9967 13.1053 3.9967 11.9998V4.99693C3.9967 3.89147 4.89208 2.99609 5.99754 2.99609H18.0025C19.108 2.99609 20.0034 3.89147 20.0034 4.99693V11.9998C20.0034 13.1053 19.108 14.0007 18.0025 14.0007Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
79
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.1446 14.001H5.85546C4.96209 14.001 4.17676 14.5932 3.93166 15.4526L3.0743 18.4538C2.70915 19.7314 3.66855 21.0039 4.9981 21.0039H19.0019C20.3315 21.0039 21.2909 19.7314 20.9257 18.4538L20.0684 15.4526C19.8223 14.5932 19.0379 14.001 18.1446 14.001Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
80
|
+
<path d="M9.99915 18.0022H14.0008" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
81
|
+
</svg>
|
|
82
|
+
`, rt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
83
|
+
<path d="M10 4V5.8C10 6.131 10.224 6.4 10.5 6.4H13.5C13.776 6.4 14 6.131 14 5.8V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
84
|
+
<path d="M10.88 17.5H13.12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
85
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 4H15C16.105 4 17 4.895 17 6V18C17 19.105 16.105 20 15 20H9C7.895 20 7 19.105 7 18V6C7 4.895 7.895 4 9 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
86
|
+
</svg>
|
|
87
|
+
`, lt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
88
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.4316 17.0019H5.56829C4.14777 17.0019 2.99622 15.8504 2.99622 14.4299V5.56817C2.99622 4.14765 4.14777 2.99609 5.56829 2.99609H18.4306C19.113 2.99583 19.7674 3.2667 20.25 3.74908C20.7326 4.23147 21.0037 4.88584 21.0037 5.56817V14.4289C21.004 15.1112 20.7331 15.7657 20.2507 16.2482C19.7683 16.7308 19.114 17.0019 18.4316 17.0019Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89
|
+
<path d="M21.0037 13.0002H2.99622" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
90
|
+
<path d="M14.0008 17.002L14.501 21.0036" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
91
|
+
<path d="M9.99921 17.002L9.49901 21.0036" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
92
|
+
<path d="M8.14136 21.0041H15.8586" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
93
|
+
</svg>
|
|
94
|
+
`, it = [
|
|
95
|
+
{
|
|
96
|
+
value: "primary",
|
|
97
|
+
label: "Primary"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
value: "secondary",
|
|
101
|
+
label: "Secondary"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
value: "green",
|
|
105
|
+
label: "Green"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
value: "red",
|
|
109
|
+
label: "Red"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
value: "orange",
|
|
113
|
+
label: "Orange"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
value: "blue",
|
|
117
|
+
label: "Blue"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
value: "neutral",
|
|
121
|
+
label: "Neutral"
|
|
122
|
+
}
|
|
123
|
+
], bo = {
|
|
124
|
+
xs: 390,
|
|
125
|
+
sm: 768,
|
|
126
|
+
md: 1280,
|
|
127
|
+
lg: 1680
|
|
128
|
+
}, X = [
|
|
129
|
+
{
|
|
130
|
+
icon: rt,
|
|
131
|
+
size: "xs",
|
|
132
|
+
name: "Mobile"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
icon: ot,
|
|
136
|
+
size: "sm",
|
|
137
|
+
name: "Tablet"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
icon: nt,
|
|
141
|
+
size: "md",
|
|
142
|
+
name: "Laptop"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
icon: lt,
|
|
146
|
+
size: "lg",
|
|
147
|
+
name: "Desktop"
|
|
148
|
+
}
|
|
149
|
+
], st = "px", at = () => {
|
|
150
|
+
const {
|
|
151
|
+
queryParams: { screen: t },
|
|
152
|
+
setQueryParams: o
|
|
153
|
+
} = we(), n = (l) => {
|
|
154
|
+
o({
|
|
155
|
+
screen: l.currentTarget.getAttribute("value")
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ p(S, { children: [
|
|
159
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(w, { source: X.find((l) => l.size === t)?.icon ?? "" }) }) }),
|
|
160
|
+
/* @__PURE__ */ e(A, { children: X.map((l) => /* @__PURE__ */ e(Z, { isActive: l.size === t, value: l.size, onClick: n, children: /* @__PURE__ */ e(w, { source: l.icon }) }, l.size)) })
|
|
161
|
+
] }) });
|
|
162
|
+
}, dt = (t) => {
|
|
163
|
+
const o = Ue(t ?? "");
|
|
164
|
+
return isNaN(o) ? void 0 : o;
|
|
165
|
+
}, be = ({
|
|
166
|
+
units: t = ["px", "%"],
|
|
167
|
+
size: o = "32",
|
|
168
|
+
value: n,
|
|
169
|
+
onChange: l,
|
|
170
|
+
defaultValue: r = {},
|
|
171
|
+
...s
|
|
172
|
+
}) => {
|
|
173
|
+
const i = t.find((v) => n?.toString().trim().endsWith(v)) ?? t.at(0), [a, d] = M(i);
|
|
174
|
+
Ce(() => {
|
|
175
|
+
d(i);
|
|
176
|
+
}, [i]);
|
|
177
|
+
const g = ({ value: v, unit: k }) => {
|
|
178
|
+
if (R(v) || R(k) || k === st) {
|
|
179
|
+
l?.(v);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
l?.(`${v}${k}`);
|
|
183
|
+
}, m = dt(n?.toString()), h = (v) => {
|
|
184
|
+
v.stopPropagation();
|
|
185
|
+
const k = v.currentTarget.value;
|
|
186
|
+
k !== a && (d(v.currentTarget.value), g({ value: r[k], unit: k }));
|
|
187
|
+
}, C = (v) => {
|
|
188
|
+
v.target.select(), s.onFocus?.(v);
|
|
189
|
+
}, c = (v) => {
|
|
190
|
+
const k = isNaN(v.target.valueAsNumber) ? void 0 : v.target.valueAsNumber;
|
|
191
|
+
g({
|
|
192
|
+
unit: a,
|
|
193
|
+
value: k
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
return /* @__PURE__ */ e(
|
|
197
|
+
L,
|
|
198
|
+
{
|
|
199
|
+
size: o,
|
|
200
|
+
suffix: /* @__PURE__ */ e("div", { css: { display: "inline-flex", alignItems: "center", gap: 4 }, children: t.map((v) => /* @__PURE__ */ e(
|
|
201
|
+
b,
|
|
202
|
+
{
|
|
203
|
+
onClick: h,
|
|
204
|
+
value: v,
|
|
205
|
+
css: [
|
|
206
|
+
{ color: u.palette.white["3s"], "&:hover": { color: u.palette.white["4s"] } },
|
|
207
|
+
a === v && { color: u.palette.white["6s"], "&:hover": { color: u.palette.white["6s"] } }
|
|
208
|
+
],
|
|
209
|
+
size: "20",
|
|
210
|
+
children: /* @__PURE__ */ e(
|
|
211
|
+
"span",
|
|
212
|
+
{
|
|
213
|
+
css: {
|
|
214
|
+
...ae.xs
|
|
215
|
+
},
|
|
216
|
+
children: v
|
|
217
|
+
},
|
|
218
|
+
v
|
|
219
|
+
)
|
|
220
|
+
},
|
|
221
|
+
v
|
|
222
|
+
)) }),
|
|
223
|
+
...s,
|
|
224
|
+
value: m ?? "",
|
|
225
|
+
onFocus: C,
|
|
226
|
+
onChange: c,
|
|
227
|
+
mode: "onBlur"
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}, xe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
231
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 16V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V16C21 15.4477 20.5523 15 20 15H16.6175C16.2388 15 15.8925 15.214 15.7231 15.5528L15.2759 16.4472C15.1065 16.786 14.7602 17 14.3815 17H9.61753C9.2386 17 8.89222 16.7858 8.72291 16.4468L8.27659 15.5532C8.10728 15.2142 7.76092 15 7.382 15H4C3.44772 15 3 15.4477 3 16Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
232
|
+
<path d="M14 9L12 7L10 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
233
|
+
<path d="M12 7V12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
234
|
+
<path d="M20 12V5C20 3.89543 19.1046 3 18 3H6C4.89543 3 4 3.89543 4 5V12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
235
|
+
</svg>
|
|
236
|
+
`, ct = ({ source: t, onChange: o, previewStyle: n }) => {
|
|
237
|
+
const [l, r] = M(t ?? ""), [s, i] = M(!1), { handlers: a } = ve(), { upload: d } = a;
|
|
238
|
+
Ce(() => {
|
|
239
|
+
r(t ?? "");
|
|
240
|
+
}, [t]);
|
|
241
|
+
const g = async (C) => {
|
|
242
|
+
const c = C.at(0);
|
|
243
|
+
if (c) {
|
|
244
|
+
i(!0);
|
|
245
|
+
try {
|
|
246
|
+
const v = await d(c);
|
|
247
|
+
o?.(v);
|
|
248
|
+
} finally {
|
|
249
|
+
i(!1);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}, m = (C) => {
|
|
253
|
+
C.target.value = Ge(C.target.value), r(C.target.value);
|
|
254
|
+
}, h = (C) => {
|
|
255
|
+
C.currentTarget.value !== (t ?? "") && o?.(l);
|
|
256
|
+
};
|
|
257
|
+
return /* @__PURE__ */ p(
|
|
258
|
+
"div",
|
|
259
|
+
{
|
|
260
|
+
css: {
|
|
261
|
+
padding: 16,
|
|
262
|
+
display: "flex",
|
|
263
|
+
borderRadius: 8,
|
|
264
|
+
flexDirection: "column",
|
|
265
|
+
gap: 8,
|
|
266
|
+
backgroundColor: u.palette.white["1s"]
|
|
267
|
+
},
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ e(je, { isLoading: s, children: /* @__PURE__ */ e(
|
|
270
|
+
_e,
|
|
271
|
+
{
|
|
272
|
+
accept: {
|
|
273
|
+
"image/png": [".png"],
|
|
274
|
+
"image/jpeg": [".jpeg", ".jpg"],
|
|
275
|
+
"image/webp": [".webp"]
|
|
276
|
+
},
|
|
277
|
+
multiple: !1,
|
|
278
|
+
onDrop: g,
|
|
279
|
+
children: ({ getInputProps: C, getRootProps: c }) => /* @__PURE__ */ p(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
css: [
|
|
283
|
+
{
|
|
284
|
+
display: "flex",
|
|
285
|
+
position: "relative",
|
|
286
|
+
cursor: "pointer",
|
|
287
|
+
borderRadius: 8,
|
|
288
|
+
overflow: "hidden",
|
|
289
|
+
alignItems: "center",
|
|
290
|
+
justifyContent: "center",
|
|
291
|
+
backgroundColor: u.palette.white["1s"],
|
|
292
|
+
aspectRatio: "16 / 9"
|
|
293
|
+
},
|
|
294
|
+
!!t && {
|
|
295
|
+
"&:hover .overlay": {
|
|
296
|
+
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
|
297
|
+
opacity: 1
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
...c(),
|
|
302
|
+
children: [
|
|
303
|
+
/* @__PURE__ */ e(
|
|
304
|
+
"div",
|
|
305
|
+
{
|
|
306
|
+
css: { position: "absolute", inset: 0, borderRadius: 8, pointerEvents: "none" },
|
|
307
|
+
style: {
|
|
308
|
+
backgroundImage: t ? `url(${t})` : void 0,
|
|
309
|
+
backgroundSize: "cover",
|
|
310
|
+
backgroundRepeat: "no-repeat",
|
|
311
|
+
backgroundPosition: "center",
|
|
312
|
+
...n
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
),
|
|
316
|
+
/* @__PURE__ */ p(
|
|
317
|
+
"div",
|
|
318
|
+
{
|
|
319
|
+
className: "overlay",
|
|
320
|
+
css: [
|
|
321
|
+
{
|
|
322
|
+
display: "flex",
|
|
323
|
+
position: "absolute",
|
|
324
|
+
inset: 0,
|
|
325
|
+
flexDirection: "column",
|
|
326
|
+
alignItems: "center",
|
|
327
|
+
justifyContent: "center",
|
|
328
|
+
gap: 8,
|
|
329
|
+
backgroundColor: "rgba(0, 0, 0, 0)",
|
|
330
|
+
transition: "all"
|
|
331
|
+
},
|
|
332
|
+
!!t && { opacity: 0 }
|
|
333
|
+
],
|
|
334
|
+
children: [
|
|
335
|
+
/* @__PURE__ */ e(w, { size: 32, source: xe }),
|
|
336
|
+
/* @__PURE__ */ e(
|
|
337
|
+
"span",
|
|
338
|
+
{
|
|
339
|
+
css: {
|
|
340
|
+
...ae.xs
|
|
341
|
+
},
|
|
342
|
+
children: "PNG, JPEG, JPG, WEBP"
|
|
343
|
+
}
|
|
344
|
+
)
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
/* @__PURE__ */ e("input", { ...C() })
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
)
|
|
352
|
+
}
|
|
353
|
+
) }),
|
|
354
|
+
/* @__PURE__ */ e(
|
|
355
|
+
Ne,
|
|
356
|
+
{
|
|
357
|
+
onChange: m,
|
|
358
|
+
title: l,
|
|
359
|
+
value: l,
|
|
360
|
+
size: "32",
|
|
361
|
+
onBlur: h,
|
|
362
|
+
placeholder: "https://example.com/image.jpg"
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
]
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
}, x = ({ name: t, responsive: o, children: n, direction: l = "horizontal", guide: r }) => /* @__PURE__ */ p(
|
|
369
|
+
"div",
|
|
370
|
+
{
|
|
371
|
+
css: [
|
|
372
|
+
{ display: "flex" },
|
|
373
|
+
l === "vertical" && { flexDirection: "column", gap: 8 },
|
|
374
|
+
l === "horizontal" && { gap: 16, alignItems: "center", justifyContent: "space-between" }
|
|
375
|
+
],
|
|
376
|
+
children: [
|
|
377
|
+
/* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
378
|
+
/* @__PURE__ */ p(
|
|
379
|
+
"div",
|
|
380
|
+
{
|
|
381
|
+
css: { display: "flex", alignItems: "center", gap: 8, ...u.text.xs, color: u.palette.white["5s"] },
|
|
382
|
+
children: [
|
|
383
|
+
t,
|
|
384
|
+
!!r && /* @__PURE__ */ e(et, { placement: "top-start", content: r, children: /* @__PURE__ */ e(w, { css: { cursor: "pointer" }, size: 16, source: Xe }) })
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
),
|
|
388
|
+
!!o && /* @__PURE__ */ e(at, {})
|
|
389
|
+
] }),
|
|
390
|
+
n
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
), ut = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
394
|
+
<path d="M14.182 18H5.45499H9.43499L14.565 6H18.545H9.81799" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
395
|
+
</svg>
|
|
396
|
+
`, ht = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
397
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 6H12.875C14.5319 6 15.875 7.34315 15.875 9V9C15.875 10.6569 14.5319 12 12.875 12H7V6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
398
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 12H14C15.6569 12 17 13.3431 17 15V15C17 16.6569 15.6569 18 14 18H7V12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
399
|
+
</svg>
|
|
400
|
+
`, pt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
401
|
+
<path d="M16 6V12C16 14.2091 14.2091 16 12 16V16C9.79086 16 8 14.2091 8 12V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
402
|
+
<path d="M7 19H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
403
|
+
</svg>
|
|
404
|
+
`, gt = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 2.99936L14.4999 2.99805C14.7761 2.99802 15 3.22185 15 3.49799C15 3.77413 14.7762 3.99802 14.5001 3.99805L2.50005 3.99936C2.22391 3.99939 2.00003 3.77556 2 3.49942C1.99997 3.22327 2.2238 2.99939 2.49995 2.99936Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.97492 6.00077L12.025 6C12.3012 5.99997 12.5251 6.2238 12.5251 6.49994C12.5251 6.77609 12.3013 6.99997 12.0251 7L4.97503 7.00077C4.69889 7.0008 4.47501 6.77697 4.47498 6.50083C4.47495 6.22468 4.69878 6.0008 4.97492 6.00077Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.97492 12.0027L12.025 12.002C12.3012 12.0019 12.5251 12.2258 12.5251 12.5019C12.5251 12.778 12.3013 13.0019 12.0251 13.002L4.97503 13.0027C4.69889 13.0028 4.47501 12.7789 4.47498 12.5028C4.47495 12.2266 4.69878 12.0028 4.97492 12.0027Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M3.52704 9.00109L13.4728 9C13.749 8.99997 13.9729 9.2238 13.9729 9.49994C13.9729 9.77609 13.7491 9.99997 13.473 10L3.52715 10.0011C3.25101 10.0011 3.02713 9.77729 3.0271 9.50114C3.02707 9.225 3.2509 9.00112 3.52704 9.00109Z" fill="currentColor"></path></svg></svg>', Ct = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 2.99741L14.4999 2.99609C14.7761 2.99606 15 3.2199 15 3.49604C15 3.77218 14.7762 3.99606 14.5001 3.99609L2.50005 3.99741C2.22391 3.99744 2.00003 3.77361 2 3.49746C1.99997 3.22132 2.2238 2.99744 2.49995 2.99741Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 5.99936L14.4999 5.99805C14.7761 5.99802 15 6.22185 15 6.49799C15 6.77413 14.7762 6.99802 14.5001 6.99805L2.50005 6.99936C2.22391 6.99939 2.00003 6.77556 2 6.49942C1.99997 6.22327 2.2238 5.99939 2.49995 5.99936Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 12.0029L11.5045 12.002C11.7806 12.0019 12.0045 12.2258 12.0045 12.5019C12.0045 12.778 11.7807 13.0019 11.5046 13.002L2.50005 13.0029C2.22391 13.003 2.00003 12.7791 2 12.503C1.99997 12.2269 2.2238 12.003 2.49995 12.0029Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 9.00131L14.4999 9C14.7761 8.99997 15 9.2238 15 9.49995C15 9.77609 14.7762 9.99997 14.5001 10L2.50005 10.0013C2.22391 10.0013 2.00003 9.77751 2 9.50137C1.99997 9.22523 2.2238 9.00134 2.49995 9.00131Z" fill="currentColor"></path></svg></svg>', vt = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 2.99936L14.4999 2.99805C14.7761 2.99802 15 3.22185 15 3.49799C15 3.77413 14.7762 3.99802 14.5001 3.99805L2.50005 3.99936C2.22391 3.99939 2.00003 3.77556 2 3.49942C1.99997 3.22327 2.2238 2.99939 2.49995 2.99936Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 6.00077L9.55005 6C9.8262 5.99997 10.0501 6.2238 10.0501 6.49994C10.0501 6.77609 9.82631 6.99997 9.55016 7L2.50005 7.00077C2.22391 7.0008 2.00003 6.77697 2 6.50083C1.99997 6.22468 2.2238 6.0008 2.49995 6.00077Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 12.0027L9.55005 12.002C9.8262 12.0019 10.0501 12.2258 10.0501 12.5019C10.0501 12.778 9.82631 13.0019 9.55016 13.002L2.50005 13.0027C2.22391 13.0028 2.00003 12.7789 2 12.5028C1.99997 12.2266 2.2238 12.0028 2.49995 12.0027Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 9.00109L12.4457 9C12.7219 8.99997 12.9458 9.2238 12.9458 9.49994C12.9458 9.77609 12.722 9.99997 12.4459 10L2.50005 10.0011C2.22391 10.0011 2.00003 9.77729 2 9.50114C1.99997 9.225 2.2238 9.00112 2.49995 9.00109Z" fill="currentColor"></path></svg></svg>', mt = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.49995 2.99936L14.4999 2.99805C14.7761 2.99802 15 3.22185 15 3.49799C15 3.77413 14.7762 3.99802 14.5001 3.99805L2.50005 3.99936C2.22391 3.99939 2.00003 3.77556 2 3.49942C1.99997 3.22327 2.2238 2.99939 2.49995 2.99936Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7.4499 6.00077L14.5 6C14.7761 5.99997 15 6.2238 15.0001 6.49994C15.0001 6.77609 14.7763 6.99997 14.5001 7L7.45001 7.00077C7.17386 7.0008 6.94998 6.77697 6.94995 6.50083C6.94992 6.22468 7.17375 6.0008 7.4499 6.00077Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7.4499 12.0027L14.5 12.002C14.7761 12.0019 15 12.2258 15.0001 12.5019C15.0001 12.778 14.7763 13.0019 14.5001 13.002L7.45001 13.0027C7.17386 13.0028 6.94998 12.7789 6.94995 12.5028C6.94992 12.2266 7.17375 12.0028 7.4499 12.0027Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.55414 9.00109L14.4999 9C14.7761 8.99997 15 9.2238 15 9.49994C15 9.77609 14.7762 9.99997 14.5001 10L4.55425 10.0011C4.27811 10.0011 4.05423 9.77729 4.0542 9.50114C4.05417 9.225 4.278 9.00112 4.55414 9.00109Z" fill="currentColor"></path></svg></svg>', xo = ({ value: t, onChange: o, label: n }) => /* @__PURE__ */ e(x, { name: n ?? "Text align", responsive: !0, children: /* @__PURE__ */ e(H, { onSelectionChange: o, value: t, children: [
|
|
405
|
+
{
|
|
406
|
+
icon: vt,
|
|
407
|
+
value: "left"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
icon: gt,
|
|
411
|
+
value: "center"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
icon: mt,
|
|
415
|
+
value: "right"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
icon: Ct,
|
|
419
|
+
value: "justify"
|
|
420
|
+
}
|
|
421
|
+
].map((r) => /* @__PURE__ */ e(b, { value: r.value, children: /* @__PURE__ */ e(w, { source: r.icon }) }, r.value)) }) }), ko = ({ value: t, onChange: o, name: n, responsive: l }) => {
|
|
422
|
+
const r = () => {
|
|
423
|
+
o?.({
|
|
424
|
+
...t,
|
|
425
|
+
fontWeight: t?.fontWeight === 700 ? void 0 : 700
|
|
426
|
+
});
|
|
427
|
+
}, s = () => {
|
|
428
|
+
o?.({
|
|
429
|
+
...t,
|
|
430
|
+
fontStyle: t?.fontStyle === "italic" ? void 0 : "italic"
|
|
431
|
+
});
|
|
432
|
+
}, i = () => {
|
|
433
|
+
o?.({
|
|
434
|
+
...t,
|
|
435
|
+
textDecorationLine: t?.textDecorationLine === "underline" ? void 0 : "underline"
|
|
436
|
+
});
|
|
437
|
+
};
|
|
438
|
+
return /* @__PURE__ */ e(x, { name: n ?? "Text Style", responsive: l, children: /* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
439
|
+
/* @__PURE__ */ e(
|
|
440
|
+
b,
|
|
441
|
+
{
|
|
442
|
+
onClick: r,
|
|
443
|
+
size: "28",
|
|
444
|
+
css: [t?.fontWeight === 700 && { backgroundColor: u.palette.white["2s"] }],
|
|
445
|
+
children: /* @__PURE__ */ e(w, { source: ht })
|
|
446
|
+
}
|
|
447
|
+
),
|
|
448
|
+
/* @__PURE__ */ e(
|
|
449
|
+
b,
|
|
450
|
+
{
|
|
451
|
+
onClick: s,
|
|
452
|
+
size: "28",
|
|
453
|
+
css: [t?.fontStyle === "italic" && { backgroundColor: u.palette.white["2s"] }],
|
|
454
|
+
children: /* @__PURE__ */ e(w, { source: ut })
|
|
455
|
+
}
|
|
456
|
+
),
|
|
457
|
+
/* @__PURE__ */ e(
|
|
458
|
+
b,
|
|
459
|
+
{
|
|
460
|
+
onClick: i,
|
|
461
|
+
size: "28",
|
|
462
|
+
css: [t?.textDecorationLine === "underline" && { backgroundColor: u.palette.white["2s"] }],
|
|
463
|
+
children: /* @__PURE__ */ e(w, { source: pt })
|
|
464
|
+
}
|
|
465
|
+
)
|
|
466
|
+
] }) });
|
|
467
|
+
}, te = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path fill-rule="evenodd" clip-rule="evenodd" d="M3.81282 3.81282C7.22991 0.395728 12.7701 0.395728 16.1872 3.81282C19.6043 7.22991 19.6043 12.7701 16.1872 16.1872C12.7701 19.6043 7.22991 19.6043 3.81282 16.1872C0.395728 12.7701 0.395728 7.22991 3.81282 3.81282ZM14.8432 4.27291C11.8965 1.77533 7.47681 1.91659 4.6967 4.6967C1.91659 7.47681 1.77533 11.8965 4.27291 14.8432L14.8432 4.27291ZM5.15679 15.7271C8.10352 18.2247 12.5232 18.0834 15.3033 15.3033C18.0834 12.5232 18.2247 8.10352 15.7271 5.15679L5.15679 15.7271Z" fill="currentColor"></path></svg>', Lo = ({ value: t, onChange: o, name: n, responsive: l }) => {
|
|
468
|
+
const r = [
|
|
469
|
+
{
|
|
470
|
+
icon: te,
|
|
471
|
+
value: "none"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
value: "uppercase",
|
|
475
|
+
example: "AA"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
value: "capitalize",
|
|
479
|
+
example: "Aa"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
value: "lowercase",
|
|
483
|
+
example: "aa"
|
|
484
|
+
}
|
|
485
|
+
];
|
|
486
|
+
return /* @__PURE__ */ e(x, { name: n ?? "Text Transform", responsive: l, children: /* @__PURE__ */ e(H, { onSelectionChange: (i) => {
|
|
487
|
+
o?.({
|
|
488
|
+
textTransform: i === "none" ? void 0 : i
|
|
489
|
+
});
|
|
490
|
+
}, value: t?.textTransform, children: r.map((i) => /* @__PURE__ */ e(b, { value: i.value, children: i.icon ? /* @__PURE__ */ e(w, { source: i.icon }) : /* @__PURE__ */ e(
|
|
491
|
+
"span",
|
|
492
|
+
{
|
|
493
|
+
css: {
|
|
494
|
+
...u.text.sm,
|
|
495
|
+
lineHeight: 1
|
|
496
|
+
},
|
|
497
|
+
children: i.example
|
|
498
|
+
}
|
|
499
|
+
) }, i.value)) }) });
|
|
500
|
+
}, Mo = ({ name: t, value: o, onChange: n, responsive: l = !0, menu: r }) => {
|
|
501
|
+
const s = _(null), [i, a] = M(!1), d = (f) => {
|
|
502
|
+
n?.({
|
|
503
|
+
width: f
|
|
504
|
+
});
|
|
505
|
+
}, g = (f) => {
|
|
506
|
+
a(!0);
|
|
507
|
+
}, m = () => {
|
|
508
|
+
setTimeout(() => {
|
|
509
|
+
a(!1);
|
|
510
|
+
}, 100);
|
|
511
|
+
}, h = [
|
|
512
|
+
{
|
|
513
|
+
value: "auto",
|
|
514
|
+
label: "Auto",
|
|
515
|
+
visible: r?.autoOption?.visible ?? !0,
|
|
516
|
+
clearable: r?.autoOption?.clearable
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
value: "fit-content",
|
|
520
|
+
label: "Fit content",
|
|
521
|
+
visible: r?.fitContentOption?.visible ?? !1,
|
|
522
|
+
clearable: r?.fitContentOption?.clearable
|
|
523
|
+
}
|
|
524
|
+
], C = h.filter((f) => f.visible), c = h.find((f) => f.value === o?.width)?.label?.toString(), v = (f) => {
|
|
525
|
+
const y = f.currentTarget.getAttribute("value");
|
|
526
|
+
R(y) || d(y);
|
|
527
|
+
}, k = (f) => {
|
|
528
|
+
f.stopPropagation(), d(void 0);
|
|
529
|
+
};
|
|
530
|
+
return /* @__PURE__ */ e(x, { name: t ?? "Width", responsive: l, children: /* @__PURE__ */ p("div", { css: { position: "relative", width: "50%" }, children: [
|
|
531
|
+
/* @__PURE__ */ e(
|
|
532
|
+
be,
|
|
533
|
+
{
|
|
534
|
+
fullWidth: !0,
|
|
535
|
+
wrapRef: s,
|
|
536
|
+
placeholder: c,
|
|
537
|
+
value: o?.width,
|
|
538
|
+
onChange: d,
|
|
539
|
+
defaultValue: {
|
|
540
|
+
"%": 100
|
|
541
|
+
},
|
|
542
|
+
onFocus: g,
|
|
543
|
+
onBlur: m
|
|
544
|
+
}
|
|
545
|
+
),
|
|
546
|
+
!!C.length && /* @__PURE__ */ p(S, { open: i, placement: "bottom-start", children: [
|
|
547
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e("div", { css: { position: "absolute", inset: "0 0 auto 0", top: "100%" } }) }),
|
|
548
|
+
/* @__PURE__ */ e(A, { children: C.map((f) => /* @__PURE__ */ p(
|
|
549
|
+
Z,
|
|
550
|
+
{
|
|
551
|
+
css: { justifyContent: "space-between" },
|
|
552
|
+
isActive: o?.width === f.value,
|
|
553
|
+
onClick: v,
|
|
554
|
+
value: f.value,
|
|
555
|
+
children: [
|
|
556
|
+
f.label,
|
|
557
|
+
f.clearable && o?.width === f.value && /* @__PURE__ */ e(b, { onClick: k, size: "20", children: /* @__PURE__ */ e(w, { size: 16, source: B }) })
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
f.value
|
|
561
|
+
)) })
|
|
562
|
+
] })
|
|
563
|
+
] }) });
|
|
564
|
+
}, yo = ({
|
|
565
|
+
name: t,
|
|
566
|
+
value: o,
|
|
567
|
+
onChange: n,
|
|
568
|
+
responsive: l = !0,
|
|
569
|
+
units: r = ["px", "%"],
|
|
570
|
+
menu: s
|
|
571
|
+
}) => {
|
|
572
|
+
const [i, a] = M(!1), d = [
|
|
573
|
+
{
|
|
574
|
+
value: "auto",
|
|
575
|
+
label: "Auto",
|
|
576
|
+
visible: s?.autoOption?.visible ?? !0,
|
|
577
|
+
clearable: s?.autoOption?.clearable ?? !1
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
value: "fit-content",
|
|
581
|
+
label: "Fit content",
|
|
582
|
+
visible: s?.fitContentOption?.visible ?? !1,
|
|
583
|
+
clearable: s?.fitContentOption?.clearable ?? !1
|
|
584
|
+
}
|
|
585
|
+
], g = d.filter((f) => f.visible), m = (f) => {
|
|
586
|
+
n?.({
|
|
587
|
+
height: f
|
|
588
|
+
});
|
|
589
|
+
}, h = (f) => {
|
|
590
|
+
a(!0);
|
|
591
|
+
}, C = () => {
|
|
592
|
+
setTimeout(() => {
|
|
593
|
+
a(!1);
|
|
594
|
+
}, 100);
|
|
595
|
+
}, c = d.find((f) => f.value === o?.height)?.label, v = (f) => {
|
|
596
|
+
const y = f.currentTarget.getAttribute("value");
|
|
597
|
+
R(y) || m(y);
|
|
598
|
+
}, k = (f) => {
|
|
599
|
+
f.stopPropagation(), m(void 0);
|
|
600
|
+
};
|
|
601
|
+
return /* @__PURE__ */ e(x, { name: t ?? "Height", responsive: l, children: /* @__PURE__ */ p("div", { css: { position: "relative", width: "50%" }, children: [
|
|
602
|
+
/* @__PURE__ */ e(
|
|
603
|
+
be,
|
|
604
|
+
{
|
|
605
|
+
fullWidth: !0,
|
|
606
|
+
units: r,
|
|
607
|
+
placeholder: c,
|
|
608
|
+
value: o?.height,
|
|
609
|
+
onChange: m,
|
|
610
|
+
onFocus: h,
|
|
611
|
+
onBlur: C
|
|
612
|
+
}
|
|
613
|
+
),
|
|
614
|
+
!!g.length && /* @__PURE__ */ p(S, { open: i, placement: "bottom-start", children: [
|
|
615
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e("div", { css: { position: "absolute", inset: "0 0 auto 0", top: "100%" } }) }),
|
|
616
|
+
/* @__PURE__ */ e(A, { children: g.map((f) => /* @__PURE__ */ p(
|
|
617
|
+
Z,
|
|
618
|
+
{
|
|
619
|
+
css: { justifyContent: "space-between" },
|
|
620
|
+
isActive: o?.height === f.value,
|
|
621
|
+
onClick: v,
|
|
622
|
+
value: f.value,
|
|
623
|
+
children: [
|
|
624
|
+
f.label,
|
|
625
|
+
f.clearable && o?.height === f.value && /* @__PURE__ */ e(b, { onClick: k, size: "20", children: /* @__PURE__ */ e(w, { size: 16, source: B }) })
|
|
626
|
+
]
|
|
627
|
+
},
|
|
628
|
+
f.value
|
|
629
|
+
)) })
|
|
630
|
+
] })
|
|
631
|
+
] }) });
|
|
632
|
+
}, Io = ({ name: t, responsive: o, value: n, onChange: l }) => {
|
|
633
|
+
const r = (s) => {
|
|
634
|
+
l?.({
|
|
635
|
+
color: s
|
|
636
|
+
});
|
|
637
|
+
};
|
|
638
|
+
return /* @__PURE__ */ e(x, { name: t ?? "Color", responsive: o, children: /* @__PURE__ */ e(ee, { color: n?.color, onChange: r }) });
|
|
639
|
+
}, ft = ({ value: t, onChange: o }) => {
|
|
640
|
+
const n = ve(), l = fe(Ae), r = (() => {
|
|
641
|
+
const i = Object.keys(l).find((a) => l[a] === t?.backgroundColor);
|
|
642
|
+
return i ? pe(n.theme.palette, i) : t?.backgroundColor;
|
|
643
|
+
})();
|
|
644
|
+
return /* @__PURE__ */ e(x, { name: "Color", children: /* @__PURE__ */ e(ee, { color: r, onChange: (i) => {
|
|
645
|
+
o?.({ ...t, backgroundColor: i });
|
|
646
|
+
} }) });
|
|
647
|
+
}, wt = '<svg width="16" height="16" viewBox="0 0 15 4" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M0.5 0.5C0.5 0.223858 0.723858 0 1 0H4C4.27614 0 4.5 0.223858 4.5 0.5V3.5C4.5 3.77614 4.27614 4 4 4H1C0.723858 4 0.5 3.77614 0.5 3.5V0.5ZM1.5 1V3H3.5V1H1.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 0.5C5.5 0.223858 5.72386 0 6 0H9C9.27614 0 9.5 0.223858 9.5 0.5V3.5C9.5 3.77614 9.27614 4 9 4H6C5.72386 4 5.5 3.77614 5.5 3.5V0.5ZM6.5 1V3H8.5V1H6.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M11 0C10.7239 0 10.5 0.223858 10.5 0.5V3.5C10.5 3.77614 10.7239 4 11 4H14C14.2761 4 14.5 3.77614 14.5 3.5V0.5C14.5 0.223858 14.2761 0 14 0H11ZM11.5 3V1H13.5V3H11.5Z" fill="currentColor"></path> </svg>', bt = `<svg width="16" height="16" viewBox="0 0 5 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
648
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.5 0.5C0.5 0.223858 0.723858 0 1 0H4C4.27614 0 4.5 0.223858 4.5 0.5V3.5C4.5 3.77614 4.27614 4 4 4H1C0.723858 4 0.5 3.77614 0.5 3.5V0.5ZM1.5 1V3H3.5V1H1.5Z" fill="currentColor"></path>
|
|
649
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.5 5.5C0.5 5.22386 0.723858 5 1 5H4C4.27614 5 4.5 5.22386 4.5 5.5V8.5C4.5 8.77614 4.27614 9 4 9H1C0.723858 9 0.5 8.77614 0.5 8.5V5.5ZM1.5 6V8H3.5V6H1.5Z" fill="currentColor"></path>
|
|
650
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 10C0.723858 10 0.5 10.2239 0.5 10.5V13.5C0.5 13.7761 0.723858 14 1 14H4C4.27614 14 4.5 13.7761 4.5 13.5V10.5C4.5 10.2239 4.27614 10 4 10H1ZM1.5 13V11H3.5V13H1.5Z" fill="currentColor"></path>
|
|
651
|
+
</svg>`, xt = '<svg width="16" height="16" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M0.5 0.5C0.5 0.223858 0.723858 0 1 0H4C4.27614 0 4.5 0.223858 4.5 0.5V3.5C4.5 3.77614 4.27614 4 4 4H1C0.723858 4 0.5 3.77614 0.5 3.5V0.5ZM1.5 1V3H3.5V1H1.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M0.5 5.5C0.5 5.22386 0.723858 5 1 5H4C4.27614 5 4.5 5.22386 4.5 5.5V8.5C4.5 8.77614 4.27614 9 4 9H1C0.723858 9 0.5 8.77614 0.5 8.5V5.5ZM1.5 6V8H3.5V6H1.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M1 10C0.723858 10 0.5 10.2239 0.5 10.5V13.5C0.5 13.7761 0.723858 14 1 14H4C4.27614 14 4.5 13.7761 4.5 13.5V10.5C4.5 10.2239 4.27614 10 4 10H1ZM1.5 13V11H3.5V13H1.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 0.5C5.5 0.223858 5.72386 0 6 0H9C9.27614 0 9.5 0.223858 9.5 0.5V3.5C9.5 3.77614 9.27614 4 9 4H6C5.72386 4 5.5 3.77614 5.5 3.5V0.5ZM6.5 1V3H8.5V1H6.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M6 5C5.72386 5 5.5 5.22386 5.5 5.5V8.5C5.5 8.77614 5.72386 9 6 9H9C9.27614 9 9.5 8.77614 9.5 8.5V5.5C9.5 5.22386 9.27614 5 9 5H6ZM6.5 8V6H8.5V8H6.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 10.5C5.5 10.2239 5.72386 10 6 10H9C9.27614 10 9.5 10.2239 9.5 10.5V13.5C9.5 13.7761 9.27614 14 9 14H6C5.72386 14 5.5 13.7761 5.5 13.5V10.5ZM6.5 11V13H8.5V11H6.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M11 0C10.7239 0 10.5 0.223858 10.5 0.5V3.5C10.5 3.77614 10.7239 4 11 4H14C14.2761 4 14.5 3.77614 14.5 3.5V0.5C14.5 0.223858 14.2761 0 14 0H11ZM11.5 3V1H13.5V3H11.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 5.5C10.5 5.22386 10.7239 5 11 5H14C14.2761 5 14.5 5.22386 14.5 5.5V8.5C14.5 8.77614 14.2761 9 14 9H11C10.7239 9 10.5 8.77614 10.5 8.5V5.5ZM11.5 6V8H13.5V6H11.5Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M11 10C10.7239 10 10.5 10.2239 10.5 10.5V13.5C10.5 13.7761 10.7239 14 11 14H14C14.2761 14 14.5 13.7761 14.5 13.5V10.5C14.5 10.2239 14.2761 10 14 10H11ZM11.5 13V11H13.5V13H11.5Z" fill="currentColor"></path> </svg>', kt = [
|
|
652
|
+
{
|
|
653
|
+
value: "no-repeat",
|
|
654
|
+
icon: te
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
value: "repeat-x",
|
|
658
|
+
icon: wt
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
value: "repeat-y",
|
|
662
|
+
icon: bt
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
value: "repeat",
|
|
666
|
+
icon: xt
|
|
667
|
+
}
|
|
668
|
+
], Lt = [
|
|
669
|
+
"left top",
|
|
670
|
+
"top",
|
|
671
|
+
"right top",
|
|
672
|
+
"left",
|
|
673
|
+
"center",
|
|
674
|
+
"right",
|
|
675
|
+
"left bottom",
|
|
676
|
+
"bottom",
|
|
677
|
+
"right bottom"
|
|
678
|
+
], Mt = ["cover", "contain", "auto"], yt = [
|
|
679
|
+
{
|
|
680
|
+
value: "scroll",
|
|
681
|
+
label: "Scroll"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
value: "fixed",
|
|
685
|
+
label: "Fixed"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
value: "local",
|
|
689
|
+
label: "Local"
|
|
690
|
+
}
|
|
691
|
+
], It = `<svg width="24" height="24" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
692
|
+
<circle cx="12.5" cy="12.5" r="1.5" fill="currentColor" stroke="currentColor" stroke-width="1.2"/>
|
|
693
|
+
</svg>`, ke = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
694
|
+
<path d="M22 21L15.3833 8.53125C15.2099 8.20436 14.8701 8 14.5 8C14.1299 8 13.7901 8.20436 13.6167 8.53125L7 21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
695
|
+
<path d="M18.0803 13.6136L16.2902 14.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
696
|
+
<path d="M14.5 13.6136L16.2902 14.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
697
|
+
<path d="M12.7098 14.6136L14.5 13.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
698
|
+
<path d="M10.9197 13.6136L12.7098 14.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
699
|
+
<path d="M23 21H1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
700
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.43506 4.51868C9.35978 4.6148 10.0468 5.41892 9.99748 6.34731C9.94813 7.27571 9.1797 8.00245 8.25 8H4.5C3.67157 8 3 7.32843 3 6.5C3 5.67157 3.67157 5 4.5 5C4.49826 3.98978 5.25139 3.13744 6.25414 3.01479C7.2569 2.89214 8.19325 3.53782 8.43506 4.51868Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
701
|
+
<path d="M9.95966 15.4228L8.378 12.5214C8.20283 12.2 7.86604 12 7.5 12C7.13396 12 6.79717 12.2 6.622 12.5214L2 21.0001" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
702
|
+
</svg>
|
|
703
|
+
`, Ht = (t) => t?.match(/url\((['"]?)(https?:\/\/[^'")]+)\1\)/)?.at(2), Vt = ({ onChange: t, value: o }) => {
|
|
704
|
+
const [n, l] = Je(!1), r = o?.backgroundPosition ?? "center", s = o?.backgroundRepeat ?? "no-repeat", i = o?.backgroundSize ?? "cover", a = o?.backgroundAttachment ?? "scroll", d = (c) => {
|
|
705
|
+
t?.({
|
|
706
|
+
backgroundImage: c ? `url(${c})` : void 0,
|
|
707
|
+
backgroundPosition: r,
|
|
708
|
+
backgroundRepeat: s,
|
|
709
|
+
backgroundSize: i
|
|
710
|
+
});
|
|
711
|
+
}, g = (c) => {
|
|
712
|
+
t?.({
|
|
713
|
+
...o,
|
|
714
|
+
backgroundRepeat: c
|
|
715
|
+
});
|
|
716
|
+
}, m = (c) => {
|
|
717
|
+
t?.({
|
|
718
|
+
...o,
|
|
719
|
+
backgroundPosition: c.currentTarget.value
|
|
720
|
+
});
|
|
721
|
+
}, h = (c) => {
|
|
722
|
+
t?.({
|
|
723
|
+
...o,
|
|
724
|
+
backgroundSize: c.currentTarget.value
|
|
725
|
+
});
|
|
726
|
+
}, C = (c) => {
|
|
727
|
+
t?.({
|
|
728
|
+
...o,
|
|
729
|
+
backgroundAttachment: c
|
|
730
|
+
});
|
|
731
|
+
};
|
|
732
|
+
return /* @__PURE__ */ p("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
733
|
+
/* @__PURE__ */ e(
|
|
734
|
+
ct,
|
|
735
|
+
{
|
|
736
|
+
previewStyle: {
|
|
737
|
+
backgroundPosition: r,
|
|
738
|
+
backgroundRepeat: s,
|
|
739
|
+
backgroundSize: i,
|
|
740
|
+
backgroundAttachment: a
|
|
741
|
+
},
|
|
742
|
+
source: Ht(o?.backgroundImage),
|
|
743
|
+
onChange: d
|
|
744
|
+
}
|
|
745
|
+
),
|
|
746
|
+
/* @__PURE__ */ e(
|
|
747
|
+
Y,
|
|
748
|
+
{
|
|
749
|
+
suffix: /* @__PURE__ */ e(
|
|
750
|
+
w,
|
|
751
|
+
{
|
|
752
|
+
css: [{ transition: "transform" }, n && { transform: "rotate(-180deg)" }],
|
|
753
|
+
source: J
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
onClick: l,
|
|
757
|
+
children: n ? "Show less" : "Show more"
|
|
758
|
+
}
|
|
759
|
+
),
|
|
760
|
+
/* @__PURE__ */ e(de, { open: n, children: /* @__PURE__ */ p("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
761
|
+
/* @__PURE__ */ e(x, { name: "Scale", children: /* @__PURE__ */ e("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: Mt.map((c) => {
|
|
762
|
+
const v = i === c;
|
|
763
|
+
return /* @__PURE__ */ e(
|
|
764
|
+
"button",
|
|
765
|
+
{
|
|
766
|
+
onClick: h,
|
|
767
|
+
value: c,
|
|
768
|
+
css: [
|
|
769
|
+
{
|
|
770
|
+
padding: 6,
|
|
771
|
+
borderRadius: 4,
|
|
772
|
+
borderWidth: 1,
|
|
773
|
+
borderStyle: "solid",
|
|
774
|
+
borderColor: u.palette.white["2s"]
|
|
775
|
+
},
|
|
776
|
+
{ color: u.palette.white["4s"] },
|
|
777
|
+
v && { color: u.palette.white["6s"], borderColor: u.palette.white["5s"] }
|
|
778
|
+
],
|
|
779
|
+
children: /* @__PURE__ */ p(
|
|
780
|
+
"div",
|
|
781
|
+
{
|
|
782
|
+
css: {
|
|
783
|
+
position: "relative",
|
|
784
|
+
display: "flex",
|
|
785
|
+
borderRadius: 4,
|
|
786
|
+
overflow: "hidden",
|
|
787
|
+
justifyContent: "center",
|
|
788
|
+
alignItems: "center",
|
|
789
|
+
height: 32,
|
|
790
|
+
width: 48
|
|
791
|
+
},
|
|
792
|
+
children: [
|
|
793
|
+
/* @__PURE__ */ e(
|
|
794
|
+
"div",
|
|
795
|
+
{
|
|
796
|
+
css: [
|
|
797
|
+
{
|
|
798
|
+
display: "flex",
|
|
799
|
+
alignItems: "center",
|
|
800
|
+
justifyContent: "center",
|
|
801
|
+
backgroundColor: u.palette.white["1s"]
|
|
802
|
+
},
|
|
803
|
+
c === "auto" && { borderRadius: 2 },
|
|
804
|
+
c === "contain" && { width: 32, height: 32 },
|
|
805
|
+
c === "cover" && { width: "100%", height: "100%" },
|
|
806
|
+
c === "auto" && { width: 24, height: 24 }
|
|
807
|
+
],
|
|
808
|
+
children: /* @__PURE__ */ e(w, { source: ke })
|
|
809
|
+
}
|
|
810
|
+
),
|
|
811
|
+
/* @__PURE__ */ e(
|
|
812
|
+
"div",
|
|
813
|
+
{
|
|
814
|
+
css: [
|
|
815
|
+
{
|
|
816
|
+
position: "absolute",
|
|
817
|
+
inset: 0,
|
|
818
|
+
borderRadius: 4,
|
|
819
|
+
pointerEvents: "none",
|
|
820
|
+
borderWidth: 1,
|
|
821
|
+
borderStyle: "solid",
|
|
822
|
+
borderColor: u.palette.white["1s"]
|
|
823
|
+
},
|
|
824
|
+
v && { borderColor: u.palette.white["2s"] }
|
|
825
|
+
]
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
]
|
|
829
|
+
}
|
|
830
|
+
)
|
|
831
|
+
},
|
|
832
|
+
c
|
|
833
|
+
);
|
|
834
|
+
}) }) }),
|
|
835
|
+
/* @__PURE__ */ e(x, { name: "Position", children: /* @__PURE__ */ e(
|
|
836
|
+
"div",
|
|
837
|
+
{
|
|
838
|
+
css: {
|
|
839
|
+
display: "grid",
|
|
840
|
+
padding: 8,
|
|
841
|
+
gap: 2,
|
|
842
|
+
borderRadius: 12,
|
|
843
|
+
backgroundColor: u.palette.white["1s"],
|
|
844
|
+
gridTemplateColumns: "repeat(3, minmax(0, 1fr))"
|
|
845
|
+
},
|
|
846
|
+
children: Lt.map((c) => {
|
|
847
|
+
const v = r === c;
|
|
848
|
+
return /* @__PURE__ */ p(
|
|
849
|
+
b,
|
|
850
|
+
{
|
|
851
|
+
css: [
|
|
852
|
+
{ position: "relative" },
|
|
853
|
+
v && {
|
|
854
|
+
backgroundColor: u.palette.black["7s"]
|
|
855
|
+
}
|
|
856
|
+
],
|
|
857
|
+
onClick: m,
|
|
858
|
+
value: c,
|
|
859
|
+
size: "20",
|
|
860
|
+
children: [
|
|
861
|
+
/* @__PURE__ */ e(w, { source: It }),
|
|
862
|
+
v && /* @__PURE__ */ e(
|
|
863
|
+
"div",
|
|
864
|
+
{
|
|
865
|
+
css: {
|
|
866
|
+
position: "absolute",
|
|
867
|
+
borderRadius: 9999,
|
|
868
|
+
pointerEvents: "none",
|
|
869
|
+
width: 12,
|
|
870
|
+
height: 12,
|
|
871
|
+
borderStyle: "solid",
|
|
872
|
+
borderWidth: 2
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
)
|
|
876
|
+
]
|
|
877
|
+
},
|
|
878
|
+
c
|
|
879
|
+
);
|
|
880
|
+
})
|
|
881
|
+
}
|
|
882
|
+
) }),
|
|
883
|
+
/* @__PURE__ */ e(x, { name: "Repeat", children: /* @__PURE__ */ e(H, { value: s, onSelectionChange: g, children: kt.map((c) => /* @__PURE__ */ e(b, { value: c.value, children: /* @__PURE__ */ e(w, { source: c.icon }) }, c.value)) }) }),
|
|
884
|
+
/* @__PURE__ */ e(x, { name: "Attachment", children: /* @__PURE__ */ e(
|
|
885
|
+
j,
|
|
886
|
+
{
|
|
887
|
+
onChange: C,
|
|
888
|
+
css: {
|
|
889
|
+
width: "50%"
|
|
890
|
+
},
|
|
891
|
+
value: a,
|
|
892
|
+
options: yt
|
|
893
|
+
}
|
|
894
|
+
) })
|
|
895
|
+
] }) })
|
|
896
|
+
] });
|
|
897
|
+
}, Ho = ({ value: t, onChange: o }) => /* @__PURE__ */ p(ze, { defaultIndex: t?.backgroundImage ? 1 : 0, children: [
|
|
898
|
+
/* @__PURE__ */ p(Oe, { children: [
|
|
899
|
+
/* @__PURE__ */ e(
|
|
900
|
+
ie,
|
|
901
|
+
{
|
|
902
|
+
css: {
|
|
903
|
+
...u.text.xs
|
|
904
|
+
},
|
|
905
|
+
children: "Color"
|
|
906
|
+
}
|
|
907
|
+
),
|
|
908
|
+
/* @__PURE__ */ e(
|
|
909
|
+
ie,
|
|
910
|
+
{
|
|
911
|
+
css: {
|
|
912
|
+
...u.text.xs
|
|
913
|
+
},
|
|
914
|
+
children: "Image"
|
|
915
|
+
}
|
|
916
|
+
)
|
|
917
|
+
] }),
|
|
918
|
+
/* @__PURE__ */ p(
|
|
919
|
+
Pe,
|
|
920
|
+
{
|
|
921
|
+
css: {
|
|
922
|
+
paddingTop: 2
|
|
923
|
+
},
|
|
924
|
+
children: [
|
|
925
|
+
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(ft, { onChange: o, value: t }) }),
|
|
926
|
+
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(Vt, { onChange: o, value: t }) })
|
|
927
|
+
]
|
|
928
|
+
}
|
|
929
|
+
)
|
|
930
|
+
] }), V = ({ name: t, value: o, onChange: n }) => {
|
|
931
|
+
const [l, r] = M(!1), s = "auto", i = [
|
|
932
|
+
{
|
|
933
|
+
label: "Auto",
|
|
934
|
+
value: s
|
|
935
|
+
}
|
|
936
|
+
], a = () => {
|
|
937
|
+
setTimeout(() => {
|
|
938
|
+
r(!1);
|
|
939
|
+
}, 100);
|
|
940
|
+
}, d = (C) => {
|
|
941
|
+
r(!0), C.target.select();
|
|
942
|
+
}, g = (C) => {
|
|
943
|
+
const c = isNaN(C.target.valueAsNumber) ? void 0 : C.target.valueAsNumber;
|
|
944
|
+
n?.(t, c);
|
|
945
|
+
}, m = (C) => {
|
|
946
|
+
n?.(t, C.currentTarget.getAttribute("value") ?? void 0);
|
|
947
|
+
}, h = (C) => {
|
|
948
|
+
C.stopPropagation(), n?.(t);
|
|
949
|
+
};
|
|
950
|
+
return /* @__PURE__ */ p("div", { css: { position: "relative", width: 44, height: "fit-content" }, children: [
|
|
951
|
+
/* @__PURE__ */ e(
|
|
952
|
+
L,
|
|
953
|
+
{
|
|
954
|
+
mode: "onBlur",
|
|
955
|
+
onFocus: d,
|
|
956
|
+
css: { textAlign: "center" },
|
|
957
|
+
size: "28",
|
|
958
|
+
autoComplete: "off",
|
|
959
|
+
fullWidth: !0,
|
|
960
|
+
placeholder: o === s ? "Auto" : void 0,
|
|
961
|
+
value: o ?? 0,
|
|
962
|
+
onBlur: a,
|
|
963
|
+
name: t,
|
|
964
|
+
onChange: g
|
|
965
|
+
}
|
|
966
|
+
),
|
|
967
|
+
t.startsWith("margin") && /* @__PURE__ */ p(S, { open: l, placement: "bottom-start", children: [
|
|
968
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e("div", { css: { position: "absolute", inset: "0 0 auto 0", top: "100%" } }) }),
|
|
969
|
+
/* @__PURE__ */ e(A, { children: i.map((C) => {
|
|
970
|
+
const c = C.value === o;
|
|
971
|
+
return /* @__PURE__ */ p(
|
|
972
|
+
Z,
|
|
973
|
+
{
|
|
974
|
+
onClick: m,
|
|
975
|
+
css: { justifyContent: "space-between" },
|
|
976
|
+
isActive: c,
|
|
977
|
+
value: C.value,
|
|
978
|
+
children: [
|
|
979
|
+
C.label,
|
|
980
|
+
c && /* @__PURE__ */ e(b, { size: "20", onClick: h, children: /* @__PURE__ */ e(w, { size: 16, source: B }) })
|
|
981
|
+
]
|
|
982
|
+
},
|
|
983
|
+
C.value
|
|
984
|
+
);
|
|
985
|
+
}) })
|
|
986
|
+
] })
|
|
987
|
+
] });
|
|
988
|
+
}, Vo = ({ value: t, onChange: o }) => {
|
|
989
|
+
const n = _(null), l = _(null), [r, s] = M(0), [i, a] = M(0);
|
|
990
|
+
Ve(() => {
|
|
991
|
+
const g = new ResizeObserver((m) => {
|
|
992
|
+
const h = m.at(0)?.target;
|
|
993
|
+
if (h) {
|
|
994
|
+
const { width: c } = h.getBoundingClientRect();
|
|
995
|
+
s(Math.floor(Math.sqrt(Math.pow(c, 2) / 2)));
|
|
996
|
+
}
|
|
997
|
+
const C = m.at(1)?.target;
|
|
998
|
+
if (C) {
|
|
999
|
+
const { width: c } = C.getBoundingClientRect();
|
|
1000
|
+
a(Math.floor(Math.sqrt(Math.pow(c, 2) / 2)));
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
return n.current && g.observe(n.current), l.current && g.observe(l.current), () => g.disconnect();
|
|
1004
|
+
}, []);
|
|
1005
|
+
const d = (g, m) => {
|
|
1006
|
+
o?.({
|
|
1007
|
+
...t,
|
|
1008
|
+
[g]: m
|
|
1009
|
+
});
|
|
1010
|
+
};
|
|
1011
|
+
return /* @__PURE__ */ p("div", { ref: n, css: { position: "relative", overflow: "hidden", borderRadius: 4, aspectRatio: 1 }, children: [
|
|
1012
|
+
/* @__PURE__ */ e(
|
|
1013
|
+
"div",
|
|
1014
|
+
{
|
|
1015
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateY(50%)", placeItems: "center" },
|
|
1016
|
+
children: /* @__PURE__ */ e(
|
|
1017
|
+
"div",
|
|
1018
|
+
{
|
|
1019
|
+
style: {
|
|
1020
|
+
width: r
|
|
1021
|
+
},
|
|
1022
|
+
css: {
|
|
1023
|
+
position: "relative",
|
|
1024
|
+
pointerEvents: "auto",
|
|
1025
|
+
backgroundColor: u.palette.white["1s"],
|
|
1026
|
+
aspectRatio: 1
|
|
1027
|
+
},
|
|
1028
|
+
children: /* @__PURE__ */ e(
|
|
1029
|
+
"div",
|
|
1030
|
+
{
|
|
1031
|
+
css: {
|
|
1032
|
+
position: "absolute",
|
|
1033
|
+
display: "flex",
|
|
1034
|
+
justifyContent: "center",
|
|
1035
|
+
width: "100%",
|
|
1036
|
+
height: "100%",
|
|
1037
|
+
zIndex: 10,
|
|
1038
|
+
transform: "rotate(-45deg)"
|
|
1039
|
+
},
|
|
1040
|
+
children: /* @__PURE__ */ e(
|
|
1041
|
+
"div",
|
|
1042
|
+
{
|
|
1043
|
+
css: {
|
|
1044
|
+
position: "relative",
|
|
1045
|
+
display: "flex",
|
|
1046
|
+
paddingBottom: 12,
|
|
1047
|
+
alignItems: "flex-end",
|
|
1048
|
+
zIndex: 10,
|
|
1049
|
+
height: "50%"
|
|
1050
|
+
},
|
|
1051
|
+
children: /* @__PURE__ */ e(V, { name: "marginBottom", value: t?.marginBottom, onChange: d })
|
|
1052
|
+
}
|
|
1053
|
+
)
|
|
1054
|
+
}
|
|
1055
|
+
)
|
|
1056
|
+
}
|
|
1057
|
+
)
|
|
1058
|
+
}
|
|
1059
|
+
),
|
|
1060
|
+
/* @__PURE__ */ e(
|
|
1061
|
+
"div",
|
|
1062
|
+
{
|
|
1063
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateY(-50%)", placeItems: "center" },
|
|
1064
|
+
children: /* @__PURE__ */ e(
|
|
1065
|
+
"div",
|
|
1066
|
+
{
|
|
1067
|
+
style: {
|
|
1068
|
+
width: r
|
|
1069
|
+
},
|
|
1070
|
+
css: {
|
|
1071
|
+
position: "relative",
|
|
1072
|
+
pointerEvents: "auto",
|
|
1073
|
+
backgroundColor: u.palette.white["1s"],
|
|
1074
|
+
aspectRatio: 1
|
|
1075
|
+
},
|
|
1076
|
+
children: /* @__PURE__ */ e(
|
|
1077
|
+
"div",
|
|
1078
|
+
{
|
|
1079
|
+
css: { position: "absolute", display: "flex", width: "100%", height: "100%", zIndex: 10, transform: "rotate(-45deg)" },
|
|
1080
|
+
children: /* @__PURE__ */ e("div", { css: { position: "relative", display: "flex", paddingTop: 12, zIndex: 10, height: "50%" }, children: /* @__PURE__ */ e(V, { name: "marginTop", value: t?.marginTop, onChange: d }) })
|
|
1081
|
+
}
|
|
1082
|
+
)
|
|
1083
|
+
}
|
|
1084
|
+
)
|
|
1085
|
+
}
|
|
1086
|
+
),
|
|
1087
|
+
/* @__PURE__ */ e(
|
|
1088
|
+
"div",
|
|
1089
|
+
{
|
|
1090
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateX(50%)", placeItems: "center" },
|
|
1091
|
+
children: /* @__PURE__ */ e(
|
|
1092
|
+
"div",
|
|
1093
|
+
{
|
|
1094
|
+
style: {
|
|
1095
|
+
width: r
|
|
1096
|
+
},
|
|
1097
|
+
css: {
|
|
1098
|
+
position: "relative",
|
|
1099
|
+
pointerEvents: "auto",
|
|
1100
|
+
aspectRatio: 1,
|
|
1101
|
+
backgroundColor: u.palette.white["1s"]
|
|
1102
|
+
},
|
|
1103
|
+
children: /* @__PURE__ */ e(
|
|
1104
|
+
"div",
|
|
1105
|
+
{
|
|
1106
|
+
css: { position: "absolute", inset: 0, display: "flex", alignItems: "center", zIndex: 10, transform: "rotate(-45deg)" },
|
|
1107
|
+
children: /* @__PURE__ */ e("div", { css: { display: "flex", paddingRight: 6, justifyContent: "flex-end", width: "50%" }, children: /* @__PURE__ */ e(V, { name: "marginRight", value: t?.marginRight, onChange: d }) })
|
|
1108
|
+
}
|
|
1109
|
+
)
|
|
1110
|
+
}
|
|
1111
|
+
)
|
|
1112
|
+
}
|
|
1113
|
+
),
|
|
1114
|
+
/* @__PURE__ */ e(
|
|
1115
|
+
"div",
|
|
1116
|
+
{
|
|
1117
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateX(-50%)", placeItems: "center" },
|
|
1118
|
+
children: /* @__PURE__ */ e(
|
|
1119
|
+
"div",
|
|
1120
|
+
{
|
|
1121
|
+
style: {
|
|
1122
|
+
width: r
|
|
1123
|
+
},
|
|
1124
|
+
css: {
|
|
1125
|
+
position: "relative",
|
|
1126
|
+
pointerEvents: "auto",
|
|
1127
|
+
aspectRatio: 1,
|
|
1128
|
+
backgroundColor: u.palette.white["1s"]
|
|
1129
|
+
},
|
|
1130
|
+
children: /* @__PURE__ */ e(
|
|
1131
|
+
"div",
|
|
1132
|
+
{
|
|
1133
|
+
css: {
|
|
1134
|
+
position: "absolute",
|
|
1135
|
+
inset: 0,
|
|
1136
|
+
display: "flex",
|
|
1137
|
+
alignItems: "center",
|
|
1138
|
+
justifyContent: "flex-end",
|
|
1139
|
+
zIndex: 10,
|
|
1140
|
+
transform: "rotate(-45deg)"
|
|
1141
|
+
},
|
|
1142
|
+
children: /* @__PURE__ */ e("div", { css: { display: "flex", paddingLeft: 6, width: "50%" }, children: /* @__PURE__ */ e("div", { css: { width: 40 }, children: /* @__PURE__ */ e(V, { name: "marginLeft", value: t?.marginLeft, onChange: d }) }) })
|
|
1143
|
+
}
|
|
1144
|
+
)
|
|
1145
|
+
}
|
|
1146
|
+
)
|
|
1147
|
+
}
|
|
1148
|
+
),
|
|
1149
|
+
/* @__PURE__ */ p(
|
|
1150
|
+
"div",
|
|
1151
|
+
{
|
|
1152
|
+
css: {
|
|
1153
|
+
position: "absolute",
|
|
1154
|
+
left: "50%",
|
|
1155
|
+
top: "50%",
|
|
1156
|
+
borderRadius: 4,
|
|
1157
|
+
overflow: "hidden",
|
|
1158
|
+
width: "60%",
|
|
1159
|
+
height: "60%",
|
|
1160
|
+
backgroundColor: u.palette.white["1s"],
|
|
1161
|
+
transform: "translate(-50%, -50%)"
|
|
1162
|
+
},
|
|
1163
|
+
children: [
|
|
1164
|
+
/* @__PURE__ */ e("div", { ref: l, css: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ e(
|
|
1165
|
+
"div",
|
|
1166
|
+
{
|
|
1167
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateY(50%)", placeItems: "center" },
|
|
1168
|
+
children: /* @__PURE__ */ e(
|
|
1169
|
+
"div",
|
|
1170
|
+
{
|
|
1171
|
+
style: {
|
|
1172
|
+
width: i
|
|
1173
|
+
},
|
|
1174
|
+
css: { position: "relative", pointerEvents: "auto", aspectRatio: 1 },
|
|
1175
|
+
children: /* @__PURE__ */ e(
|
|
1176
|
+
"div",
|
|
1177
|
+
{
|
|
1178
|
+
css: {
|
|
1179
|
+
position: "absolute",
|
|
1180
|
+
display: "flex",
|
|
1181
|
+
justifyContent: "center",
|
|
1182
|
+
width: "100%",
|
|
1183
|
+
height: "100%",
|
|
1184
|
+
zIndex: 10,
|
|
1185
|
+
transform: "rotate(-45deg)"
|
|
1186
|
+
},
|
|
1187
|
+
children: /* @__PURE__ */ e(
|
|
1188
|
+
"div",
|
|
1189
|
+
{
|
|
1190
|
+
css: {
|
|
1191
|
+
position: "relative",
|
|
1192
|
+
display: "flex",
|
|
1193
|
+
paddingBottom: 16,
|
|
1194
|
+
alignItems: "flex-end",
|
|
1195
|
+
zIndex: 10,
|
|
1196
|
+
width: 40,
|
|
1197
|
+
height: "50%"
|
|
1198
|
+
},
|
|
1199
|
+
children: /* @__PURE__ */ e(V, { name: "paddingBottom", value: t?.paddingBottom, onChange: d })
|
|
1200
|
+
}
|
|
1201
|
+
)
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
}
|
|
1205
|
+
)
|
|
1206
|
+
}
|
|
1207
|
+
) }),
|
|
1208
|
+
/* @__PURE__ */ e(
|
|
1209
|
+
"div",
|
|
1210
|
+
{
|
|
1211
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateY(-50%)", placeItems: "center" },
|
|
1212
|
+
children: /* @__PURE__ */ e(
|
|
1213
|
+
"div",
|
|
1214
|
+
{
|
|
1215
|
+
style: {
|
|
1216
|
+
width: i
|
|
1217
|
+
},
|
|
1218
|
+
css: { position: "relative", pointerEvents: "auto", aspectRatio: 1 },
|
|
1219
|
+
children: /* @__PURE__ */ e(
|
|
1220
|
+
"div",
|
|
1221
|
+
{
|
|
1222
|
+
css: {
|
|
1223
|
+
position: "absolute",
|
|
1224
|
+
display: "flex",
|
|
1225
|
+
justifyContent: "center",
|
|
1226
|
+
width: "100%",
|
|
1227
|
+
height: "100%",
|
|
1228
|
+
zIndex: 10,
|
|
1229
|
+
transform: "rotate(-45deg)"
|
|
1230
|
+
},
|
|
1231
|
+
children: /* @__PURE__ */ e("div", { css: { position: "relative", display: "flex", paddingTop: 16, zIndex: 10, height: "50%" }, children: /* @__PURE__ */ e(V, { name: "paddingTop", value: t?.paddingTop, onChange: d }) })
|
|
1232
|
+
}
|
|
1233
|
+
)
|
|
1234
|
+
}
|
|
1235
|
+
)
|
|
1236
|
+
}
|
|
1237
|
+
),
|
|
1238
|
+
/* @__PURE__ */ e(
|
|
1239
|
+
"div",
|
|
1240
|
+
{
|
|
1241
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateX(50%)", placeItems: "center" },
|
|
1242
|
+
children: /* @__PURE__ */ e(
|
|
1243
|
+
"div",
|
|
1244
|
+
{
|
|
1245
|
+
style: {
|
|
1246
|
+
width: i
|
|
1247
|
+
},
|
|
1248
|
+
css: { position: "relative", pointerEvents: "auto", aspectRatio: 1 },
|
|
1249
|
+
children: /* @__PURE__ */ e(
|
|
1250
|
+
"div",
|
|
1251
|
+
{
|
|
1252
|
+
css: { position: "absolute", inset: 0, display: "flex", alignItems: "center", zIndex: 10, transform: "rotate(-45deg)" },
|
|
1253
|
+
children: /* @__PURE__ */ e("div", { css: { display: "flex", paddingRight: 12, justifyContent: "flex-end", width: "50%" }, children: /* @__PURE__ */ e(V, { name: "paddingRight", value: t?.paddingRight, onChange: d }) })
|
|
1254
|
+
}
|
|
1255
|
+
)
|
|
1256
|
+
}
|
|
1257
|
+
)
|
|
1258
|
+
}
|
|
1259
|
+
),
|
|
1260
|
+
/* @__PURE__ */ e(
|
|
1261
|
+
"div",
|
|
1262
|
+
{
|
|
1263
|
+
css: { position: "absolute", inset: 0, display: "grid", transform: "rotate(45deg) translateX(-50%)", placeItems: "center" },
|
|
1264
|
+
children: /* @__PURE__ */ e(
|
|
1265
|
+
"div",
|
|
1266
|
+
{
|
|
1267
|
+
style: {
|
|
1268
|
+
width: i
|
|
1269
|
+
},
|
|
1270
|
+
css: { position: "relative", pointerEvents: "auto", aspectRatio: 1 },
|
|
1271
|
+
children: /* @__PURE__ */ e(
|
|
1272
|
+
"div",
|
|
1273
|
+
{
|
|
1274
|
+
css: {
|
|
1275
|
+
position: "absolute",
|
|
1276
|
+
inset: 0,
|
|
1277
|
+
display: "flex",
|
|
1278
|
+
alignItems: "center",
|
|
1279
|
+
justifyContent: "flex-end",
|
|
1280
|
+
zIndex: 10,
|
|
1281
|
+
transform: "rotate(-45deg)"
|
|
1282
|
+
},
|
|
1283
|
+
children: /* @__PURE__ */ e("div", { css: { display: "flex", paddingLeft: 12, width: "50%" }, children: /* @__PURE__ */ e(V, { name: "paddingLeft", value: t?.paddingLeft, onChange: d }) })
|
|
1284
|
+
}
|
|
1285
|
+
)
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
}
|
|
1289
|
+
)
|
|
1290
|
+
]
|
|
1291
|
+
}
|
|
1292
|
+
)
|
|
1293
|
+
] });
|
|
1294
|
+
}, Bt = `<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1295
|
+
<rect width="48" height="48" fill="white" fill-opacity="0.01"/>
|
|
1296
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M19 10.3075C19 12.6865 17.2091 14.615 15 14.615C12.7909 14.615 11 12.6865 11 10.3075C11 7.92854 12.7909 6 15 6C17.2091 6 19 7.92854 19 10.3075ZM15 28.615C17.2091 28.615 19 26.6865 19 24.3075C19 21.9285 17.2091 20 15 20C12.7909 20 11 21.9285 11 24.3075C11 26.6865 12.7909 28.615 15 28.615ZM15 42.615C17.2091 42.615 19 40.6865 19 38.3075C19 35.9285 17.2091 34 15 34C12.7909 34 11 35.9285 11 38.3075C11 40.6865 12.7909 42.615 15 42.615Z" fill="currentColor"/>
|
|
1297
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M37 10.3075C37 12.6865 35.2091 14.615 33 14.615C30.7909 14.615 29 12.6865 29 10.3075C29 7.92854 30.7909 6 33 6C35.2091 6 37 7.92854 37 10.3075ZM33 28.615C35.2091 28.615 37 26.6865 37 24.3075C37 21.9285 35.2091 20 33 20C30.7909 20 29 21.9285 29 24.3075C29 26.6865 30.7909 28.615 33 28.615ZM33 42.615C35.2091 42.615 37 40.6865 37 38.3075C37 35.9285 35.2091 34 33 34C30.7909 34 29 35.9285 29 38.3075C29 40.6865 30.7909 42.615 33 42.615Z" fill="currentColor"/>
|
|
1298
|
+
</svg>`, Rt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1299
|
+
<path d="M16 18H18C19.1046 18 20 17.1046 20 16V5C20 3.89543 19.1046 3 18 3H9C7.89543 3 7 3.89543 7 5V7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1300
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3593 9.47041L13.5296 7.6407C13.1194 7.23047 12.563 7 11.9828 7H6C4.89543 7 4 7.89543 4 9V19C4 20.1046 4.89543 21 6 21H14C15.1046 21 16 20.1046 16 19V11.0172C16 10.437 15.7695 9.88065 15.3593 9.47041Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1301
|
+
<path d="M16 11.5H13C12.1716 11.5 11.5 10.8284 11.5 10V7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1302
|
+
</svg>
|
|
1303
|
+
`, Tt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1304
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.138 21H7.858C6.811 21 5.941 20.192 5.863 19.147L4.966 7H19L18.133 19.142C18.058 20.189 17.187 21 16.138 21V21Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1305
|
+
<path d="M12 11V17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1306
|
+
<path d="M4 7H20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1307
|
+
<path d="M17 7L15.987 4.298C15.694 3.517 14.948 3 14.114 3H9.886C9.052 3 8.306 3.517 8.013 4.298L7 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1308
|
+
<path d="M15.43 11L15 17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1309
|
+
<path d="M8.56997 11L8.99997 17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1310
|
+
</svg>
|
|
1311
|
+
`, At = ({ node: t, nodeIndex: o }) => {
|
|
1312
|
+
const [n, l] = M(!1), { actions: r } = K(), s = (m) => {
|
|
1313
|
+
m.stopPropagation(), r.delete(t.id);
|
|
1314
|
+
}, i = (m) => {
|
|
1315
|
+
m.stopPropagation();
|
|
1316
|
+
const h = r.duplicate(t.id);
|
|
1317
|
+
r.selectNode(h.id);
|
|
1318
|
+
}, a = () => {
|
|
1319
|
+
l(!0);
|
|
1320
|
+
}, d = () => {
|
|
1321
|
+
l(!1);
|
|
1322
|
+
}, g = () => {
|
|
1323
|
+
Ye(t) && r.selectNode(t.id);
|
|
1324
|
+
};
|
|
1325
|
+
return /* @__PURE__ */ e(qe, { index: o, draggableId: t.id, children: (m, h) => /* @__PURE__ */ e(
|
|
1326
|
+
"div",
|
|
1327
|
+
{
|
|
1328
|
+
ref: m.innerRef,
|
|
1329
|
+
...m.draggableProps,
|
|
1330
|
+
...m.dragHandleProps,
|
|
1331
|
+
children: /* @__PURE__ */ p(
|
|
1332
|
+
"div",
|
|
1333
|
+
{
|
|
1334
|
+
css: [
|
|
1335
|
+
{
|
|
1336
|
+
display: "flex",
|
|
1337
|
+
paddingInline: 8,
|
|
1338
|
+
paddingBlock: 6,
|
|
1339
|
+
alignItems: "center",
|
|
1340
|
+
gap: 4,
|
|
1341
|
+
borderRadius: 8,
|
|
1342
|
+
backgroundColor: u.palette.white["1s"],
|
|
1343
|
+
...u.text.xs,
|
|
1344
|
+
cursor: "grab",
|
|
1345
|
+
":hover": {
|
|
1346
|
+
backgroundColor: u.palette.white["2s"]
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
h.isDragging && { backgroundColor: u.palette.white["3s"] }
|
|
1350
|
+
],
|
|
1351
|
+
onMouseEnter: a,
|
|
1352
|
+
onMouseLeave: d,
|
|
1353
|
+
"aria-hidden": !0,
|
|
1354
|
+
onClick: g,
|
|
1355
|
+
children: [
|
|
1356
|
+
/* @__PURE__ */ e(w, { size: 16, source: Bt }),
|
|
1357
|
+
/* @__PURE__ */ e(
|
|
1358
|
+
"span",
|
|
1359
|
+
{
|
|
1360
|
+
css: {
|
|
1361
|
+
overflow: "hidden",
|
|
1362
|
+
textOverflow: "ellipsis",
|
|
1363
|
+
whiteSpace: "nowrap",
|
|
1364
|
+
flex: 1
|
|
1365
|
+
},
|
|
1366
|
+
children: $e(t)
|
|
1367
|
+
}
|
|
1368
|
+
),
|
|
1369
|
+
/* @__PURE__ */ e(de, { open: n, orientation: "horizontal", children: /* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
1370
|
+
/* @__PURE__ */ e(b, { tooltip: { content: "Duplicate" }, onClick: i, children: /* @__PURE__ */ e(w, { size: 16, source: Rt }) }),
|
|
1371
|
+
/* @__PURE__ */ e(
|
|
1372
|
+
b,
|
|
1373
|
+
{
|
|
1374
|
+
tooltip: {
|
|
1375
|
+
content: "Delete"
|
|
1376
|
+
},
|
|
1377
|
+
onClick: s,
|
|
1378
|
+
children: /* @__PURE__ */ e(w, { size: 16, source: Tt })
|
|
1379
|
+
}
|
|
1380
|
+
)
|
|
1381
|
+
] }) })
|
|
1382
|
+
]
|
|
1383
|
+
}
|
|
1384
|
+
)
|
|
1385
|
+
}
|
|
1386
|
+
) });
|
|
1387
|
+
}, Bo = ({ getNewNodeElement: t }) => {
|
|
1388
|
+
const { query: o, actions: n } = K(), { id: l } = me(), r = o.node(l).childNodes().map((a) => o.node(a).get());
|
|
1389
|
+
return /* @__PURE__ */ p("div", { children: [
|
|
1390
|
+
/* @__PURE__ */ e(Qe, { onDragEnd: (a) => {
|
|
1391
|
+
const { source: d, destination: g } = a;
|
|
1392
|
+
if (!g || d.index === g.index) return;
|
|
1393
|
+
const m = r.at(d.index);
|
|
1394
|
+
m && n.move({ nodeId: m.id, sourceIndex: d.index, destinationIndex: g.index });
|
|
1395
|
+
}, children: /* @__PURE__ */ e(Ke, { droppableId: l, children: (a) => /* @__PURE__ */ p(
|
|
1396
|
+
"div",
|
|
1397
|
+
{
|
|
1398
|
+
ref: a.innerRef,
|
|
1399
|
+
...a.droppableProps,
|
|
1400
|
+
css: { display: "flex", flexDirection: "column", gap: 8 },
|
|
1401
|
+
children: [
|
|
1402
|
+
r.map((d, g) => /* @__PURE__ */ e(At, { node: d, nodeIndex: g }, d.id)),
|
|
1403
|
+
a.placeholder
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
) }) }),
|
|
1407
|
+
/* @__PURE__ */ e(
|
|
1408
|
+
Y,
|
|
1409
|
+
{
|
|
1410
|
+
css: { marginTop: 8 },
|
|
1411
|
+
onClick: () => {
|
|
1412
|
+
const a = o.parseReactElement(t()).toNodeTree();
|
|
1413
|
+
n.addNodeTree(a, l);
|
|
1414
|
+
},
|
|
1415
|
+
fullWidth: !0,
|
|
1416
|
+
prefix: /* @__PURE__ */ e(w, { size: 16, source: ce }),
|
|
1417
|
+
children: "Add more"
|
|
1418
|
+
}
|
|
1419
|
+
)
|
|
1420
|
+
] });
|
|
1421
|
+
}, Zt = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M1.25 8.96875C1.25 8.69261 1.47386 8.46875 1.75 8.46875H5.5C5.77614 8.46875 6 8.69261 6 8.96875V10.9688C6 11.2449 5.77614 11.4688 5.5 11.4688H1.75C1.47386 11.4688 1.25 11.2449 1.25 10.9688V8.96875Z" fill="currentColor"></path><path d="M7.62512 9.03125C7.62512 8.75511 7.84898 8.53125 8.12512 8.53125H11.8751C12.1513 8.53125 12.3751 8.75511 12.3751 9.03125V11.0312C12.3751 11.3074 12.1513 11.5312 11.8751 11.5312H8.12512C7.84898 11.5312 7.62512 11.3074 7.62512 11.0312V9.03125Z" fill="currentColor"></path><path d="M14 8.96875C14 8.69261 14.2239 8.46875 14.5 8.46875H18.25C18.5261 8.46875 18.75 8.69261 18.75 8.96875V10.9688C18.75 11.2449 18.5261 11.4688 18.25 11.4688H14.5C14.2239 11.4688 14 11.2449 14 10.9688V8.96875Z" fill="currentColor"></path></svg>', St = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M1.25 10C1.25 9.17157 1.92157 8.5 2.75 8.5C3.57843 8.5 4.25 9.17157 4.25 10C4.25 10.8284 3.57843 11.5 2.75 11.5C1.92157 11.5 1.25 10.8284 1.25 10Z" fill="currentColor"></path><path d="M6.08333 10C6.08333 9.17157 6.75491 8.5 7.58333 8.5C8.41176 8.5 9.08333 9.17157 9.08333 10C9.08333 10.8284 8.41176 11.5 7.58333 11.5C6.75491 11.5 6.08333 10.8284 6.08333 10Z" fill="currentColor"></path><path d="M10.9167 10C10.9167 9.17157 11.5883 8.5 12.4167 8.5C13.2451 8.5 13.9167 9.17157 13.9167 10C13.9167 10.8284 13.2451 11.5 12.4167 11.5C11.5883 11.5 10.9167 10.8284 10.9167 10Z" fill="currentColor"></path><path d="M15.75 10C15.75 9.17157 16.4216 8.5 17.25 8.5C18.0784 8.5 18.75 9.17157 18.75 10C18.75 10.8284 18.0784 11.5 17.25 11.5C16.4216 11.5 15.75 10.8284 15.75 10Z" fill="currentColor"></path></svg>', jt = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M1.10547 9C1.10547 8.72386 1.32933 8.5 1.60547 8.5H18.1064C18.3826 8.5 18.6064 8.72386 18.6064 9V11C18.6064 11.2761 18.3826 11.5 18.1064 11.5H1.60547C1.32933 11.5 1.10547 11.2761 1.10547 11V9Z" fill="#currentColor"></path></svg>', Nt = [
|
|
1422
|
+
{
|
|
1423
|
+
value: "none",
|
|
1424
|
+
icon: te
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
value: "solid",
|
|
1428
|
+
icon: jt
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
value: "dashed",
|
|
1432
|
+
icon: Zt
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
value: "dotted",
|
|
1436
|
+
icon: St
|
|
1437
|
+
}
|
|
1438
|
+
], Ro = ({ responsive: t = !0, value: o, onChange: n }) => {
|
|
1439
|
+
const l = o?.borderBottomWidth ?? 0, r = o?.borderTopWidth ?? 0, s = o?.borderLeftWidth ?? 0, i = o?.borderRightWidth ?? 0, a = (c = "none") => {
|
|
1440
|
+
n?.(
|
|
1441
|
+
c === "none" ? {
|
|
1442
|
+
borderStyle: void 0,
|
|
1443
|
+
borderColor: void 0,
|
|
1444
|
+
borderTopWidth: void 0,
|
|
1445
|
+
borderRightWidth: void 0,
|
|
1446
|
+
borderBottomWidth: void 0,
|
|
1447
|
+
borderLeftWidth: void 0
|
|
1448
|
+
} : {
|
|
1449
|
+
...o,
|
|
1450
|
+
borderStyle: c,
|
|
1451
|
+
borderBottomWidth: o?.borderBottomWidth ?? 1,
|
|
1452
|
+
borderLeftWidth: o?.borderLeftWidth ?? 1,
|
|
1453
|
+
borderRightWidth: o?.borderRightWidth ?? 1,
|
|
1454
|
+
borderTopWidth: o?.borderTopWidth ?? 1
|
|
1455
|
+
}
|
|
1456
|
+
);
|
|
1457
|
+
}, d = o?.borderStyle ?? "none", g = /* @__PURE__ */ e("span", { css: { color: u.palette.white["3s"], ...u.text.xs }, children: "|" }), m = (c) => {
|
|
1458
|
+
c.target.select();
|
|
1459
|
+
}, h = (c) => {
|
|
1460
|
+
const v = isNaN(c.target.valueAsNumber) ? void 0 : c.target.valueAsNumber;
|
|
1461
|
+
n?.({
|
|
1462
|
+
...o,
|
|
1463
|
+
[c.target.name]: v
|
|
1464
|
+
});
|
|
1465
|
+
};
|
|
1466
|
+
return /* @__PURE__ */ p("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
1467
|
+
/* @__PURE__ */ e(x, { responsive: t, name: "Border", children: /* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
1468
|
+
d !== "none" && /* @__PURE__ */ e(ee, { onChange: (c) => {
|
|
1469
|
+
n?.({
|
|
1470
|
+
...o,
|
|
1471
|
+
borderColor: c
|
|
1472
|
+
});
|
|
1473
|
+
}, color: o?.borderColor }),
|
|
1474
|
+
/* @__PURE__ */ e(H, { value: d, onSelectionChange: a, children: Nt.map((c) => /* @__PURE__ */ e(b, { value: c.value, children: /* @__PURE__ */ e(w, { source: c.icon }) }, c.value)) })
|
|
1475
|
+
] }) }),
|
|
1476
|
+
d !== "none" && /* @__PURE__ */ e("div", { css: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ e("div", { css: { display: "flex", alignItems: "center", gap: 4 }, children: /* @__PURE__ */ p(
|
|
1477
|
+
"div",
|
|
1478
|
+
{
|
|
1479
|
+
css: {
|
|
1480
|
+
display: "flex",
|
|
1481
|
+
paddingInline: 8,
|
|
1482
|
+
paddingBlock: "0.125rem",
|
|
1483
|
+
alignItems: "center",
|
|
1484
|
+
gap: 2,
|
|
1485
|
+
borderRadius: 8,
|
|
1486
|
+
backgroundColor: u.palette.white["1s"],
|
|
1487
|
+
flex: 1
|
|
1488
|
+
},
|
|
1489
|
+
children: [
|
|
1490
|
+
/* @__PURE__ */ e(
|
|
1491
|
+
L,
|
|
1492
|
+
{
|
|
1493
|
+
value: r,
|
|
1494
|
+
onChange: h,
|
|
1495
|
+
name: "borderTopWidth",
|
|
1496
|
+
onFocus: m,
|
|
1497
|
+
classes: {
|
|
1498
|
+
main: "bg-transparent px-1"
|
|
1499
|
+
},
|
|
1500
|
+
size: "28",
|
|
1501
|
+
placeholder: "Top",
|
|
1502
|
+
css: { textAlign: "center" }
|
|
1503
|
+
}
|
|
1504
|
+
),
|
|
1505
|
+
g,
|
|
1506
|
+
/* @__PURE__ */ e(
|
|
1507
|
+
L,
|
|
1508
|
+
{
|
|
1509
|
+
value: i,
|
|
1510
|
+
name: "borderRightWidth",
|
|
1511
|
+
placeholder: "Right",
|
|
1512
|
+
onChange: h,
|
|
1513
|
+
onFocus: m,
|
|
1514
|
+
classes: {
|
|
1515
|
+
main: "bg-transparent px-1"
|
|
1516
|
+
},
|
|
1517
|
+
size: "28",
|
|
1518
|
+
css: { textAlign: "center" }
|
|
1519
|
+
}
|
|
1520
|
+
),
|
|
1521
|
+
g,
|
|
1522
|
+
/* @__PURE__ */ e(
|
|
1523
|
+
L,
|
|
1524
|
+
{
|
|
1525
|
+
value: l,
|
|
1526
|
+
name: "borderBottomWidth",
|
|
1527
|
+
onChange: h,
|
|
1528
|
+
placeholder: "Bottom",
|
|
1529
|
+
onFocus: m,
|
|
1530
|
+
classes: {
|
|
1531
|
+
main: "bg-transparent px-1"
|
|
1532
|
+
},
|
|
1533
|
+
size: "28",
|
|
1534
|
+
css: { textAlign: "center" }
|
|
1535
|
+
}
|
|
1536
|
+
),
|
|
1537
|
+
g,
|
|
1538
|
+
/* @__PURE__ */ e(
|
|
1539
|
+
L,
|
|
1540
|
+
{
|
|
1541
|
+
value: s,
|
|
1542
|
+
name: "borderLeftWidth",
|
|
1543
|
+
onChange: h,
|
|
1544
|
+
onFocus: m,
|
|
1545
|
+
placeholder: "Left",
|
|
1546
|
+
classes: {
|
|
1547
|
+
main: "bg-transparent px-1"
|
|
1548
|
+
},
|
|
1549
|
+
size: "28",
|
|
1550
|
+
css: { textAlign: "center" }
|
|
1551
|
+
}
|
|
1552
|
+
)
|
|
1553
|
+
]
|
|
1554
|
+
}
|
|
1555
|
+
) }) })
|
|
1556
|
+
] });
|
|
1557
|
+
}, oe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1558
|
+
<path d="M13.78 4L10.22 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1559
|
+
<path d="M18 8L22 12L18 16" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1560
|
+
<path d="M6 16L2 12L6 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1561
|
+
</svg>
|
|
1562
|
+
`, W = '<svg width="16" height="16" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="text-dark-150 rotate-90"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.125 16.25C7.94733 16.25 3.75 12.0527 3.75 6.875L3.75 3.125C3.75 2.77982 3.47018 2.5 3.125 2.5C2.77982 2.5 2.5 2.77982 2.5 3.125L2.5 6.875C2.5 12.743 7.25698 17.5 13.125 17.5L16.875 17.5C17.2202 17.5 17.5 17.2202 17.5 16.875C17.5 16.5298 17.2202 16.25 16.875 16.25L13.125 16.25Z" fill="currentColor" stroke="currentColor" stroke-width="0.25" stroke-linecap="round"></path></svg>', Wt = '<svg width="16" height="16" viewBox="0 0 17 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path fill-rule="evenodd" clip-rule="evenodd" d="M2.1665 8C2.1665 11.5899 5.07665 14.5 8.6665 14.5C12.2564 14.5 15.1665 11.5899 15.1665 8C15.1665 4.41015 12.2564 1.5 8.6665 1.5C5.07665 1.5 2.1665 4.41015 2.1665 8ZM8.6665 0C4.24823 0 0.666504 3.58172 0.666504 8C0.666504 12.4183 4.24823 16 8.6665 16C13.0848 16 16.6665 12.4183 16.6665 8C16.6665 3.58172 13.0848 0 8.6665 0Z" fill="currentColor"></path></svg>', zt = `<svg width="24" height="24" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
|
1563
|
+
<path fill="currentColor" d="M36,416H476a20.023,20.023,0,0,0,20-20V116a20.023,20.023,0,0,0-20-20H36a20.023,20.023,0,0,0-20,20V396A20.023,20.023,0,0,0,36,416ZM48,128H464V384H48Z" />
|
|
1564
|
+
</svg>
|
|
1565
|
+
`, Ot = '<svg width="22" height="14" viewBox="0 0 24 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path fill-rule="evenodd" clip-rule="evenodd" d="M18.3335 1.5H4.3335C2.95278 1.5 1.8335 2.61929 1.8335 4V10C1.8335 11.3807 2.95278 12.5 4.3335 12.5H18.3335C19.7142 12.5 20.8335 11.3807 20.8335 10V4C20.8335 2.61929 19.7142 1.5 18.3335 1.5ZM4.3335 0C2.12436 0 0.333496 1.79086 0.333496 4V10C0.333496 12.2091 2.12436 14 4.3335 14H18.3335C20.5426 14 22.3335 12.2091 22.3335 10V4C22.3335 1.79086 20.5426 0 18.3335 0H4.3335Z" fill="currentColor"></path></svg>', I = 9999, To = ({ value: t, onChange: o, name: n, responsive: l = !0 }) => {
|
|
1566
|
+
const [r, s] = M(!1), i = Object.values(t ?? {}).every((h) => (h ?? 0) === 0), a = Object.values(t ?? {}).every((h) => (h ?? 0) === I), d = !i && !a, g = (h) => {
|
|
1567
|
+
const C = isNaN(h.target.valueAsNumber) ? void 0 : h.target.valueAsNumber;
|
|
1568
|
+
o?.({
|
|
1569
|
+
...t,
|
|
1570
|
+
[h.target.name]: C
|
|
1571
|
+
});
|
|
1572
|
+
}, m = (h) => {
|
|
1573
|
+
o?.({
|
|
1574
|
+
borderBottomLeftRadius: void 0,
|
|
1575
|
+
borderBottomRightRadius: void 0,
|
|
1576
|
+
borderTopLeftRadius: void 0,
|
|
1577
|
+
borderTopRightRadius: void 0,
|
|
1578
|
+
...JSON.parse(h.currentTarget.value)
|
|
1579
|
+
});
|
|
1580
|
+
};
|
|
1581
|
+
return /* @__PURE__ */ e(x, { name: n ?? "Corner", responsive: l, children: /* @__PURE__ */ p(E, { open: r, onOpenChange: s, placement: "right", children: [
|
|
1582
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ p(
|
|
1583
|
+
"div",
|
|
1584
|
+
{
|
|
1585
|
+
css: [
|
|
1586
|
+
{
|
|
1587
|
+
display: "flex",
|
|
1588
|
+
paddingInline: 8,
|
|
1589
|
+
alignItems: "center",
|
|
1590
|
+
gap: 8,
|
|
1591
|
+
borderRadius: 8,
|
|
1592
|
+
height: 32,
|
|
1593
|
+
width: "50%",
|
|
1594
|
+
backgroundColor: u.palette.white["1s"],
|
|
1595
|
+
cursor: "pointer"
|
|
1596
|
+
},
|
|
1597
|
+
r && { backgroundColor: u.palette.black["7s"] }
|
|
1598
|
+
],
|
|
1599
|
+
children: [
|
|
1600
|
+
/* @__PURE__ */ p(
|
|
1601
|
+
"span",
|
|
1602
|
+
{
|
|
1603
|
+
css: {
|
|
1604
|
+
overflow: "hidden",
|
|
1605
|
+
textOverflow: "ellipsis",
|
|
1606
|
+
whiteSpace: "nowrap",
|
|
1607
|
+
flex: 1,
|
|
1608
|
+
...u.text.xs
|
|
1609
|
+
},
|
|
1610
|
+
children: [
|
|
1611
|
+
a && /* @__PURE__ */ e(O, { children: "Full" }),
|
|
1612
|
+
d && /* @__PURE__ */ e(O, { children: [
|
|
1613
|
+
t?.borderTopLeftRadius ?? "-",
|
|
1614
|
+
t?.borderTopRightRadius ?? "-",
|
|
1615
|
+
t?.borderBottomLeftRadius ?? "-",
|
|
1616
|
+
t?.borderBottomRightRadius ?? "-"
|
|
1617
|
+
].join(", ") }),
|
|
1618
|
+
i && /* @__PURE__ */ e(O, { children: "None" })
|
|
1619
|
+
]
|
|
1620
|
+
}
|
|
1621
|
+
),
|
|
1622
|
+
/* @__PURE__ */ e(
|
|
1623
|
+
w,
|
|
1624
|
+
{
|
|
1625
|
+
css: [{ transition: "transform" }, r && { transform: "rotate(-180deg)" }],
|
|
1626
|
+
source: J
|
|
1627
|
+
}
|
|
1628
|
+
)
|
|
1629
|
+
]
|
|
1630
|
+
}
|
|
1631
|
+
) }),
|
|
1632
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ p("div", { children: [
|
|
1633
|
+
/* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 }, children: [
|
|
1634
|
+
/* @__PURE__ */ e("span", { css: { fontWeight: 500 }, children: "Corner" }),
|
|
1635
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(w, { source: B }) }) })
|
|
1636
|
+
] }),
|
|
1637
|
+
/* @__PURE__ */ e("hr", { css: { marginBlock: 8, borderColor: u.palette.white["1s"] } }),
|
|
1638
|
+
/* @__PURE__ */ p("div", { style: { maxWidth: 256 }, css: { display: "flex", gap: 8 }, children: [
|
|
1639
|
+
/* @__PURE__ */ p(
|
|
1640
|
+
"div",
|
|
1641
|
+
{
|
|
1642
|
+
css: {
|
|
1643
|
+
display: "grid",
|
|
1644
|
+
padding: 16,
|
|
1645
|
+
position: "relative",
|
|
1646
|
+
columnGap: 16,
|
|
1647
|
+
rowGap: 4,
|
|
1648
|
+
borderRadius: 8,
|
|
1649
|
+
backgroundColor: u.palette.white["1s"],
|
|
1650
|
+
gridTemplateColumns: "repeat(12, minmax(0, 1fr))",
|
|
1651
|
+
flex: 1
|
|
1652
|
+
},
|
|
1653
|
+
children: [
|
|
1654
|
+
/* @__PURE__ */ e(
|
|
1655
|
+
w,
|
|
1656
|
+
{
|
|
1657
|
+
css: { position: "absolute", top: 4, left: 4, rotate: "90deg" },
|
|
1658
|
+
size: 16,
|
|
1659
|
+
source: W
|
|
1660
|
+
}
|
|
1661
|
+
),
|
|
1662
|
+
/* @__PURE__ */ e(
|
|
1663
|
+
w,
|
|
1664
|
+
{
|
|
1665
|
+
css: { position: "absolute", top: 4, right: 4, transform: "rotate(180deg)" },
|
|
1666
|
+
size: 16,
|
|
1667
|
+
source: W
|
|
1668
|
+
}
|
|
1669
|
+
),
|
|
1670
|
+
/* @__PURE__ */ e(
|
|
1671
|
+
w,
|
|
1672
|
+
{
|
|
1673
|
+
css: { position: "absolute", bottom: 4, right: 4, transform: "rotate(-90deg)" },
|
|
1674
|
+
size: 16,
|
|
1675
|
+
source: W
|
|
1676
|
+
}
|
|
1677
|
+
),
|
|
1678
|
+
/* @__PURE__ */ e(w, { css: { position: "absolute", bottom: 4, left: 4 }, size: 16, source: W }),
|
|
1679
|
+
/* @__PURE__ */ e("div", { css: { gridColumn: "span 6" }, children: /* @__PURE__ */ e(
|
|
1680
|
+
L,
|
|
1681
|
+
{
|
|
1682
|
+
onChange: g,
|
|
1683
|
+
selectOnFocus: !0,
|
|
1684
|
+
name: "borderTopLeftRadius",
|
|
1685
|
+
mode: "onBlur",
|
|
1686
|
+
max: I,
|
|
1687
|
+
css: { textAlign: "center" },
|
|
1688
|
+
value: t?.borderTopLeftRadius ?? 0
|
|
1689
|
+
}
|
|
1690
|
+
) }),
|
|
1691
|
+
/* @__PURE__ */ e("div", { css: { gridColumn: "span 6" }, children: /* @__PURE__ */ e(
|
|
1692
|
+
L,
|
|
1693
|
+
{
|
|
1694
|
+
onChange: g,
|
|
1695
|
+
name: "borderTopRightRadius",
|
|
1696
|
+
selectOnFocus: !0,
|
|
1697
|
+
mode: "onBlur",
|
|
1698
|
+
max: I,
|
|
1699
|
+
css: { textAlign: "center" },
|
|
1700
|
+
value: t?.borderTopRightRadius ?? 0
|
|
1701
|
+
}
|
|
1702
|
+
) }),
|
|
1703
|
+
/* @__PURE__ */ e("div", { css: { display: "flex", padding: 4, justifyContent: "center", gridColumn: "span 12" }, children: /* @__PURE__ */ e("div", { css: { padding: 4, borderRadius: 8, backgroundColor: u.palette.black["7s"] }, children: /* @__PURE__ */ e(w, { size: 16, source: oe }) }) }),
|
|
1704
|
+
/* @__PURE__ */ e("div", { css: { gridColumn: "span 6" }, children: /* @__PURE__ */ e(
|
|
1705
|
+
L,
|
|
1706
|
+
{
|
|
1707
|
+
onChange: g,
|
|
1708
|
+
name: "borderBottomLeftRadius",
|
|
1709
|
+
selectOnFocus: !0,
|
|
1710
|
+
mode: "onBlur",
|
|
1711
|
+
max: I,
|
|
1712
|
+
css: { textAlign: "center" },
|
|
1713
|
+
value: t?.borderBottomLeftRadius ?? 0
|
|
1714
|
+
}
|
|
1715
|
+
) }),
|
|
1716
|
+
/* @__PURE__ */ e("div", { css: { gridColumn: "span 6" }, children: /* @__PURE__ */ e(
|
|
1717
|
+
L,
|
|
1718
|
+
{
|
|
1719
|
+
onChange: g,
|
|
1720
|
+
name: "borderBottomRightRadius",
|
|
1721
|
+
selectOnFocus: !0,
|
|
1722
|
+
mode: "onBlur",
|
|
1723
|
+
max: I,
|
|
1724
|
+
css: { textAlign: "center" },
|
|
1725
|
+
value: t?.borderBottomRightRadius ?? 0
|
|
1726
|
+
}
|
|
1727
|
+
) })
|
|
1728
|
+
]
|
|
1729
|
+
}
|
|
1730
|
+
),
|
|
1731
|
+
/* @__PURE__ */ p("div", { css: { display: "flex", flexDirection: "column", justifyContent: "space-between" }, children: [
|
|
1732
|
+
/* @__PURE__ */ e(
|
|
1733
|
+
b,
|
|
1734
|
+
{
|
|
1735
|
+
onClick: m,
|
|
1736
|
+
disabled: i,
|
|
1737
|
+
value: JSON.stringify({}),
|
|
1738
|
+
children: /* @__PURE__ */ e(
|
|
1739
|
+
w,
|
|
1740
|
+
{
|
|
1741
|
+
css: [{ color: u.palette.white["3s"] }, i && { color: u.palette.white["6s"] }],
|
|
1742
|
+
source: zt
|
|
1743
|
+
}
|
|
1744
|
+
)
|
|
1745
|
+
}
|
|
1746
|
+
),
|
|
1747
|
+
/* @__PURE__ */ e(
|
|
1748
|
+
b,
|
|
1749
|
+
{
|
|
1750
|
+
onClick: m,
|
|
1751
|
+
disabled: d,
|
|
1752
|
+
value: JSON.stringify({
|
|
1753
|
+
borderBottomLeftRadius: 8,
|
|
1754
|
+
borderBottomRightRadius: 8,
|
|
1755
|
+
borderTopLeftRadius: 8,
|
|
1756
|
+
borderTopRightRadius: 8
|
|
1757
|
+
}),
|
|
1758
|
+
children: /* @__PURE__ */ e(
|
|
1759
|
+
w,
|
|
1760
|
+
{
|
|
1761
|
+
css: [
|
|
1762
|
+
{ color: u.palette.white["3s"] },
|
|
1763
|
+
d && { color: u.palette.white["6s"] }
|
|
1764
|
+
],
|
|
1765
|
+
source: Ot
|
|
1766
|
+
}
|
|
1767
|
+
)
|
|
1768
|
+
}
|
|
1769
|
+
),
|
|
1770
|
+
/* @__PURE__ */ e(
|
|
1771
|
+
b,
|
|
1772
|
+
{
|
|
1773
|
+
onClick: m,
|
|
1774
|
+
disabled: a,
|
|
1775
|
+
value: JSON.stringify({
|
|
1776
|
+
borderBottomLeftRadius: I,
|
|
1777
|
+
borderBottomRightRadius: I,
|
|
1778
|
+
borderTopLeftRadius: I,
|
|
1779
|
+
borderTopRightRadius: I
|
|
1780
|
+
}),
|
|
1781
|
+
children: /* @__PURE__ */ e(
|
|
1782
|
+
w,
|
|
1783
|
+
{
|
|
1784
|
+
css: [{ color: u.palette.white["3s"] }, a && { color: u.palette.white["6s"] }],
|
|
1785
|
+
source: Wt
|
|
1786
|
+
}
|
|
1787
|
+
)
|
|
1788
|
+
}
|
|
1789
|
+
)
|
|
1790
|
+
] })
|
|
1791
|
+
] })
|
|
1792
|
+
] }) })
|
|
1793
|
+
] }) });
|
|
1794
|
+
}, Pt = [
|
|
1795
|
+
{
|
|
1796
|
+
value: "6xl",
|
|
1797
|
+
label: "Heading 1"
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
value: "5xl",
|
|
1801
|
+
label: "Heading 2"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
value: "4xl",
|
|
1805
|
+
label: "Heading 3"
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
value: "3xl",
|
|
1809
|
+
label: "Heading 4"
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
value: "2xl",
|
|
1813
|
+
label: "Heading 5"
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
value: "xl",
|
|
1817
|
+
label: "Heading 6"
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
value: "lg",
|
|
1821
|
+
label: "Large"
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
value: "base",
|
|
1825
|
+
label: "Base"
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
value: "sm",
|
|
1829
|
+
label: "Small"
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
value: "xs",
|
|
1833
|
+
label: "Extra Small"
|
|
1834
|
+
},
|
|
1835
|
+
{
|
|
1836
|
+
value: "auto",
|
|
1837
|
+
label: "Auto"
|
|
1838
|
+
}
|
|
1839
|
+
], Ao = ({ value: t, onChange: o, responsive: n = !0 }) => /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e(x, { responsive: n, name: "Variant", children: /* @__PURE__ */ e(
|
|
1840
|
+
j,
|
|
1841
|
+
{
|
|
1842
|
+
placement: "bottom-end",
|
|
1843
|
+
onChange: (r) => {
|
|
1844
|
+
o?.(r === "auto" ? void 0 : r);
|
|
1845
|
+
},
|
|
1846
|
+
css: {
|
|
1847
|
+
width: "50%"
|
|
1848
|
+
},
|
|
1849
|
+
listProps: {
|
|
1850
|
+
style: {
|
|
1851
|
+
height: "auto"
|
|
1852
|
+
}
|
|
1853
|
+
},
|
|
1854
|
+
value: t ?? "auto",
|
|
1855
|
+
options: Pt
|
|
1856
|
+
}
|
|
1857
|
+
) }) }), Ft = [
|
|
1858
|
+
{
|
|
1859
|
+
label: "Extra light",
|
|
1860
|
+
value: 200
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
label: "Light",
|
|
1864
|
+
value: 300
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
label: "Normal",
|
|
1868
|
+
value: 400
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
label: "Medium",
|
|
1872
|
+
value: 500
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
label: "Semi bold",
|
|
1876
|
+
value: 600
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
label: "Bold",
|
|
1880
|
+
value: 700
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
label: "Extra bold",
|
|
1884
|
+
value: 800
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
label: "Auto",
|
|
1888
|
+
value: "auto"
|
|
1889
|
+
}
|
|
1890
|
+
], Zo = ({ value: t, responsive: o, name: n, onChange: l }) => /* @__PURE__ */ e(x, { responsive: o, name: n ?? "Font weight", children: /* @__PURE__ */ e(
|
|
1891
|
+
j,
|
|
1892
|
+
{
|
|
1893
|
+
onChange: (s) => {
|
|
1894
|
+
l?.({
|
|
1895
|
+
fontWeight: s === "auto" ? void 0 : s
|
|
1896
|
+
});
|
|
1897
|
+
},
|
|
1898
|
+
value: t?.fontWeight ?? "auto",
|
|
1899
|
+
options: Ft,
|
|
1900
|
+
css: {
|
|
1901
|
+
width: "50%"
|
|
1902
|
+
},
|
|
1903
|
+
listProps: {
|
|
1904
|
+
style: {
|
|
1905
|
+
height: "auto"
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
) }), So = ({ value: t, name: o, onChange: n, availableTags: l }) => {
|
|
1910
|
+
const r = l.map((s) => ({
|
|
1911
|
+
value: s,
|
|
1912
|
+
label: s
|
|
1913
|
+
}));
|
|
1914
|
+
return /* @__PURE__ */ e(x, { name: o ?? "HTML tag", children: /* @__PURE__ */ e(
|
|
1915
|
+
j,
|
|
1916
|
+
{
|
|
1917
|
+
onChange: n,
|
|
1918
|
+
value: t ?? null,
|
|
1919
|
+
options: r,
|
|
1920
|
+
css: {
|
|
1921
|
+
width: "50%"
|
|
1922
|
+
},
|
|
1923
|
+
listProps: {
|
|
1924
|
+
style: {
|
|
1925
|
+
height: "auto"
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
) });
|
|
1930
|
+
}, Dt = ["cover", "contain"], jo = ({ name: t, responsive: o = !1, value: n, onChange: l }) => {
|
|
1931
|
+
const r = (s) => {
|
|
1932
|
+
l?.({
|
|
1933
|
+
objectFit: s.currentTarget.value
|
|
1934
|
+
});
|
|
1935
|
+
};
|
|
1936
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Image scale", children: /* @__PURE__ */ e("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: Dt.map((s) => {
|
|
1937
|
+
const i = n?.objectFit === s;
|
|
1938
|
+
return /* @__PURE__ */ e(
|
|
1939
|
+
"button",
|
|
1940
|
+
{
|
|
1941
|
+
onClick: r,
|
|
1942
|
+
value: s,
|
|
1943
|
+
css: [
|
|
1944
|
+
{
|
|
1945
|
+
padding: 6,
|
|
1946
|
+
borderRadius: 4,
|
|
1947
|
+
borderWidth: 1,
|
|
1948
|
+
borderStyle: "solid",
|
|
1949
|
+
borderColor: u.palette.white["2s"]
|
|
1950
|
+
},
|
|
1951
|
+
{ color: u.palette.white["4s"] },
|
|
1952
|
+
i && { color: u.palette.white["6s"], borderColor: u.palette.white["5s"] }
|
|
1953
|
+
],
|
|
1954
|
+
children: /* @__PURE__ */ p(
|
|
1955
|
+
"div",
|
|
1956
|
+
{
|
|
1957
|
+
css: {
|
|
1958
|
+
position: "relative",
|
|
1959
|
+
display: "flex",
|
|
1960
|
+
borderRadius: 4,
|
|
1961
|
+
overflow: "hidden",
|
|
1962
|
+
justifyContent: "center",
|
|
1963
|
+
alignItems: "center",
|
|
1964
|
+
height: 32,
|
|
1965
|
+
width: 48
|
|
1966
|
+
},
|
|
1967
|
+
children: [
|
|
1968
|
+
/* @__PURE__ */ e(
|
|
1969
|
+
"div",
|
|
1970
|
+
{
|
|
1971
|
+
css: [
|
|
1972
|
+
{
|
|
1973
|
+
display: "flex",
|
|
1974
|
+
alignItems: "center",
|
|
1975
|
+
justifyContent: "center",
|
|
1976
|
+
backgroundColor: u.palette.white["1s"]
|
|
1977
|
+
},
|
|
1978
|
+
s === "fill" && { borderRadius: 2 },
|
|
1979
|
+
s === "contain" && { width: 32, height: 32 },
|
|
1980
|
+
s === "cover" && { width: "100%", height: "100%" },
|
|
1981
|
+
s === "fill" && { width: 24, height: 24 }
|
|
1982
|
+
],
|
|
1983
|
+
children: /* @__PURE__ */ e(w, { source: ke })
|
|
1984
|
+
}
|
|
1985
|
+
),
|
|
1986
|
+
/* @__PURE__ */ e(
|
|
1987
|
+
"div",
|
|
1988
|
+
{
|
|
1989
|
+
css: [
|
|
1990
|
+
{
|
|
1991
|
+
position: "absolute",
|
|
1992
|
+
inset: 0,
|
|
1993
|
+
borderRadius: 4,
|
|
1994
|
+
pointerEvents: "none",
|
|
1995
|
+
borderWidth: 1,
|
|
1996
|
+
borderStyle: "solid",
|
|
1997
|
+
borderColor: u.palette.white["1s"]
|
|
1998
|
+
},
|
|
1999
|
+
i && { borderColor: u.palette.white["2s"] }
|
|
2000
|
+
]
|
|
2001
|
+
}
|
|
2002
|
+
)
|
|
2003
|
+
]
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
2006
|
+
},
|
|
2007
|
+
s
|
|
2008
|
+
);
|
|
2009
|
+
}) }) });
|
|
2010
|
+
}, Le = ({
|
|
2011
|
+
name: t,
|
|
2012
|
+
responsive: o,
|
|
2013
|
+
onChange: n,
|
|
2014
|
+
value: l,
|
|
2015
|
+
min: r = 0,
|
|
2016
|
+
max: s = Number.MAX_SAFE_INTEGER,
|
|
2017
|
+
adjustment: i
|
|
2018
|
+
}) => {
|
|
2019
|
+
const a = Q(l) ? Number(l) : l, d = i?.minimumUnit ?? 1, g = i?.fallback ?? 0, m = (c) => {
|
|
2020
|
+
const v = isNaN(c.target.valueAsNumber) ? void 0 : c.target.valueAsNumber;
|
|
2021
|
+
n?.(v);
|
|
2022
|
+
}, h = (c) => {
|
|
2023
|
+
c.stopPropagation(), n?.(Math.min((a ?? g) + d, s));
|
|
2024
|
+
}, C = (c) => {
|
|
2025
|
+
c.stopPropagation(), n?.(Math.max((a ?? g) - d, r));
|
|
2026
|
+
};
|
|
2027
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t, children: /* @__PURE__ */ e("div", { css: { width: "50%" }, children: /* @__PURE__ */ e(
|
|
2028
|
+
L,
|
|
2029
|
+
{
|
|
2030
|
+
onChange: m,
|
|
2031
|
+
mode: "onBlur",
|
|
2032
|
+
css: { textAlign: "center" },
|
|
2033
|
+
value: l ?? "",
|
|
2034
|
+
prefix: /* @__PURE__ */ e(b, { disabled: ge(l) && l <= r, onClick: C, children: /* @__PURE__ */ e(w, { source: We }) }),
|
|
2035
|
+
suffix: /* @__PURE__ */ e(b, { onClick: h, children: /* @__PURE__ */ e(w, { source: ce }) })
|
|
2036
|
+
}
|
|
2037
|
+
) }) });
|
|
2038
|
+
}, No = ({ name: t, responsive: o = !0, value: n, onChange: l }) => {
|
|
2039
|
+
const r = (s) => {
|
|
2040
|
+
l?.({
|
|
2041
|
+
...n,
|
|
2042
|
+
columnGap: s
|
|
2043
|
+
});
|
|
2044
|
+
};
|
|
2045
|
+
return /* @__PURE__ */ e(
|
|
2046
|
+
Le,
|
|
2047
|
+
{
|
|
2048
|
+
name: t ?? "Column gap",
|
|
2049
|
+
adjustment: {
|
|
2050
|
+
minimumUnit: 2
|
|
2051
|
+
},
|
|
2052
|
+
responsive: o,
|
|
2053
|
+
value: n?.columnGap,
|
|
2054
|
+
onChange: r
|
|
2055
|
+
}
|
|
2056
|
+
);
|
|
2057
|
+
}, Wo = ({ name: t, responsive: o = !0, value: n, onChange: l }) => {
|
|
2058
|
+
const r = (s) => {
|
|
2059
|
+
l?.({
|
|
2060
|
+
...n,
|
|
2061
|
+
rowGap: s
|
|
2062
|
+
});
|
|
2063
|
+
};
|
|
2064
|
+
return /* @__PURE__ */ e(
|
|
2065
|
+
Le,
|
|
2066
|
+
{
|
|
2067
|
+
adjustment: {
|
|
2068
|
+
minimumUnit: 2
|
|
2069
|
+
},
|
|
2070
|
+
name: t ?? "Row gap",
|
|
2071
|
+
responsive: o,
|
|
2072
|
+
value: n?.rowGap,
|
|
2073
|
+
onChange: r
|
|
2074
|
+
}
|
|
2075
|
+
);
|
|
2076
|
+
}, Et = ({ onChange: t }) => /* @__PURE__ */ e(
|
|
2077
|
+
Fe,
|
|
2078
|
+
{
|
|
2079
|
+
accept: {
|
|
2080
|
+
svg: [".svg"]
|
|
2081
|
+
},
|
|
2082
|
+
multiple: !1,
|
|
2083
|
+
onDrop: (n) => {
|
|
2084
|
+
const l = n.at(0);
|
|
2085
|
+
if (!l) return;
|
|
2086
|
+
const r = new FileReader();
|
|
2087
|
+
r.onload = (s) => {
|
|
2088
|
+
const i = s.target?.result;
|
|
2089
|
+
Q(i) && t?.(i);
|
|
2090
|
+
}, r.readAsText(l);
|
|
2091
|
+
},
|
|
2092
|
+
children: () => /* @__PURE__ */ p(
|
|
2093
|
+
"div",
|
|
2094
|
+
{
|
|
2095
|
+
css: {
|
|
2096
|
+
display: "flex",
|
|
2097
|
+
flexDirection: "column",
|
|
2098
|
+
alignItems: "center",
|
|
2099
|
+
justifyContent: "center",
|
|
2100
|
+
gap: 8,
|
|
2101
|
+
borderRadius: 6,
|
|
2102
|
+
aspectRatio: "16 / 9",
|
|
2103
|
+
borderWidth: 1,
|
|
2104
|
+
borderStyle: "solid",
|
|
2105
|
+
borderColor: u.palette.white["1s"],
|
|
2106
|
+
cursor: "pointer",
|
|
2107
|
+
":hover": {
|
|
2108
|
+
borderColor: u.palette.white["2s"]
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
children: [
|
|
2112
|
+
/* @__PURE__ */ e(w, { size: 40, source: xe }),
|
|
2113
|
+
/* @__PURE__ */ e(
|
|
2114
|
+
"p",
|
|
2115
|
+
{
|
|
2116
|
+
css: {
|
|
2117
|
+
...u.text.xs
|
|
2118
|
+
},
|
|
2119
|
+
children: "Upload SVG file"
|
|
2120
|
+
}
|
|
2121
|
+
)
|
|
2122
|
+
]
|
|
2123
|
+
}
|
|
2124
|
+
)
|
|
2125
|
+
}
|
|
2126
|
+
), zo = ({ source: t, onChange: o, name: n }) => /* @__PURE__ */ e(x, { name: n ?? "Choose icon", children: /* @__PURE__ */ p(E, { placement: "right-start", children: [
|
|
2127
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
2128
|
+
b,
|
|
2129
|
+
{
|
|
2130
|
+
css: {
|
|
2131
|
+
backgroundColor: u.palette.white["1s"]
|
|
2132
|
+
},
|
|
2133
|
+
size: "28",
|
|
2134
|
+
children: /* @__PURE__ */ e(w, { size: 20, source: t ?? "" })
|
|
2135
|
+
}
|
|
2136
|
+
) }),
|
|
2137
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ p("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
2138
|
+
/* @__PURE__ */ e(
|
|
2139
|
+
"h6",
|
|
2140
|
+
{
|
|
2141
|
+
css: {
|
|
2142
|
+
...u.text.sm,
|
|
2143
|
+
fontWeight: 500
|
|
2144
|
+
},
|
|
2145
|
+
children: "Choose icon"
|
|
2146
|
+
}
|
|
2147
|
+
),
|
|
2148
|
+
/* @__PURE__ */ e("div", { css: { width: 320 }, children: /* @__PURE__ */ e(Et, { onChange: o }) })
|
|
2149
|
+
] }) })
|
|
2150
|
+
] }) }), Me = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2151
|
+
<path d="M1.5 14.5C1.5 14.2239 1.72386 14 2 14L15 14C15.2761 14 15.5 14.2239 15.5 14.5C15.5 14.7761 15.2761 15 15 15L2 15C1.72386 15 1.5 14.7761 1.5 14.5Z" fill="currentColor"></path>
|
|
2152
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"></path>
|
|
2153
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"></path>
|
|
2154
|
+
</svg>`, ye = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2155
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5 8.5C14.5 8.77614 14.2921 9 14.0357 9L12.1786 9L12.1786 11C12.1786 11.8284 11.555 12.5 10.7857 12.5L9.85714 12.5C9.08789 12.5 8.46429 11.8284 8.46429 11L8.46429 9L7.53571 9L7.53571 12.5C7.53571 13.3284 6.91211 14 6.14286 14L5.21429 14C4.44503 14 3.82143 13.3284 3.82143 12.5L3.82143 9L1.96429 9C1.70787 9 1.5 8.77614 1.5 8.5C1.5 8.22386 1.70787 8 1.96429 8L3.82143 8L3.82143 4.5C3.82143 3.67157 4.44503 3 5.21429 3L6.14286 3C6.91211 3 7.53572 3.67157 7.53572 4.5L7.53571 8L8.46429 8L8.46429 6C8.46429 5.17157 9.08789 4.5 9.85714 4.5L10.7857 4.5C11.555 4.5 12.1786 5.17157 12.1786 6L12.1786 8L14.0357 8C14.2921 8 14.5 8.22386 14.5 8.5ZM4.75 12.5C4.75 12.7761 4.95787 13 5.21429 13L6.14286 13C6.39928 13 6.60714 12.7761 6.60714 12.5L6.60714 4.5C6.60714 4.22386 6.39928 4 6.14286 4L5.21429 4C4.95787 4 4.75 4.22386 4.75 4.5L4.75 12.5ZM9.39286 11L9.39286 6C9.39286 5.72386 9.60073 5.5 9.85714 5.5L10.7857 5.5C11.0421 5.5 11.25 5.72386 11.25 6L11.25 11C11.25 11.2761 11.0421 11.5 10.7857 11.5L9.85714 11.5C9.60073 11.5 9.39286 11.2761 9.39286 11Z" fill="currentColor"></path>
|
|
2156
|
+
</svg>`, P = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 1.25C10.3452 1.25 10.625 1.52982 10.625 1.875V4.375H13.125C14.1605 4.375 15 5.21447 15 6.25V7.5C15 8.53553 14.1605 9.375 13.125 9.375H10.625V10.625H15C16.0355 10.625 16.875 11.4645 16.875 12.5V13.75C16.875 14.7855 16.0355 15.625 15 15.625H10.625V18.125C10.625 18.4702 10.3452 18.75 10 18.75C9.65482 18.75 9.375 18.4702 9.375 18.125V15.625H5C3.96447 15.625 3.125 14.7855 3.125 13.75V12.5C3.125 11.4645 3.96447 10.625 5 10.625H9.375V9.375H6.875C5.83947 9.375 5 8.53553 5 7.5V6.25C5 5.21447 5.83947 4.375 6.875 4.375H9.375V1.875C9.375 1.52982 9.65482 1.25 10 1.25ZM15 14.375C15.3452 14.375 15.625 14.0952 15.625 13.75V12.5C15.625 12.1548 15.3452 11.875 15 11.875H5C4.65482 11.875 4.375 12.1548 4.375 12.5V13.75C4.375 14.0952 4.65482 14.375 5 14.375H15ZM13.125 8.125H6.875C6.52982 8.125 6.25 7.84518 6.25 7.5V6.25C6.25 5.90482 6.52982 5.625 6.875 5.625H13.125C13.4702 5.625 13.75 5.90482 13.75 6.25V7.5C13.75 7.84518 13.4702 8.125 13.125 8.125Z"></path></svg></svg>', F = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><svg width="21" height="20" viewBox="0 0 21 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M3.47852 1.25C3.82369 1.25 4.10352 1.52982 4.10352 1.875L4.10352 18.125C4.10352 18.4702 3.82369 18.75 3.47852 18.75C3.13334 18.75 2.85352 18.4702 2.85352 18.125L2.85352 1.875C2.85352 1.52982 3.13334 1.25 3.47852 1.25Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.72852 6.25C4.72852 5.21447 5.56798 4.375 6.60352 4.375H12.8535C13.889 4.375 14.7285 5.21447 14.7285 6.25V7.5C14.7285 8.53553 13.889 9.375 12.8535 9.375H6.60352C5.56798 9.375 4.72852 8.53553 4.72852 7.5V6.25ZM6.60352 5.625C6.25834 5.625 5.97852 5.90482 5.97852 6.25V7.5C5.97852 7.84518 6.25834 8.125 6.60352 8.125H12.8535C13.1987 8.125 13.4785 7.84518 13.4785 7.5V6.25C13.4785 5.90482 13.1987 5.625 12.8535 5.625H6.60352Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.60352 10.625C5.56798 10.625 4.72852 11.4645 4.72852 12.5V13.75C4.72852 14.7855 5.56798 15.625 6.60352 15.625H16.6035C17.639 15.625 18.4785 14.7855 18.4785 13.75V12.5C18.4785 11.4645 17.639 10.625 16.6035 10.625H6.60352ZM5.97852 12.5C5.97852 12.1548 6.25834 11.875 6.60352 11.875H16.6035C16.9487 11.875 17.2285 12.1548 17.2285 12.5V13.75C17.2285 14.0952 16.9487 14.375 16.6035 14.375H6.60352C6.25834 14.375 5.97852 14.0952 5.97852 13.75V12.5Z"></path></svg></svg>', D = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><svg width="21" height="20" viewBox="0 0 21 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M17.5195 18.75C17.8647 18.75 18.1445 18.4702 18.1445 18.125V1.875C18.1445 1.52982 17.8647 1.25 17.5195 1.25C17.1744 1.25 16.8945 1.52982 16.8945 1.875V18.125C16.8945 18.4702 17.1744 18.75 17.5195 18.75Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.26953 7.5C6.26953 8.53553 7.109 9.375 8.14453 9.375H14.3945C15.4301 9.375 16.2695 8.53553 16.2695 7.5V6.25C16.2695 5.21447 15.4301 4.375 14.3945 4.375H8.14453C7.109 4.375 6.26953 5.21447 6.26953 6.25V7.5ZM8.14453 8.125C7.79935 8.125 7.51953 7.84518 7.51953 7.5V6.25C7.51953 5.90482 7.79935 5.625 8.14453 5.625H14.3945C14.7397 5.625 15.0195 5.90482 15.0195 6.25V7.5C15.0195 7.84518 14.7397 8.125 14.3945 8.125H8.14453Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.39453 15.625C3.359 15.625 2.51953 14.7855 2.51953 13.75V12.5C2.51953 11.4645 3.359 10.625 4.39453 10.625H14.3945C15.4301 10.625 16.2695 11.4645 16.2695 12.5V13.75C16.2695 14.7855 15.4301 15.625 14.3945 15.625H4.39453ZM3.76953 13.75C3.76953 14.0952 4.04935 14.375 4.39453 14.375H14.3945C14.7397 14.375 15.0195 14.0952 15.0195 13.75V12.5C15.0195 12.1548 14.7397 11.875 14.3945 11.875H4.39453C4.04935 11.875 3.76953 12.1548 3.76953 12.5V13.75Z"></path></svg></svg>', ne = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2157
|
+
<path d="M18.8071 1.84668C18.8071 1.5015 18.5273 1.22168 18.1821 1.22168C17.837 1.22168 17.5571 1.5015 17.5571 1.84668L17.5571 18.0976C17.5571 18.4428 17.8369 18.7226 18.1821 18.7226C18.5273 18.7226 18.8071 18.4428 18.8071 18.0976L18.8071 1.84668Z" fill="currentColor"></path>
|
|
2158
|
+
<path d="M2.50708 1.9021C2.50708 1.55692 2.22726 1.2771 1.88208 1.2771C1.5369 1.2771 1.25708 1.55692 1.25708 1.9021L1.25708 18.153C1.25708 18.4982 1.5369 18.778 1.88208 18.778C2.22726 18.778 2.50708 18.4982 2.50708 18.153L2.50708 1.9021Z" fill="currentColor"></path>
|
|
2159
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.657 2.84277C14.6925 2.84277 15.532 3.68224 15.532 4.71777L15.532 15.2178C15.532 16.2533 14.6925 17.0928 13.657 17.0928L13.157 17.0928C12.1214 17.0928 11.282 16.2533 11.282 15.2178L11.282 4.71777C11.282 3.68224 12.1214 2.84277 13.157 2.84277L13.657 2.84277ZM14.282 4.71777C14.282 4.3726 14.0022 4.09277 13.657 4.09277L13.157 4.09277C12.8118 4.09277 12.532 4.3726 12.532 4.71777L12.532 15.2178C12.532 15.563 12.8118 15.8428 13.157 15.8428L13.657 15.8428C14.0022 15.8428 14.282 15.563 14.282 15.2178L14.282 4.71777Z" fill="currentColor"></path>
|
|
2160
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.78198 4.71777C8.78198 3.68224 7.94252 2.84277 6.90698 2.84277L6.40698 2.84277C5.37145 2.84277 4.53198 3.68224 4.53198 4.71777L4.53198 15.2178C4.53198 16.2533 5.37145 17.0928 6.40698 17.0928L6.90698 17.0928C7.94252 17.0928 8.78198 16.2533 8.78198 15.2178L8.78198 4.71777ZM6.90698 4.09277C7.25216 4.09277 7.53198 4.3726 7.53198 4.71777L7.53198 15.2178C7.53198 15.563 7.25216 15.8428 6.90698 15.8428L6.40698 15.8428C6.0618 15.8428 5.78198 15.563 5.78198 15.2178L5.78198 4.71777C5.78198 4.37259 6.0618 4.09277 6.40698 4.09277L6.90698 4.09277Z" fill="currentColor"></path>
|
|
2161
|
+
</svg>`, re = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2162
|
+
<path d="M2.00293 14.498L15.0037 14.498" stroke="currentColor" stroke-linecap="round"></path>
|
|
2163
|
+
<path d="M2.00293 1.49805L15.0037 1.49805" stroke="currentColor" stroke-linecap="round"></path>
|
|
2164
|
+
<rect x="2.5" y="6" width="3" height="12" rx="1" transform="rotate(-90 2.5 6)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></rect>
|
|
2165
|
+
<rect x="2.5" y="13" width="3" height="12" rx="1" transform="rotate(-90 2.5 13)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></rect>
|
|
2166
|
+
</svg>`, Ie = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2167
|
+
<path d="M15.5 2.25C15.5 2.52614 15.2761 2.75 15 2.75L2 2.75C1.72386 2.75 1.5 2.52614 1.5 2.25C1.5 1.97386 1.72386 1.75 2 1.75L15 1.75C15.2761 1.75 15.5 1.97386 15.5 2.25Z" fill="currentColor"></path>
|
|
2168
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 3.25C12.3284 3.25 13 3.92157 13 4.75L13 9.75C13 10.5784 12.3284 11.25 11.5 11.25L10.5 11.25C9.67157 11.25 9 10.5784 9 9.75L9 4.75C9 3.92157 9.67157 3.25 10.5 3.25L11.5 3.25ZM12 4.75C12 4.47386 11.7761 4.25 11.5 4.25L10.5 4.25C10.2239 4.25 10 4.47386 10 4.75L10 9.75C10 10.0261 10.2239 10.25 10.5 10.25L11.5 10.25C11.7761 10.25 12 10.0261 12 9.75L12 4.75Z" fill="currentColor"></path>
|
|
2169
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 4.75C8 3.92157 7.32843 3.25 6.5 3.25L5.5 3.25C4.67157 3.25 4 3.92157 4 4.75L4 12.75C4 13.5784 4.67157 14.25 5.5 14.25L6.5 14.25C7.32843 14.25 8 13.5784 8 12.75L8 4.75ZM6.5 4.25C6.77614 4.25 7 4.47386 7 4.75L7 12.75C7 13.0261 6.77614 13.25 6.5 13.25L5.5 13.25C5.22386 13.25 5 13.0261 5 12.75L5 4.75C5 4.47386 5.22386 4.25 5.5 4.25L6.5 4.25Z" fill="currentColor"></path>
|
|
2170
|
+
</svg>`, Oo = ({
|
|
2171
|
+
name: t,
|
|
2172
|
+
responsive: o = !0,
|
|
2173
|
+
value: n,
|
|
2174
|
+
onChange: l,
|
|
2175
|
+
blacklist: r,
|
|
2176
|
+
flexDirection: s = "row"
|
|
2177
|
+
}) => {
|
|
2178
|
+
const i = (() => {
|
|
2179
|
+
let d = [];
|
|
2180
|
+
switch (s) {
|
|
2181
|
+
case "row":
|
|
2182
|
+
d = [
|
|
2183
|
+
{
|
|
2184
|
+
label: "Top",
|
|
2185
|
+
value: "flex-start",
|
|
2186
|
+
icon: Ie
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
label: "Center",
|
|
2190
|
+
value: "center",
|
|
2191
|
+
icon: ye
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
label: "Bottom",
|
|
2195
|
+
value: "flex-end",
|
|
2196
|
+
icon: Me
|
|
2197
|
+
},
|
|
2198
|
+
{
|
|
2199
|
+
label: "Stretch",
|
|
2200
|
+
value: "stretch",
|
|
2201
|
+
icon: re
|
|
2202
|
+
}
|
|
2203
|
+
];
|
|
2204
|
+
break;
|
|
2205
|
+
case "column":
|
|
2206
|
+
d = [
|
|
2207
|
+
{
|
|
2208
|
+
label: "Left",
|
|
2209
|
+
value: "flex-start",
|
|
2210
|
+
icon: F
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
label: "Center",
|
|
2214
|
+
value: "center",
|
|
2215
|
+
icon: P
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
label: "Right",
|
|
2219
|
+
value: "flex-end",
|
|
2220
|
+
icon: D
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
label: "Stretch",
|
|
2224
|
+
value: "stretch",
|
|
2225
|
+
icon: ne
|
|
2226
|
+
}
|
|
2227
|
+
];
|
|
2228
|
+
break;
|
|
2229
|
+
}
|
|
2230
|
+
return r?.length && (d = d.filter((g) => !r.includes(g.value))), d;
|
|
2231
|
+
})(), a = (d) => {
|
|
2232
|
+
l?.({
|
|
2233
|
+
alignItems: d
|
|
2234
|
+
});
|
|
2235
|
+
};
|
|
2236
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Align items", children: /* @__PURE__ */ e(H, { value: n?.alignItems, onSelectionChange: a, children: i.map((d) => /* @__PURE__ */ e(b, { value: d.value, children: /* @__PURE__ */ e(w, { source: d.icon }) }, d.value)) }) });
|
|
2237
|
+
}, Po = ({
|
|
2238
|
+
name: t,
|
|
2239
|
+
responsive: o = !0,
|
|
2240
|
+
value: n,
|
|
2241
|
+
onChange: l,
|
|
2242
|
+
direction: r = "row"
|
|
2243
|
+
}) => {
|
|
2244
|
+
const s = (() => {
|
|
2245
|
+
switch (r) {
|
|
2246
|
+
case "row":
|
|
2247
|
+
return [
|
|
2248
|
+
{
|
|
2249
|
+
label: "Top",
|
|
2250
|
+
value: "flex-start",
|
|
2251
|
+
icon: F
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
label: "Center",
|
|
2255
|
+
value: "center",
|
|
2256
|
+
icon: P
|
|
2257
|
+
},
|
|
2258
|
+
{
|
|
2259
|
+
label: "Bottom",
|
|
2260
|
+
value: "flex-end",
|
|
2261
|
+
icon: D
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
label: "Space between",
|
|
2265
|
+
value: "space-between",
|
|
2266
|
+
icon: ne
|
|
2267
|
+
}
|
|
2268
|
+
];
|
|
2269
|
+
case "column":
|
|
2270
|
+
return [
|
|
2271
|
+
{
|
|
2272
|
+
label: "Left",
|
|
2273
|
+
value: "flex-start",
|
|
2274
|
+
icon: F
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
label: "Center",
|
|
2278
|
+
value: "center",
|
|
2279
|
+
icon: P
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
label: "Right",
|
|
2283
|
+
value: "flex-end",
|
|
2284
|
+
icon: D
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
label: "Space between",
|
|
2288
|
+
value: "space-between",
|
|
2289
|
+
icon: re
|
|
2290
|
+
}
|
|
2291
|
+
];
|
|
2292
|
+
default:
|
|
2293
|
+
return [];
|
|
2294
|
+
}
|
|
2295
|
+
})(), i = (a) => {
|
|
2296
|
+
l?.({
|
|
2297
|
+
justifyContent: a
|
|
2298
|
+
});
|
|
2299
|
+
};
|
|
2300
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Justify content", children: /* @__PURE__ */ e(H, { value: n?.justifyContent, onSelectionChange: i, children: s.map((a) => /* @__PURE__ */ e(b, { value: a.value, children: /* @__PURE__ */ e(w, { source: a.icon }) }, a.value)) }) });
|
|
2301
|
+
}, Ut = (t) => {
|
|
2302
|
+
const { main: o } = Se(t.value);
|
|
2303
|
+
return /* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", gap: 8, justifyContent: "space-between" }, children: [
|
|
2304
|
+
t.label,
|
|
2305
|
+
/* @__PURE__ */ e(
|
|
2306
|
+
"div",
|
|
2307
|
+
{
|
|
2308
|
+
css: { borderRadius: 9999, width: 16, height: 16 },
|
|
2309
|
+
style: {
|
|
2310
|
+
backgroundColor: o
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
)
|
|
2314
|
+
] });
|
|
2315
|
+
}, Fo = (t) => /* @__PURE__ */ e(x, { name: "Color", children: /* @__PURE__ */ e(
|
|
2316
|
+
j,
|
|
2317
|
+
{
|
|
2318
|
+
checkedIcon: /* @__PURE__ */ e(O, {}),
|
|
2319
|
+
placement: "bottom-end",
|
|
2320
|
+
optionLabel: Ut,
|
|
2321
|
+
options: it,
|
|
2322
|
+
css: {
|
|
2323
|
+
width: "50%"
|
|
2324
|
+
},
|
|
2325
|
+
...t
|
|
2326
|
+
}
|
|
2327
|
+
) }), Do = ({
|
|
2328
|
+
value: t,
|
|
2329
|
+
options: o,
|
|
2330
|
+
onChange: n,
|
|
2331
|
+
className: l
|
|
2332
|
+
}) => {
|
|
2333
|
+
const [r, s] = M(!1), i = (v) => {
|
|
2334
|
+
s(!0);
|
|
2335
|
+
}, a = () => {
|
|
2336
|
+
setTimeout(() => {
|
|
2337
|
+
s(!1);
|
|
2338
|
+
}, 100);
|
|
2339
|
+
}, d = (v) => {
|
|
2340
|
+
n?.(v);
|
|
2341
|
+
}, g = (v) => {
|
|
2342
|
+
const k = isNaN(v.target.valueAsNumber) ? void 0 : v.target.valueAsNumber;
|
|
2343
|
+
d(k);
|
|
2344
|
+
}, m = (v) => {
|
|
2345
|
+
d(v.currentTarget.getAttribute("value"));
|
|
2346
|
+
}, h = (v) => {
|
|
2347
|
+
v.stopPropagation(), d(void 0);
|
|
2348
|
+
}, C = ge(t) ? t : void 0, c = Q(t) ? o?.find((v) => v.value === t)?.label ?? t : void 0;
|
|
2349
|
+
return /* @__PURE__ */ p("div", { css: { position: "relative" }, className: l, children: [
|
|
2350
|
+
/* @__PURE__ */ e(
|
|
2351
|
+
L,
|
|
2352
|
+
{
|
|
2353
|
+
classes: {
|
|
2354
|
+
input: "text-center"
|
|
2355
|
+
},
|
|
2356
|
+
onFocus: i,
|
|
2357
|
+
onBlur: a,
|
|
2358
|
+
mode: "onBlur",
|
|
2359
|
+
placeholder: c,
|
|
2360
|
+
value: C ?? "",
|
|
2361
|
+
onChange: g
|
|
2362
|
+
}
|
|
2363
|
+
),
|
|
2364
|
+
!!o?.length && /* @__PURE__ */ p(S, { open: r, placement: "bottom-start", children: [
|
|
2365
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e("div", { css: { position: "absolute", inset: "0 0 auto 0", top: "100%" } }) }),
|
|
2366
|
+
/* @__PURE__ */ e(A, { children: o.map((v) => {
|
|
2367
|
+
const k = v.value === t;
|
|
2368
|
+
return /* @__PURE__ */ p(
|
|
2369
|
+
Z,
|
|
2370
|
+
{
|
|
2371
|
+
css: { justifyContent: "space-between" },
|
|
2372
|
+
isActive: k,
|
|
2373
|
+
onClick: m,
|
|
2374
|
+
value: v.value,
|
|
2375
|
+
children: [
|
|
2376
|
+
v.label,
|
|
2377
|
+
k && (v.closeable ?? !1) && /* @__PURE__ */ e(b, { onClick: h, size: "20", children: /* @__PURE__ */ e(w, { size: 16, source: B }) })
|
|
2378
|
+
]
|
|
2379
|
+
},
|
|
2380
|
+
v.value
|
|
2381
|
+
);
|
|
2382
|
+
}) })
|
|
2383
|
+
] })
|
|
2384
|
+
] });
|
|
2385
|
+
}, Eo = ({ propertyPath: t }) => {
|
|
2386
|
+
const { nodeProps: o, setNodeProps: n } = tt(), l = t ? pe(o, t) : null, r = (s) => {
|
|
2387
|
+
const i = {
|
|
2388
|
+
...l,
|
|
2389
|
+
[s.target.name]: s.target.checked ? void 0 : !1
|
|
2390
|
+
};
|
|
2391
|
+
if (!t) {
|
|
2392
|
+
n({});
|
|
2393
|
+
return;
|
|
2394
|
+
}
|
|
2395
|
+
const a = {};
|
|
2396
|
+
he(a, t, i), n(a);
|
|
2397
|
+
};
|
|
2398
|
+
return /* @__PURE__ */ e("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: X.map((s) => /* @__PURE__ */ p(
|
|
2399
|
+
"div",
|
|
2400
|
+
{
|
|
2401
|
+
css: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 },
|
|
2402
|
+
children: [
|
|
2403
|
+
/* @__PURE__ */ e("p", { css: { color: u.palette.white["5s"], ...u.text.xs }, children: s.name }),
|
|
2404
|
+
/* @__PURE__ */ e(
|
|
2405
|
+
ue,
|
|
2406
|
+
{
|
|
2407
|
+
onChange: r,
|
|
2408
|
+
name: s.size,
|
|
2409
|
+
checked: l?.[s.size] ?? !0
|
|
2410
|
+
}
|
|
2411
|
+
)
|
|
2412
|
+
]
|
|
2413
|
+
},
|
|
2414
|
+
s.size
|
|
2415
|
+
)) });
|
|
2416
|
+
}, Uo = ({ name: t, responsive: o = !0, value: n, onChange: l }) => {
|
|
2417
|
+
const r = [
|
|
2418
|
+
{
|
|
2419
|
+
label: "Top",
|
|
2420
|
+
value: "start",
|
|
2421
|
+
icon: F
|
|
2422
|
+
},
|
|
2423
|
+
{
|
|
2424
|
+
label: "Center",
|
|
2425
|
+
value: "center",
|
|
2426
|
+
icon: P
|
|
2427
|
+
},
|
|
2428
|
+
{
|
|
2429
|
+
label: "Bottom",
|
|
2430
|
+
value: "end",
|
|
2431
|
+
icon: D
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
label: "Space between",
|
|
2435
|
+
value: "stretch",
|
|
2436
|
+
icon: ne
|
|
2437
|
+
}
|
|
2438
|
+
], s = (i) => {
|
|
2439
|
+
l?.({
|
|
2440
|
+
justifyItems: i === "stretch" ? void 0 : i
|
|
2441
|
+
});
|
|
2442
|
+
};
|
|
2443
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Justify items", children: /* @__PURE__ */ e(H, { value: n?.justifyItems ?? "stretch", onSelectionChange: s, children: r.map((i) => /* @__PURE__ */ e(b, { value: i.value, children: /* @__PURE__ */ e(w, { source: i.icon }) }, i.value)) }) });
|
|
2444
|
+
}, Go = ({ name: t, responsive: o = !0, value: n, onChange: l }) => {
|
|
2445
|
+
const r = [
|
|
2446
|
+
{
|
|
2447
|
+
label: "Top",
|
|
2448
|
+
value: "start",
|
|
2449
|
+
icon: Ie
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
label: "Center",
|
|
2453
|
+
value: "center",
|
|
2454
|
+
icon: ye
|
|
2455
|
+
},
|
|
2456
|
+
{
|
|
2457
|
+
label: "Bottom",
|
|
2458
|
+
value: "end",
|
|
2459
|
+
icon: Me
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
label: "Stretch",
|
|
2463
|
+
value: "stretch",
|
|
2464
|
+
icon: re
|
|
2465
|
+
}
|
|
2466
|
+
], s = (i) => {
|
|
2467
|
+
l?.({
|
|
2468
|
+
alignItems: i
|
|
2469
|
+
});
|
|
2470
|
+
};
|
|
2471
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Align items", children: /* @__PURE__ */ e(H, { value: n?.alignItems ?? "stretch", onSelectionChange: s, children: r.map((i) => /* @__PURE__ */ e(b, { value: i.value, children: /* @__PURE__ */ e(w, { source: i.icon }) }, i.value)) }) });
|
|
2472
|
+
}, Jo = ({
|
|
2473
|
+
suggestOptions: t,
|
|
2474
|
+
responsive: o = !0,
|
|
2475
|
+
name: n,
|
|
2476
|
+
value: l,
|
|
2477
|
+
onChange: r
|
|
2478
|
+
}) => {
|
|
2479
|
+
const s = [
|
|
2480
|
+
{
|
|
2481
|
+
label: "Original",
|
|
2482
|
+
value: "auto"
|
|
2483
|
+
/* Auto */
|
|
2484
|
+
},
|
|
2485
|
+
...t ?? [],
|
|
2486
|
+
{
|
|
2487
|
+
label: "Custom",
|
|
2488
|
+
value: "custom"
|
|
2489
|
+
/* Custom */
|
|
2490
|
+
}
|
|
2491
|
+
], i = R(l?.aspectRatio) ? "auto" : s.find((f) => f.value === l?.aspectRatio)?.value ?? "custom", [a, d] = M(
|
|
2492
|
+
i === "custom"
|
|
2493
|
+
/* Custom */
|
|
2494
|
+
), g = (f) => {
|
|
2495
|
+
f.target.select();
|
|
2496
|
+
}, m = (f = "auto") => {
|
|
2497
|
+
r?.({ aspectRatio: f === "auto" ? void 0 : f });
|
|
2498
|
+
}, h = (f) => {
|
|
2499
|
+
if (f === "custom") {
|
|
2500
|
+
d(!0);
|
|
2501
|
+
return;
|
|
2502
|
+
}
|
|
2503
|
+
d(!1), m(f);
|
|
2504
|
+
}, C = l?.aspectRatio?.toString().split("/") ?? [], c = le(C.at(0)), v = le(C.at(1)), k = (f) => {
|
|
2505
|
+
const y = isNaN(f.target.valueAsNumber) ? void 0 : f.target.valueAsNumber, N = {
|
|
2506
|
+
x: c ?? y,
|
|
2507
|
+
y: v ?? y,
|
|
2508
|
+
[f.target.name]: y
|
|
2509
|
+
}, He = R(N.x) || R(N.y) ? void 0 : `${N.x} / ${N.y}`;
|
|
2510
|
+
m(He);
|
|
2511
|
+
};
|
|
2512
|
+
return /* @__PURE__ */ p("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
2513
|
+
/* @__PURE__ */ e(x, { responsive: o, name: n ?? "Proportion", children: /* @__PURE__ */ e(
|
|
2514
|
+
j,
|
|
2515
|
+
{
|
|
2516
|
+
value: a ? "custom" : i,
|
|
2517
|
+
onChange: h,
|
|
2518
|
+
options: s,
|
|
2519
|
+
css: {
|
|
2520
|
+
width: "50%"
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
) }),
|
|
2524
|
+
(i === "custom" || a) && /* @__PURE__ */ e("div", { css: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ p(
|
|
2525
|
+
"div",
|
|
2526
|
+
{
|
|
2527
|
+
css: {
|
|
2528
|
+
display: "flex",
|
|
2529
|
+
paddingInline: 8,
|
|
2530
|
+
paddingBlock: "0.125rem",
|
|
2531
|
+
alignItems: "center",
|
|
2532
|
+
gap: 2,
|
|
2533
|
+
borderRadius: 8,
|
|
2534
|
+
width: "50%",
|
|
2535
|
+
backgroundColor: u.palette.white["1s"]
|
|
2536
|
+
},
|
|
2537
|
+
children: [
|
|
2538
|
+
/* @__PURE__ */ e(
|
|
2539
|
+
L,
|
|
2540
|
+
{
|
|
2541
|
+
name: "x",
|
|
2542
|
+
onFocus: g,
|
|
2543
|
+
classes: {
|
|
2544
|
+
main: "bg-transparent px-1"
|
|
2545
|
+
},
|
|
2546
|
+
size: "28",
|
|
2547
|
+
value: c,
|
|
2548
|
+
onChange: k,
|
|
2549
|
+
mode: "onBlur",
|
|
2550
|
+
placeholder: "X",
|
|
2551
|
+
css: { textAlign: "center" }
|
|
2552
|
+
}
|
|
2553
|
+
),
|
|
2554
|
+
/* @__PURE__ */ e("span", { css: { color: u.palette.white["3s"], ...u.text.xs }, children: "/" }),
|
|
2555
|
+
/* @__PURE__ */ e(
|
|
2556
|
+
L,
|
|
2557
|
+
{
|
|
2558
|
+
name: "y",
|
|
2559
|
+
placeholder: "Y",
|
|
2560
|
+
value: v,
|
|
2561
|
+
mode: "onBlur",
|
|
2562
|
+
onChange: k,
|
|
2563
|
+
onFocus: g,
|
|
2564
|
+
classes: {
|
|
2565
|
+
main: "bg-transparent px-1"
|
|
2566
|
+
},
|
|
2567
|
+
size: "28",
|
|
2568
|
+
css: { textAlign: "center" }
|
|
2569
|
+
}
|
|
2570
|
+
)
|
|
2571
|
+
]
|
|
2572
|
+
}
|
|
2573
|
+
) })
|
|
2574
|
+
] });
|
|
2575
|
+
}, _o = ({ name: t, responsive: o = !0, value: n, onChange: l }) => {
|
|
2576
|
+
const [r, s] = M(!1), i = (C) => {
|
|
2577
|
+
const c = isNaN(C.target.valueAsNumber) ? void 0 : C.target.valueAsNumber;
|
|
2578
|
+
l?.({
|
|
2579
|
+
...n,
|
|
2580
|
+
[C.target.name]: c
|
|
2581
|
+
});
|
|
2582
|
+
}, a = (C) => {
|
|
2583
|
+
C.target.select();
|
|
2584
|
+
}, d = n?.paddingTop ?? 0, g = n?.paddingLeft ?? 0, m = n?.paddingRight ?? 0, h = n?.paddingBottom ?? 0;
|
|
2585
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Padding (px)", children: /* @__PURE__ */ p(E, { open: r, onOpenChange: s, placement: "right-start", children: [
|
|
2586
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ p(
|
|
2587
|
+
"div",
|
|
2588
|
+
{
|
|
2589
|
+
css: [
|
|
2590
|
+
{
|
|
2591
|
+
display: "flex",
|
|
2592
|
+
paddingInline: 8,
|
|
2593
|
+
alignItems: "center",
|
|
2594
|
+
gap: 8,
|
|
2595
|
+
borderRadius: 8,
|
|
2596
|
+
height: 32,
|
|
2597
|
+
width: "50%",
|
|
2598
|
+
backgroundColor: u.palette.white["1s"],
|
|
2599
|
+
cursor: "pointer"
|
|
2600
|
+
},
|
|
2601
|
+
r && { backgroundColor: u.palette.black["7s"] }
|
|
2602
|
+
],
|
|
2603
|
+
children: [
|
|
2604
|
+
/* @__PURE__ */ e(
|
|
2605
|
+
"span",
|
|
2606
|
+
{
|
|
2607
|
+
css: {
|
|
2608
|
+
overflow: "hidden",
|
|
2609
|
+
textOverflow: "ellipsis",
|
|
2610
|
+
whiteSpace: "nowrap",
|
|
2611
|
+
flex: 1,
|
|
2612
|
+
...u.text.xs
|
|
2613
|
+
},
|
|
2614
|
+
children: [d, g, m, h].join(", ")
|
|
2615
|
+
}
|
|
2616
|
+
),
|
|
2617
|
+
/* @__PURE__ */ e(
|
|
2618
|
+
w,
|
|
2619
|
+
{
|
|
2620
|
+
css: [{ transition: "transform" }, r && { transform: "rotate(-180deg)" }],
|
|
2621
|
+
source: J
|
|
2622
|
+
}
|
|
2623
|
+
)
|
|
2624
|
+
]
|
|
2625
|
+
}
|
|
2626
|
+
) }),
|
|
2627
|
+
/* @__PURE__ */ p(G, { children: [
|
|
2628
|
+
/* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 }, children: [
|
|
2629
|
+
/* @__PURE__ */ e("span", { css: { fontWeight: 500 }, children: "Padding" }),
|
|
2630
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(w, { source: B }) }) })
|
|
2631
|
+
] }),
|
|
2632
|
+
/* @__PURE__ */ e("hr", { css: { marginBlock: 12, borderColor: u.palette.white["1s"] } }),
|
|
2633
|
+
/* @__PURE__ */ p("div", { css: { display: "grid", gap: 8, gridTemplateColumns: "repeat(3, minmax(0, 1fr))" }, style: { maxWidth: 256 }, children: [
|
|
2634
|
+
/* @__PURE__ */ e("div", { css: { gridColumnStart: 2 }, children: /* @__PURE__ */ e(
|
|
2635
|
+
L,
|
|
2636
|
+
{
|
|
2637
|
+
onFocus: a,
|
|
2638
|
+
onChange: i,
|
|
2639
|
+
mode: "onBlur",
|
|
2640
|
+
autoComplete: "off",
|
|
2641
|
+
name: "paddingTop",
|
|
2642
|
+
value: d,
|
|
2643
|
+
placeholder: "Top",
|
|
2644
|
+
css: { textAlign: "center" }
|
|
2645
|
+
}
|
|
2646
|
+
) }),
|
|
2647
|
+
/* @__PURE__ */ e("div", { css: { gridColumnStart: 1 }, children: /* @__PURE__ */ e(
|
|
2648
|
+
L,
|
|
2649
|
+
{
|
|
2650
|
+
onFocus: a,
|
|
2651
|
+
onChange: i,
|
|
2652
|
+
mode: "onBlur",
|
|
2653
|
+
autoComplete: "off",
|
|
2654
|
+
name: "paddingLeft",
|
|
2655
|
+
value: g,
|
|
2656
|
+
css: { textAlign: "center" },
|
|
2657
|
+
placeholder: "Left"
|
|
2658
|
+
}
|
|
2659
|
+
) }),
|
|
2660
|
+
/* @__PURE__ */ e("div", { css: { display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(w, { source: oe }) }),
|
|
2661
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
2662
|
+
L,
|
|
2663
|
+
{
|
|
2664
|
+
onFocus: a,
|
|
2665
|
+
onChange: i,
|
|
2666
|
+
mode: "onBlur",
|
|
2667
|
+
autoComplete: "off",
|
|
2668
|
+
name: "paddingRight",
|
|
2669
|
+
value: m,
|
|
2670
|
+
css: { textAlign: "center" },
|
|
2671
|
+
placeholder: "Right"
|
|
2672
|
+
}
|
|
2673
|
+
) }),
|
|
2674
|
+
/* @__PURE__ */ e("div", { css: { gridColumnStart: 2 }, children: /* @__PURE__ */ e(
|
|
2675
|
+
L,
|
|
2676
|
+
{
|
|
2677
|
+
onFocus: a,
|
|
2678
|
+
mode: "onBlur",
|
|
2679
|
+
autoComplete: "off",
|
|
2680
|
+
name: "paddingBottom",
|
|
2681
|
+
value: h,
|
|
2682
|
+
onChange: i,
|
|
2683
|
+
css: { textAlign: "center" },
|
|
2684
|
+
placeholder: "Bottom"
|
|
2685
|
+
}
|
|
2686
|
+
) })
|
|
2687
|
+
] })
|
|
2688
|
+
] })
|
|
2689
|
+
] }) });
|
|
2690
|
+
}, Xo = ({ name: t, responsive: o = !0, value: n, onChange: l }) => /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Order", children: /* @__PURE__ */ e(
|
|
2691
|
+
"div",
|
|
2692
|
+
{
|
|
2693
|
+
css: {
|
|
2694
|
+
width: "50%"
|
|
2695
|
+
},
|
|
2696
|
+
children: /* @__PURE__ */ e(
|
|
2697
|
+
L,
|
|
2698
|
+
{
|
|
2699
|
+
step: 1,
|
|
2700
|
+
onFocus: (i) => {
|
|
2701
|
+
i.target.select();
|
|
2702
|
+
},
|
|
2703
|
+
onChange: (i) => {
|
|
2704
|
+
const a = isNaN(i.target.valueAsNumber) ? void 0 : i.target.valueAsNumber;
|
|
2705
|
+
l?.({
|
|
2706
|
+
order: a ?? 0
|
|
2707
|
+
});
|
|
2708
|
+
},
|
|
2709
|
+
value: n?.order ?? 0,
|
|
2710
|
+
css: { textAlign: "center" },
|
|
2711
|
+
mode: "onBlur",
|
|
2712
|
+
size: "32",
|
|
2713
|
+
min: 0
|
|
2714
|
+
}
|
|
2715
|
+
)
|
|
2716
|
+
}
|
|
2717
|
+
) }), $ = "auto", z = ({
|
|
2718
|
+
name: t,
|
|
2719
|
+
value: o,
|
|
2720
|
+
onChange: n
|
|
2721
|
+
}) => {
|
|
2722
|
+
const [l, r] = M(!1), s = [
|
|
2723
|
+
{
|
|
2724
|
+
label: "Auto",
|
|
2725
|
+
value: $
|
|
2726
|
+
}
|
|
2727
|
+
], i = () => {
|
|
2728
|
+
setTimeout(() => {
|
|
2729
|
+
r(!1);
|
|
2730
|
+
}, 100);
|
|
2731
|
+
}, a = (h) => {
|
|
2732
|
+
r(!0), h.target.select();
|
|
2733
|
+
}, d = (h) => {
|
|
2734
|
+
const C = isNaN(h.target.valueAsNumber) ? void 0 : h.target.valueAsNumber;
|
|
2735
|
+
n?.(t, C);
|
|
2736
|
+
}, g = (h) => {
|
|
2737
|
+
n?.(t, h.currentTarget.getAttribute("value") ?? void 0);
|
|
2738
|
+
}, m = (h) => {
|
|
2739
|
+
h.stopPropagation(), n?.(t);
|
|
2740
|
+
};
|
|
2741
|
+
return /* @__PURE__ */ p("div", { css: { position: "relative" }, children: [
|
|
2742
|
+
/* @__PURE__ */ e(
|
|
2743
|
+
L,
|
|
2744
|
+
{
|
|
2745
|
+
mode: "onBlur",
|
|
2746
|
+
onFocus: a,
|
|
2747
|
+
css: { textAlign: "center" },
|
|
2748
|
+
autoComplete: "off",
|
|
2749
|
+
fullWidth: !0,
|
|
2750
|
+
placeholder: o === $ ? "Auto" : void 0,
|
|
2751
|
+
value: o ?? 0,
|
|
2752
|
+
onBlur: i,
|
|
2753
|
+
name: t,
|
|
2754
|
+
onChange: d
|
|
2755
|
+
}
|
|
2756
|
+
),
|
|
2757
|
+
/* @__PURE__ */ p(S, { open: l, placement: "bottom-start", children: [
|
|
2758
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e("div", { css: { position: "absolute", inset: "0 0 auto 0", top: "100%" } }) }),
|
|
2759
|
+
/* @__PURE__ */ e(A, { children: s.map((h) => {
|
|
2760
|
+
const C = h.value === o;
|
|
2761
|
+
return /* @__PURE__ */ p(
|
|
2762
|
+
Z,
|
|
2763
|
+
{
|
|
2764
|
+
onClick: g,
|
|
2765
|
+
css: { justifyContent: "space-between" },
|
|
2766
|
+
isActive: C,
|
|
2767
|
+
value: h.value,
|
|
2768
|
+
children: [
|
|
2769
|
+
h.label,
|
|
2770
|
+
C && /* @__PURE__ */ e(b, { size: "20", onClick: m, children: /* @__PURE__ */ e(w, { size: 16, source: B }) })
|
|
2771
|
+
]
|
|
2772
|
+
},
|
|
2773
|
+
h.value
|
|
2774
|
+
);
|
|
2775
|
+
}) })
|
|
2776
|
+
] })
|
|
2777
|
+
] });
|
|
2778
|
+
}, $o = ({ name: t, responsive: o = !0, value: n, onChange: l }) => {
|
|
2779
|
+
const [r, s] = M(!1), i = (h, C) => {
|
|
2780
|
+
l?.({
|
|
2781
|
+
...n,
|
|
2782
|
+
[h]: C
|
|
2783
|
+
});
|
|
2784
|
+
}, a = n?.marginTop ?? 0, d = n?.marginLeft ?? 0, g = n?.marginRight ?? 0, m = n?.marginBottom ?? 0;
|
|
2785
|
+
return /* @__PURE__ */ e(x, { responsive: o, name: t ?? "Margin (px)", children: /* @__PURE__ */ p(E, { open: r, onOpenChange: s, placement: "right-start", children: [
|
|
2786
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ p(
|
|
2787
|
+
"div",
|
|
2788
|
+
{
|
|
2789
|
+
css: [
|
|
2790
|
+
{
|
|
2791
|
+
display: "flex",
|
|
2792
|
+
paddingInline: 8,
|
|
2793
|
+
alignItems: "center",
|
|
2794
|
+
gap: 8,
|
|
2795
|
+
borderRadius: 8,
|
|
2796
|
+
height: 32,
|
|
2797
|
+
width: "50%",
|
|
2798
|
+
backgroundColor: u.palette.white["1s"],
|
|
2799
|
+
cursor: "pointer"
|
|
2800
|
+
},
|
|
2801
|
+
r && { backgroundColor: u.palette.black["7s"] }
|
|
2802
|
+
],
|
|
2803
|
+
children: [
|
|
2804
|
+
/* @__PURE__ */ e(
|
|
2805
|
+
"span",
|
|
2806
|
+
{
|
|
2807
|
+
css: {
|
|
2808
|
+
overflow: "hidden",
|
|
2809
|
+
textOverflow: "ellipsis",
|
|
2810
|
+
whiteSpace: "nowrap",
|
|
2811
|
+
flex: 1,
|
|
2812
|
+
...u.text.xs
|
|
2813
|
+
},
|
|
2814
|
+
children: [a, d, g, m].map((h) => h === $ ? "Auto" : h).join(", ")
|
|
2815
|
+
}
|
|
2816
|
+
),
|
|
2817
|
+
/* @__PURE__ */ e(
|
|
2818
|
+
w,
|
|
2819
|
+
{
|
|
2820
|
+
css: [{ transition: "transform" }, r && { transform: "rotate(-180deg)" }],
|
|
2821
|
+
source: J
|
|
2822
|
+
}
|
|
2823
|
+
)
|
|
2824
|
+
]
|
|
2825
|
+
}
|
|
2826
|
+
) }),
|
|
2827
|
+
/* @__PURE__ */ p(G, { children: [
|
|
2828
|
+
/* @__PURE__ */ p("div", { css: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 }, children: [
|
|
2829
|
+
/* @__PURE__ */ e("span", { css: { fontWeight: 500 }, children: "Margin" }),
|
|
2830
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(w, { source: B }) }) })
|
|
2831
|
+
] }),
|
|
2832
|
+
/* @__PURE__ */ e("hr", { css: { marginBlock: "0.75rem", borderColor: u.palette.white["1s"] } }),
|
|
2833
|
+
/* @__PURE__ */ p(
|
|
2834
|
+
"div",
|
|
2835
|
+
{
|
|
2836
|
+
css: { display: "grid", gap: 8, gridTemplateColumns: "repeat(3, minmax(0, 1fr))" },
|
|
2837
|
+
style: { maxWidth: 256 },
|
|
2838
|
+
children: [
|
|
2839
|
+
/* @__PURE__ */ e("div", { css: { gridColumnStart: 2 }, children: /* @__PURE__ */ e(z, { onChange: i, name: "marginTop", value: a }) }),
|
|
2840
|
+
/* @__PURE__ */ e("div", { css: { gridColumnStart: 1 }, children: /* @__PURE__ */ e(z, { onChange: i, name: "marginLeft", value: d }) }),
|
|
2841
|
+
/* @__PURE__ */ e("div", { css: { display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(w, { source: oe }) }),
|
|
2842
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(z, { onChange: i, name: "marginRight", value: g }) }),
|
|
2843
|
+
/* @__PURE__ */ e("div", { css: { gridColumnStart: 2 }, children: /* @__PURE__ */ e(z, { onChange: i, name: "marginBottom", value: m }) })
|
|
2844
|
+
]
|
|
2845
|
+
}
|
|
2846
|
+
)
|
|
2847
|
+
] })
|
|
2848
|
+
] }) });
|
|
2849
|
+
}, Yo = ({ name: t, responsive: o = !0, value: n, onChange: l }) => /* @__PURE__ */ e(x, { name: t ?? "Wrap", responsive: o, children: /* @__PURE__ */ e(ue, { onChange: (s) => {
|
|
2850
|
+
l?.({
|
|
2851
|
+
flexWrap: s.target.checked ? "wrap" : void 0
|
|
2852
|
+
});
|
|
2853
|
+
}, checked: n?.flexWrap === "wrap" }) }), qo = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2854
|
+
<path d="M9.95 5H20.12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2855
|
+
<path d="M15 17V5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2856
|
+
<path d="M7 17V10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2857
|
+
<path d="M4 10H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2858
|
+
</svg>
|
|
2859
|
+
`, Qo = ({ value: t, onChange: o, name: n }) => /* @__PURE__ */ e(x, { name: n ?? "Open in", children: /* @__PURE__ */ e(H, { value: t ?? "_self", onSelectionChange: o, children: [
|
|
2860
|
+
{
|
|
2861
|
+
label: "Current",
|
|
2862
|
+
value: "_self"
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
label: "New tab",
|
|
2866
|
+
value: "_blank"
|
|
2867
|
+
}
|
|
2868
|
+
].map((r) => /* @__PURE__ */ e(Y, { value: r.value, size: "28", children: r.label }, r.value)) }) });
|
|
2869
|
+
export {
|
|
2870
|
+
Qo as A,
|
|
2871
|
+
Ho as B,
|
|
2872
|
+
be as C,
|
|
2873
|
+
Eo as D,
|
|
2874
|
+
wo as E,
|
|
2875
|
+
Zo as F,
|
|
2876
|
+
Go as G,
|
|
2877
|
+
yo as H,
|
|
2878
|
+
ut as I,
|
|
2879
|
+
Po as J,
|
|
2880
|
+
at as K,
|
|
2881
|
+
Bt as L,
|
|
2882
|
+
$o as M,
|
|
2883
|
+
Le as N,
|
|
2884
|
+
jo as O,
|
|
2885
|
+
_o as P,
|
|
2886
|
+
ct as Q,
|
|
2887
|
+
Wo as R,
|
|
2888
|
+
Vo as S,
|
|
2889
|
+
x as T,
|
|
2890
|
+
pt as U,
|
|
2891
|
+
Mo as W,
|
|
2892
|
+
qo as a,
|
|
2893
|
+
Ao as b,
|
|
2894
|
+
Io as c,
|
|
2895
|
+
ko as d,
|
|
2896
|
+
Lo as e,
|
|
2897
|
+
Jo as f,
|
|
2898
|
+
To as g,
|
|
2899
|
+
Ro as h,
|
|
2900
|
+
Bo as i,
|
|
2901
|
+
Fo as j,
|
|
2902
|
+
No as k,
|
|
2903
|
+
Oo as l,
|
|
2904
|
+
Yo as m,
|
|
2905
|
+
Uo as n,
|
|
2906
|
+
Do as o,
|
|
2907
|
+
Xo as p,
|
|
2908
|
+
zo as q,
|
|
2909
|
+
So as r,
|
|
2910
|
+
xo as s,
|
|
2911
|
+
Pt as t,
|
|
2912
|
+
ht as u,
|
|
2913
|
+
tt as v,
|
|
2914
|
+
we as w,
|
|
2915
|
+
X as x,
|
|
2916
|
+
Tt as y,
|
|
2917
|
+
bo as z
|
|
2918
|
+
};
|