@blocknote/mantine 0.18.1 → 0.19.1
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/blocknote-mantine.js +318 -382
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/blocknote-mantine.umd.cjs +1 -1
- package/dist/blocknote-mantine.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -5
- package/src/defaultThemes copy.ts +159 -0
- package/src/defaultThemes.ts +3 -76
- package/src/menu/Menu.tsx +7 -1
- package/types/src/defaultThemes copy.d.ts +143 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { assertEmpty as d, isSafari as M, mergeCSSClasses as
|
|
3
|
-
import { elementOverflow as
|
|
4
|
-
import { TextInput as B, Menu as
|
|
5
|
-
import
|
|
6
|
-
import { mergeRefs as T, useFocusWithin as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
function
|
|
1
|
+
import { jsx as i, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { assertEmpty as d, isSafari as M, COLORS_DEFAULT as q, COLORS_DARK_MODE_DEFAULT as Z, mergeCSSClasses as J } from "@blocknote/core";
|
|
3
|
+
import { elementOverflow as z, useBlockNoteContext as Q, usePrefersColorScheme as X, ComponentsContext as Y, BlockNoteViewRaw as ee } from "@blocknote/react";
|
|
4
|
+
import { TextInput as B, Menu as b, CheckIcon as _, Group as p, Tabs as w, LoadingOverlay as te, Button as x, FileInput as ne, Popover as oe, PopoverTarget as re, PopoverDropdown as se, ActionIcon as $, Loader as V, Stack as O, Text as N, Badge as ie, Tooltip as ae, MantineProvider as le } from "@mantine/core";
|
|
5
|
+
import y, { forwardRef as g, createContext as ce, useState as ue, useRef as C, useCallback as F, useContext as de, useEffect as A } from "react";
|
|
6
|
+
import { mergeRefs as T, useFocusWithin as me, useFocusTrap as ge } from "@mantine/hooks";
|
|
7
|
+
const G = (e, n, t = !1) => {
|
|
8
|
+
const o = [];
|
|
9
|
+
function r(s, l = "--bn") {
|
|
10
10
|
for (const a in s) {
|
|
11
11
|
const c = a.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), u = `${l}-${c}`;
|
|
12
|
-
typeof s[a] != "object" ? (typeof s[a] == "number" && (s[a] = `${s[a]}px`), t ? n.style.removeProperty(u) : n.style.setProperty(u, s[a].toString())) :
|
|
12
|
+
typeof s[a] != "object" ? (typeof s[a] == "number" && (s[a] = `${s[a]}px`), t ? n.style.removeProperty(u) : n.style.setProperty(u, s[a].toString())) : r(s[a], u);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
return
|
|
16
|
-
},
|
|
15
|
+
return r(e), o;
|
|
16
|
+
}, D = (e, n) => G(e, n), fe = {
|
|
17
17
|
colors: {
|
|
18
18
|
editor: {
|
|
19
19
|
text: void 0,
|
|
@@ -83,17 +83,17 @@ const H = (e, n, t = !1) => {
|
|
|
83
83
|
},
|
|
84
84
|
borderRadius: void 0,
|
|
85
85
|
fontFamily: void 0
|
|
86
|
-
}, be = (e) =>
|
|
86
|
+
}, be = (e) => G(fe, e, !0), pe = g((e, n) => {
|
|
87
87
|
const {
|
|
88
88
|
className: t,
|
|
89
|
-
name:
|
|
90
|
-
label:
|
|
89
|
+
name: o,
|
|
90
|
+
label: r,
|
|
91
91
|
icon: s,
|
|
92
92
|
value: l,
|
|
93
93
|
autoFocus: a,
|
|
94
94
|
placeholder: c,
|
|
95
95
|
onKeyDown: u,
|
|
96
|
-
onChange:
|
|
96
|
+
onChange: f,
|
|
97
97
|
onSubmit: v,
|
|
98
98
|
...h
|
|
99
99
|
} = e;
|
|
@@ -103,116 +103,116 @@ const H = (e, n, t = !1) => {
|
|
|
103
103
|
size: "xs",
|
|
104
104
|
className: t,
|
|
105
105
|
ref: n,
|
|
106
|
-
name:
|
|
107
|
-
label:
|
|
106
|
+
name: o,
|
|
107
|
+
label: r,
|
|
108
108
|
leftSection: s,
|
|
109
109
|
value: l,
|
|
110
110
|
autoFocus: a,
|
|
111
111
|
"data-autofocus": a ? "true" : void 0,
|
|
112
112
|
placeholder: c,
|
|
113
113
|
onKeyDown: u,
|
|
114
|
-
onChange:
|
|
114
|
+
onChange: f,
|
|
115
115
|
onSubmit: v
|
|
116
116
|
}
|
|
117
117
|
);
|
|
118
118
|
});
|
|
119
|
-
var
|
|
119
|
+
var H = {
|
|
120
120
|
color: void 0,
|
|
121
121
|
size: void 0,
|
|
122
122
|
className: void 0,
|
|
123
123
|
style: void 0,
|
|
124
124
|
attr: void 0
|
|
125
|
-
},
|
|
126
|
-
function
|
|
125
|
+
}, I = y.createContext && /* @__PURE__ */ y.createContext(H), ve = ["attr", "size", "title"];
|
|
126
|
+
function he(e, n) {
|
|
127
127
|
if (e == null) return {};
|
|
128
|
-
var t =
|
|
128
|
+
var t = ye(e, n), o, r;
|
|
129
129
|
if (Object.getOwnPropertySymbols) {
|
|
130
130
|
var s = Object.getOwnPropertySymbols(e);
|
|
131
|
-
for (
|
|
132
|
-
|
|
131
|
+
for (r = 0; r < s.length; r++)
|
|
132
|
+
o = s[r], !(n.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (t[o] = e[o]);
|
|
133
133
|
}
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function ye(e, n) {
|
|
137
137
|
if (e == null) return {};
|
|
138
138
|
var t = {};
|
|
139
|
-
for (var
|
|
140
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
141
|
-
if (n.indexOf(
|
|
142
|
-
t[
|
|
139
|
+
for (var o in e)
|
|
140
|
+
if (Object.prototype.hasOwnProperty.call(e, o)) {
|
|
141
|
+
if (n.indexOf(o) >= 0) continue;
|
|
142
|
+
t[o] = e[o];
|
|
143
143
|
}
|
|
144
144
|
return t;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function k() {
|
|
147
|
+
return k = Object.assign ? Object.assign.bind() : function(e) {
|
|
148
148
|
for (var n = 1; n < arguments.length; n++) {
|
|
149
149
|
var t = arguments[n];
|
|
150
|
-
for (var
|
|
151
|
-
Object.prototype.hasOwnProperty.call(t,
|
|
150
|
+
for (var o in t)
|
|
151
|
+
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
152
152
|
}
|
|
153
153
|
return e;
|
|
154
|
-
},
|
|
154
|
+
}, k.apply(this, arguments);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function R(e, n) {
|
|
157
157
|
var t = Object.keys(e);
|
|
158
158
|
if (Object.getOwnPropertySymbols) {
|
|
159
|
-
var
|
|
160
|
-
n && (
|
|
161
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
162
|
-
})), t.push.apply(t,
|
|
159
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
160
|
+
n && (o = o.filter(function(r) {
|
|
161
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
162
|
+
})), t.push.apply(t, o);
|
|
163
163
|
}
|
|
164
164
|
return t;
|
|
165
165
|
}
|
|
166
166
|
function P(e) {
|
|
167
167
|
for (var n = 1; n < arguments.length; n++) {
|
|
168
168
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
169
|
-
n % 2 ?
|
|
170
|
-
|
|
171
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
172
|
-
Object.defineProperty(e,
|
|
169
|
+
n % 2 ? R(Object(t), !0).forEach(function(o) {
|
|
170
|
+
Se(e, o, t[o]);
|
|
171
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : R(Object(t)).forEach(function(o) {
|
|
172
|
+
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
return e;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Se(e, n, t) {
|
|
178
178
|
return n = xe(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
179
179
|
}
|
|
180
180
|
function xe(e) {
|
|
181
|
-
var n =
|
|
181
|
+
var n = we(e, "string");
|
|
182
182
|
return typeof n == "symbol" ? n : n + "";
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function we(e, n) {
|
|
185
185
|
if (typeof e != "object" || !e) return e;
|
|
186
186
|
var t = e[Symbol.toPrimitive];
|
|
187
187
|
if (t !== void 0) {
|
|
188
|
-
var
|
|
189
|
-
if (typeof
|
|
188
|
+
var o = t.call(e, n || "default");
|
|
189
|
+
if (typeof o != "object") return o;
|
|
190
190
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
191
191
|
}
|
|
192
192
|
return (n === "string" ? String : Number)(e);
|
|
193
193
|
}
|
|
194
194
|
function K(e) {
|
|
195
|
-
return e && e.map((n, t) => /* @__PURE__ */
|
|
195
|
+
return e && e.map((n, t) => /* @__PURE__ */ y.createElement(n.tag, P({
|
|
196
196
|
key: t
|
|
197
197
|
}, n.attr), K(n.child)));
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return (n) => /* @__PURE__ */
|
|
199
|
+
function U(e) {
|
|
200
|
+
return (n) => /* @__PURE__ */ y.createElement(Ne, k({
|
|
201
201
|
attr: P({}, e.attr)
|
|
202
202
|
}, n), K(e.child));
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Ne(e) {
|
|
205
205
|
var n = (t) => {
|
|
206
206
|
var {
|
|
207
|
-
attr:
|
|
208
|
-
size:
|
|
207
|
+
attr: o,
|
|
208
|
+
size: r,
|
|
209
209
|
title: s
|
|
210
|
-
} = e, l =
|
|
211
|
-
return t.className && (c = t.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */
|
|
210
|
+
} = e, l = he(e, ve), a = r || t.size || "1em", c;
|
|
211
|
+
return t.className && (c = t.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ y.createElement("svg", k({
|
|
212
212
|
stroke: "currentColor",
|
|
213
213
|
fill: "currentColor",
|
|
214
214
|
strokeWidth: "0"
|
|
215
|
-
}, t.attr,
|
|
215
|
+
}, t.attr, o, l, {
|
|
216
216
|
className: c,
|
|
217
217
|
style: P(P({
|
|
218
218
|
color: e.color || t.color
|
|
@@ -220,49 +220,49 @@ function ke(e) {
|
|
|
220
220
|
height: a,
|
|
221
221
|
width: a,
|
|
222
222
|
xmlns: "http://www.w3.org/2000/svg"
|
|
223
|
-
}), s && /* @__PURE__ */
|
|
223
|
+
}), s && /* @__PURE__ */ y.createElement("title", null, s), e.children);
|
|
224
224
|
};
|
|
225
|
-
return
|
|
225
|
+
return I !== void 0 ? /* @__PURE__ */ y.createElement(I.Consumer, null, (t) => n(t)) : n(H);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
return
|
|
227
|
+
function Ce(e) {
|
|
228
|
+
return U({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", clipRule: "evenodd" }, child: [] }] })(e);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
return
|
|
230
|
+
function ke(e) {
|
|
231
|
+
return U({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", clipRule: "evenodd" }, child: [] }] })(e);
|
|
232
232
|
}
|
|
233
|
-
const
|
|
233
|
+
const W = ce(void 0), Pe = g((e, n) => {
|
|
234
234
|
const {
|
|
235
235
|
children: t,
|
|
236
|
-
onOpenChange:
|
|
237
|
-
position:
|
|
236
|
+
onOpenChange: o,
|
|
237
|
+
position: r,
|
|
238
238
|
sub: s,
|
|
239
239
|
// not used
|
|
240
240
|
...l
|
|
241
241
|
} = e;
|
|
242
242
|
d(l);
|
|
243
|
-
const [a, c] =
|
|
244
|
-
|
|
243
|
+
const [a, c] = ue(!1), u = C(null), f = C(), v = F(() => {
|
|
244
|
+
f.current && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
245
245
|
c(!1);
|
|
246
246
|
}, 250);
|
|
247
247
|
}, []), h = F(() => {
|
|
248
|
-
|
|
248
|
+
f.current && clearTimeout(f.current), c(!0);
|
|
249
249
|
}, []);
|
|
250
250
|
return /* @__PURE__ */ i(
|
|
251
|
-
|
|
251
|
+
W.Provider,
|
|
252
252
|
{
|
|
253
253
|
value: {
|
|
254
254
|
onMenuMouseOver: h,
|
|
255
255
|
onMenuMouseLeave: v
|
|
256
256
|
},
|
|
257
257
|
children: /* @__PURE__ */ i(
|
|
258
|
-
|
|
258
|
+
b.Item,
|
|
259
259
|
{
|
|
260
260
|
className: "bn-menu-item bn-mt-sub-menu-item",
|
|
261
261
|
ref: T(n, u),
|
|
262
262
|
onMouseOver: h,
|
|
263
263
|
onMouseLeave: v,
|
|
264
264
|
children: /* @__PURE__ */ i(
|
|
265
|
-
|
|
265
|
+
b,
|
|
266
266
|
{
|
|
267
267
|
portalProps: {
|
|
268
268
|
target: u.current ? u.current.parentElement : void 0
|
|
@@ -270,9 +270,9 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
270
270
|
middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
|
|
271
271
|
trigger: "hover",
|
|
272
272
|
opened: a,
|
|
273
|
-
onClose: () =>
|
|
274
|
-
onOpen: () =>
|
|
275
|
-
position:
|
|
273
|
+
onClose: () => o == null ? void 0 : o(!1),
|
|
274
|
+
onOpen: () => o == null ? void 0 : o(!0),
|
|
275
|
+
position: r,
|
|
276
276
|
children: t
|
|
277
277
|
}
|
|
278
278
|
)
|
|
@@ -280,89 +280,99 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
280
280
|
)
|
|
281
281
|
}
|
|
282
282
|
);
|
|
283
|
-
}),
|
|
284
|
-
const { children: n, onOpenChange: t, position:
|
|
285
|
-
return d(s),
|
|
286
|
-
|
|
283
|
+
}), Te = (e) => {
|
|
284
|
+
const { children: n, onOpenChange: t, position: o, sub: r, ...s } = e;
|
|
285
|
+
return d(s), r ? /* @__PURE__ */ i(Pe, { ...e }) : /* @__PURE__ */ i(
|
|
286
|
+
b,
|
|
287
287
|
{
|
|
288
288
|
withinPortal: !1,
|
|
289
289
|
middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
|
|
290
290
|
onClose: () => t == null ? void 0 : t(!1),
|
|
291
291
|
onOpen: () => t == null ? void 0 : t(!0),
|
|
292
|
-
position:
|
|
292
|
+
position: o,
|
|
293
293
|
children: n
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
|
-
},
|
|
297
|
-
const { className: t, children:
|
|
298
|
-
return d(c, !1), l ? /* @__PURE__ */
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
296
|
+
}, Me = g((e, n) => {
|
|
297
|
+
const { className: t, children: o, icon: r, checked: s, subTrigger: l, onClick: a, ...c } = e;
|
|
298
|
+
return d(c, !1), l ? /* @__PURE__ */ S(
|
|
299
|
+
"div",
|
|
300
|
+
{
|
|
301
|
+
onClick: (u) => {
|
|
302
|
+
u.preventDefault(), u.stopPropagation();
|
|
303
|
+
},
|
|
304
|
+
ref: n,
|
|
305
|
+
...c,
|
|
306
|
+
children: [
|
|
307
|
+
o,
|
|
308
|
+
/* @__PURE__ */ i(ke, { size: 15 })
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
) : /* @__PURE__ */ i(
|
|
312
|
+
b.Item,
|
|
303
313
|
{
|
|
304
314
|
className: t,
|
|
305
315
|
ref: n,
|
|
306
|
-
leftSection:
|
|
307
|
-
rightSection: s ? /* @__PURE__ */ i(
|
|
316
|
+
leftSection: r,
|
|
317
|
+
rightSection: s ? /* @__PURE__ */ i(_, { size: 10 }) : s === !1 ? /* @__PURE__ */ i("div", { className: "bn-tick-space" }) : null,
|
|
308
318
|
onClick: a,
|
|
309
319
|
...c,
|
|
310
|
-
children:
|
|
320
|
+
children: o
|
|
311
321
|
}
|
|
312
322
|
);
|
|
313
|
-
}),
|
|
323
|
+
}), Fe = (e) => {
|
|
314
324
|
const {
|
|
315
325
|
children: n,
|
|
316
326
|
sub: t,
|
|
317
327
|
// unused
|
|
318
|
-
...
|
|
328
|
+
...o
|
|
319
329
|
} = e;
|
|
320
|
-
return d(
|
|
321
|
-
},
|
|
330
|
+
return d(o), /* @__PURE__ */ i(b.Target, { children: n });
|
|
331
|
+
}, Oe = g((e, n) => {
|
|
322
332
|
const {
|
|
323
333
|
className: t,
|
|
324
|
-
children:
|
|
325
|
-
sub:
|
|
334
|
+
children: o,
|
|
335
|
+
sub: r,
|
|
326
336
|
//unused
|
|
327
337
|
...s
|
|
328
338
|
} = e;
|
|
329
339
|
d(s);
|
|
330
|
-
const l =
|
|
340
|
+
const l = de(W);
|
|
331
341
|
return /* @__PURE__ */ i(
|
|
332
|
-
|
|
342
|
+
b.Dropdown,
|
|
333
343
|
{
|
|
334
344
|
className: t,
|
|
335
345
|
ref: n,
|
|
336
346
|
onMouseOver: l == null ? void 0 : l.onMenuMouseOver,
|
|
337
347
|
onMouseLeave: l == null ? void 0 : l.onMenuMouseLeave,
|
|
338
|
-
children:
|
|
348
|
+
children: o
|
|
339
349
|
}
|
|
340
350
|
);
|
|
341
|
-
}),
|
|
342
|
-
const { className: t, ...
|
|
343
|
-
return d(
|
|
344
|
-
}),
|
|
345
|
-
const { className: t, children:
|
|
346
|
-
return d(
|
|
347
|
-
}),
|
|
351
|
+
}), De = g((e, n) => {
|
|
352
|
+
const { className: t, ...o } = e;
|
|
353
|
+
return d(o), /* @__PURE__ */ i(b.Divider, { className: t, ref: n });
|
|
354
|
+
}), Ie = g((e, n) => {
|
|
355
|
+
const { className: t, children: o, ...r } = e;
|
|
356
|
+
return d(r), /* @__PURE__ */ i(b.Label, { className: t, ref: n, children: o });
|
|
357
|
+
}), Re = g((e, n) => {
|
|
348
358
|
const {
|
|
349
359
|
className: t,
|
|
350
|
-
tabs:
|
|
351
|
-
defaultOpenTab:
|
|
360
|
+
tabs: o,
|
|
361
|
+
defaultOpenTab: r,
|
|
352
362
|
openTab: s,
|
|
353
363
|
setOpenTab: l,
|
|
354
364
|
loading: a,
|
|
355
365
|
...c
|
|
356
366
|
} = e;
|
|
357
|
-
return d(c), /* @__PURE__ */ i(p, { className: t, ref: n, children: /* @__PURE__ */
|
|
367
|
+
return d(c), /* @__PURE__ */ i(p, { className: t, ref: n, children: /* @__PURE__ */ S(
|
|
358
368
|
w,
|
|
359
369
|
{
|
|
360
370
|
value: s,
|
|
361
|
-
defaultValue:
|
|
371
|
+
defaultValue: r,
|
|
362
372
|
onChange: l,
|
|
363
373
|
children: [
|
|
364
|
-
a && /* @__PURE__ */ i(
|
|
365
|
-
/* @__PURE__ */ i(w.List, { children:
|
|
374
|
+
a && /* @__PURE__ */ i(te, { visible: a }),
|
|
375
|
+
/* @__PURE__ */ i(w.List, { children: o.map((u) => /* @__PURE__ */ i(
|
|
366
376
|
w.Tab,
|
|
367
377
|
{
|
|
368
378
|
"data-test": `${u.name.toLowerCase()}-tab`,
|
|
@@ -371,44 +381,44 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
371
381
|
},
|
|
372
382
|
u.name
|
|
373
383
|
)) }),
|
|
374
|
-
|
|
384
|
+
o.map((u) => /* @__PURE__ */ i(w.Panel, { value: u.name, children: u.tabPanel }, u.name))
|
|
375
385
|
]
|
|
376
386
|
}
|
|
377
387
|
) });
|
|
378
|
-
}),
|
|
379
|
-
const { className: t, children:
|
|
388
|
+
}), Le = g((e, n) => {
|
|
389
|
+
const { className: t, children: o, onClick: r, label: s, ...l } = e;
|
|
380
390
|
return d(l), /* @__PURE__ */ i(
|
|
381
|
-
|
|
391
|
+
x,
|
|
382
392
|
{
|
|
383
393
|
size: "xs",
|
|
384
394
|
"aria-label": s,
|
|
385
395
|
className: t,
|
|
386
396
|
ref: n,
|
|
387
|
-
onClick:
|
|
397
|
+
onClick: r,
|
|
388
398
|
...l,
|
|
389
|
-
children:
|
|
399
|
+
children: o
|
|
390
400
|
}
|
|
391
401
|
);
|
|
392
|
-
}),
|
|
393
|
-
const { className: t, accept:
|
|
402
|
+
}), Ee = g((e, n) => {
|
|
403
|
+
const { className: t, accept: o, value: r, placeholder: s, onChange: l, ...a } = e;
|
|
394
404
|
return d(a), /* @__PURE__ */ i(
|
|
395
|
-
|
|
405
|
+
ne,
|
|
396
406
|
{
|
|
397
407
|
size: "xs",
|
|
398
408
|
className: t,
|
|
399
409
|
ref: n,
|
|
400
|
-
accept:
|
|
401
|
-
value:
|
|
410
|
+
accept: o,
|
|
411
|
+
value: r,
|
|
402
412
|
placeholder: s,
|
|
403
413
|
onChange: l,
|
|
404
414
|
...a
|
|
405
415
|
}
|
|
406
416
|
);
|
|
407
|
-
}), je =
|
|
408
|
-
const { className: t, children:
|
|
409
|
-
return d(
|
|
410
|
-
}), ze =
|
|
411
|
-
const { className: t, value:
|
|
417
|
+
}), je = g((e, n) => {
|
|
418
|
+
const { className: t, children: o, ...r } = e;
|
|
419
|
+
return d(r), /* @__PURE__ */ i("div", { className: t, ref: n, children: o });
|
|
420
|
+
}), ze = g((e, n) => {
|
|
421
|
+
const { className: t, value: o, placeholder: r, onKeyDown: s, onChange: l, ...a } = e;
|
|
412
422
|
return d(a), /* @__PURE__ */ i(
|
|
413
423
|
B,
|
|
414
424
|
{
|
|
@@ -416,63 +426,63 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
416
426
|
"data-test": "embed-input",
|
|
417
427
|
className: t,
|
|
418
428
|
ref: n,
|
|
419
|
-
value:
|
|
420
|
-
placeholder:
|
|
429
|
+
value: o,
|
|
430
|
+
placeholder: r,
|
|
421
431
|
onKeyDown: s,
|
|
422
432
|
onChange: l
|
|
423
433
|
}
|
|
424
434
|
);
|
|
425
|
-
}),
|
|
426
|
-
const { children: n, opened: t, position:
|
|
427
|
-
return d(
|
|
428
|
-
|
|
435
|
+
}), Be = (e) => {
|
|
436
|
+
const { children: n, opened: t, position: o, ...r } = e;
|
|
437
|
+
return d(r), /* @__PURE__ */ i(
|
|
438
|
+
oe,
|
|
429
439
|
{
|
|
430
440
|
withinPortal: !1,
|
|
431
441
|
zIndex: 1e4,
|
|
432
442
|
opened: t,
|
|
433
|
-
position:
|
|
443
|
+
position: o,
|
|
434
444
|
children: n
|
|
435
445
|
}
|
|
436
446
|
);
|
|
437
|
-
},
|
|
447
|
+
}, _e = (e) => {
|
|
438
448
|
const { children: n, ...t } = e;
|
|
439
|
-
return d(t), /* @__PURE__ */ i(
|
|
440
|
-
},
|
|
449
|
+
return d(t), /* @__PURE__ */ i(re, { children: n });
|
|
450
|
+
}, $e = g((e, n) => {
|
|
441
451
|
const {
|
|
442
452
|
className: t,
|
|
443
|
-
children:
|
|
444
|
-
variant:
|
|
453
|
+
children: o,
|
|
454
|
+
variant: r,
|
|
445
455
|
// unused
|
|
446
456
|
...s
|
|
447
457
|
} = e;
|
|
448
|
-
return d(s), /* @__PURE__ */ i(
|
|
449
|
-
}),
|
|
450
|
-
const { className: t, children:
|
|
451
|
-
return d(
|
|
458
|
+
return d(s), /* @__PURE__ */ i(se, { className: t, ref: n, children: o });
|
|
459
|
+
}), Ve = g((e, n) => {
|
|
460
|
+
const { className: t, children: o, ...r } = e;
|
|
461
|
+
return d(r, !1), /* @__PURE__ */ i(
|
|
452
462
|
p,
|
|
453
463
|
{
|
|
454
464
|
align: "center",
|
|
455
465
|
gap: 0,
|
|
456
466
|
className: t,
|
|
457
467
|
ref: n,
|
|
458
|
-
...
|
|
459
|
-
children:
|
|
468
|
+
...r,
|
|
469
|
+
children: o
|
|
460
470
|
}
|
|
461
471
|
);
|
|
462
|
-
}),
|
|
472
|
+
}), Ae = g((e, n) => {
|
|
463
473
|
const {
|
|
464
474
|
className: t,
|
|
465
|
-
children:
|
|
466
|
-
icon:
|
|
475
|
+
children: o,
|
|
476
|
+
icon: r,
|
|
467
477
|
onClick: s,
|
|
468
478
|
onDragEnd: l,
|
|
469
479
|
onDragStart: a,
|
|
470
480
|
draggable: c,
|
|
471
481
|
label: u,
|
|
472
|
-
...
|
|
482
|
+
...f
|
|
473
483
|
} = e;
|
|
474
|
-
return d(
|
|
475
|
-
|
|
484
|
+
return d(f, !1), r ? /* @__PURE__ */ i(
|
|
485
|
+
$,
|
|
476
486
|
{
|
|
477
487
|
size: 24,
|
|
478
488
|
className: t,
|
|
@@ -482,11 +492,11 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
482
492
|
onDragStart: a,
|
|
483
493
|
draggable: c,
|
|
484
494
|
"aria-label": u,
|
|
485
|
-
...
|
|
486
|
-
children:
|
|
495
|
+
...f,
|
|
496
|
+
children: r
|
|
487
497
|
}
|
|
488
498
|
) : /* @__PURE__ */ i(
|
|
489
|
-
|
|
499
|
+
x,
|
|
490
500
|
{
|
|
491
501
|
className: t,
|
|
492
502
|
ref: n,
|
|
@@ -495,104 +505,104 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
495
505
|
onDragStart: a,
|
|
496
506
|
draggable: c,
|
|
497
507
|
"aria-label": u,
|
|
498
|
-
...
|
|
499
|
-
children:
|
|
508
|
+
...f,
|
|
509
|
+
children: o
|
|
500
510
|
}
|
|
501
511
|
);
|
|
502
|
-
}), Ge =
|
|
503
|
-
const { className: t, children:
|
|
512
|
+
}), Ge = g((e, n) => {
|
|
513
|
+
const { className: t, children: o, id: r, columns: s, ...l } = e;
|
|
504
514
|
return d(l), /* @__PURE__ */ i(
|
|
505
515
|
"div",
|
|
506
516
|
{
|
|
507
517
|
className: t,
|
|
508
518
|
style: { gridTemplateColumns: `repeat(${s}, 1fr)` },
|
|
509
519
|
ref: n,
|
|
510
|
-
id:
|
|
520
|
+
id: r,
|
|
511
521
|
role: "grid",
|
|
512
|
-
children:
|
|
522
|
+
children: o
|
|
513
523
|
}
|
|
514
524
|
);
|
|
515
|
-
}),
|
|
516
|
-
const { className: t, children:
|
|
525
|
+
}), He = g((e, n) => {
|
|
526
|
+
const { className: t, children: o, columns: r, ...s } = e;
|
|
517
527
|
return d(s), /* @__PURE__ */ i(
|
|
518
528
|
p,
|
|
519
529
|
{
|
|
520
530
|
className: t,
|
|
521
|
-
style: { gridColumn: `1 / ${
|
|
531
|
+
style: { gridColumn: `1 / ${r + 1}` },
|
|
522
532
|
ref: n,
|
|
523
|
-
children: /* @__PURE__ */ i(p, { className: "bn-mt-suggestion-menu-item-title", children:
|
|
533
|
+
children: /* @__PURE__ */ i(p, { className: "bn-mt-suggestion-menu-item-title", children: o })
|
|
524
534
|
}
|
|
525
535
|
);
|
|
526
|
-
}),
|
|
527
|
-
const { className: t, isSelected:
|
|
536
|
+
}), Ke = g((e, n) => {
|
|
537
|
+
const { className: t, isSelected: o, onClick: r, item: s, id: l, ...a } = e;
|
|
528
538
|
d(a);
|
|
529
|
-
const c =
|
|
530
|
-
return
|
|
531
|
-
if (!c.current || !
|
|
539
|
+
const c = C(null);
|
|
540
|
+
return A(() => {
|
|
541
|
+
if (!c.current || !o)
|
|
532
542
|
return;
|
|
533
|
-
const u =
|
|
543
|
+
const u = z(
|
|
534
544
|
c.current,
|
|
535
545
|
document.querySelector(".bn-grid-suggestion-menu")
|
|
536
546
|
);
|
|
537
547
|
u === "top" ? c.current.scrollIntoView(!0) : u === "bottom" && c.current.scrollIntoView(!1);
|
|
538
|
-
}, [
|
|
548
|
+
}, [o]), /* @__PURE__ */ i(
|
|
539
549
|
"div",
|
|
540
550
|
{
|
|
541
551
|
className: t,
|
|
542
552
|
ref: T(n, c),
|
|
543
553
|
id: l,
|
|
544
554
|
role: "option",
|
|
545
|
-
onClick:
|
|
546
|
-
"aria-selected":
|
|
555
|
+
onClick: r,
|
|
556
|
+
"aria-selected": o || void 0,
|
|
547
557
|
children: s.icon
|
|
548
558
|
}
|
|
549
559
|
);
|
|
550
|
-
}),
|
|
560
|
+
}), Ue = g((e, n) => {
|
|
551
561
|
const {
|
|
552
562
|
className: t,
|
|
553
|
-
children:
|
|
563
|
+
children: o,
|
|
554
564
|
// unused, using "dots" instead
|
|
555
|
-
columns:
|
|
565
|
+
columns: r,
|
|
556
566
|
...s
|
|
557
567
|
} = e;
|
|
558
568
|
return d(s), /* @__PURE__ */ i(
|
|
559
|
-
|
|
569
|
+
V,
|
|
560
570
|
{
|
|
561
571
|
className: t,
|
|
562
|
-
style: { gridColumn: `1 / ${
|
|
572
|
+
style: { gridColumn: `1 / ${r + 1}` },
|
|
563
573
|
type: "dots",
|
|
564
574
|
ref: n
|
|
565
575
|
}
|
|
566
576
|
);
|
|
567
|
-
}),
|
|
568
|
-
const { className: t, children:
|
|
577
|
+
}), We = g((e, n) => {
|
|
578
|
+
const { className: t, children: o, id: r, ...s } = e;
|
|
569
579
|
return d(s), /* @__PURE__ */ i(
|
|
570
580
|
O,
|
|
571
581
|
{
|
|
572
582
|
gap: 0,
|
|
573
583
|
className: t,
|
|
574
584
|
ref: n,
|
|
575
|
-
id:
|
|
585
|
+
id: r,
|
|
576
586
|
role: "listbox",
|
|
577
|
-
children:
|
|
587
|
+
children: o
|
|
578
588
|
}
|
|
579
589
|
);
|
|
580
|
-
}),
|
|
581
|
-
const { className: t, children:
|
|
582
|
-
return d(
|
|
583
|
-
}),
|
|
584
|
-
const { className: t, isSelected:
|
|
590
|
+
}), qe = g((e, n) => {
|
|
591
|
+
const { className: t, children: o, ...r } = e;
|
|
592
|
+
return d(r), /* @__PURE__ */ i(p, { className: t, ref: n, children: /* @__PURE__ */ i(p, { className: "bn-mt-suggestion-menu-item-title", children: o }) });
|
|
593
|
+
}), Ze = g((e, n) => {
|
|
594
|
+
const { className: t, isSelected: o, onClick: r, item: s, id: l, ...a } = e;
|
|
585
595
|
d(a);
|
|
586
|
-
const c =
|
|
587
|
-
return
|
|
588
|
-
if (!c.current || !
|
|
596
|
+
const c = C(null);
|
|
597
|
+
return A(() => {
|
|
598
|
+
if (!c.current || !o)
|
|
589
599
|
return;
|
|
590
|
-
const u =
|
|
600
|
+
const u = z(
|
|
591
601
|
c.current,
|
|
592
602
|
document.querySelector(".bn-suggestion-menu")
|
|
593
603
|
);
|
|
594
604
|
u === "top" ? c.current.scrollIntoView(!0) : u === "bottom" && c.current.scrollIntoView(!1);
|
|
595
|
-
}, [
|
|
605
|
+
}, [o]), /* @__PURE__ */ S(
|
|
596
606
|
p,
|
|
597
607
|
{
|
|
598
608
|
gap: 0,
|
|
@@ -600,8 +610,8 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
600
610
|
ref: T(n, c),
|
|
601
611
|
id: l,
|
|
602
612
|
role: "option",
|
|
603
|
-
onClick:
|
|
604
|
-
"aria-selected":
|
|
613
|
+
onClick: r,
|
|
614
|
+
"aria-selected": o || void 0,
|
|
605
615
|
children: [
|
|
606
616
|
s.icon && /* @__PURE__ */ i(
|
|
607
617
|
p,
|
|
@@ -611,37 +621,37 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
611
621
|
children: s.icon
|
|
612
622
|
}
|
|
613
623
|
),
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */ i(
|
|
616
|
-
/* @__PURE__ */ i(
|
|
624
|
+
/* @__PURE__ */ S(O, { gap: 0, className: "bn-mt-suggestion-menu-item-body", children: [
|
|
625
|
+
/* @__PURE__ */ i(N, { className: "bn-mt-suggestion-menu-item-title", children: s.title }),
|
|
626
|
+
/* @__PURE__ */ i(N, { className: "bn-mt-suggestion-menu-item-subtitle", children: s.subtext })
|
|
617
627
|
] }),
|
|
618
628
|
s.badge && /* @__PURE__ */ i(
|
|
619
629
|
p,
|
|
620
630
|
{
|
|
621
631
|
"data-position": "right",
|
|
622
632
|
className: "bn-mt-suggestion-menu-item-section",
|
|
623
|
-
children: /* @__PURE__ */ i(
|
|
633
|
+
children: /* @__PURE__ */ i(ie, { size: "xs", children: s.badge })
|
|
624
634
|
}
|
|
625
635
|
)
|
|
626
636
|
]
|
|
627
637
|
}
|
|
628
638
|
);
|
|
629
|
-
}),
|
|
630
|
-
const { className: t, children:
|
|
631
|
-
return d(
|
|
632
|
-
}),
|
|
639
|
+
}), Je = g((e, n) => {
|
|
640
|
+
const { className: t, children: o, ...r } = e;
|
|
641
|
+
return d(r), /* @__PURE__ */ i(p, { className: t, ref: n, children: o });
|
|
642
|
+
}), Qe = g((e, n) => {
|
|
633
643
|
const {
|
|
634
644
|
className: t,
|
|
635
|
-
children:
|
|
645
|
+
children: o,
|
|
636
646
|
// unused, using "dots" instead
|
|
637
|
-
...
|
|
647
|
+
...r
|
|
638
648
|
} = e;
|
|
639
|
-
return d(
|
|
640
|
-
}),
|
|
649
|
+
return d(r), /* @__PURE__ */ i(V, { className: t, type: "dots", ref: n });
|
|
650
|
+
}), Xe = g((e, n) => {
|
|
641
651
|
const {
|
|
642
652
|
className: t,
|
|
643
|
-
children:
|
|
644
|
-
draggable:
|
|
653
|
+
children: o,
|
|
654
|
+
draggable: r,
|
|
645
655
|
onDragStart: s,
|
|
646
656
|
onDragEnd: l,
|
|
647
657
|
style: a,
|
|
@@ -649,81 +659,81 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
649
659
|
...u
|
|
650
660
|
} = e;
|
|
651
661
|
return d(u, !1), /* @__PURE__ */ i(
|
|
652
|
-
|
|
662
|
+
x,
|
|
653
663
|
{
|
|
654
664
|
className: t,
|
|
655
665
|
ref: n,
|
|
656
666
|
"aria-label": c,
|
|
657
|
-
draggable:
|
|
667
|
+
draggable: r,
|
|
658
668
|
onDragStart: s,
|
|
659
669
|
onDragEnd: l,
|
|
660
670
|
style: a,
|
|
661
671
|
...u,
|
|
662
|
-
children:
|
|
672
|
+
children: o
|
|
663
673
|
}
|
|
664
674
|
);
|
|
665
|
-
}),
|
|
666
|
-
const { children: t, className:
|
|
675
|
+
}), Ye = g((e, n) => {
|
|
676
|
+
const { children: t, className: o, onMouseDown: r, onClick: s, ...l } = e;
|
|
667
677
|
return d(l, !1), /* @__PURE__ */ i(
|
|
668
|
-
|
|
678
|
+
x,
|
|
669
679
|
{
|
|
670
|
-
className:
|
|
680
|
+
className: o,
|
|
671
681
|
ref: n,
|
|
672
|
-
onMouseDown:
|
|
682
|
+
onMouseDown: r,
|
|
673
683
|
onClick: s,
|
|
674
684
|
...l,
|
|
675
685
|
children: t
|
|
676
686
|
}
|
|
677
687
|
);
|
|
678
|
-
}),
|
|
688
|
+
}), L = g(
|
|
679
689
|
(e, n) => {
|
|
680
|
-
const { className: t, children:
|
|
690
|
+
const { className: t, children: o, onMouseEnter: r, onMouseLeave: s, ...l } = e;
|
|
681
691
|
d(l);
|
|
682
|
-
const { ref: a, focused: c } =
|
|
692
|
+
const { ref: a, focused: c } = me(), u = ge(c), f = T(n, a, u);
|
|
683
693
|
return /* @__PURE__ */ i(
|
|
684
694
|
p,
|
|
685
695
|
{
|
|
686
696
|
className: t,
|
|
687
|
-
ref:
|
|
697
|
+
ref: f,
|
|
688
698
|
role: "toolbar",
|
|
689
|
-
onMouseEnter:
|
|
699
|
+
onMouseEnter: r,
|
|
690
700
|
onMouseLeave: s,
|
|
691
|
-
children:
|
|
701
|
+
children: o
|
|
692
702
|
}
|
|
693
703
|
);
|
|
694
704
|
}
|
|
695
|
-
),
|
|
696
|
-
/* @__PURE__ */ i(
|
|
697
|
-
e.secondaryTooltip && /* @__PURE__ */ i(
|
|
698
|
-
] }),
|
|
705
|
+
), et = (e) => /* @__PURE__ */ S(O, { gap: 0, className: "bn-tooltip", children: [
|
|
706
|
+
/* @__PURE__ */ i(N, { size: "sm", children: e.mainTooltip }),
|
|
707
|
+
e.secondaryTooltip && /* @__PURE__ */ i(N, { size: "xs", children: e.secondaryTooltip })
|
|
708
|
+
] }), E = g(
|
|
699
709
|
(e, n) => {
|
|
700
710
|
const {
|
|
701
711
|
className: t,
|
|
702
|
-
children:
|
|
703
|
-
mainTooltip:
|
|
712
|
+
children: o,
|
|
713
|
+
mainTooltip: r,
|
|
704
714
|
secondaryTooltip: s,
|
|
705
715
|
icon: l,
|
|
706
716
|
isSelected: a,
|
|
707
717
|
isDisabled: c,
|
|
708
718
|
onClick: u,
|
|
709
|
-
label:
|
|
719
|
+
label: f,
|
|
710
720
|
...v
|
|
711
721
|
} = e;
|
|
712
722
|
return d(v, !1), /* @__PURE__ */ i(
|
|
713
|
-
|
|
723
|
+
ae,
|
|
714
724
|
{
|
|
715
725
|
withinPortal: !1,
|
|
716
726
|
label: /* @__PURE__ */ i(
|
|
717
|
-
|
|
727
|
+
et,
|
|
718
728
|
{
|
|
719
|
-
mainTooltip:
|
|
729
|
+
mainTooltip: r,
|
|
720
730
|
secondaryTooltip: s
|
|
721
731
|
}
|
|
722
732
|
),
|
|
723
|
-
children:
|
|
724
|
-
|
|
733
|
+
children: o ? /* @__PURE__ */ i(
|
|
734
|
+
x,
|
|
725
735
|
{
|
|
726
|
-
"aria-label":
|
|
736
|
+
"aria-label": f,
|
|
727
737
|
className: t,
|
|
728
738
|
onMouseDown: (h) => {
|
|
729
739
|
M() && h.currentTarget.focus();
|
|
@@ -731,25 +741,25 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
731
741
|
onClick: u,
|
|
732
742
|
"aria-pressed": a,
|
|
733
743
|
"data-selected": a || void 0,
|
|
734
|
-
"data-test":
|
|
744
|
+
"data-test": r.slice(0, 1).toLowerCase() + r.replace(/\s+/g, "").slice(1),
|
|
735
745
|
size: "xs",
|
|
736
746
|
disabled: c || !1,
|
|
737
747
|
ref: n,
|
|
738
748
|
...v,
|
|
739
|
-
children:
|
|
749
|
+
children: o
|
|
740
750
|
}
|
|
741
751
|
) : /* @__PURE__ */ i(
|
|
742
|
-
|
|
752
|
+
$,
|
|
743
753
|
{
|
|
744
754
|
className: t,
|
|
745
|
-
"aria-label":
|
|
755
|
+
"aria-label": f,
|
|
746
756
|
onMouseDown: (h) => {
|
|
747
757
|
M() && h.currentTarget.focus();
|
|
748
758
|
},
|
|
749
759
|
onClick: u,
|
|
750
760
|
"aria-pressed": a,
|
|
751
761
|
"data-selected": a || void 0,
|
|
752
|
-
"data-test":
|
|
762
|
+
"data-test": r.slice(0, 1).toLowerCase() + r.replace(/\s+/g, "").slice(1),
|
|
753
763
|
size: 30,
|
|
754
764
|
disabled: c || !1,
|
|
755
765
|
ref: n,
|
|
@@ -760,40 +770,40 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
760
770
|
}
|
|
761
771
|
);
|
|
762
772
|
}
|
|
763
|
-
),
|
|
764
|
-
const { className: t, items:
|
|
773
|
+
), tt = g((e, n) => {
|
|
774
|
+
const { className: t, items: o, isDisabled: r, ...s } = e;
|
|
765
775
|
d(s);
|
|
766
|
-
const l =
|
|
767
|
-
return l ? /* @__PURE__ */
|
|
768
|
-
|
|
776
|
+
const l = o.filter((a) => a.isSelected)[0];
|
|
777
|
+
return l ? /* @__PURE__ */ S(
|
|
778
|
+
b,
|
|
769
779
|
{
|
|
770
780
|
withinPortal: !1,
|
|
771
781
|
transitionProps: {
|
|
772
782
|
exitDuration: 0
|
|
773
783
|
},
|
|
774
|
-
disabled:
|
|
784
|
+
disabled: r,
|
|
775
785
|
middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
|
|
776
786
|
children: [
|
|
777
|
-
/* @__PURE__ */ i(
|
|
778
|
-
|
|
787
|
+
/* @__PURE__ */ i(b.Target, { children: /* @__PURE__ */ i(
|
|
788
|
+
x,
|
|
779
789
|
{
|
|
780
790
|
onMouseDown: (a) => {
|
|
781
791
|
M() && a.currentTarget.focus();
|
|
782
792
|
},
|
|
783
793
|
leftSection: l.icon,
|
|
784
|
-
rightSection: /* @__PURE__ */ i(
|
|
794
|
+
rightSection: /* @__PURE__ */ i(Ce, {}),
|
|
785
795
|
size: "xs",
|
|
786
796
|
variant: "subtle",
|
|
787
|
-
disabled:
|
|
797
|
+
disabled: r,
|
|
788
798
|
children: l.text
|
|
789
799
|
}
|
|
790
800
|
) }),
|
|
791
|
-
/* @__PURE__ */ i(
|
|
792
|
-
|
|
801
|
+
/* @__PURE__ */ i(b.Dropdown, { className: t, ref: n, children: o.map((a) => /* @__PURE__ */ i(
|
|
802
|
+
b.Item,
|
|
793
803
|
{
|
|
794
804
|
onClick: a.onClick,
|
|
795
805
|
leftSection: a.icon,
|
|
796
|
-
rightSection: a.isSelected ? /* @__PURE__ */ i(
|
|
806
|
+
rightSection: a.isSelected ? /* @__PURE__ */ i(_, { size: 10, className: "bn-tick-icon" }) : (
|
|
797
807
|
// Ensures space for tick even if item isn't currently selected.
|
|
798
808
|
/* @__PURE__ */ i("div", { className: "bn-tick-space" })
|
|
799
809
|
),
|
|
@@ -816,7 +826,7 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
816
826
|
"#161616",
|
|
817
827
|
"#0F0F0F",
|
|
818
828
|
"#000000"
|
|
819
|
-
],
|
|
829
|
+
], j = {
|
|
820
830
|
colors: {
|
|
821
831
|
editor: {
|
|
822
832
|
text: m[5],
|
|
@@ -845,48 +855,11 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
845
855
|
shadow: m[2],
|
|
846
856
|
border: m[1],
|
|
847
857
|
sideMenu: m[2],
|
|
848
|
-
highlights:
|
|
849
|
-
gray: {
|
|
850
|
-
text: "#9b9a97",
|
|
851
|
-
background: "#ebeced"
|
|
852
|
-
},
|
|
853
|
-
brown: {
|
|
854
|
-
text: "#64473a",
|
|
855
|
-
background: "#e9e5e3"
|
|
856
|
-
},
|
|
857
|
-
red: {
|
|
858
|
-
text: "#e03e3e",
|
|
859
|
-
background: "#fbe4e4"
|
|
860
|
-
},
|
|
861
|
-
orange: {
|
|
862
|
-
text: "#d9730d",
|
|
863
|
-
background: "#f6e9d9"
|
|
864
|
-
},
|
|
865
|
-
yellow: {
|
|
866
|
-
text: "#dfab01",
|
|
867
|
-
background: "#fbf3db"
|
|
868
|
-
},
|
|
869
|
-
green: {
|
|
870
|
-
text: "#4d6461",
|
|
871
|
-
background: "#ddedea"
|
|
872
|
-
},
|
|
873
|
-
blue: {
|
|
874
|
-
text: "#0b6e99",
|
|
875
|
-
background: "#ddebf1"
|
|
876
|
-
},
|
|
877
|
-
purple: {
|
|
878
|
-
text: "#6940a5",
|
|
879
|
-
background: "#eae4f2"
|
|
880
|
-
},
|
|
881
|
-
pink: {
|
|
882
|
-
text: "#ad1a72",
|
|
883
|
-
background: "#f4dfeb"
|
|
884
|
-
}
|
|
885
|
-
}
|
|
858
|
+
highlights: q
|
|
886
859
|
},
|
|
887
860
|
borderRadius: 6,
|
|
888
861
|
fontFamily: '"Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif'
|
|
889
|
-
},
|
|
862
|
+
}, ut = {
|
|
890
863
|
colors: {
|
|
891
864
|
editor: {
|
|
892
865
|
text: m[2],
|
|
@@ -915,137 +888,100 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
915
888
|
shadow: m[8],
|
|
916
889
|
border: m[7],
|
|
917
890
|
sideMenu: m[4],
|
|
918
|
-
highlights:
|
|
919
|
-
gray: {
|
|
920
|
-
text: "#bebdb8",
|
|
921
|
-
background: "#9b9a97"
|
|
922
|
-
},
|
|
923
|
-
brown: {
|
|
924
|
-
text: "#8e6552",
|
|
925
|
-
background: "#64473a"
|
|
926
|
-
},
|
|
927
|
-
red: {
|
|
928
|
-
text: "#ec4040",
|
|
929
|
-
background: "#be3434"
|
|
930
|
-
},
|
|
931
|
-
orange: {
|
|
932
|
-
text: "#e3790d",
|
|
933
|
-
background: "#b7600a"
|
|
934
|
-
},
|
|
935
|
-
yellow: {
|
|
936
|
-
text: "#dfab01",
|
|
937
|
-
background: "#b58b00"
|
|
938
|
-
},
|
|
939
|
-
green: {
|
|
940
|
-
text: "#6b8b87",
|
|
941
|
-
background: "#4d6461"
|
|
942
|
-
},
|
|
943
|
-
blue: {
|
|
944
|
-
text: "#0e87bc",
|
|
945
|
-
background: "#0b6e99"
|
|
946
|
-
},
|
|
947
|
-
purple: {
|
|
948
|
-
text: "#8552d7",
|
|
949
|
-
background: "#6940a5"
|
|
950
|
-
},
|
|
951
|
-
pink: {
|
|
952
|
-
text: "#da208f",
|
|
953
|
-
background: "#ad1a72"
|
|
954
|
-
}
|
|
955
|
-
}
|
|
891
|
+
highlights: Z
|
|
956
892
|
},
|
|
957
|
-
borderRadius:
|
|
958
|
-
fontFamily:
|
|
959
|
-
},
|
|
893
|
+
borderRadius: j.borderRadius,
|
|
894
|
+
fontFamily: j.fontFamily
|
|
895
|
+
}, nt = {
|
|
960
896
|
FormattingToolbar: {
|
|
961
|
-
Root:
|
|
962
|
-
Button:
|
|
963
|
-
Select:
|
|
897
|
+
Root: L,
|
|
898
|
+
Button: E,
|
|
899
|
+
Select: tt
|
|
964
900
|
},
|
|
965
901
|
FilePanel: {
|
|
966
|
-
Root:
|
|
967
|
-
Button:
|
|
968
|
-
FileInput:
|
|
902
|
+
Root: Re,
|
|
903
|
+
Button: Le,
|
|
904
|
+
FileInput: Ee,
|
|
969
905
|
TabPanel: je,
|
|
970
906
|
TextInput: ze
|
|
971
907
|
},
|
|
972
908
|
GridSuggestionMenu: {
|
|
973
909
|
Root: Ge,
|
|
974
|
-
Item:
|
|
975
|
-
EmptyItem:
|
|
976
|
-
Loader:
|
|
910
|
+
Item: Ke,
|
|
911
|
+
EmptyItem: He,
|
|
912
|
+
Loader: Ue
|
|
977
913
|
},
|
|
978
914
|
LinkToolbar: {
|
|
979
|
-
Root:
|
|
980
|
-
Button:
|
|
915
|
+
Root: L,
|
|
916
|
+
Button: E
|
|
981
917
|
},
|
|
982
918
|
SideMenu: {
|
|
983
|
-
Root:
|
|
984
|
-
Button:
|
|
919
|
+
Root: Ve,
|
|
920
|
+
Button: Ae
|
|
985
921
|
},
|
|
986
922
|
SuggestionMenu: {
|
|
987
|
-
Root:
|
|
988
|
-
Item:
|
|
989
|
-
EmptyItem:
|
|
990
|
-
Label:
|
|
991
|
-
Loader:
|
|
923
|
+
Root: We,
|
|
924
|
+
Item: Ze,
|
|
925
|
+
EmptyItem: qe,
|
|
926
|
+
Label: Je,
|
|
927
|
+
Loader: Qe
|
|
992
928
|
},
|
|
993
929
|
TableHandle: {
|
|
994
|
-
Root:
|
|
995
|
-
ExtendButton:
|
|
930
|
+
Root: Xe,
|
|
931
|
+
ExtendButton: Ye
|
|
996
932
|
},
|
|
997
933
|
Generic: {
|
|
998
934
|
Form: {
|
|
999
935
|
Root: (e) => /* @__PURE__ */ i("div", { children: e.children }),
|
|
1000
|
-
TextInput:
|
|
936
|
+
TextInput: pe
|
|
1001
937
|
},
|
|
1002
938
|
Menu: {
|
|
1003
|
-
Root:
|
|
1004
|
-
Trigger:
|
|
1005
|
-
Dropdown:
|
|
1006
|
-
Divider:
|
|
1007
|
-
Label:
|
|
1008
|
-
Item:
|
|
939
|
+
Root: Te,
|
|
940
|
+
Trigger: Fe,
|
|
941
|
+
Dropdown: Oe,
|
|
942
|
+
Divider: De,
|
|
943
|
+
Label: Ie,
|
|
944
|
+
Item: Me
|
|
1009
945
|
},
|
|
1010
946
|
Popover: {
|
|
1011
|
-
Root:
|
|
1012
|
-
Trigger:
|
|
1013
|
-
Content:
|
|
947
|
+
Root: Be,
|
|
948
|
+
Trigger: _e,
|
|
949
|
+
Content: $e
|
|
1014
950
|
}
|
|
1015
951
|
}
|
|
1016
|
-
},
|
|
952
|
+
}, ot = {
|
|
1017
953
|
// Removes button press effect
|
|
1018
954
|
activeClassName: ""
|
|
1019
|
-
},
|
|
1020
|
-
const { className: n, theme: t, ...
|
|
955
|
+
}, dt = (e) => {
|
|
956
|
+
const { className: n, theme: t, ...o } = e, r = Q(), s = X(), l = (r == null ? void 0 : r.colorSchemePreference) || s, a = F(
|
|
1021
957
|
(c) => {
|
|
1022
958
|
if (c && (be(c), typeof t == "object")) {
|
|
1023
959
|
if ("light" in t && "dark" in t) {
|
|
1024
|
-
|
|
960
|
+
D(
|
|
1025
961
|
t[l === "dark" ? "dark" : "light"],
|
|
1026
962
|
c
|
|
1027
963
|
);
|
|
1028
964
|
return;
|
|
1029
965
|
}
|
|
1030
|
-
|
|
966
|
+
D(t, c);
|
|
1031
967
|
return;
|
|
1032
968
|
}
|
|
1033
969
|
},
|
|
1034
970
|
[l, t]
|
|
1035
971
|
);
|
|
1036
|
-
return /* @__PURE__ */ i(
|
|
1037
|
-
|
|
972
|
+
return /* @__PURE__ */ i(Y.Provider, { value: nt, children: /* @__PURE__ */ i(
|
|
973
|
+
le,
|
|
1038
974
|
{
|
|
1039
|
-
theme:
|
|
975
|
+
theme: ot,
|
|
1040
976
|
cssVariablesSelector: ".bn-mantine",
|
|
1041
977
|
getRootElement: () => {
|
|
1042
978
|
},
|
|
1043
979
|
children: /* @__PURE__ */ i(
|
|
1044
|
-
|
|
980
|
+
ee,
|
|
1045
981
|
{
|
|
1046
|
-
className:
|
|
982
|
+
className: J("bn-mantine", n || ""),
|
|
1047
983
|
theme: typeof t == "object" ? void 0 : t,
|
|
1048
|
-
...
|
|
984
|
+
...o,
|
|
1049
985
|
ref: a
|
|
1050
986
|
}
|
|
1051
987
|
)
|
|
@@ -1053,12 +989,12 @@ const q = ae(void 0), Ne = b((e, n) => {
|
|
|
1053
989
|
) });
|
|
1054
990
|
};
|
|
1055
991
|
export {
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
992
|
+
dt as BlockNoteView,
|
|
993
|
+
D as applyBlockNoteCSSVariablesFromTheme,
|
|
994
|
+
nt as components,
|
|
995
|
+
ut as darkDefaultTheme,
|
|
1060
996
|
m as defaultColorScheme,
|
|
1061
|
-
|
|
997
|
+
j as lightDefaultTheme,
|
|
1062
998
|
be as removeBlockNoteCSSVariables
|
|
1063
999
|
};
|
|
1064
1000
|
//# sourceMappingURL=blocknote-mantine.js.map
|