@blockbite/ui 2.0.22 → 2.0.24
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/Chapter.d.ts +1 -1
- package/dist/index.js +1692 -760
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,256 +1,256 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { __ as
|
|
5
|
-
import { MediaUploadCheck as
|
|
6
|
-
import { SVG as
|
|
7
|
-
import { createBlock as
|
|
8
|
-
function
|
|
1
|
+
import { Button as E, Dropdown as ve, TextControl as K, CheckboxControl as Re, DropdownMenu as Ee, FocalPointPicker as he, PanelRow as Ce, Popover as xe, RangeControl as we, __experimentalInputControl as se, __experimentalInputControlSuffixWrapper as oe, Modal as ye, Notice as Ne, __experimentalToggleGroupControl as P, __experimentalToggleGroupControlOptionIcon as O, __experimentalToggleGroupControlOption as H, SelectControl as _e, Spinner as ke, TabPanel as Se, ToggleControl as Me } from "@wordpress/components";
|
|
2
|
+
import { memo as C, useCallback as w, useState as f, useEffect as R, useRef as B, createPortal as ie, forwardRef as $, createContext as y, useContext as q, Children as j, isValidElement as V, useMemo as Te } from "@wordpress/element";
|
|
3
|
+
import Le from "@wordpress/api-fetch";
|
|
4
|
+
import { __ as N } from "@wordpress/i18n";
|
|
5
|
+
import { MediaUploadCheck as F, MediaUpload as Y } from "@wordpress/block-editor";
|
|
6
|
+
import { SVG as Be, Path as Pe } from "@wordpress/primitives";
|
|
7
|
+
import { createBlock as Oe } 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 Z = { 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 J;
|
|
18
|
+
function $e() {
|
|
19
|
+
return J || (J = 1, function(e) {
|
|
20
20
|
(function() {
|
|
21
|
-
var
|
|
21
|
+
var a = {}.hasOwnProperty;
|
|
22
22
|
function l() {
|
|
23
|
-
for (var
|
|
24
|
-
var
|
|
25
|
-
|
|
23
|
+
for (var t = "", r = 0; r < arguments.length; r++) {
|
|
24
|
+
var n = arguments[r];
|
|
25
|
+
n && (t = s(t, c(n)));
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return t;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
if (typeof
|
|
31
|
-
return
|
|
32
|
-
if (typeof
|
|
29
|
+
function c(t) {
|
|
30
|
+
if (typeof t == "string" || typeof t == "number")
|
|
31
|
+
return t;
|
|
32
|
+
if (typeof t != "object")
|
|
33
33
|
return "";
|
|
34
|
-
if (Array.isArray(
|
|
35
|
-
return l.apply(null,
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
38
|
-
var
|
|
39
|
-
for (var
|
|
40
|
-
|
|
41
|
-
return
|
|
34
|
+
if (Array.isArray(t))
|
|
35
|
+
return l.apply(null, t);
|
|
36
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
37
|
+
return t.toString();
|
|
38
|
+
var r = "";
|
|
39
|
+
for (var n in t)
|
|
40
|
+
a.call(t, n) && t[n] && (r = s(r, n));
|
|
41
|
+
return r;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function s(t, r) {
|
|
44
|
+
return r ? t ? t + " " + r : t + r : t;
|
|
45
45
|
}
|
|
46
46
|
e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
|
|
47
47
|
})();
|
|
48
|
-
}(
|
|
48
|
+
}(Z)), Z.exports;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
const
|
|
50
|
+
var ze = $e();
|
|
51
|
+
const b = /* @__PURE__ */ He(ze), _ = ({ icon: e, ...a }) => e ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { ...a })) : null, je = C(
|
|
52
52
|
({
|
|
53
53
|
children: e,
|
|
54
|
-
className:
|
|
54
|
+
className: a,
|
|
55
55
|
value: l,
|
|
56
|
-
variant:
|
|
57
|
-
pressed:
|
|
58
|
-
onPressedChange:
|
|
59
|
-
icon:
|
|
60
|
-
size:
|
|
61
|
-
display:
|
|
62
|
-
label:
|
|
56
|
+
variant: c = "secondary",
|
|
57
|
+
pressed: s,
|
|
58
|
+
onPressedChange: t,
|
|
59
|
+
icon: r,
|
|
60
|
+
size: n = "compact",
|
|
61
|
+
display: u = "auto",
|
|
62
|
+
label: i
|
|
63
63
|
}) => {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
}, [
|
|
64
|
+
const d = w(() => {
|
|
65
|
+
t(l);
|
|
66
|
+
}, [t, l]);
|
|
67
67
|
return /* @__PURE__ */ React.createElement(
|
|
68
|
-
|
|
68
|
+
E,
|
|
69
69
|
{
|
|
70
|
-
"aria-label":
|
|
71
|
-
className:
|
|
70
|
+
"aria-label": i,
|
|
71
|
+
className: b(a, "blockbite-ui__button--default"),
|
|
72
72
|
value: l,
|
|
73
|
-
size:
|
|
74
|
-
label:
|
|
75
|
-
variant:
|
|
73
|
+
size: n,
|
|
74
|
+
label: i,
|
|
75
|
+
variant: c,
|
|
76
76
|
showTooltip: !0,
|
|
77
|
-
isPressed:
|
|
78
|
-
onClick:
|
|
77
|
+
isPressed: s,
|
|
78
|
+
onClick: d
|
|
79
79
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
r && /* @__PURE__ */ React.createElement(_, { icon: r }),
|
|
81
|
+
u !== "icon" ? e : null,
|
|
82
|
+
i && !e && u !== "icon" ? /* @__PURE__ */ React.createElement("span", null, i) : null
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
|
-
),
|
|
85
|
+
), Ve = C(
|
|
86
86
|
({
|
|
87
87
|
className: e,
|
|
88
|
-
value:
|
|
88
|
+
value: a,
|
|
89
89
|
toggle: l = !0,
|
|
90
|
-
display:
|
|
91
|
-
options:
|
|
92
|
-
size:
|
|
93
|
-
tabs:
|
|
94
|
-
variant:
|
|
95
|
-
stretch:
|
|
96
|
-
onPressedChange:
|
|
90
|
+
display: c = "auto",
|
|
91
|
+
options: s,
|
|
92
|
+
size: t = "compact",
|
|
93
|
+
tabs: r = !1,
|
|
94
|
+
variant: n = "secondary",
|
|
95
|
+
stretch: u = !1,
|
|
96
|
+
onPressedChange: i
|
|
97
97
|
}) => {
|
|
98
|
-
const
|
|
99
|
-
(
|
|
100
|
-
const
|
|
101
|
-
|
|
98
|
+
const d = w(
|
|
99
|
+
(o) => {
|
|
100
|
+
const m = l && a === o ? "" : o;
|
|
101
|
+
i == null || i(m);
|
|
102
102
|
},
|
|
103
|
-
[
|
|
104
|
-
),
|
|
103
|
+
[i, l, a]
|
|
104
|
+
), p = (o) => c === "icon" && (o != null && o.icon) ? /* @__PURE__ */ React.createElement(_, { icon: o.icon }) : c === "label" ? /* @__PURE__ */ React.createElement("span", null, o.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, o.icon && /* @__PURE__ */ React.createElement(_, { icon: o.icon }), /* @__PURE__ */ React.createElement("span", null, o.label));
|
|
105
105
|
return /* @__PURE__ */ React.createElement(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className:
|
|
108
|
+
className: b(
|
|
109
109
|
"blockbite-ui__button-group flex flex-wrap gap-1",
|
|
110
110
|
e,
|
|
111
|
-
|
|
111
|
+
r ? "blockbite-ui__button-group--tabs" : ""
|
|
112
112
|
)
|
|
113
113
|
},
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
s.map((o, m) => /* @__PURE__ */ React.createElement(
|
|
115
|
+
E,
|
|
116
116
|
{
|
|
117
|
-
key: `ButtonToggleGroup__${
|
|
118
|
-
className:
|
|
119
|
-
grow:
|
|
120
|
-
"justify-center":
|
|
117
|
+
key: `ButtonToggleGroup__${o.value}__${o.label}__${m}`,
|
|
118
|
+
className: b("blockbite-ui__button--default", {
|
|
119
|
+
grow: u,
|
|
120
|
+
"justify-center": u
|
|
121
121
|
}),
|
|
122
|
-
"aria-label":
|
|
122
|
+
"aria-label": o.label,
|
|
123
123
|
showTooltip: !0,
|
|
124
|
-
value:
|
|
125
|
-
size:
|
|
126
|
-
label: (
|
|
127
|
-
variant:
|
|
128
|
-
isPressed:
|
|
129
|
-
onClick: () =>
|
|
124
|
+
value: o.value,
|
|
125
|
+
size: t,
|
|
126
|
+
label: (o == null ? void 0 : o.tooltip) || o.label,
|
|
127
|
+
variant: n,
|
|
128
|
+
isPressed: a === o.value,
|
|
129
|
+
onClick: () => d(o.value)
|
|
130
130
|
},
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
p(o),
|
|
132
|
+
o.children && o.children
|
|
133
133
|
))
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
|
-
),
|
|
136
|
+
), h = ({
|
|
137
137
|
children: e,
|
|
138
|
-
className:
|
|
138
|
+
className: a,
|
|
139
139
|
important: l = !1,
|
|
140
|
-
onClick:
|
|
141
|
-
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick:
|
|
142
|
-
function
|
|
140
|
+
onClick: c
|
|
141
|
+
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick: c }, /* @__PURE__ */ React.createElement("div", { className: a }, e)) : /* @__PURE__ */ React.createElement("div", { className: a }, e);
|
|
142
|
+
function jt({
|
|
143
143
|
value: e,
|
|
144
|
-
options:
|
|
144
|
+
options: a,
|
|
145
145
|
swatch: l,
|
|
146
|
-
onPressedChange:
|
|
146
|
+
onPressedChange: c
|
|
147
147
|
}) {
|
|
148
|
-
const [
|
|
148
|
+
const [s, t] = f(""), [r, n] = f([]);
|
|
149
149
|
return R(() => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
(
|
|
150
|
+
n(
|
|
151
|
+
a.filter(
|
|
152
|
+
(u) => u.label.toLowerCase().includes(s.toLowerCase())
|
|
153
153
|
)
|
|
154
154
|
);
|
|
155
|
-
}, [
|
|
156
|
-
|
|
157
|
-
}, [e,
|
|
158
|
-
|
|
155
|
+
}, [s, a]), R(() => {
|
|
156
|
+
t(""), n(a);
|
|
157
|
+
}, [e, a]), /* @__PURE__ */ React.createElement(
|
|
158
|
+
ve,
|
|
159
159
|
{
|
|
160
160
|
className: "option-panel-dropdown",
|
|
161
161
|
contentClassName: "option-panel-dropdown-content",
|
|
162
162
|
popoverProps: { placement: "bottom-start" },
|
|
163
|
-
renderToggle: ({ isOpen:
|
|
164
|
-
|
|
163
|
+
renderToggle: ({ isOpen: u, onToggle: i }) => /* @__PURE__ */ React.createElement(h, { important: !0 }, /* @__PURE__ */ React.createElement(
|
|
164
|
+
E,
|
|
165
165
|
{
|
|
166
166
|
variant: "secondary",
|
|
167
167
|
size: "small",
|
|
168
|
-
onClick:
|
|
169
|
-
"aria-expanded":
|
|
168
|
+
onClick: i,
|
|
169
|
+
"aria-expanded": u
|
|
170
170
|
},
|
|
171
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(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
174
|
+
className: b(`h-3 w-3 rounded-full bg-${e}`)
|
|
175
175
|
}
|
|
176
176
|
), /* @__PURE__ */ React.createElement("span", null, e || "Select option…"))
|
|
177
177
|
)),
|
|
178
|
-
renderContent: () => /* @__PURE__ */ React.createElement(
|
|
179
|
-
|
|
178
|
+
renderContent: () => /* @__PURE__ */ React.createElement(h, { important: !0 }, /* @__PURE__ */ React.createElement("div", { className: "w-52" }, /* @__PURE__ */ React.createElement(
|
|
179
|
+
K,
|
|
180
180
|
{
|
|
181
181
|
__next40pxDefaultSize: !0,
|
|
182
182
|
__nextHasNoMarginBottom: !0,
|
|
183
183
|
label: "Search options",
|
|
184
|
-
value:
|
|
185
|
-
onChange: (
|
|
184
|
+
value: s,
|
|
185
|
+
onChange: (u) => t(u),
|
|
186
186
|
autoComplete: "off"
|
|
187
187
|
}
|
|
188
|
-
), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 gap-1 !bg-transparent p-0 !pt-2" },
|
|
189
|
-
|
|
188
|
+
), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 gap-1 !bg-transparent p-0 !pt-2" }, r.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]" }, "No options found."), r.map((u, i) => /* @__PURE__ */ React.createElement(
|
|
189
|
+
je,
|
|
190
190
|
{
|
|
191
|
-
key: `ButtonToggle__${
|
|
192
|
-
className:
|
|
193
|
-
"bg-primary":
|
|
191
|
+
key: `ButtonToggle__${u.value}___${i}`,
|
|
192
|
+
className: b({
|
|
193
|
+
"bg-primary": u.value
|
|
194
194
|
}),
|
|
195
195
|
size: "small",
|
|
196
|
-
value:
|
|
197
|
-
pressed: e ===
|
|
198
|
-
onPressedChange: (
|
|
199
|
-
|
|
196
|
+
value: u.value.toString(),
|
|
197
|
+
pressed: e === u.value,
|
|
198
|
+
onPressedChange: (d) => {
|
|
199
|
+
c(d ? u.value : "");
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
202
|
l && /* @__PURE__ */ React.createElement(
|
|
203
203
|
"div",
|
|
204
204
|
{
|
|
205
|
-
className:
|
|
206
|
-
`mr-3 h-3 w-3 rounded-full bg-${
|
|
205
|
+
className: b(
|
|
206
|
+
`mr-3 h-3 w-3 rounded-full bg-${u.value}`
|
|
207
207
|
)
|
|
208
208
|
}
|
|
209
209
|
),
|
|
210
|
-
|
|
210
|
+
u.label
|
|
211
211
|
)))))
|
|
212
212
|
}
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
|
-
const
|
|
215
|
+
const Ie = ({ children: e, className: a, label: l, onClick: c }) => /* @__PURE__ */ React.createElement(
|
|
216
216
|
"div",
|
|
217
217
|
{
|
|
218
|
-
onClick:
|
|
219
|
-
className:
|
|
220
|
-
|
|
218
|
+
onClick: c,
|
|
219
|
+
className: b(
|
|
220
|
+
a,
|
|
221
221
|
"inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800"
|
|
222
222
|
)
|
|
223
223
|
},
|
|
224
224
|
l && /* @__PURE__ */ React.createElement("span", { className: "mr-1 text-xs font-semibold text-gray-700" }, l),
|
|
225
225
|
e
|
|
226
|
-
),
|
|
227
|
-
const
|
|
226
|
+
), Vt = ({ htmlContent: e, cssContent: a, frontendAssets: l }) => {
|
|
227
|
+
const c = B(null), [s, t] = f(null);
|
|
228
228
|
return R(() => {
|
|
229
|
-
const
|
|
230
|
-
return
|
|
231
|
-
const
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
238
|
-
const
|
|
239
|
-
|
|
229
|
+
const r = c.current;
|
|
230
|
+
return r && (r.onload = () => {
|
|
231
|
+
const n = r.contentDocument || r.contentWindow.document;
|
|
232
|
+
if (n) {
|
|
233
|
+
t(n.body);
|
|
234
|
+
const u = n.createElement("style");
|
|
235
|
+
u.innerHTML = a, n.head.appendChild(u), l.forEach(({ type: i, id: d, url: p }) => {
|
|
236
|
+
const o = document.getElementById(d);
|
|
237
|
+
if (o) {
|
|
238
|
+
const m = document.adoptNode(
|
|
239
|
+
o.cloneNode(!0)
|
|
240
240
|
);
|
|
241
|
-
|
|
241
|
+
n.head.appendChild(m);
|
|
242
242
|
} else {
|
|
243
|
-
const
|
|
244
|
-
|
|
243
|
+
const m = n.createElement(
|
|
244
|
+
i === "script" ? "script" : "link"
|
|
245
245
|
);
|
|
246
|
-
|
|
246
|
+
m.id = d, i === "script" ? (m.src = p, m.async = !0) : (m.rel = "stylesheet", m.href = p), n.head.appendChild(m);
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
}), () => {
|
|
251
|
-
|
|
251
|
+
r && (r.onload = null);
|
|
252
252
|
};
|
|
253
|
-
}, [e,
|
|
253
|
+
}, [e, a, l]), /* @__PURE__ */ React.createElement(
|
|
254
254
|
"div",
|
|
255
255
|
{
|
|
256
256
|
className: "render-preview-container",
|
|
@@ -259,14 +259,14 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
259
259
|
/* @__PURE__ */ React.createElement(
|
|
260
260
|
"iframe",
|
|
261
261
|
{
|
|
262
|
-
ref:
|
|
262
|
+
ref: c,
|
|
263
263
|
title: "Preview",
|
|
264
264
|
className: "editor-styles-wrapper",
|
|
265
265
|
width: "100%",
|
|
266
266
|
height: "100%"
|
|
267
267
|
}
|
|
268
268
|
),
|
|
269
|
-
|
|
269
|
+
s && ie(
|
|
270
270
|
/* @__PURE__ */ React.createElement("div", { className: "b_" }, /* @__PURE__ */ React.createElement(
|
|
271
271
|
"div",
|
|
272
272
|
{
|
|
@@ -274,82 +274,81 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
274
274
|
dangerouslySetInnerHTML: { __html: e }
|
|
275
275
|
}
|
|
276
276
|
)),
|
|
277
|
-
|
|
277
|
+
s
|
|
278
278
|
)
|
|
279
279
|
);
|
|
280
|
-
},
|
|
280
|
+
}, It = ({
|
|
281
281
|
children: e,
|
|
282
|
-
size:
|
|
282
|
+
size: a = "default",
|
|
283
283
|
label: l,
|
|
284
|
-
className:
|
|
285
|
-
onClick:
|
|
286
|
-
variant:
|
|
287
|
-
display:
|
|
288
|
-
icon:
|
|
289
|
-
disabled:
|
|
284
|
+
className: c,
|
|
285
|
+
onClick: s,
|
|
286
|
+
variant: t = "primary",
|
|
287
|
+
display: r = "auto",
|
|
288
|
+
icon: n,
|
|
289
|
+
disabled: u = !1
|
|
290
290
|
}) => {
|
|
291
|
-
const
|
|
291
|
+
const i = r === "icon" || r === "icon-lg";
|
|
292
292
|
return /* @__PURE__ */ React.createElement(
|
|
293
|
-
|
|
293
|
+
E,
|
|
294
294
|
{
|
|
295
|
-
size:
|
|
296
|
-
variant:
|
|
295
|
+
size: a,
|
|
296
|
+
variant: t,
|
|
297
297
|
label: l,
|
|
298
298
|
showTooltip: !0,
|
|
299
|
-
disabled:
|
|
300
|
-
className:
|
|
301
|
-
|
|
299
|
+
disabled: u,
|
|
300
|
+
className: b(
|
|
301
|
+
c,
|
|
302
302
|
"blockbite-ui__button",
|
|
303
303
|
"flex items-center justify-center gap-1",
|
|
304
|
-
{ "is-primary":
|
|
305
|
-
{ "is-secondary":
|
|
306
|
-
{ "is-link":
|
|
307
|
-
{ "is-tertiary":
|
|
308
|
-
{ "is-icon":
|
|
304
|
+
{ "is-primary": t === "primary" },
|
|
305
|
+
{ "is-secondary": t === "secondary" },
|
|
306
|
+
{ "is-link": t === "link" },
|
|
307
|
+
{ "is-tertiary": t === "tertiary" },
|
|
308
|
+
{ "is-icon": r === "icon" }
|
|
309
309
|
),
|
|
310
|
-
onClick:
|
|
310
|
+
onClick: s
|
|
311
311
|
},
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
n && /* @__PURE__ */ React.createElement(
|
|
313
|
+
_,
|
|
314
314
|
{
|
|
315
|
-
icon:
|
|
316
|
-
className:
|
|
315
|
+
icon: n,
|
|
316
|
+
className: b({ "h-4 w-4": r === "icon-lg" })
|
|
317
317
|
}
|
|
318
318
|
),
|
|
319
|
-
|
|
320
|
-
l && !e && !
|
|
319
|
+
i ? null : e,
|
|
320
|
+
l && !e && !i ? /* @__PURE__ */ React.createElement("span", null, l) : null
|
|
321
321
|
);
|
|
322
|
-
},
|
|
323
|
-
|
|
322
|
+
}, At = ({ children: e, title: a, className: l }) => /* @__PURE__ */ React.createElement(
|
|
323
|
+
h,
|
|
324
324
|
{
|
|
325
|
-
className:
|
|
325
|
+
className: b(
|
|
326
326
|
"text-gray-medium my-2 flex items-center gap-1 text-[12px] font-medium",
|
|
327
|
-
|
|
327
|
+
l
|
|
328
328
|
)
|
|
329
329
|
},
|
|
330
|
-
"
|
|
331
|
-
t && /* @__PURE__ */ React.createElement(E, { className: "font-medium" }, t),
|
|
330
|
+
a && /* @__PURE__ */ React.createElement(h, { className: "font-medium" }, a),
|
|
332
331
|
e
|
|
333
|
-
),
|
|
332
|
+
), Ft = ({
|
|
334
333
|
title: e,
|
|
335
|
-
className:
|
|
334
|
+
className: a,
|
|
336
335
|
help: l,
|
|
337
|
-
badge:
|
|
338
|
-
...
|
|
339
|
-
}) => /* @__PURE__ */ React.createElement("div", { className:
|
|
340
|
-
const [
|
|
336
|
+
badge: c,
|
|
337
|
+
...s
|
|
338
|
+
}) => /* @__PURE__ */ React.createElement("div", { className: b("mb-2", a), ...s }, /* @__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), !!c && /* @__PURE__ */ React.createElement(Ie, { className: "text-[10px] py-px px-1" }, c)), l && /* @__PURE__ */ React.createElement("small", { className: "w-full shrink-0 text-[11px]" }, l)), Zt = ({ label: e, help: a, defaultChecked: l }) => {
|
|
339
|
+
const [c, s] = f(l);
|
|
341
340
|
return R(() => {
|
|
342
|
-
|
|
343
|
-
}, [l]), /* @__PURE__ */ React.createElement(
|
|
344
|
-
|
|
341
|
+
s(l);
|
|
342
|
+
}, [l]), /* @__PURE__ */ React.createElement(h, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
|
|
343
|
+
Re,
|
|
345
344
|
{
|
|
346
345
|
label: e,
|
|
347
|
-
help:
|
|
348
|
-
checked:
|
|
349
|
-
onChange:
|
|
346
|
+
help: a,
|
|
347
|
+
checked: c,
|
|
348
|
+
onChange: s
|
|
350
349
|
}
|
|
351
350
|
));
|
|
352
|
-
},
|
|
351
|
+
}, Ae = (e) => /* @__PURE__ */ React.createElement(
|
|
353
352
|
"svg",
|
|
354
353
|
{
|
|
355
354
|
width: e.width || "1em",
|
|
@@ -367,7 +366,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
367
366
|
fill: "currentColor"
|
|
368
367
|
}
|
|
369
368
|
)
|
|
370
|
-
),
|
|
369
|
+
), Fe = (e) => /* @__PURE__ */ React.createElement(
|
|
371
370
|
"svg",
|
|
372
371
|
{
|
|
373
372
|
width: e.width || "1em",
|
|
@@ -387,7 +386,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
387
386
|
fill: "currentColor"
|
|
388
387
|
}
|
|
389
388
|
)
|
|
390
|
-
),
|
|
389
|
+
), Ze = (e) => /* @__PURE__ */ React.createElement(
|
|
391
390
|
"svg",
|
|
392
391
|
{
|
|
393
392
|
width: e.width || "1em",
|
|
@@ -405,7 +404,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
405
404
|
fill: "currentColor"
|
|
406
405
|
}
|
|
407
406
|
)
|
|
408
|
-
),
|
|
407
|
+
), De = (e) => /* @__PURE__ */ React.createElement(
|
|
409
408
|
"svg",
|
|
410
409
|
{
|
|
411
410
|
width: e.width || "1em",
|
|
@@ -425,7 +424,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
425
424
|
fill: "currentColor"
|
|
426
425
|
}
|
|
427
426
|
)
|
|
428
|
-
),
|
|
427
|
+
), Ge = (e) => /* @__PURE__ */ React.createElement(
|
|
429
428
|
"svg",
|
|
430
429
|
{
|
|
431
430
|
width: e.width || "1em",
|
|
@@ -445,7 +444,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
445
444
|
fill: "currentColor"
|
|
446
445
|
}
|
|
447
446
|
)
|
|
448
|
-
),
|
|
447
|
+
), Ue = (e) => /* @__PURE__ */ React.createElement(
|
|
449
448
|
"svg",
|
|
450
449
|
{
|
|
451
450
|
width: e.width || "1em",
|
|
@@ -465,7 +464,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
465
464
|
fill: "currentColor"
|
|
466
465
|
}
|
|
467
466
|
)
|
|
468
|
-
),
|
|
467
|
+
), We = (e) => /* @__PURE__ */ React.createElement(
|
|
469
468
|
"svg",
|
|
470
469
|
{
|
|
471
470
|
width: e.width || "1em",
|
|
@@ -486,7 +485,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
486
485
|
strokeLinecap: "round"
|
|
487
486
|
}
|
|
488
487
|
)
|
|
489
|
-
),
|
|
488
|
+
), Ke = (e) => /* @__PURE__ */ React.createElement(
|
|
490
489
|
"svg",
|
|
491
490
|
{
|
|
492
491
|
width: e.width || "1em",
|
|
@@ -504,7 +503,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
504
503
|
fill: "currentColor"
|
|
505
504
|
}
|
|
506
505
|
)
|
|
507
|
-
),
|
|
506
|
+
), qe = (e) => /* @__PURE__ */ React.createElement(
|
|
508
507
|
"svg",
|
|
509
508
|
{
|
|
510
509
|
width: e.width || "1em",
|
|
@@ -524,7 +523,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
524
523
|
fill: "currentColor"
|
|
525
524
|
}
|
|
526
525
|
)
|
|
527
|
-
),
|
|
526
|
+
), Xe = (e) => /* @__PURE__ */ React.createElement(
|
|
528
527
|
"svg",
|
|
529
528
|
{
|
|
530
529
|
width: e.width || "1em",
|
|
@@ -542,7 +541,7 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
542
541
|
fill: "currentColor"
|
|
543
542
|
}
|
|
544
543
|
)
|
|
545
|
-
),
|
|
544
|
+
), Ye = (e) => /* @__PURE__ */ React.createElement(
|
|
546
545
|
"svg",
|
|
547
546
|
{
|
|
548
547
|
width: e.width || "1em",
|
|
@@ -562,92 +561,92 @@ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__
|
|
|
562
561
|
fill: "currentColor"
|
|
563
562
|
}
|
|
564
563
|
)
|
|
565
|
-
),
|
|
564
|
+
), ue = $(
|
|
566
565
|
({
|
|
567
566
|
onClick: e,
|
|
568
|
-
onChange:
|
|
567
|
+
onChange: a,
|
|
569
568
|
className: l,
|
|
570
|
-
value:
|
|
571
|
-
children:
|
|
572
|
-
inputClassName:
|
|
573
|
-
readOnly:
|
|
574
|
-
placeholder:
|
|
575
|
-
onBlur:
|
|
576
|
-
type:
|
|
577
|
-
label:
|
|
578
|
-
helper:
|
|
579
|
-
...
|
|
580
|
-
},
|
|
581
|
-
const
|
|
569
|
+
value: c,
|
|
570
|
+
children: s,
|
|
571
|
+
inputClassName: t,
|
|
572
|
+
readOnly: r,
|
|
573
|
+
placeholder: n,
|
|
574
|
+
onBlur: u,
|
|
575
|
+
type: i = "text",
|
|
576
|
+
label: d,
|
|
577
|
+
helper: p = "",
|
|
578
|
+
...o
|
|
579
|
+
}, m) => {
|
|
580
|
+
const v = `text-control-${Math.random().toString(36).substring(2, 15)}`;
|
|
582
581
|
return /* @__PURE__ */ React.createElement(
|
|
583
582
|
"div",
|
|
584
583
|
{
|
|
585
|
-
className:
|
|
586
|
-
...
|
|
584
|
+
className: b("flex items-center p-0", l),
|
|
585
|
+
...o
|
|
587
586
|
},
|
|
588
|
-
|
|
587
|
+
d ? /* @__PURE__ */ React.createElement("label", { htmlFor: v, className: "text-primary !m-0 !mb-0 !mr-2" }, d) : null,
|
|
589
588
|
/* @__PURE__ */ React.createElement(
|
|
590
589
|
"input",
|
|
591
590
|
{
|
|
592
|
-
id:
|
|
593
|
-
className:
|
|
591
|
+
id: v,
|
|
592
|
+
className: b(
|
|
594
593
|
"components-text-control__input",
|
|
595
|
-
|
|
594
|
+
t
|
|
596
595
|
),
|
|
597
|
-
type:
|
|
598
|
-
value:
|
|
599
|
-
placeholder:
|
|
596
|
+
type: i,
|
|
597
|
+
value: c,
|
|
598
|
+
placeholder: n,
|
|
600
599
|
onFocus: () => e && e(),
|
|
601
|
-
onBlur: (
|
|
602
|
-
e && e(),
|
|
600
|
+
onBlur: (g) => {
|
|
601
|
+
e && e(), u && u(g.target.value);
|
|
603
602
|
},
|
|
604
|
-
onChange: (
|
|
605
|
-
readOnly:
|
|
606
|
-
ref:
|
|
603
|
+
onChange: (g) => a && a(g.target.value),
|
|
604
|
+
readOnly: r,
|
|
605
|
+
ref: m
|
|
607
606
|
}
|
|
608
607
|
),
|
|
609
|
-
|
|
610
|
-
|
|
608
|
+
s,
|
|
609
|
+
p && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, p)
|
|
611
610
|
);
|
|
612
611
|
}
|
|
613
612
|
);
|
|
614
|
-
|
|
615
|
-
const
|
|
613
|
+
ue.displayName = "TextControl";
|
|
614
|
+
const Dt = ({
|
|
616
615
|
data: e,
|
|
617
|
-
active:
|
|
616
|
+
active: a,
|
|
618
617
|
setActive: l,
|
|
619
|
-
onCreate:
|
|
620
|
-
onDelete:
|
|
621
|
-
onUpdate:
|
|
622
|
-
onSwitch:
|
|
623
|
-
renderItemActions:
|
|
624
|
-
addons:
|
|
625
|
-
className:
|
|
626
|
-
footerSlot:
|
|
627
|
-
footerSlotClassName:
|
|
618
|
+
onCreate: c,
|
|
619
|
+
onDelete: s,
|
|
620
|
+
onUpdate: t,
|
|
621
|
+
onSwitch: r,
|
|
622
|
+
renderItemActions: n,
|
|
623
|
+
addons: u,
|
|
624
|
+
className: i = "",
|
|
625
|
+
footerSlot: d,
|
|
626
|
+
footerSlotClassName: p = ""
|
|
628
627
|
}) => {
|
|
629
|
-
const [
|
|
628
|
+
const [o, m] = f({
|
|
630
629
|
id: "",
|
|
631
630
|
name: ""
|
|
632
|
-
}), [
|
|
633
|
-
|
|
634
|
-
},
|
|
635
|
-
if (!
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
},
|
|
639
|
-
|
|
640
|
-
|
|
631
|
+
}), [v, g] = f(!1), z = B(null), L = () => {
|
|
632
|
+
c();
|
|
633
|
+
}, fe = () => {
|
|
634
|
+
if (!a || e.length === 0) return;
|
|
635
|
+
const x = e.filter((A) => A.id !== (a == null ? void 0 : a.id)), I = e.findIndex((A) => A.id === (a == null ? void 0 : a.id)), ge = x[I] || x[0];
|
|
636
|
+
s(a == null ? void 0 : a.id), l(ge);
|
|
637
|
+
}, be = (x) => {
|
|
638
|
+
g(!0), o.id && t(o.id, { name: x }), setTimeout(() => {
|
|
639
|
+
m({ id: "", name: "" }), g(!1);
|
|
641
640
|
}, 500);
|
|
642
641
|
};
|
|
643
|
-
return /* @__PURE__ */ React.createElement(
|
|
642
|
+
return /* @__PURE__ */ React.createElement(h, { important: !0, className: i }, /* @__PURE__ */ React.createElement("ul", { className: "h-[calc(100%-80px)] divide-y overflow-auto" }, u, e.length > 0 && /* @__PURE__ */ React.createElement("li", null, /* @__PURE__ */ React.createElement("ul", { className: "divide-y divide-border border-b border-border" }, e.map((x) => /* @__PURE__ */ React.createElement(
|
|
644
643
|
"li",
|
|
645
644
|
{
|
|
646
|
-
key: `data__${
|
|
647
|
-
className:
|
|
645
|
+
key: `data__${x.id}`,
|
|
646
|
+
className: b(
|
|
648
647
|
"relative !mb-0 flex items-center justify-between gap-1 bg-opacity-50 hover:bg-easy",
|
|
649
648
|
{
|
|
650
|
-
"bg-easy":
|
|
649
|
+
"bg-easy": x.id === (a == null ? void 0 : a.id)
|
|
651
650
|
}
|
|
652
651
|
)
|
|
653
652
|
},
|
|
@@ -656,159 +655,159 @@ const ot = ({
|
|
|
656
655
|
{
|
|
657
656
|
className: "text-gray-medium w-full truncate px-3 py-2 text-left text-sm/6 font-semibold hover:text-wordpress",
|
|
658
657
|
onClick: () => {
|
|
659
|
-
|
|
658
|
+
r(a == null ? void 0 : a.id, { ...a }), l(x);
|
|
660
659
|
},
|
|
661
660
|
onDoubleClick: () => {
|
|
662
|
-
|
|
661
|
+
m({ id: x.id, name: x.name || "" });
|
|
663
662
|
}
|
|
664
663
|
},
|
|
665
|
-
|
|
666
|
-
),
|
|
667
|
-
|
|
664
|
+
v && o.id === x.id ? /* @__PURE__ */ React.createElement("span", { className: "animate-pulse text-gray-medium" }, o.name) : /* @__PURE__ */ React.createElement("span", { className: "text-gray-medium" }, x.name || "Untitled")
|
|
665
|
+
), o.id === x.id && !v && /* @__PURE__ */ React.createElement(
|
|
666
|
+
ue,
|
|
668
667
|
{
|
|
669
668
|
className: "absolute left-1 top-0 w-[calc(100%-.5rem)] h-full",
|
|
670
669
|
inputClassName: "w-full",
|
|
671
|
-
defaultValue:
|
|
672
|
-
onChange: (
|
|
673
|
-
ref:
|
|
674
|
-
onBlur:
|
|
670
|
+
defaultValue: o.name,
|
|
671
|
+
onChange: (I) => m({ ...o, name: I }),
|
|
672
|
+
ref: z,
|
|
673
|
+
onBlur: be
|
|
675
674
|
}
|
|
676
675
|
)),
|
|
677
|
-
|
|
676
|
+
n && /* @__PURE__ */ React.createElement("div", { className: "flex gap-1 pr-1" }, n(x))
|
|
678
677
|
))))), /* @__PURE__ */ React.createElement(
|
|
679
678
|
"div",
|
|
680
679
|
{
|
|
681
|
-
className:
|
|
680
|
+
className: b(
|
|
682
681
|
"flex flex-wrap justify-center gap-2 p-2",
|
|
683
|
-
|
|
682
|
+
p
|
|
684
683
|
)
|
|
685
684
|
},
|
|
686
|
-
|
|
685
|
+
d,
|
|
687
686
|
/* @__PURE__ */ React.createElement(
|
|
688
|
-
|
|
687
|
+
E,
|
|
689
688
|
{
|
|
690
|
-
onClick:
|
|
691
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
689
|
+
onClick: L,
|
|
690
|
+
icon: /* @__PURE__ */ React.createElement(Ke, { className: "h-4 w-4" }),
|
|
692
691
|
variant: "tertiary",
|
|
693
692
|
size: "compact"
|
|
694
693
|
},
|
|
695
694
|
"Add"
|
|
696
695
|
),
|
|
697
696
|
/* @__PURE__ */ React.createElement(
|
|
698
|
-
|
|
697
|
+
E,
|
|
699
698
|
{
|
|
700
|
-
onClick:
|
|
701
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
699
|
+
onClick: fe,
|
|
700
|
+
icon: /* @__PURE__ */ React.createElement(Ye, { className: "h-4 w-4" }),
|
|
702
701
|
variant: "tertiary",
|
|
703
702
|
size: "compact",
|
|
704
|
-
disabled: !
|
|
703
|
+
disabled: !a || e.length === 0
|
|
705
704
|
},
|
|
706
705
|
"Remove"
|
|
707
706
|
)
|
|
708
707
|
));
|
|
709
|
-
},
|
|
708
|
+
}, Gt = ({
|
|
710
709
|
duration: e = 3e3,
|
|
711
|
-
className:
|
|
710
|
+
className: a,
|
|
712
711
|
children: l,
|
|
713
|
-
show:
|
|
714
|
-
message:
|
|
712
|
+
show: c,
|
|
713
|
+
message: s
|
|
715
714
|
}) => {
|
|
716
|
-
const [
|
|
715
|
+
const [t, r] = f(!1), n = B(!1), u = B(null);
|
|
717
716
|
return R(() => {
|
|
718
|
-
|
|
717
|
+
n.current = !0;
|
|
719
718
|
}, []), R(() => {
|
|
720
|
-
if (
|
|
721
|
-
return
|
|
722
|
-
|
|
719
|
+
if (n.current)
|
|
720
|
+
return c && (r(!0), u.current = setTimeout(() => {
|
|
721
|
+
r(!1);
|
|
723
722
|
}, e)), () => {
|
|
724
|
-
|
|
723
|
+
u.current && clearTimeout(u.current);
|
|
725
724
|
};
|
|
726
|
-
}, [
|
|
727
|
-
|
|
725
|
+
}, [c, e]), t ? /* @__PURE__ */ React.createElement(
|
|
726
|
+
h,
|
|
728
727
|
{
|
|
729
728
|
important: !0,
|
|
730
|
-
className:
|
|
729
|
+
className: b("bb-ui__disappearing-message", a)
|
|
731
730
|
},
|
|
732
|
-
/* @__PURE__ */ React.createElement("div", { className: "bb-ui__disappearing-message__content" },
|
|
731
|
+
/* @__PURE__ */ React.createElement("div", { className: "bb-ui__disappearing-message__content" }, s ?? l)
|
|
733
732
|
) : null;
|
|
734
|
-
},
|
|
733
|
+
}, Je = ({
|
|
735
734
|
label: e,
|
|
736
|
-
className:
|
|
735
|
+
className: a,
|
|
737
736
|
value: l,
|
|
738
|
-
defaultIcon:
|
|
739
|
-
size:
|
|
740
|
-
onPressedChange:
|
|
741
|
-
options:
|
|
742
|
-
...
|
|
737
|
+
defaultIcon: c = Ae,
|
|
738
|
+
size: s = "medium",
|
|
739
|
+
onPressedChange: t,
|
|
740
|
+
options: r,
|
|
741
|
+
...n
|
|
743
742
|
}) => {
|
|
744
|
-
var
|
|
745
|
-
const [
|
|
743
|
+
var o;
|
|
744
|
+
const [u, i] = f(null);
|
|
746
745
|
R(() => {
|
|
747
|
-
|
|
746
|
+
i(l);
|
|
748
747
|
}, [l]);
|
|
749
|
-
const
|
|
750
|
-
...
|
|
751
|
-
icon:
|
|
752
|
-
label:
|
|
753
|
-
title:
|
|
754
|
-
value:
|
|
748
|
+
const d = [
|
|
749
|
+
...r.map((m) => ({
|
|
750
|
+
icon: m.icon,
|
|
751
|
+
label: m.label,
|
|
752
|
+
title: m.label,
|
|
753
|
+
value: m.value,
|
|
755
754
|
onClick: () => {
|
|
756
|
-
|
|
755
|
+
i(m.value), t(m.value);
|
|
757
756
|
}
|
|
758
757
|
})),
|
|
759
758
|
{
|
|
760
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
759
|
+
icon: /* @__PURE__ */ React.createElement(_, { icon: c }),
|
|
761
760
|
title: "Reset",
|
|
762
761
|
value: "reset",
|
|
763
762
|
onClick: () => {
|
|
764
|
-
|
|
763
|
+
i("reset"), t("reset");
|
|
765
764
|
}
|
|
766
765
|
}
|
|
767
766
|
];
|
|
768
|
-
let
|
|
769
|
-
return
|
|
770
|
-
|
|
767
|
+
let p = "1em";
|
|
768
|
+
return s === "medium" ? p = "1.5em" : s === "large" && (p = "2em"), /* @__PURE__ */ React.createElement(
|
|
769
|
+
Ee,
|
|
771
770
|
{
|
|
772
|
-
controls:
|
|
773
|
-
className:
|
|
774
|
-
icon: ((
|
|
771
|
+
controls: d,
|
|
772
|
+
className: b("blockbite-ui__dropdown-picker", a),
|
|
773
|
+
icon: ((o = r.find((m) => m.value === u)) == null ? void 0 : o.icon) || /* @__PURE__ */ React.createElement(_, { width: p, height: p, icon: c }),
|
|
775
774
|
label: e || "Select",
|
|
776
|
-
...
|
|
775
|
+
...n
|
|
777
776
|
}
|
|
778
777
|
);
|
|
779
778
|
};
|
|
780
|
-
function
|
|
779
|
+
function Ut({
|
|
781
780
|
icon: e,
|
|
782
|
-
title:
|
|
781
|
+
title: a,
|
|
783
782
|
description: l,
|
|
784
|
-
children:
|
|
785
|
-
...
|
|
783
|
+
children: c = null,
|
|
784
|
+
...s
|
|
786
785
|
}) {
|
|
787
|
-
return /* @__PURE__ */ React.createElement("div", { ...
|
|
786
|
+
return /* @__PURE__ */ React.createElement("div", { ...s }, /* @__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" }, a), /* @__PURE__ */ React.createElement("p", { className: "mt-1 !font-sans text-sm !text-gray-500" }, l), c && /* @__PURE__ */ React.createElement("div", { className: "mt-4" }, c))));
|
|
788
787
|
}
|
|
789
|
-
function
|
|
788
|
+
function Wt({
|
|
790
789
|
children: e
|
|
791
790
|
}) {
|
|
792
|
-
const
|
|
791
|
+
const a = B(null), [l, c] = f({ x: 100, y: 100 }), [s, t] = f(!1), [r, n] = f({ x: 0, y: 0 });
|
|
793
792
|
R(() => {
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
x:
|
|
797
|
-
y:
|
|
793
|
+
const i = (p) => {
|
|
794
|
+
s && c({
|
|
795
|
+
x: p.clientX - r.x,
|
|
796
|
+
y: p.clientY - r.y
|
|
798
797
|
});
|
|
799
|
-
},
|
|
800
|
-
return window.addEventListener("mousemove",
|
|
801
|
-
window.removeEventListener("mousemove",
|
|
798
|
+
}, d = () => t(!1);
|
|
799
|
+
return window.addEventListener("mousemove", i), window.addEventListener("mouseup", d), () => {
|
|
800
|
+
window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", d);
|
|
802
801
|
};
|
|
803
|
-
}, [
|
|
804
|
-
const
|
|
805
|
-
const
|
|
806
|
-
|
|
802
|
+
}, [s, r]);
|
|
803
|
+
const u = (i) => {
|
|
804
|
+
const d = a.current.getBoundingClientRect();
|
|
805
|
+
n({ x: i.clientX - d.left, y: i.clientY - d.top }), t(!0);
|
|
807
806
|
};
|
|
808
807
|
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
809
808
|
"div",
|
|
810
809
|
{
|
|
811
|
-
ref:
|
|
810
|
+
ref: a,
|
|
812
811
|
className: "fixed bg-white shadow-xl rounded-2xl p-4 w-[400px] h-[550px] z-[9999]",
|
|
813
812
|
style: { left: l.x, top: l.y }
|
|
814
813
|
},
|
|
@@ -817,94 +816,94 @@ function ut({
|
|
|
817
816
|
"div",
|
|
818
817
|
{
|
|
819
818
|
className: "absolute top-1 right-1 cursor-move w-5 h-5 bg-gray-300 rounded",
|
|
820
|
-
onMouseDown:
|
|
819
|
+
onMouseDown: u
|
|
821
820
|
}
|
|
822
821
|
)
|
|
823
822
|
));
|
|
824
823
|
}
|
|
825
|
-
const
|
|
824
|
+
const Kt = ({
|
|
826
825
|
value: e,
|
|
827
|
-
onValueChange:
|
|
826
|
+
onValueChange: a,
|
|
828
827
|
url: l
|
|
829
828
|
}) => {
|
|
830
|
-
const [
|
|
829
|
+
const [c, s] = f({
|
|
831
830
|
x: 0.5,
|
|
832
831
|
y: 0.5
|
|
833
832
|
});
|
|
834
833
|
return R(() => {
|
|
835
834
|
if (e && e.includes("%")) {
|
|
836
|
-
const [
|
|
837
|
-
|
|
835
|
+
const [t, r] = e.replace("[", "").replace("%]", "").split("_").map((n) => parseFloat(n) / 100);
|
|
836
|
+
s({ x: t, y: r });
|
|
838
837
|
}
|
|
839
838
|
}, [e]), R(() => {
|
|
840
|
-
|
|
841
|
-
`[${(
|
|
839
|
+
a(
|
|
840
|
+
`[${(c.x * 100).toFixed(2)}%_${(c.y * 100).toFixed(2)}%]`
|
|
842
841
|
);
|
|
843
|
-
}, [
|
|
844
|
-
|
|
842
|
+
}, [c]), /* @__PURE__ */ React.createElement(h, { className: "relative flex flex-col" }, /* @__PURE__ */ React.createElement(
|
|
843
|
+
he,
|
|
845
844
|
{
|
|
846
845
|
url: l,
|
|
847
|
-
value:
|
|
848
|
-
onDrag:
|
|
849
|
-
onChange:
|
|
846
|
+
value: c,
|
|
847
|
+
onDrag: s,
|
|
848
|
+
onChange: s
|
|
850
849
|
}
|
|
851
850
|
));
|
|
852
851
|
};
|
|
853
|
-
function
|
|
854
|
-
const [
|
|
852
|
+
function qt(e) {
|
|
853
|
+
const [a, l] = f(""), [c, s] = f([]), [t, r] = f({
|
|
855
854
|
url: "",
|
|
856
855
|
title: ""
|
|
857
856
|
});
|
|
858
857
|
return R(() => {
|
|
859
|
-
|
|
860
|
-
path: `/blockbite/v1/block-helpers/get-links/${
|
|
858
|
+
a !== "" && (s(null), Le({
|
|
859
|
+
path: `/blockbite/v1/block-helpers/get-links/${a}`
|
|
861
860
|
}).then(
|
|
862
|
-
(
|
|
863
|
-
|
|
861
|
+
(n) => {
|
|
862
|
+
n != null && n.length ? s([...n]) : s([]);
|
|
864
863
|
}
|
|
865
864
|
));
|
|
866
|
-
}, [
|
|
867
|
-
|
|
868
|
-
}, [
|
|
869
|
-
|
|
865
|
+
}, [a]), R(() => {
|
|
866
|
+
t.url !== "" && e.parentCallback(t);
|
|
867
|
+
}, [t]), /* @__PURE__ */ React.createElement(h, { className: "blockbite--editor-linkwrap" }, /* @__PURE__ */ React.createElement(
|
|
868
|
+
K,
|
|
870
869
|
{
|
|
871
870
|
__next40pxDefaultSize: !0,
|
|
872
871
|
__nextHasNoMarginBottom: !0,
|
|
873
|
-
label:
|
|
874
|
-
value:
|
|
872
|
+
label: N("Search link", "blockbitelinks"),
|
|
873
|
+
value: a,
|
|
875
874
|
placeholder: "Example: About",
|
|
876
|
-
onChange: (
|
|
877
|
-
help:
|
|
875
|
+
onChange: (n) => l(n),
|
|
876
|
+
help: N("Type a post, page, title", "blockbitelinks")
|
|
878
877
|
}
|
|
879
|
-
),
|
|
880
|
-
|
|
878
|
+
), a ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-linklist" }, /* @__PURE__ */ React.createElement(
|
|
879
|
+
Qe,
|
|
881
880
|
{
|
|
882
|
-
links:
|
|
883
|
-
onActiveLink: (
|
|
884
|
-
|
|
881
|
+
links: c,
|
|
882
|
+
onActiveLink: (n) => [
|
|
883
|
+
r({ ...n }),
|
|
885
884
|
l("")
|
|
886
885
|
]
|
|
887
886
|
}
|
|
888
887
|
)) : null);
|
|
889
888
|
}
|
|
890
|
-
function
|
|
889
|
+
function Qe({ links: e, onActiveLink: a }) {
|
|
891
890
|
if (e === null)
|
|
892
891
|
return /* @__PURE__ */ React.createElement("p", null, "Loading...");
|
|
893
892
|
if (e.length === 0)
|
|
894
893
|
return /* @__PURE__ */ React.createElement("p", null, "No Results");
|
|
895
|
-
const l = e.map((
|
|
894
|
+
const l = e.map((c) => /* @__PURE__ */ React.createElement(h, { key: c.id }, /* @__PURE__ */ React.createElement(
|
|
896
895
|
"span",
|
|
897
896
|
{
|
|
898
897
|
className: "blockbite--editor-link",
|
|
899
|
-
onClick: () =>
|
|
898
|
+
onClick: () => a(c)
|
|
900
899
|
},
|
|
901
|
-
/* @__PURE__ */ React.createElement("span", null,
|
|
902
|
-
/* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" },
|
|
903
|
-
/* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" },
|
|
900
|
+
/* @__PURE__ */ React.createElement("span", null, c.title),
|
|
901
|
+
/* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" }, c.url),
|
|
902
|
+
/* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" }, c.post_type)
|
|
904
903
|
)));
|
|
905
904
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, l);
|
|
906
905
|
}
|
|
907
|
-
function
|
|
906
|
+
function Xt({ mediaProps: e, mediaCallback: a }) {
|
|
908
907
|
const l = [
|
|
909
908
|
"image",
|
|
910
909
|
"video",
|
|
@@ -912,7 +911,7 @@ function pt({ mediaProps: e, mediaCallback: t }) {
|
|
|
912
911
|
"svg",
|
|
913
912
|
"text/plain",
|
|
914
913
|
"application/json"
|
|
915
|
-
], [
|
|
914
|
+
], [c, s] = f({
|
|
916
915
|
id: null,
|
|
917
916
|
url: "",
|
|
918
917
|
sizes: [],
|
|
@@ -922,425 +921,1358 @@ function pt({ mediaProps: e, mediaCallback: t }) {
|
|
|
922
921
|
height: 0
|
|
923
922
|
});
|
|
924
923
|
R(() => {
|
|
925
|
-
e &&
|
|
924
|
+
e && s({ ...e });
|
|
926
925
|
}, [e]);
|
|
927
|
-
const
|
|
928
|
-
|
|
926
|
+
const t = () => {
|
|
927
|
+
a({ ...{
|
|
929
928
|
mediaId: 0,
|
|
930
929
|
mediaUrl: ""
|
|
931
930
|
} });
|
|
932
|
-
},
|
|
933
|
-
const
|
|
931
|
+
}, r = (n) => {
|
|
932
|
+
const u = {
|
|
934
933
|
thumbnail: null,
|
|
935
934
|
medium: null,
|
|
936
935
|
large: null
|
|
937
936
|
};
|
|
938
|
-
|
|
939
|
-
const
|
|
940
|
-
return (
|
|
941
|
-
}),
|
|
942
|
-
const
|
|
943
|
-
id:
|
|
944
|
-
url:
|
|
945
|
-
sizes:
|
|
946
|
-
alt:
|
|
947
|
-
type:
|
|
948
|
-
width:
|
|
949
|
-
height:
|
|
937
|
+
n != null && n.sizes && Object.keys(n.sizes).map((d) => {
|
|
938
|
+
const p = n.sizes[d];
|
|
939
|
+
return (d === "thumbnail" || p.width < 768 || p.height < 768) && (u.thumbnail = p.url), (d === "medium" || p.width > 1024 && p.width < 1024 || p.height < 1536 && p.height > 1536) && (u.medium = p.url), (d === "large" || p.width > 1536 || p.height > 1536) && (u.large = p.url), null;
|
|
940
|
+
}), n.url.endsWith(".json") && (n.type = "lottie"), n.url.endsWith(".svg") && (n.type = "svg");
|
|
941
|
+
const i = {
|
|
942
|
+
id: n.id,
|
|
943
|
+
url: n.url,
|
|
944
|
+
sizes: u,
|
|
945
|
+
alt: n.alt,
|
|
946
|
+
type: n.type,
|
|
947
|
+
width: n.width,
|
|
948
|
+
height: n.height
|
|
950
949
|
};
|
|
951
|
-
|
|
950
|
+
a({ ...i });
|
|
952
951
|
};
|
|
953
|
-
return /* @__PURE__ */ React.createElement(
|
|
954
|
-
|
|
952
|
+
return /* @__PURE__ */ React.createElement(Ce, null, c.id !== null && /* @__PURE__ */ React.createElement(F, null, /* @__PURE__ */ React.createElement(
|
|
953
|
+
Y,
|
|
955
954
|
{
|
|
956
|
-
onSelect:
|
|
957
|
-
value:
|
|
955
|
+
onSelect: r,
|
|
956
|
+
value: c.id,
|
|
958
957
|
allowedTypes: l,
|
|
959
|
-
render: ({ open:
|
|
960
|
-
|
|
958
|
+
render: ({ open: n }) => /* @__PURE__ */ React.createElement(
|
|
959
|
+
E,
|
|
961
960
|
{
|
|
962
|
-
className:
|
|
963
|
-
onClick:
|
|
961
|
+
className: c.id === 0 ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
|
|
962
|
+
onClick: n
|
|
964
963
|
},
|
|
965
|
-
|
|
966
|
-
|
|
964
|
+
c.id === 0 && N("Choose Media", "blockbite"),
|
|
965
|
+
c.id && c.type === "image" ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-visual-image" }, /* @__PURE__ */ React.createElement(
|
|
967
966
|
"img",
|
|
968
967
|
{
|
|
969
|
-
alt:
|
|
970
|
-
src:
|
|
968
|
+
alt: c.alt ? c.alt : N("Image", "blockbite"),
|
|
969
|
+
src: c.url
|
|
971
970
|
}
|
|
972
971
|
)) : "Add media"
|
|
973
972
|
)
|
|
974
973
|
}
|
|
975
|
-
)),
|
|
976
|
-
|
|
974
|
+
)), c.id !== 0 && /* @__PURE__ */ React.createElement(F, null, /* @__PURE__ */ React.createElement(
|
|
975
|
+
Y,
|
|
977
976
|
{
|
|
978
|
-
title:
|
|
979
|
-
value:
|
|
980
|
-
onSelect:
|
|
977
|
+
title: N("Replace media", "blockbite"),
|
|
978
|
+
value: c.id,
|
|
979
|
+
onSelect: r,
|
|
981
980
|
allowedTypes: l,
|
|
982
|
-
render: ({ open:
|
|
981
|
+
render: ({ open: n }) => /* @__PURE__ */ React.createElement(E, { onClick: n }, N("Replace media", "blockbite"))
|
|
983
982
|
}
|
|
984
|
-
)),
|
|
983
|
+
)), c.id !== 0 && /* @__PURE__ */ React.createElement(F, null, /* @__PURE__ */ React.createElement(E, { onClick: () => t(), isDestructive: !0 }, N("Remove media", "blockbite"))));
|
|
985
984
|
}
|
|
986
|
-
const
|
|
985
|
+
const et = ({
|
|
987
986
|
children: e,
|
|
988
|
-
className:
|
|
987
|
+
className: a,
|
|
989
988
|
position: l,
|
|
990
|
-
visible:
|
|
991
|
-
onClick:
|
|
992
|
-
onVisibleChange:
|
|
989
|
+
visible: c,
|
|
990
|
+
onClick: s,
|
|
991
|
+
onVisibleChange: t
|
|
993
992
|
}) => {
|
|
994
|
-
const [
|
|
993
|
+
const [r, n] = f(!!c);
|
|
995
994
|
R(() => {
|
|
996
|
-
|
|
997
|
-
}, [
|
|
998
|
-
const
|
|
999
|
-
const
|
|
1000
|
-
|
|
995
|
+
c !== void 0 && n(c);
|
|
996
|
+
}, [c]);
|
|
997
|
+
const u = () => {
|
|
998
|
+
const i = !r;
|
|
999
|
+
n(i), t && t(i);
|
|
1001
1000
|
};
|
|
1002
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
1003
|
-
|
|
1001
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, r && /* @__PURE__ */ React.createElement(
|
|
1002
|
+
xe,
|
|
1004
1003
|
{
|
|
1005
1004
|
position: l,
|
|
1006
1005
|
className: "blockbite-ui__popover",
|
|
1007
|
-
onClick:
|
|
1006
|
+
onClick: s,
|
|
1008
1007
|
onFocusOutside: () => {
|
|
1009
|
-
|
|
1008
|
+
n(!1), t && t(!1);
|
|
1010
1009
|
}
|
|
1011
1010
|
},
|
|
1012
|
-
/* @__PURE__ */ React.createElement("div", { className:
|
|
1013
|
-
|
|
1011
|
+
/* @__PURE__ */ React.createElement("div", { className: a }, /* @__PURE__ */ React.createElement("div", { className: "relative h-full w-full p-4" }, /* @__PURE__ */ React.createElement(
|
|
1012
|
+
E,
|
|
1014
1013
|
{
|
|
1015
|
-
onClick:
|
|
1014
|
+
onClick: u,
|
|
1016
1015
|
size: "small",
|
|
1017
1016
|
className: "close-button absolute right-0 top-0"
|
|
1018
1017
|
},
|
|
1019
|
-
/* @__PURE__ */ React.createElement(
|
|
1018
|
+
/* @__PURE__ */ React.createElement(Ze, null)
|
|
1020
1019
|
), e))
|
|
1021
1020
|
));
|
|
1022
|
-
},
|
|
1021
|
+
}, tt = ({
|
|
1023
1022
|
value: e,
|
|
1024
|
-
label:
|
|
1023
|
+
label: a,
|
|
1025
1024
|
min: l = 0,
|
|
1026
|
-
max:
|
|
1027
|
-
withInputField:
|
|
1028
|
-
onValueChange:
|
|
1029
|
-
gridMode:
|
|
1030
|
-
showTooltip:
|
|
1031
|
-
...
|
|
1025
|
+
max: c = 2e3,
|
|
1026
|
+
withInputField: s = !1,
|
|
1027
|
+
onValueChange: t,
|
|
1028
|
+
gridMode: r = !1,
|
|
1029
|
+
showTooltip: n = !1,
|
|
1030
|
+
...u
|
|
1032
1031
|
}) => {
|
|
1033
|
-
const [
|
|
1032
|
+
const [i] = f(0), [d, p] = f(0);
|
|
1034
1033
|
R(() => {
|
|
1035
|
-
|
|
1034
|
+
p(Math.round(parseInt(e) / (r ? 16 : 1)));
|
|
1036
1035
|
}, [e]);
|
|
1037
|
-
function m
|
|
1038
|
-
const
|
|
1039
|
-
|
|
1036
|
+
function o(m) {
|
|
1037
|
+
const v = m * (r ? 16 : 1);
|
|
1038
|
+
t(v.toString());
|
|
1040
1039
|
}
|
|
1041
|
-
return /* @__PURE__ */ React.createElement(
|
|
1042
|
-
|
|
1040
|
+
return /* @__PURE__ */ React.createElement(h, { className: "flex min-w-[240px] flex-col" }, /* @__PURE__ */ React.createElement(
|
|
1041
|
+
we,
|
|
1043
1042
|
{
|
|
1044
1043
|
__next40pxDefaultSize: !0,
|
|
1045
1044
|
__nextHasNoMarginBottom: !0,
|
|
1046
|
-
label:
|
|
1047
|
-
value:
|
|
1045
|
+
label: a,
|
|
1046
|
+
value: d,
|
|
1048
1047
|
min: l,
|
|
1049
|
-
max:
|
|
1050
|
-
showTooltip:
|
|
1051
|
-
withInputField:
|
|
1052
|
-
onChange: (
|
|
1053
|
-
|
|
1048
|
+
max: c,
|
|
1049
|
+
showTooltip: n,
|
|
1050
|
+
withInputField: s,
|
|
1051
|
+
onChange: (m) => {
|
|
1052
|
+
p(m), o(m);
|
|
1054
1053
|
},
|
|
1055
|
-
resetFallbackValue:
|
|
1056
|
-
...
|
|
1054
|
+
resetFallbackValue: i,
|
|
1055
|
+
...u
|
|
1057
1056
|
}
|
|
1058
|
-
), /* @__PURE__ */ React.createElement("span", null,
|
|
1059
|
-
},
|
|
1057
|
+
), /* @__PURE__ */ React.createElement("span", null, r ? `${d * 16}px` : null, " "));
|
|
1058
|
+
}, Yt = ({
|
|
1060
1059
|
unit: e,
|
|
1061
|
-
value:
|
|
1060
|
+
value: a,
|
|
1062
1061
|
onValueChange: l,
|
|
1063
|
-
onUnitChange:
|
|
1064
|
-
inputClassName:
|
|
1062
|
+
onUnitChange: c,
|
|
1063
|
+
inputClassName: s = ""
|
|
1065
1064
|
}) => {
|
|
1066
|
-
const [
|
|
1065
|
+
const [t, r] = f(!1), [n, u] = f([]), [i, d] = f(a);
|
|
1067
1066
|
R(() => {
|
|
1068
|
-
!
|
|
1069
|
-
}, [
|
|
1070
|
-
const
|
|
1071
|
-
var
|
|
1072
|
-
if (
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
Array.isArray(
|
|
1067
|
+
!t && e === "arbitrary" && d(a);
|
|
1068
|
+
}, [t]);
|
|
1069
|
+
const p = (m) => {
|
|
1070
|
+
var v, g, z;
|
|
1071
|
+
if (m !== "arbitrary" && ((z = (g = (v = bb == null ? void 0 : bb.codex) == null ? void 0 : v.units) == null ? void 0 : g.spacing) != null && z[m])) {
|
|
1072
|
+
const L = bb.codex.units.spacing[m];
|
|
1073
|
+
u(
|
|
1074
|
+
Array.isArray(L) ? L : Object.keys(L)
|
|
1076
1075
|
);
|
|
1077
1076
|
} else
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1077
|
+
u([]);
|
|
1078
|
+
r(!0);
|
|
1079
|
+
}, o = [
|
|
1081
1080
|
{
|
|
1082
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
1081
|
+
icon: /* @__PURE__ */ React.createElement(Xe, null),
|
|
1083
1082
|
label: "Tailwind CSS Units",
|
|
1084
1083
|
value: "native"
|
|
1085
1084
|
},
|
|
1086
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
1087
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
1088
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
1089
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
1090
|
-
{ icon: /* @__PURE__ */ React.createElement(
|
|
1085
|
+
{ icon: /* @__PURE__ */ React.createElement(We, null), label: "Percentage Units", value: "percent" },
|
|
1086
|
+
{ icon: /* @__PURE__ */ React.createElement(Ge, null), label: "Grid Units", value: "grid" },
|
|
1087
|
+
{ icon: /* @__PURE__ */ React.createElement(De, null), label: "Screen Units", value: "screen" },
|
|
1088
|
+
{ icon: /* @__PURE__ */ React.createElement(qe, null), label: "Pixel Units", value: "arbitrary" },
|
|
1089
|
+
{ icon: /* @__PURE__ */ React.createElement(Fe, null), label: "Fluid Units", value: "fluid" }
|
|
1091
1090
|
];
|
|
1092
1091
|
return /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-col items-baseline" }, /* @__PURE__ */ React.createElement(
|
|
1093
|
-
|
|
1092
|
+
se,
|
|
1094
1093
|
{
|
|
1095
1094
|
__next40pxDefaultSize: !0,
|
|
1096
|
-
className:
|
|
1097
|
-
value: e === "grid" ?
|
|
1098
|
-
onClick: () => e !== "arbitrary" &&
|
|
1095
|
+
className: s,
|
|
1096
|
+
value: e === "grid" ? a.replace("b_", "") : a,
|
|
1097
|
+
onClick: () => e !== "arbitrary" && p(e),
|
|
1099
1098
|
onChange: l,
|
|
1100
1099
|
readOnly: e !== "arbitrary",
|
|
1101
1100
|
autoComplete: "off",
|
|
1102
|
-
suffix: /* @__PURE__ */ React.createElement(
|
|
1103
|
-
|
|
1101
|
+
suffix: /* @__PURE__ */ React.createElement(oe, null, /* @__PURE__ */ React.createElement(
|
|
1102
|
+
et,
|
|
1104
1103
|
{
|
|
1105
|
-
visible:
|
|
1104
|
+
visible: t,
|
|
1106
1105
|
position: "bottom left",
|
|
1107
1106
|
className: "w-[300px] bg-white shadow-sm",
|
|
1108
|
-
onVisibleChange:
|
|
1107
|
+
onVisibleChange: r
|
|
1109
1108
|
},
|
|
1110
1109
|
e === "arbitrary" ? /* @__PURE__ */ React.createElement(
|
|
1111
|
-
|
|
1110
|
+
tt,
|
|
1112
1111
|
{
|
|
1113
|
-
value:
|
|
1112
|
+
value: a,
|
|
1114
1113
|
label: "Pixel Value",
|
|
1115
1114
|
min: 0,
|
|
1116
1115
|
max: 100,
|
|
1117
1116
|
gridMode: !0,
|
|
1118
1117
|
showTooltip: !1,
|
|
1119
1118
|
allowReset: !0,
|
|
1120
|
-
resetFallbackValue: isNaN(
|
|
1119
|
+
resetFallbackValue: isNaN(i.toString()) ? 0 : Number(i) / 16,
|
|
1121
1120
|
onValueChange: l
|
|
1122
1121
|
}
|
|
1123
1122
|
) : /* @__PURE__ */ React.createElement(
|
|
1124
|
-
|
|
1123
|
+
Ve,
|
|
1125
1124
|
{
|
|
1126
1125
|
className: "mt-4",
|
|
1127
|
-
options:
|
|
1128
|
-
value:
|
|
1129
|
-
label: e === "grid" ?
|
|
1126
|
+
options: n.map((m) => ({
|
|
1127
|
+
value: m,
|
|
1128
|
+
label: e === "grid" ? m.toString().replace("b_", "") : m,
|
|
1130
1129
|
onClick: () => {
|
|
1131
|
-
l(
|
|
1130
|
+
l(m);
|
|
1132
1131
|
}
|
|
1133
1132
|
})),
|
|
1134
1133
|
size: "small",
|
|
1135
|
-
value: (
|
|
1134
|
+
value: (a == null ? void 0 : a.toString()) || "",
|
|
1136
1135
|
onPressedChange: l
|
|
1137
1136
|
}
|
|
1138
1137
|
)
|
|
1139
1138
|
), /* @__PURE__ */ React.createElement(
|
|
1140
|
-
|
|
1139
|
+
Je,
|
|
1141
1140
|
{
|
|
1142
1141
|
value: e,
|
|
1143
|
-
options:
|
|
1142
|
+
options: o,
|
|
1144
1143
|
toggleProps: {
|
|
1145
1144
|
className: "!p-0 !min-w-0 !h-6 w-6"
|
|
1146
1145
|
},
|
|
1147
|
-
onPressedChange: (
|
|
1148
|
-
|
|
1146
|
+
onPressedChange: (m) => {
|
|
1147
|
+
m === "reset" ? (l(""), r(!1)) : (c(m), p(m));
|
|
1149
1148
|
}
|
|
1150
1149
|
}
|
|
1151
1150
|
))
|
|
1152
1151
|
}
|
|
1153
1152
|
));
|
|
1154
|
-
},
|
|
1155
|
-
const e =
|
|
1153
|
+
}, me = y(null), de = () => {
|
|
1154
|
+
const e = q(me);
|
|
1156
1155
|
if (!e)
|
|
1157
1156
|
throw new Error("useModalContext must be used within a ModalProvider");
|
|
1158
1157
|
return e;
|
|
1159
|
-
},
|
|
1158
|
+
}, Jt = ({
|
|
1160
1159
|
children: e,
|
|
1161
|
-
defaultOpen:
|
|
1160
|
+
defaultOpen: a,
|
|
1162
1161
|
onOpenChange: l,
|
|
1163
|
-
title:
|
|
1164
|
-
className:
|
|
1162
|
+
title: c,
|
|
1163
|
+
className: s
|
|
1165
1164
|
}) => {
|
|
1166
|
-
const [
|
|
1165
|
+
const [t, r] = f(!1);
|
|
1167
1166
|
R(() => {
|
|
1168
|
-
|
|
1169
|
-
}, [
|
|
1170
|
-
const
|
|
1167
|
+
r(a);
|
|
1168
|
+
}, [a]);
|
|
1169
|
+
const n = () => r(!0), u = () => r(!1);
|
|
1171
1170
|
return R(() => {
|
|
1172
|
-
l(
|
|
1173
|
-
}, [
|
|
1174
|
-
|
|
1171
|
+
l(t);
|
|
1172
|
+
}, [t, l]), /* @__PURE__ */ React.createElement(me.Provider, { value: { closeModal: u, openModal: n } }, j.map(e, (i) => V(i) && i.type === ct ? i : null), t && /* @__PURE__ */ React.createElement(
|
|
1173
|
+
ye,
|
|
1175
1174
|
{
|
|
1176
|
-
className:
|
|
1177
|
-
onRequestClose:
|
|
1178
|
-
title:
|
|
1175
|
+
className: b("blockbite-ui__modal", s),
|
|
1176
|
+
onRequestClose: u,
|
|
1177
|
+
title: c
|
|
1179
1178
|
},
|
|
1180
|
-
/* @__PURE__ */ React.createElement("div", { className: "relative" },
|
|
1179
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative" }, j.map(e, (i) => V(i) && i.type === at ? i : null), j.map(e, (i) => V(i) && i.type === nt ? i : null), j.map(e, (i) => V(i) && i.type === lt ? i : null))
|
|
1181
1180
|
));
|
|
1182
|
-
},
|
|
1181
|
+
}, at = ({ children: e, className: a = "", ...l }) => /* @__PURE__ */ React.createElement(
|
|
1183
1182
|
"div",
|
|
1184
1183
|
{
|
|
1185
|
-
className:
|
|
1184
|
+
className: b(
|
|
1186
1185
|
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
1187
|
-
|
|
1186
|
+
a
|
|
1188
1187
|
),
|
|
1189
1188
|
...l
|
|
1190
1189
|
},
|
|
1191
1190
|
e
|
|
1192
|
-
),
|
|
1191
|
+
), lt = ({ children: e, className: a = "", ...l }) => /* @__PURE__ */ React.createElement(
|
|
1193
1192
|
"div",
|
|
1194
1193
|
{
|
|
1195
|
-
className:
|
|
1194
|
+
className: b(
|
|
1196
1195
|
"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",
|
|
1197
|
-
|
|
1196
|
+
a
|
|
1198
1197
|
),
|
|
1199
1198
|
...l
|
|
1200
1199
|
},
|
|
1201
1200
|
e
|
|
1202
|
-
),
|
|
1201
|
+
), nt = ({ children: e, className: a = "", ...l }) => /* @__PURE__ */ React.createElement(
|
|
1203
1202
|
"div",
|
|
1204
1203
|
{
|
|
1205
|
-
className:
|
|
1204
|
+
className: b("text-gray-medium px-4 pb-4 text-sm", a),
|
|
1206
1205
|
...l
|
|
1207
1206
|
},
|
|
1208
1207
|
e
|
|
1209
|
-
),
|
|
1210
|
-
const { closeModal:
|
|
1211
|
-
return /* @__PURE__ */ React.createElement("div", { onClick:
|
|
1212
|
-
},
|
|
1213
|
-
const { openModal:
|
|
1214
|
-
return /* @__PURE__ */ React.createElement("div", { onClick:
|
|
1208
|
+
), Qt = ({ children: e }) => {
|
|
1209
|
+
const { closeModal: a } = de();
|
|
1210
|
+
return /* @__PURE__ */ React.createElement("div", { onClick: a, className: "cursor-pointer" }, e);
|
|
1211
|
+
}, ct = ({ children: e }) => {
|
|
1212
|
+
const { openModal: a } = de();
|
|
1213
|
+
return /* @__PURE__ */ React.createElement("div", { onClick: a, className: "cursor-pointer" }, e);
|
|
1215
1214
|
};
|
|
1216
|
-
function
|
|
1215
|
+
function rt(e, a) {
|
|
1217
1216
|
Array.from(e.styleSheets).forEach((l) => {
|
|
1218
1217
|
try {
|
|
1219
1218
|
if (l.cssRules) {
|
|
1220
|
-
const
|
|
1221
|
-
Array.from(l.cssRules).forEach((
|
|
1222
|
-
|
|
1223
|
-
}),
|
|
1219
|
+
const c = a.createElement("style");
|
|
1220
|
+
Array.from(l.cssRules).forEach((s) => {
|
|
1221
|
+
c.appendChild(a.createTextNode(s.cssText));
|
|
1222
|
+
}), a.head.appendChild(c);
|
|
1224
1223
|
} else if (l.href) {
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1224
|
+
const c = a.createElement("link");
|
|
1225
|
+
c.rel = "stylesheet", c.href = l.href, a.head.appendChild(c);
|
|
1227
1226
|
}
|
|
1228
|
-
} catch (
|
|
1227
|
+
} catch (c) {
|
|
1229
1228
|
if (l.href) {
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1229
|
+
const s = a.createElement("link");
|
|
1230
|
+
s.rel = "stylesheet", s.href = l.href, a.head.appendChild(s);
|
|
1232
1231
|
} else
|
|
1233
|
-
console.warn("Error copying styles:",
|
|
1232
|
+
console.warn("Error copying styles:", c);
|
|
1234
1233
|
}
|
|
1235
1234
|
});
|
|
1236
1235
|
}
|
|
1237
|
-
const
|
|
1236
|
+
const ea = ({
|
|
1238
1237
|
windowInstance: e,
|
|
1239
|
-
onClose:
|
|
1238
|
+
onClose: a,
|
|
1240
1239
|
children: l
|
|
1241
1240
|
}) => {
|
|
1242
|
-
const
|
|
1241
|
+
const c = Te(() => document.createElement("div"), []);
|
|
1243
1242
|
return R(() => {
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
const
|
|
1247
|
-
setTimeout(
|
|
1243
|
+
const s = e;
|
|
1244
|
+
s.document.body.innerHTML = "", s.document.body.appendChild(c), rt(document, s.document), s.document.title = document.title || "Blockbite Editor";
|
|
1245
|
+
const t = () => {
|
|
1246
|
+
setTimeout(a, 100);
|
|
1248
1247
|
};
|
|
1249
|
-
return
|
|
1250
|
-
|
|
1248
|
+
return s.addEventListener("beforeunload", t), () => {
|
|
1249
|
+
s.removeEventListener("beforeunload", t);
|
|
1251
1250
|
};
|
|
1252
|
-
}, [e]),
|
|
1253
|
-
},
|
|
1251
|
+
}, [e]), ie(l, c);
|
|
1252
|
+
}, ta = ({
|
|
1254
1253
|
children: e,
|
|
1255
|
-
status:
|
|
1254
|
+
status: a = "success",
|
|
1256
1255
|
className: l
|
|
1257
1256
|
}) => {
|
|
1258
|
-
const [
|
|
1259
|
-
return /* @__PURE__ */ React.createElement(
|
|
1260
|
-
|
|
1257
|
+
const [c, s] = f(!0);
|
|
1258
|
+
return /* @__PURE__ */ React.createElement(h, { onClick: () => s(!1) }, c && /* @__PURE__ */ React.createElement(
|
|
1259
|
+
Ne,
|
|
1261
1260
|
{
|
|
1262
|
-
status:
|
|
1263
|
-
className:
|
|
1264
|
-
onRemove: () =>
|
|
1261
|
+
status: a,
|
|
1262
|
+
className: b(l),
|
|
1263
|
+
onRemove: () => s(!1)
|
|
1265
1264
|
},
|
|
1266
1265
|
e
|
|
1267
1266
|
));
|
|
1268
|
-
},
|
|
1267
|
+
}, aa = ({
|
|
1269
1268
|
label: e,
|
|
1270
|
-
value:
|
|
1269
|
+
value: a,
|
|
1271
1270
|
onChange: l,
|
|
1272
|
-
...
|
|
1271
|
+
...c
|
|
1273
1272
|
}) => {
|
|
1274
|
-
const [
|
|
1273
|
+
const [s, t] = f(!1);
|
|
1275
1274
|
return /* @__PURE__ */ React.createElement(
|
|
1276
|
-
|
|
1275
|
+
se,
|
|
1277
1276
|
{
|
|
1278
1277
|
label: e,
|
|
1279
|
-
value:
|
|
1280
|
-
type:
|
|
1281
|
-
suffix: /* @__PURE__ */ React.createElement(
|
|
1282
|
-
|
|
1278
|
+
value: a,
|
|
1279
|
+
type: s ? "text" : "password",
|
|
1280
|
+
suffix: /* @__PURE__ */ React.createElement(oe, { variant: "control" }, /* @__PURE__ */ React.createElement(
|
|
1281
|
+
E,
|
|
1283
1282
|
{
|
|
1284
|
-
icon: /* @__PURE__ */ React.createElement(
|
|
1285
|
-
|
|
1283
|
+
icon: /* @__PURE__ */ React.createElement(Be, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React.createElement(
|
|
1284
|
+
Pe,
|
|
1286
1285
|
{
|
|
1287
|
-
d:
|
|
1286
|
+
d: s ? "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"
|
|
1288
1287
|
}
|
|
1289
1288
|
)),
|
|
1290
1289
|
label: "Show password",
|
|
1291
|
-
onClick: () =>
|
|
1290
|
+
onClick: () => t((r) => !r),
|
|
1292
1291
|
size: "small"
|
|
1293
1292
|
}
|
|
1294
1293
|
)),
|
|
1295
1294
|
onChange: l,
|
|
1296
|
-
...
|
|
1295
|
+
...c
|
|
1297
1296
|
}
|
|
1298
1297
|
);
|
|
1299
|
-
}
|
|
1298
|
+
};
|
|
1299
|
+
function st(e) {
|
|
1300
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1301
|
+
}
|
|
1302
|
+
var Q = { exports: {} };
|
|
1303
|
+
/*!
|
|
1304
|
+
Copyright (c) 2018 Jed Watson.
|
|
1305
|
+
Licensed under the MIT License (MIT), see
|
|
1306
|
+
http://jedwatson.github.io/classnames
|
|
1307
|
+
*/
|
|
1308
|
+
var ee;
|
|
1309
|
+
function ot() {
|
|
1310
|
+
return ee || (ee = 1, function(e) {
|
|
1311
|
+
(function() {
|
|
1312
|
+
var a = {}.hasOwnProperty;
|
|
1313
|
+
function l() {
|
|
1314
|
+
for (var t = "", r = 0; r < arguments.length; r++) {
|
|
1315
|
+
var n = arguments[r];
|
|
1316
|
+
n && (t = s(t, c(n)));
|
|
1317
|
+
}
|
|
1318
|
+
return t;
|
|
1319
|
+
}
|
|
1320
|
+
function c(t) {
|
|
1321
|
+
if (typeof t == "string" || typeof t == "number")
|
|
1322
|
+
return t;
|
|
1323
|
+
if (typeof t != "object")
|
|
1324
|
+
return "";
|
|
1325
|
+
if (Array.isArray(t))
|
|
1326
|
+
return l.apply(null, t);
|
|
1327
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
1328
|
+
return t.toString();
|
|
1329
|
+
var r = "";
|
|
1330
|
+
for (var n in t)
|
|
1331
|
+
a.call(t, n) && t[n] && (r = s(r, n));
|
|
1332
|
+
return r;
|
|
1333
|
+
}
|
|
1334
|
+
function s(t, r) {
|
|
1335
|
+
return r ? t ? t + " " + r : t + r : t;
|
|
1336
|
+
}
|
|
1337
|
+
e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
|
|
1338
|
+
})();
|
|
1339
|
+
}(Q)), Q.exports;
|
|
1340
|
+
}
|
|
1341
|
+
var it = ot();
|
|
1342
|
+
const k = /* @__PURE__ */ st(it), D = ({ icon: e, ...a }) => e ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { ...a })) : null;
|
|
1343
|
+
C(
|
|
1344
|
+
({
|
|
1345
|
+
children: e,
|
|
1346
|
+
className: a,
|
|
1347
|
+
value: l,
|
|
1348
|
+
variant: c = "secondary",
|
|
1349
|
+
pressed: s,
|
|
1350
|
+
onPressedChange: t,
|
|
1351
|
+
icon: r,
|
|
1352
|
+
size: n = "compact",
|
|
1353
|
+
display: u = "auto",
|
|
1354
|
+
label: i
|
|
1355
|
+
}) => {
|
|
1356
|
+
const d = w(() => {
|
|
1357
|
+
t(l);
|
|
1358
|
+
}, [t, l]);
|
|
1359
|
+
return /* @__PURE__ */ React.createElement(
|
|
1360
|
+
E,
|
|
1361
|
+
{
|
|
1362
|
+
"aria-label": i,
|
|
1363
|
+
className: k(a, "blockbite-ui__button--default"),
|
|
1364
|
+
value: l,
|
|
1365
|
+
size: n,
|
|
1366
|
+
label: i,
|
|
1367
|
+
variant: c,
|
|
1368
|
+
showTooltip: !0,
|
|
1369
|
+
isPressed: s,
|
|
1370
|
+
onClick: d
|
|
1371
|
+
},
|
|
1372
|
+
r && /* @__PURE__ */ React.createElement(D, { icon: r }),
|
|
1373
|
+
u !== "icon" ? e : null,
|
|
1374
|
+
i && !e && u !== "icon" ? /* @__PURE__ */ React.createElement("span", null, i) : null
|
|
1375
|
+
);
|
|
1376
|
+
}
|
|
1377
|
+
);
|
|
1378
|
+
C(
|
|
1379
|
+
({
|
|
1380
|
+
className: e,
|
|
1381
|
+
value: a,
|
|
1382
|
+
toggle: l = !0,
|
|
1383
|
+
display: c = "auto",
|
|
1384
|
+
options: s,
|
|
1385
|
+
size: t = "compact",
|
|
1386
|
+
tabs: r = !1,
|
|
1387
|
+
variant: n = "secondary",
|
|
1388
|
+
stretch: u = !1,
|
|
1389
|
+
onPressedChange: i
|
|
1390
|
+
}) => {
|
|
1391
|
+
const d = w(
|
|
1392
|
+
(o) => {
|
|
1393
|
+
const m = l && a === o ? "" : o;
|
|
1394
|
+
i == null || i(m);
|
|
1395
|
+
},
|
|
1396
|
+
[i, l, a]
|
|
1397
|
+
), p = (o) => c === "icon" && o != null && o.icon ? /* @__PURE__ */ React.createElement(D, { icon: o.icon }) : c === "label" ? /* @__PURE__ */ React.createElement("span", null, o.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, o.icon && /* @__PURE__ */ React.createElement(D, { icon: o.icon }), /* @__PURE__ */ React.createElement("span", null, o.label));
|
|
1398
|
+
return /* @__PURE__ */ React.createElement(
|
|
1399
|
+
"div",
|
|
1400
|
+
{
|
|
1401
|
+
className: k(
|
|
1402
|
+
"blockbite-ui__button-group flex flex-wrap gap-1",
|
|
1403
|
+
e,
|
|
1404
|
+
r ? "blockbite-ui__button-group--tabs" : ""
|
|
1405
|
+
)
|
|
1406
|
+
},
|
|
1407
|
+
s.map((o, m) => /* @__PURE__ */ React.createElement(
|
|
1408
|
+
E,
|
|
1409
|
+
{
|
|
1410
|
+
key: `ButtonToggleGroup__${o.value}__${o.label}__${m}`,
|
|
1411
|
+
className: k("blockbite-ui__button--default", {
|
|
1412
|
+
grow: u,
|
|
1413
|
+
"justify-center": u
|
|
1414
|
+
}),
|
|
1415
|
+
"aria-label": o.label,
|
|
1416
|
+
showTooltip: !0,
|
|
1417
|
+
value: o.value,
|
|
1418
|
+
size: t,
|
|
1419
|
+
label: (o == null ? void 0 : o.tooltip) || o.label,
|
|
1420
|
+
variant: n,
|
|
1421
|
+
isPressed: a === o.value,
|
|
1422
|
+
onClick: () => d(o.value)
|
|
1423
|
+
},
|
|
1424
|
+
p(o),
|
|
1425
|
+
o.children && o.children
|
|
1426
|
+
))
|
|
1427
|
+
);
|
|
1428
|
+
}
|
|
1429
|
+
);
|
|
1430
|
+
const pe = ({
|
|
1431
|
+
children: e,
|
|
1432
|
+
className: a,
|
|
1433
|
+
important: l = !1,
|
|
1434
|
+
onClick: c
|
|
1435
|
+
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick: c }, /* @__PURE__ */ React.createElement("div", { className: a }, e)) : /* @__PURE__ */ React.createElement("div", { className: a }, e), ut = $(
|
|
1436
|
+
({
|
|
1437
|
+
onClick: e,
|
|
1438
|
+
onChange: a,
|
|
1439
|
+
className: l,
|
|
1440
|
+
value: c,
|
|
1441
|
+
children: s,
|
|
1442
|
+
inputClassName: t,
|
|
1443
|
+
readOnly: r,
|
|
1444
|
+
placeholder: n,
|
|
1445
|
+
onBlur: u,
|
|
1446
|
+
type: i = "text",
|
|
1447
|
+
label: d,
|
|
1448
|
+
helper: p = "",
|
|
1449
|
+
...o
|
|
1450
|
+
}, m) => {
|
|
1451
|
+
const v = `text-control-${Math.random().toString(36).substring(2, 15)}`;
|
|
1452
|
+
return /* @__PURE__ */ React.createElement(
|
|
1453
|
+
"div",
|
|
1454
|
+
{
|
|
1455
|
+
className: k("flex items-center p-0", l),
|
|
1456
|
+
...o
|
|
1457
|
+
},
|
|
1458
|
+
d ? /* @__PURE__ */ React.createElement("label", { htmlFor: v, className: "text-primary !m-0 !mb-0 !mr-2" }, d) : null,
|
|
1459
|
+
/* @__PURE__ */ React.createElement(
|
|
1460
|
+
"input",
|
|
1461
|
+
{
|
|
1462
|
+
id: v,
|
|
1463
|
+
className: k(
|
|
1464
|
+
"components-text-control__input",
|
|
1465
|
+
t
|
|
1466
|
+
),
|
|
1467
|
+
type: i,
|
|
1468
|
+
value: c,
|
|
1469
|
+
placeholder: n,
|
|
1470
|
+
onFocus: () => e && e(),
|
|
1471
|
+
onBlur: (g) => {
|
|
1472
|
+
e && e(), u && u(g.target.value);
|
|
1473
|
+
},
|
|
1474
|
+
onChange: (g) => a && a(g.target.value),
|
|
1475
|
+
readOnly: r,
|
|
1476
|
+
ref: m
|
|
1477
|
+
}
|
|
1478
|
+
),
|
|
1479
|
+
s,
|
|
1480
|
+
p && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, p)
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
);
|
|
1484
|
+
ut.displayName = "TextControl";
|
|
1485
|
+
y(null);
|
|
1486
|
+
function mt(e) {
|
|
1487
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1488
|
+
}
|
|
1489
|
+
var te = { exports: {} };
|
|
1490
|
+
/*!
|
|
1491
|
+
Copyright (c) 2018 Jed Watson.
|
|
1492
|
+
Licensed under the MIT License (MIT), see
|
|
1493
|
+
http://jedwatson.github.io/classnames
|
|
1494
|
+
*/
|
|
1495
|
+
var ae;
|
|
1496
|
+
function dt() {
|
|
1497
|
+
return ae || (ae = 1, function(e) {
|
|
1498
|
+
(function() {
|
|
1499
|
+
var a = {}.hasOwnProperty;
|
|
1500
|
+
function l() {
|
|
1501
|
+
for (var t = "", r = 0; r < arguments.length; r++) {
|
|
1502
|
+
var n = arguments[r];
|
|
1503
|
+
n && (t = s(t, c(n)));
|
|
1504
|
+
}
|
|
1505
|
+
return t;
|
|
1506
|
+
}
|
|
1507
|
+
function c(t) {
|
|
1508
|
+
if (typeof t == "string" || typeof t == "number")
|
|
1509
|
+
return t;
|
|
1510
|
+
if (typeof t != "object")
|
|
1511
|
+
return "";
|
|
1512
|
+
if (Array.isArray(t))
|
|
1513
|
+
return l.apply(null, t);
|
|
1514
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
1515
|
+
return t.toString();
|
|
1516
|
+
var r = "";
|
|
1517
|
+
for (var n in t)
|
|
1518
|
+
a.call(t, n) && t[n] && (r = s(r, n));
|
|
1519
|
+
return r;
|
|
1520
|
+
}
|
|
1521
|
+
function s(t, r) {
|
|
1522
|
+
return r ? t ? t + " " + r : t + r : t;
|
|
1523
|
+
}
|
|
1524
|
+
e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
|
|
1525
|
+
})();
|
|
1526
|
+
}(te)), te.exports;
|
|
1527
|
+
}
|
|
1528
|
+
var pt = dt();
|
|
1529
|
+
const S = /* @__PURE__ */ mt(pt), G = ({ icon: e, ...a }) => e ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { ...a })) : null;
|
|
1530
|
+
C(
|
|
1531
|
+
({
|
|
1532
|
+
children: e,
|
|
1533
|
+
className: a,
|
|
1534
|
+
value: l,
|
|
1535
|
+
variant: c = "secondary",
|
|
1536
|
+
pressed: s,
|
|
1537
|
+
onPressedChange: t,
|
|
1538
|
+
icon: r,
|
|
1539
|
+
size: n = "compact",
|
|
1540
|
+
display: u = "auto",
|
|
1541
|
+
label: i
|
|
1542
|
+
}) => {
|
|
1543
|
+
const d = w(() => {
|
|
1544
|
+
t(l);
|
|
1545
|
+
}, [t, l]);
|
|
1546
|
+
return /* @__PURE__ */ React.createElement(
|
|
1547
|
+
E,
|
|
1548
|
+
{
|
|
1549
|
+
"aria-label": i,
|
|
1550
|
+
className: S(a, "blockbite-ui__button--default"),
|
|
1551
|
+
value: l,
|
|
1552
|
+
size: n,
|
|
1553
|
+
label: i,
|
|
1554
|
+
variant: c,
|
|
1555
|
+
showTooltip: !0,
|
|
1556
|
+
isPressed: s,
|
|
1557
|
+
onClick: d
|
|
1558
|
+
},
|
|
1559
|
+
r && /* @__PURE__ */ React.createElement(G, { icon: r }),
|
|
1560
|
+
u !== "icon" ? e : null,
|
|
1561
|
+
i && !e && u !== "icon" ? /* @__PURE__ */ React.createElement("span", null, i) : null
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1564
|
+
);
|
|
1565
|
+
C(
|
|
1566
|
+
({
|
|
1567
|
+
className: e,
|
|
1568
|
+
value: a,
|
|
1569
|
+
toggle: l = !0,
|
|
1570
|
+
display: c = "auto",
|
|
1571
|
+
options: s,
|
|
1572
|
+
size: t = "compact",
|
|
1573
|
+
tabs: r = !1,
|
|
1574
|
+
variant: n = "secondary",
|
|
1575
|
+
stretch: u = !1,
|
|
1576
|
+
onPressedChange: i
|
|
1577
|
+
}) => {
|
|
1578
|
+
const d = w(
|
|
1579
|
+
(o) => {
|
|
1580
|
+
const m = l && a === o ? "" : o;
|
|
1581
|
+
i == null || i(m);
|
|
1582
|
+
},
|
|
1583
|
+
[i, l, a]
|
|
1584
|
+
), p = (o) => c === "icon" && o != null && o.icon ? /* @__PURE__ */ React.createElement(G, { icon: o.icon }) : c === "label" ? /* @__PURE__ */ React.createElement("span", null, o.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, o.icon && /* @__PURE__ */ React.createElement(G, { icon: o.icon }), /* @__PURE__ */ React.createElement("span", null, o.label));
|
|
1585
|
+
return /* @__PURE__ */ React.createElement(
|
|
1586
|
+
"div",
|
|
1587
|
+
{
|
|
1588
|
+
className: S(
|
|
1589
|
+
"blockbite-ui__button-group flex flex-wrap gap-1",
|
|
1590
|
+
e,
|
|
1591
|
+
r ? "blockbite-ui__button-group--tabs" : ""
|
|
1592
|
+
)
|
|
1593
|
+
},
|
|
1594
|
+
s.map((o, m) => /* @__PURE__ */ React.createElement(
|
|
1595
|
+
E,
|
|
1596
|
+
{
|
|
1597
|
+
key: `ButtonToggleGroup__${o.value}__${o.label}__${m}`,
|
|
1598
|
+
className: S("blockbite-ui__button--default", {
|
|
1599
|
+
grow: u,
|
|
1600
|
+
"justify-center": u
|
|
1601
|
+
}),
|
|
1602
|
+
"aria-label": o.label,
|
|
1603
|
+
showTooltip: !0,
|
|
1604
|
+
value: o.value,
|
|
1605
|
+
size: t,
|
|
1606
|
+
label: (o == null ? void 0 : o.tooltip) || o.label,
|
|
1607
|
+
variant: n,
|
|
1608
|
+
isPressed: a === o.value,
|
|
1609
|
+
onClick: () => d(o.value)
|
|
1610
|
+
},
|
|
1611
|
+
p(o),
|
|
1612
|
+
o.children && o.children
|
|
1613
|
+
))
|
|
1614
|
+
);
|
|
1615
|
+
}
|
|
1616
|
+
);
|
|
1617
|
+
const ft = ({
|
|
1618
|
+
children: e,
|
|
1619
|
+
className: a,
|
|
1620
|
+
important: l = !1,
|
|
1621
|
+
onClick: c
|
|
1622
|
+
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick: c }, /* @__PURE__ */ React.createElement("div", { className: a }, e)) : /* @__PURE__ */ React.createElement("div", { className: a }, e), bt = $(
|
|
1623
|
+
({
|
|
1624
|
+
onClick: e,
|
|
1625
|
+
onChange: a,
|
|
1626
|
+
className: l,
|
|
1627
|
+
value: c,
|
|
1628
|
+
children: s,
|
|
1629
|
+
inputClassName: t,
|
|
1630
|
+
readOnly: r,
|
|
1631
|
+
placeholder: n,
|
|
1632
|
+
onBlur: u,
|
|
1633
|
+
type: i = "text",
|
|
1634
|
+
label: d,
|
|
1635
|
+
helper: p = "",
|
|
1636
|
+
...o
|
|
1637
|
+
}, m) => {
|
|
1638
|
+
const v = `text-control-${Math.random().toString(36).substring(2, 15)}`;
|
|
1639
|
+
return /* @__PURE__ */ React.createElement(
|
|
1640
|
+
"div",
|
|
1641
|
+
{
|
|
1642
|
+
className: S("flex items-center p-0", l),
|
|
1643
|
+
...o
|
|
1644
|
+
},
|
|
1645
|
+
d ? /* @__PURE__ */ React.createElement("label", { htmlFor: v, className: "text-primary !m-0 !mb-0 !mr-2" }, d) : null,
|
|
1646
|
+
/* @__PURE__ */ React.createElement(
|
|
1647
|
+
"input",
|
|
1648
|
+
{
|
|
1649
|
+
id: v,
|
|
1650
|
+
className: S(
|
|
1651
|
+
"components-text-control__input",
|
|
1652
|
+
t
|
|
1653
|
+
),
|
|
1654
|
+
type: i,
|
|
1655
|
+
value: c,
|
|
1656
|
+
placeholder: n,
|
|
1657
|
+
onFocus: () => e && e(),
|
|
1658
|
+
onBlur: (g) => {
|
|
1659
|
+
e && e(), u && u(g.target.value);
|
|
1660
|
+
},
|
|
1661
|
+
onChange: (g) => a && a(g.target.value),
|
|
1662
|
+
readOnly: r,
|
|
1663
|
+
ref: m
|
|
1664
|
+
}
|
|
1665
|
+
),
|
|
1666
|
+
s,
|
|
1667
|
+
p && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, p)
|
|
1668
|
+
);
|
|
1669
|
+
}
|
|
1670
|
+
);
|
|
1671
|
+
bt.displayName = "TextControl";
|
|
1672
|
+
y(null);
|
|
1673
|
+
function gt(e) {
|
|
1674
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1675
|
+
}
|
|
1676
|
+
var le = { exports: {} };
|
|
1677
|
+
/*!
|
|
1678
|
+
Copyright (c) 2018 Jed Watson.
|
|
1679
|
+
Licensed under the MIT License (MIT), see
|
|
1680
|
+
http://jedwatson.github.io/classnames
|
|
1681
|
+
*/
|
|
1682
|
+
var ne;
|
|
1683
|
+
function vt() {
|
|
1684
|
+
return ne || (ne = 1, function(e) {
|
|
1685
|
+
(function() {
|
|
1686
|
+
var a = {}.hasOwnProperty;
|
|
1687
|
+
function l() {
|
|
1688
|
+
for (var t = "", r = 0; r < arguments.length; r++) {
|
|
1689
|
+
var n = arguments[r];
|
|
1690
|
+
n && (t = s(t, c(n)));
|
|
1691
|
+
}
|
|
1692
|
+
return t;
|
|
1693
|
+
}
|
|
1694
|
+
function c(t) {
|
|
1695
|
+
if (typeof t == "string" || typeof t == "number")
|
|
1696
|
+
return t;
|
|
1697
|
+
if (typeof t != "object")
|
|
1698
|
+
return "";
|
|
1699
|
+
if (Array.isArray(t))
|
|
1700
|
+
return l.apply(null, t);
|
|
1701
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
1702
|
+
return t.toString();
|
|
1703
|
+
var r = "";
|
|
1704
|
+
for (var n in t)
|
|
1705
|
+
a.call(t, n) && t[n] && (r = s(r, n));
|
|
1706
|
+
return r;
|
|
1707
|
+
}
|
|
1708
|
+
function s(t, r) {
|
|
1709
|
+
return r ? t ? t + " " + r : t + r : t;
|
|
1710
|
+
}
|
|
1711
|
+
e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
|
|
1712
|
+
})();
|
|
1713
|
+
}(le)), le.exports;
|
|
1714
|
+
}
|
|
1715
|
+
var Rt = vt();
|
|
1716
|
+
const M = /* @__PURE__ */ gt(Rt), U = ({ icon: e, ...a }) => e ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { ...a })) : null;
|
|
1717
|
+
C(
|
|
1718
|
+
({
|
|
1719
|
+
children: e,
|
|
1720
|
+
className: a,
|
|
1721
|
+
value: l,
|
|
1722
|
+
variant: c = "secondary",
|
|
1723
|
+
pressed: s,
|
|
1724
|
+
onPressedChange: t,
|
|
1725
|
+
icon: r,
|
|
1726
|
+
size: n = "compact",
|
|
1727
|
+
display: u = "auto",
|
|
1728
|
+
label: i
|
|
1729
|
+
}) => {
|
|
1730
|
+
const d = w(() => {
|
|
1731
|
+
t(l);
|
|
1732
|
+
}, [t, l]);
|
|
1733
|
+
return /* @__PURE__ */ React.createElement(
|
|
1734
|
+
E,
|
|
1735
|
+
{
|
|
1736
|
+
"aria-label": i,
|
|
1737
|
+
className: M(a, "blockbite-ui__button--default"),
|
|
1738
|
+
value: l,
|
|
1739
|
+
size: n,
|
|
1740
|
+
label: i,
|
|
1741
|
+
variant: c,
|
|
1742
|
+
showTooltip: !0,
|
|
1743
|
+
isPressed: s,
|
|
1744
|
+
onClick: d
|
|
1745
|
+
},
|
|
1746
|
+
r && /* @__PURE__ */ React.createElement(U, { icon: r }),
|
|
1747
|
+
u !== "icon" ? e : null,
|
|
1748
|
+
i && !e && u !== "icon" ? /* @__PURE__ */ React.createElement("span", null, i) : null
|
|
1749
|
+
);
|
|
1750
|
+
}
|
|
1751
|
+
);
|
|
1752
|
+
C(
|
|
1753
|
+
({
|
|
1754
|
+
className: e,
|
|
1755
|
+
value: a,
|
|
1756
|
+
toggle: l = !0,
|
|
1757
|
+
display: c = "auto",
|
|
1758
|
+
options: s,
|
|
1759
|
+
size: t = "compact",
|
|
1760
|
+
tabs: r = !1,
|
|
1761
|
+
variant: n = "secondary",
|
|
1762
|
+
stretch: u = !1,
|
|
1763
|
+
onPressedChange: i
|
|
1764
|
+
}) => {
|
|
1765
|
+
const d = w(
|
|
1766
|
+
(o) => {
|
|
1767
|
+
const m = l && a === o ? "" : o;
|
|
1768
|
+
i == null || i(m);
|
|
1769
|
+
},
|
|
1770
|
+
[i, l, a]
|
|
1771
|
+
), p = (o) => c === "icon" && o != null && o.icon ? /* @__PURE__ */ React.createElement(U, { icon: o.icon }) : c === "label" ? /* @__PURE__ */ React.createElement("span", null, o.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, o.icon && /* @__PURE__ */ React.createElement(U, { icon: o.icon }), /* @__PURE__ */ React.createElement("span", null, o.label));
|
|
1772
|
+
return /* @__PURE__ */ React.createElement(
|
|
1773
|
+
"div",
|
|
1774
|
+
{
|
|
1775
|
+
className: M(
|
|
1776
|
+
"blockbite-ui__button-group flex flex-wrap gap-1",
|
|
1777
|
+
e,
|
|
1778
|
+
r ? "blockbite-ui__button-group--tabs" : ""
|
|
1779
|
+
)
|
|
1780
|
+
},
|
|
1781
|
+
s.map((o, m) => /* @__PURE__ */ React.createElement(
|
|
1782
|
+
E,
|
|
1783
|
+
{
|
|
1784
|
+
key: `ButtonToggleGroup__${o.value}__${o.label}__${m}`,
|
|
1785
|
+
className: M("blockbite-ui__button--default", {
|
|
1786
|
+
grow: u,
|
|
1787
|
+
"justify-center": u
|
|
1788
|
+
}),
|
|
1789
|
+
"aria-label": o.label,
|
|
1790
|
+
showTooltip: !0,
|
|
1791
|
+
value: o.value,
|
|
1792
|
+
size: t,
|
|
1793
|
+
label: (o == null ? void 0 : o.tooltip) || o.label,
|
|
1794
|
+
variant: n,
|
|
1795
|
+
isPressed: a === o.value,
|
|
1796
|
+
onClick: () => d(o.value)
|
|
1797
|
+
},
|
|
1798
|
+
p(o),
|
|
1799
|
+
o.children && o.children
|
|
1800
|
+
))
|
|
1801
|
+
);
|
|
1802
|
+
}
|
|
1803
|
+
);
|
|
1804
|
+
const Et = ({
|
|
1805
|
+
children: e,
|
|
1806
|
+
className: a,
|
|
1807
|
+
important: l = !1,
|
|
1808
|
+
onClick: c
|
|
1809
|
+
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick: c }, /* @__PURE__ */ React.createElement("div", { className: a }, e)) : /* @__PURE__ */ React.createElement("div", { className: a }, e), ht = $(
|
|
1810
|
+
({
|
|
1811
|
+
onClick: e,
|
|
1812
|
+
onChange: a,
|
|
1813
|
+
className: l,
|
|
1814
|
+
value: c,
|
|
1815
|
+
children: s,
|
|
1816
|
+
inputClassName: t,
|
|
1817
|
+
readOnly: r,
|
|
1818
|
+
placeholder: n,
|
|
1819
|
+
onBlur: u,
|
|
1820
|
+
type: i = "text",
|
|
1821
|
+
label: d,
|
|
1822
|
+
helper: p = "",
|
|
1823
|
+
...o
|
|
1824
|
+
}, m) => {
|
|
1825
|
+
const v = `text-control-${Math.random().toString(36).substring(2, 15)}`;
|
|
1826
|
+
return /* @__PURE__ */ React.createElement(
|
|
1827
|
+
"div",
|
|
1828
|
+
{
|
|
1829
|
+
className: M("flex items-center p-0", l),
|
|
1830
|
+
...o
|
|
1831
|
+
},
|
|
1832
|
+
d ? /* @__PURE__ */ React.createElement("label", { htmlFor: v, className: "text-primary !m-0 !mb-0 !mr-2" }, d) : null,
|
|
1833
|
+
/* @__PURE__ */ React.createElement(
|
|
1834
|
+
"input",
|
|
1835
|
+
{
|
|
1836
|
+
id: v,
|
|
1837
|
+
className: M(
|
|
1838
|
+
"components-text-control__input",
|
|
1839
|
+
t
|
|
1840
|
+
),
|
|
1841
|
+
type: i,
|
|
1842
|
+
value: c,
|
|
1843
|
+
placeholder: n,
|
|
1844
|
+
onFocus: () => e && e(),
|
|
1845
|
+
onBlur: (g) => {
|
|
1846
|
+
e && e(), u && u(g.target.value);
|
|
1847
|
+
},
|
|
1848
|
+
onChange: (g) => a && a(g.target.value),
|
|
1849
|
+
readOnly: r,
|
|
1850
|
+
ref: m
|
|
1851
|
+
}
|
|
1852
|
+
),
|
|
1853
|
+
s,
|
|
1854
|
+
p && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, p)
|
|
1855
|
+
);
|
|
1856
|
+
}
|
|
1857
|
+
);
|
|
1858
|
+
ht.displayName = "TextControl";
|
|
1859
|
+
y(null);
|
|
1860
|
+
function Ct(e) {
|
|
1861
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1862
|
+
}
|
|
1863
|
+
var ce = { exports: {} };
|
|
1864
|
+
/*!
|
|
1865
|
+
Copyright (c) 2018 Jed Watson.
|
|
1866
|
+
Licensed under the MIT License (MIT), see
|
|
1867
|
+
http://jedwatson.github.io/classnames
|
|
1868
|
+
*/
|
|
1869
|
+
var re;
|
|
1870
|
+
function xt() {
|
|
1871
|
+
return re || (re = 1, function(e) {
|
|
1872
|
+
(function() {
|
|
1873
|
+
var a = {}.hasOwnProperty;
|
|
1874
|
+
function l() {
|
|
1875
|
+
for (var t = "", r = 0; r < arguments.length; r++) {
|
|
1876
|
+
var n = arguments[r];
|
|
1877
|
+
n && (t = s(t, c(n)));
|
|
1878
|
+
}
|
|
1879
|
+
return t;
|
|
1880
|
+
}
|
|
1881
|
+
function c(t) {
|
|
1882
|
+
if (typeof t == "string" || typeof t == "number")
|
|
1883
|
+
return t;
|
|
1884
|
+
if (typeof t != "object")
|
|
1885
|
+
return "";
|
|
1886
|
+
if (Array.isArray(t))
|
|
1887
|
+
return l.apply(null, t);
|
|
1888
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
1889
|
+
return t.toString();
|
|
1890
|
+
var r = "";
|
|
1891
|
+
for (var n in t)
|
|
1892
|
+
a.call(t, n) && t[n] && (r = s(r, n));
|
|
1893
|
+
return r;
|
|
1894
|
+
}
|
|
1895
|
+
function s(t, r) {
|
|
1896
|
+
return r ? t ? t + " " + r : t + r : t;
|
|
1897
|
+
}
|
|
1898
|
+
e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
|
|
1899
|
+
})();
|
|
1900
|
+
}(ce)), ce.exports;
|
|
1901
|
+
}
|
|
1902
|
+
var wt = xt();
|
|
1903
|
+
const T = /* @__PURE__ */ Ct(wt), W = ({ icon: e, ...a }) => e ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { ...a })) : null;
|
|
1904
|
+
C(
|
|
1905
|
+
({
|
|
1906
|
+
children: e,
|
|
1907
|
+
className: a,
|
|
1908
|
+
value: l,
|
|
1909
|
+
variant: c = "secondary",
|
|
1910
|
+
pressed: s,
|
|
1911
|
+
onPressedChange: t,
|
|
1912
|
+
icon: r,
|
|
1913
|
+
size: n = "compact",
|
|
1914
|
+
display: u = "auto",
|
|
1915
|
+
label: i
|
|
1916
|
+
}) => {
|
|
1917
|
+
const d = w(() => {
|
|
1918
|
+
t(l);
|
|
1919
|
+
}, [t, l]);
|
|
1920
|
+
return /* @__PURE__ */ React.createElement(
|
|
1921
|
+
E,
|
|
1922
|
+
{
|
|
1923
|
+
"aria-label": i,
|
|
1924
|
+
className: T(a, "blockbite-ui__button--default"),
|
|
1925
|
+
value: l,
|
|
1926
|
+
size: n,
|
|
1927
|
+
label: i,
|
|
1928
|
+
variant: c,
|
|
1929
|
+
showTooltip: !0,
|
|
1930
|
+
isPressed: s,
|
|
1931
|
+
onClick: d
|
|
1932
|
+
},
|
|
1933
|
+
r && /* @__PURE__ */ React.createElement(W, { icon: r }),
|
|
1934
|
+
u !== "icon" ? e : null,
|
|
1935
|
+
i && !e && u !== "icon" ? /* @__PURE__ */ React.createElement("span", null, i) : null
|
|
1936
|
+
);
|
|
1937
|
+
}
|
|
1938
|
+
);
|
|
1939
|
+
C(
|
|
1940
|
+
({
|
|
1941
|
+
className: e,
|
|
1942
|
+
value: a,
|
|
1943
|
+
toggle: l = !0,
|
|
1944
|
+
display: c = "auto",
|
|
1945
|
+
options: s,
|
|
1946
|
+
size: t = "compact",
|
|
1947
|
+
tabs: r = !1,
|
|
1948
|
+
variant: n = "secondary",
|
|
1949
|
+
stretch: u = !1,
|
|
1950
|
+
onPressedChange: i
|
|
1951
|
+
}) => {
|
|
1952
|
+
const d = w(
|
|
1953
|
+
(o) => {
|
|
1954
|
+
const m = l && a === o ? "" : o;
|
|
1955
|
+
i == null || i(m);
|
|
1956
|
+
},
|
|
1957
|
+
[i, l, a]
|
|
1958
|
+
), p = (o) => c === "icon" && o != null && o.icon ? /* @__PURE__ */ React.createElement(W, { icon: o.icon }) : c === "label" ? /* @__PURE__ */ React.createElement("span", null, o.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, o.icon && /* @__PURE__ */ React.createElement(W, { icon: o.icon }), /* @__PURE__ */ React.createElement("span", null, o.label));
|
|
1959
|
+
return /* @__PURE__ */ React.createElement(
|
|
1960
|
+
"div",
|
|
1961
|
+
{
|
|
1962
|
+
className: T(
|
|
1963
|
+
"blockbite-ui__button-group flex flex-wrap gap-1",
|
|
1964
|
+
e,
|
|
1965
|
+
r ? "blockbite-ui__button-group--tabs" : ""
|
|
1966
|
+
)
|
|
1967
|
+
},
|
|
1968
|
+
s.map((o, m) => /* @__PURE__ */ React.createElement(
|
|
1969
|
+
E,
|
|
1970
|
+
{
|
|
1971
|
+
key: `ButtonToggleGroup__${o.value}__${o.label}__${m}`,
|
|
1972
|
+
className: T("blockbite-ui__button--default", {
|
|
1973
|
+
grow: u,
|
|
1974
|
+
"justify-center": u
|
|
1975
|
+
}),
|
|
1976
|
+
"aria-label": o.label,
|
|
1977
|
+
showTooltip: !0,
|
|
1978
|
+
value: o.value,
|
|
1979
|
+
size: t,
|
|
1980
|
+
label: (o == null ? void 0 : o.tooltip) || o.label,
|
|
1981
|
+
variant: n,
|
|
1982
|
+
isPressed: a === o.value,
|
|
1983
|
+
onClick: () => d(o.value)
|
|
1984
|
+
},
|
|
1985
|
+
p(o),
|
|
1986
|
+
o.children && o.children
|
|
1987
|
+
))
|
|
1988
|
+
);
|
|
1989
|
+
}
|
|
1990
|
+
);
|
|
1991
|
+
const yt = ({
|
|
1992
|
+
children: e,
|
|
1993
|
+
className: a,
|
|
1994
|
+
important: l = !1,
|
|
1995
|
+
onClick: c
|
|
1996
|
+
}) => l ? /* @__PURE__ */ React.createElement("div", { onClick: c }, /* @__PURE__ */ React.createElement("div", { className: a }, e)) : /* @__PURE__ */ React.createElement("div", { className: a }, e), Nt = $(
|
|
1997
|
+
({
|
|
1998
|
+
onClick: e,
|
|
1999
|
+
onChange: a,
|
|
2000
|
+
className: l,
|
|
2001
|
+
value: c,
|
|
2002
|
+
children: s,
|
|
2003
|
+
inputClassName: t,
|
|
2004
|
+
readOnly: r,
|
|
2005
|
+
placeholder: n,
|
|
2006
|
+
onBlur: u,
|
|
2007
|
+
type: i = "text",
|
|
2008
|
+
label: d,
|
|
2009
|
+
helper: p = "",
|
|
2010
|
+
...o
|
|
2011
|
+
}, m) => {
|
|
2012
|
+
const v = `text-control-${Math.random().toString(36).substring(2, 15)}`;
|
|
2013
|
+
return /* @__PURE__ */ React.createElement(
|
|
2014
|
+
"div",
|
|
2015
|
+
{
|
|
2016
|
+
className: T("flex items-center p-0", l),
|
|
2017
|
+
...o
|
|
2018
|
+
},
|
|
2019
|
+
d ? /* @__PURE__ */ React.createElement("label", { htmlFor: v, className: "text-primary !m-0 !mb-0 !mr-2" }, d) : null,
|
|
2020
|
+
/* @__PURE__ */ React.createElement(
|
|
2021
|
+
"input",
|
|
2022
|
+
{
|
|
2023
|
+
id: v,
|
|
2024
|
+
className: T(
|
|
2025
|
+
"components-text-control__input",
|
|
2026
|
+
t
|
|
2027
|
+
),
|
|
2028
|
+
type: i,
|
|
2029
|
+
value: c,
|
|
2030
|
+
placeholder: n,
|
|
2031
|
+
onFocus: () => e && e(),
|
|
2032
|
+
onBlur: (g) => {
|
|
2033
|
+
e && e(), u && u(g.target.value);
|
|
2034
|
+
},
|
|
2035
|
+
onChange: (g) => a && a(g.target.value),
|
|
2036
|
+
readOnly: r,
|
|
2037
|
+
ref: m
|
|
2038
|
+
}
|
|
2039
|
+
),
|
|
2040
|
+
s,
|
|
2041
|
+
p && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, p)
|
|
2042
|
+
);
|
|
2043
|
+
}
|
|
2044
|
+
);
|
|
2045
|
+
Nt.displayName = "TextControl";
|
|
2046
|
+
y(null);
|
|
2047
|
+
const { select: la, dispatch: na } = wp.data;
|
|
2048
|
+
y(null);
|
|
2049
|
+
C(
|
|
2050
|
+
({
|
|
2051
|
+
className: e,
|
|
2052
|
+
options: a,
|
|
2053
|
+
value: l,
|
|
2054
|
+
display: c = "label",
|
|
2055
|
+
label: s = !1,
|
|
2056
|
+
onPressedChange: t
|
|
2057
|
+
}) => {
|
|
2058
|
+
const r = (n) => {
|
|
2059
|
+
t(n);
|
|
2060
|
+
};
|
|
2061
|
+
return /* @__PURE__ */ React.createElement(yt, { className: T(e) }, /* @__PURE__ */ React.createElement(
|
|
2062
|
+
P,
|
|
2063
|
+
{
|
|
2064
|
+
__next40pxDefaultSize: !0,
|
|
2065
|
+
__nextHasNoMarginBottom: !0,
|
|
2066
|
+
isBlock: !0,
|
|
2067
|
+
value: l,
|
|
2068
|
+
...s ? { label: s } : {}
|
|
2069
|
+
},
|
|
2070
|
+
a.map(
|
|
2071
|
+
(n) => c === "icon" ? /* @__PURE__ */ React.createElement(
|
|
2072
|
+
O,
|
|
2073
|
+
{
|
|
2074
|
+
icon: n.icon,
|
|
2075
|
+
label: n.label,
|
|
2076
|
+
key: `ToggleGroupControlIcon-${n.value}`,
|
|
2077
|
+
value: n.value,
|
|
2078
|
+
onClick: () => r(n.value)
|
|
2079
|
+
}
|
|
2080
|
+
) : /* @__PURE__ */ React.createElement(
|
|
2081
|
+
H,
|
|
2082
|
+
{
|
|
2083
|
+
key: `ToggleGroupControlOption-${n.value}`,
|
|
2084
|
+
value: n.value,
|
|
2085
|
+
label: n.label,
|
|
2086
|
+
onClick: () => r(n.value)
|
|
2087
|
+
}
|
|
2088
|
+
)
|
|
2089
|
+
)
|
|
2090
|
+
));
|
|
2091
|
+
}
|
|
2092
|
+
);
|
|
2093
|
+
const { select: ca, dispatch: ra } = wp.data;
|
|
2094
|
+
y(null);
|
|
2095
|
+
C(
|
|
2096
|
+
({
|
|
2097
|
+
className: e,
|
|
2098
|
+
options: a,
|
|
2099
|
+
value: l,
|
|
2100
|
+
display: c = "label",
|
|
2101
|
+
label: s = !1,
|
|
2102
|
+
onPressedChange: t
|
|
2103
|
+
}) => {
|
|
2104
|
+
const r = (n) => {
|
|
2105
|
+
t(n);
|
|
2106
|
+
};
|
|
2107
|
+
return /* @__PURE__ */ React.createElement(Et, { className: M(e) }, /* @__PURE__ */ React.createElement(
|
|
2108
|
+
P,
|
|
2109
|
+
{
|
|
2110
|
+
__next40pxDefaultSize: !0,
|
|
2111
|
+
__nextHasNoMarginBottom: !0,
|
|
2112
|
+
isBlock: !0,
|
|
2113
|
+
value: l,
|
|
2114
|
+
...s ? { label: s } : {}
|
|
2115
|
+
},
|
|
2116
|
+
a.map(
|
|
2117
|
+
(n) => c === "icon" ? /* @__PURE__ */ React.createElement(
|
|
2118
|
+
O,
|
|
2119
|
+
{
|
|
2120
|
+
icon: n.icon,
|
|
2121
|
+
label: n.label,
|
|
2122
|
+
key: `ToggleGroupControlIcon-${n.value}`,
|
|
2123
|
+
value: n.value,
|
|
2124
|
+
onClick: () => r(n.value)
|
|
2125
|
+
}
|
|
2126
|
+
) : /* @__PURE__ */ React.createElement(
|
|
2127
|
+
H,
|
|
2128
|
+
{
|
|
2129
|
+
key: `ToggleGroupControlOption-${n.value}`,
|
|
2130
|
+
value: n.value,
|
|
2131
|
+
label: n.label,
|
|
2132
|
+
onClick: () => r(n.value)
|
|
2133
|
+
}
|
|
2134
|
+
)
|
|
2135
|
+
)
|
|
2136
|
+
));
|
|
2137
|
+
}
|
|
2138
|
+
);
|
|
2139
|
+
const { select: sa, dispatch: oa } = wp.data;
|
|
2140
|
+
y(null);
|
|
2141
|
+
C(
|
|
2142
|
+
({
|
|
2143
|
+
className: e,
|
|
2144
|
+
options: a,
|
|
2145
|
+
value: l,
|
|
2146
|
+
display: c = "label",
|
|
2147
|
+
label: s = !1,
|
|
2148
|
+
onPressedChange: t
|
|
2149
|
+
}) => {
|
|
2150
|
+
const r = (n) => {
|
|
2151
|
+
t(n);
|
|
2152
|
+
};
|
|
2153
|
+
return /* @__PURE__ */ React.createElement(ft, { className: S(e) }, /* @__PURE__ */ React.createElement(
|
|
2154
|
+
P,
|
|
2155
|
+
{
|
|
2156
|
+
__next40pxDefaultSize: !0,
|
|
2157
|
+
__nextHasNoMarginBottom: !0,
|
|
2158
|
+
isBlock: !0,
|
|
2159
|
+
value: l,
|
|
2160
|
+
...s ? { label: s } : {}
|
|
2161
|
+
},
|
|
2162
|
+
a.map(
|
|
2163
|
+
(n) => c === "icon" ? /* @__PURE__ */ React.createElement(
|
|
2164
|
+
O,
|
|
2165
|
+
{
|
|
2166
|
+
icon: n.icon,
|
|
2167
|
+
label: n.label,
|
|
2168
|
+
key: `ToggleGroupControlIcon-${n.value}`,
|
|
2169
|
+
value: n.value,
|
|
2170
|
+
onClick: () => r(n.value)
|
|
2171
|
+
}
|
|
2172
|
+
) : /* @__PURE__ */ React.createElement(
|
|
2173
|
+
H,
|
|
2174
|
+
{
|
|
2175
|
+
key: `ToggleGroupControlOption-${n.value}`,
|
|
2176
|
+
value: n.value,
|
|
2177
|
+
label: n.label,
|
|
2178
|
+
onClick: () => r(n.value)
|
|
2179
|
+
}
|
|
2180
|
+
)
|
|
2181
|
+
)
|
|
2182
|
+
));
|
|
2183
|
+
}
|
|
2184
|
+
);
|
|
2185
|
+
const { select: ia, dispatch: ua } = wp.data;
|
|
2186
|
+
y(null);
|
|
2187
|
+
C(
|
|
2188
|
+
({
|
|
2189
|
+
className: e,
|
|
2190
|
+
options: a,
|
|
2191
|
+
value: l,
|
|
2192
|
+
display: c = "label",
|
|
2193
|
+
label: s = !1,
|
|
2194
|
+
onPressedChange: t
|
|
2195
|
+
}) => {
|
|
2196
|
+
const r = (n) => {
|
|
2197
|
+
t(n);
|
|
2198
|
+
};
|
|
2199
|
+
return /* @__PURE__ */ React.createElement(pe, { className: k(e) }, /* @__PURE__ */ React.createElement(
|
|
2200
|
+
P,
|
|
2201
|
+
{
|
|
2202
|
+
__next40pxDefaultSize: !0,
|
|
2203
|
+
__nextHasNoMarginBottom: !0,
|
|
2204
|
+
isBlock: !0,
|
|
2205
|
+
value: l,
|
|
2206
|
+
...s ? { label: s } : {}
|
|
2207
|
+
},
|
|
2208
|
+
a.map(
|
|
2209
|
+
(n) => c === "icon" ? /* @__PURE__ */ React.createElement(
|
|
2210
|
+
O,
|
|
2211
|
+
{
|
|
2212
|
+
icon: n.icon,
|
|
2213
|
+
label: n.label,
|
|
2214
|
+
key: `ToggleGroupControlIcon-${n.value}`,
|
|
2215
|
+
value: n.value,
|
|
2216
|
+
onClick: () => r(n.value)
|
|
2217
|
+
}
|
|
2218
|
+
) : /* @__PURE__ */ React.createElement(
|
|
2219
|
+
H,
|
|
2220
|
+
{
|
|
2221
|
+
key: `ToggleGroupControlOption-${n.value}`,
|
|
2222
|
+
value: n.value,
|
|
2223
|
+
label: n.label,
|
|
2224
|
+
onClick: () => r(n.value)
|
|
2225
|
+
}
|
|
2226
|
+
)
|
|
2227
|
+
)
|
|
2228
|
+
));
|
|
2229
|
+
}
|
|
2230
|
+
);
|
|
2231
|
+
const ma = ({
|
|
1300
2232
|
items: e,
|
|
1301
|
-
activeId:
|
|
2233
|
+
activeId: a,
|
|
1302
2234
|
onSelect: l,
|
|
1303
|
-
className:
|
|
1304
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
2235
|
+
className: c
|
|
2236
|
+
}) => /* @__PURE__ */ React.createElement(pe, { important: !0, className: c }, /* @__PURE__ */ React.createElement("div", { className: "w-[200px] overflow-y-auto border-r border-border gap-2" }, e.map((s) => /* @__PURE__ */ React.createElement(
|
|
1305
2237
|
"div",
|
|
1306
2238
|
{
|
|
1307
|
-
key:
|
|
1308
|
-
onClick: () => l(
|
|
1309
|
-
className: `cursor-pointer p-2 border-l-4 flex gap-2 items-center ${
|
|
2239
|
+
key: s.id,
|
|
2240
|
+
onClick: () => l(s.id),
|
|
2241
|
+
className: `cursor-pointer p-2 border-l-4 flex gap-2 items-center ${a === s.id ? "border-blue-500 bg-gray-100" : "border-transparent"}`
|
|
1310
2242
|
},
|
|
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" },
|
|
1312
|
-
/* @__PURE__ */ React.createElement("p", { className: "text-sm text-center mt-1" },
|
|
2243
|
+
/* @__PURE__ */ React.createElement("span", { className: "rounded bg-slate-300 w-12 h-12 flex items-center justify-center text-2xl font-bold text-white" }, s.name.charAt(0).toUpperCase()),
|
|
2244
|
+
/* @__PURE__ */ React.createElement("p", { className: "text-sm text-center mt-1" }, s.name)
|
|
1313
2245
|
))));
|
|
1314
|
-
function
|
|
1315
|
-
const { media:
|
|
1316
|
-
if (
|
|
1317
|
-
return /* @__PURE__ */ React.createElement("img", { src:
|
|
1318
|
-
const { thumbnail:
|
|
1319
|
-
return /* @__PURE__ */ React.createElement("picture", { className: "
|
|
2246
|
+
function da(e) {
|
|
2247
|
+
const { media: a, mediaClass: l } = e, { url: c, alt: s, sizes: t } = a;
|
|
2248
|
+
if (t === void 0)
|
|
2249
|
+
return /* @__PURE__ */ React.createElement("img", { src: c, alt: s, className: `media ${l}` });
|
|
2250
|
+
const { thumbnail: r, medium: n, large: u } = t, i = r || c, d = n || c, p = u || c;
|
|
2251
|
+
return /* @__PURE__ */ React.createElement("picture", { className: "b_responsive" }, i ? /* @__PURE__ */ React.createElement(
|
|
1320
2252
|
"source",
|
|
1321
2253
|
{
|
|
1322
2254
|
media: "(max-width: 768px)",
|
|
1323
|
-
srcSet:
|
|
1324
|
-
className: `
|
|
2255
|
+
srcSet: i,
|
|
2256
|
+
className: `b_media ${l}`
|
|
1325
2257
|
}
|
|
1326
|
-
) : null,
|
|
2258
|
+
) : null, d ? /* @__PURE__ */ React.createElement(
|
|
1327
2259
|
"source",
|
|
1328
2260
|
{
|
|
1329
2261
|
media: "(min-width: 1024px)",
|
|
1330
|
-
srcSet:
|
|
1331
|
-
className: `
|
|
2262
|
+
srcSet: d,
|
|
2263
|
+
className: `b_media ${l}`
|
|
1332
2264
|
}
|
|
1333
|
-
) : null,
|
|
2265
|
+
) : null, p ? /* @__PURE__ */ React.createElement(
|
|
1334
2266
|
"source",
|
|
1335
2267
|
{
|
|
1336
2268
|
media: "(min-width: 1536px)",
|
|
1337
|
-
srcSet:
|
|
1338
|
-
className: `
|
|
2269
|
+
srcSet: p,
|
|
2270
|
+
className: `b_media ${l}`
|
|
1339
2271
|
}
|
|
1340
|
-
) : null,
|
|
2272
|
+
) : null, d ? /* @__PURE__ */ React.createElement("img", { src: d, alt: s, className: `b_media ${l}` }) : null);
|
|
1341
2273
|
}
|
|
1342
|
-
function
|
|
1343
|
-
const { media:
|
|
2274
|
+
function pa(e) {
|
|
2275
|
+
const { media: a, mediaClass: l } = e, { url: c } = a, s = c;
|
|
1344
2276
|
return /* @__PURE__ */ React.createElement(
|
|
1345
2277
|
"video",
|
|
1346
2278
|
{
|
|
@@ -1352,258 +2284,258 @@ function vt(e) {
|
|
|
1352
2284
|
muted: !0,
|
|
1353
2285
|
loop: !0
|
|
1354
2286
|
},
|
|
1355
|
-
/* @__PURE__ */ React.createElement("source", { src:
|
|
2287
|
+
/* @__PURE__ */ React.createElement("source", { src: s, type: "video/mp4" })
|
|
1356
2288
|
);
|
|
1357
2289
|
}
|
|
1358
|
-
const
|
|
2290
|
+
const fa = ({
|
|
1359
2291
|
children: e,
|
|
1360
|
-
className:
|
|
2292
|
+
className: a = "",
|
|
1361
2293
|
height: l = "large"
|
|
1362
2294
|
}) => /* @__PURE__ */ React.createElement(
|
|
1363
|
-
|
|
2295
|
+
h,
|
|
1364
2296
|
{
|
|
1365
|
-
className:
|
|
2297
|
+
className: b("scrollbar relative overflow-y-scroll", a, {
|
|
1366
2298
|
"h-[400px]": l === "large",
|
|
1367
2299
|
"h-[300px]": l === "medium",
|
|
1368
2300
|
"h-[200px]": l === "small"
|
|
1369
2301
|
})
|
|
1370
2302
|
},
|
|
1371
2303
|
e
|
|
1372
|
-
),
|
|
2304
|
+
), ba = ({
|
|
1373
2305
|
onChange: e,
|
|
1374
|
-
className:
|
|
2306
|
+
className: a,
|
|
1375
2307
|
value: l,
|
|
1376
|
-
options:
|
|
1377
|
-
label:
|
|
1378
|
-
emptyLabel:
|
|
2308
|
+
options: c,
|
|
2309
|
+
label: s = "",
|
|
2310
|
+
emptyLabel: t = "No options available"
|
|
1379
2311
|
}) => {
|
|
1380
|
-
const
|
|
1381
|
-
e && e(
|
|
2312
|
+
const r = (n) => {
|
|
2313
|
+
e && e(n);
|
|
1382
2314
|
};
|
|
1383
|
-
return /* @__PURE__ */ React.createElement("div", { className:
|
|
1384
|
-
|
|
2315
|
+
return /* @__PURE__ */ React.createElement("div", { className: a }, c && c.length > 0 && /* @__PURE__ */ React.createElement(
|
|
2316
|
+
_e,
|
|
1385
2317
|
{
|
|
1386
2318
|
__next40pxDefaultSize: !0,
|
|
1387
2319
|
__nextHasNoMarginBottom: !0,
|
|
1388
|
-
label:
|
|
2320
|
+
label: s || "",
|
|
1389
2321
|
value: l || "",
|
|
1390
|
-
onChange:
|
|
1391
|
-
options: [{ value: "", label: "Select an option" }, ...
|
|
2322
|
+
onChange: r,
|
|
2323
|
+
options: [{ value: "", label: "Select an option" }, ...c]
|
|
1392
2324
|
}
|
|
1393
|
-
), (!
|
|
1394
|
-
}, { select:
|
|
2325
|
+
), (!c || (c == null ? void 0 : c.length) === 0) && /* @__PURE__ */ React.createElement("p", { className: "mb-2" }, t));
|
|
2326
|
+
}, { select: _t, dispatch: kt } = wp.data, ga = ({
|
|
1395
2327
|
buttonText: e = "Add block"
|
|
1396
2328
|
}) => {
|
|
1397
|
-
const
|
|
1398
|
-
const l =
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
2329
|
+
const a = () => {
|
|
2330
|
+
const l = _t("core/block-editor").getSelectedBlock(), { clientId: c, innerBlocks: s } = l, t = s[s.length - 1], r = Oe(
|
|
2331
|
+
t.name,
|
|
2332
|
+
t.attributes,
|
|
2333
|
+
t.innerBlocks
|
|
1402
2334
|
);
|
|
1403
|
-
|
|
2335
|
+
kt("core/block-editor").insertBlocks(r, 0, c);
|
|
1404
2336
|
};
|
|
1405
|
-
return /* @__PURE__ */ React.createElement(
|
|
1406
|
-
},
|
|
1407
|
-
const [
|
|
2337
|
+
return /* @__PURE__ */ React.createElement(E, { variant: "primary", onClick: () => a() }, e);
|
|
2338
|
+
}, va = ({ children: e, watch: a, className: l }) => {
|
|
2339
|
+
const [c, s] = f(0);
|
|
1408
2340
|
return R(() => {
|
|
1409
2341
|
setTimeout(() => {
|
|
1410
|
-
|
|
2342
|
+
s(1);
|
|
1411
2343
|
}, 250);
|
|
1412
|
-
}, [
|
|
1413
|
-
|
|
2344
|
+
}, [a]), /* @__PURE__ */ React.createElement(
|
|
2345
|
+
h,
|
|
1414
2346
|
{
|
|
1415
|
-
className:
|
|
2347
|
+
className: b(
|
|
1416
2348
|
l,
|
|
1417
2349
|
"duration-50 transform transition-all ease-in-out",
|
|
1418
2350
|
{
|
|
1419
|
-
"translate-x-0":
|
|
1420
|
-
"-translate-x-full":
|
|
2351
|
+
"translate-x-0": c === 1,
|
|
2352
|
+
"-translate-x-full": c === 0
|
|
1421
2353
|
}
|
|
1422
2354
|
)
|
|
1423
2355
|
},
|
|
1424
2356
|
e
|
|
1425
2357
|
);
|
|
1426
|
-
},
|
|
1427
|
-
const [l,
|
|
2358
|
+
}, Ra = ({ className: e, defaultValue: a }) => {
|
|
2359
|
+
const [l, c] = f(!1);
|
|
1428
2360
|
return R(() => {
|
|
1429
2361
|
setTimeout(() => {
|
|
1430
|
-
|
|
1431
|
-
}, 500),
|
|
1432
|
-
}, [l,
|
|
1433
|
-
},
|
|
2362
|
+
c(!1);
|
|
2363
|
+
}, 500), a && c(!0);
|
|
2364
|
+
}, [l, a]), l && /* @__PURE__ */ React.createElement(ke, { className: b(e) });
|
|
2365
|
+
}, X = y(null), St = ({
|
|
1434
2366
|
children: e,
|
|
1435
|
-
defaultValue:
|
|
2367
|
+
defaultValue: a,
|
|
1436
2368
|
value: l,
|
|
1437
|
-
onValueChange:
|
|
1438
|
-
...
|
|
2369
|
+
onValueChange: c,
|
|
2370
|
+
...s
|
|
1439
2371
|
}) => {
|
|
1440
|
-
const
|
|
1441
|
-
activeTab:
|
|
1442
|
-
setActiveTab: (
|
|
1443
|
-
|
|
2372
|
+
const t = l !== void 0, [r, n] = f(a || ""), d = {
|
|
2373
|
+
activeTab: t ? l : r,
|
|
2374
|
+
setActiveTab: (p) => {
|
|
2375
|
+
t || n(p), c && c(p);
|
|
1444
2376
|
}
|
|
1445
2377
|
};
|
|
1446
|
-
return /* @__PURE__ */ React.createElement(
|
|
1447
|
-
},
|
|
2378
|
+
return /* @__PURE__ */ React.createElement(X.Provider, { value: d }, /* @__PURE__ */ React.createElement(h, { important: !0, className: s.className }, e));
|
|
2379
|
+
}, Mt = ({
|
|
1448
2380
|
options: e,
|
|
1449
|
-
children:
|
|
2381
|
+
children: a,
|
|
1450
2382
|
className: l,
|
|
1451
|
-
onValueChange:
|
|
2383
|
+
onValueChange: c
|
|
1452
2384
|
}) => {
|
|
1453
|
-
const
|
|
2385
|
+
const s = q(X), t = c || (s == null ? void 0 : s.setActiveTab);
|
|
1454
2386
|
return /* @__PURE__ */ React.createElement(
|
|
1455
|
-
|
|
2387
|
+
Se,
|
|
1456
2388
|
{
|
|
1457
|
-
className:
|
|
2389
|
+
className: b("tabs-list", l),
|
|
1458
2390
|
tabs: e,
|
|
1459
|
-
onSelect: (
|
|
1460
|
-
r
|
|
2391
|
+
onSelect: (r) => {
|
|
2392
|
+
t(r);
|
|
1461
2393
|
}
|
|
1462
2394
|
},
|
|
1463
|
-
() =>
|
|
2395
|
+
() => a
|
|
1464
2396
|
);
|
|
1465
|
-
},
|
|
2397
|
+
}, Tt = ({
|
|
1466
2398
|
value: e,
|
|
1467
|
-
children:
|
|
2399
|
+
children: a,
|
|
1468
2400
|
className: l
|
|
1469
2401
|
}) => {
|
|
1470
|
-
const
|
|
1471
|
-
return (
|
|
1472
|
-
},
|
|
1473
|
-
Wrapper:
|
|
1474
|
-
List:
|
|
1475
|
-
Content:
|
|
1476
|
-
},
|
|
2402
|
+
const c = q(X);
|
|
2403
|
+
return (c == null ? void 0 : c.activeTab) === e ? /* @__PURE__ */ React.createElement(h, { className: l }, a) : null;
|
|
2404
|
+
}, Ea = {
|
|
2405
|
+
Wrapper: St,
|
|
2406
|
+
List: Mt,
|
|
2407
|
+
Content: Tt
|
|
2408
|
+
}, ha = ({
|
|
1477
2409
|
children: e,
|
|
1478
|
-
onClick:
|
|
2410
|
+
onClick: a,
|
|
1479
2411
|
color: l = "blue",
|
|
1480
|
-
className:
|
|
1481
|
-
}) => /* @__PURE__ */ React.createElement("button", { onClick:
|
|
2412
|
+
className: c
|
|
2413
|
+
}) => /* @__PURE__ */ React.createElement("button", { onClick: a }, /* @__PURE__ */ React.createElement("div", { color: l, className: b(c) }, e)), Ca = ({
|
|
1482
2414
|
onChange: e,
|
|
1483
|
-
defaultValue:
|
|
2415
|
+
defaultValue: a,
|
|
1484
2416
|
children: l
|
|
1485
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
1486
|
-
|
|
2417
|
+
}) => /* @__PURE__ */ React.createElement(h, { 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(
|
|
2418
|
+
K,
|
|
1487
2419
|
{
|
|
1488
2420
|
__next40pxDefaultSize: !0,
|
|
1489
2421
|
__nextHasNoMarginBottom: !0,
|
|
1490
2422
|
type: "text",
|
|
1491
|
-
value:
|
|
2423
|
+
value: a,
|
|
1492
2424
|
onChange: e
|
|
1493
2425
|
}
|
|
1494
|
-
), /* @__PURE__ */ React.createElement(
|
|
2426
|
+
), /* @__PURE__ */ React.createElement(Ue, { className: "absolute right-1 top-2" })), " ", l), xa = C(
|
|
1495
2427
|
({
|
|
1496
2428
|
className: e,
|
|
1497
|
-
options:
|
|
2429
|
+
options: a,
|
|
1498
2430
|
value: l,
|
|
1499
|
-
display:
|
|
1500
|
-
label:
|
|
1501
|
-
onPressedChange:
|
|
2431
|
+
display: c = "label",
|
|
2432
|
+
label: s = !1,
|
|
2433
|
+
onPressedChange: t
|
|
1502
2434
|
}) => {
|
|
1503
|
-
const
|
|
1504
|
-
|
|
2435
|
+
const r = (n) => {
|
|
2436
|
+
t(n);
|
|
1505
2437
|
};
|
|
1506
|
-
return /* @__PURE__ */ React.createElement(
|
|
1507
|
-
|
|
2438
|
+
return /* @__PURE__ */ React.createElement(h, { className: b(e) }, /* @__PURE__ */ React.createElement(
|
|
2439
|
+
P,
|
|
1508
2440
|
{
|
|
1509
2441
|
__next40pxDefaultSize: !0,
|
|
1510
2442
|
__nextHasNoMarginBottom: !0,
|
|
1511
2443
|
isBlock: !0,
|
|
1512
2444
|
value: l,
|
|
1513
|
-
...
|
|
2445
|
+
...s ? { label: s } : {}
|
|
1514
2446
|
},
|
|
1515
|
-
|
|
1516
|
-
(
|
|
1517
|
-
|
|
2447
|
+
a.map(
|
|
2448
|
+
(n) => c === "icon" ? /* @__PURE__ */ React.createElement(
|
|
2449
|
+
O,
|
|
1518
2450
|
{
|
|
1519
|
-
icon:
|
|
1520
|
-
label:
|
|
1521
|
-
key: `ToggleGroupControlIcon-${
|
|
1522
|
-
value:
|
|
1523
|
-
onClick: () =>
|
|
2451
|
+
icon: n.icon,
|
|
2452
|
+
label: n.label,
|
|
2453
|
+
key: `ToggleGroupControlIcon-${n.value}`,
|
|
2454
|
+
value: n.value,
|
|
2455
|
+
onClick: () => r(n.value)
|
|
1524
2456
|
}
|
|
1525
2457
|
) : /* @__PURE__ */ React.createElement(
|
|
1526
|
-
|
|
2458
|
+
H,
|
|
1527
2459
|
{
|
|
1528
|
-
key: `ToggleGroupControlOption-${
|
|
1529
|
-
value:
|
|
1530
|
-
label:
|
|
1531
|
-
onClick: () =>
|
|
2460
|
+
key: `ToggleGroupControlOption-${n.value}`,
|
|
2461
|
+
value: n.value,
|
|
2462
|
+
label: n.label,
|
|
2463
|
+
onClick: () => r(n.value)
|
|
1532
2464
|
}
|
|
1533
2465
|
)
|
|
1534
2466
|
)
|
|
1535
2467
|
));
|
|
1536
2468
|
}
|
|
1537
|
-
),
|
|
2469
|
+
), wa = ({
|
|
1538
2470
|
label: e,
|
|
1539
|
-
className:
|
|
2471
|
+
className: a,
|
|
1540
2472
|
onChange: l,
|
|
1541
|
-
checked:
|
|
2473
|
+
checked: c = !1
|
|
1542
2474
|
// Default to false if undefined, so it's always controlled
|
|
1543
2475
|
}) => {
|
|
1544
|
-
const [
|
|
2476
|
+
const [s, t] = f(c);
|
|
1545
2477
|
return R(() => {
|
|
1546
|
-
|
|
1547
|
-
}, [
|
|
1548
|
-
|
|
2478
|
+
t(c);
|
|
2479
|
+
}, [c]), /* @__PURE__ */ React.createElement(h, { className: b(a, "flex items-center gap-2") }, /* @__PURE__ */ React.createElement(
|
|
2480
|
+
Me,
|
|
1549
2481
|
{
|
|
1550
|
-
checked:
|
|
2482
|
+
checked: s,
|
|
1551
2483
|
label: e,
|
|
1552
|
-
onChange: (
|
|
1553
|
-
r
|
|
2484
|
+
onChange: (r) => {
|
|
2485
|
+
t(r), l && l(r);
|
|
1554
2486
|
}
|
|
1555
2487
|
}
|
|
1556
2488
|
));
|
|
1557
2489
|
};
|
|
1558
2490
|
export {
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
2491
|
+
jt as AutocompleteDropdown,
|
|
2492
|
+
Ie as Badge,
|
|
2493
|
+
Vt as BitePreview,
|
|
2494
|
+
It as Button,
|
|
2495
|
+
je as ButtonToggle,
|
|
2496
|
+
Ve as ButtonToggleGroup,
|
|
2497
|
+
At as Chapter,
|
|
2498
|
+
Ft as ChapterDivider,
|
|
2499
|
+
Zt as Checkbox,
|
|
2500
|
+
Dt as DataItemList,
|
|
2501
|
+
Gt as DisappearingMessage,
|
|
2502
|
+
Je as DropdownPicker,
|
|
2503
|
+
Ut as EmptyState,
|
|
2504
|
+
Wt as FloatingPanel,
|
|
2505
|
+
Kt as FocalPointControl,
|
|
2506
|
+
_ as Icon,
|
|
2507
|
+
qt as LinkPicker,
|
|
2508
|
+
Xt as MediaPicker,
|
|
2509
|
+
Yt as MetricsControl,
|
|
2510
|
+
Jt as Modal,
|
|
2511
|
+
Qt as ModalClose,
|
|
2512
|
+
nt as ModalContent,
|
|
2513
|
+
lt as ModalFooter,
|
|
2514
|
+
at as ModalHeader,
|
|
2515
|
+
ct as ModalTrigger,
|
|
2516
|
+
ea as NewWindowPortal,
|
|
2517
|
+
ta as Notice,
|
|
2518
|
+
aa as PasswordInput,
|
|
2519
|
+
et as Popover,
|
|
2520
|
+
ma as ProjectsNavigation,
|
|
2521
|
+
tt as RangeSlider,
|
|
2522
|
+
da as ResponsiveImage,
|
|
2523
|
+
pa as ResponsiveVideo,
|
|
2524
|
+
fa as ScrollList,
|
|
2525
|
+
ba as SelectControlWrapper,
|
|
2526
|
+
ga as SingleBlockTypeAppender,
|
|
2527
|
+
va as SlideIn,
|
|
2528
|
+
Ra as Spinner,
|
|
2529
|
+
Ea as Tabs,
|
|
2530
|
+
Tt as TabsContent,
|
|
2531
|
+
Mt as TabsList,
|
|
2532
|
+
St as TabsWrapper,
|
|
2533
|
+
ha as Tag,
|
|
2534
|
+
ue as TextControl,
|
|
2535
|
+
Ca as TextControlLabel,
|
|
2536
|
+
xa as ToggleGroup,
|
|
2537
|
+
wa as ToggleSwitch,
|
|
2538
|
+
h as Wrap,
|
|
2539
|
+
de as useModalContext
|
|
1608
2540
|
};
|
|
1609
2541
|
//# sourceMappingURL=index.js.map
|