@blocknote/shadcn 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/blocknote-shadcn.js +203 -203
  2. package/dist/blocknote-shadcn.js.map +1 -1
  3. package/dist/blocknote-shadcn.umd.cjs +2 -2
  4. package/dist/blocknote-shadcn.umd.cjs.map +1 -1
  5. package/dist/webpack-stats.json +1 -1
  6. package/package.json +7 -5
  7. package/src/ShadCNComponentsContext.tsx +12 -12
  8. package/src/components/ui/badge.tsx +2 -2
  9. package/src/components/ui/button.tsx +2 -2
  10. package/src/components/ui/card.tsx +4 -4
  11. package/src/components/ui/dropdown-menu.tsx +8 -8
  12. package/src/components/ui/form.tsx +7 -7
  13. package/src/components/ui/input.tsx +1 -1
  14. package/src/components/ui/label.tsx +2 -2
  15. package/src/components/ui/popover.tsx +3 -3
  16. package/src/components/ui/select.tsx +8 -8
  17. package/src/components/ui/tabs.tsx +3 -3
  18. package/src/components/ui/toggle.tsx +2 -2
  19. package/src/components/ui/tooltip.tsx +3 -3
  20. package/src/form/Form.tsx +1 -1
  21. package/src/form/TextInput.tsx +1 -1
  22. package/src/index.tsx +27 -27
  23. package/src/menu/Menu.tsx +3 -3
  24. package/src/panel/Panel.tsx +2 -2
  25. package/src/panel/PanelButton.tsx +1 -1
  26. package/src/panel/PanelFileInput.tsx +1 -1
  27. package/src/panel/PanelTab.tsx +1 -1
  28. package/src/panel/PanelTextInput.tsx +2 -2
  29. package/src/popover/popover.tsx +2 -2
  30. package/src/sideMenu/SideMenuButton.tsx +2 -2
  31. package/src/suggestionMenu/SuggestionMenu.tsx +1 -1
  32. package/src/suggestionMenu/SuggestionMenuEmptyItem.tsx +1 -1
  33. package/src/suggestionMenu/SuggestionMenuItem.tsx +2 -2
  34. package/src/suggestionMenu/SuggestionMenuLabel.tsx +1 -1
  35. package/src/tableHandle/TableHandle.tsx +2 -2
  36. package/src/toolbar/Toolbar.tsx +2 -2
  37. package/types/src/ShadCNComponentsContext.d.ts +13 -13
  38. package/types/src/components/ui/badge.d.ts +2 -2
  39. package/types/src/components/ui/button.d.ts +2 -2
  40. package/types/src/components/ui/card.d.ts +1 -1
  41. package/types/src/components/ui/dropdown-menu.d.ts +2 -2
  42. package/types/src/components/ui/form.d.ts +2 -2
  43. package/types/src/components/ui/label.d.ts +2 -2
  44. package/types/src/components/ui/popover.d.ts +2 -2
  45. package/types/src/components/ui/select.d.ts +2 -2
  46. package/types/src/components/ui/tabs.d.ts +2 -2
  47. package/types/src/components/ui/toggle.d.ts +3 -3
  48. package/types/src/components/ui/tooltip.d.ts +2 -2
  49. package/types/src/index.d.ts +1 -1
@@ -1,14 +1,14 @@
1
1
  import * as p from "react";
2
- import ze, { createContext as lt, useContext as dt, forwardRef as C, useRef as We, useEffect as Ye, useMemo as Ue } from "react";
2
+ import ze, { createContext as lt, useContext as dt, forwardRef as C, useMemo as We, useRef as Ye, useEffect as Ue } from "react";
3
3
  import { assertEmpty as y, mergeCSSClasses as ct } from "@blocknote/core";
4
4
  import { elementOverflow as Ge, mergeRefs as Ke, ComponentsContext as ut, BlockNoteViewRaw as bt } from "@blocknote/react";
5
+ import { FormProvider as ft, useFormContext as mt, useForm as pt } from "react-hook-form";
5
6
  import { cva as Q } from "class-variance-authority";
6
- import { clsx as ft } from "clsx";
7
- import { extendTailwindMerge as mt } from "tailwind-merge";
7
+ import { clsx as gt } from "clsx";
8
+ import { extendTailwindMerge as vt } from "tailwind-merge";
8
9
  import { Slot as qe } from "@radix-ui/react-slot";
