@janbox/storefront-builder 1.0.8 → 2.0.0
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 +83 -110
- package/dist/anchor-target-BlOvysAr.js +2329 -0
- package/dist/color-picker-popover-B3AVFuei.js +201 -0
- package/dist/components/composer/dataset.d.ts +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/countdown-timer.node-OmDiT-pz.js +825 -0
- package/dist/date-picker-B4Rju7gG.js +115 -0
- package/dist/{countdown-timer.node-BwrDThFq.js → dialog-header-DPLOS7TT.js} +2209 -3174
- package/dist/dropzone-Dbfed3jK.js +490 -0
- package/dist/editor/hooks/index.d.ts +1 -1
- package/dist/editor/lib/index.d.ts +3 -3
- package/dist/editor/lib/sidebar/insert-action.d.ts +15 -22
- package/dist/editor/toolbars.js +336 -0
- package/dist/editor/types/index.d.ts +0 -2
- package/dist/editor/ui/button/button.d.ts +2 -3
- package/dist/editor/ui/icon-button/icon-button.d.ts +1 -2
- package/dist/editor/ui.js +110 -0
- package/dist/editor.js +1024 -522
- package/dist/index-BbiQ0n_-.js +4 -0
- package/dist/index-CwrFnubn.js +4448 -0
- package/dist/index.js +369 -107
- package/dist/lib/container/container.inspector/container.inspector.d.ts +1 -0
- package/dist/lib/container/container.inspector/index.d.ts +1 -0
- package/dist/lib/container/container.node/container.node.d.ts +2 -0
- package/dist/lib/container/container.node/index.d.ts +3 -0
- package/dist/lib/container/container.node/types.d.ts +2 -0
- package/dist/lib/container/index.d.ts +2 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/templates/elements/carousel/index.d.ts +2 -2
- package/dist/templates/elements/content-list/index.d.ts +2 -2
- package/dist/templates/elements/interactive/index.d.ts +2 -2
- package/dist/templates/elements/layout/index.d.ts +2 -2
- package/dist/templates/elements/media/index.d.ts +2 -2
- package/dist/templates/elements/text/index.d.ts +2 -2
- package/dist/templates/elements/utilities/index.d.ts +2 -2
- package/dist/templates/index.d.ts +0 -1
- package/dist/templates/sections/faqs/index.d.ts +2 -2
- package/dist/templates/sections/guarantee/index.d.ts +2 -2
- package/dist/templates/sections/hero/index.d.ts +2 -2
- package/dist/templates.js +153 -656
- package/dist/{tooltip-W55T4oR8.js → tooltip-KbIHELP2.js} +1 -1
- package/package.json +11 -3
- package/dist/index-Br_MUhzZ.js +0 -6015
- package/dist/index-DGKFfr43.js +0 -4
- /package/dist/editor/hooks/{use-editor-state.d.ts → use-editor.d.ts} +0 -0
|
@@ -0,0 +1,2329 @@
|
|
|
1
|
+
import { jsx as e, jsxs as u, Fragment as P } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState as L, useRef as J, useEffect as Ve, Fragment as Be } from "react";
|
|
3
|
+
import { useQueryParams as Te } from "@janbox/storefront-ui/hooks";
|
|
4
|
+
import { screens as ye, paletteVars as Ie } from "@janbox/storefront-ui/theme";
|
|
5
|
+
import { getResponsiveProp as Ze, getColorShadesByVariant as Re } from "@janbox/storefront-ui/utils";
|
|
6
|
+
import { p as I, l as f, W as m, o as Z, n as R, c as x, m as je, C as T, d as X, e as ae, P as ce, q as E, s as U, r as q, M as Ae, w as de, y as le } from "./dialog-header-DPLOS7TT.js";
|
|
7
|
+
import { e as j, c as N, d as Se, a as V, A as G, g as A, l as We, j as ze, h as se, i as Pe, k as ie, f as Q, b as Oe } from "./dropzone-Dbfed3jK.js";
|
|
8
|
+
import "@floating-ui/react";
|
|
9
|
+
import { isFunction as Fe, merge as De, set as ue, parseInt as Ee, isNil as y, trimStart as Ue, get as we, isString as Y, isNumber as he } from "lodash-es";
|
|
10
|
+
import "clsx";
|
|
11
|
+
import "tailwind-merge";
|
|
12
|
+
import { useUpdateEffect as pe, useToggle as qe } from "react-use";
|
|
13
|
+
import "react-colorful";
|
|
14
|
+
import "overlayscrollbars-react";
|
|
15
|
+
import "@tanstack/react-virtual";
|
|
16
|
+
import Ge from "react-dropzone";
|
|
17
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
18
|
+
import "react-datepicker";
|
|
19
|
+
import { u as K, f as ge, I as Je, C as ee, a as _e, i as $e } from "./color-picker-popover-B3AVFuei.js";
|
|
20
|
+
import "@tiptap/extension-text-style";
|
|
21
|
+
import "@tiptap/react";
|
|
22
|
+
import "@tiptap/react/menus";
|
|
23
|
+
import "@tiptap/starter-kit";
|
|
24
|
+
import "react-frame-component";
|
|
25
|
+
import { useNode as Ce } from "@craftjs/core";
|
|
26
|
+
import { flatten as ve } from "flat";
|
|
27
|
+
import "@emotion/react";
|
|
28
|
+
import { Draggable as Xe, DragDropContext as Qe, Droppable as Ye } from "@hello-pangea/dnd";
|
|
29
|
+
import { W as Ke } from "./tooltip-KbIHELP2.js";
|
|
30
|
+
const et = (t = {}) => {
|
|
31
|
+
const { id: n } = Ce(), o = t?.nodeId ?? n, { nodeProps: l, actions: r } = K((a) => ({
|
|
32
|
+
nodeProps: a.nodes[o ?? n]?.data.props ?? {}
|
|
33
|
+
})), i = (a, c) => Fe(a) ? r.setProp(o, a) : r.setProp(o, (h) => {
|
|
34
|
+
if (c?.merge) {
|
|
35
|
+
De(h, a);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const C = ve(a);
|
|
39
|
+
Object.keys(C).forEach((w) => {
|
|
40
|
+
ue(h, w, C[w]);
|
|
41
|
+
});
|
|
42
|
+
}), s = (a, c, h) => i(
|
|
43
|
+
c === "xs" ? a : {
|
|
44
|
+
[c]: a
|
|
45
|
+
},
|
|
46
|
+
h
|
|
47
|
+
);
|
|
48
|
+
return {
|
|
49
|
+
id: o,
|
|
50
|
+
nodeProps: t?.transform?.(l) ?? l,
|
|
51
|
+
setNodeProps: i,
|
|
52
|
+
setNodeResponsiveProps: s
|
|
53
|
+
};
|
|
54
|
+
}, f1 = () => {
|
|
55
|
+
const {
|
|
56
|
+
queryParams: { screen: t }
|
|
57
|
+
} = me();
|
|
58
|
+
return { getResponsiveProp: (o, l, r, i) => Ze(o, l, r ?? t, i), currentScreen: t };
|
|
59
|
+
}, me = () => Te({
|
|
60
|
+
mode: {
|
|
61
|
+
parser(t) {
|
|
62
|
+
return ["full", "compact"].find((n) => n === t) ?? "full";
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
screen: {
|
|
66
|
+
parser(t) {
|
|
67
|
+
return ye.find((n) => n === t) ?? "xs";
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
action: {
|
|
71
|
+
parser(t) {
|
|
72
|
+
return t ?? void 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}), tt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
76
|
+
<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"/>
|
|
77
|
+
<path d="M9.4989 18.5031H14.501" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
78
|
+
</svg>
|
|
79
|
+
`, nt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
80
|
+
<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"/>
|
|
81
|
+
<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"/>
|
|
82
|
+
<path d="M9.99915 18.0022H14.0008" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
83
|
+
</svg>
|
|
84
|
+
`, ot = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
85
|
+
<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"/>
|
|
86
|
+
<path d="M10.88 17.5H13.12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
87
|
+
<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"/>
|
|
88
|
+
</svg>
|
|
89
|
+
`, rt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
90
|
+
<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"/>
|
|
91
|
+
<path d="M21.0037 13.0002H2.99622" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
92
|
+
<path d="M14.0008 17.002L14.501 21.0036" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
93
|
+
<path d="M9.99921 17.002L9.49901 21.0036" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
94
|
+
<path d="M8.14136 21.0041H15.8586" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
95
|
+
</svg>
|
|
96
|
+
`, lt = [
|
|
97
|
+
{
|
|
98
|
+
value: "primary",
|
|
99
|
+
label: "Primary"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: "secondary",
|
|
103
|
+
label: "Secondary"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value: "green",
|
|
107
|
+
label: "Green"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: "red",
|
|
111
|
+
label: "Red"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
value: "orange",
|
|
115
|
+
label: "Orange"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
value: "blue",
|
|
119
|
+
label: "Blue"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
value: "neutral",
|
|
123
|
+
label: "Neutral"
|
|
124
|
+
}
|
|
125
|
+
], b1 = {
|
|
126
|
+
xs: 390,
|
|
127
|
+
sm: 768,
|
|
128
|
+
md: 1280,
|
|
129
|
+
lg: 1680
|
|
130
|
+
}, _ = [
|
|
131
|
+
{
|
|
132
|
+
icon: ot,
|
|
133
|
+
size: "xs",
|
|
134
|
+
name: "Mobile"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
icon: tt,
|
|
138
|
+
size: "sm",
|
|
139
|
+
name: "Tablet"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
icon: nt,
|
|
143
|
+
size: "md",
|
|
144
|
+
name: "Laptop"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
icon: rt,
|
|
148
|
+
size: "lg",
|
|
149
|
+
name: "Desktop"
|
|
150
|
+
}
|
|
151
|
+
], st = "px", it = () => {
|
|
152
|
+
const {
|
|
153
|
+
queryParams: { screen: t },
|
|
154
|
+
setQueryParams: n
|
|
155
|
+
} = me(), o = (l) => {
|
|
156
|
+
n({
|
|
157
|
+
screen: l.currentTarget.getAttribute("value")
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ u(j, { children: [
|
|
161
|
+
/* @__PURE__ */ u(I, { children: [
|
|
162
|
+
/* @__PURE__ */ e("div", { className: "tw:text-shadow-red-50" }),
|
|
163
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(m, { source: _.find((l) => l.size === t)?.icon ?? "" }) })
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ e(Z, { children: _.map((l) => /* @__PURE__ */ e(R, { isActive: l.size === t, value: l.size, onClick: o, children: /* @__PURE__ */ e(m, { source: l.icon }) }, l.size)) })
|
|
166
|
+
] }) });
|
|
167
|
+
}, at = (t) => {
|
|
168
|
+
const n = Ee(t ?? "");
|
|
169
|
+
return isNaN(n) ? void 0 : n;
|
|
170
|
+
}, fe = ({
|
|
171
|
+
units: t = ["px", "%"],
|
|
172
|
+
size: n = "32",
|
|
173
|
+
value: o,
|
|
174
|
+
onChange: l,
|
|
175
|
+
defaultValue: r = {},
|
|
176
|
+
...i
|
|
177
|
+
}) => {
|
|
178
|
+
const s = t.find((g) => o?.toString().trim().endsWith(g)) ?? t.at(0), [a, c] = L(s);
|
|
179
|
+
pe(() => {
|
|
180
|
+
c(s);
|
|
181
|
+
}, [s]);
|
|
182
|
+
const h = ({ value: g, unit: k }) => {
|
|
183
|
+
if (y(g) || y(k) || k === st) {
|
|
184
|
+
l?.(g);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
l?.(`${g}${k}`);
|
|
188
|
+
}, C = at(o?.toString()), w = (g) => {
|
|
189
|
+
g.stopPropagation();
|
|
190
|
+
const k = g.currentTarget.value;
|
|
191
|
+
k !== a && (c(g.currentTarget.value), h({ value: r[k], unit: k }));
|
|
192
|
+
}, p = (g) => {
|
|
193
|
+
g.target.select(), i.onFocus?.(g);
|
|
194
|
+
}, d = (g) => {
|
|
195
|
+
const k = isNaN(g.target.valueAsNumber) ? void 0 : g.target.valueAsNumber;
|
|
196
|
+
h({
|
|
197
|
+
unit: a,
|
|
198
|
+
value: k
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
return /* @__PURE__ */ e(
|
|
202
|
+
N,
|
|
203
|
+
{
|
|
204
|
+
size: n,
|
|
205
|
+
suffix: /* @__PURE__ */ e("div", { className: "tw:inline-flex tw:items-center tw:gap-1", children: t.map((g) => /* @__PURE__ */ e(
|
|
206
|
+
f,
|
|
207
|
+
{
|
|
208
|
+
onClick: w,
|
|
209
|
+
value: g,
|
|
210
|
+
className: x("tw:text-ic-white-3s tw:hover:text-ic-white-4s", {
|
|
211
|
+
"tw:text-ic-white-6s tw:hover:text-ic-white-6s": a === g
|
|
212
|
+
}),
|
|
213
|
+
size: "20",
|
|
214
|
+
children: /* @__PURE__ */ e("span", { className: "tw:text-xs", children: g }, g)
|
|
215
|
+
},
|
|
216
|
+
g
|
|
217
|
+
)) }),
|
|
218
|
+
...i,
|
|
219
|
+
value: C ?? "",
|
|
220
|
+
onFocus: p,
|
|
221
|
+
onChange: d,
|
|
222
|
+
mode: "onBlur"
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
}, be = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
226
|
+
<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"/>
|
|
227
|
+
<path d="M14 9L12 7L10 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
228
|
+
<path d="M12 7V12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
229
|
+
<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"/>
|
|
230
|
+
</svg>
|
|
231
|
+
`, ct = ({ source: t, onChange: n, previewStyle: o }) => {
|
|
232
|
+
const [l, r] = L(t ?? ""), [i, s] = L(!1), { handlers: a } = ge(), { upload: c } = a;
|
|
233
|
+
return pe(() => {
|
|
234
|
+
r(t ?? "");
|
|
235
|
+
}, [t]), /* @__PURE__ */ u("div", { className: "tw:rounded-lg tw:p-4 tw:bg-ic-white-1s tw:flex tw:flex-col tw:gap-2", children: [
|
|
236
|
+
/* @__PURE__ */ e(Se, { isLoading: i, children: /* @__PURE__ */ e(
|
|
237
|
+
Ge,
|
|
238
|
+
{
|
|
239
|
+
accept: {
|
|
240
|
+
"image/png": [".png"],
|
|
241
|
+
"image/jpeg": [".jpeg", ".jpg"],
|
|
242
|
+
"image/webp": [".webp"]
|
|
243
|
+
},
|
|
244
|
+
multiple: !1,
|
|
245
|
+
onDrop: async (p) => {
|
|
246
|
+
const d = p.at(0);
|
|
247
|
+
if (d) {
|
|
248
|
+
s(!0);
|
|
249
|
+
try {
|
|
250
|
+
const g = await c(d);
|
|
251
|
+
n?.(g);
|
|
252
|
+
} finally {
|
|
253
|
+
s(!1);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
children: ({ getInputProps: p, getRootProps: d }) => /* @__PURE__ */ u(
|
|
258
|
+
"div",
|
|
259
|
+
{
|
|
260
|
+
className: x(
|
|
261
|
+
"tw:aspect-video tw:bg-ic-white-1s tw:rounded-lg tw:overflow-hidden tw:flex tw:items-center tw:justify-center tw:relative",
|
|
262
|
+
{
|
|
263
|
+
group: !!t,
|
|
264
|
+
"tw:cursor-pointer": !0
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
...d(),
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ e(
|
|
270
|
+
"div",
|
|
271
|
+
{
|
|
272
|
+
className: "tw:absolute tw:inset-0 tw:rounded-lg tw:pointer-events-none",
|
|
273
|
+
style: {
|
|
274
|
+
backgroundImage: t ? `url(${t})` : void 0,
|
|
275
|
+
backgroundSize: "cover",
|
|
276
|
+
backgroundRepeat: "no-repeat",
|
|
277
|
+
backgroundPosition: "center",
|
|
278
|
+
...o
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
),
|
|
282
|
+
/* @__PURE__ */ u(
|
|
283
|
+
"div",
|
|
284
|
+
{
|
|
285
|
+
className: x(
|
|
286
|
+
"tw:flex tw:flex-col tw:items-center tw:justify-center tw:gap-2 tw:absolute tw:inset-0 tw:bg-black tw:bg-opacity-0 tw:transition-all",
|
|
287
|
+
"tw:group-hover:bg-opacity-40 tw:group-hover:opacity-100",
|
|
288
|
+
{
|
|
289
|
+
"tw:opacity-0": !!t
|
|
290
|
+
}
|
|
291
|
+
),
|
|
292
|
+
children: [
|
|
293
|
+
/* @__PURE__ */ e(m, { size: 32, source: be }),
|
|
294
|
+
/* @__PURE__ */ e("span", { className: "tw:text-xs", children: "PNG, JPEG, JPG, WEBP" })
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
),
|
|
298
|
+
/* @__PURE__ */ e("input", { ...p() })
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
)
|
|
302
|
+
}
|
|
303
|
+
) }),
|
|
304
|
+
/* @__PURE__ */ e(
|
|
305
|
+
je,
|
|
306
|
+
{
|
|
307
|
+
onChange: (p) => {
|
|
308
|
+
p.target.value = Ue(p.target.value), r(p.target.value);
|
|
309
|
+
},
|
|
310
|
+
title: l,
|
|
311
|
+
value: l,
|
|
312
|
+
size: "32",
|
|
313
|
+
onBlur: (p) => {
|
|
314
|
+
p.currentTarget.value !== (t ?? "") && n?.(l);
|
|
315
|
+
},
|
|
316
|
+
placeholder: "https://example.com/image.jpg"
|
|
317
|
+
}
|
|
318
|
+
)
|
|
319
|
+
] });
|
|
320
|
+
}, b = ({ name: t, responsive: n, children: o, direction: l = "horizontal", guide: r }) => /* @__PURE__ */ u(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
className: x("tw:flex", {
|
|
324
|
+
"tw:flex-col tw:gap-2": l === "vertical",
|
|
325
|
+
"tw:gap-4 tw:items-center tw:justify-between": l === "horizontal"
|
|
326
|
+
}),
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-1", children: [
|
|
329
|
+
/* @__PURE__ */ u("div", { className: "tw:text-xs tw:flex tw:items-center tw:gap-2 tw:text-ic-white-5s", children: [
|
|
330
|
+
t,
|
|
331
|
+
!!r && /* @__PURE__ */ e(Ke, { placement: "top-start", content: r, children: /* @__PURE__ */ e(m, { className: "tw:cursor-pointer", size: 16, source: Je }) })
|
|
332
|
+
] }),
|
|
333
|
+
!!n && /* @__PURE__ */ e(it, {})
|
|
334
|
+
] }),
|
|
335
|
+
o
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
), dt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
339
|
+
<path d="M14.182 18H5.45499H9.43499L14.565 6H18.545H9.81799" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
340
|
+
</svg>
|
|
341
|
+
`, ut = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
342
|
+
<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"/>
|
|
343
|
+
<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"/>
|
|
344
|
+
</svg>
|
|
345
|
+
`, wt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
346
|
+
<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"/>
|
|
347
|
+
<path d="M7 19H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
348
|
+
</svg>
|
|
349
|
+
`, ht = '<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>', pt = '<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>', 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="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>', 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.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>', x1 = ({ value: t, onChange: n, label: o }) => /* @__PURE__ */ e(b, { name: o ?? "Text align", responsive: !0, children: /* @__PURE__ */ e(V, { onSelectionChange: n, value: t, children: [
|
|
350
|
+
{
|
|
351
|
+
icon: gt,
|
|
352
|
+
value: "left"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
icon: ht,
|
|
356
|
+
value: "center"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
icon: Ct,
|
|
360
|
+
value: "right"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
icon: pt,
|
|
364
|
+
value: "justify"
|
|
365
|
+
}
|
|
366
|
+
].map((r) => /* @__PURE__ */ e(f, { value: r.value, children: /* @__PURE__ */ e(m, { source: r.icon }) }, r.value)) }) }), k1 = ({ value: t, onChange: n, name: o, responsive: l }) => {
|
|
367
|
+
const r = () => {
|
|
368
|
+
n?.({
|
|
369
|
+
...t,
|
|
370
|
+
fontWeight: t?.fontWeight === 700 ? void 0 : 700
|
|
371
|
+
});
|
|
372
|
+
}, i = () => {
|
|
373
|
+
n?.({
|
|
374
|
+
...t,
|
|
375
|
+
fontStyle: t?.fontStyle === "italic" ? void 0 : "italic"
|
|
376
|
+
});
|
|
377
|
+
}, s = () => {
|
|
378
|
+
n?.({
|
|
379
|
+
...t,
|
|
380
|
+
textDecorationLine: t?.textDecorationLine === "underline" ? void 0 : "underline"
|
|
381
|
+
});
|
|
382
|
+
};
|
|
383
|
+
return /* @__PURE__ */ e(b, { name: o ?? "Text Style", responsive: l, children: /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
|
|
384
|
+
/* @__PURE__ */ e(
|
|
385
|
+
f,
|
|
386
|
+
{
|
|
387
|
+
onClick: r,
|
|
388
|
+
size: "28",
|
|
389
|
+
className: x({
|
|
390
|
+
"tw:bg-ic-white-2s": t?.fontWeight === 700
|
|
391
|
+
}),
|
|
392
|
+
children: /* @__PURE__ */ e(m, { source: ut })
|
|
393
|
+
}
|
|
394
|
+
),
|
|
395
|
+
/* @__PURE__ */ e(
|
|
396
|
+
f,
|
|
397
|
+
{
|
|
398
|
+
onClick: i,
|
|
399
|
+
size: "28",
|
|
400
|
+
className: x({
|
|
401
|
+
"tw:bg-ic-white-2s": t?.fontStyle === "italic"
|
|
402
|
+
}),
|
|
403
|
+
children: /* @__PURE__ */ e(m, { source: dt })
|
|
404
|
+
}
|
|
405
|
+
),
|
|
406
|
+
/* @__PURE__ */ e(
|
|
407
|
+
f,
|
|
408
|
+
{
|
|
409
|
+
onClick: s,
|
|
410
|
+
size: "28",
|
|
411
|
+
className: x({
|
|
412
|
+
"tw:bg-ic-white-2s": t?.textDecorationLine === "underline"
|
|
413
|
+
}),
|
|
414
|
+
children: /* @__PURE__ */ e(m, { source: wt })
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
] }) });
|
|
418
|
+
}, 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>', N1 = ({ value: t, onChange: n, name: o, responsive: l }) => {
|
|
419
|
+
const r = [
|
|
420
|
+
{
|
|
421
|
+
icon: te,
|
|
422
|
+
value: "none"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
value: "uppercase",
|
|
426
|
+
example: "AA"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
value: "capitalize",
|
|
430
|
+
example: "Aa"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
value: "lowercase",
|
|
434
|
+
example: "aa"
|
|
435
|
+
}
|
|
436
|
+
];
|
|
437
|
+
return /* @__PURE__ */ e(b, { name: o ?? "Text Transform", responsive: l, children: /* @__PURE__ */ e(V, { onSelectionChange: (s) => {
|
|
438
|
+
n?.({
|
|
439
|
+
textTransform: s === "none" ? void 0 : s
|
|
440
|
+
});
|
|
441
|
+
}, value: t?.textTransform, children: r.map((s) => /* @__PURE__ */ e(f, { value: s.value, children: s.icon ? /* @__PURE__ */ e(m, { source: s.icon }) : /* @__PURE__ */ e("span", { className: "tw:text-sm tw:leading-none", children: s.example }) }, s.value)) }) });
|
|
442
|
+
}, L1 = ({ name: t, value: n, onChange: o, responsive: l = !0, menu: r }) => {
|
|
443
|
+
const i = J(null), [s, a] = L(!1), c = (v) => {
|
|
444
|
+
o?.({
|
|
445
|
+
width: v
|
|
446
|
+
});
|
|
447
|
+
}, h = (v) => {
|
|
448
|
+
a(!0);
|
|
449
|
+
}, C = () => {
|
|
450
|
+
setTimeout(() => {
|
|
451
|
+
a(!1);
|
|
452
|
+
}, 100);
|
|
453
|
+
}, w = [
|
|
454
|
+
{
|
|
455
|
+
value: "auto",
|
|
456
|
+
label: "Auto",
|
|
457
|
+
visible: r?.autoOption?.visible ?? !0,
|
|
458
|
+
clearable: r?.autoOption?.clearable
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
value: "fit-content",
|
|
462
|
+
label: "Fit content",
|
|
463
|
+
visible: r?.fitContentOption?.visible ?? !1,
|
|
464
|
+
clearable: r?.fitContentOption?.clearable
|
|
465
|
+
}
|
|
466
|
+
], p = w.filter((v) => v.visible), d = w.find((v) => v.value === n?.width)?.label?.toString(), g = (v) => {
|
|
467
|
+
const M = v.currentTarget.getAttribute("value");
|
|
468
|
+
y(M) || c(M);
|
|
469
|
+
}, k = (v) => {
|
|
470
|
+
v.stopPropagation(), c(void 0);
|
|
471
|
+
};
|
|
472
|
+
return /* @__PURE__ */ e(b, { name: t ?? "Width", responsive: l, children: /* @__PURE__ */ u("div", { className: "tw:relative tw:w-1/2", children: [
|
|
473
|
+
/* @__PURE__ */ e(
|
|
474
|
+
fe,
|
|
475
|
+
{
|
|
476
|
+
fullWidth: !0,
|
|
477
|
+
wrapRef: i,
|
|
478
|
+
placeholder: d,
|
|
479
|
+
value: n?.width,
|
|
480
|
+
onChange: c,
|
|
481
|
+
defaultValue: {
|
|
482
|
+
"%": 100
|
|
483
|
+
},
|
|
484
|
+
onFocus: h,
|
|
485
|
+
onBlur: C
|
|
486
|
+
}
|
|
487
|
+
),
|
|
488
|
+
!!p.length && /* @__PURE__ */ u(j, { open: s, placement: "bottom-start", children: [
|
|
489
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-x-0 tw:top-full" }) }),
|
|
490
|
+
/* @__PURE__ */ e(Z, { children: p.map((v) => /* @__PURE__ */ u(
|
|
491
|
+
R,
|
|
492
|
+
{
|
|
493
|
+
className: "tw:justify-between",
|
|
494
|
+
isActive: n?.width === v.value,
|
|
495
|
+
onClick: g,
|
|
496
|
+
value: v.value,
|
|
497
|
+
children: [
|
|
498
|
+
v.label,
|
|
499
|
+
v.clearable && n?.width === v.value && /* @__PURE__ */ e(f, { onClick: k, size: "20", children: /* @__PURE__ */ e(m, { size: 16, source: T }) })
|
|
500
|
+
]
|
|
501
|
+
},
|
|
502
|
+
v.value
|
|
503
|
+
)) })
|
|
504
|
+
] })
|
|
505
|
+
] }) });
|
|
506
|
+
}, M1 = ({
|
|
507
|
+
name: t,
|
|
508
|
+
value: n,
|
|
509
|
+
onChange: o,
|
|
510
|
+
responsive: l = !0,
|
|
511
|
+
units: r = ["px", "%"],
|
|
512
|
+
menu: i
|
|
513
|
+
}) => {
|
|
514
|
+
const [s, a] = L(!1), c = [
|
|
515
|
+
{
|
|
516
|
+
value: "auto",
|
|
517
|
+
label: "Auto",
|
|
518
|
+
visible: i?.autoOption?.visible ?? !0,
|
|
519
|
+
clearable: i?.autoOption?.clearable ?? !1
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
value: "fit-content",
|
|
523
|
+
label: "Fit content",
|
|
524
|
+
visible: i?.fitContentOption?.visible ?? !1,
|
|
525
|
+
clearable: i?.fitContentOption?.clearable ?? !1
|
|
526
|
+
}
|
|
527
|
+
], h = c.filter((v) => v.visible), C = (v) => {
|
|
528
|
+
o?.({
|
|
529
|
+
height: v
|
|
530
|
+
});
|
|
531
|
+
}, w = (v) => {
|
|
532
|
+
a(!0);
|
|
533
|
+
}, p = () => {
|
|
534
|
+
setTimeout(() => {
|
|
535
|
+
a(!1);
|
|
536
|
+
}, 100);
|
|
537
|
+
}, d = c.find((v) => v.value === n?.height)?.label, g = (v) => {
|
|
538
|
+
const M = v.currentTarget.getAttribute("value");
|
|
539
|
+
y(M) || C(M);
|
|
540
|
+
}, k = (v) => {
|
|
541
|
+
v.stopPropagation(), C(void 0);
|
|
542
|
+
};
|
|
543
|
+
return /* @__PURE__ */ e(b, { name: t ?? "Height", responsive: l, children: /* @__PURE__ */ u("div", { className: "tw:relative tw:w-1/2", children: [
|
|
544
|
+
/* @__PURE__ */ e(
|
|
545
|
+
fe,
|
|
546
|
+
{
|
|
547
|
+
fullWidth: !0,
|
|
548
|
+
units: r,
|
|
549
|
+
placeholder: d,
|
|
550
|
+
value: n?.height,
|
|
551
|
+
onChange: C,
|
|
552
|
+
onFocus: w,
|
|
553
|
+
onBlur: p
|
|
554
|
+
}
|
|
555
|
+
),
|
|
556
|
+
!!h.length && /* @__PURE__ */ u(j, { open: s, placement: "bottom-start", children: [
|
|
557
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-x-0 tw:top-full" }) }),
|
|
558
|
+
/* @__PURE__ */ e(Z, { children: h.map((v) => /* @__PURE__ */ u(
|
|
559
|
+
R,
|
|
560
|
+
{
|
|
561
|
+
className: "tw:justify-between",
|
|
562
|
+
isActive: n?.height === v.value,
|
|
563
|
+
onClick: g,
|
|
564
|
+
value: v.value,
|
|
565
|
+
children: [
|
|
566
|
+
v.label,
|
|
567
|
+
v.clearable && n?.height === v.value && /* @__PURE__ */ e(f, { onClick: k, size: "20", children: /* @__PURE__ */ e(m, { size: 16, source: T }) })
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
v.value
|
|
571
|
+
)) })
|
|
572
|
+
] })
|
|
573
|
+
] }) });
|
|
574
|
+
}, H1 = ({ name: t, responsive: n, value: o, onChange: l }) => {
|
|
575
|
+
const r = (i) => {
|
|
576
|
+
l?.({
|
|
577
|
+
color: i
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
return /* @__PURE__ */ e(b, { name: t ?? "Color", responsive: n, children: /* @__PURE__ */ e(ee, { color: o?.color, onChange: r }) });
|
|
581
|
+
}, vt = ({ value: t, onChange: n }) => {
|
|
582
|
+
const o = ge(), l = ve(Ie), r = (() => {
|
|
583
|
+
const s = Object.keys(l).find((a) => l[a] === t?.backgroundColor);
|
|
584
|
+
return s ? we(o.theme.palette, s) : t?.backgroundColor;
|
|
585
|
+
})();
|
|
586
|
+
return /* @__PURE__ */ e(b, { name: "Color", children: /* @__PURE__ */ e(ee, { color: r, onChange: (s) => {
|
|
587
|
+
n?.({ ...t, backgroundColor: s });
|
|
588
|
+
} }) });
|
|
589
|
+
}, mt = '<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>', ft = `<svg width="16" height="16" viewBox="0 0 5 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
590
|
+
<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>
|
|
591
|
+
<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>
|
|
592
|
+
<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>
|
|
593
|
+
</svg>`, bt = '<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>', xt = [
|
|
594
|
+
{
|
|
595
|
+
value: "no-repeat",
|
|
596
|
+
icon: te
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
value: "repeat-x",
|
|
600
|
+
icon: mt
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
value: "repeat-y",
|
|
604
|
+
icon: ft
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
value: "repeat",
|
|
608
|
+
icon: bt
|
|
609
|
+
}
|
|
610
|
+
], kt = [
|
|
611
|
+
"left top",
|
|
612
|
+
"top",
|
|
613
|
+
"right top",
|
|
614
|
+
"left",
|
|
615
|
+
"center",
|
|
616
|
+
"right",
|
|
617
|
+
"left bottom",
|
|
618
|
+
"bottom",
|
|
619
|
+
"right bottom"
|
|
620
|
+
], Nt = ["cover", "contain", "auto"], Lt = [
|
|
621
|
+
{
|
|
622
|
+
value: "scroll",
|
|
623
|
+
label: "Scroll"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
value: "fixed",
|
|
627
|
+
label: "Fixed"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
value: "local",
|
|
631
|
+
label: "Local"
|
|
632
|
+
}
|
|
633
|
+
], Mt = `<svg width="24" height="24" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
634
|
+
<circle cx="12.5" cy="12.5" r="1.5" fill="currentColor" stroke="currentColor" stroke-width="1.2"/>
|
|
635
|
+
</svg>`, xe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
636
|
+
<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"/>
|
|
637
|
+
<path d="M18.0803 13.6136L16.2902 14.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
638
|
+
<path d="M14.5 13.6136L16.2902 14.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
639
|
+
<path d="M12.7098 14.6136L14.5 13.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
640
|
+
<path d="M10.9197 13.6136L12.7098 14.6136" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
641
|
+
<path d="M23 21H1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
642
|
+
<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"/>
|
|
643
|
+
<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"/>
|
|
644
|
+
</svg>
|
|
645
|
+
`, Ht = (t) => t?.match(/url\((['"]?)(https?:\/\/[^'")]+)\1\)/)?.at(2), Vt = ({ onChange: t, value: n }) => {
|
|
646
|
+
const [o, l] = qe(!1), r = n?.backgroundPosition ?? "center", i = n?.backgroundRepeat ?? "no-repeat", s = n?.backgroundSize ?? "cover", a = n?.backgroundAttachment ?? "scroll", c = (d) => {
|
|
647
|
+
t?.({
|
|
648
|
+
backgroundImage: d ? `url(${d})` : void 0,
|
|
649
|
+
backgroundPosition: r,
|
|
650
|
+
backgroundRepeat: i,
|
|
651
|
+
backgroundSize: s
|
|
652
|
+
});
|
|
653
|
+
}, h = (d) => {
|
|
654
|
+
t?.({
|
|
655
|
+
...n,
|
|
656
|
+
backgroundRepeat: d
|
|
657
|
+
});
|
|
658
|
+
}, C = (d) => {
|
|
659
|
+
t?.({
|
|
660
|
+
...n,
|
|
661
|
+
backgroundPosition: d.currentTarget.value
|
|
662
|
+
});
|
|
663
|
+
}, w = (d) => {
|
|
664
|
+
t?.({
|
|
665
|
+
...n,
|
|
666
|
+
backgroundSize: d.currentTarget.value
|
|
667
|
+
});
|
|
668
|
+
}, p = (d) => {
|
|
669
|
+
t?.({
|
|
670
|
+
...n,
|
|
671
|
+
backgroundAttachment: d
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
return /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-3", children: [
|
|
675
|
+
/* @__PURE__ */ e(
|
|
676
|
+
ct,
|
|
677
|
+
{
|
|
678
|
+
previewStyle: {
|
|
679
|
+
backgroundPosition: r,
|
|
680
|
+
backgroundRepeat: i,
|
|
681
|
+
backgroundSize: s,
|
|
682
|
+
backgroundAttachment: a
|
|
683
|
+
},
|
|
684
|
+
source: Ht(n?.backgroundImage),
|
|
685
|
+
onChange: c
|
|
686
|
+
}
|
|
687
|
+
),
|
|
688
|
+
/* @__PURE__ */ e(
|
|
689
|
+
X,
|
|
690
|
+
{
|
|
691
|
+
suffix: /* @__PURE__ */ e(
|
|
692
|
+
m,
|
|
693
|
+
{
|
|
694
|
+
className: x("tw:transition-transform", {
|
|
695
|
+
"tw:-rotate-180": o
|
|
696
|
+
}),
|
|
697
|
+
source: G
|
|
698
|
+
}
|
|
699
|
+
),
|
|
700
|
+
onClick: l,
|
|
701
|
+
children: o ? "Show less" : "Show more"
|
|
702
|
+
}
|
|
703
|
+
),
|
|
704
|
+
/* @__PURE__ */ e(ae, { open: o, children: /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-3", children: [
|
|
705
|
+
/* @__PURE__ */ e(b, { name: "Scale", children: /* @__PURE__ */ e("div", { className: "tw:flex tw:items-center tw:gap-2", children: Nt.map((d) => {
|
|
706
|
+
const g = s === d;
|
|
707
|
+
return /* @__PURE__ */ e(
|
|
708
|
+
"button",
|
|
709
|
+
{
|
|
710
|
+
onClick: w,
|
|
711
|
+
value: d,
|
|
712
|
+
className: x("tw:p-1.5 tw:border tw:rounded tw:border-ic-white-2s tw:text-ic-white-4s", {
|
|
713
|
+
"tw:text-ic-white-6s tw:border-ic-white-5s": g
|
|
714
|
+
}),
|
|
715
|
+
children: /* @__PURE__ */ u("div", { className: "tw:h-8 tw:w-12 tw:rounded tw:overflow-hidden tw:relative tw:flex tw:justify-center tw:items-center", children: [
|
|
716
|
+
/* @__PURE__ */ e(
|
|
717
|
+
"div",
|
|
718
|
+
{
|
|
719
|
+
className: x("tw:bg-ic-white-1s tw:flex tw:items-center tw:justify-center", {
|
|
720
|
+
"tw:w-8 tw:h-8": d === "contain",
|
|
721
|
+
"tw:w-full tw:h-full": d === "cover",
|
|
722
|
+
"tw:w-6 tw:h-6 tw:rounded-sm": d === "auto"
|
|
723
|
+
}),
|
|
724
|
+
children: /* @__PURE__ */ e(m, { source: xe })
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
/* @__PURE__ */ e(
|
|
728
|
+
"div",
|
|
729
|
+
{
|
|
730
|
+
className: x(
|
|
731
|
+
"tw:absolute tw:inset-0 tw:border tw:rounded tw:pointer-events-none tw:border-ic-white-1s",
|
|
732
|
+
{
|
|
733
|
+
"tw:border-ic-white-2s": g
|
|
734
|
+
}
|
|
735
|
+
)
|
|
736
|
+
}
|
|
737
|
+
)
|
|
738
|
+
] })
|
|
739
|
+
},
|
|
740
|
+
d
|
|
741
|
+
);
|
|
742
|
+
}) }) }),
|
|
743
|
+
/* @__PURE__ */ e(b, { name: "Position", children: /* @__PURE__ */ e("div", { className: "tw:grid tw:grid-cols-3 tw:bg-ic-white-1s tw:p-2 tw:gap-0.5 tw:rounded-xl", children: kt.map((d) => {
|
|
744
|
+
const g = r === d;
|
|
745
|
+
return /* @__PURE__ */ u(
|
|
746
|
+
f,
|
|
747
|
+
{
|
|
748
|
+
className: x("tw:relative", {
|
|
749
|
+
"tw:bg-ic-black-7s": g
|
|
750
|
+
}),
|
|
751
|
+
onClick: C,
|
|
752
|
+
value: d,
|
|
753
|
+
size: "20",
|
|
754
|
+
children: [
|
|
755
|
+
/* @__PURE__ */ e(m, { source: Mt }),
|
|
756
|
+
g && /* @__PURE__ */ e("div", { className: "tw:absolute tw:w-3 tw:h-3 tw:border-2 tw:rounded-full tw:pointer-events-none" })
|
|
757
|
+
]
|
|
758
|
+
},
|
|
759
|
+
d
|
|
760
|
+
);
|
|
761
|
+
}) }) }),
|
|
762
|
+
/* @__PURE__ */ e(b, { name: "Repeat", children: /* @__PURE__ */ e(V, { value: i, onSelectionChange: h, children: xt.map((d) => /* @__PURE__ */ e(f, { value: d.value, children: /* @__PURE__ */ e(m, { source: d.icon }) }, d.value)) }) }),
|
|
763
|
+
/* @__PURE__ */ e(b, { name: "Attachment", children: /* @__PURE__ */ e(
|
|
764
|
+
A,
|
|
765
|
+
{
|
|
766
|
+
onChange: p,
|
|
767
|
+
className: "tw:w-1/2",
|
|
768
|
+
value: a,
|
|
769
|
+
options: Lt
|
|
770
|
+
}
|
|
771
|
+
) })
|
|
772
|
+
] }) })
|
|
773
|
+
] });
|
|
774
|
+
}, V1 = ({ value: t, onChange: n }) => /* @__PURE__ */ u(We, { defaultIndex: t?.backgroundImage ? 1 : 0, children: [
|
|
775
|
+
/* @__PURE__ */ u(ze, { children: [
|
|
776
|
+
/* @__PURE__ */ e(se, { className: "tw:text-xs", children: "Color" }),
|
|
777
|
+
/* @__PURE__ */ e(se, { className: "tw:text-xs", children: "Image" })
|
|
778
|
+
] }),
|
|
779
|
+
/* @__PURE__ */ u(Pe, { className: "tw:pt-2", children: [
|
|
780
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(vt, { onChange: n, value: t }) }),
|
|
781
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Vt, { onChange: n, value: t }) })
|
|
782
|
+
] })
|
|
783
|
+
] }), B = ({ name: t, value: n, onChange: o }) => {
|
|
784
|
+
const [l, r] = L(!1), i = "auto", s = [
|
|
785
|
+
{
|
|
786
|
+
label: "Auto",
|
|
787
|
+
value: i
|
|
788
|
+
}
|
|
789
|
+
], a = () => {
|
|
790
|
+
setTimeout(() => {
|
|
791
|
+
r(!1);
|
|
792
|
+
}, 100);
|
|
793
|
+
}, c = (p) => {
|
|
794
|
+
r(!0), p.target.select();
|
|
795
|
+
}, h = (p) => {
|
|
796
|
+
const d = isNaN(p.target.valueAsNumber) ? void 0 : p.target.valueAsNumber;
|
|
797
|
+
o?.(t, d);
|
|
798
|
+
}, C = (p) => {
|
|
799
|
+
o?.(t, p.currentTarget.getAttribute("value") ?? void 0);
|
|
800
|
+
}, w = (p) => {
|
|
801
|
+
p.stopPropagation(), o?.(t);
|
|
802
|
+
};
|
|
803
|
+
return /* @__PURE__ */ u("div", { className: "tw:relative tw:w-11 tw:h-fit", children: [
|
|
804
|
+
/* @__PURE__ */ e(
|
|
805
|
+
N,
|
|
806
|
+
{
|
|
807
|
+
mode: "onBlur",
|
|
808
|
+
onFocus: c,
|
|
809
|
+
className: "tw:text-center",
|
|
810
|
+
size: "28",
|
|
811
|
+
autoComplete: "off",
|
|
812
|
+
fullWidth: !0,
|
|
813
|
+
placeholder: n === i ? "Auto" : void 0,
|
|
814
|
+
value: n ?? 0,
|
|
815
|
+
onBlur: a,
|
|
816
|
+
name: t,
|
|
817
|
+
onChange: h
|
|
818
|
+
}
|
|
819
|
+
),
|
|
820
|
+
t.startsWith("margin") && /* @__PURE__ */ u(j, { open: l, placement: "bottom-start", children: [
|
|
821
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-x-0 tw:top-full" }) }),
|
|
822
|
+
/* @__PURE__ */ e(Z, { children: s.map((p) => {
|
|
823
|
+
const d = p.value === n;
|
|
824
|
+
return /* @__PURE__ */ u(
|
|
825
|
+
R,
|
|
826
|
+
{
|
|
827
|
+
onClick: C,
|
|
828
|
+
className: "tw:justify-between",
|
|
829
|
+
isActive: d,
|
|
830
|
+
value: p.value,
|
|
831
|
+
children: [
|
|
832
|
+
p.label,
|
|
833
|
+
d && /* @__PURE__ */ e(f, { size: "20", onClick: w, children: /* @__PURE__ */ e(m, { size: 16, source: T }) })
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
p.value
|
|
837
|
+
);
|
|
838
|
+
}) })
|
|
839
|
+
] })
|
|
840
|
+
] });
|
|
841
|
+
}, B1 = ({ value: t, onChange: n }) => {
|
|
842
|
+
const o = J(null), l = J(null), [r, i] = L(0), [s, a] = L(0);
|
|
843
|
+
Ve(() => {
|
|
844
|
+
const h = new ResizeObserver((C) => {
|
|
845
|
+
const w = C.at(0)?.target;
|
|
846
|
+
if (w) {
|
|
847
|
+
const { width: d } = w.getBoundingClientRect();
|
|
848
|
+
i(Math.floor(Math.sqrt(Math.pow(d, 2) / 2)));
|
|
849
|
+
}
|
|
850
|
+
const p = C.at(1)?.target;
|
|
851
|
+
if (p) {
|
|
852
|
+
const { width: d } = p.getBoundingClientRect();
|
|
853
|
+
a(Math.floor(Math.sqrt(Math.pow(d, 2) / 2)));
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
return o.current && h.observe(o.current), l.current && h.observe(l.current), () => h.disconnect();
|
|
857
|
+
}, []);
|
|
858
|
+
const c = (h, C) => {
|
|
859
|
+
n?.({
|
|
860
|
+
...t,
|
|
861
|
+
[h]: C
|
|
862
|
+
});
|
|
863
|
+
};
|
|
864
|
+
return /* @__PURE__ */ u("div", { ref: o, className: "tw:aspect-square tw:relative tw:overflow-hidden tw:rounded", children: [
|
|
865
|
+
/* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:translate-y-1/2 tw:grid tw:place-items-center tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
866
|
+
"div",
|
|
867
|
+
{
|
|
868
|
+
style: {
|
|
869
|
+
width: r
|
|
870
|
+
},
|
|
871
|
+
className: "tw:bg-ic-white-1s tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
872
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:w-full tw:h-full tw:flex tw:justify-center tw:-rotate-45 tw:z-10", children: /* @__PURE__ */ e("div", { className: "tw:z-10 tw:h-1/2 tw:relative tw:flex tw:items-end tw:pb-3", children: /* @__PURE__ */ e(B, { name: "marginBottom", value: t?.marginBottom, onChange: c }) }) })
|
|
873
|
+
}
|
|
874
|
+
) }),
|
|
875
|
+
/* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:-translate-y-1/2 tw:grid tw:place-items-center tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
876
|
+
"div",
|
|
877
|
+
{
|
|
878
|
+
style: {
|
|
879
|
+
width: r
|
|
880
|
+
},
|
|
881
|
+
className: "tw:bg-ic-white-1s tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
882
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:w-full tw:h-full tw:flex tw:justify-center tw:-rotate-45 tw:z-10 tw:items-end", children: /* @__PURE__ */ e("div", { className: "tw:z-10 tw:h-1/2 tw:relative tw:flex tw:pt-3", children: /* @__PURE__ */ e(B, { name: "marginTop", value: t?.marginTop, onChange: c }) }) })
|
|
883
|
+
}
|
|
884
|
+
) }),
|
|
885
|
+
/* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:grid tw:place-items-center tw:translate-x-1/2 tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
style: {
|
|
889
|
+
width: r
|
|
890
|
+
},
|
|
891
|
+
className: "tw:bg-ic-white-1s tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
892
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:flex tw:-rotate-45 tw:z-10 tw:items-center", children: /* @__PURE__ */ e("div", { className: "tw:w-1/2 tw:flex tw:justify-end tw:pr-1.5", children: /* @__PURE__ */ e(B, { name: "marginRight", value: t?.marginRight, onChange: c }) }) })
|
|
893
|
+
}
|
|
894
|
+
) }),
|
|
895
|
+
/* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:grid tw:place-items-center tw:-translate-x-1/2 tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
896
|
+
"div",
|
|
897
|
+
{
|
|
898
|
+
style: {
|
|
899
|
+
width: r
|
|
900
|
+
},
|
|
901
|
+
className: "tw:bg-ic-white-1s tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
902
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:flex tw:-rotate-45 tw:z-10 tw:items-center tw:justify-end", children: /* @__PURE__ */ e("div", { className: "tw:w-1/2 tw:flex tw:pl-1.5", children: /* @__PURE__ */ e("div", { className: "tw:w-10", children: /* @__PURE__ */ e(B, { name: "marginLeft", value: t?.marginLeft, onChange: c }) }) }) })
|
|
903
|
+
}
|
|
904
|
+
) }),
|
|
905
|
+
/* @__PURE__ */ u("div", { className: "tw:absolute tw:w-3/5 tw:h-3/5 tw:left-1/2 tw:top-1/2 tw:-translate-x-1/2 tw:-translate-y-1/2 tw:bg-ic-white-1s tw:rounded tw:overflow-hidden", children: [
|
|
906
|
+
/* @__PURE__ */ e("div", { ref: l, className: "tw:w-full tw:h-full tw:relative", children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:translate-y-1/2 tw:grid tw:place-items-center tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
907
|
+
"div",
|
|
908
|
+
{
|
|
909
|
+
style: {
|
|
910
|
+
width: s
|
|
911
|
+
},
|
|
912
|
+
className: "tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
913
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:w-full tw:h-full tw:flex tw:justify-center tw:-rotate-45 tw:z-10", children: /* @__PURE__ */ e("div", { className: "tw:z-10 tw:w-10 tw:h-1/2 tw:relative tw:flex tw:items-end tw:pb-4", children: /* @__PURE__ */ e(B, { name: "paddingBottom", value: t?.paddingBottom, onChange: c }) }) })
|
|
914
|
+
}
|
|
915
|
+
) }) }),
|
|
916
|
+
/* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:-translate-y-1/2 tw:grid tw:place-items-center tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
917
|
+
"div",
|
|
918
|
+
{
|
|
919
|
+
style: {
|
|
920
|
+
width: s
|
|
921
|
+
},
|
|
922
|
+
className: "tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
923
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:w-full tw:h-full tw:flex tw:justify-center tw:-rotate-45 tw:z-10 tw:items-end", children: /* @__PURE__ */ e("div", { className: "tw:z-10 tw:h-1/2 tw:relative tw:flex tw:pt-4", children: /* @__PURE__ */ e(B, { name: "paddingTop", value: t?.paddingTop, onChange: c }) }) })
|
|
924
|
+
}
|
|
925
|
+
) }),
|
|
926
|
+
/* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:grid tw:place-items-center tw:translate-x-1/2 tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
927
|
+
"div",
|
|
928
|
+
{
|
|
929
|
+
style: {
|
|
930
|
+
width: s
|
|
931
|
+
},
|
|
932
|
+
className: "tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
933
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:flex tw:-rotate-45 tw:z-10 tw:items-center", children: /* @__PURE__ */ e("div", { className: "tw:w-1/2 tw:flex tw:justify-end tw:pr-3", children: /* @__PURE__ */ e(B, { name: "paddingRight", value: t?.paddingRight, onChange: c }) }) })
|
|
934
|
+
}
|
|
935
|
+
) }),
|
|
936
|
+
/* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:rotate-45 tw:grid tw:place-items-center tw:-translate-x-1/2 tw:pointer-events-none", children: /* @__PURE__ */ e(
|
|
937
|
+
"div",
|
|
938
|
+
{
|
|
939
|
+
style: {
|
|
940
|
+
width: s
|
|
941
|
+
},
|
|
942
|
+
className: "tw:aspect-square tw:relative tw:pointer-events-auto",
|
|
943
|
+
children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0 tw:flex tw:-rotate-45 tw:z-10 tw:items-center tw:justify-end", children: /* @__PURE__ */ e("div", { className: "tw:w-1/2 tw:flex tw:pl-3", children: /* @__PURE__ */ e(B, { name: "paddingLeft", value: t?.paddingLeft, onChange: c }) }) })
|
|
944
|
+
}
|
|
945
|
+
) })
|
|
946
|
+
] })
|
|
947
|
+
] });
|
|
948
|
+
}, Bt = `<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
949
|
+
<rect width="48" height="48" fill="white" fill-opacity="0.01"/>
|
|
950
|
+
<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"/>
|
|
951
|
+
<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"/>
|
|
952
|
+
</svg>`, Tt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
953
|
+
<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"/>
|
|
954
|
+
<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"/>
|
|
955
|
+
<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"/>
|
|
956
|
+
</svg>
|
|
957
|
+
`, yt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
958
|
+
<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"/>
|
|
959
|
+
<path d="M12 11V17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
960
|
+
<path d="M4 7H20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
961
|
+
<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"/>
|
|
962
|
+
<path d="M15.43 11L15 17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
963
|
+
<path d="M8.56997 11L8.99997 17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
964
|
+
</svg>
|
|
965
|
+
`, It = ({ node: t, nodeIndex: n }) => {
|
|
966
|
+
const [o, l] = L(!1), { actions: r } = K(), i = (C) => {
|
|
967
|
+
C.stopPropagation(), r.delete(t.id);
|
|
968
|
+
}, s = (C) => {
|
|
969
|
+
C.stopPropagation();
|
|
970
|
+
const w = r.duplicate(t.id);
|
|
971
|
+
r.selectNode(w.id);
|
|
972
|
+
}, a = () => {
|
|
973
|
+
l(!0);
|
|
974
|
+
}, c = () => {
|
|
975
|
+
l(!1);
|
|
976
|
+
}, h = () => {
|
|
977
|
+
$e(t) && r.selectNode(t.id);
|
|
978
|
+
};
|
|
979
|
+
return /* @__PURE__ */ e(Xe, { index: n, draggableId: t.id, children: (C, w) => /* @__PURE__ */ e(
|
|
980
|
+
"div",
|
|
981
|
+
{
|
|
982
|
+
ref: C.innerRef,
|
|
983
|
+
...C.draggableProps,
|
|
984
|
+
...C.dragHandleProps,
|
|
985
|
+
children: /* @__PURE__ */ u(
|
|
986
|
+
"div",
|
|
987
|
+
{
|
|
988
|
+
className: x(
|
|
989
|
+
"tw:flex tw:items-center tw:gap-1 tw:text-xs tw:px-2 tw:py-1.5 tw:bg-ic-white-1s tw:rounded-lg tw:hover:bg-ic-white-2s tw:cursor-grab",
|
|
990
|
+
{
|
|
991
|
+
"tw:bg-ic-white-3s": w.isDragging
|
|
992
|
+
}
|
|
993
|
+
),
|
|
994
|
+
onMouseEnter: a,
|
|
995
|
+
onMouseLeave: c,
|
|
996
|
+
"aria-hidden": !0,
|
|
997
|
+
onClick: h,
|
|
998
|
+
children: [
|
|
999
|
+
/* @__PURE__ */ e(m, { size: 16, source: Bt }),
|
|
1000
|
+
/* @__PURE__ */ e("span", { className: "tw:flex-1 tw:truncate", children: _e(t) }),
|
|
1001
|
+
/* @__PURE__ */ e(ae, { open: o, orientation: "horizontal", children: /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-1", children: [
|
|
1002
|
+
/* @__PURE__ */ e(f, { tooltip: { content: "Duplicate" }, onClick: s, children: /* @__PURE__ */ e(m, { size: 16, source: Tt }) }),
|
|
1003
|
+
/* @__PURE__ */ e(
|
|
1004
|
+
f,
|
|
1005
|
+
{
|
|
1006
|
+
tooltip: {
|
|
1007
|
+
content: "Delete"
|
|
1008
|
+
},
|
|
1009
|
+
onClick: i,
|
|
1010
|
+
children: /* @__PURE__ */ e(m, { size: 16, source: yt })
|
|
1011
|
+
}
|
|
1012
|
+
)
|
|
1013
|
+
] }) })
|
|
1014
|
+
]
|
|
1015
|
+
}
|
|
1016
|
+
)
|
|
1017
|
+
}
|
|
1018
|
+
) });
|
|
1019
|
+
}, T1 = ({ getNewNodeElement: t }) => {
|
|
1020
|
+
const { query: n, actions: o } = K(), { id: l } = Ce(), r = n.node(l).childNodes().map((a) => n.node(a).get());
|
|
1021
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
1022
|
+
/* @__PURE__ */ e(Qe, { onDragEnd: (a) => {
|
|
1023
|
+
const { source: c, destination: h } = a;
|
|
1024
|
+
if (!h || c.index === h.index) return;
|
|
1025
|
+
const C = r.at(c.index);
|
|
1026
|
+
C && o.move({ nodeId: C.id, sourceIndex: c.index, destinationIndex: h.index });
|
|
1027
|
+
}, children: /* @__PURE__ */ e(Ye, { droppableId: l, children: (a) => /* @__PURE__ */ u("div", { ref: a.innerRef, ...a.droppableProps, className: "tw:flex tw:flex-col tw:gap-2", children: [
|
|
1028
|
+
r.map((c, h) => /* @__PURE__ */ e(It, { node: c, nodeIndex: h }, c.id)),
|
|
1029
|
+
a.placeholder
|
|
1030
|
+
] }) }) }),
|
|
1031
|
+
/* @__PURE__ */ e(X, { className: "tw:mt-2", onClick: () => {
|
|
1032
|
+
const a = n.parseReactElement(t()).toNodeTree();
|
|
1033
|
+
o.addNodeTree(a, l);
|
|
1034
|
+
}, fullWidth: !0, prefix: /* @__PURE__ */ e(m, { size: 16, source: ce }), children: "Add more" })
|
|
1035
|
+
] });
|
|
1036
|
+
}, 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>', Rt = '<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>', At = [
|
|
1037
|
+
{
|
|
1038
|
+
value: "none",
|
|
1039
|
+
icon: te
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
value: "solid",
|
|
1043
|
+
icon: jt
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
value: "dashed",
|
|
1047
|
+
icon: Zt
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
value: "dotted",
|
|
1051
|
+
icon: Rt
|
|
1052
|
+
}
|
|
1053
|
+
], y1 = ({ responsive: t = !0, value: n, onChange: o }) => {
|
|
1054
|
+
const l = n?.borderBottomWidth ?? 0, r = n?.borderTopWidth ?? 0, i = n?.borderLeftWidth ?? 0, s = n?.borderRightWidth ?? 0, a = (d = "none") => {
|
|
1055
|
+
o?.(
|
|
1056
|
+
d === "none" ? {
|
|
1057
|
+
borderStyle: void 0,
|
|
1058
|
+
borderColor: void 0,
|
|
1059
|
+
borderTopWidth: void 0,
|
|
1060
|
+
borderRightWidth: void 0,
|
|
1061
|
+
borderBottomWidth: void 0,
|
|
1062
|
+
borderLeftWidth: void 0
|
|
1063
|
+
} : {
|
|
1064
|
+
...n,
|
|
1065
|
+
borderStyle: d,
|
|
1066
|
+
borderBottomWidth: n?.borderBottomWidth ?? 1,
|
|
1067
|
+
borderLeftWidth: n?.borderLeftWidth ?? 1,
|
|
1068
|
+
borderRightWidth: n?.borderRightWidth ?? 1,
|
|
1069
|
+
borderTopWidth: n?.borderTopWidth ?? 1
|
|
1070
|
+
}
|
|
1071
|
+
);
|
|
1072
|
+
}, c = n?.borderStyle ?? "none", h = /* @__PURE__ */ e("span", { className: "tw:text-xs tw:text-ic-white-3s", children: "|" }), C = (d) => {
|
|
1073
|
+
d.target.select();
|
|
1074
|
+
}, w = (d) => {
|
|
1075
|
+
const g = isNaN(d.target.valueAsNumber) ? void 0 : d.target.valueAsNumber;
|
|
1076
|
+
o?.({
|
|
1077
|
+
...n,
|
|
1078
|
+
[d.target.name]: g
|
|
1079
|
+
});
|
|
1080
|
+
};
|
|
1081
|
+
return /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-2", children: [
|
|
1082
|
+
/* @__PURE__ */ e(b, { responsive: t, name: "Border", children: /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
|
|
1083
|
+
c !== "none" && /* @__PURE__ */ e(ee, { onChange: (d) => {
|
|
1084
|
+
o?.({
|
|
1085
|
+
...n,
|
|
1086
|
+
borderColor: d
|
|
1087
|
+
});
|
|
1088
|
+
}, color: n?.borderColor }),
|
|
1089
|
+
/* @__PURE__ */ e(V, { value: c, onSelectionChange: a, children: At.map((d) => /* @__PURE__ */ e(f, { value: d.value, children: /* @__PURE__ */ e(m, { source: d.icon }) }, d.value)) })
|
|
1090
|
+
] }) }),
|
|
1091
|
+
c !== "none" && /* @__PURE__ */ e("div", { className: "tw:flex tw:justify-end", children: /* @__PURE__ */ e("div", { className: "tw:flex tw:items-center tw:gap-1", children: /* @__PURE__ */ u("div", { className: "tw:flex-1 tw:flex tw:items-center tw:gap-0.5 tw:py-0.5 tw:bg-ic-white-1s tw:rounded-lg tw:px-2", children: [
|
|
1092
|
+
/* @__PURE__ */ e(
|
|
1093
|
+
N,
|
|
1094
|
+
{
|
|
1095
|
+
value: r,
|
|
1096
|
+
onChange: w,
|
|
1097
|
+
name: "borderTopWidth",
|
|
1098
|
+
onFocus: C,
|
|
1099
|
+
classes: {
|
|
1100
|
+
main: "bg-transparent px-1"
|
|
1101
|
+
},
|
|
1102
|
+
size: "28",
|
|
1103
|
+
placeholder: "Top",
|
|
1104
|
+
className: "tw:text-center"
|
|
1105
|
+
}
|
|
1106
|
+
),
|
|
1107
|
+
h,
|
|
1108
|
+
/* @__PURE__ */ e(
|
|
1109
|
+
N,
|
|
1110
|
+
{
|
|
1111
|
+
value: s,
|
|
1112
|
+
name: "borderRightWidth",
|
|
1113
|
+
placeholder: "Right",
|
|
1114
|
+
onChange: w,
|
|
1115
|
+
onFocus: C,
|
|
1116
|
+
classes: {
|
|
1117
|
+
main: "bg-transparent px-1"
|
|
1118
|
+
},
|
|
1119
|
+
size: "28",
|
|
1120
|
+
className: "tw:text-center"
|
|
1121
|
+
}
|
|
1122
|
+
),
|
|
1123
|
+
h,
|
|
1124
|
+
/* @__PURE__ */ e(
|
|
1125
|
+
N,
|
|
1126
|
+
{
|
|
1127
|
+
value: l,
|
|
1128
|
+
name: "borderBottomWidth",
|
|
1129
|
+
onChange: w,
|
|
1130
|
+
placeholder: "Bottom",
|
|
1131
|
+
onFocus: C,
|
|
1132
|
+
classes: {
|
|
1133
|
+
main: "bg-transparent px-1"
|
|
1134
|
+
},
|
|
1135
|
+
size: "28",
|
|
1136
|
+
className: "tw:text-center"
|
|
1137
|
+
}
|
|
1138
|
+
),
|
|
1139
|
+
h,
|
|
1140
|
+
/* @__PURE__ */ e(
|
|
1141
|
+
N,
|
|
1142
|
+
{
|
|
1143
|
+
value: i,
|
|
1144
|
+
name: "borderLeftWidth",
|
|
1145
|
+
onChange: w,
|
|
1146
|
+
onFocus: C,
|
|
1147
|
+
placeholder: "Left",
|
|
1148
|
+
classes: {
|
|
1149
|
+
main: "bg-transparent px-1"
|
|
1150
|
+
},
|
|
1151
|
+
size: "28",
|
|
1152
|
+
className: "tw:text-center"
|
|
1153
|
+
}
|
|
1154
|
+
)
|
|
1155
|
+
] }) }) })
|
|
1156
|
+
] });
|
|
1157
|
+
}, ne = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1158
|
+
<path d="M13.78 4L10.22 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1159
|
+
<path d="M18 8L22 12L18 16" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1160
|
+
<path d="M6 16L2 12L6 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1161
|
+
</svg>
|
|
1162
|
+
`, 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>', St = '<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>', Wt = `<svg width="24" height="24" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
|
1163
|
+
<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" />
|
|
1164
|
+
</svg>
|
|
1165
|
+
`, zt = '<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>', H = 9999, I1 = ({ value: t, onChange: n, name: o, responsive: l = !0 }) => {
|
|
1166
|
+
const [r, i] = L(!1), s = Object.values(t ?? {}).every((w) => (w ?? 0) === 0), a = Object.values(t ?? {}).every((w) => (w ?? 0) === H), c = !s && !a, h = (w) => {
|
|
1167
|
+
const p = isNaN(w.target.valueAsNumber) ? void 0 : w.target.valueAsNumber;
|
|
1168
|
+
n?.({
|
|
1169
|
+
...t,
|
|
1170
|
+
[w.target.name]: p
|
|
1171
|
+
});
|
|
1172
|
+
}, C = (w) => {
|
|
1173
|
+
n?.({
|
|
1174
|
+
borderBottomLeftRadius: void 0,
|
|
1175
|
+
borderBottomRightRadius: void 0,
|
|
1176
|
+
borderTopLeftRadius: void 0,
|
|
1177
|
+
borderTopRightRadius: void 0,
|
|
1178
|
+
...JSON.parse(w.currentTarget.value)
|
|
1179
|
+
});
|
|
1180
|
+
};
|
|
1181
|
+
return /* @__PURE__ */ e(b, { name: o ?? "Corner", responsive: l, children: /* @__PURE__ */ u(E, { open: r, onOpenChange: i, placement: "right", children: [
|
|
1182
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ u(
|
|
1183
|
+
"div",
|
|
1184
|
+
{
|
|
1185
|
+
className: x(
|
|
1186
|
+
"tw:h-8 tw:bg-ic-white-1s tw:w-1/2 tw:rounded-lg tw:px-2 tw:flex tw:items-center tw:gap-2 tw:cursor-pointer",
|
|
1187
|
+
{
|
|
1188
|
+
"tw:bg-ic-black-7s": r
|
|
1189
|
+
}
|
|
1190
|
+
),
|
|
1191
|
+
children: [
|
|
1192
|
+
/* @__PURE__ */ u("span", { className: "tw:text-xs tw:flex-1 tw:truncate", children: [
|
|
1193
|
+
a && /* @__PURE__ */ e(P, { children: "Full" }),
|
|
1194
|
+
c && /* @__PURE__ */ e(P, { children: [
|
|
1195
|
+
t?.borderTopLeftRadius ?? "-",
|
|
1196
|
+
t?.borderTopRightRadius ?? "-",
|
|
1197
|
+
t?.borderBottomLeftRadius ?? "-",
|
|
1198
|
+
t?.borderBottomRightRadius ?? "-"
|
|
1199
|
+
].join(", ") }),
|
|
1200
|
+
s && /* @__PURE__ */ e(P, { children: "None" })
|
|
1201
|
+
] }),
|
|
1202
|
+
/* @__PURE__ */ e(
|
|
1203
|
+
m,
|
|
1204
|
+
{
|
|
1205
|
+
className: x("tw:transition-transform", {
|
|
1206
|
+
"tw:-rotate-180": r
|
|
1207
|
+
}),
|
|
1208
|
+
source: G
|
|
1209
|
+
}
|
|
1210
|
+
)
|
|
1211
|
+
]
|
|
1212
|
+
}
|
|
1213
|
+
) }),
|
|
1214
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ u("div", { children: [
|
|
1215
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:justify-between tw:gap-2", children: [
|
|
1216
|
+
/* @__PURE__ */ e("span", { className: "tw:font-medium", children: "Corner" }),
|
|
1217
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(m, { source: T }) }) })
|
|
1218
|
+
] }),
|
|
1219
|
+
/* @__PURE__ */ e("hr", { className: "tw:border-ic-white-1s tw:my-2" }),
|
|
1220
|
+
/* @__PURE__ */ u("div", { style: { maxWidth: 256 }, className: "tw:flex tw:gap-2", children: [
|
|
1221
|
+
/* @__PURE__ */ u("div", { className: "tw:grid tw:grid-cols-12 tw:bg-ic-white-1s tw:p-4 tw:gap-x-4 tw:gap-y-1 tw:rounded-lg tw:relative tw:flex-1", children: [
|
|
1222
|
+
/* @__PURE__ */ e(
|
|
1223
|
+
m,
|
|
1224
|
+
{
|
|
1225
|
+
className: "tw:rotate-90 tw:absolute tw:top-1 tw:left-1",
|
|
1226
|
+
size: 16,
|
|
1227
|
+
source: W
|
|
1228
|
+
}
|
|
1229
|
+
),
|
|
1230
|
+
/* @__PURE__ */ e(
|
|
1231
|
+
m,
|
|
1232
|
+
{
|
|
1233
|
+
className: "tw:rotate-180 tw:absolute tw:top-1 tw:right-1",
|
|
1234
|
+
size: 16,
|
|
1235
|
+
source: W
|
|
1236
|
+
}
|
|
1237
|
+
),
|
|
1238
|
+
/* @__PURE__ */ e(
|
|
1239
|
+
m,
|
|
1240
|
+
{
|
|
1241
|
+
className: "tw:-rotate-90 tw:absolute tw:bottom-1 tw:right-1",
|
|
1242
|
+
size: 16,
|
|
1243
|
+
source: W
|
|
1244
|
+
}
|
|
1245
|
+
),
|
|
1246
|
+
/* @__PURE__ */ e(
|
|
1247
|
+
m,
|
|
1248
|
+
{
|
|
1249
|
+
className: "tw:rotate-0 tw:absolute tw:bottom-1 tw:left-1",
|
|
1250
|
+
size: 16,
|
|
1251
|
+
source: W
|
|
1252
|
+
}
|
|
1253
|
+
),
|
|
1254
|
+
/* @__PURE__ */ e("div", { className: "tw:col-span-6", children: /* @__PURE__ */ e(
|
|
1255
|
+
N,
|
|
1256
|
+
{
|
|
1257
|
+
onChange: h,
|
|
1258
|
+
selectOnFocus: !0,
|
|
1259
|
+
name: "borderTopLeftRadius",
|
|
1260
|
+
mode: "onBlur",
|
|
1261
|
+
max: H,
|
|
1262
|
+
className: "tw:text-center",
|
|
1263
|
+
value: t?.borderTopLeftRadius ?? 0
|
|
1264
|
+
}
|
|
1265
|
+
) }),
|
|
1266
|
+
/* @__PURE__ */ e("div", { className: "tw:col-span-6", children: /* @__PURE__ */ e(
|
|
1267
|
+
N,
|
|
1268
|
+
{
|
|
1269
|
+
onChange: h,
|
|
1270
|
+
name: "borderTopRightRadius",
|
|
1271
|
+
selectOnFocus: !0,
|
|
1272
|
+
mode: "onBlur",
|
|
1273
|
+
max: H,
|
|
1274
|
+
className: "tw:text-center",
|
|
1275
|
+
value: t?.borderTopRightRadius ?? 0
|
|
1276
|
+
}
|
|
1277
|
+
) }),
|
|
1278
|
+
/* @__PURE__ */ e("div", { className: "tw:col-span-12 tw:flex tw:justify-center", children: /* @__PURE__ */ e("div", { className: "tw:bg-ic-black-7s tw:p-1 tw:rounded-lg", children: /* @__PURE__ */ e(m, { size: 16, source: ne }) }) }),
|
|
1279
|
+
/* @__PURE__ */ e("div", { className: "tw:col-span-6", children: /* @__PURE__ */ e(
|
|
1280
|
+
N,
|
|
1281
|
+
{
|
|
1282
|
+
onChange: h,
|
|
1283
|
+
name: "borderBottomLeftRadius",
|
|
1284
|
+
selectOnFocus: !0,
|
|
1285
|
+
mode: "onBlur",
|
|
1286
|
+
max: H,
|
|
1287
|
+
className: "tw:text-center",
|
|
1288
|
+
value: t?.borderBottomLeftRadius ?? 0
|
|
1289
|
+
}
|
|
1290
|
+
) }),
|
|
1291
|
+
/* @__PURE__ */ e("div", { className: "tw:col-span-6", children: /* @__PURE__ */ e(
|
|
1292
|
+
N,
|
|
1293
|
+
{
|
|
1294
|
+
onChange: h,
|
|
1295
|
+
name: "borderBottomRightRadius",
|
|
1296
|
+
selectOnFocus: !0,
|
|
1297
|
+
mode: "onBlur",
|
|
1298
|
+
max: H,
|
|
1299
|
+
className: "tw:text-center",
|
|
1300
|
+
value: t?.borderBottomRightRadius ?? 0
|
|
1301
|
+
}
|
|
1302
|
+
) })
|
|
1303
|
+
] }),
|
|
1304
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:justify-between", children: [
|
|
1305
|
+
/* @__PURE__ */ e(
|
|
1306
|
+
f,
|
|
1307
|
+
{
|
|
1308
|
+
onClick: C,
|
|
1309
|
+
disabled: s,
|
|
1310
|
+
value: JSON.stringify({}),
|
|
1311
|
+
children: /* @__PURE__ */ e(
|
|
1312
|
+
m,
|
|
1313
|
+
{
|
|
1314
|
+
className: x("tw:text-ic-white-3s", {
|
|
1315
|
+
"tw:text-ic-white-6s": s
|
|
1316
|
+
}),
|
|
1317
|
+
source: Wt
|
|
1318
|
+
}
|
|
1319
|
+
)
|
|
1320
|
+
}
|
|
1321
|
+
),
|
|
1322
|
+
/* @__PURE__ */ e(
|
|
1323
|
+
f,
|
|
1324
|
+
{
|
|
1325
|
+
onClick: C,
|
|
1326
|
+
disabled: c,
|
|
1327
|
+
value: JSON.stringify({
|
|
1328
|
+
borderBottomLeftRadius: 8,
|
|
1329
|
+
borderBottomRightRadius: 8,
|
|
1330
|
+
borderTopLeftRadius: 8,
|
|
1331
|
+
borderTopRightRadius: 8
|
|
1332
|
+
}),
|
|
1333
|
+
children: /* @__PURE__ */ e(
|
|
1334
|
+
m,
|
|
1335
|
+
{
|
|
1336
|
+
className: x("tw:text-ic-white-3s", {
|
|
1337
|
+
"tw:text-ic-white-6s": c
|
|
1338
|
+
}),
|
|
1339
|
+
source: zt
|
|
1340
|
+
}
|
|
1341
|
+
)
|
|
1342
|
+
}
|
|
1343
|
+
),
|
|
1344
|
+
/* @__PURE__ */ e(
|
|
1345
|
+
f,
|
|
1346
|
+
{
|
|
1347
|
+
onClick: C,
|
|
1348
|
+
disabled: a,
|
|
1349
|
+
value: JSON.stringify({
|
|
1350
|
+
borderBottomLeftRadius: H,
|
|
1351
|
+
borderBottomRightRadius: H,
|
|
1352
|
+
borderTopLeftRadius: H,
|
|
1353
|
+
borderTopRightRadius: H
|
|
1354
|
+
}),
|
|
1355
|
+
children: /* @__PURE__ */ e(
|
|
1356
|
+
m,
|
|
1357
|
+
{
|
|
1358
|
+
className: x("tw:text-ic-white-3s", {
|
|
1359
|
+
"tw:text-ic-white-6s": a
|
|
1360
|
+
}),
|
|
1361
|
+
source: St
|
|
1362
|
+
}
|
|
1363
|
+
)
|
|
1364
|
+
}
|
|
1365
|
+
)
|
|
1366
|
+
] })
|
|
1367
|
+
] })
|
|
1368
|
+
] }) })
|
|
1369
|
+
] }) });
|
|
1370
|
+
}, Pt = [
|
|
1371
|
+
{
|
|
1372
|
+
value: "6xl",
|
|
1373
|
+
label: "Heading 1"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
value: "5xl",
|
|
1377
|
+
label: "Heading 2"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
value: "4xl",
|
|
1381
|
+
label: "Heading 3"
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
value: "3xl",
|
|
1385
|
+
label: "Heading 4"
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
value: "2xl",
|
|
1389
|
+
label: "Heading 5"
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
value: "xl",
|
|
1393
|
+
label: "Heading 6"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
value: "lg",
|
|
1397
|
+
label: "Large"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
value: "base",
|
|
1401
|
+
label: "Base"
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
value: "sm",
|
|
1405
|
+
label: "Small"
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
value: "xs",
|
|
1409
|
+
label: "Extra Small"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
value: "auto",
|
|
1413
|
+
label: "Auto"
|
|
1414
|
+
}
|
|
1415
|
+
], Z1 = ({ value: t, onChange: n, responsive: o = !0 }) => /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e(b, { responsive: o, name: "Variant", children: /* @__PURE__ */ e(
|
|
1416
|
+
A,
|
|
1417
|
+
{
|
|
1418
|
+
placement: "bottom-end",
|
|
1419
|
+
onChange: (r) => {
|
|
1420
|
+
n?.(r === "auto" ? void 0 : r);
|
|
1421
|
+
},
|
|
1422
|
+
className: "tw:w-1/2",
|
|
1423
|
+
listProps: {
|
|
1424
|
+
style: {
|
|
1425
|
+
height: "auto"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
value: t ?? "auto",
|
|
1429
|
+
options: Pt
|
|
1430
|
+
}
|
|
1431
|
+
) }) }), Ot = [
|
|
1432
|
+
{
|
|
1433
|
+
label: "Extra light",
|
|
1434
|
+
value: 200
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
label: "Light",
|
|
1438
|
+
value: 300
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
label: "Normal",
|
|
1442
|
+
value: 400
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
label: "Medium",
|
|
1446
|
+
value: 500
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
label: "Semi bold",
|
|
1450
|
+
value: 600
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
label: "Bold",
|
|
1454
|
+
value: 700
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
label: "Extra bold",
|
|
1458
|
+
value: 800
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
label: "Auto",
|
|
1462
|
+
value: "auto"
|
|
1463
|
+
}
|
|
1464
|
+
], R1 = ({ value: t, responsive: n, name: o, onChange: l }) => /* @__PURE__ */ e(b, { responsive: n, name: o ?? "Font weight", children: /* @__PURE__ */ e(
|
|
1465
|
+
A,
|
|
1466
|
+
{
|
|
1467
|
+
onChange: (i) => {
|
|
1468
|
+
l?.({
|
|
1469
|
+
fontWeight: i === "auto" ? void 0 : i
|
|
1470
|
+
});
|
|
1471
|
+
},
|
|
1472
|
+
value: t?.fontWeight ?? "auto",
|
|
1473
|
+
options: Ot,
|
|
1474
|
+
className: "tw:w-1/2",
|
|
1475
|
+
listProps: {
|
|
1476
|
+
style: {
|
|
1477
|
+
height: "auto"
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
) }), j1 = ({ value: t, name: n, onChange: o, availableTags: l }) => {
|
|
1482
|
+
const r = l.map((i) => ({
|
|
1483
|
+
value: i,
|
|
1484
|
+
label: i
|
|
1485
|
+
}));
|
|
1486
|
+
return /* @__PURE__ */ e(b, { name: n ?? "HTML tag", children: /* @__PURE__ */ e(
|
|
1487
|
+
A,
|
|
1488
|
+
{
|
|
1489
|
+
onChange: o,
|
|
1490
|
+
value: t ?? null,
|
|
1491
|
+
options: r,
|
|
1492
|
+
className: "tw:w-1/2",
|
|
1493
|
+
listProps: {
|
|
1494
|
+
style: {
|
|
1495
|
+
height: "auto"
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
) });
|
|
1500
|
+
}, Ft = ["cover", "contain"], A1 = ({ name: t, responsive: n = !1, value: o, onChange: l }) => {
|
|
1501
|
+
const r = (i) => {
|
|
1502
|
+
l?.({
|
|
1503
|
+
objectFit: i.currentTarget.value
|
|
1504
|
+
});
|
|
1505
|
+
};
|
|
1506
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Image scale", children: /* @__PURE__ */ e("div", { className: "tw:flex tw:items-center tw:gap-2", children: Ft.map((i) => {
|
|
1507
|
+
const s = o?.objectFit === i;
|
|
1508
|
+
return /* @__PURE__ */ e(
|
|
1509
|
+
"button",
|
|
1510
|
+
{
|
|
1511
|
+
onClick: r,
|
|
1512
|
+
value: i,
|
|
1513
|
+
className: x("tw:p-1.5 tw:border tw:rounded tw:border-ic-white-2s tw:text-ic-white-4s", {
|
|
1514
|
+
"tw:text-ic-white-6s tw:border-ic-white-5s": s
|
|
1515
|
+
}),
|
|
1516
|
+
children: /* @__PURE__ */ u("div", { className: "tw:h-8 tw:w-12 tw:rounded tw:overflow-hidden tw:relative tw:flex tw:justify-center tw:items-center", children: [
|
|
1517
|
+
/* @__PURE__ */ e(
|
|
1518
|
+
"div",
|
|
1519
|
+
{
|
|
1520
|
+
className: x("tw:bg-ic-white-1s tw:flex tw:items-center tw:justify-center", {
|
|
1521
|
+
"tw:w-8 tw:h-8": i === "contain",
|
|
1522
|
+
"tw:w-full tw:h-full": i === "cover",
|
|
1523
|
+
"tw:w-6 tw:h-6 tw:rounded-sm": i === "fill"
|
|
1524
|
+
}),
|
|
1525
|
+
children: /* @__PURE__ */ e(m, { source: xe })
|
|
1526
|
+
}
|
|
1527
|
+
),
|
|
1528
|
+
/* @__PURE__ */ e(
|
|
1529
|
+
"div",
|
|
1530
|
+
{
|
|
1531
|
+
className: x(
|
|
1532
|
+
"tw:absolute tw:inset-0 tw:border tw:rounded tw:pointer-events-none tw:border-ic-white-1s",
|
|
1533
|
+
{
|
|
1534
|
+
"tw:border-ic-white-2s": s
|
|
1535
|
+
}
|
|
1536
|
+
)
|
|
1537
|
+
}
|
|
1538
|
+
)
|
|
1539
|
+
] })
|
|
1540
|
+
},
|
|
1541
|
+
i
|
|
1542
|
+
);
|
|
1543
|
+
}) }) });
|
|
1544
|
+
}, ke = ({
|
|
1545
|
+
name: t,
|
|
1546
|
+
responsive: n,
|
|
1547
|
+
onChange: o,
|
|
1548
|
+
value: l,
|
|
1549
|
+
min: r = 0,
|
|
1550
|
+
max: i = Number.MAX_SAFE_INTEGER,
|
|
1551
|
+
adjustment: s
|
|
1552
|
+
}) => {
|
|
1553
|
+
const a = Y(l) ? Number(l) : l, c = s?.minimumUnit ?? 1, h = s?.fallback ?? 0, C = (d) => {
|
|
1554
|
+
const g = isNaN(d.target.valueAsNumber) ? void 0 : d.target.valueAsNumber;
|
|
1555
|
+
o?.(g);
|
|
1556
|
+
}, w = (d) => {
|
|
1557
|
+
d.stopPropagation(), o?.(Math.min((a ?? h) + c, i));
|
|
1558
|
+
}, p = (d) => {
|
|
1559
|
+
d.stopPropagation(), o?.(Math.max((a ?? h) - c, r));
|
|
1560
|
+
};
|
|
1561
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t, children: /* @__PURE__ */ e(
|
|
1562
|
+
N,
|
|
1563
|
+
{
|
|
1564
|
+
onChange: C,
|
|
1565
|
+
mode: "onBlur",
|
|
1566
|
+
className: "tw:text-center",
|
|
1567
|
+
classes: { container: "tw:w-1/2" },
|
|
1568
|
+
value: l ?? "",
|
|
1569
|
+
prefix: /* @__PURE__ */ e(f, { disabled: he(l) && l <= r, onClick: p, children: /* @__PURE__ */ e(m, { source: Ae }) }),
|
|
1570
|
+
suffix: /* @__PURE__ */ e(f, { onClick: w, children: /* @__PURE__ */ e(m, { source: ce }) })
|
|
1571
|
+
}
|
|
1572
|
+
) });
|
|
1573
|
+
}, S1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => {
|
|
1574
|
+
const r = (i) => {
|
|
1575
|
+
l?.({
|
|
1576
|
+
...o,
|
|
1577
|
+
columnGap: i
|
|
1578
|
+
});
|
|
1579
|
+
};
|
|
1580
|
+
return /* @__PURE__ */ e(
|
|
1581
|
+
ke,
|
|
1582
|
+
{
|
|
1583
|
+
name: t ?? "Column gap",
|
|
1584
|
+
adjustment: {
|
|
1585
|
+
minimumUnit: 2
|
|
1586
|
+
},
|
|
1587
|
+
responsive: n,
|
|
1588
|
+
value: o?.columnGap,
|
|
1589
|
+
onChange: r
|
|
1590
|
+
}
|
|
1591
|
+
);
|
|
1592
|
+
}, W1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => {
|
|
1593
|
+
const r = (i) => {
|
|
1594
|
+
l?.({
|
|
1595
|
+
...o,
|
|
1596
|
+
rowGap: i
|
|
1597
|
+
});
|
|
1598
|
+
};
|
|
1599
|
+
return /* @__PURE__ */ e(
|
|
1600
|
+
ke,
|
|
1601
|
+
{
|
|
1602
|
+
adjustment: {
|
|
1603
|
+
minimumUnit: 2
|
|
1604
|
+
},
|
|
1605
|
+
name: t ?? "Row gap",
|
|
1606
|
+
responsive: n,
|
|
1607
|
+
value: o?.rowGap,
|
|
1608
|
+
onChange: r
|
|
1609
|
+
}
|
|
1610
|
+
);
|
|
1611
|
+
}, Dt = ({ onChange: t }) => /* @__PURE__ */ e(
|
|
1612
|
+
Oe,
|
|
1613
|
+
{
|
|
1614
|
+
accept: {
|
|
1615
|
+
svg: [".svg"]
|
|
1616
|
+
},
|
|
1617
|
+
multiple: !1,
|
|
1618
|
+
onDrop: (o) => {
|
|
1619
|
+
const l = o.at(0);
|
|
1620
|
+
if (!l) return;
|
|
1621
|
+
const r = new FileReader();
|
|
1622
|
+
r.onload = (i) => {
|
|
1623
|
+
const s = i.target?.result;
|
|
1624
|
+
Y(s) && t?.(s);
|
|
1625
|
+
}, r.readAsText(l);
|
|
1626
|
+
},
|
|
1627
|
+
children: () => /* @__PURE__ */ u("div", { className: "tw:aspect-video tw:flex tw:flex-col tw:items-center tw:justify-center tw:gap-2 tw:border tw:border-ic-white-1s tw:hover:border-ic-white-2s tw:cursor-pointer tw:rounded-md", children: [
|
|
1628
|
+
/* @__PURE__ */ e(m, { size: 40, source: be }),
|
|
1629
|
+
/* @__PURE__ */ e("p", { className: "tw:text-xs", children: "Upload SVG file" })
|
|
1630
|
+
] })
|
|
1631
|
+
}
|
|
1632
|
+
), z1 = ({ source: t, onChange: n, name: o }) => /* @__PURE__ */ e(b, { name: o ?? "Choose icon", children: /* @__PURE__ */ u(E, { placement: "right-start", children: [
|
|
1633
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(f, { className: "tw:bg-ic-white-1s", size: "28", children: /* @__PURE__ */ e(m, { size: 20, source: t ?? "" }) }) }),
|
|
1634
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-3", children: [
|
|
1635
|
+
/* @__PURE__ */ e("h6", { className: "tw:text-sm tw:font-medium", children: "Choose icon" }),
|
|
1636
|
+
/* @__PURE__ */ e("div", { className: "tw:w-80", children: /* @__PURE__ */ e(Dt, { onChange: n }) })
|
|
1637
|
+
] }) })
|
|
1638
|
+
] }) }), Ne = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1639
|
+
<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>
|
|
1640
|
+
<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>
|
|
1641
|
+
<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>
|
|
1642
|
+
</svg>`, Le = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1643
|
+
<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>
|
|
1644
|
+
</svg>`, O = '<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>', oe = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1645
|
+
<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>
|
|
1646
|
+
<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>
|
|
1647
|
+
<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>
|
|
1648
|
+
<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>
|
|
1649
|
+
</svg>`, re = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1650
|
+
<path d="M2.00293 14.498L15.0037 14.498" stroke="currentColor" stroke-linecap="round"></path>
|
|
1651
|
+
<path d="M2.00293 1.49805L15.0037 1.49805" stroke="currentColor" stroke-linecap="round"></path>
|
|
1652
|
+
<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>
|
|
1653
|
+
<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>
|
|
1654
|
+
</svg>`, Me = `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1655
|
+
<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>
|
|
1656
|
+
<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>
|
|
1657
|
+
<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>
|
|
1658
|
+
</svg>`, P1 = ({
|
|
1659
|
+
name: t,
|
|
1660
|
+
responsive: n = !0,
|
|
1661
|
+
value: o,
|
|
1662
|
+
onChange: l,
|
|
1663
|
+
blacklist: r,
|
|
1664
|
+
flexDirection: i = "row"
|
|
1665
|
+
}) => {
|
|
1666
|
+
const s = (() => {
|
|
1667
|
+
let c = [];
|
|
1668
|
+
switch (i) {
|
|
1669
|
+
case "row":
|
|
1670
|
+
c = [
|
|
1671
|
+
{
|
|
1672
|
+
label: "Top",
|
|
1673
|
+
value: "flex-start",
|
|
1674
|
+
icon: Me
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
label: "Center",
|
|
1678
|
+
value: "center",
|
|
1679
|
+
icon: Le
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
label: "Bottom",
|
|
1683
|
+
value: "flex-end",
|
|
1684
|
+
icon: Ne
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
label: "Stretch",
|
|
1688
|
+
value: "stretch",
|
|
1689
|
+
icon: re
|
|
1690
|
+
}
|
|
1691
|
+
];
|
|
1692
|
+
break;
|
|
1693
|
+
case "column":
|
|
1694
|
+
c = [
|
|
1695
|
+
{
|
|
1696
|
+
label: "Left",
|
|
1697
|
+
value: "flex-start",
|
|
1698
|
+
icon: F
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
label: "Center",
|
|
1702
|
+
value: "center",
|
|
1703
|
+
icon: O
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
label: "Right",
|
|
1707
|
+
value: "flex-end",
|
|
1708
|
+
icon: D
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
label: "Stretch",
|
|
1712
|
+
value: "stretch",
|
|
1713
|
+
icon: oe
|
|
1714
|
+
}
|
|
1715
|
+
];
|
|
1716
|
+
break;
|
|
1717
|
+
}
|
|
1718
|
+
return r?.length && (c = c.filter((h) => !r.includes(h.value))), c;
|
|
1719
|
+
})(), a = (c) => {
|
|
1720
|
+
l?.({
|
|
1721
|
+
alignItems: c
|
|
1722
|
+
});
|
|
1723
|
+
};
|
|
1724
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Align items", children: /* @__PURE__ */ e(V, { value: o?.alignItems, onSelectionChange: a, children: s.map((c) => /* @__PURE__ */ e(f, { value: c.value, children: /* @__PURE__ */ e(m, { source: c.icon }) }, c.value)) }) });
|
|
1725
|
+
}, O1 = ({
|
|
1726
|
+
name: t,
|
|
1727
|
+
responsive: n = !0,
|
|
1728
|
+
value: o,
|
|
1729
|
+
onChange: l,
|
|
1730
|
+
direction: r = "row"
|
|
1731
|
+
}) => {
|
|
1732
|
+
const i = (() => {
|
|
1733
|
+
switch (r) {
|
|
1734
|
+
case "row":
|
|
1735
|
+
return [
|
|
1736
|
+
{
|
|
1737
|
+
label: "Top",
|
|
1738
|
+
value: "flex-start",
|
|
1739
|
+
icon: F
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
label: "Center",
|
|
1743
|
+
value: "center",
|
|
1744
|
+
icon: O
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
label: "Bottom",
|
|
1748
|
+
value: "flex-end",
|
|
1749
|
+
icon: D
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
label: "Space between",
|
|
1753
|
+
value: "space-between",
|
|
1754
|
+
icon: oe
|
|
1755
|
+
}
|
|
1756
|
+
];
|
|
1757
|
+
case "column":
|
|
1758
|
+
return [
|
|
1759
|
+
{
|
|
1760
|
+
label: "Left",
|
|
1761
|
+
value: "flex-start",
|
|
1762
|
+
icon: F
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
label: "Center",
|
|
1766
|
+
value: "center",
|
|
1767
|
+
icon: O
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
label: "Right",
|
|
1771
|
+
value: "flex-end",
|
|
1772
|
+
icon: D
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
label: "Space between",
|
|
1776
|
+
value: "space-between",
|
|
1777
|
+
icon: re
|
|
1778
|
+
}
|
|
1779
|
+
];
|
|
1780
|
+
default:
|
|
1781
|
+
return [];
|
|
1782
|
+
}
|
|
1783
|
+
})(), s = (a) => {
|
|
1784
|
+
l?.({
|
|
1785
|
+
justifyContent: a
|
|
1786
|
+
});
|
|
1787
|
+
};
|
|
1788
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Justify content", children: /* @__PURE__ */ e(V, { value: o?.justifyContent, onSelectionChange: s, children: i.map((a) => /* @__PURE__ */ e(f, { value: a.value, children: /* @__PURE__ */ e(m, { source: a.icon }) }, a.value)) }) });
|
|
1789
|
+
}, Et = (t) => {
|
|
1790
|
+
const { main: n } = Re(t.value);
|
|
1791
|
+
return /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-2 tw:justify-between", children: [
|
|
1792
|
+
t.label,
|
|
1793
|
+
/* @__PURE__ */ e(
|
|
1794
|
+
"div",
|
|
1795
|
+
{
|
|
1796
|
+
className: "tw:rounded-full tw:w-4 tw:h-4",
|
|
1797
|
+
style: {
|
|
1798
|
+
backgroundColor: n
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
)
|
|
1802
|
+
] });
|
|
1803
|
+
}, F1 = (t) => /* @__PURE__ */ e(b, { name: "Color", children: /* @__PURE__ */ e(
|
|
1804
|
+
A,
|
|
1805
|
+
{
|
|
1806
|
+
checkedIcon: /* @__PURE__ */ e(P, {}),
|
|
1807
|
+
placement: "bottom-end",
|
|
1808
|
+
optionLabel: Et,
|
|
1809
|
+
options: lt,
|
|
1810
|
+
className: "tw:w-1/2",
|
|
1811
|
+
...t
|
|
1812
|
+
}
|
|
1813
|
+
) }), D1 = ({
|
|
1814
|
+
value: t,
|
|
1815
|
+
options: n,
|
|
1816
|
+
onChange: o,
|
|
1817
|
+
className: l
|
|
1818
|
+
}) => {
|
|
1819
|
+
const [r, i] = L(!1), s = (g) => {
|
|
1820
|
+
i(!0);
|
|
1821
|
+
}, a = () => {
|
|
1822
|
+
setTimeout(() => {
|
|
1823
|
+
i(!1);
|
|
1824
|
+
}, 100);
|
|
1825
|
+
}, c = (g) => {
|
|
1826
|
+
o?.(g);
|
|
1827
|
+
}, h = (g) => {
|
|
1828
|
+
const k = isNaN(g.target.valueAsNumber) ? void 0 : g.target.valueAsNumber;
|
|
1829
|
+
c(k);
|
|
1830
|
+
}, C = (g) => {
|
|
1831
|
+
c(g.currentTarget.getAttribute("value"));
|
|
1832
|
+
}, w = (g) => {
|
|
1833
|
+
g.stopPropagation(), c(void 0);
|
|
1834
|
+
}, p = he(t) ? t : void 0, d = Y(t) ? n?.find((g) => g.value === t)?.label ?? t : void 0;
|
|
1835
|
+
return /* @__PURE__ */ u("div", { className: x("tw:relative", l), children: [
|
|
1836
|
+
/* @__PURE__ */ e(
|
|
1837
|
+
N,
|
|
1838
|
+
{
|
|
1839
|
+
classes: {
|
|
1840
|
+
input: "text-center"
|
|
1841
|
+
},
|
|
1842
|
+
onFocus: s,
|
|
1843
|
+
onBlur: a,
|
|
1844
|
+
mode: "onBlur",
|
|
1845
|
+
placeholder: d,
|
|
1846
|
+
value: p ?? "",
|
|
1847
|
+
onChange: h
|
|
1848
|
+
}
|
|
1849
|
+
),
|
|
1850
|
+
!!n?.length && /* @__PURE__ */ u(j, { open: r, placement: "bottom-start", children: [
|
|
1851
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-x-0 tw:top-full" }) }),
|
|
1852
|
+
/* @__PURE__ */ e(Z, { children: n.map((g) => {
|
|
1853
|
+
const k = g.value === t;
|
|
1854
|
+
return /* @__PURE__ */ u(
|
|
1855
|
+
R,
|
|
1856
|
+
{
|
|
1857
|
+
className: "tw:justify-between",
|
|
1858
|
+
isActive: k,
|
|
1859
|
+
onClick: C,
|
|
1860
|
+
value: g.value,
|
|
1861
|
+
children: [
|
|
1862
|
+
g.label,
|
|
1863
|
+
k && (g.closeable ?? !1) && /* @__PURE__ */ e(f, { onClick: w, size: "20", children: /* @__PURE__ */ e(m, { size: 16, source: T }) })
|
|
1864
|
+
]
|
|
1865
|
+
},
|
|
1866
|
+
g.value
|
|
1867
|
+
);
|
|
1868
|
+
}) })
|
|
1869
|
+
] })
|
|
1870
|
+
] });
|
|
1871
|
+
}, E1 = ({ propertyPath: t }) => {
|
|
1872
|
+
const { nodeProps: n, setNodeProps: o } = et(), l = t ? we(n, t) : null, r = (i) => {
|
|
1873
|
+
const s = {
|
|
1874
|
+
...l,
|
|
1875
|
+
[i.target.name]: i.target.checked ? void 0 : !1
|
|
1876
|
+
};
|
|
1877
|
+
if (!t) {
|
|
1878
|
+
o({});
|
|
1879
|
+
return;
|
|
1880
|
+
}
|
|
1881
|
+
const a = {};
|
|
1882
|
+
ue(a, t, s), o(a);
|
|
1883
|
+
};
|
|
1884
|
+
return /* @__PURE__ */ e("div", { className: "tw:flex tw:flex-col tw:gap-3", children: _.map((i) => /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:justify-between tw:gap-2", children: [
|
|
1885
|
+
/* @__PURE__ */ e("p", { className: "tw:text-xs tw:text-ic-white-5s", children: i.name }),
|
|
1886
|
+
/* @__PURE__ */ e(
|
|
1887
|
+
de,
|
|
1888
|
+
{
|
|
1889
|
+
onChange: r,
|
|
1890
|
+
name: i.size,
|
|
1891
|
+
checked: l?.[i.size] ?? !0
|
|
1892
|
+
}
|
|
1893
|
+
)
|
|
1894
|
+
] }, i.size)) });
|
|
1895
|
+
}, U1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => {
|
|
1896
|
+
const r = [
|
|
1897
|
+
{
|
|
1898
|
+
label: "Top",
|
|
1899
|
+
value: "start",
|
|
1900
|
+
icon: F
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
label: "Center",
|
|
1904
|
+
value: "center",
|
|
1905
|
+
icon: O
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
label: "Bottom",
|
|
1909
|
+
value: "end",
|
|
1910
|
+
icon: D
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
label: "Space between",
|
|
1914
|
+
value: "stretch",
|
|
1915
|
+
icon: oe
|
|
1916
|
+
}
|
|
1917
|
+
], i = (s) => {
|
|
1918
|
+
l?.({
|
|
1919
|
+
justifyItems: s === "stretch" ? void 0 : s
|
|
1920
|
+
});
|
|
1921
|
+
};
|
|
1922
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Justify items", children: /* @__PURE__ */ e(V, { value: o?.justifyItems ?? "stretch", onSelectionChange: i, children: r.map((s) => /* @__PURE__ */ e(f, { value: s.value, children: /* @__PURE__ */ e(m, { source: s.icon }) }, s.value)) }) });
|
|
1923
|
+
}, q1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => {
|
|
1924
|
+
const r = [
|
|
1925
|
+
{
|
|
1926
|
+
label: "Top",
|
|
1927
|
+
value: "start",
|
|
1928
|
+
icon: Me
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
label: "Center",
|
|
1932
|
+
value: "center",
|
|
1933
|
+
icon: Le
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
label: "Bottom",
|
|
1937
|
+
value: "end",
|
|
1938
|
+
icon: Ne
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
label: "Stretch",
|
|
1942
|
+
value: "stretch",
|
|
1943
|
+
icon: re
|
|
1944
|
+
}
|
|
1945
|
+
], i = (s) => {
|
|
1946
|
+
l?.({
|
|
1947
|
+
alignItems: s
|
|
1948
|
+
});
|
|
1949
|
+
};
|
|
1950
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Align items", children: /* @__PURE__ */ e(V, { value: o?.alignItems ?? "stretch", onSelectionChange: i, children: r.map((s) => /* @__PURE__ */ e(f, { value: s.value, children: /* @__PURE__ */ e(m, { source: s.icon }) }, s.value)) }) });
|
|
1951
|
+
}, G1 = ({
|
|
1952
|
+
suggestOptions: t,
|
|
1953
|
+
responsive: n = !0,
|
|
1954
|
+
name: o,
|
|
1955
|
+
value: l,
|
|
1956
|
+
onChange: r
|
|
1957
|
+
}) => {
|
|
1958
|
+
const i = [
|
|
1959
|
+
{
|
|
1960
|
+
label: "Original",
|
|
1961
|
+
value: "auto"
|
|
1962
|
+
/* Auto */
|
|
1963
|
+
},
|
|
1964
|
+
...t ?? [],
|
|
1965
|
+
{
|
|
1966
|
+
label: "Custom",
|
|
1967
|
+
value: "custom"
|
|
1968
|
+
/* Custom */
|
|
1969
|
+
}
|
|
1970
|
+
], s = y(l?.aspectRatio) ? "auto" : i.find((v) => v.value === l?.aspectRatio)?.value ?? "custom", [a, c] = L(
|
|
1971
|
+
s === "custom"
|
|
1972
|
+
/* Custom */
|
|
1973
|
+
), h = (v) => {
|
|
1974
|
+
v.target.select();
|
|
1975
|
+
}, C = (v = "auto") => {
|
|
1976
|
+
r?.({ aspectRatio: v === "auto" ? void 0 : v });
|
|
1977
|
+
}, w = (v) => {
|
|
1978
|
+
if (v === "custom") {
|
|
1979
|
+
c(!0);
|
|
1980
|
+
return;
|
|
1981
|
+
}
|
|
1982
|
+
c(!1), C(v);
|
|
1983
|
+
}, p = l?.aspectRatio?.toString().split("/") ?? [], d = le(p.at(0)), g = le(p.at(1)), k = (v) => {
|
|
1984
|
+
const M = isNaN(v.target.valueAsNumber) ? void 0 : v.target.valueAsNumber, S = {
|
|
1985
|
+
x: d ?? M,
|
|
1986
|
+
y: g ?? M,
|
|
1987
|
+
[v.target.name]: M
|
|
1988
|
+
}, He = y(S.x) || y(S.y) ? void 0 : `${S.x} / ${S.y}`;
|
|
1989
|
+
C(He);
|
|
1990
|
+
};
|
|
1991
|
+
return /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-2", children: [
|
|
1992
|
+
/* @__PURE__ */ e(b, { responsive: n, name: o ?? "Proportion", children: /* @__PURE__ */ e(
|
|
1993
|
+
A,
|
|
1994
|
+
{
|
|
1995
|
+
value: a ? "custom" : s,
|
|
1996
|
+
onChange: w,
|
|
1997
|
+
options: i,
|
|
1998
|
+
className: "tw:w-1/2"
|
|
1999
|
+
}
|
|
2000
|
+
) }),
|
|
2001
|
+
(s === "custom" || a) && /* @__PURE__ */ e("div", { className: "tw:flex tw:justify-end", children: /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-0.5 tw:py-0.5 tw:bg-ic-white-1s tw:rounded-lg tw:px-2 tw:w-1/2", children: [
|
|
2002
|
+
/* @__PURE__ */ e(
|
|
2003
|
+
N,
|
|
2004
|
+
{
|
|
2005
|
+
name: "x",
|
|
2006
|
+
onFocus: h,
|
|
2007
|
+
classes: {
|
|
2008
|
+
main: "bg-transparent px-1"
|
|
2009
|
+
},
|
|
2010
|
+
size: "28",
|
|
2011
|
+
value: d,
|
|
2012
|
+
onChange: k,
|
|
2013
|
+
mode: "onBlur",
|
|
2014
|
+
placeholder: "X",
|
|
2015
|
+
className: "tw:text-center"
|
|
2016
|
+
}
|
|
2017
|
+
),
|
|
2018
|
+
/* @__PURE__ */ e("span", { className: "tw:text-xs tw:text-ic-white-3s", children: "/" }),
|
|
2019
|
+
/* @__PURE__ */ e(
|
|
2020
|
+
N,
|
|
2021
|
+
{
|
|
2022
|
+
name: "y",
|
|
2023
|
+
placeholder: "Y",
|
|
2024
|
+
value: g,
|
|
2025
|
+
mode: "onBlur",
|
|
2026
|
+
onChange: k,
|
|
2027
|
+
onFocus: h,
|
|
2028
|
+
classes: {
|
|
2029
|
+
main: "bg-transparent px-1"
|
|
2030
|
+
},
|
|
2031
|
+
size: "28",
|
|
2032
|
+
className: "tw:text-center"
|
|
2033
|
+
}
|
|
2034
|
+
)
|
|
2035
|
+
] }) })
|
|
2036
|
+
] });
|
|
2037
|
+
}, J1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => {
|
|
2038
|
+
const [r, i] = L(!1), s = (p) => {
|
|
2039
|
+
const d = isNaN(p.target.valueAsNumber) ? void 0 : p.target.valueAsNumber;
|
|
2040
|
+
l?.({
|
|
2041
|
+
...o,
|
|
2042
|
+
[p.target.name]: d
|
|
2043
|
+
});
|
|
2044
|
+
}, a = (p) => {
|
|
2045
|
+
p.target.select();
|
|
2046
|
+
}, c = o?.paddingTop ?? 0, h = o?.paddingLeft ?? 0, C = o?.paddingRight ?? 0, w = o?.paddingBottom ?? 0;
|
|
2047
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Padding (px)", children: /* @__PURE__ */ u(E, { open: r, onOpenChange: i, placement: "right-start", children: [
|
|
2048
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ u(
|
|
2049
|
+
"div",
|
|
2050
|
+
{
|
|
2051
|
+
className: x(
|
|
2052
|
+
"tw:h-8 tw:bg-ic-white-1s tw:w-1/2 tw:rounded-lg tw:px-2 tw:flex tw:items-center tw:gap-2 tw:cursor-pointer",
|
|
2053
|
+
{
|
|
2054
|
+
"tw:bg-ic-black-7s": r
|
|
2055
|
+
}
|
|
2056
|
+
),
|
|
2057
|
+
children: [
|
|
2058
|
+
/* @__PURE__ */ e("span", { className: "tw:text-xs tw:flex-1 tw:truncate", children: [c, h, C, w].join(", ") }),
|
|
2059
|
+
/* @__PURE__ */ e(
|
|
2060
|
+
m,
|
|
2061
|
+
{
|
|
2062
|
+
className: x("tw:transition-transform", {
|
|
2063
|
+
"tw:-rotate-180": r
|
|
2064
|
+
}),
|
|
2065
|
+
source: G
|
|
2066
|
+
}
|
|
2067
|
+
)
|
|
2068
|
+
]
|
|
2069
|
+
}
|
|
2070
|
+
) }),
|
|
2071
|
+
/* @__PURE__ */ u(q, { children: [
|
|
2072
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:justify-between tw:gap-2", children: [
|
|
2073
|
+
/* @__PURE__ */ e("span", { className: "tw:font-medium", children: "Padding" }),
|
|
2074
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(m, { source: T }) }) })
|
|
2075
|
+
] }),
|
|
2076
|
+
/* @__PURE__ */ e("hr", { className: "tw:border-ic-white-1s tw:my-3" }),
|
|
2077
|
+
/* @__PURE__ */ u("div", { className: "tw:grid tw:grid-cols-3 tw:gap-2", style: { maxWidth: 256 }, children: [
|
|
2078
|
+
/* @__PURE__ */ e("div", { className: "tw:col-start-2", children: /* @__PURE__ */ e(
|
|
2079
|
+
N,
|
|
2080
|
+
{
|
|
2081
|
+
onFocus: a,
|
|
2082
|
+
onChange: s,
|
|
2083
|
+
mode: "onBlur",
|
|
2084
|
+
autoComplete: "off",
|
|
2085
|
+
name: "paddingTop",
|
|
2086
|
+
value: c,
|
|
2087
|
+
placeholder: "Top",
|
|
2088
|
+
className: "tw:text-center"
|
|
2089
|
+
}
|
|
2090
|
+
) }),
|
|
2091
|
+
/* @__PURE__ */ e("div", { className: "tw:col-start-1", children: /* @__PURE__ */ e(
|
|
2092
|
+
N,
|
|
2093
|
+
{
|
|
2094
|
+
onFocus: a,
|
|
2095
|
+
onChange: s,
|
|
2096
|
+
mode: "onBlur",
|
|
2097
|
+
autoComplete: "off",
|
|
2098
|
+
name: "paddingLeft",
|
|
2099
|
+
value: h,
|
|
2100
|
+
className: "tw:text-center",
|
|
2101
|
+
placeholder: "Left"
|
|
2102
|
+
}
|
|
2103
|
+
) }),
|
|
2104
|
+
/* @__PURE__ */ e("div", { className: "tw:flex tw:items-center tw:justify-center", children: /* @__PURE__ */ e(m, { source: ne }) }),
|
|
2105
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
2106
|
+
N,
|
|
2107
|
+
{
|
|
2108
|
+
onFocus: a,
|
|
2109
|
+
onChange: s,
|
|
2110
|
+
mode: "onBlur",
|
|
2111
|
+
autoComplete: "off",
|
|
2112
|
+
name: "paddingRight",
|
|
2113
|
+
value: C,
|
|
2114
|
+
className: "tw:text-center",
|
|
2115
|
+
placeholder: "Right"
|
|
2116
|
+
}
|
|
2117
|
+
) }),
|
|
2118
|
+
/* @__PURE__ */ e("div", { className: "tw:col-start-2", children: /* @__PURE__ */ e(
|
|
2119
|
+
N,
|
|
2120
|
+
{
|
|
2121
|
+
onFocus: a,
|
|
2122
|
+
mode: "onBlur",
|
|
2123
|
+
autoComplete: "off",
|
|
2124
|
+
name: "paddingBottom",
|
|
2125
|
+
value: w,
|
|
2126
|
+
onChange: s,
|
|
2127
|
+
className: "tw:text-center",
|
|
2128
|
+
placeholder: "Bottom"
|
|
2129
|
+
}
|
|
2130
|
+
) })
|
|
2131
|
+
] })
|
|
2132
|
+
] })
|
|
2133
|
+
] }) });
|
|
2134
|
+
}, _1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Order", children: /* @__PURE__ */ e("div", { className: "tw:w-1/2", children: /* @__PURE__ */ e(
|
|
2135
|
+
N,
|
|
2136
|
+
{
|
|
2137
|
+
step: 1,
|
|
2138
|
+
onFocus: (s) => {
|
|
2139
|
+
s.target.select();
|
|
2140
|
+
},
|
|
2141
|
+
onChange: (s) => {
|
|
2142
|
+
const a = isNaN(s.target.valueAsNumber) ? void 0 : s.target.valueAsNumber;
|
|
2143
|
+
l?.({
|
|
2144
|
+
order: a ?? 0
|
|
2145
|
+
});
|
|
2146
|
+
},
|
|
2147
|
+
value: o?.order ?? 0,
|
|
2148
|
+
className: "tw:text-center",
|
|
2149
|
+
mode: "onBlur",
|
|
2150
|
+
size: "32",
|
|
2151
|
+
min: 0
|
|
2152
|
+
}
|
|
2153
|
+
) }) }), $ = "auto", z = ({
|
|
2154
|
+
name: t,
|
|
2155
|
+
value: n,
|
|
2156
|
+
onChange: o
|
|
2157
|
+
}) => {
|
|
2158
|
+
const [l, r] = L(!1), i = [
|
|
2159
|
+
{
|
|
2160
|
+
label: "Auto",
|
|
2161
|
+
value: $
|
|
2162
|
+
}
|
|
2163
|
+
], s = () => {
|
|
2164
|
+
setTimeout(() => {
|
|
2165
|
+
r(!1);
|
|
2166
|
+
}, 100);
|
|
2167
|
+
}, a = (w) => {
|
|
2168
|
+
r(!0), w.target.select();
|
|
2169
|
+
}, c = (w) => {
|
|
2170
|
+
const p = isNaN(w.target.valueAsNumber) ? void 0 : w.target.valueAsNumber;
|
|
2171
|
+
o?.(t, p);
|
|
2172
|
+
}, h = (w) => {
|
|
2173
|
+
o?.(t, w.currentTarget.getAttribute("value") ?? void 0);
|
|
2174
|
+
}, C = (w) => {
|
|
2175
|
+
w.stopPropagation(), o?.(t);
|
|
2176
|
+
};
|
|
2177
|
+
return /* @__PURE__ */ u("div", { className: "tw:relative", children: [
|
|
2178
|
+
/* @__PURE__ */ e(
|
|
2179
|
+
N,
|
|
2180
|
+
{
|
|
2181
|
+
mode: "onBlur",
|
|
2182
|
+
onFocus: a,
|
|
2183
|
+
className: "tw:text-center",
|
|
2184
|
+
autoComplete: "off",
|
|
2185
|
+
fullWidth: !0,
|
|
2186
|
+
placeholder: n === $ ? "Auto" : void 0,
|
|
2187
|
+
value: n ?? 0,
|
|
2188
|
+
onBlur: s,
|
|
2189
|
+
name: t,
|
|
2190
|
+
onChange: c
|
|
2191
|
+
}
|
|
2192
|
+
),
|
|
2193
|
+
/* @__PURE__ */ u(j, { open: l, placement: "bottom-start", children: [
|
|
2194
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-x-0 tw:top-full" }) }),
|
|
2195
|
+
/* @__PURE__ */ e(Z, { children: i.map((w) => {
|
|
2196
|
+
const p = w.value === n;
|
|
2197
|
+
return /* @__PURE__ */ u(
|
|
2198
|
+
R,
|
|
2199
|
+
{
|
|
2200
|
+
onClick: h,
|
|
2201
|
+
className: "tw:justify-between",
|
|
2202
|
+
isActive: p,
|
|
2203
|
+
value: w.value,
|
|
2204
|
+
children: [
|
|
2205
|
+
w.label,
|
|
2206
|
+
p && /* @__PURE__ */ e(f, { size: "20", onClick: C, children: /* @__PURE__ */ e(m, { size: 16, source: T }) })
|
|
2207
|
+
]
|
|
2208
|
+
},
|
|
2209
|
+
w.value
|
|
2210
|
+
);
|
|
2211
|
+
}) })
|
|
2212
|
+
] })
|
|
2213
|
+
] });
|
|
2214
|
+
}, $1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => {
|
|
2215
|
+
const [r, i] = L(!1), s = (w, p) => {
|
|
2216
|
+
l?.({
|
|
2217
|
+
...o,
|
|
2218
|
+
[w]: p
|
|
2219
|
+
});
|
|
2220
|
+
}, a = o?.marginTop ?? 0, c = o?.marginLeft ?? 0, h = o?.marginRight ?? 0, C = o?.marginBottom ?? 0;
|
|
2221
|
+
return /* @__PURE__ */ e(b, { responsive: n, name: t ?? "Margin (px)", children: /* @__PURE__ */ u(E, { open: r, onOpenChange: i, placement: "right-start", children: [
|
|
2222
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ u(
|
|
2223
|
+
"div",
|
|
2224
|
+
{
|
|
2225
|
+
className: x(
|
|
2226
|
+
"tw:h-8 tw:bg-ic-white-1s tw:w-1/2 tw:rounded-lg tw:px-2 tw:flex tw:items-center tw:gap-2 tw:cursor-pointer",
|
|
2227
|
+
{
|
|
2228
|
+
"tw:bg-ic-black-7s": r
|
|
2229
|
+
}
|
|
2230
|
+
),
|
|
2231
|
+
children: [
|
|
2232
|
+
/* @__PURE__ */ e("span", { className: "tw:text-xs tw:flex-1 tw:truncate", children: [a, c, h, C].map((w) => w === $ ? "Auto" : w).join(", ") }),
|
|
2233
|
+
/* @__PURE__ */ e(
|
|
2234
|
+
m,
|
|
2235
|
+
{
|
|
2236
|
+
className: x("tw:transition-transform", {
|
|
2237
|
+
"tw:-rotate-180": r
|
|
2238
|
+
}),
|
|
2239
|
+
source: G
|
|
2240
|
+
}
|
|
2241
|
+
)
|
|
2242
|
+
]
|
|
2243
|
+
}
|
|
2244
|
+
) }),
|
|
2245
|
+
/* @__PURE__ */ u(q, { children: [
|
|
2246
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:justify-between tw:gap-2", children: [
|
|
2247
|
+
/* @__PURE__ */ e("span", { className: "tw:font-medium", children: "Margin" }),
|
|
2248
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(m, { source: T }) }) })
|
|
2249
|
+
] }),
|
|
2250
|
+
/* @__PURE__ */ e("hr", { className: "tw:border-ic-white-1s tw:my-3" }),
|
|
2251
|
+
/* @__PURE__ */ u("div", { className: "tw:grid tw:grid-cols-3 tw:gap-2", style: { maxWidth: 256 }, children: [
|
|
2252
|
+
/* @__PURE__ */ e("div", { className: "tw:col-start-2", children: /* @__PURE__ */ e(z, { onChange: s, name: "marginTop", value: a }) }),
|
|
2253
|
+
/* @__PURE__ */ e("div", { className: "tw:col-start-1", children: /* @__PURE__ */ e(z, { onChange: s, name: "marginLeft", value: c }) }),
|
|
2254
|
+
/* @__PURE__ */ e("div", { className: "tw:flex tw:items-center tw:justify-center", children: /* @__PURE__ */ e(m, { source: ne }) }),
|
|
2255
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(z, { onChange: s, name: "marginRight", value: h }) }),
|
|
2256
|
+
/* @__PURE__ */ e("div", { className: "tw:col-start-2", children: /* @__PURE__ */ e(z, { onChange: s, name: "marginBottom", value: C }) })
|
|
2257
|
+
] })
|
|
2258
|
+
] })
|
|
2259
|
+
] }) });
|
|
2260
|
+
}, X1 = ({ name: t, responsive: n = !0, value: o, onChange: l }) => /* @__PURE__ */ e(b, { name: t ?? "Wrap", responsive: n, children: /* @__PURE__ */ e(de, { onChange: (i) => {
|
|
2261
|
+
l?.({
|
|
2262
|
+
flexWrap: i.target.checked ? "wrap" : void 0
|
|
2263
|
+
});
|
|
2264
|
+
}, checked: o?.flexWrap === "wrap" }) }), Q1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2265
|
+
<path d="M9.95 5H20.12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2266
|
+
<path d="M15 17V5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2267
|
+
<path d="M7 17V10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2268
|
+
<path d="M4 10H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2269
|
+
</svg>
|
|
2270
|
+
`, Y1 = ({ value: t, onChange: n, name: o }) => /* @__PURE__ */ e(b, { name: o ?? "Open in", children: /* @__PURE__ */ e(V, { value: t ?? "_self", onSelectionChange: n, children: [
|
|
2271
|
+
{
|
|
2272
|
+
label: "Current",
|
|
2273
|
+
value: "_self"
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
label: "New tab",
|
|
2277
|
+
value: "_blank"
|
|
2278
|
+
}
|
|
2279
|
+
].map((r) => /* @__PURE__ */ e(X, { value: r.value, size: "28", children: r.label }, r.value)) }) });
|
|
2280
|
+
export {
|
|
2281
|
+
Y1 as A,
|
|
2282
|
+
V1 as B,
|
|
2283
|
+
fe as C,
|
|
2284
|
+
E1 as D,
|
|
2285
|
+
f1 as E,
|
|
2286
|
+
R1 as F,
|
|
2287
|
+
q1 as G,
|
|
2288
|
+
M1 as H,
|
|
2289
|
+
dt as I,
|
|
2290
|
+
O1 as J,
|
|
2291
|
+
it as K,
|
|
2292
|
+
Bt as L,
|
|
2293
|
+
$1 as M,
|
|
2294
|
+
ke as N,
|
|
2295
|
+
A1 as O,
|
|
2296
|
+
J1 as P,
|
|
2297
|
+
ct as Q,
|
|
2298
|
+
W1 as R,
|
|
2299
|
+
B1 as S,
|
|
2300
|
+
b as T,
|
|
2301
|
+
wt as U,
|
|
2302
|
+
L1 as W,
|
|
2303
|
+
Q1 as a,
|
|
2304
|
+
Z1 as b,
|
|
2305
|
+
H1 as c,
|
|
2306
|
+
k1 as d,
|
|
2307
|
+
N1 as e,
|
|
2308
|
+
G1 as f,
|
|
2309
|
+
I1 as g,
|
|
2310
|
+
y1 as h,
|
|
2311
|
+
T1 as i,
|
|
2312
|
+
F1 as j,
|
|
2313
|
+
S1 as k,
|
|
2314
|
+
P1 as l,
|
|
2315
|
+
X1 as m,
|
|
2316
|
+
U1 as n,
|
|
2317
|
+
D1 as o,
|
|
2318
|
+
_1 as p,
|
|
2319
|
+
z1 as q,
|
|
2320
|
+
j1 as r,
|
|
2321
|
+
x1 as s,
|
|
2322
|
+
Pt as t,
|
|
2323
|
+
ut as u,
|
|
2324
|
+
et as v,
|
|
2325
|
+
me as w,
|
|
2326
|
+
_ as x,
|
|
2327
|
+
yt as y,
|
|
2328
|
+
b1 as z
|
|
2329
|
+
};
|