@blocknote/mantine 0.19.0 → 0.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
1
  import { jsx as i, jsxs as S } from "react/jsx-runtime";
2
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
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 v, Tabs as w, LoadingOverlay as te, Button as x, FileInput as ne, Popover as re, PopoverTarget as oe, 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";
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
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 P, useFocusWithin as me, useFocusTrap as ge } from "@mantine/hooks";
6
+ import { mergeRefs as T, useFocusWithin as me, useFocusTrap as ge } from "@mantine/hooks";
7
7
  const G = (e, n, t = !1) => {
8
- const r = [];
9
- function o(s, l = "--bn") {
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())) : o(s[a], u);
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 o(e), r;
15
+ return r(e), o;
16
16
  }, D = (e, n) => G(e, n), fe = {
17
17
  colors: {
18
18
  editor: {
@@ -83,18 +83,18 @@ const G = (e, n, t = !1) => {
83
83
  },
84
84
  borderRadius: void 0,
85
85
  fontFamily: void 0
86
- }, be = (e) => G(fe, e, !0), ve = g((e, n) => {
86
+ }, be = (e) => G(fe, e, !0), pe = g((e, n) => {
87
87
  const {
88
88
  className: t,
89
- name: r,
90
- label: o,
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
96
  onChange: f,
97
- onSubmit: p,
97
+ onSubmit: v,
98
98
  ...h
99
99
  } = e;
100
100
  return d(h), /* @__PURE__ */ i(
@@ -103,8 +103,8 @@ const G = (e, n, t = !1) => {
103
103
  size: "xs",
104
104
  className: t,
105
105
  ref: n,
106
- name: r,
107
- label: o,
106
+ name: o,
107
+ label: r,
108
108
  leftSection: s,
109
109
  value: l,
110
110
  autoFocus: a,
@@ -112,7 +112,7 @@ const G = (e, n, t = !1) => {
112
112
  placeholder: c,
113
113
  onKeyDown: u,
114
114
  onChange: f,
115
- onSubmit: p
115
+ onSubmit: v
116
116
  }
117
117
  );
118
118
  });
@@ -122,24 +122,24 @@ var H = {
122
122
  className: void 0,
123
123
  style: void 0,
124
124
  attr: void 0
125
- }, I = y.createContext && /* @__PURE__ */ y.createContext(H), pe = ["attr", "size", "title"];
125
+ }, R = y.createContext && /* @__PURE__ */ y.createContext(H), ve = ["attr", "size", "title"];
126
126
  function he(e, n) {
127
127
  if (e == null) return {};
128
- var t = ye(e, n), r, o;
128
+ var t = ye(e, n), o, r;
129
129
  if (Object.getOwnPropertySymbols) {
130
130
  var s = Object.getOwnPropertySymbols(e);
131
- for (o = 0; o < s.length; o++)
132
- r = s[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
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
136
  function ye(e, n) {
137
137
  if (e == null) return {};
138
138
  var t = {};
139
- for (var r in e)
140
- if (Object.prototype.hasOwnProperty.call(e, r)) {
141
- if (n.indexOf(r) >= 0) continue;
142
- t[r] = e[r];
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
  }
@@ -147,29 +147,29 @@ function k() {
147
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 r in t)
151
- Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
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 R(e, n) {
156
+ function I(e, n) {
157
157
  var t = Object.keys(e);
158
158
  if (Object.getOwnPropertySymbols) {
159
- var r = Object.getOwnPropertySymbols(e);
160
- n && (r = r.filter(function(o) {
161
- return Object.getOwnPropertyDescriptor(e, o).enumerable;
162
- })), t.push.apply(t, r);
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
- function T(e) {
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 ? R(Object(t), !0).forEach(function(r) {
170
- Se(e, r, t[r]);
171
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : R(Object(t)).forEach(function(r) {
172
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
169
+ n % 2 ? I(Object(t), !0).forEach(function(o) {
170
+ Se(e, o, t[o]);
171
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : I(Object(t)).forEach(function(o) {
172
+ Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
173
173
  });
174
174
  }
175
175
  return e;
@@ -185,36 +185,36 @@ 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 r = t.call(e, n || "default");
189
- if (typeof r != "object") return r;
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__ */ y.createElement(n.tag, T({
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
199
  function U(e) {
200
200
  return (n) => /* @__PURE__ */ y.createElement(Ne, k({
201
- attr: T({}, e.attr)
201
+ attr: P({}, e.attr)
202
202
  }, n), K(e.child));
203
203
  }
204
204
  function Ne(e) {
205
205
  var n = (t) => {
206
206
  var {
207
- attr: r,
208
- size: o,
207
+ attr: o,
208
+ size: r,
209
209
  title: s
210
- } = e, l = he(e, pe), a = o || t.size || "1em", c;
210
+ } = e, l = he(e, ve), a = r || t.size || "1em", c;
211
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, r, l, {
215
+ }, t.attr, o, l, {
216
216
  className: c,
217
- style: T(T({
217
+ style: P(P({
218
218
  color: e.color || t.color
219
219
  }, t.style), e.style),
220
220
  height: a,
@@ -222,7 +222,7 @@ function Ne(e) {
222
222
  xmlns: "http://www.w3.org/2000/svg"
223
223
  }), s && /* @__PURE__ */ y.createElement("title", null, s), e.children);
224
224
  };
225
- return I !== void 0 ? /* @__PURE__ */ y.createElement(I.Consumer, null, (t) => n(t)) : n(H);
225
+ return R !== void 0 ? /* @__PURE__ */ y.createElement(R.Consumer, null, (t) => n(t)) : n(H);
226
226
  }
227
227
  function Ce(e) {
228
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);
@@ -230,17 +230,17 @@ function Ce(e) {
230
230
  function ke(e) {
231
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 W = ce(void 0), Te = g((e, n) => {
233
+ const W = ce(void 0), Pe = g((e, n) => {
234
234
  const {
235
235
  children: t,
236
- onOpenChange: r,
237
- position: o,
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] = ue(!1), u = C(null), f = C(), p = F(() => {
243
+ const [a, c] = ue(!1), u = C(null), f = C(), v = F(() => {
244
244
  f.current && clearTimeout(f.current), f.current = setTimeout(() => {
245
245
  c(!1);
246
246
  }, 250);
@@ -252,15 +252,15 @@ const W = ce(void 0), Te = g((e, n) => {
252
252
  {
253
253
  value: {
254
254
  onMenuMouseOver: h,
255
- onMenuMouseLeave: p
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
- ref: P(n, u),
261
+ ref: T(n, u),
262
262
  onMouseOver: h,
263
- onMouseLeave: p,
263
+ onMouseLeave: v,
264
264
  children: /* @__PURE__ */ i(
265
265
  b,
266
266
  {
@@ -270,9 +270,9 @@ const W = ce(void 0), Te = g((e, n) => {
270
270
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
271
271
  trigger: "hover",
272
272
  opened: a,
273
- onClose: () => r == null ? void 0 : r(!1),
274
- onOpen: () => r == null ? void 0 : r(!0),
275
- position: o,
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,34 +280,44 @@ const W = ce(void 0), Te = g((e, n) => {
280
280
  )
281
281
  }
282
282
  );
283
- }), Pe = (e) => {
284
- const { children: n, onOpenChange: t, position: r, sub: o, ...s } = e;
285
- return d(s), o ? /* @__PURE__ */ i(Te, { ...e }) : /* @__PURE__ */ i(
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
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: r,
292
+ position: o,
293
293
  children: n
294
294
  }
295
295
  );
296
296
  }, Me = g((e, n) => {
297
- const { className: t, children: r, icon: o, checked: s, subTrigger: l, onClick: a, ...c } = e;
298
- return d(c, !1), l ? /* @__PURE__ */ S("div", { ref: n, ...c, children: [
299
- r,
300
- /* @__PURE__ */ i(ke, { size: 15 })
301
- ] }) : /* @__PURE__ */ i(
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(
302
312
  b.Item,
303
313
  {
304
314
  className: t,
305
315
  ref: n,
306
- leftSection: o,
316
+ leftSection: r,
307
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: r
320
+ children: o
311
321
  }
312
322
  );
313
323
  }), Fe = (e) => {
@@ -315,14 +325,14 @@ const W = ce(void 0), Te = g((e, n) => {
315
325
  children: n,
316
326
  sub: t,
317
327
  // unused
318
- ...r
328
+ ...o
319
329
  } = e;
320
- return d(r), /* @__PURE__ */ i(b.Target, { children: n });
330
+ return d(o), /* @__PURE__ */ i(b.Target, { children: n });
321
331
  }, Oe = g((e, n) => {
322
332
  const {
323
333
  className: t,
324
- children: r,
325
- sub: o,
334
+ children: o,
335
+ sub: r,
326
336
  //unused
327
337
  ...s
328
338
  } = e;
@@ -335,34 +345,34 @@ const W = ce(void 0), Te = g((e, n) => {
335
345
  ref: n,
336
346
  onMouseOver: l == null ? void 0 : l.onMenuMouseOver,
337
347
  onMouseLeave: l == null ? void 0 : l.onMenuMouseLeave,
338
- children: r
348
+ children: o
339
349
  }
340
350
  );
341
351
  }), De = g((e, n) => {
342
- const { className: t, ...r } = e;
343
- return d(r), /* @__PURE__ */ i(b.Divider, { className: t, ref: n });
344
- }), Ie = g((e, n) => {
345
- const { className: t, children: r, ...o } = e;
346
- return d(o), /* @__PURE__ */ i(b.Label, { className: t, ref: n, children: r });
352
+ const { className: t, ...o } = e;
353
+ return d(o), /* @__PURE__ */ i(b.Divider, { className: t, ref: n });
347
354
  }), Re = 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
+ }), Ie = g((e, n) => {
348
358
  const {
349
359
  className: t,
350
- tabs: r,
351
- defaultOpenTab: o,
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(v, { className: t, ref: n, children: /* @__PURE__ */ S(
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: o,
371
+ defaultValue: r,
362
372
  onChange: l,
363
373
  children: [
364
374
  a && /* @__PURE__ */ i(te, { visible: a }),
365
- /* @__PURE__ */ i(w.List, { children: r.map((u) => /* @__PURE__ */ i(
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,12 +381,12 @@ const W = ce(void 0), Te = g((e, n) => {
371
381
  },
372
382
  u.name
373
383
  )) }),
374
- r.map((u) => /* @__PURE__ */ i(w.Panel, { value: u.name, children: u.tabPanel }, u.name))
384
+ o.map((u) => /* @__PURE__ */ i(w.Panel, { value: u.name, children: u.tabPanel }, u.name))
375
385
  ]
376
386
  }
377
387
  ) });
378
388
  }), Le = g((e, n) => {
379
- const { className: t, children: r, onClick: o, label: s, ...l } = e;
389
+ const { className: t, children: o, onClick: r, label: s, ...l } = e;
380
390
  return d(l), /* @__PURE__ */ i(
381
391
  x,
382
392
  {
@@ -384,31 +394,31 @@ const W = ce(void 0), Te = g((e, n) => {
384
394
  "aria-label": s,
385
395
  className: t,
386
396
  ref: n,
387
- onClick: o,
397
+ onClick: r,
388
398
  ...l,
389
- children: r
399
+ children: o
390
400
  }
391
401
  );
392
402
  }), Ee = g((e, n) => {
393
- const { className: t, accept: r, value: o, placeholder: s, onChange: l, ...a } = e;
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: r,
401
- value: o,
410
+ accept: o,
411
+ value: r,
402
412
  placeholder: s,
403
413
  onChange: l,
404
414
  ...a
405
415
  }
406
416
  );
407
417
  }), je = g((e, n) => {
408
- const { className: t, children: r, ...o } = e;
409
- return d(o), /* @__PURE__ */ i("div", { className: t, ref: n, children: r });
418
+ const { className: t, children: o, ...r } = e;
419
+ return d(r), /* @__PURE__ */ i("div", { className: t, ref: n, children: o });
410
420
  }), ze = g((e, n) => {
411
- const { className: t, value: r, placeholder: o, onKeyDown: s, onChange: l, ...a } = e;
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,54 +426,45 @@ const W = ce(void 0), Te = g((e, n) => {
416
426
  "data-test": "embed-input",
417
427
  className: t,
418
428
  ref: n,
419
- value: r,
420
- placeholder: o,
429
+ value: o,
430
+ placeholder: r,
421
431
  onKeyDown: s,
422
432
  onChange: l
423
433
  }
424
434
  );
425
435
  }), Be = (e) => {
426
- const { children: n, opened: t, position: r, ...o } = e;
427
- return d(o), /* @__PURE__ */ i(
428
- re,
429
- {
430
- withinPortal: !1,
431
- zIndex: 1e4,
432
- opened: t,
433
- position: r,
434
- children: n
435
- }
436
- );
436
+ const { children: n, opened: t, position: o, ...r } = e;
437
+ return d(r), /* @__PURE__ */ i(oe, { withinPortal: !1, opened: t, position: o, children: n });
437
438
  }, _e = (e) => {
438
439
  const { children: n, ...t } = e;
439
- return d(t), /* @__PURE__ */ i(oe, { children: n });
440
+ return d(t), /* @__PURE__ */ i(re, { children: n });
440
441
  }, $e = g((e, n) => {
441
442
  const {
442
443
  className: t,
443
- children: r,
444
- variant: o,
444
+ children: o,
445
+ variant: r,
445
446
  // unused
446
447
  ...s
447
448
  } = e;
448
- return d(s), /* @__PURE__ */ i(se, { className: t, ref: n, children: r });
449
+ return d(s), /* @__PURE__ */ i(se, { className: t, ref: n, children: o });
449
450
  }), Ve = g((e, n) => {
450
- const { className: t, children: r, ...o } = e;
451
- return d(o, !1), /* @__PURE__ */ i(
452
- v,
451
+ const { className: t, children: o, ...r } = e;
452
+ return d(r, !1), /* @__PURE__ */ i(
453
+ p,
453
454
  {
454
455
  align: "center",
455
456
  gap: 0,
456
457
  className: t,
457
458
  ref: n,
458
- ...o,
459
- children: r
459
+ ...r,
460
+ children: o
460
461
  }
461
462
  );
462
463
  }), Ae = g((e, n) => {
463
464
  const {
464
465
  className: t,
465
- children: r,
466
- icon: o,
466
+ children: o,
467
+ icon: r,
467
468
  onClick: s,
468
469
  onDragEnd: l,
469
470
  onDragStart: a,
@@ -471,7 +472,7 @@ const W = ce(void 0), Te = g((e, n) => {
471
472
  label: u,
472
473
  ...f
473
474
  } = e;
474
- return d(f, !1), o ? /* @__PURE__ */ i(
475
+ return d(f, !1), r ? /* @__PURE__ */ i(
475
476
  $,
476
477
  {
477
478
  size: 24,
@@ -483,7 +484,7 @@ const W = ce(void 0), Te = g((e, n) => {
483
484
  draggable: c,
484
485
  "aria-label": u,
485
486
  ...f,
486
- children: o
487
+ children: r
487
488
  }
488
489
  ) : /* @__PURE__ */ i(
489
490
  x,
@@ -496,115 +497,115 @@ const W = ce(void 0), Te = g((e, n) => {
496
497
  draggable: c,
497
498
  "aria-label": u,
498
499
  ...f,
499
- children: r
500
+ children: o
500
501
  }
501
502
  );
502
503
  }), Ge = g((e, n) => {
503
- const { className: t, children: r, id: o, columns: s, ...l } = e;
504
+ const { className: t, children: o, id: r, columns: s, ...l } = e;
504
505
  return d(l), /* @__PURE__ */ i(
505
506
  "div",
506
507
  {
507
508
  className: t,
508
509
  style: { gridTemplateColumns: `repeat(${s}, 1fr)` },
509
510
  ref: n,
510
- id: o,
511
+ id: r,
511
512
  role: "grid",
512
- children: r
513
+ children: o
513
514
  }
514
515
  );
515
516
  }), He = g((e, n) => {
516
- const { className: t, children: r, columns: o, ...s } = e;
517
+ const { className: t, children: o, columns: r, ...s } = e;
517
518
  return d(s), /* @__PURE__ */ i(
518
- v,
519
+ p,
519
520
  {
520
521
  className: t,
521
- style: { gridColumn: `1 / ${o + 1}` },
522
+ style: { gridColumn: `1 / ${r + 1}` },
522
523
  ref: n,
523
- children: /* @__PURE__ */ i(v, { className: "bn-mt-suggestion-menu-item-title", children: r })
524
+ children: /* @__PURE__ */ i(p, { className: "bn-mt-suggestion-menu-item-title", children: o })
524
525
  }
525
526
  );
526
527
  }), Ke = g((e, n) => {
527
- const { className: t, isSelected: r, onClick: o, item: s, id: l, ...a } = e;
528
+ const { className: t, isSelected: o, onClick: r, item: s, id: l, ...a } = e;
528
529
  d(a);
529
530
  const c = C(null);
530
531
  return A(() => {
531
- if (!c.current || !r)
532
+ if (!c.current || !o)
532
533
  return;
533
534
  const u = z(
534
535
  c.current,
535
536
  document.querySelector(".bn-grid-suggestion-menu")
536
537
  );
537
538
  u === "top" ? c.current.scrollIntoView(!0) : u === "bottom" && c.current.scrollIntoView(!1);
538
- }, [r]), /* @__PURE__ */ i(
539
+ }, [o]), /* @__PURE__ */ i(
539
540
  "div",
540
541
  {
541
542
  className: t,
542
- ref: P(n, c),
543
+ ref: T(n, c),
543
544
  id: l,
544
545
  role: "option",
545
- onClick: o,
546
- "aria-selected": r || void 0,
546
+ onClick: r,
547
+ "aria-selected": o || void 0,
547
548
  children: s.icon
548
549
  }
549
550
  );
550
551
  }), Ue = g((e, n) => {
551
552
  const {
552
553
  className: t,
553
- children: r,
554
+ children: o,
554
555
  // unused, using "dots" instead
555
- columns: o,
556
+ columns: r,
556
557
  ...s
557
558
  } = e;
558
559
  return d(s), /* @__PURE__ */ i(
559
560
  V,
560
561
  {
561
562
  className: t,
562
- style: { gridColumn: `1 / ${o + 1}` },
563
+ style: { gridColumn: `1 / ${r + 1}` },
563
564
  type: "dots",
564
565
  ref: n
565
566
  }
566
567
  );
567
568
  }), We = g((e, n) => {
568
- const { className: t, children: r, id: o, ...s } = e;
569
+ const { className: t, children: o, id: r, ...s } = e;
569
570
  return d(s), /* @__PURE__ */ i(
570
571
  O,
571
572
  {
572
573
  gap: 0,
573
574
  className: t,
574
575
  ref: n,
575
- id: o,
576
+ id: r,
576
577
  role: "listbox",
577
- children: r
578
+ children: o
578
579
  }
579
580
  );
580
581
  }), qe = g((e, n) => {
581
- const { className: t, children: r, ...o } = e;
582
- return d(o), /* @__PURE__ */ i(v, { className: t, ref: n, children: /* @__PURE__ */ i(v, { className: "bn-mt-suggestion-menu-item-title", children: r }) });
582
+ const { className: t, children: o, ...r } = e;
583
+ return d(r), /* @__PURE__ */ i(p, { className: t, ref: n, children: /* @__PURE__ */ i(p, { className: "bn-mt-suggestion-menu-item-title", children: o }) });
583
584
  }), Ze = g((e, n) => {
584
- const { className: t, isSelected: r, onClick: o, item: s, id: l, ...a } = e;
585
+ const { className: t, isSelected: o, onClick: r, item: s, id: l, ...a } = e;
585
586
  d(a);
586
587
  const c = C(null);
587
588
  return A(() => {
588
- if (!c.current || !r)
589
+ if (!c.current || !o)
589
590
  return;
590
591
  const u = z(
591
592
  c.current,
592
593
  document.querySelector(".bn-suggestion-menu")
593
594
  );
594
595
  u === "top" ? c.current.scrollIntoView(!0) : u === "bottom" && c.current.scrollIntoView(!1);
595
- }, [r]), /* @__PURE__ */ S(
596
- v,
596
+ }, [o]), /* @__PURE__ */ S(
597
+ p,
597
598
  {
598
599
  gap: 0,
599
600
  className: t,
600
- ref: P(n, c),
601
+ ref: T(n, c),
601
602
  id: l,
602
603
  role: "option",
603
- onClick: o,
604
- "aria-selected": r || void 0,
604
+ onClick: r,
605
+ "aria-selected": o || void 0,
605
606
  children: [
606
607
  s.icon && /* @__PURE__ */ i(
607
- v,
608
+ p,
608
609
  {
609
610
  className: "bn-mt-suggestion-menu-item-section",
610
611
  "data-position": "left",
@@ -616,7 +617,7 @@ const W = ce(void 0), Te = g((e, n) => {
616
617
  /* @__PURE__ */ i(N, { className: "bn-mt-suggestion-menu-item-subtitle", children: s.subtext })
617
618
  ] }),
618
619
  s.badge && /* @__PURE__ */ i(
619
- v,
620
+ p,
620
621
  {
621
622
  "data-position": "right",
622
623
  className: "bn-mt-suggestion-menu-item-section",
@@ -627,21 +628,21 @@ const W = ce(void 0), Te = g((e, n) => {
627
628
  }
628
629
  );
629
630
  }), Je = g((e, n) => {
630
- const { className: t, children: r, ...o } = e;
631
- return d(o), /* @__PURE__ */ i(v, { className: t, ref: n, children: r });
631
+ const { className: t, children: o, ...r } = e;
632
+ return d(r), /* @__PURE__ */ i(p, { className: t, ref: n, children: o });
632
633
  }), Qe = g((e, n) => {
633
634
  const {
634
635
  className: t,
635
- children: r,
636
+ children: o,
636
637
  // unused, using "dots" instead
637
- ...o
638
+ ...r
638
639
  } = e;
639
- return d(o), /* @__PURE__ */ i(V, { className: t, type: "dots", ref: n });
640
+ return d(r), /* @__PURE__ */ i(V, { className: t, type: "dots", ref: n });
640
641
  }), Xe = g((e, n) => {
641
642
  const {
642
643
  className: t,
643
- children: r,
644
- draggable: o,
644
+ children: o,
645
+ draggable: r,
645
646
  onDragStart: s,
646
647
  onDragEnd: l,
647
648
  style: a,
@@ -654,22 +655,22 @@ const W = ce(void 0), Te = g((e, n) => {
654
655
  className: t,
655
656
  ref: n,
656
657
  "aria-label": c,
657
- draggable: o,
658
+ draggable: r,
658
659
  onDragStart: s,
659
660
  onDragEnd: l,
660
661
  style: a,
661
662
  ...u,
662
- children: r
663
+ children: o
663
664
  }
664
665
  );
665
666
  }), Ye = g((e, n) => {
666
- const { children: t, className: r, onMouseDown: o, onClick: s, ...l } = e;
667
+ const { children: t, className: o, onMouseDown: r, onClick: s, ...l } = e;
667
668
  return d(l, !1), /* @__PURE__ */ i(
668
669
  x,
669
670
  {
670
- className: r,
671
+ className: o,
671
672
  ref: n,
672
- onMouseDown: o,
673
+ onMouseDown: r,
673
674
  onClick: s,
674
675
  ...l,
675
676
  children: t
@@ -677,18 +678,18 @@ const W = ce(void 0), Te = g((e, n) => {
677
678
  );
678
679
  }), L = g(
679
680
  (e, n) => {
680
- const { className: t, children: r, onMouseEnter: o, onMouseLeave: s, ...l } = e;
681
+ const { className: t, children: o, onMouseEnter: r, onMouseLeave: s, ...l } = e;
681
682
  d(l);
682
- const { ref: a, focused: c } = me(), u = ge(c), f = P(n, a, u);
683
+ const { ref: a, focused: c } = me(), u = ge(c), f = T(n, a, u);
683
684
  return /* @__PURE__ */ i(
684
- v,
685
+ p,
685
686
  {
686
687
  className: t,
687
688
  ref: f,
688
689
  role: "toolbar",
689
- onMouseEnter: o,
690
+ onMouseEnter: r,
690
691
  onMouseLeave: s,
691
- children: r
692
+ children: o
692
693
  }
693
694
  );
694
695
  }
@@ -699,28 +700,28 @@ const W = ce(void 0), Te = g((e, n) => {
699
700
  (e, n) => {
700
701
  const {
701
702
  className: t,
702
- children: r,
703
- mainTooltip: o,
703
+ children: o,
704
+ mainTooltip: r,
704
705
  secondaryTooltip: s,
705
706
  icon: l,
706
707
  isSelected: a,
707
708
  isDisabled: c,
708
709
  onClick: u,
709
710
  label: f,
710
- ...p
711
+ ...v
711
712
  } = e;
712
- return d(p, !1), /* @__PURE__ */ i(
713
+ return d(v, !1), /* @__PURE__ */ i(
713
714
  ae,
714
715
  {
715
716
  withinPortal: !1,
716
717
  label: /* @__PURE__ */ i(
717
718
  et,
718
719
  {
719
- mainTooltip: o,
720
+ mainTooltip: r,
720
721
  secondaryTooltip: s
721
722
  }
722
723
  ),
723
- children: r ? /* @__PURE__ */ i(
724
+ children: o ? /* @__PURE__ */ i(
724
725
  x,
725
726
  {
726
727
  "aria-label": f,
@@ -731,12 +732,12 @@ const W = ce(void 0), Te = g((e, n) => {
731
732
  onClick: u,
732
733
  "aria-pressed": a,
733
734
  "data-selected": a || void 0,
734
- "data-test": o.slice(0, 1).toLowerCase() + o.replace(/\s+/g, "").slice(1),
735
+ "data-test": r.slice(0, 1).toLowerCase() + r.replace(/\s+/g, "").slice(1),
735
736
  size: "xs",
736
737
  disabled: c || !1,
737
738
  ref: n,
738
- ...p,
739
- children: r
739
+ ...v,
740
+ children: o
740
741
  }
741
742
  ) : /* @__PURE__ */ i(
742
743
  $,
@@ -749,11 +750,11 @@ const W = ce(void 0), Te = g((e, n) => {
749
750
  onClick: u,
750
751
  "aria-pressed": a,
751
752
  "data-selected": a || void 0,
752
- "data-test": o.slice(0, 1).toLowerCase() + o.replace(/\s+/g, "").slice(1),
753
+ "data-test": r.slice(0, 1).toLowerCase() + r.replace(/\s+/g, "").slice(1),
753
754
  size: 30,
754
755
  disabled: c || !1,
755
756
  ref: n,
756
- ...p,
757
+ ...v,
757
758
  children: l
758
759
  }
759
760
  )
@@ -761,9 +762,9 @@ const W = ce(void 0), Te = g((e, n) => {
761
762
  );
762
763
  }
763
764
  ), tt = g((e, n) => {
764
- const { className: t, items: r, isDisabled: o, ...s } = e;
765
+ const { className: t, items: o, isDisabled: r, ...s } = e;
765
766
  d(s);
766
- const l = r.filter((a) => a.isSelected)[0];
767
+ const l = o.filter((a) => a.isSelected)[0];
767
768
  return l ? /* @__PURE__ */ S(
768
769
  b,
769
770
  {
@@ -771,7 +772,7 @@ const W = ce(void 0), Te = g((e, n) => {
771
772
  transitionProps: {
772
773
  exitDuration: 0
773
774
  },
774
- disabled: o,
775
+ disabled: r,
775
776
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
776
777
  children: [
777
778
  /* @__PURE__ */ i(b.Target, { children: /* @__PURE__ */ i(
@@ -784,11 +785,11 @@ const W = ce(void 0), Te = g((e, n) => {
784
785
  rightSection: /* @__PURE__ */ i(Ce, {}),
785
786
  size: "xs",
786
787
  variant: "subtle",
787
- disabled: o,
788
+ disabled: r,
788
789
  children: l.text
789
790
  }
790
791
  ) }),
791
- /* @__PURE__ */ i(b.Dropdown, { className: t, ref: n, children: r.map((a) => /* @__PURE__ */ i(
792
+ /* @__PURE__ */ i(b.Dropdown, { className: t, ref: n, children: o.map((a) => /* @__PURE__ */ i(
792
793
  b.Item,
793
794
  {
794
795
  onClick: a.onClick,
@@ -889,7 +890,7 @@ const W = ce(void 0), Te = g((e, n) => {
889
890
  Select: tt
890
891
  },
891
892
  FilePanel: {
892
- Root: Re,
893
+ Root: Ie,
893
894
  Button: Le,
894
895
  FileInput: Ee,
895
896
  TabPanel: je,
@@ -923,14 +924,14 @@ const W = ce(void 0), Te = g((e, n) => {
923
924
  Generic: {
924
925
  Form: {
925
926
  Root: (e) => /* @__PURE__ */ i("div", { children: e.children }),
926
- TextInput: ve
927
+ TextInput: pe
927
928
  },
928
929
  Menu: {
929
- Root: Pe,
930
+ Root: Te,
930
931
  Trigger: Fe,
931
932
  Dropdown: Oe,
932
933
  Divider: De,
933
- Label: Ie,
934
+ Label: Re,
934
935
  Item: Me
935
936
  },
936
937
  Popover: {
@@ -939,11 +940,11 @@ const W = ce(void 0), Te = g((e, n) => {
939
940
  Content: $e
940
941
  }
941
942
  }
942
- }, rt = {
943
+ }, ot = {
943
944
  // Removes button press effect
944
945
  activeClassName: ""
945
946
  }, dt = (e) => {
946
- const { className: n, theme: t, ...r } = e, o = Q(), s = X(), l = (o == null ? void 0 : o.colorSchemePreference) || s, a = F(
947
+ const { className: n, theme: t, ...o } = e, r = Q(), s = X(), l = (r == null ? void 0 : r.colorSchemePreference) || s, a = F(
947
948
  (c) => {
948
949
  if (c && (be(c), typeof t == "object")) {
949
950
  if ("light" in t && "dark" in t) {
@@ -962,7 +963,7 @@ const W = ce(void 0), Te = g((e, n) => {
962
963
  return /* @__PURE__ */ i(Y.Provider, { value: nt, children: /* @__PURE__ */ i(
963
964
  le,
964
965
  {
965
- theme: rt,
966
+ theme: ot,
966
967
  cssVariablesSelector: ".bn-mantine",
967
968
  getRootElement: () => {
968
969
  },
@@ -971,7 +972,7 @@ const W = ce(void 0), Te = g((e, n) => {
971
972
  {
972
973
  className: J("bn-mantine", n || ""),
973
974
  theme: typeof t == "object" ? void 0 : t,
974
- ...r,
975
+ ...o,
975
976
  ref: a
976
977
  }
977
978
  )