9
10
  import * as T from "@radix-ui/react-dropdown-menu";
10
- import { ChevronRight as Je, Check as He, Circle as pt, ChevronDown as Xe, ChevronUp as gt } from "lucide-react";
11
- import { FormProvider as vt, useFormContext as xt, useForm as ht } from "react-hook-form";
11
+ import { ChevronRight as Je, Check as He, Circle as xt, ChevronDown as Xe, ChevronUp as ht } from "lucide-react";
12
12
  import * as Ze from "@radix-ui/react-label";
13
13
  import * as ee from "@radix-ui/react-popover";
14
14
  import * as D from "@radix-ui/react-select";
@@ -645,11 +645,11 @@ React keys must be passed directly to JSX without using spread:
645
645
  }
646
646
  process.env.NODE_ENV === "production" ? ue.exports = yt() : ue.exports = wt();
647
647
  var a = ue.exports;
648
- const Ct = mt({
648
+ const Ct = vt({
649
649
  prefix: "bn-"
650
650
  });
651
651
  function b(...r) {
652
- return Ct(ft(r));
652
+ return Ct(gt(r));
653
653
  }
654
654
  const Nt = Q(
655
655
  "bn-inline-flex bn-items-center bn-rounded-full bn-border bn-px-2.5 bn-py-0.5 bn-text-xs bn-font-semibold bn-transition-colors focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2",
@@ -846,7 +846,7 @@ const Mt = p.forwardRef(({ className: r, children: t, ...n }, o) => /* @__PURE__
846
846
  ),
847
847
  ...n,
848
848
  children: [
849
- /* @__PURE__ */ a.jsx("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a.jsx(T.ItemIndicator, { children: /* @__PURE__ */ a.jsx(pt, { className: "bn-h-2 bn-w-2 bn-fill-current" }) }) }),
849
+ /* @__PURE__ */ a.jsx("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a.jsx(T.ItemIndicator, { children: /* @__PURE__ */ a.jsx(xt, { className: "bn-h-2 bn-w-2 bn-fill-current" }) }) }),
850
850
  t
851
851
  ]
852
852
  }
@@ -885,10 +885,10 @@ const kt = Q(
885
885
  }
886
886
  ));
887
887
  be.displayName = Ze.Root.displayName;
888
- const Ft = vt, Ot = p.createContext(
888
+ const Ft = ft, Ot = p.createContext(
889
889
  {}
890
890
  ), ne = () => {
891
- const r = p.useContext(Ot), t = p.useContext(un), { getFieldState: n, formState: o } = xt(), s = n(r.name, o);
891
+ const r = p.useContext(Ot), t = p.useContext(un), { getFieldState: n, formState: o } = mt(), s = n(r.name, o);
892
892
  if (!r)
893
893
  throw new Error("useFormField should be used within <FormField>");
894
894
  const { id: d } = t;
@@ -1018,7 +1018,7 @@ const pn = p.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ a.jsx(
1018
1018
  r
1019
1019
  ),
1020
1020
  ...t,
1021
- children: /* @__PURE__ */ a.jsx(gt, { className: "bn-h-4 bn-w-4" })
1021
+ children: /* @__PURE__ */ a.jsx(ht, { className: "bn-h-4 bn-w-4" })
1022
1022
  }
1023
1023
  ));
1024
1024
  pn.displayName = D.ScrollUpButton.displayName;
@@ -1246,74 +1246,56 @@ function R() {
1246
1246
  const er = (r) => {
1247
1247
  const { children: t, ...n } = r;
1248
1248
  y(n);
1249
- const o = R(), s = ht();
1249
+ const o = R(), s = pt();
1250
1250
  return /* @__PURE__ */ a.jsx(o.Form.Form, { ...s, children: t });
1251
1251
  }, nr = C((r, t) => {
1252
- const { className: n, children: o, id: s, columns: d, ...c } = r;
1253
- return y(c), /* @__PURE__ */ a.jsx(
1254
- "div",
1255
- {
1256
- className: n,
1257
- style: { gridTemplateColumns: `repeat(${d}, 1fr)` },
1258
- ref: t,
1259
- id: s,
1260
- role: "grid",
1261
- children: o
1262
- }
1263
- );
1264
- }), tr = C((r, t) => {
1265
- const { className: n, children: o, columns: s, ...d } = r;
1266
- return y(d), /* @__PURE__ */ a.jsx(
1267
- "div",
1268
- {
1269
- className: n,
1270
- style: { gridColumn: `1 / ${s + 1}` },
1271
- ref: t,
1272
- children: o
1273
- }
1274
- );
1275
- }), rr = C((r, t) => {
1276
- const { className: n, isSelected: o, onClick: s, item: d, id: c, ...v } = r;
1277
- y(v);
1278
- const f = We(null);
1279
- return Ye(() => {
1280
- if (!f.current || !o)
1281
- return;
1282
- const u = Ge(
1283
- f.current,
1284
- document.querySelector(".bn-grid-suggestion-menu")
1285
- );
1286
- u === "top" ? f.current.scrollIntoView(!0) : u === "bottom" && f.current.scrollIntoView(!1);
1287
- }, [o]), /* @__PURE__ */ a.jsx(
1288
- "div",
1289
- {
1290
- className: n,
1291
- ref: Ke([t, f]),
1292
- id: c,
1293
- role: "option",
1294
- onClick: s,
1295
- "aria-selected": o || void 0,
1296
- children: d.icon
1297
- }
1298
- );
1299
- }), or = C((r, t) => {
1300
1252
  const {
1301
1253
  className: n,
1302
- children: o,
1303
- // unused, using "dots" instead
1304
- columns: s,
1305
- ...d
1254
+ name: o,
1255
+ label: s,
1256
+ icon: d,
1257
+ // TODO: implement
1258
+ value: c,
1259
+ autoFocus: v,
1260
+ placeholder: f,
1261
+ onKeyDown: u,
1262
+ onChange: g,
1263
+ onSubmit: j,
1264
+ ..._
1306
1265
  } = r;
1307
- return y(d), /* @__PURE__ */ a.jsx(
1308
- "div",
1266
+ y(_);
1267
+ const F = R();
1268
+ return s ? /* @__PURE__ */ a.jsxs("div", { children: [
1269
+ /* @__PURE__ */ a.jsx(F.Label.Label, { htmlFor: s, children: s }),
1270
+ /* @__PURE__ */ a.jsx(
1271
+ F.Input.Input,
1272
+ {
1273
+ className: n,
1274
+ id: s,
1275
+ name: o,
1276
+ autoFocus: v,
1277
+ placeholder: f,
1278
+ value: c,
1279
+ onKeyDown: u,
1280
+ onChange: g,
1281
+ onSubmit: j
1282
+ }
1283
+ )
1284
+ ] }) : /* @__PURE__ */ a.jsx(
1285
+ F.Input.Input,
1309
1286
  {
1310
- className: n,
1311
- style: { gridColumn: `1 / ${s + 1}` },
1312
- ref: t,
1313
- children: o
1287
+ "aria-label": o,
1288
+ name: o,
1289
+ autoFocus: v,
1290
+ placeholder: f,
1291
+ value: c,
1292
+ onKeyDown: u,
1293
+ onChange: g,
1294
+ onSubmit: j,
1295
+ ref: t
1314
1296
  }
1315
1297
  );
1316
- }), ar = (r) => C(
1298
+ }), tr = (r) => C(
1317
1299
  (t, n) => /* @__PURE__ */ a.jsx(
1318
1300
  r,
1319
1301
  {
@@ -1328,7 +1310,7 @@ const er = (r) => {
1328
1310
  ref: n
1329
1311
  }
1330
1312
  )
1331
- ), sr = (r) => {
1313
+ ), rr = (r) => {
1332
1314
  const {
1333
1315
  children: t,
1334
1316
  onOpenChange: n,
@@ -1346,17 +1328,17 @@ const er = (r) => {
1346
1328
  children: t
1347
1329
  }
1348
1330
  ) : /* @__PURE__ */ a.jsx(c.DropdownMenu.DropdownMenu, { onOpenChange: n, children: t });
1349
- }, ir = (r) => {
1331
+ }, or = (r) => {
1350
1332
  const { children: t, sub: n, ...o } = r;
1351
1333
  y(o);
1352
- const s = R(), d = Ue(
1353
- () => ar(
1334
+ const s = R(), d = We(
1335
+ () => tr(
1354
1336
  s.DropdownMenu.DropdownMenuTrigger
1355
1337
  ),
1356
1338
  [s.DropdownMenu.DropdownMenuTrigger]
1357
1339
  );
1358
1340
  return n ? /* @__PURE__ */ a.jsx(s.DropdownMenu.DropdownMenuSubTrigger, { children: t }) : /* @__PURE__ */ a.jsx(d, { asChild: !0, ...o, children: t });
1359
- }, lr = C((r, t) => {
1341
+ }, ar = C((r, t) => {
1360
1342
  const { className: n, children: o, sub: s, ...d } = r;
1361
1343
  y(d);
1362
1344
  const c = R();
@@ -1375,7 +1357,7 @@ const er = (r) => {
1375
1357
  children: o
1376
1358
  }
1377
1359
  );
1378
- }), dr = C((r, t) => {
1360
+ }), sr = C((r, t) => {
1379
1361
  const { className: n, children: o, icon: s, checked: d, subTrigger: c, onClick: v, ...f } = r;
1380
1362
  y(f);
1381
1363
  const u = R();
@@ -1409,7 +1391,7 @@ const er = (r) => {
1409
1391
  ]
1410
1392
  }
1411
1393
  );
1412
- }), cr = C((r, t) => {
1394
+ }), ir = C((r, t) => {
1413
1395
  const { className: n, ...o } = r;
1414
1396
  y(o);
1415
1397
  const s = R();
@@ -1420,7 +1402,7 @@ const er = (r) => {
1420
1402
  ref: t
1421
1403
  }
1422
1404
  );
1423
- }), ur = C((r, t) => {
1405
+ }), lr = C((r, t) => {
1424
1406
  const { className: n, children: o, ...s } = r;
1425
1407
  y(s);
1426
1408
  const d = R();
@@ -1432,7 +1414,7 @@ const er = (r) => {
1432
1414
  children: o
1433
1415
  }
1434
1416
  );
1435
- }), br = C((r, t) => {
1417
+ }), dr = C((r, t) => {
1436
1418
  const {
1437
1419
  className: n,
1438
1420
  tabs: o,
@@ -1459,38 +1441,7 @@ const er = (r) => {
1459
1441
  ]
1460
1442
  }
1461
1443
  );
1462
- }), fr = C((r, t) => {
1463
- const { className: n, children: o, onClick: s, label: d, ...c } = r;
1464
- y(c);
1465
- const v = R();
1466
- return /* @__PURE__ */ a.jsx(
1467
- v.Button.Button,
1468
- {
1469
- type: "submit",
1470
- className: n,
1471
- "aria-label": d,
1472
- ref: t,
1473
- onClick: s,
1474
- children: o
1475
- }
1476
- );
1477
- }), mr = C((r, t) => {
1478
- const { className: n, accept: o, value: s, placeholder: d, onChange: c, ...v } = r;
1479
- y(v);
1480
- const f = R();
1481
- return /* @__PURE__ */ a.jsx(
1482
- f.Input.Input,
1483
- {
1484
- type: "file",
1485
- className: n,
1486
- ref: t,
1487
- accept: o,
1488
- value: s ? s.name : void 0,
1489
- onChange: async (u) => c == null ? void 0 : c(u.target.files[0]),
1490
- placeholder: d
1491
- }
1492
- );
1493
- }), pr = C((r, t) => {
1444
+ }), cr = C((r, t) => {
1494
1445
  const { className: n, children: o, ...s } = r;
1495
1446
  return y(s), /* @__PURE__ */ a.jsx(
1496
1447
  "div",
@@ -1503,7 +1454,7 @@ const er = (r) => {
1503
1454
  children: o
1504
1455
  }
1505
1456
  );
1506
- }), gr = C((r, t) => {
1457
+ }), ur = C((r, t) => {
1507
1458
  const { className: n, value: o, placeholder: s, onKeyDown: d, onChange: c, ...v } = r;
1508
1459
  y(v);
1509
1460
  const f = R();
@@ -1519,7 +1470,7 @@ const er = (r) => {
1519
1470
  onChange: c
1520
1471
  }
1521
1472
  );
1522
- }), vr = (r) => {
1473
+ }), br = (r) => {
1523
1474
  const {
1524
1475
  children: t,
1525
1476
  opened: n,
@@ -1530,14 +1481,14 @@ const er = (r) => {
1530
1481
  y(s);
1531
1482
  const d = R();
1532
1483
  return /* @__PURE__ */ a.jsx(d.Popover.Popover, { open: n, children: t });
1533
- }, xr = C(
1484
+ }, fr = C(
1534
1485
  (r, t) => {
1535
1486
  const { children: n, ...o } = r;
1536
1487
  y(o);
1537
1488
  const s = R();
1538
1489
  return /* @__PURE__ */ a.jsx(s.Popover.PopoverTrigger, { ref: t, asChild: !0, children: n });
1539
1490
  }
1540
- ), hr = C((r, t) => {
1491
+ ), mr = C((r, t) => {
1541
1492
  const { className: n, variant: o, children: s, ...d } = r;
1542
1493
  y(d);
1543
1494
  const c = R();
@@ -1554,10 +1505,10 @@ const er = (r) => {
1554
1505
  children: s
1555
1506
  }
1556
1507
  );
1557
- }), yr = C((r, t) => {
1508
+ }), pr = C((r, t) => {
1558
1509
  const { className: n, children: o, ...s } = r;
1559
1510
  return y(s, !1), /* @__PURE__ */ a.jsx("div", { className: n, ref: t, ...s, children: o });
1560
- }), wr = C((r, t) => {
1511
+ }), gr = C((r, t) => {
1561
1512
  const {
1562
1513
  className: n,
1563
1514
  children: o,
@@ -1589,7 +1540,31 @@ const er = (r) => {
1589
1540
  ]
1590
1541
  }
1591
1542
  );
1592
- }), Cr = C((r, t) => {
1543
+ }), vr = C((r, t) => {
1544
+ const { className: n, children: o, id: s, columns: d, ...c } = r;
1545
+ return y(c), /* @__PURE__ */ a.jsx(
1546
+ "div",
1547
+ {
1548
+ className: n,
1549
+ style: { gridTemplateColumns: `repeat(${d}, 1fr)` },
1550
+ ref: t,
1551
+ id: s,
1552
+ role: "grid",
1553
+ children: o
1554
+ }
1555
+ );
1556
+ }), xr = C((r, t) => {
1557
+ const { className: n, children: o, columns: s, ...d } = r;
1558
+ return y(d), /* @__PURE__ */ a.jsx(
1559
+ "div",
1560
+ {
1561
+ className: n,
1562
+ style: { gridColumn: `1 / ${s + 1}` },
1563
+ ref: t,
1564
+ children: o
1565
+ }
1566
+ );
1567
+ }), hr = C((r, t) => {
1593
1568
  const { className: n, children: o, id: s, ...d } = r;
1594
1569
  return y(d), /* @__PURE__ */ a.jsx(
1595
1570
  "div",
@@ -1604,7 +1579,7 @@ const er = (r) => {
1604
1579
  children: o
1605
1580
  }
1606
1581
  );
1607
- }), Nr = C((r, t) => {
1582
+ }), yr = C((r, t) => {
1608
1583
  const { className: n, children: o, ...s } = r;
1609
1584
  return y(s), /* @__PURE__ */ a.jsx(
1610
1585
  "div",
@@ -1617,11 +1592,11 @@ const er = (r) => {
1617
1592
  children: /* @__PURE__ */ a.jsx("div", { children: o })
1618
1593
  }
1619
1594
  );
1620
- }), jr = C((r, t) => {
1595
+ }), wr = C((r, t) => {
1621
1596
  const n = R(), { className: o, item: s, isSelected: d, onClick: c, id: v, ...f } = r;
1622
1597
  y(f);
1623
- const u = We(null);
1624
- return Ye(() => {
1598
+ const u = Ye(null);
1599
+ return Ue(() => {
1625
1600
  if (!u.current || !d)
1626
1601
  return;
1627
1602
  const g = Ge(
@@ -1651,7 +1626,7 @@ const er = (r) => {
1651
1626
  ]
1652
1627
  }
1653
1628
  );
1654
- }), Sr = C((r, t) => {
1629
+ }), Cr = C((r, t) => {
1655
1630
  const { className: n, children: o, ...s } = r;
1656
1631
  return y(s), /* @__PURE__ */ a.jsx(
1657
1632
  "div",
@@ -1661,10 +1636,10 @@ const er = (r) => {
1661
1636
  children: o
1662
1637
  }
1663
1638
  );
1664
- }), Tr = C((r, t) => {
1639
+ }), Nr = C((r, t) => {
1665
1640
  const { className: n, children: o, ...s } = r;
1666
1641
  return y(s), /* @__PURE__ */ a.jsx("div", { className: n, ref: t, children: o });
1667
- }), Rr = C((r, t) => {
1642
+ }), jr = C((r, t) => {
1668
1643
  const {
1669
1644
  className: n,
1670
1645
  children: o,
@@ -1692,53 +1667,6 @@ const er = (r) => {
1692
1667
  children: o
1693
1668
  }
1694
1669
  );
1695
- }), Er = C((r, t) => {
1696
- const {
1697
- className: n,
1698
- name: o,
1699
- label: s,
1700
- icon: d,
1701
- // TODO: implement
1702
- value: c,
1703
- autoFocus: v,
1704
- placeholder: f,
1705
- onKeyDown: u,
1706
- onChange: g,
1707
- onSubmit: j,
1708
- ..._
1709
- } = r;
1710
- y(_);
1711
- const F = R();
1712
- return s ? /* @__PURE__ */ a.jsxs("div", { children: [
1713
- /* @__PURE__ */ a.jsx(F.Label.Label, { htmlFor: s, children: s }),
1714
- /* @__PURE__ */ a.jsx(
1715
- F.Input.Input,
1716
- {
1717
- className: n,
1718
- id: s,
1719
- name: o,
1720
- autoFocus: v,
1721
- placeholder: f,
1722
- value: c,
1723
- onKeyDown: u,
1724
- onChange: g,
1725
- onSubmit: j
1726
- }
1727
- )
1728
- ] }) : /* @__PURE__ */ a.jsx(
1729
- F.Input.Input,
1730
- {
1731
- "aria-label": o,
1732
- name: o,
1733
- autoFocus: v,
1734
- placeholder: f,
1735
- value: c,
1736
- onKeyDown: u,
1737
- onChange: g,
1738
- onSubmit: j,
1739
- ref: t
1740
- }
1741
- );
1742
1670
  }), $e = C(
1743
1671
  (r, t) => {
1744
1672
  const { className: n, children: o, onMouseEnter: s, onMouseLeave: d, ...c } = r;
@@ -1823,7 +1751,7 @@ const er = (r) => {
1823
1751
  )
1824
1752
  ] });
1825
1753
  }
1826
- ), Dr = C((r, t) => {
1754
+ ), Sr = C((r, t) => {
1827
1755
  const { className: n, items: o, isDisabled: s, ...d } = r;
1828
1756
  y(d);
1829
1757
  const c = R(), v = (u) => /* @__PURE__ */ a.jsxs("div", { className: "bn-flex bn-gap-1 bn-items-center", children: [
@@ -1853,64 +1781,136 @@ const er = (r) => {
1853
1781
  ]
1854
1782
  }
1855
1783
  ) : null;
1784
+ }), Tr = C((r, t) => {
1785
+ const { className: n, children: o, onClick: s, label: d, ...c } = r;
1786
+ y(c);
1787
+ const v = R();
1788
+ return /* @__PURE__ */ a.jsx(
1789
+ v.Button.Button,
1790
+ {
1791
+ type: "submit",
1792
+ className: n,
1793
+ "aria-label": d,
1794
+ ref: t,
1795
+ onClick: s,
1796
+ children: o
1797
+ }
1798
+ );
1799
+ }), Rr = C((r, t) => {
1800
+ const { className: n, accept: o, value: s, placeholder: d, onChange: c, ...v } = r;
1801
+ y(v);
1802
+ const f = R();
1803
+ return /* @__PURE__ */ a.jsx(
1804
+ f.Input.Input,
1805
+ {
1806
+ type: "file",
1807
+ className: n,
1808
+ ref: t,
1809
+ accept: o,
1810
+ value: s ? s.name : void 0,
1811
+ onChange: async (u) => c == null ? void 0 : c(u.target.files[0]),
1812
+ placeholder: d
1813
+ }
1814
+ );
1815
+ }), Er = C((r, t) => {
1816
+ const { className: n, isSelected: o, onClick: s, item: d, id: c, ...v } = r;
1817
+ y(v);
1818
+ const f = Ye(null);
1819
+ return Ue(() => {
1820
+ if (!f.current || !o)
1821
+ return;
1822
+ const u = Ge(
1823
+ f.current,
1824
+ document.querySelector(".bn-grid-suggestion-menu")
1825
+ );
1826
+ u === "top" ? f.current.scrollIntoView(!0) : u === "bottom" && f.current.scrollIntoView(!1);
1827
+ }, [o]), /* @__PURE__ */ a.jsx(
1828
+ "div",
1829
+ {
1830
+ className: n,
1831
+ ref: Ke([t, f]),
1832
+ id: c,
1833
+ role: "option",
1834
+ onClick: s,
1835
+ "aria-selected": o || void 0,
1836
+ children: d.icon
1837
+ }
1838
+ );
1839
+ }), Dr = C((r, t) => {
1840
+ const {
1841
+ className: n,
1842
+ children: o,
1843
+ // unused, using "dots" instead
1844
+ columns: s,
1845
+ ...d
1846
+ } = r;
1847
+ return y(d), /* @__PURE__ */ a.jsx(
1848
+ "div",
1849
+ {
1850
+ className: n,
1851
+ style: { gridColumn: `1 / ${s + 1}` },
1852
+ ref: t,
1853
+ children: o
1854
+ }
1855
+ );
1856
1856
  }), _r = {
1857
1857
  FormattingToolbar: {
1858
1858
  Root: $e,
1859
1859
  Button: Ae,
1860
- Select: Dr
1860
+ Select: Sr
1861
1861
  },
1862
1862
  FilePanel: {
1863
- Root: br,
1864
- Button: fr,
1865
- FileInput: mr,
1866
- TabPanel: pr,
1867
- TextInput: gr
1863
+ Root: dr,
1864
+ Button: Tr,
1865
+ FileInput: Rr,
1866
+ TabPanel: cr,
1867
+ TextInput: ur
1868
1868
  },
1869
1869
  LinkToolbar: {
1870
1870
  Root: $e,
1871
1871
  Button: Ae
1872
1872
  },
1873
1873
  SideMenu: {
1874
- Root: yr,
1875
- Button: wr
1874
+ Root: pr,
1875
+ Button: gr
1876
1876
  },
1877
1877
  SuggestionMenu: {
1878
- Root: Cr,
1879
- Item: jr,
1880
- EmptyItem: Nr,
1881
- Label: Sr,
1882
- Loader: Tr
1878
+ Root: hr,
1879
+ Item: wr,
1880
+ EmptyItem: yr,
1881
+ Label: Cr,
1882
+ Loader: Nr
1883
1883
  },
1884
1884
  GridSuggestionMenu: {
1885
- Root: nr,
1886
- Item: rr,
1887
- EmptyItem: tr,
1888
- Loader: or
1885
+ Root: vr,
1886
+ Item: Er,
1887
+ EmptyItem: xr,
1888
+ Loader: Dr
1889
1889
  },
1890
1890
  TableHandle: {
1891
- Root: Rr
1891
+ Root: jr
1892
1892
  },
1893
1893
  Generic: {
1894
1894
  Form: {
1895
1895
  Root: er,
1896
- TextInput: Er
1896
+ TextInput: nr
1897
1897
  },
1898
1898
  Menu: {
1899
- Root: sr,
1900
- Trigger: ir,
1901
- Dropdown: lr,
1902
- Divider: cr,
1903
- Label: ur,
1904
- Item: dr
1899
+ Root: rr,
1900
+ Trigger: or,
1901
+ Dropdown: ar,
1902
+ Divider: ir,
1903
+ Label: lr,
1904
+ Item: sr
1905
1905
  },
1906
1906
  Popover: {
1907
- Root: vr,
1908
- Trigger: xr,
1909
- Content: hr
1907
+ Root: br,
1908
+ Trigger: fr,
1909
+ Content: mr
1910
1910
  }
1911
1911
  }
1912
1912
  }, $r = (r) => {
1913
- const { className: t, shadCNComponents: n, ...o } = r, s = Ue(() => ({
1913
+ const { className: t, shadCNComponents: n, ...o } = r, s = We(() => ({
1914
1914
  ...Qt,
1915
1915
  ...n
1916
1916
  }), [n]);