@blockbite/ui 2.0.21 → 2.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AutocompleteDropdown.d.ts +2 -2
- package/dist/ButtonToggle.d.ts +8 -4
- package/dist/DropdownPicker.d.ts +4 -2
- package/dist/FocalPointControl.d.ts +1 -1
- package/dist/Icon.d.ts +2 -2
- package/dist/MetricsControl.d.ts +2 -2
- package/dist/RangeSlider.d.ts +1 -1
- package/dist/SelectControlWrapper.d.ts +2 -2
- package/dist/ToggleGroup.d.ts +1 -1
- package/dist/index.js +695 -597
- package/dist/index.js.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +9 -8
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { __ as
|
|
5
|
-
import { MediaUploadCheck as
|
|
6
|
-
import {
|
|
7
|
-
import { createBlock as
|
|
8
|
-
function
|
|
1
|
+
import { Button as C, Dropdown as X, TextControl as B, CheckboxControl as Y, DropdownMenu as J, FocalPointPicker as Q, PanelRow as ee, Popover as te, RangeControl as ae, __experimentalInputControl as O, __experimentalInputControlSuffixWrapper as z, Modal as le, Notice as ne, SelectControl as re, Spinner as ce, TabPanel as se, __experimentalToggleGroupControl as oe, __experimentalToggleGroupControlOptionIcon as ie, __experimentalToggleGroupControlOption as me, ToggleControl as ue } from "@wordpress/components";
|
|
2
|
+
import { memo as V, useCallback as j, useState as g, useEffect as R, useRef as y, createPortal as D, forwardRef as de, createContext as A, useContext as P, Children as _, isValidElement as L, useMemo as fe } from "@wordpress/element";
|
|
3
|
+
import pe from "@wordpress/api-fetch";
|
|
4
|
+
import { __ as w } from "@wordpress/i18n";
|
|
5
|
+
import { MediaUploadCheck as T, MediaUpload as $ } from "@wordpress/block-editor";
|
|
6
|
+
import { SVG as ge, Path as Re } from "@wordpress/primitives";
|
|
7
|
+
import { createBlock as Ee } from "@wordpress/blocks";
|
|
8
|
+
function he(e) {
|
|
9
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var H = { exports: {} };
|
|
12
12
|
/*!
|
|
13
13
|
Copyright (c) 2018 Jed Watson.
|
|
14
14
|
Licensed under the MIT License (MIT), see
|
|
15
15
|
http://jedwatson.github.io/classnames
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
return
|
|
17
|
+
var I;
|
|
18
|
+
function Ce() {
|
|
19
|
+
return I || (I = 1, function(e) {
|
|
20
20
|
(function() {
|
|
21
21
|
var t = {}.hasOwnProperty;
|
|
22
22
|
function l() {
|
|
@@ -45,56 +45,47 @@ function xe() {
|
|
|
45
45
|
}
|
|
46
46
|
e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
|
|
47
47
|
})();
|
|
48
|
-
}(
|
|
48
|
+
}(H)), H.exports;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
const
|
|
52
|
-
children: e,
|
|
53
|
-
className: t,
|
|
54
|
-
important: l = !1,
|
|
55
|
-
onClick: a
|
|
56
|
-
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick: a }, /* @__PURE__ */ React.createElement("div", { className: t }, e)) : /* @__PURE__ */ React.createElement("div", { className: t }, e), N = ({ icon: e, className: t = "" }) => e ? /* @__PURE__ */ React.createElement(h, { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { className: t }), " ") : null, we = j(
|
|
50
|
+
var be = Ce();
|
|
51
|
+
const p = /* @__PURE__ */ he(be), v = ({ icon: e, ...t }) => e ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { ...t })) : null, xe = V(
|
|
57
52
|
({
|
|
58
53
|
children: e,
|
|
59
54
|
className: t,
|
|
60
55
|
value: l,
|
|
61
56
|
variant: a = "secondary",
|
|
62
|
-
|
|
57
|
+
pressed: n,
|
|
63
58
|
onPressedChange: r,
|
|
64
59
|
icon: s,
|
|
65
60
|
size: c = "compact",
|
|
66
61
|
display: i = "auto",
|
|
67
62
|
label: o
|
|
68
63
|
}) => {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}, [n]);
|
|
73
|
-
const E = A(() => {
|
|
74
|
-
u((R) => !R), r(l);
|
|
75
|
-
}, [m, r]);
|
|
64
|
+
const f = j(() => {
|
|
65
|
+
r(l);
|
|
66
|
+
}, [r, l]);
|
|
76
67
|
return /* @__PURE__ */ React.createElement(
|
|
77
|
-
|
|
68
|
+
C,
|
|
78
69
|
{
|
|
79
70
|
"aria-label": o,
|
|
80
|
-
className:
|
|
71
|
+
className: p(t, "blockbite-ui__button--default"),
|
|
81
72
|
value: l,
|
|
82
73
|
size: c,
|
|
83
74
|
label: o,
|
|
84
75
|
variant: a,
|
|
85
76
|
showTooltip: !0,
|
|
86
|
-
isPressed:
|
|
87
|
-
onClick:
|
|
77
|
+
isPressed: n,
|
|
78
|
+
onClick: f
|
|
88
79
|
},
|
|
89
|
-
s && /* @__PURE__ */ React.createElement(
|
|
80
|
+
s && /* @__PURE__ */ React.createElement(v, { icon: s }),
|
|
90
81
|
i !== "icon" ? e : null,
|
|
91
82
|
o && !e && i !== "icon" ? /* @__PURE__ */ React.createElement("span", null, o) : null
|
|
92
83
|
);
|
|
93
84
|
}
|
|
94
|
-
),
|
|
85
|
+
), we = V(
|
|
95
86
|
({
|
|
96
87
|
className: e,
|
|
97
|
-
|
|
88
|
+
value: t,
|
|
98
89
|
toggle: l = !0,
|
|
99
90
|
display: a = "auto",
|
|
100
91
|
options: n,
|
|
@@ -104,72 +95,73 @@ const f = /* @__PURE__ */ Ce(ve), h = ({
|
|
|
104
95
|
stretch: i = !1,
|
|
105
96
|
onPressedChange: o
|
|
106
97
|
}) => {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const E = A(
|
|
112
|
-
(d) => {
|
|
113
|
-
const x = l && m === d ? "" : d;
|
|
114
|
-
u(x), o == null || o(x);
|
|
98
|
+
const f = j(
|
|
99
|
+
(m) => {
|
|
100
|
+
const u = l && t === m ? "" : m;
|
|
101
|
+
o == null || o(u);
|
|
115
102
|
},
|
|
116
|
-
[
|
|
117
|
-
),
|
|
103
|
+
[o, l, t]
|
|
104
|
+
), d = (m) => a === "icon" && (m != null && m.icon) ? /* @__PURE__ */ React.createElement(v, { icon: m.icon }) : a === "label" ? /* @__PURE__ */ React.createElement("span", null, m.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, m.icon && /* @__PURE__ */ React.createElement(v, { icon: m.icon }), /* @__PURE__ */ React.createElement("span", null, m.label));
|
|
118
105
|
return /* @__PURE__ */ React.createElement(
|
|
119
|
-
|
|
106
|
+
"div",
|
|
120
107
|
{
|
|
121
|
-
className:
|
|
108
|
+
className: p(
|
|
122
109
|
"blockbite-ui__button-group flex flex-wrap gap-1",
|
|
123
110
|
e,
|
|
124
111
|
s ? "blockbite-ui__button-group--tabs" : ""
|
|
125
112
|
)
|
|
126
113
|
},
|
|
127
|
-
n.map((
|
|
128
|
-
|
|
114
|
+
n.map((m, u) => /* @__PURE__ */ React.createElement(
|
|
115
|
+
C,
|
|
129
116
|
{
|
|
130
|
-
key: `ButtonToggleGroup__${
|
|
131
|
-
className:
|
|
117
|
+
key: `ButtonToggleGroup__${m.value}__${m.label}__${u}`,
|
|
118
|
+
className: p("blockbite-ui__button--default", {
|
|
132
119
|
grow: i,
|
|
133
120
|
"justify-center": i
|
|
134
121
|
}),
|
|
135
|
-
"aria-label":
|
|
122
|
+
"aria-label": m.label,
|
|
136
123
|
showTooltip: !0,
|
|
137
|
-
value:
|
|
124
|
+
value: m.value,
|
|
138
125
|
size: r,
|
|
139
|
-
label: (
|
|
126
|
+
label: (m == null ? void 0 : m.tooltip) || m.label,
|
|
140
127
|
variant: c,
|
|
141
|
-
isPressed:
|
|
142
|
-
onClick: () =>
|
|
128
|
+
isPressed: t === m.value,
|
|
129
|
+
onClick: () => f(m.value)
|
|
143
130
|
},
|
|
144
|
-
|
|
145
|
-
|
|
131
|
+
d(m),
|
|
132
|
+
m.children && m.children
|
|
146
133
|
))
|
|
147
134
|
);
|
|
148
135
|
}
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
|
|
136
|
+
), E = ({
|
|
137
|
+
children: e,
|
|
138
|
+
className: t,
|
|
139
|
+
important: l = !1,
|
|
140
|
+
onClick: a
|
|
141
|
+
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick: a }, /* @__PURE__ */ React.createElement("div", { className: t }, e)) : /* @__PURE__ */ React.createElement("div", { className: t }, e);
|
|
142
|
+
function at({
|
|
143
|
+
value: e,
|
|
152
144
|
options: t,
|
|
153
145
|
swatch: l,
|
|
154
146
|
onPressedChange: a
|
|
155
147
|
}) {
|
|
156
|
-
const [n, r] =
|
|
157
|
-
return
|
|
148
|
+
const [n, r] = g(""), [s, c] = g([]);
|
|
149
|
+
return R(() => {
|
|
158
150
|
c(
|
|
159
151
|
t.filter(
|
|
160
152
|
(i) => i.label.toLowerCase().includes(n.toLowerCase())
|
|
161
153
|
)
|
|
162
154
|
);
|
|
163
|
-
}, [n, t]),
|
|
155
|
+
}, [n, t]), R(() => {
|
|
164
156
|
r(""), c(t);
|
|
165
157
|
}, [e, t]), /* @__PURE__ */ React.createElement(
|
|
166
|
-
|
|
158
|
+
X,
|
|
167
159
|
{
|
|
168
160
|
className: "option-panel-dropdown",
|
|
169
161
|
contentClassName: "option-panel-dropdown-content",
|
|
170
162
|
popoverProps: { placement: "bottom-start" },
|
|
171
|
-
renderToggle: ({ isOpen: i, onToggle: o }) => /* @__PURE__ */ React.createElement(
|
|
172
|
-
|
|
163
|
+
renderToggle: ({ isOpen: i, onToggle: o }) => /* @__PURE__ */ React.createElement(E, { important: !0 }, /* @__PURE__ */ React.createElement(
|
|
164
|
+
C,
|
|
173
165
|
{
|
|
174
166
|
variant: "secondary",
|
|
175
167
|
size: "small",
|
|
@@ -179,14 +171,12 @@ function ct({
|
|
|
179
171
|
/* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1.5 !bg-transparent !p-0 !text-[11px] !text-current" }, l && !!e && /* @__PURE__ */ React.createElement(
|
|
180
172
|
"div",
|
|
181
173
|
{
|
|
182
|
-
className:
|
|
183
|
-
`h-3 w-3 rounded-full bg-${e}`
|
|
184
|
-
)
|
|
174
|
+
className: p(`h-3 w-3 rounded-full bg-${e}`)
|
|
185
175
|
}
|
|
186
176
|
), /* @__PURE__ */ React.createElement("span", null, e || "Select option…"))
|
|
187
177
|
)),
|
|
188
|
-
renderContent: () => /* @__PURE__ */ React.createElement(
|
|
189
|
-
|
|
178
|
+
renderContent: () => /* @__PURE__ */ React.createElement(E, { important: !0 }, /* @__PURE__ */ React.createElement("div", { className: "w-52" }, /* @__PURE__ */ React.createElement(
|
|
179
|
+
B,
|
|
190
180
|
{
|
|
191
181
|
__next40pxDefaultSize: !0,
|
|
192
182
|
__nextHasNoMarginBottom: !0,
|
|
@@ -196,23 +186,23 @@ function ct({
|
|
|
196
186
|
autoComplete: "off"
|
|
197
187
|
}
|
|
198
188
|
), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 gap-1 !bg-transparent p-0 !pt-2" }, s.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]" }, "No options found."), s.map((i, o) => /* @__PURE__ */ React.createElement(
|
|
199
|
-
|
|
189
|
+
xe,
|
|
200
190
|
{
|
|
201
191
|
key: `ButtonToggle__${i.value}___${o}`,
|
|
202
|
-
className:
|
|
192
|
+
className: p({
|
|
203
193
|
"bg-primary": i.value
|
|
204
194
|
}),
|
|
205
195
|
size: "small",
|
|
206
196
|
value: i.value.toString(),
|
|
207
|
-
|
|
208
|
-
onPressedChange: (
|
|
209
|
-
a(
|
|
197
|
+
pressed: e === i.value,
|
|
198
|
+
onPressedChange: (f) => {
|
|
199
|
+
a(f ? i.value : "");
|
|
210
200
|
}
|
|
211
201
|
},
|
|
212
202
|
l && /* @__PURE__ */ React.createElement(
|
|
213
203
|
"div",
|
|
214
204
|
{
|
|
215
|
-
className:
|
|
205
|
+
className: p(
|
|
216
206
|
`mr-3 h-3 w-3 rounded-full bg-${i.value}`
|
|
217
207
|
)
|
|
218
208
|
}
|
|
@@ -222,38 +212,38 @@ function ct({
|
|
|
222
212
|
}
|
|
223
213
|
);
|
|
224
214
|
}
|
|
225
|
-
const
|
|
215
|
+
const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__ */ React.createElement(
|
|
226
216
|
"div",
|
|
227
217
|
{
|
|
228
218
|
onClick: a,
|
|
229
|
-
className:
|
|
219
|
+
className: p(
|
|
230
220
|
t,
|
|
231
221
|
"inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800"
|
|
232
222
|
)
|
|
233
223
|
},
|
|
234
224
|
l && /* @__PURE__ */ React.createElement("span", { className: "mr-1 text-xs font-semibold text-gray-700" }, l),
|
|
235
225
|
e
|
|
236
|
-
),
|
|
237
|
-
const a =
|
|
238
|
-
return
|
|
226
|
+
), lt = ({ htmlContent: e, cssContent: t, frontendAssets: l }) => {
|
|
227
|
+
const a = y(null), [n, r] = g(null);
|
|
228
|
+
return R(() => {
|
|
239
229
|
const s = a.current;
|
|
240
230
|
return s && (s.onload = () => {
|
|
241
231
|
const c = s.contentDocument || s.contentWindow.document;
|
|
242
232
|
if (c) {
|
|
243
233
|
r(c.body);
|
|
244
234
|
const i = c.createElement("style");
|
|
245
|
-
i.innerHTML = t, c.head.appendChild(i), l.forEach(({ type: o, id:
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
249
|
-
|
|
235
|
+
i.innerHTML = t, c.head.appendChild(i), l.forEach(({ type: o, id: f, url: d }) => {
|
|
236
|
+
const m = document.getElementById(f);
|
|
237
|
+
if (m) {
|
|
238
|
+
const u = document.adoptNode(
|
|
239
|
+
m.cloneNode(!0)
|
|
250
240
|
);
|
|
251
|
-
c.head.appendChild(
|
|
241
|
+
c.head.appendChild(u);
|
|
252
242
|
} else {
|
|
253
|
-
const
|
|
243
|
+
const u = c.createElement(
|
|
254
244
|
o === "script" ? "script" : "link"
|
|
255
245
|
);
|
|
256
|
-
|
|
246
|
+
u.id = f, o === "script" ? (u.src = d, u.async = !0) : (u.rel = "stylesheet", u.href = d), c.head.appendChild(u);
|
|
257
247
|
}
|
|
258
248
|
});
|
|
259
249
|
}
|
|
@@ -287,7 +277,7 @@ const Ne = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
287
277
|
n
|
|
288
278
|
)
|
|
289
279
|
);
|
|
290
|
-
},
|
|
280
|
+
}, nt = ({
|
|
291
281
|
children: e,
|
|
292
282
|
size: t = "default",
|
|
293
283
|
label: l,
|
|
@@ -300,14 +290,14 @@ const Ne = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
300
290
|
}) => {
|
|
301
291
|
const o = s === "icon" || s === "icon-lg";
|
|
302
292
|
return /* @__PURE__ */ React.createElement(
|
|
303
|
-
|
|
293
|
+
C,
|
|
304
294
|
{
|
|
305
295
|
size: t,
|
|
306
296
|
variant: r,
|
|
307
297
|
label: l,
|
|
308
298
|
showTooltip: !0,
|
|
309
299
|
disabled: i,
|
|
310
|
-
className:
|
|
300
|
+
className: p(
|
|
311
301
|
a,
|
|
312
302
|
"blockbite-ui__button",
|
|
313
303
|
"flex items-center justify-center gap-1",
|
|
@@ -320,37 +310,38 @@ const Ne = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
320
310
|
onClick: n
|
|
321
311
|
},
|
|
322
312
|
c && /* @__PURE__ */ React.createElement(
|
|
323
|
-
|
|
313
|
+
v,
|
|
324
314
|
{
|
|
325
315
|
icon: c,
|
|
326
|
-
className:
|
|
316
|
+
className: p({ "h-4 w-4": s === "icon-lg" })
|
|
327
317
|
}
|
|
328
318
|
),
|
|
329
319
|
o ? null : e,
|
|
330
320
|
l && !e && !o ? /* @__PURE__ */ React.createElement("span", null, l) : null
|
|
331
321
|
);
|
|
332
|
-
},
|
|
333
|
-
|
|
322
|
+
}, rt = ({ children: e, title: t }) => /* @__PURE__ */ React.createElement(
|
|
323
|
+
E,
|
|
334
324
|
{
|
|
335
|
-
className:
|
|
325
|
+
className: p(
|
|
336
326
|
"text-gray-medium my-2 flex items-center gap-1 text-[12px] font-medium",
|
|
337
|
-
|
|
327
|
+
p
|
|
338
328
|
)
|
|
339
329
|
},
|
|
340
|
-
|
|
330
|
+
"dwdwwdwd",
|
|
331
|
+
t && /* @__PURE__ */ React.createElement(E, { className: "font-medium" }, t),
|
|
341
332
|
e
|
|
342
|
-
),
|
|
333
|
+
), ct = ({
|
|
343
334
|
title: e,
|
|
344
335
|
className: t,
|
|
345
336
|
help: l,
|
|
346
337
|
badge: a,
|
|
347
338
|
...n
|
|
348
|
-
}) => /* @__PURE__ */ React.createElement("div", { className:
|
|
349
|
-
const [a, n] =
|
|
350
|
-
return
|
|
339
|
+
}) => /* @__PURE__ */ React.createElement("div", { className: p("mb-2", t), ...n }, /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-wrap items-center gap-2 justify-between" }, /* @__PURE__ */ React.createElement("span", { className: "shrink-1 text-[11px] font-medium uppercase leading-snug" }, e), !!a && /* @__PURE__ */ React.createElement(ve, { className: "text-[10px] py-px px-1" }, a)), l && /* @__PURE__ */ React.createElement("small", { className: "w-full shrink-0 text-[11px]" }, l)), st = ({ label: e, help: t, defaultChecked: l }) => {
|
|
340
|
+
const [a, n] = g(l);
|
|
341
|
+
return R(() => {
|
|
351
342
|
n(l);
|
|
352
|
-
}, [l]), /* @__PURE__ */ React.createElement(
|
|
353
|
-
|
|
343
|
+
}, [l]), /* @__PURE__ */ React.createElement(E, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
|
|
344
|
+
Y,
|
|
354
345
|
{
|
|
355
346
|
label: e,
|
|
356
347
|
help: t,
|
|
@@ -358,82 +349,249 @@ const Ne = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
358
349
|
onChange: n
|
|
359
350
|
}
|
|
360
351
|
));
|
|
361
|
-
},
|
|
352
|
+
}, Ne = (e) => /* @__PURE__ */ React.createElement(
|
|
362
353
|
"svg",
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
354
|
+
{
|
|
355
|
+
width: e.width || "1em",
|
|
356
|
+
height: e.height || "1em",
|
|
357
|
+
viewBox: "0 0 15 15",
|
|
358
|
+
fill: "none",
|
|
359
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
360
|
+
role: "img",
|
|
361
|
+
...e
|
|
362
|
+
},
|
|
363
|
+
/* @__PURE__ */ React.createElement(
|
|
364
|
+
"path",
|
|
365
|
+
{
|
|
366
|
+
d: "M3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523Z",
|
|
367
|
+
fill: "currentColor"
|
|
368
|
+
}
|
|
369
|
+
)
|
|
370
|
+
), ye = (e) => /* @__PURE__ */ React.createElement(
|
|
366
371
|
"svg",
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
372
|
+
{
|
|
373
|
+
width: e.width || "1em",
|
|
374
|
+
height: e.height || "1em",
|
|
375
|
+
viewBox: "0 0 15 15",
|
|
376
|
+
fill: "none",
|
|
377
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
378
|
+
role: "img",
|
|
379
|
+
...e
|
|
380
|
+
},
|
|
381
|
+
/* @__PURE__ */ React.createElement(
|
|
382
|
+
"path",
|
|
383
|
+
{
|
|
384
|
+
fillRule: "evenodd",
|
|
385
|
+
clipRule: "evenodd",
|
|
386
|
+
d: "M7.50012 1C7.22398 1 7.00012 1.22386 7.00012 1.5V13.5C7.00012 13.7761 7.22398 14 7.50012 14C7.77626 14 8.00012 13.7761 8.00012 13.5V1.5C8.00012 1.22386 7.77626 1 7.50012 1ZM3.31812 5.18161C3.14239 5.00587 2.85746 5.00587 2.68173 5.18161L0.681729 7.18161C0.505993 7.35734 0.505993 7.64227 0.681729 7.818L2.68173 9.818C2.85746 9.99374 3.14239 9.99374 3.31812 9.818C3.49386 9.64227 3.49386 9.35734 3.31812 9.18161L2.08632 7.9498H5.50017C5.7487 7.9498 5.95017 7.74833 5.95017 7.4998C5.95017 7.25128 5.7487 7.0498 5.50017 7.0498H2.08632L3.31812 5.818C3.49386 5.64227 3.49386 5.35734 3.31812 5.18161ZM11.6817 5.18161C11.506 5.35734 11.506 5.64227 11.6817 5.818L12.9135 7.0498H9.50017C9.25164 7.0498 9.05017 7.25128 9.05017 7.4998C9.05017 7.74833 9.25164 7.9498 9.50017 7.9498H12.9135L11.6817 9.18161C11.506 9.35734 11.506 9.64227 11.6817 9.818C11.8575 9.99374 12.1424 9.99374 12.3181 9.818L14.3181 7.818C14.4939 7.64227 14.4939 7.35734 14.3181 7.18161L12.3181 5.18161C12.1424 5.00587 11.8575 5.00587 11.6817 5.18161Z",
|
|
387
|
+
fill: "currentColor"
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
), ke = (e) => /* @__PURE__ */ React.createElement(
|
|
370
391
|
"svg",
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
392
|
+
{
|
|
393
|
+
width: e.width || "1em",
|
|
394
|
+
height: e.height || "1em",
|
|
395
|
+
viewBox: "0 0 15 15",
|
|
396
|
+
fill: "none",
|
|
397
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
398
|
+
role: "img",
|
|
399
|
+
...e
|
|
400
|
+
},
|
|
401
|
+
/* @__PURE__ */ React.createElement(
|
|
402
|
+
"path",
|
|
403
|
+
{
|
|
404
|
+
d: "M11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184Z",
|
|
405
|
+
fill: "currentColor"
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
), _e = (e) => /* @__PURE__ */ React.createElement(
|
|
374
409
|
"svg",
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
410
|
+
{
|
|
411
|
+
width: e.width || "1em",
|
|
412
|
+
height: e.height || "1em",
|
|
413
|
+
viewBox: "0 0 15 15",
|
|
414
|
+
fill: "none",
|
|
415
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
416
|
+
role: "img",
|
|
417
|
+
...e
|
|
418
|
+
},
|
|
419
|
+
/* @__PURE__ */ React.createElement(
|
|
420
|
+
"path",
|
|
421
|
+
{
|
|
422
|
+
fillRule: "evenodd",
|
|
423
|
+
clipRule: "evenodd",
|
|
424
|
+
d: "M0 3.25V10.75C0 11.4404 0.559644 12 1.25 12H5.07341L4.82991 13.2986C4.76645 13.6371 5.02612 13.95 5.37049 13.95H9.62951C9.97389 13.95 10.2336 13.6371 10.1701 13.2986L9.92659 12H13.75C14.4404 12 15 11.4404 15 10.75V3.25C15 2.55964 14.4404 2 13.75 2H1.25C0.559643 2 0 2.55964 0 3.25ZM1.25 3H13.75C13.8881 3 14 3.11193 14 3.25V10.75C14 10.8881 13.8881 11 13.75 11H1.25C1.11193 11 1 10.8881 1 10.75V3.25C1 3.11193 1.11193 3 1.25 3ZM5.98909 12L5.79222 13.05H9.20778L9.01091 12H5.98909Z",
|
|
425
|
+
fill: "currentColor"
|
|
426
|
+
}
|
|
427
|
+
)
|
|
428
|
+
), Le = (e) => /* @__PURE__ */ React.createElement(
|
|
378
429
|
"svg",
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
430
|
+
{
|
|
431
|
+
width: e.width || "1em",
|
|
432
|
+
height: e.height || "1em",
|
|
433
|
+
viewBox: "0 0 15 15",
|
|
434
|
+
fill: "none",
|
|
435
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
436
|
+
role: "img",
|
|
437
|
+
...e
|
|
438
|
+
},
|
|
439
|
+
/* @__PURE__ */ React.createElement(
|
|
440
|
+
"path",
|
|
441
|
+
{
|
|
442
|
+
fillRule: "evenodd",
|
|
443
|
+
clipRule: "evenodd",
|
|
444
|
+
d: "M1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5C1.67157 1 1 1.67157 1 2.5ZM8 2V7H13V2.5C13 2.22386 12.7761 2 12.5 2H8ZM8 8V13H12.5C12.7761 13 13 12.7761 13 12.5V8H8ZM7 2H2.5C2.22386 2 2 2.22386 2 2.5V7H7V2ZM2 12.5C2 12.7761 2.22386 13 2.5 13H7V8H2V12.5Z",
|
|
445
|
+
fill: "currentColor"
|
|
446
|
+
}
|
|
447
|
+
)
|
|
448
|
+
), Me = (e) => /* @__PURE__ */ React.createElement(
|
|
382
449
|
"svg",
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
450
|
+
{
|
|
451
|
+
width: e.width || "1em",
|
|
452
|
+
height: e.height || "1em",
|
|
453
|
+
viewBox: "0 0 15 15",
|
|
454
|
+
fill: "none",
|
|
455
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
456
|
+
role: "img",
|
|
457
|
+
...e
|
|
458
|
+
},
|
|
459
|
+
/* @__PURE__ */ React.createElement(
|
|
460
|
+
"path",
|
|
461
|
+
{
|
|
462
|
+
fillRule: "evenodd",
|
|
463
|
+
clipRule: "evenodd",
|
|
464
|
+
d: "M11.1465 1.14645L3.71455 8.57836C3.62459 8.66832 3.55263 8.77461 3.50251 8.89155L2.04044 12.303C1.9599 12.491 2.00189 12.709 2.14646 12.8536C2.29103 12.9981 2.50905 13.0401 2.69697 12.9596L6.10847 11.4975C6.2254 11.4474 6.3317 11.3754 6.42166 11.2855L13.8536 3.85355C14.0488 3.65829 14.0488 3.34171 13.8536 3.14645L11.8536 1.14645C11.6583 0.951184 11.3417 0.951184 11.1465 1.14645ZM11.5 2.20711L12.7929 3.5L5.71455 10.5784L4.21924 11.2192L3.78081 10.7808L4.42166 9.28547L11.5 2.20711Z",
|
|
465
|
+
fill: "currentColor"
|
|
466
|
+
}
|
|
467
|
+
)
|
|
468
|
+
), Se = (e) => /* @__PURE__ */ React.createElement(
|
|
386
469
|
"svg",
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
470
|
+
{
|
|
471
|
+
width: e.width || "1em",
|
|
472
|
+
height: e.height || "1em",
|
|
473
|
+
viewBox: "0 0 15 15",
|
|
474
|
+
fill: "none",
|
|
475
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
476
|
+
role: "img",
|
|
477
|
+
...e
|
|
478
|
+
},
|
|
479
|
+
/* @__PURE__ */ React.createElement("circle", { cx: 4.85355, cy: 4.5, r: 1.5, fill: "currentColor" }),
|
|
480
|
+
/* @__PURE__ */ React.createElement("circle", { cx: 9.85355, cy: 10.5, r: 1.5, fill: "currentColor" }),
|
|
481
|
+
/* @__PURE__ */ React.createElement(
|
|
482
|
+
"path",
|
|
483
|
+
{
|
|
484
|
+
d: "M3 11.6464L11 3.64642",
|
|
485
|
+
stroke: "currentColor",
|
|
486
|
+
strokeLinecap: "round"
|
|
487
|
+
}
|
|
488
|
+
)
|
|
489
|
+
), Te = (e) => /* @__PURE__ */ React.createElement(
|
|
392
490
|
"svg",
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
491
|
+
{
|
|
492
|
+
width: e.width || "1em",
|
|
493
|
+
height: e.height || "1em",
|
|
494
|
+
viewBox: "0 0 15 15",
|
|
495
|
+
fill: "none",
|
|
496
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
497
|
+
role: "img",
|
|
498
|
+
...e
|
|
499
|
+
},
|
|
500
|
+
/* @__PURE__ */ React.createElement(
|
|
501
|
+
"path",
|
|
502
|
+
{
|
|
503
|
+
d: "M7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75C8 2.47386 7.77614 2.25 7.5 2.25Z",
|
|
504
|
+
fill: "currentColor"
|
|
505
|
+
}
|
|
506
|
+
)
|
|
507
|
+
), He = (e) => /* @__PURE__ */ React.createElement(
|
|
396
508
|
"svg",
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
509
|
+
{
|
|
510
|
+
width: e.width || "1em",
|
|
511
|
+
height: e.height || "1em",
|
|
512
|
+
viewBox: "0 0 15 15",
|
|
513
|
+
fill: "none",
|
|
514
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
515
|
+
role: "img",
|
|
516
|
+
...e
|
|
517
|
+
},
|
|
518
|
+
/* @__PURE__ */ React.createElement(
|
|
519
|
+
"path",
|
|
520
|
+
{
|
|
521
|
+
fillRule: "evenodd",
|
|
522
|
+
clipRule: "evenodd",
|
|
523
|
+
d: "M8.49988 10.2504C7.1516 10.2504 6.0299 9.28026 5.79473 7.99997H0.5C0.223858 7.99997 0 7.77611 0 7.49997C0 7.22383 0.223858 6.99997 0.5 6.99997H5.7947C6.0298 5.71959 7.15154 4.74939 8.49988 4.74939C9.84822 4.74939 10.97 5.71959 11.2051 6.99997H14.5C14.7761 6.99997 15 7.22383 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H11.205C10.9699 9.28026 9.84816 10.2504 8.49988 10.2504ZM8.49988 9.30038C7.50549 9.30038 6.69938 8.49427 6.69938 7.49988C6.69938 6.5055 7.50549 5.69939 8.49988 5.69939C9.49426 5.69939 10.3004 6.5055 10.3004 7.49988C10.3004 8.49427 9.49426 9.30038 8.49988 9.30038Z",
|
|
524
|
+
fill: "currentColor"
|
|
525
|
+
}
|
|
526
|
+
)
|
|
527
|
+
), Be = (e) => /* @__PURE__ */ React.createElement(
|
|
400
528
|
"svg",
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
529
|
+
{
|
|
530
|
+
width: e.width || "1em",
|
|
531
|
+
height: e.height || "1em",
|
|
532
|
+
viewBox: "0 0 15 15",
|
|
533
|
+
fill: "none",
|
|
534
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
535
|
+
role: "img",
|
|
536
|
+
...e
|
|
537
|
+
},
|
|
538
|
+
/* @__PURE__ */ React.createElement(
|
|
539
|
+
"path",
|
|
540
|
+
{
|
|
541
|
+
d: "M4 5.33333C4.4 3.77778 5.4 3 7 3C9.4 3 9.7 4.75 10.9 5.04167C11.7 5.23611 12.4 4.94444 13 4.16667C12.6 5.72222 11.6 6.5 10 6.5C7.6 6.5 7.3 4.75 6.1 4.45833C5.3 4.26389 4.6 4.55556 4 5.33333ZM1 8.83333C1.4 7.27778 2.4 6.5 4 6.5C6.4 6.5 6.7 8.25 7.9 8.54167C8.7 8.73611 9.4 8.44444 10 7.66667C9.6 9.22222 8.6 10 7 10C4.6 10 4.3 8.25 3.1 7.95833C2.3 7.76389 1.6 8.05556 1 8.83333Z",
|
|
542
|
+
fill: "currentColor"
|
|
543
|
+
}
|
|
544
|
+
)
|
|
545
|
+
), Ve = (e) => /* @__PURE__ */ React.createElement(
|
|
404
546
|
"svg",
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
547
|
+
{
|
|
548
|
+
width: e.width || "1em",
|
|
549
|
+
height: e.height || "1em",
|
|
550
|
+
viewBox: "0 0 15 15",
|
|
551
|
+
fill: "none",
|
|
552
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
553
|
+
role: "img",
|
|
554
|
+
...e
|
|
555
|
+
},
|
|
556
|
+
/* @__PURE__ */ React.createElement(
|
|
557
|
+
"path",
|
|
558
|
+
{
|
|
559
|
+
fillRule: "evenodd",
|
|
560
|
+
clipRule: "evenodd",
|
|
561
|
+
d: "M5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5C5.22386 1 5 1.22386 5 1.5ZM3.5 3H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5C3 3.22386 3.22386 3 3.5 3ZM10 4V12H5V4H10Z",
|
|
562
|
+
fill: "currentColor"
|
|
563
|
+
}
|
|
564
|
+
)
|
|
565
|
+
), F = de(
|
|
408
566
|
({
|
|
409
567
|
onClick: e,
|
|
410
568
|
onChange: t,
|
|
411
569
|
className: l,
|
|
412
|
-
|
|
570
|
+
value: a,
|
|
413
571
|
children: n,
|
|
414
572
|
inputClassName: r,
|
|
415
573
|
readOnly: s,
|
|
416
574
|
placeholder: c,
|
|
417
575
|
onBlur: i,
|
|
418
576
|
type: o = "text",
|
|
419
|
-
label:
|
|
420
|
-
helper:
|
|
421
|
-
...
|
|
422
|
-
},
|
|
423
|
-
const
|
|
577
|
+
label: f,
|
|
578
|
+
helper: d = "",
|
|
579
|
+
...m
|
|
580
|
+
}, u) => {
|
|
581
|
+
const b = `text-control-${Math.random().toString(36).substring(2, 15)}`;
|
|
424
582
|
return /* @__PURE__ */ React.createElement(
|
|
425
583
|
"div",
|
|
426
584
|
{
|
|
427
|
-
className:
|
|
428
|
-
...
|
|
585
|
+
className: p("flex items-center p-0", l),
|
|
586
|
+
...m
|
|
429
587
|
},
|
|
430
|
-
|
|
588
|
+
f ? /* @__PURE__ */ React.createElement("label", { htmlFor: b, className: "text-primary !m-0 !mb-0 !mr-2" }, f) : null,
|
|
431
589
|
/* @__PURE__ */ React.createElement(
|
|
432
590
|
"input",
|
|
433
591
|
{
|
|
434
|
-
id:
|
|
435
|
-
className:
|
|
436
|
-
"
|
|
592
|
+
id: b,
|
|
593
|
+
className: p(
|
|
594
|
+
"components-text-control__input",
|
|
437
595
|
r
|
|
438
596
|
),
|
|
439
597
|
type: o,
|
|
@@ -445,16 +603,16 @@ const Ne = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
445
603
|
},
|
|
446
604
|
onChange: (x) => t && t(x.target.value),
|
|
447
605
|
readOnly: s,
|
|
448
|
-
ref:
|
|
606
|
+
ref: u
|
|
449
607
|
}
|
|
450
608
|
),
|
|
451
|
-
|
|
452
|
-
|
|
609
|
+
n,
|
|
610
|
+
d && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, d)
|
|
453
611
|
);
|
|
454
612
|
}
|
|
455
613
|
);
|
|
456
|
-
|
|
457
|
-
const
|
|
614
|
+
F.displayName = "TextControl";
|
|
615
|
+
const ot = ({
|
|
458
616
|
data: e,
|
|
459
617
|
active: t,
|
|
460
618
|
setActive: l,
|
|
@@ -465,31 +623,31 @@ const dt = ({
|
|
|
465
623
|
renderItemActions: c,
|
|
466
624
|
addons: i,
|
|
467
625
|
className: o = "",
|
|
468
|
-
footerSlot:
|
|
469
|
-
footerSlotClassName:
|
|
626
|
+
footerSlot: f,
|
|
627
|
+
footerSlotClassName: d = ""
|
|
470
628
|
}) => {
|
|
471
|
-
const [
|
|
629
|
+
const [m, u] = g({
|
|
472
630
|
id: "",
|
|
473
631
|
name: ""
|
|
474
|
-
}), [
|
|
632
|
+
}), [b, x] = g(!1), k = y(null), N = () => {
|
|
475
633
|
a();
|
|
476
|
-
},
|
|
634
|
+
}, W = () => {
|
|
477
635
|
if (!t || e.length === 0) return;
|
|
478
|
-
const
|
|
479
|
-
n(t == null ? void 0 : t.id), l(
|
|
480
|
-
},
|
|
481
|
-
x(!0),
|
|
482
|
-
|
|
636
|
+
const h = e.filter((S) => S.id !== (t == null ? void 0 : t.id)), M = e.findIndex((S) => S.id === (t == null ? void 0 : t.id)), q = h[M] || h[0];
|
|
637
|
+
n(t == null ? void 0 : t.id), l(q);
|
|
638
|
+
}, K = (h) => {
|
|
639
|
+
x(!0), m.id && r(m.id, { name: h }), setTimeout(() => {
|
|
640
|
+
u({ id: "", name: "" }), x(!1);
|
|
483
641
|
}, 500);
|
|
484
642
|
};
|
|
485
|
-
return /* @__PURE__ */ React.createElement(
|
|
643
|
+
return /* @__PURE__ */ React.createElement(E, { important: !0, className: o }, /* @__PURE__ */ React.createElement("ul", { className: "h-[calc(100%-80px)] divide-y overflow-auto" }, i, e.length > 0 && /* @__PURE__ */ React.createElement("li", null, /* @__PURE__ */ React.createElement("ul", { className: "divide-y divide-border border-b border-border" }, e.map((h) => /* @__PURE__ */ React.createElement(
|
|
486
644
|
"li",
|
|
487
645
|
{
|
|
488
|
-
key: `data__${
|
|
489
|
-
className:
|
|
490
|
-
"relative
|
|
646
|
+
key: `data__${h.id}`,
|
|
647
|
+
className: p(
|
|
648
|
+
"relative !mb-0 flex items-center justify-between gap-1 bg-opacity-50 hover:bg-easy",
|
|
491
649
|
{
|
|
492
|
-
"bg-easy":
|
|
650
|
+
"bg-easy": h.id === (t == null ? void 0 : t.id)
|
|
493
651
|
}
|
|
494
652
|
)
|
|
495
653
|
},
|
|
@@ -498,49 +656,49 @@ const dt = ({
|
|
|
498
656
|
{
|
|
499
657
|
className: "text-gray-medium w-full truncate px-3 py-2 text-left text-sm/6 font-semibold hover:text-wordpress",
|
|
500
658
|
onClick: () => {
|
|
501
|
-
s(t == null ? void 0 : t.id, { ...t }), l(
|
|
659
|
+
s(t == null ? void 0 : t.id, { ...t }), l(h);
|
|
502
660
|
},
|
|
503
661
|
onDoubleClick: () => {
|
|
504
|
-
|
|
662
|
+
u({ id: h.id, name: h.name || "" });
|
|
505
663
|
}
|
|
506
664
|
},
|
|
507
|
-
|
|
508
|
-
),
|
|
509
|
-
|
|
665
|
+
b && m.id === h.id ? /* @__PURE__ */ React.createElement("span", { className: "animate-pulse text-gray-medium" }, m.name) : /* @__PURE__ */ React.createElement("span", { className: "text-gray-medium" }, h.name || "Untitled")
|
|
666
|
+
), m.id === h.id && !b && /* @__PURE__ */ React.createElement(
|
|
667
|
+
F,
|
|
510
668
|
{
|
|
511
669
|
className: "absolute left-1 top-0 w-[calc(100%-.5rem)] h-full",
|
|
512
670
|
inputClassName: "w-full",
|
|
513
|
-
defaultValue:
|
|
514
|
-
onChange: (
|
|
515
|
-
ref:
|
|
516
|
-
onBlur:
|
|
671
|
+
defaultValue: m.name,
|
|
672
|
+
onChange: (M) => u({ ...m, name: M }),
|
|
673
|
+
ref: k,
|
|
674
|
+
onBlur: K
|
|
517
675
|
}
|
|
518
676
|
)),
|
|
519
|
-
c && /* @__PURE__ */ React.createElement("div", { className: "flex gap-1 pr-1" }, c(
|
|
677
|
+
c && /* @__PURE__ */ React.createElement("div", { className: "flex gap-1 pr-1" }, c(h))
|
|
520
678
|
))))), /* @__PURE__ */ React.createElement(
|
|
521
679
|
"div",
|
|
522
680
|
{
|
|
523
|
-
className:
|
|
681
|
+
className: p(
|
|
524
682
|
"flex flex-wrap justify-center gap-2 p-2",
|
|
525
|
-
|
|
683
|
+
d
|
|
526
684
|
)
|
|
527
685
|
},
|
|
528
|
-
|
|
686
|
+
f,
|
|
529
687
|
/* @__PURE__ */ React.createElement(
|
|
530
|
-
|
|
688
|
+
C,
|
|
531
689
|
{
|
|
532
|
-
onClick:
|
|
533
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
690
|
+
onClick: N,
|
|
691
|
+
icon: /* @__PURE__ */ React.createElement(Te, { className: "h-4 w-4" }),
|
|
534
692
|
variant: "tertiary",
|
|
535
693
|
size: "compact"
|
|
536
694
|
},
|
|
537
695
|
"Add"
|
|
538
696
|
),
|
|
539
697
|
/* @__PURE__ */ React.createElement(
|
|
540
|
-
|
|
698
|
+
C,
|
|
541
699
|
{
|
|
542
|
-
onClick:
|
|
543
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
700
|
+
onClick: W,
|
|
701
|
+
icon: /* @__PURE__ */ React.createElement(Ve, { className: "h-4 w-4" }),
|
|
544
702
|
variant: "tertiary",
|
|
545
703
|
size: "compact",
|
|
546
704
|
disabled: !t || e.length === 0
|
|
@@ -548,17 +706,17 @@ const dt = ({
|
|
|
548
706
|
"Remove"
|
|
549
707
|
)
|
|
550
708
|
));
|
|
551
|
-
},
|
|
709
|
+
}, it = ({
|
|
552
710
|
duration: e = 3e3,
|
|
553
711
|
className: t,
|
|
554
712
|
children: l,
|
|
555
713
|
show: a,
|
|
556
714
|
message: n
|
|
557
715
|
}) => {
|
|
558
|
-
const [r, s] =
|
|
559
|
-
return
|
|
716
|
+
const [r, s] = g(!1), c = y(!1), i = y(null);
|
|
717
|
+
return R(() => {
|
|
560
718
|
c.current = !0;
|
|
561
|
-
}, []),
|
|
719
|
+
}, []), R(() => {
|
|
562
720
|
if (c.current)
|
|
563
721
|
return a && (s(!0), i.current = setTimeout(() => {
|
|
564
722
|
s(!1);
|
|
@@ -566,59 +724,60 @@ const dt = ({
|
|
|
566
724
|
i.current && clearTimeout(i.current);
|
|
567
725
|
};
|
|
568
726
|
}, [a, e]), r ? /* @__PURE__ */ React.createElement(
|
|
569
|
-
|
|
727
|
+
E,
|
|
570
728
|
{
|
|
571
729
|
important: !0,
|
|
572
|
-
className:
|
|
730
|
+
className: p("bb-ui__disappearing-message", t)
|
|
573
731
|
},
|
|
574
732
|
/* @__PURE__ */ React.createElement("div", { className: "bb-ui__disappearing-message__content" }, n ?? l)
|
|
575
733
|
) : null;
|
|
576
|
-
},
|
|
734
|
+
}, Pe = ({
|
|
577
735
|
label: e,
|
|
578
736
|
className: t,
|
|
579
|
-
|
|
580
|
-
defaultIcon: a =
|
|
581
|
-
|
|
582
|
-
|
|
737
|
+
value: l,
|
|
738
|
+
defaultIcon: a = Ne,
|
|
739
|
+
size: n = "medium",
|
|
740
|
+
onPressedChange: r,
|
|
741
|
+
options: s,
|
|
742
|
+
...c
|
|
583
743
|
}) => {
|
|
584
|
-
var
|
|
585
|
-
const [
|
|
586
|
-
|
|
587
|
-
|
|
744
|
+
var m;
|
|
745
|
+
const [i, o] = g(null);
|
|
746
|
+
R(() => {
|
|
747
|
+
o(l);
|
|
588
748
|
}, [l]);
|
|
589
|
-
const
|
|
590
|
-
...
|
|
591
|
-
icon:
|
|
592
|
-
label:
|
|
593
|
-
title:
|
|
594
|
-
value:
|
|
749
|
+
const f = [
|
|
750
|
+
...s.map((u) => ({
|
|
751
|
+
icon: u.icon,
|
|
752
|
+
label: u.label,
|
|
753
|
+
title: u.label,
|
|
754
|
+
value: u.value,
|
|
595
755
|
onClick: () => {
|
|
596
|
-
|
|
756
|
+
o(u.value), r(u.value);
|
|
597
757
|
}
|
|
598
758
|
})),
|
|
599
759
|
{
|
|
600
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
760
|
+
icon: /* @__PURE__ */ React.createElement(v, { icon: a }),
|
|
601
761
|
title: "Reset",
|
|
602
762
|
value: "reset",
|
|
603
763
|
onClick: () => {
|
|
604
|
-
|
|
764
|
+
o("reset"), r("reset");
|
|
605
765
|
}
|
|
606
766
|
}
|
|
607
767
|
];
|
|
608
|
-
|
|
609
|
-
|
|
768
|
+
let d = "1em";
|
|
769
|
+
return n === "medium" ? d = "1.5em" : n === "large" && (d = "2em"), /* @__PURE__ */ React.createElement(
|
|
770
|
+
J,
|
|
610
771
|
{
|
|
611
|
-
controls:
|
|
612
|
-
className:
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
icon: ((o = r.find((m) => m.value === s)) == null ? void 0 : o.icon) || /* @__PURE__ */ React.createElement(N, { icon: a }),
|
|
617
|
-
label: e || "Select"
|
|
772
|
+
controls: f,
|
|
773
|
+
className: p("blockbite-ui__dropdown-picker", t),
|
|
774
|
+
icon: ((m = s.find((u) => u.value === i)) == null ? void 0 : m.icon) || /* @__PURE__ */ React.createElement(v, { width: d, height: d, icon: a }),
|
|
775
|
+
label: e || "Select",
|
|
776
|
+
...c
|
|
618
777
|
}
|
|
619
778
|
);
|
|
620
779
|
};
|
|
621
|
-
function
|
|
780
|
+
function mt({
|
|
622
781
|
icon: e,
|
|
623
782
|
title: t,
|
|
624
783
|
description: l,
|
|
@@ -627,24 +786,24 @@ function ft({
|
|
|
627
786
|
}) {
|
|
628
787
|
return /* @__PURE__ */ React.createElement("div", { ...n }, /* @__PURE__ */ React.createElement("div", { className: "flex h-full w-full flex-col items-center justify-center text-center !font-sans" }, /* @__PURE__ */ React.createElement("div", { className: "max-w-sm" }, e && /* @__PURE__ */ React.createElement("div", { className: "mx-auto !text-gray-400" }, e), /* @__PURE__ */ React.createElement("h3", { className: "text-gray-medium mt-2 !font-sans text-sm font-medium" }, t), /* @__PURE__ */ React.createElement("p", { className: "mt-1 !font-sans text-sm !text-gray-500" }, l), a && /* @__PURE__ */ React.createElement("div", { className: "mt-4" }, a))));
|
|
629
788
|
}
|
|
630
|
-
function
|
|
789
|
+
function ut({
|
|
631
790
|
children: e
|
|
632
791
|
}) {
|
|
633
|
-
const t =
|
|
634
|
-
|
|
635
|
-
const o = (
|
|
792
|
+
const t = y(null), [l, a] = g({ x: 100, y: 100 }), [n, r] = g(!1), [s, c] = g({ x: 0, y: 0 });
|
|
793
|
+
R(() => {
|
|
794
|
+
const o = (d) => {
|
|
636
795
|
n && a({
|
|
637
|
-
x:
|
|
638
|
-
y:
|
|
796
|
+
x: d.clientX - s.x,
|
|
797
|
+
y: d.clientY - s.y
|
|
639
798
|
});
|
|
640
|
-
},
|
|
641
|
-
return window.addEventListener("mousemove", o), window.addEventListener("mouseup",
|
|
642
|
-
window.removeEventListener("mousemove", o), window.removeEventListener("mouseup",
|
|
799
|
+
}, f = () => r(!1);
|
|
800
|
+
return window.addEventListener("mousemove", o), window.addEventListener("mouseup", f), () => {
|
|
801
|
+
window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", f);
|
|
643
802
|
};
|
|
644
803
|
}, [n, s]);
|
|
645
804
|
const i = (o) => {
|
|
646
|
-
const
|
|
647
|
-
c({ x: o.clientX -
|
|
805
|
+
const f = t.current.getBoundingClientRect();
|
|
806
|
+
c({ x: o.clientX - f.left, y: o.clientY - f.top }), r(!0);
|
|
648
807
|
};
|
|
649
808
|
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
650
809
|
"div",
|
|
@@ -663,67 +822,62 @@ function gt({
|
|
|
663
822
|
)
|
|
664
823
|
));
|
|
665
824
|
}
|
|
666
|
-
const
|
|
667
|
-
|
|
825
|
+
const dt = ({
|
|
826
|
+
value: e,
|
|
668
827
|
onValueChange: t,
|
|
669
828
|
url: l
|
|
670
829
|
}) => {
|
|
671
|
-
const [a, n] =
|
|
830
|
+
const [a, n] = g({
|
|
672
831
|
x: 0.5,
|
|
673
832
|
y: 0.5
|
|
674
833
|
});
|
|
675
|
-
return
|
|
676
|
-
|
|
677
|
-
`[${(a.x * 100).toFixed(2)}%_${(a.y * 100).toFixed(
|
|
678
|
-
2
|
|
679
|
-
)}%]`
|
|
680
|
-
);
|
|
681
|
-
}, [a]), g(() => {
|
|
682
|
-
if (e.includes("%")) {
|
|
834
|
+
return R(() => {
|
|
835
|
+
if (e && e.includes("%")) {
|
|
683
836
|
const [r, s] = e.replace("[", "").replace("%]", "").split("_").map((c) => parseFloat(c) / 100);
|
|
684
|
-
n({
|
|
685
|
-
x: r,
|
|
686
|
-
y: s
|
|
687
|
-
});
|
|
837
|
+
n({ x: r, y: s });
|
|
688
838
|
}
|
|
689
|
-
}, [e]),
|
|
690
|
-
|
|
839
|
+
}, [e]), R(() => {
|
|
840
|
+
t(
|
|
841
|
+
`[${(a.x * 100).toFixed(2)}%_${(a.y * 100).toFixed(2)}%]`
|
|
842
|
+
);
|
|
843
|
+
}, [a]), /* @__PURE__ */ React.createElement(E, { className: "relative flex flex-col" }, /* @__PURE__ */ React.createElement(
|
|
844
|
+
Q,
|
|
691
845
|
{
|
|
692
846
|
url: l,
|
|
693
847
|
value: a,
|
|
694
|
-
onDrag:
|
|
695
|
-
onChange:
|
|
848
|
+
onDrag: n,
|
|
849
|
+
onChange: n
|
|
696
850
|
}
|
|
697
851
|
));
|
|
698
852
|
};
|
|
699
|
-
function
|
|
700
|
-
const [t, l] =
|
|
853
|
+
function ft(e) {
|
|
854
|
+
const [t, l] = g(""), [a, n] = g([]), [r, s] = g({
|
|
701
855
|
url: "",
|
|
702
856
|
title: ""
|
|
703
857
|
});
|
|
704
|
-
return
|
|
705
|
-
t !== "" && (n(null),
|
|
858
|
+
return R(() => {
|
|
859
|
+
t !== "" && (n(null), pe({
|
|
706
860
|
path: `/blockbite/v1/block-helpers/get-links/${t}`
|
|
707
861
|
}).then(
|
|
708
862
|
(c) => {
|
|
709
863
|
c != null && c.length ? n([...c]) : n([]);
|
|
710
864
|
}
|
|
711
865
|
));
|
|
712
|
-
}, [t]),
|
|
866
|
+
}, [t]), R(() => {
|
|
713
867
|
r.url !== "" && e.parentCallback(r);
|
|
714
|
-
}, [r]), /* @__PURE__ */ React.createElement(
|
|
715
|
-
|
|
868
|
+
}, [r]), /* @__PURE__ */ React.createElement(E, { className: "blockbite--editor-linkwrap" }, /* @__PURE__ */ React.createElement(
|
|
869
|
+
B,
|
|
716
870
|
{
|
|
717
871
|
__next40pxDefaultSize: !0,
|
|
718
872
|
__nextHasNoMarginBottom: !0,
|
|
719
|
-
label:
|
|
873
|
+
label: w("Search link", "blockbitelinks"),
|
|
720
874
|
value: t,
|
|
721
875
|
placeholder: "Example: About",
|
|
722
876
|
onChange: (c) => l(c),
|
|
723
|
-
help:
|
|
877
|
+
help: w("Type a post, page, title", "blockbitelinks")
|
|
724
878
|
}
|
|
725
879
|
), t ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-linklist" }, /* @__PURE__ */ React.createElement(
|
|
726
|
-
|
|
880
|
+
Ze,
|
|
727
881
|
{
|
|
728
882
|
links: a,
|
|
729
883
|
onActiveLink: (c) => [
|
|
@@ -733,12 +887,12 @@ function Et(e) {
|
|
|
733
887
|
}
|
|
734
888
|
)) : null);
|
|
735
889
|
}
|
|
736
|
-
function
|
|
890
|
+
function Ze({ links: e, onActiveLink: t }) {
|
|
737
891
|
if (e === null)
|
|
738
892
|
return /* @__PURE__ */ React.createElement("p", null, "Loading...");
|
|
739
893
|
if (e.length === 0)
|
|
740
894
|
return /* @__PURE__ */ React.createElement("p", null, "No Results");
|
|
741
|
-
const l = e.map((a) => /* @__PURE__ */ React.createElement(
|
|
895
|
+
const l = e.map((a) => /* @__PURE__ */ React.createElement(E, { key: a.id }, /* @__PURE__ */ React.createElement(
|
|
742
896
|
"span",
|
|
743
897
|
{
|
|
744
898
|
className: "blockbite--editor-link",
|
|
@@ -750,7 +904,7 @@ function Ie({ links: e, onActiveLink: t }) {
|
|
|
750
904
|
)));
|
|
751
905
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, l);
|
|
752
906
|
}
|
|
753
|
-
function
|
|
907
|
+
function pt({ mediaProps: e, mediaCallback: t }) {
|
|
754
908
|
const l = [
|
|
755
909
|
"image",
|
|
756
910
|
"video",
|
|
@@ -758,7 +912,7 @@ function bt({ mediaProps: e, mediaCallback: t }) {
|
|
|
758
912
|
"svg",
|
|
759
913
|
"text/plain",
|
|
760
914
|
"application/json"
|
|
761
|
-
], [a, n] =
|
|
915
|
+
], [a, n] = g({
|
|
762
916
|
id: null,
|
|
763
917
|
url: "",
|
|
764
918
|
sizes: [],
|
|
@@ -767,7 +921,7 @@ function bt({ mediaProps: e, mediaCallback: t }) {
|
|
|
767
921
|
width: 0,
|
|
768
922
|
height: 0
|
|
769
923
|
});
|
|
770
|
-
|
|
924
|
+
R(() => {
|
|
771
925
|
e && n({ ...e });
|
|
772
926
|
}, [e]);
|
|
773
927
|
const r = () => {
|
|
@@ -781,9 +935,9 @@ function bt({ mediaProps: e, mediaCallback: t }) {
|
|
|
781
935
|
medium: null,
|
|
782
936
|
large: null
|
|
783
937
|
};
|
|
784
|
-
c != null && c.sizes && Object.keys(c.sizes).map((
|
|
785
|
-
const
|
|
786
|
-
return (
|
|
938
|
+
c != null && c.sizes && Object.keys(c.sizes).map((f) => {
|
|
939
|
+
const d = c.sizes[f];
|
|
940
|
+
return (f === "thumbnail" || d.width < 768 || d.height < 768) && (i.thumbnail = d.url), (f === "medium" || d.width > 1024 && d.width < 1024 || d.height < 1536 && d.height > 1536) && (i.medium = d.url), (f === "large" || d.width > 1536 || d.height > 1536) && (i.large = d.url), null;
|
|
787
941
|
}), c.url.endsWith(".json") && (c.type = "lottie"), c.url.endsWith(".svg") && (c.type = "svg");
|
|
788
942
|
const o = {
|
|
789
943
|
id: c.id,
|
|
@@ -796,40 +950,40 @@ function bt({ mediaProps: e, mediaCallback: t }) {
|
|
|
796
950
|
};
|
|
797
951
|
t({ ...o });
|
|
798
952
|
};
|
|
799
|
-
return /* @__PURE__ */ React.createElement(
|
|
953
|
+
return /* @__PURE__ */ React.createElement(ee, null, a.id !== null && /* @__PURE__ */ React.createElement(T, null, /* @__PURE__ */ React.createElement(
|
|
800
954
|
$,
|
|
801
955
|
{
|
|
802
956
|
onSelect: s,
|
|
803
957
|
value: a.id,
|
|
804
958
|
allowedTypes: l,
|
|
805
959
|
render: ({ open: c }) => /* @__PURE__ */ React.createElement(
|
|
806
|
-
|
|
960
|
+
C,
|
|
807
961
|
{
|
|
808
962
|
className: a.id === 0 ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
|
|
809
963
|
onClick: c
|
|
810
964
|
},
|
|
811
|
-
a.id === 0 &&
|
|
965
|
+
a.id === 0 && w("Choose Media", "blockbite"),
|
|
812
966
|
a.id && a.type === "image" ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-visual-image" }, /* @__PURE__ */ React.createElement(
|
|
813
967
|
"img",
|
|
814
968
|
{
|
|
815
|
-
alt: a.alt ? a.alt :
|
|
969
|
+
alt: a.alt ? a.alt : w("Image", "blockbite"),
|
|
816
970
|
src: a.url
|
|
817
971
|
}
|
|
818
972
|
)) : "Add media"
|
|
819
973
|
)
|
|
820
974
|
}
|
|
821
|
-
)), a.id !== 0 && /* @__PURE__ */ React.createElement(
|
|
975
|
+
)), a.id !== 0 && /* @__PURE__ */ React.createElement(T, null, /* @__PURE__ */ React.createElement(
|
|
822
976
|
$,
|
|
823
977
|
{
|
|
824
|
-
title:
|
|
978
|
+
title: w("Replace media", "blockbite"),
|
|
825
979
|
value: a.id,
|
|
826
980
|
onSelect: s,
|
|
827
981
|
allowedTypes: l,
|
|
828
|
-
render: ({ open: c }) => /* @__PURE__ */ React.createElement(
|
|
982
|
+
render: ({ open: c }) => /* @__PURE__ */ React.createElement(C, { onClick: c }, w("Replace media", "blockbite"))
|
|
829
983
|
}
|
|
830
|
-
)), a.id !== 0 && /* @__PURE__ */ React.createElement(
|
|
984
|
+
)), a.id !== 0 && /* @__PURE__ */ React.createElement(T, null, /* @__PURE__ */ React.createElement(C, { onClick: () => r(), isDestructive: !0 }, w("Remove media", "blockbite"))));
|
|
831
985
|
}
|
|
832
|
-
const
|
|
986
|
+
const $e = ({
|
|
833
987
|
children: e,
|
|
834
988
|
className: t,
|
|
835
989
|
position: l,
|
|
@@ -837,8 +991,8 @@ const Ze = ({
|
|
|
837
991
|
onClick: n,
|
|
838
992
|
onVisibleChange: r
|
|
839
993
|
}) => {
|
|
840
|
-
const [s, c] =
|
|
841
|
-
|
|
994
|
+
const [s, c] = g(!!a);
|
|
995
|
+
R(() => {
|
|
842
996
|
a !== void 0 && c(a);
|
|
843
997
|
}, [a]);
|
|
844
998
|
const i = () => {
|
|
@@ -846,7 +1000,7 @@ const Ze = ({
|
|
|
846
1000
|
c(o), r && r(o);
|
|
847
1001
|
};
|
|
848
1002
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, s && /* @__PURE__ */ React.createElement(
|
|
849
|
-
|
|
1003
|
+
te,
|
|
850
1004
|
{
|
|
851
1005
|
position: l,
|
|
852
1006
|
className: "blockbite-ui__popover",
|
|
@@ -856,17 +1010,17 @@ const Ze = ({
|
|
|
856
1010
|
}
|
|
857
1011
|
},
|
|
858
1012
|
/* @__PURE__ */ React.createElement("div", { className: t }, /* @__PURE__ */ React.createElement("div", { className: "relative h-full w-full p-4" }, /* @__PURE__ */ React.createElement(
|
|
859
|
-
|
|
1013
|
+
C,
|
|
860
1014
|
{
|
|
861
1015
|
onClick: i,
|
|
862
1016
|
size: "small",
|
|
863
1017
|
className: "close-button absolute right-0 top-0"
|
|
864
1018
|
},
|
|
865
|
-
/* @__PURE__ */ React.createElement(
|
|
1019
|
+
/* @__PURE__ */ React.createElement(ke, null)
|
|
866
1020
|
), e))
|
|
867
1021
|
));
|
|
868
|
-
},
|
|
869
|
-
|
|
1022
|
+
}, Ie = ({
|
|
1023
|
+
value: e,
|
|
870
1024
|
label: t,
|
|
871
1025
|
min: l = 0,
|
|
872
1026
|
max: a = 2e3,
|
|
@@ -876,198 +1030,190 @@ const Ze = ({
|
|
|
876
1030
|
showTooltip: c = !1,
|
|
877
1031
|
...i
|
|
878
1032
|
}) => {
|
|
879
|
-
const [o] =
|
|
880
|
-
|
|
881
|
-
|
|
1033
|
+
const [o] = g(0), [f, d] = g(0);
|
|
1034
|
+
R(() => {
|
|
1035
|
+
d(Math.round(parseInt(e) / (s ? 16 : 1)));
|
|
882
1036
|
}, [e]);
|
|
883
|
-
function
|
|
884
|
-
const
|
|
885
|
-
r(
|
|
1037
|
+
function m(u) {
|
|
1038
|
+
const b = u * (s ? 16 : 1);
|
|
1039
|
+
r(b.toString());
|
|
886
1040
|
}
|
|
887
|
-
return /* @__PURE__ */ React.createElement(
|
|
888
|
-
|
|
1041
|
+
return /* @__PURE__ */ React.createElement(E, { className: "flex min-w-[240px] flex-col" }, /* @__PURE__ */ React.createElement(
|
|
1042
|
+
ae,
|
|
889
1043
|
{
|
|
890
1044
|
__next40pxDefaultSize: !0,
|
|
891
1045
|
__nextHasNoMarginBottom: !0,
|
|
892
1046
|
label: t,
|
|
893
|
-
value:
|
|
1047
|
+
value: f,
|
|
894
1048
|
min: l,
|
|
895
1049
|
max: a,
|
|
896
1050
|
showTooltip: c,
|
|
897
1051
|
withInputField: n,
|
|
898
|
-
onChange: (
|
|
899
|
-
u
|
|
1052
|
+
onChange: (u) => {
|
|
1053
|
+
d(u), m(u);
|
|
900
1054
|
},
|
|
901
1055
|
resetFallbackValue: o,
|
|
902
1056
|
...i
|
|
903
1057
|
}
|
|
904
|
-
), /* @__PURE__ */ React.createElement("span", null, s ? `${
|
|
905
|
-
},
|
|
906
|
-
|
|
907
|
-
|
|
1058
|
+
), /* @__PURE__ */ React.createElement("span", null, s ? `${f * 16}px` : null, " "));
|
|
1059
|
+
}, gt = ({
|
|
1060
|
+
unit: e,
|
|
1061
|
+
value: t,
|
|
908
1062
|
onValueChange: l,
|
|
909
1063
|
onUnitChange: a,
|
|
910
|
-
inputClassName: n = "
|
|
1064
|
+
inputClassName: n = ""
|
|
911
1065
|
}) => {
|
|
912
|
-
const [r, s] =
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
}, [e, t]), g(() => {
|
|
916
|
-
!r && o === "arbitrary" && d(u);
|
|
1066
|
+
const [r, s] = g(!1), [c, i] = g([]), [o, f] = g(t);
|
|
1067
|
+
R(() => {
|
|
1068
|
+
!r && e === "arbitrary" && f(t);
|
|
917
1069
|
}, [r]);
|
|
918
|
-
const
|
|
919
|
-
var
|
|
920
|
-
if (
|
|
921
|
-
const
|
|
1070
|
+
const d = (u) => {
|
|
1071
|
+
var b, x, k;
|
|
1072
|
+
if (u !== "arbitrary" && ((k = (x = (b = bb == null ? void 0 : bb.codex) == null ? void 0 : b.units) == null ? void 0 : x.spacing) != null && k[u])) {
|
|
1073
|
+
const N = bb.codex.units.spacing[u];
|
|
922
1074
|
i(
|
|
923
|
-
Array.isArray(
|
|
1075
|
+
Array.isArray(N) ? N : Object.keys(N)
|
|
924
1076
|
);
|
|
925
1077
|
} else
|
|
926
1078
|
i([]);
|
|
927
1079
|
s(!0);
|
|
928
|
-
},
|
|
1080
|
+
}, m = [
|
|
929
1081
|
{
|
|
930
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
1082
|
+
icon: /* @__PURE__ */ React.createElement(Be, null),
|
|
931
1083
|
label: "Tailwind CSS Units",
|
|
932
1084
|
value: "native"
|
|
933
1085
|
},
|
|
934
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
935
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
936
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
937
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
938
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
1086
|
+
{ icon: /* @__PURE__ */ React.createElement(Se, null), label: "Percentage Units", value: "percent" },
|
|
1087
|
+
{ icon: /* @__PURE__ */ React.createElement(Le, null), label: "Grid Units", value: "grid" },
|
|
1088
|
+
{ icon: /* @__PURE__ */ React.createElement(_e, null), label: "Screen Units", value: "screen" },
|
|
1089
|
+
{ icon: /* @__PURE__ */ React.createElement(He, null), label: "Pixel Units", value: "arbitrary" },
|
|
1090
|
+
{ icon: /* @__PURE__ */ React.createElement(ye, null), label: "Fluid Units", value: "fluid" }
|
|
939
1091
|
];
|
|
940
1092
|
return /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-col items-baseline" }, /* @__PURE__ */ React.createElement(
|
|
941
|
-
|
|
1093
|
+
O,
|
|
942
1094
|
{
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
},
|
|
952
|
-
readOnly: o !== "arbitrary"
|
|
953
|
-
},
|
|
954
|
-
/* @__PURE__ */ React.createElement(
|
|
955
|
-
Ze,
|
|
956
|
-
{
|
|
957
|
-
visible: r,
|
|
958
|
-
position: "bottom left",
|
|
959
|
-
className: "w-[300px] bg-white shadow-sm",
|
|
960
|
-
onVisibleChange: s
|
|
961
|
-
},
|
|
962
|
-
o === "arbitrary" ? /* @__PURE__ */ React.createElement(
|
|
1095
|
+
__next40pxDefaultSize: !0,
|
|
1096
|
+
className: n,
|
|
1097
|
+
value: e === "grid" ? t.replace("b_", "") : t,
|
|
1098
|
+
onClick: () => e !== "arbitrary" && d(e),
|
|
1099
|
+
onChange: l,
|
|
1100
|
+
readOnly: e !== "arbitrary",
|
|
1101
|
+
autoComplete: "off",
|
|
1102
|
+
suffix: /* @__PURE__ */ React.createElement(z, null, /* @__PURE__ */ React.createElement(
|
|
963
1103
|
$e,
|
|
964
1104
|
{
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1105
|
+
visible: r,
|
|
1106
|
+
position: "bottom left",
|
|
1107
|
+
className: "w-[300px] bg-white shadow-sm",
|
|
1108
|
+
onVisibleChange: s
|
|
1109
|
+
},
|
|
1110
|
+
e === "arbitrary" ? /* @__PURE__ */ React.createElement(
|
|
1111
|
+
Ie,
|
|
1112
|
+
{
|
|
1113
|
+
value: t,
|
|
1114
|
+
label: "Pixel Value",
|
|
1115
|
+
min: 0,
|
|
1116
|
+
max: 100,
|
|
1117
|
+
gridMode: !0,
|
|
1118
|
+
showTooltip: !1,
|
|
1119
|
+
allowReset: !0,
|
|
1120
|
+
resetFallbackValue: isNaN(o.toString()) ? 0 : Number(o) / 16,
|
|
1121
|
+
onValueChange: l
|
|
975
1122
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1123
|
+
) : /* @__PURE__ */ React.createElement(
|
|
1124
|
+
we,
|
|
1125
|
+
{
|
|
1126
|
+
className: "mt-4",
|
|
1127
|
+
options: c.map((u) => ({
|
|
1128
|
+
value: u,
|
|
1129
|
+
label: e === "grid" ? u.toString().replace("b_", "") : u,
|
|
1130
|
+
onClick: () => {
|
|
1131
|
+
l(u);
|
|
1132
|
+
}
|
|
1133
|
+
})),
|
|
1134
|
+
size: "small",
|
|
1135
|
+
value: (t == null ? void 0 : t.toString()) || "",
|
|
1136
|
+
onPressedChange: l
|
|
1137
|
+
}
|
|
1138
|
+
)
|
|
1139
|
+
), /* @__PURE__ */ React.createElement(
|
|
1140
|
+
Pe,
|
|
979
1141
|
{
|
|
980
|
-
|
|
981
|
-
options:
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
})),
|
|
988
|
-
size: "small",
|
|
989
|
-
defaultPressed: (u == null ? void 0 : u.toString()) || "",
|
|
990
|
-
onPressedChange: (b) => {
|
|
991
|
-
E(b), l(b);
|
|
1142
|
+
value: e,
|
|
1143
|
+
options: m,
|
|
1144
|
+
toggleProps: {
|
|
1145
|
+
className: "!p-0 !min-w-0 !h-6 w-6"
|
|
1146
|
+
},
|
|
1147
|
+
onPressedChange: (u) => {
|
|
1148
|
+
u === "reset" ? (l(""), s(!1)) : (a(u), d(u));
|
|
992
1149
|
}
|
|
993
1150
|
}
|
|
994
|
-
)
|
|
995
|
-
|
|
996
|
-
/* @__PURE__ */ React.createElement(
|
|
997
|
-
Ve,
|
|
998
|
-
{
|
|
999
|
-
className: "h-[32px]",
|
|
1000
|
-
defaultValue: o,
|
|
1001
|
-
options: T,
|
|
1002
|
-
onPressedChange: (b) => {
|
|
1003
|
-
b === "reset" ? (E(""), l(""), s(!1)) : (m(b), a(b), x(b));
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
)
|
|
1151
|
+
))
|
|
1152
|
+
}
|
|
1007
1153
|
));
|
|
1008
|
-
}, U =
|
|
1009
|
-
const e =
|
|
1154
|
+
}, U = A(null), G = () => {
|
|
1155
|
+
const e = P(U);
|
|
1010
1156
|
if (!e)
|
|
1011
1157
|
throw new Error("useModalContext must be used within a ModalProvider");
|
|
1012
1158
|
return e;
|
|
1013
|
-
},
|
|
1159
|
+
}, Rt = ({
|
|
1014
1160
|
children: e,
|
|
1015
1161
|
defaultOpen: t,
|
|
1016
1162
|
onOpenChange: l,
|
|
1017
1163
|
title: a,
|
|
1018
1164
|
className: n
|
|
1019
1165
|
}) => {
|
|
1020
|
-
const [r, s] =
|
|
1021
|
-
|
|
1166
|
+
const [r, s] = g(!1);
|
|
1167
|
+
R(() => {
|
|
1022
1168
|
s(t);
|
|
1023
1169
|
}, [t]);
|
|
1024
1170
|
const c = () => s(!0), i = () => s(!1);
|
|
1025
|
-
return
|
|
1171
|
+
return R(() => {
|
|
1026
1172
|
l(r);
|
|
1027
|
-
}, [r, l]), /* @__PURE__ */ React.createElement(U.Provider, { value: { closeModal: i, openModal: c } },
|
|
1028
|
-
|
|
1173
|
+
}, [r, l]), /* @__PURE__ */ React.createElement(U.Provider, { value: { closeModal: i, openModal: c } }, _.map(e, (o) => L(o) && o.type === De ? o : null), r && /* @__PURE__ */ React.createElement(
|
|
1174
|
+
le,
|
|
1029
1175
|
{
|
|
1030
|
-
className:
|
|
1176
|
+
className: p("blockbite-ui__modal", n),
|
|
1031
1177
|
onRequestClose: i,
|
|
1032
1178
|
title: a
|
|
1033
1179
|
},
|
|
1034
|
-
/* @__PURE__ */ React.createElement("div", { className: "relative" },
|
|
1180
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative" }, _.map(e, (o) => L(o) && o.type === Oe ? o : null), _.map(e, (o) => L(o) && o.type === je ? o : null), _.map(e, (o) => L(o) && o.type === ze ? o : null))
|
|
1035
1181
|
));
|
|
1036
|
-
},
|
|
1182
|
+
}, Oe = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
|
|
1037
1183
|
"div",
|
|
1038
1184
|
{
|
|
1039
|
-
className:
|
|
1185
|
+
className: p(
|
|
1040
1186
|
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
1041
1187
|
t
|
|
1042
1188
|
),
|
|
1043
1189
|
...l
|
|
1044
1190
|
},
|
|
1045
1191
|
e
|
|
1046
|
-
),
|
|
1192
|
+
), ze = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
|
|
1047
1193
|
"div",
|
|
1048
1194
|
{
|
|
1049
|
-
className:
|
|
1050
|
-
"border-
|
|
1195
|
+
className: p(
|
|
1196
|
+
"border-border fixed bottom-0 left-0 right-0 flex h-[4rem] flex-row items-center justify-end gap-2 border-t bg-white px-4",
|
|
1051
1197
|
t
|
|
1052
1198
|
),
|
|
1053
1199
|
...l
|
|
1054
1200
|
},
|
|
1055
1201
|
e
|
|
1056
|
-
),
|
|
1202
|
+
), je = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
|
|
1057
1203
|
"div",
|
|
1058
1204
|
{
|
|
1059
|
-
className:
|
|
1205
|
+
className: p("text-gray-medium px-4 pb-4 text-sm", t),
|
|
1060
1206
|
...l
|
|
1061
1207
|
},
|
|
1062
1208
|
e
|
|
1063
|
-
),
|
|
1064
|
-
const { closeModal: t } =
|
|
1209
|
+
), Et = ({ children: e }) => {
|
|
1210
|
+
const { closeModal: t } = G();
|
|
1065
1211
|
return /* @__PURE__ */ React.createElement("div", { onClick: t, className: "cursor-pointer" }, e);
|
|
1066
|
-
},
|
|
1067
|
-
const { openModal: t } =
|
|
1212
|
+
}, De = ({ children: e }) => {
|
|
1213
|
+
const { openModal: t } = G();
|
|
1068
1214
|
return /* @__PURE__ */ React.createElement("div", { onClick: t, className: "cursor-pointer" }, e);
|
|
1069
1215
|
};
|
|
1070
|
-
function
|
|
1216
|
+
function Ae(e, t) {
|
|
1071
1217
|
Array.from(e.styleSheets).forEach((l) => {
|
|
1072
1218
|
try {
|
|
1073
1219
|
if (l.cssRules) {
|
|
@@ -1088,15 +1234,15 @@ function Ge(e, t) {
|
|
|
1088
1234
|
}
|
|
1089
1235
|
});
|
|
1090
1236
|
}
|
|
1091
|
-
const
|
|
1237
|
+
const ht = ({
|
|
1092
1238
|
windowInstance: e,
|
|
1093
1239
|
onClose: t,
|
|
1094
1240
|
children: l
|
|
1095
1241
|
}) => {
|
|
1096
|
-
const a =
|
|
1097
|
-
return
|
|
1242
|
+
const a = fe(() => document.createElement("div"), []);
|
|
1243
|
+
return R(() => {
|
|
1098
1244
|
const n = e;
|
|
1099
|
-
n.document.body.innerHTML = "", n.document.body.appendChild(a),
|
|
1245
|
+
n.document.body.innerHTML = "", n.document.body.appendChild(a), Ae(document, n.document), n.document.title = document.title || "Blockbite Editor";
|
|
1100
1246
|
const r = () => {
|
|
1101
1247
|
setTimeout(t, 100);
|
|
1102
1248
|
};
|
|
@@ -1104,81 +1250,39 @@ const vt = ({
|
|
|
1104
1250
|
n.removeEventListener("beforeunload", r);
|
|
1105
1251
|
};
|
|
1106
1252
|
}, [e]), D(l, a);
|
|
1107
|
-
},
|
|
1253
|
+
}, Ct = ({
|
|
1108
1254
|
children: e,
|
|
1109
1255
|
status: t = "success",
|
|
1110
1256
|
className: l
|
|
1111
1257
|
}) => {
|
|
1112
|
-
const [a, n] =
|
|
1113
|
-
return /* @__PURE__ */ React.createElement(
|
|
1114
|
-
|
|
1258
|
+
const [a, n] = g(!0);
|
|
1259
|
+
return /* @__PURE__ */ React.createElement(E, { onClick: () => n(!1) }, a && /* @__PURE__ */ React.createElement(
|
|
1260
|
+
ne,
|
|
1115
1261
|
{
|
|
1116
1262
|
status: t,
|
|
1117
|
-
className:
|
|
1263
|
+
className: p(l),
|
|
1118
1264
|
onRemove: () => n(!1)
|
|
1119
1265
|
},
|
|
1120
1266
|
e
|
|
1121
1267
|
));
|
|
1122
|
-
}
|
|
1123
|
-
function K(e) {
|
|
1124
|
-
var t, l, a = "";
|
|
1125
|
-
if (typeof e == "string" || typeof e == "number") a += e;
|
|
1126
|
-
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1127
|
-
var n = e.length;
|
|
1128
|
-
for (t = 0; t < n; t++) e[t] && (l = K(e[t])) && (a && (a += " "), a += l);
|
|
1129
|
-
} else for (l in e) e[l] && (a && (a += " "), a += l);
|
|
1130
|
-
return a;
|
|
1131
|
-
}
|
|
1132
|
-
function Ue() {
|
|
1133
|
-
for (var e, t, l = 0, a = "", n = arguments.length; l < n; l++) (e = arguments[l]) && (t = K(e)) && (a && (a += " "), a += t);
|
|
1134
|
-
return a;
|
|
1135
|
-
}
|
|
1136
|
-
const We = (e) => Re("path", e), q = F(
|
|
1137
|
-
/**
|
|
1138
|
-
* @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
|
|
1139
|
-
* Other props will be passed through to svg component.
|
|
1140
|
-
* @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.
|
|
1141
|
-
*
|
|
1142
|
-
* @return {JSX.Element} Stop component
|
|
1143
|
-
*/
|
|
1144
|
-
({
|
|
1145
|
-
className: e,
|
|
1146
|
-
isPressed: t,
|
|
1147
|
-
...l
|
|
1148
|
-
}, a) => {
|
|
1149
|
-
const n = {
|
|
1150
|
-
...l,
|
|
1151
|
-
className: Ue(e, {
|
|
1152
|
-
"is-pressed": t
|
|
1153
|
-
}) || void 0,
|
|
1154
|
-
"aria-hidden": !0,
|
|
1155
|
-
focusable: !1
|
|
1156
|
-
};
|
|
1157
|
-
return /* @__PURE__ */ be("svg", {
|
|
1158
|
-
...n,
|
|
1159
|
-
ref: a
|
|
1160
|
-
});
|
|
1161
|
-
}
|
|
1162
|
-
);
|
|
1163
|
-
q.displayName = "SVG";
|
|
1164
|
-
const yt = ({
|
|
1268
|
+
}, bt = ({
|
|
1165
1269
|
label: e,
|
|
1166
1270
|
value: t,
|
|
1167
1271
|
onChange: l,
|
|
1168
1272
|
...a
|
|
1169
1273
|
}) => {
|
|
1170
|
-
const [n, r] =
|
|
1274
|
+
const [n, r] = g(!1);
|
|
1171
1275
|
return /* @__PURE__ */ React.createElement(
|
|
1172
|
-
|
|
1276
|
+
O,
|
|
1173
1277
|
{
|
|
1174
1278
|
label: e,
|
|
1175
1279
|
value: t,
|
|
1176
1280
|
type: n ? "text" : "password",
|
|
1177
|
-
suffix: /* @__PURE__ */ React.createElement(
|
|
1178
|
-
|
|
1281
|
+
suffix: /* @__PURE__ */ React.createElement(z, { variant: "control" }, /* @__PURE__ */ React.createElement(
|
|
1282
|
+
C,
|
|
1179
1283
|
{
|
|
1180
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
1181
|
-
|
|
1284
|
+
icon: /* @__PURE__ */ React.createElement(ge, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React.createElement(
|
|
1285
|
+
Re,
|
|
1182
1286
|
{
|
|
1183
1287
|
d: n ? "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z" : "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"
|
|
1184
1288
|
}
|
|
@@ -1192,12 +1296,12 @@ const yt = ({
|
|
|
1192
1296
|
...a
|
|
1193
1297
|
}
|
|
1194
1298
|
);
|
|
1195
|
-
},
|
|
1299
|
+
}, xt = ({
|
|
1196
1300
|
items: e,
|
|
1197
1301
|
activeId: t,
|
|
1198
1302
|
onSelect: l,
|
|
1199
1303
|
className: a
|
|
1200
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
1304
|
+
}) => /* @__PURE__ */ React.createElement(E, { important: !0, className: a }, /* @__PURE__ */ React.createElement("div", { className: "w-[200px] overflow-y-auto border-r border-border gap-2" }, e.map((n) => /* @__PURE__ */ React.createElement(
|
|
1201
1305
|
"div",
|
|
1202
1306
|
{
|
|
1203
1307
|
key: n.id,
|
|
@@ -1207,11 +1311,11 @@ const yt = ({
|
|
|
1207
1311
|
/* @__PURE__ */ React.createElement("span", { className: "rounded bg-slate-300 w-12 h-12 flex items-center justify-center text-2xl font-bold text-white" }, n.name.charAt(0).toUpperCase()),
|
|
1208
1312
|
/* @__PURE__ */ React.createElement("p", { className: "text-sm text-center mt-1" }, n.name)
|
|
1209
1313
|
))));
|
|
1210
|
-
function
|
|
1314
|
+
function wt(e) {
|
|
1211
1315
|
const { media: t, mediaClass: l } = e, { url: a, alt: n, sizes: r } = t;
|
|
1212
1316
|
if (r === void 0)
|
|
1213
1317
|
return /* @__PURE__ */ React.createElement("img", { src: a, alt: n, className: `media ${l}` });
|
|
1214
|
-
const { thumbnail: s, medium: c, large: i } = r, o = s || a,
|
|
1318
|
+
const { thumbnail: s, medium: c, large: i } = r, o = s || a, f = c || a, d = i || a;
|
|
1215
1319
|
return /* @__PURE__ */ React.createElement("picture", { className: "responsive-media" }, o ? /* @__PURE__ */ React.createElement(
|
|
1216
1320
|
"source",
|
|
1217
1321
|
{
|
|
@@ -1219,23 +1323,23 @@ function kt(e) {
|
|
|
1219
1323
|
srcSet: o,
|
|
1220
1324
|
className: `media ${l}`
|
|
1221
1325
|
}
|
|
1222
|
-
) : null,
|
|
1326
|
+
) : null, f ? /* @__PURE__ */ React.createElement(
|
|
1223
1327
|
"source",
|
|
1224
1328
|
{
|
|
1225
1329
|
media: "(min-width: 1024px)",
|
|
1226
|
-
srcSet:
|
|
1330
|
+
srcSet: f,
|
|
1227
1331
|
className: `media ${l}`
|
|
1228
1332
|
}
|
|
1229
|
-
) : null,
|
|
1333
|
+
) : null, d ? /* @__PURE__ */ React.createElement(
|
|
1230
1334
|
"source",
|
|
1231
1335
|
{
|
|
1232
1336
|
media: "(min-width: 1536px)",
|
|
1233
|
-
srcSet:
|
|
1337
|
+
srcSet: d,
|
|
1234
1338
|
className: `media ${l}`
|
|
1235
1339
|
}
|
|
1236
|
-
) : null,
|
|
1340
|
+
) : null, f ? /* @__PURE__ */ React.createElement("img", { src: f, alt: n, className: `media ${l}` }) : null);
|
|
1237
1341
|
}
|
|
1238
|
-
function
|
|
1342
|
+
function vt(e) {
|
|
1239
1343
|
const { media: t, mediaClass: l } = e, { url: a } = t, n = a;
|
|
1240
1344
|
return /* @__PURE__ */ React.createElement(
|
|
1241
1345
|
"video",
|
|
@@ -1251,68 +1355,64 @@ function _t(e) {
|
|
|
1251
1355
|
/* @__PURE__ */ React.createElement("source", { src: n, type: "video/mp4" })
|
|
1252
1356
|
);
|
|
1253
1357
|
}
|
|
1254
|
-
const
|
|
1358
|
+
const Nt = ({
|
|
1255
1359
|
children: e,
|
|
1256
1360
|
className: t = "",
|
|
1257
1361
|
height: l = "large"
|
|
1258
1362
|
}) => /* @__PURE__ */ React.createElement(
|
|
1259
|
-
|
|
1363
|
+
E,
|
|
1260
1364
|
{
|
|
1261
|
-
className:
|
|
1365
|
+
className: p("scrollbar relative overflow-y-scroll", t, {
|
|
1262
1366
|
"h-[400px]": l === "large",
|
|
1263
1367
|
"h-[300px]": l === "medium",
|
|
1264
1368
|
"h-[200px]": l === "small"
|
|
1265
1369
|
})
|
|
1266
1370
|
},
|
|
1267
1371
|
e
|
|
1268
|
-
),
|
|
1372
|
+
), yt = ({
|
|
1269
1373
|
onChange: e,
|
|
1270
1374
|
className: t,
|
|
1271
|
-
|
|
1375
|
+
value: l,
|
|
1272
1376
|
options: a,
|
|
1273
1377
|
label: n = "",
|
|
1274
1378
|
emptyLabel: r = "No options available"
|
|
1275
1379
|
}) => {
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1278
|
-
c(l);
|
|
1279
|
-
}, []);
|
|
1280
|
-
const i = (o) => {
|
|
1281
|
-
c(o), e && e(o);
|
|
1380
|
+
const s = (c) => {
|
|
1381
|
+
e && e(c);
|
|
1282
1382
|
};
|
|
1283
1383
|
return /* @__PURE__ */ React.createElement("div", { className: t }, a && a.length > 0 && /* @__PURE__ */ React.createElement(
|
|
1284
|
-
|
|
1384
|
+
re,
|
|
1285
1385
|
{
|
|
1286
1386
|
__next40pxDefaultSize: !0,
|
|
1287
1387
|
__nextHasNoMarginBottom: !0,
|
|
1288
1388
|
label: n || "",
|
|
1289
|
-
value:
|
|
1290
|
-
onChange:
|
|
1389
|
+
value: l || "",
|
|
1390
|
+
onChange: s,
|
|
1291
1391
|
options: [{ value: "", label: "Select an option" }, ...a]
|
|
1292
1392
|
}
|
|
1293
1393
|
), (!a || (a == null ? void 0 : a.length) === 0) && /* @__PURE__ */ React.createElement("p", { className: "mb-2" }, r));
|
|
1294
|
-
}, { select:
|
|
1394
|
+
}, { select: Fe, dispatch: Ue } = wp.data, kt = ({
|
|
1295
1395
|
buttonText: e = "Add block"
|
|
1296
1396
|
}) => {
|
|
1297
1397
|
const t = () => {
|
|
1298
|
-
const l =
|
|
1398
|
+
const l = Fe("core/block-editor").getSelectedBlock(), { clientId: a, innerBlocks: n } = l, r = n[n.length - 1], s = Ee(
|
|
1299
1399
|
r.name,
|
|
1300
1400
|
r.attributes,
|
|
1301
1401
|
r.innerBlocks
|
|
1302
1402
|
);
|
|
1303
|
-
|
|
1403
|
+
Ue("core/block-editor").insertBlocks(s, 0, a);
|
|
1304
1404
|
};
|
|
1305
|
-
return /* @__PURE__ */ React.createElement(
|
|
1306
|
-
},
|
|
1307
|
-
const [a, n] =
|
|
1308
|
-
return
|
|
1405
|
+
return /* @__PURE__ */ React.createElement(C, { variant: "primary", onClick: () => t() }, e);
|
|
1406
|
+
}, _t = ({ children: e, watch: t, className: l }) => {
|
|
1407
|
+
const [a, n] = g(0);
|
|
1408
|
+
return R(() => {
|
|
1309
1409
|
setTimeout(() => {
|
|
1310
1410
|
n(1);
|
|
1311
1411
|
}, 250);
|
|
1312
1412
|
}, [t]), /* @__PURE__ */ React.createElement(
|
|
1313
|
-
|
|
1413
|
+
E,
|
|
1314
1414
|
{
|
|
1315
|
-
className:
|
|
1415
|
+
className: p(
|
|
1316
1416
|
l,
|
|
1317
1417
|
"duration-50 transform transition-all ease-in-out",
|
|
1318
1418
|
{
|
|
@@ -1323,38 +1423,38 @@ const Lt = ({
|
|
|
1323
1423
|
},
|
|
1324
1424
|
e
|
|
1325
1425
|
);
|
|
1326
|
-
},
|
|
1327
|
-
const [l, a] =
|
|
1328
|
-
return
|
|
1426
|
+
}, Lt = ({ className: e, defaultValue: t }) => {
|
|
1427
|
+
const [l, a] = g(!1);
|
|
1428
|
+
return R(() => {
|
|
1329
1429
|
setTimeout(() => {
|
|
1330
1430
|
a(!1);
|
|
1331
1431
|
}, 500), t && a(!0);
|
|
1332
|
-
}, [l, t]), l && /* @__PURE__ */ React.createElement(
|
|
1333
|
-
}, Z =
|
|
1432
|
+
}, [l, t]), l && /* @__PURE__ */ React.createElement(ce, { className: p(e) });
|
|
1433
|
+
}, Z = A(null), Ge = ({
|
|
1334
1434
|
children: e,
|
|
1335
1435
|
defaultValue: t,
|
|
1336
1436
|
value: l,
|
|
1337
1437
|
onValueChange: a,
|
|
1338
1438
|
...n
|
|
1339
1439
|
}) => {
|
|
1340
|
-
const r = l !== void 0, [s, c] =
|
|
1440
|
+
const r = l !== void 0, [s, c] = g(t || ""), f = {
|
|
1341
1441
|
activeTab: r ? l : s,
|
|
1342
|
-
setActiveTab: (
|
|
1343
|
-
r || c(
|
|
1442
|
+
setActiveTab: (d) => {
|
|
1443
|
+
r || c(d), a && a(d);
|
|
1344
1444
|
}
|
|
1345
1445
|
};
|
|
1346
|
-
return /* @__PURE__ */ React.createElement(Z.Provider, { value:
|
|
1347
|
-
},
|
|
1446
|
+
return /* @__PURE__ */ React.createElement(Z.Provider, { value: f }, /* @__PURE__ */ React.createElement(E, { important: !0, className: n.className }, e));
|
|
1447
|
+
}, We = ({
|
|
1348
1448
|
options: e,
|
|
1349
1449
|
children: t,
|
|
1350
1450
|
className: l,
|
|
1351
1451
|
onValueChange: a
|
|
1352
1452
|
}) => {
|
|
1353
|
-
const n =
|
|
1453
|
+
const n = P(Z), r = a || (n == null ? void 0 : n.setActiveTab);
|
|
1354
1454
|
return /* @__PURE__ */ React.createElement(
|
|
1355
|
-
|
|
1455
|
+
se,
|
|
1356
1456
|
{
|
|
1357
|
-
className:
|
|
1457
|
+
className: p("tabs-list", l),
|
|
1358
1458
|
tabs: e,
|
|
1359
1459
|
onSelect: (s) => {
|
|
1360
1460
|
r(s);
|
|
@@ -1362,28 +1462,28 @@ const Lt = ({
|
|
|
1362
1462
|
},
|
|
1363
1463
|
() => t
|
|
1364
1464
|
);
|
|
1365
|
-
},
|
|
1465
|
+
}, Ke = ({
|
|
1366
1466
|
value: e,
|
|
1367
1467
|
children: t,
|
|
1368
1468
|
className: l
|
|
1369
1469
|
}) => {
|
|
1370
|
-
const a =
|
|
1371
|
-
return (a == null ? void 0 : a.activeTab) === e ? /* @__PURE__ */ React.createElement(
|
|
1372
|
-
},
|
|
1373
|
-
Wrapper:
|
|
1374
|
-
List:
|
|
1375
|
-
Content:
|
|
1376
|
-
},
|
|
1470
|
+
const a = P(Z);
|
|
1471
|
+
return (a == null ? void 0 : a.activeTab) === e ? /* @__PURE__ */ React.createElement(E, { className: l }, t) : null;
|
|
1472
|
+
}, Mt = {
|
|
1473
|
+
Wrapper: Ge,
|
|
1474
|
+
List: We,
|
|
1475
|
+
Content: Ke
|
|
1476
|
+
}, St = ({
|
|
1377
1477
|
children: e,
|
|
1378
1478
|
onClick: t,
|
|
1379
1479
|
color: l = "blue",
|
|
1380
1480
|
className: a
|
|
1381
|
-
}) => /* @__PURE__ */ React.createElement("button", { onClick: t }, /* @__PURE__ */ React.createElement("div", { color: l, className:
|
|
1481
|
+
}) => /* @__PURE__ */ React.createElement("button", { onClick: t }, /* @__PURE__ */ React.createElement("div", { color: l, className: p(a) }, e)), Tt = ({
|
|
1382
1482
|
onChange: e,
|
|
1383
1483
|
defaultValue: t,
|
|
1384
1484
|
children: l
|
|
1385
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
1386
|
-
|
|
1485
|
+
}) => /* @__PURE__ */ React.createElement(E, { className: "blockbite-ui__text-control-label flex items-center" }, /* @__PURE__ */ React.createElement("span", { className: "outline-b-2 relative block -outline-offset-2 outline-black" }, /* @__PURE__ */ React.createElement(
|
|
1486
|
+
B,
|
|
1387
1487
|
{
|
|
1388
1488
|
__next40pxDefaultSize: !0,
|
|
1389
1489
|
__nextHasNoMarginBottom: !0,
|
|
@@ -1391,63 +1491,61 @@ const Lt = ({
|
|
|
1391
1491
|
value: t,
|
|
1392
1492
|
onChange: e
|
|
1393
1493
|
}
|
|
1394
|
-
), /* @__PURE__ */ React.createElement(
|
|
1494
|
+
), /* @__PURE__ */ React.createElement(Me, { className: "absolute right-1 top-2" })), " ", l), Ht = V(
|
|
1395
1495
|
({
|
|
1396
1496
|
className: e,
|
|
1397
1497
|
options: t,
|
|
1398
|
-
|
|
1498
|
+
value: l,
|
|
1399
1499
|
display: a = "label",
|
|
1400
1500
|
label: n = !1,
|
|
1401
1501
|
onPressedChange: r
|
|
1402
1502
|
}) => {
|
|
1403
|
-
const
|
|
1404
|
-
r(
|
|
1503
|
+
const s = (c) => {
|
|
1504
|
+
r(c);
|
|
1405
1505
|
};
|
|
1406
|
-
return
|
|
1407
|
-
|
|
1408
|
-
}, [l]), /* @__PURE__ */ React.createElement(h, { className: f(e) }, /* @__PURE__ */ React.createElement(
|
|
1409
|
-
ue,
|
|
1506
|
+
return /* @__PURE__ */ React.createElement(E, { className: p(e) }, /* @__PURE__ */ React.createElement(
|
|
1507
|
+
oe,
|
|
1410
1508
|
{
|
|
1411
1509
|
__next40pxDefaultSize: !0,
|
|
1412
1510
|
__nextHasNoMarginBottom: !0,
|
|
1413
1511
|
isBlock: !0,
|
|
1414
|
-
value:
|
|
1415
|
-
|
|
1512
|
+
value: l,
|
|
1513
|
+
...n ? { label: n } : {}
|
|
1416
1514
|
},
|
|
1417
1515
|
t.map(
|
|
1418
|
-
(
|
|
1419
|
-
|
|
1516
|
+
(c) => a === "icon" ? /* @__PURE__ */ React.createElement(
|
|
1517
|
+
ie,
|
|
1420
1518
|
{
|
|
1421
|
-
icon:
|
|
1422
|
-
label:
|
|
1423
|
-
key: `ToggleGroupControlIcon-${
|
|
1424
|
-
value:
|
|
1425
|
-
onClick: () =>
|
|
1519
|
+
icon: c.icon,
|
|
1520
|
+
label: c.label,
|
|
1521
|
+
key: `ToggleGroupControlIcon-${c.value}`,
|
|
1522
|
+
value: c.value,
|
|
1523
|
+
onClick: () => s(c.value)
|
|
1426
1524
|
}
|
|
1427
1525
|
) : /* @__PURE__ */ React.createElement(
|
|
1428
|
-
|
|
1526
|
+
me,
|
|
1429
1527
|
{
|
|
1430
|
-
key: `ToggleGroupControlOption-${
|
|
1431
|
-
value:
|
|
1432
|
-
label:
|
|
1433
|
-
onClick: () =>
|
|
1528
|
+
key: `ToggleGroupControlOption-${c.value}`,
|
|
1529
|
+
value: c.value,
|
|
1530
|
+
label: c.label,
|
|
1531
|
+
onClick: () => s(c.value)
|
|
1434
1532
|
}
|
|
1435
1533
|
)
|
|
1436
1534
|
)
|
|
1437
1535
|
));
|
|
1438
1536
|
}
|
|
1439
|
-
),
|
|
1537
|
+
), Bt = ({
|
|
1440
1538
|
label: e,
|
|
1441
1539
|
className: t,
|
|
1442
1540
|
onChange: l,
|
|
1443
1541
|
checked: a = !1
|
|
1444
1542
|
// Default to false if undefined, so it's always controlled
|
|
1445
1543
|
}) => {
|
|
1446
|
-
const [n, r] =
|
|
1447
|
-
return
|
|
1544
|
+
const [n, r] = g(a);
|
|
1545
|
+
return R(() => {
|
|
1448
1546
|
r(a);
|
|
1449
|
-
}, [a]), /* @__PURE__ */ React.createElement(
|
|
1450
|
-
|
|
1547
|
+
}, [a]), /* @__PURE__ */ React.createElement(E, { className: p(t, "flex items-center gap-2") }, /* @__PURE__ */ React.createElement(
|
|
1548
|
+
ue,
|
|
1451
1549
|
{
|
|
1452
1550
|
checked: n,
|
|
1453
1551
|
label: e,
|
|
@@ -1458,54 +1556,54 @@ const Lt = ({
|
|
|
1458
1556
|
));
|
|
1459
1557
|
};
|
|
1460
1558
|
export {
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1559
|
+
at as AutocompleteDropdown,
|
|
1560
|
+
ve as Badge,
|
|
1561
|
+
lt as BitePreview,
|
|
1562
|
+
nt as Button,
|
|
1563
|
+
xe as ButtonToggle,
|
|
1564
|
+
we as ButtonToggleGroup,
|
|
1565
|
+
rt as Chapter,
|
|
1566
|
+
ct as ChapterDivider,
|
|
1567
|
+
st as Checkbox,
|
|
1568
|
+
ot as DataItemList,
|
|
1569
|
+
it as DisappearingMessage,
|
|
1570
|
+
Pe as DropdownPicker,
|
|
1571
|
+
mt as EmptyState,
|
|
1572
|
+
ut as FloatingPanel,
|
|
1573
|
+
dt as FocalPointControl,
|
|
1574
|
+
v as Icon,
|
|
1575
|
+
ft as LinkPicker,
|
|
1576
|
+
pt as MediaPicker,
|
|
1577
|
+
gt as MetricsControl,
|
|
1578
|
+
Rt as Modal,
|
|
1579
|
+
Et as ModalClose,
|
|
1580
|
+
je as ModalContent,
|
|
1581
|
+
ze as ModalFooter,
|
|
1582
|
+
Oe as ModalHeader,
|
|
1583
|
+
De as ModalTrigger,
|
|
1584
|
+
ht as NewWindowPortal,
|
|
1585
|
+
Ct as Notice,
|
|
1586
|
+
bt as PasswordInput,
|
|
1587
|
+
$e as Popover,
|
|
1588
|
+
xt as ProjectsNavigation,
|
|
1589
|
+
Ie as RangeSlider,
|
|
1590
|
+
wt as ResponsiveImage,
|
|
1591
|
+
vt as ResponsiveVideo,
|
|
1592
|
+
Nt as ScrollList,
|
|
1593
|
+
yt as SelectControlWrapper,
|
|
1594
|
+
kt as SingleBlockTypeAppender,
|
|
1595
|
+
_t as SlideIn,
|
|
1596
|
+
Lt as Spinner,
|
|
1597
|
+
Mt as Tabs,
|
|
1598
|
+
Ke as TabsContent,
|
|
1599
|
+
We as TabsList,
|
|
1600
|
+
Ge as TabsWrapper,
|
|
1601
|
+
St as Tag,
|
|
1602
|
+
F as TextControl,
|
|
1603
|
+
Tt as TextControlLabel,
|
|
1604
|
+
Ht as ToggleGroup,
|
|
1605
|
+
Bt as ToggleSwitch,
|
|
1606
|
+
E as Wrap,
|
|
1607
|
+
G as useModalContext
|
|
1510
1608
|
};
|
|
1511
1609
|
//# sourceMappingURL=index.js.map
|