@krak-stack/registry 0.1.27 → 0.1.29

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 (52) hide show
  1. package/dist/components/ui/code-block.js +1 -5
  2. package/dist/components/ui/copy-button.js +1 -5
  3. package/dist/components/ui/data-table.js +239 -242
  4. package/dist/components/ui/editing-locale-switcher.js +1 -5
  5. package/dist/components/ui/effect-form.js +170 -175
  6. package/dist/components/ui/error-component.d.ts +30 -0
  7. package/dist/components/ui/error-component.js +811 -0
  8. package/dist/components/ui/file-picker.js +1 -5
  9. package/dist/components/ui/form.js +113 -118
  10. package/dist/components/ui/google-map.js +1 -5
  11. package/dist/components/ui/icon-input.js +41 -48
  12. package/dist/components/ui/loading.js +1 -5
  13. package/dist/components/ui/locale-switcher.js +1 -5
  14. package/dist/components/ui/pagination.js +3 -7
  15. package/dist/components/ui/search-menu.js +1 -5
  16. package/dist/components/ui/sidebar-layout.js +67 -76
  17. package/dist/components/ui/stats-card.js +1 -5
  18. package/dist/components/ui/theme-switcher.js +4 -8
  19. package/dist/components/ui/virtualized-combobox.js +32 -39
  20. package/dist/lib/docs.js +134 -143
  21. package/dist/lib/docs.server.js +24 -49
  22. package/dist/lib/documentation-toolkit.js +25 -50
  23. package/dist/lib/httpapi-cli.js +7 -7
  24. package/dist/lib/httpapi-client.js +3 -3
  25. package/dist/lib/httpapi-helpers.js +11 -11
  26. package/dist/lib/httpapi-mcp.js +2 -2
  27. package/dist/lib/httpapi-toolkit.js +2 -2
  28. package/dist/lib/query.d.ts +16 -6
  29. package/dist/lib/query.js +17 -8
  30. package/dist/lib/seo.js +2 -2
  31. package/dist/lib/utils.d.ts +1 -2
  32. package/dist/lib/webfetch-toolkit.js +6 -6
  33. package/dist/services/agent/client/index.js +130 -133
  34. package/dist/services/agent/index.d.ts +4 -0
  35. package/dist/services/agent/index.js +1 -1
  36. package/dist/services/agent/schema.d.ts +6 -0
  37. package/dist/services/agent/schema.js +6 -5
  38. package/dist/services/file-extraction/index.js +4 -4
  39. package/dist/services/file-extraction/schema.js +2 -2
  40. package/dist/services/health/index.js +9 -9
  41. package/dist/services/notification/channels/ses/index.js +2 -2
  42. package/dist/services/notification/channels/ses/schema.js +2 -2
  43. package/dist/services/notification/client/index.js +6 -10
  44. package/dist/services/notification/index.js +2 -2
  45. package/dist/services/notification/persistence/drizzle.js +2 -2
  46. package/dist/services/notification/persistence/index.js +15 -15
  47. package/dist/services/notification/persistence/schema.js +12 -12
  48. package/dist/services/notification/public.js +8 -12
  49. package/dist/services/notification/schema.js +2 -2
  50. package/dist/services/s3/index.js +2 -2
  51. package/dist/services/s3/schema.js +2 -2
  52. package/package.json +7 -4
@@ -40,11 +40,7 @@ import { useRender } from "@base-ui/react/use-render";
40
40
  import { cva } from "class-variance-authority";
41
41
 
42
42
  // ../../src/lib/utils.ts
43
- import { clsx } from "clsx";
44
- import { twMerge } from "tailwind-merge";
45
- function cn(...inputs) {
46
- return twMerge(clsx(inputs));
47
- }
43
+ import { cn } from "cn";
48
44
 
49
45
  // ../../src/components/ui/badge.tsx
50
46
  var badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
@@ -1457,14 +1453,9 @@ import {
1457
1453
 
1458
1454
  // ../../src/components/ui/input-group.tsx
1459
1455
  import { cva as cva3 } from "class-variance-authority";
1460
-
1461
- // ../../src/components/ui/textarea.tsx
1462
1456
  import { jsx as jsx15 } from "react/jsx-runtime";
1463
-
1464
- // ../../src/components/ui/input-group.tsx
1465
- import { jsx as jsx16 } from "react/jsx-runtime";
1466
1457
  function InputGroup({ className, ...props }) {
1467
- return /* @__PURE__ */ jsx16("div", {
1458
+ return /* @__PURE__ */ jsx15("div", {
1468
1459
  "data-slot": "input-group",
1469
1460
  role: "group",
1470
1461
  className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
@@ -1497,7 +1488,7 @@ function InputGroupInput({
1497
1488
  className,
1498
1489
  ...props
1499
1490
  }) {
1500
- return /* @__PURE__ */ jsx16(Input, {
1491
+ return /* @__PURE__ */ jsx15(Input, {
1501
1492
  "data-slot": "input-group-control",
1502
1493
  className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
1503
1494
  ...props
@@ -1505,7 +1496,7 @@ function InputGroupInput({
1505
1496
  }
1506
1497
 
1507
1498
  // ../../src/components/ui/virtualized-combobox.tsx
1508
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
1499
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1509
1500
  "use client";
1510
1501
  var messages2 = {
1511
1502
  en: {
@@ -1581,19 +1572,19 @@ var VirtualizedComboboxList = ({
1581
1572
  virtualizer.measure();
1582
1573
  }, [virtualizer]);
1583
1574
  if (filteredItems.length === 0) {
1584
- return /* @__PURE__ */ jsx17("div", {
1575
+ return /* @__PURE__ */ jsx16("div", {
1585
1576
  className: "text-muted-foreground py-6 text-center text-sm",
1586
1577
  children: emptyLabel
1587
1578
  });
1588
1579
  }
1589
- return /* @__PURE__ */ jsx17(ComboboxPrimitive.List, {
1580
+ return /* @__PURE__ */ jsx16(ComboboxPrimitive.List, {
1590
1581
  className: "scroll-py-1 overflow-auto overscroll-contain p-1",
1591
1582
  ref: handleScrollElementRef,
1592
1583
  style: {
1593
1584
  height: Math.min(virtualizer.getTotalSize() + 8, 288),
1594
1585
  maxHeight: "var(--available-height)"
1595
1586
  },
1596
- children: /* @__PURE__ */ jsx17("div", {
1587
+ children: /* @__PURE__ */ jsx16("div", {
1597
1588
  className: "relative w-full",
1598
1589
  role: "presentation",
1599
1590
  style: { height: virtualizer.getTotalSize() },
@@ -1606,9 +1597,9 @@ var VirtualizedComboboxList = ({
1606
1597
  transform: `translateY(${virtualItem.start}px)`
1607
1598
  };
1608
1599
  if (entry.kind === "group") {
1609
- return /* @__PURE__ */ jsx17(ComboboxPrimitive.Group, {
1600
+ return /* @__PURE__ */ jsx16(ComboboxPrimitive.Group, {
1610
1601
  className: "contents",
1611
- children: /* @__PURE__ */ jsx17(ComboboxPrimitive.GroupLabel, {
1602
+ children: /* @__PURE__ */ jsx16(ComboboxPrimitive.GroupLabel, {
1612
1603
  className: "text-muted-foreground absolute top-0 left-0 w-full px-2 pt-3 pb-1 text-xs",
1613
1604
  "data-index": virtualItem.index,
1614
1605
  ref: virtualizer.measureElement,
@@ -1627,13 +1618,13 @@ var VirtualizedComboboxList = ({
1627
1618
  style,
1628
1619
  value: entry.item,
1629
1620
  children: [
1630
- renderItem?.(entry.item) ?? /* @__PURE__ */ jsx17("span", {
1621
+ renderItem?.(entry.item) ?? /* @__PURE__ */ jsx16("span", {
1631
1622
  className: "min-w-0 truncate",
1632
1623
  children: entry.item.label
1633
1624
  }),
1634
- /* @__PURE__ */ jsx17(ComboboxPrimitive.ItemIndicator, {
1625
+ /* @__PURE__ */ jsx16(ComboboxPrimitive.ItemIndicator, {
1635
1626
  className: "absolute right-2 flex size-4 items-center justify-center",
1636
- children: /* @__PURE__ */ jsx17(Check, {})
1627
+ children: /* @__PURE__ */ jsx16(Check, {})
1637
1628
  })
1638
1629
  ]
1639
1630
  }, entry.item.value);
@@ -1652,8 +1643,8 @@ var VirtualizedComboboxContent = ({
1652
1643
  virtualizerRef
1653
1644
  }) => {
1654
1645
  const labels2 = virtualizedComboboxMessages(messageOverrides);
1655
- return /* @__PURE__ */ jsx17(ComboboxPrimitive.Portal, {
1656
- children: /* @__PURE__ */ jsx17(ComboboxPrimitive.Positioner, {
1646
+ return /* @__PURE__ */ jsx16(ComboboxPrimitive.Portal, {
1647
+ children: /* @__PURE__ */ jsx16(ComboboxPrimitive.Positioner, {
1657
1648
  align: "start",
1658
1649
  className: "isolate z-50",
1659
1650
  side: "bottom",
@@ -1661,17 +1652,17 @@ var VirtualizedComboboxContent = ({
1661
1652
  children: /* @__PURE__ */ jsxs8(ComboboxPrimitive.Popup, {
1662
1653
  className: cn("relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-in-95", contentClassName),
1663
1654
  children: [
1664
- /* @__PURE__ */ jsx17("div", {
1655
+ /* @__PURE__ */ jsx16("div", {
1665
1656
  className: "min-w-0 p-1 pb-0",
1666
- children: /* @__PURE__ */ jsx17(InputGroup, {
1657
+ children: /* @__PURE__ */ jsx16(InputGroup, {
1667
1658
  className: "border-input/30 bg-input/30 h-8 w-full min-w-0 shadow-none",
1668
- children: /* @__PURE__ */ jsx17(ComboboxPrimitive.Input, {
1659
+ children: /* @__PURE__ */ jsx16(ComboboxPrimitive.Input, {
1669
1660
  placeholder: labels2.search,
1670
- render: /* @__PURE__ */ jsx17(InputGroupInput, {})
1661
+ render: /* @__PURE__ */ jsx16(InputGroupInput, {})
1671
1662
  })
1672
1663
  })
1673
1664
  }),
1674
- /* @__PURE__ */ jsx17(VirtualizedComboboxList, {
1665
+ /* @__PURE__ */ jsx16(VirtualizedComboboxList, {
1675
1666
  emptyLabel,
1676
1667
  groupSelections,
1677
1668
  itemIndexRef,
@@ -1694,20 +1685,20 @@ var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /*
1694
1685
  type: "button",
1695
1686
  variant: "outline",
1696
1687
  children: [
1697
- /* @__PURE__ */ jsx17("span", {
1688
+ /* @__PURE__ */ jsx16("span", {
1698
1689
  className: "min-w-0 flex-1 truncate pr-7 text-left",
1699
1690
  children: label
1700
1691
  }),
1701
- /* @__PURE__ */ jsx17(ChevronsUpDown, {
1692
+ /* @__PURE__ */ jsx16(ChevronsUpDown, {
1702
1693
  className: "text-muted-foreground shrink-0 opacity-70"
1703
1694
  })
1704
1695
  ]
1705
1696
  });
1706
- var defaultClear = (label) => /* @__PURE__ */ jsx17(ComboboxPrimitive.Clear, {
1697
+ var defaultClear = (label) => /* @__PURE__ */ jsx16(ComboboxPrimitive.Clear, {
1707
1698
  "aria-label": label,
1708
1699
  className: "text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute top-1/2 right-7 z-10 flex size-6 -translate-y-1/2 items-center justify-center rounded-sm outline-none focus-visible:border focus-visible:ring-3",
1709
1700
  type: "button",
1710
- children: /* @__PURE__ */ jsx17(X, {
1701
+ children: /* @__PURE__ */ jsx16(X, {
1711
1702
  className: "size-3.5"
1712
1703
  })
1713
1704
  });
@@ -1746,13 +1737,13 @@ var VirtualizedComboboxSingle = (props) => {
1746
1737
  /* @__PURE__ */ jsxs8("div", {
1747
1738
  className: "relative",
1748
1739
  children: [
1749
- /* @__PURE__ */ jsx17(ComboboxPrimitive.Trigger, {
1740
+ /* @__PURE__ */ jsx16(ComboboxPrimitive.Trigger, {
1750
1741
  render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
1751
1742
  }),
1752
1743
  props.trigger ? null : defaultClear(labels2.clear)
1753
1744
  ]
1754
1745
  }),
1755
- /* @__PURE__ */ jsx17(VirtualizedComboboxContent, {
1746
+ /* @__PURE__ */ jsx16(VirtualizedComboboxContent, {
1756
1747
  ...props,
1757
1748
  groupSelections: false,
1758
1749
  itemIndexRef,
@@ -1788,13 +1779,13 @@ var VirtualizedComboboxMultiple = (props) => {
1788
1779
  /* @__PURE__ */ jsxs8("div", {
1789
1780
  className: "relative",
1790
1781
  children: [
1791
- /* @__PURE__ */ jsx17(ComboboxPrimitive.Trigger, {
1782
+ /* @__PURE__ */ jsx16(ComboboxPrimitive.Trigger, {
1792
1783
  render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
1793
1784
  }),
1794
1785
  props.trigger ? null : defaultClear(labels2.clear)
1795
1786
  ]
1796
1787
  }),
1797
- /* @__PURE__ */ jsx17(VirtualizedComboboxContent, {
1788
+ /* @__PURE__ */ jsx16(VirtualizedComboboxContent, {
1798
1789
  ...props,
1799
1790
  groupSelections: true,
1800
1791
  itemIndexRef,
@@ -1805,15 +1796,15 @@ var VirtualizedComboboxMultiple = (props) => {
1805
1796
  });
1806
1797
  };
1807
1798
  function VirtualizedCombobox(props) {
1808
- return props.multiple ? /* @__PURE__ */ jsx17(VirtualizedComboboxMultiple, {
1799
+ return props.multiple ? /* @__PURE__ */ jsx16(VirtualizedComboboxMultiple, {
1809
1800
  ...props
1810
- }) : /* @__PURE__ */ jsx17(VirtualizedComboboxSingle, {
1801
+ }) : /* @__PURE__ */ jsx16(VirtualizedComboboxSingle, {
1811
1802
  ...props
1812
1803
  });
1813
1804
  }
1814
1805
 
1815
1806
  // ../../src/components/ui/data-table.tsx
1816
- import { jsx as jsx18, jsxs as jsxs9, Fragment } from "react/jsx-runtime";
1807
+ import { jsx as jsx17, jsxs as jsxs9, Fragment } from "react/jsx-runtime";
1817
1808
  var DataTablePersistedUiStateSchema = Schema.Struct({
1818
1809
  columnVisibility: Schema.Record(Schema.String, Schema.Boolean),
1819
1810
  columnSizing: Schema.Record(Schema.String, Schema.Number),
@@ -2159,7 +2150,7 @@ var renderCell = (row, column) => {
2159
2150
  };
2160
2151
  const CellRenderer = column.colDef.cellRenderer;
2161
2152
  if (CellRenderer)
2162
- return /* @__PURE__ */ jsx18(CellRenderer, {
2153
+ return /* @__PURE__ */ jsx17(CellRenderer, {
2163
2154
  ...params
2164
2155
  });
2165
2156
  return column.colDef.valueFormatter?.(params) ?? (value === null || value === undefined ? null : String(value));
@@ -2207,30 +2198,30 @@ var DataTableRowActions = ({
2207
2198
  return null;
2208
2199
  return /* @__PURE__ */ jsxs9(DropdownMenu, {
2209
2200
  children: [
2210
- /* @__PURE__ */ jsx18(DropdownMenuTrigger, {
2201
+ /* @__PURE__ */ jsx17(DropdownMenuTrigger, {
2211
2202
  onClick: (event) => event.stopPropagation(),
2212
2203
  render: /* @__PURE__ */ jsxs9(Button, {
2213
2204
  className: "size-8 focus-visible:ring-inset [&_svg:not([class*='size-'])]:size-4",
2214
2205
  size: "icon",
2215
2206
  variant: "ghost",
2216
2207
  children: [
2217
- /* @__PURE__ */ jsx18("span", {
2208
+ /* @__PURE__ */ jsx17("span", {
2218
2209
  className: "sr-only",
2219
2210
  children: title
2220
2211
  }),
2221
- /* @__PURE__ */ jsx18(MoreHorizontal, {})
2212
+ /* @__PURE__ */ jsx17(MoreHorizontal, {})
2222
2213
  ]
2223
2214
  })
2224
2215
  }),
2225
- /* @__PURE__ */ jsx18(DropdownMenuContent, {
2216
+ /* @__PURE__ */ jsx17(DropdownMenuContent, {
2226
2217
  align: "end",
2227
2218
  className: "w-max",
2228
2219
  children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
2229
2220
  children: [
2230
- /* @__PURE__ */ jsx18(DropdownMenuLabel, {
2221
+ /* @__PURE__ */ jsx17(DropdownMenuLabel, {
2231
2222
  children: title
2232
2223
  }),
2233
- /* @__PURE__ */ jsx18(DropdownMenuSeparator, {}),
2224
+ /* @__PURE__ */ jsx17(DropdownMenuSeparator, {}),
2234
2225
  visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem, {
2235
2226
  onClick: (event) => {
2236
2227
  event.stopPropagation();
@@ -2268,7 +2259,7 @@ var DataTableRowActionMenu = ({
2268
2259
  reorderActions.push({
2269
2260
  id: "data-table-move-up",
2270
2261
  name: store.config.labels.moveUp,
2271
- icon: /* @__PURE__ */ jsx18(ArrowUp, {}),
2262
+ icon: /* @__PURE__ */ jsx17(ArrowUp, {}),
2272
2263
  onClick: () => move(rowIndex - 1)
2273
2264
  });
2274
2265
  }
@@ -2276,12 +2267,12 @@ var DataTableRowActionMenu = ({
2276
2267
  reorderActions.push({
2277
2268
  id: "data-table-move-down",
2278
2269
  name: store.config.labels.moveDown,
2279
- icon: /* @__PURE__ */ jsx18(ArrowDown, {}),
2270
+ icon: /* @__PURE__ */ jsx17(ArrowDown, {}),
2280
2271
  onClick: () => move(rowIndex + 1)
2281
2272
  });
2282
2273
  }
2283
2274
  }
2284
- return /* @__PURE__ */ jsx18(DataTableRowActions, {
2275
+ return /* @__PURE__ */ jsx17(DataTableRowActions, {
2285
2276
  actions: [...reorderActions, ...rowActions ? rowActions.items : []],
2286
2277
  row: row.data,
2287
2278
  title: rowActions?.label ?? store.config.labels.actions
@@ -2308,10 +2299,10 @@ var DataTableToolbar = ({
2308
2299
  features.search !== false ? /* @__PURE__ */ jsxs9("div", {
2309
2300
  className: "relative min-w-0",
2310
2301
  children: [
2311
- /* @__PURE__ */ jsx18(Search, {
2302
+ /* @__PURE__ */ jsx17(Search, {
2312
2303
  className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"
2313
2304
  }),
2314
- /* @__PURE__ */ jsx18(Input, {
2305
+ /* @__PURE__ */ jsx17(Input, {
2315
2306
  className: "px-9",
2316
2307
  onChange: (event) => update((state) => ({
2317
2308
  ...state,
@@ -2321,7 +2312,7 @@ var DataTableToolbar = ({
2321
2312
  placeholder: labels2.filter,
2322
2313
  value: store.state.globalFilter ?? ""
2323
2314
  }),
2324
- store.state.globalFilter ? /* @__PURE__ */ jsx18(Button, {
2315
+ store.state.globalFilter ? /* @__PURE__ */ jsx17(Button, {
2325
2316
  "aria-label": labels2.filter,
2326
2317
  className: "absolute top-1/2 right-1 size-7 -translate-y-1/2",
2327
2318
  onClick: () => update((state) => ({
@@ -2331,11 +2322,11 @@ var DataTableToolbar = ({
2331
2322
  })),
2332
2323
  size: "icon",
2333
2324
  variant: "ghost",
2334
- children: /* @__PURE__ */ jsx18(X2, {})
2325
+ children: /* @__PURE__ */ jsx17(X2, {})
2335
2326
  }) : null
2336
2327
  ]
2337
2328
  }) : null,
2338
- /* @__PURE__ */ jsx18("div", {
2329
+ /* @__PURE__ */ jsx17("div", {
2339
2330
  className: "-m-1 flex overflow-x-auto p-1",
2340
2331
  children: /* @__PURE__ */ jsxs9(Menubar, {
2341
2332
  className: "h-auto w-max min-w-full justify-start bg-transparent shadow-none [&_[data-slot=menubar-trigger]]:gap-2 [&_[data-slot=menubar-trigger]_svg]:size-4",
@@ -2346,22 +2337,22 @@ var DataTableToolbar = ({
2346
2337
  className: "bg-primary text-primary-foreground hover:bg-primary/90 aria-expanded:bg-primary/90",
2347
2338
  children: [
2348
2339
  labels2.selected,
2349
- /* @__PURE__ */ jsx18(Badge, {
2340
+ /* @__PURE__ */ jsx17(Badge, {
2350
2341
  variant: "secondary",
2351
2342
  children: selectedRows.length
2352
2343
  }),
2353
- /* @__PURE__ */ jsx18(ChevronDown, {})
2344
+ /* @__PURE__ */ jsx17(ChevronDown, {})
2354
2345
  ]
2355
2346
  }),
2356
- /* @__PURE__ */ jsx18(MenubarContent, {
2347
+ /* @__PURE__ */ jsx17(MenubarContent, {
2357
2348
  align: "end",
2358
2349
  className: "w-max",
2359
2350
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2360
2351
  children: [
2361
- /* @__PURE__ */ jsx18(MenubarLabel, {
2352
+ /* @__PURE__ */ jsx17(MenubarLabel, {
2362
2353
  children: bulkActions && bulkActions.label ? bulkActions.label : labels2.actions
2363
2354
  }),
2364
- /* @__PURE__ */ jsx18(MenubarSeparator, {}),
2355
+ /* @__PURE__ */ jsx17(MenubarSeparator, {}),
2365
2356
  visibleBulkActions.map((action) => /* @__PURE__ */ jsxs9(MenubarItem, {
2366
2357
  onClick: () => action.onClick(selectedRows),
2367
2358
  variant: action.variant,
@@ -2380,22 +2371,22 @@ var DataTableToolbar = ({
2380
2371
  /* @__PURE__ */ jsxs9(MenubarTrigger, {
2381
2372
  "aria-label": labels2.groupBy,
2382
2373
  children: [
2383
- /* @__PURE__ */ jsx18(Rows3, {}),
2384
- /* @__PURE__ */ jsx18("span", {
2374
+ /* @__PURE__ */ jsx17(Rows3, {}),
2375
+ /* @__PURE__ */ jsx17("span", {
2385
2376
  className: "hidden sm:inline",
2386
2377
  children: labels2.groupBy
2387
2378
  })
2388
2379
  ]
2389
2380
  }),
2390
- /* @__PURE__ */ jsx18(MenubarContent, {
2381
+ /* @__PURE__ */ jsx17(MenubarContent, {
2391
2382
  align: "end",
2392
2383
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2393
2384
  children: [
2394
- /* @__PURE__ */ jsx18(MenubarLabel, {
2385
+ /* @__PURE__ */ jsx17(MenubarLabel, {
2395
2386
  children: labels2.groupBy
2396
2387
  }),
2397
- /* @__PURE__ */ jsx18(MenubarSeparator, {}),
2398
- grouping.fields.map((field) => /* @__PURE__ */ jsx18(MenubarCheckboxItem, {
2388
+ /* @__PURE__ */ jsx17(MenubarSeparator, {}),
2389
+ grouping.fields.map((field) => /* @__PURE__ */ jsx17(MenubarCheckboxItem, {
2399
2390
  checked: store.state.grouping.includes(field.id),
2400
2391
  onCheckedChange: (checked) => update((state) => ({
2401
2392
  ...state,
@@ -2408,22 +2399,22 @@ var DataTableToolbar = ({
2408
2399
  })
2409
2400
  ]
2410
2401
  }) : null,
2411
- features.sorting !== false ? /* @__PURE__ */ jsx18(SortMenu, {
2402
+ features.sorting !== false ? /* @__PURE__ */ jsx17(SortMenu, {
2412
2403
  tableAtom
2413
2404
  }) : null,
2414
- features.gallery ? /* @__PURE__ */ jsx18(ViewMenu, {
2405
+ features.gallery ? /* @__PURE__ */ jsx17(ViewMenu, {
2415
2406
  tableAtom
2416
2407
  }) : null,
2417
- features.columnVisibility !== false ? /* @__PURE__ */ jsx18(ColumnMenu, {
2408
+ features.columnVisibility !== false ? /* @__PURE__ */ jsx17(ColumnMenu, {
2418
2409
  tableAtom
2419
2410
  }) : null,
2420
- features.refresh ? /* @__PURE__ */ jsx18(MenubarMenu, {
2411
+ features.refresh ? /* @__PURE__ */ jsx17(MenubarMenu, {
2421
2412
  children: /* @__PURE__ */ jsxs9(MenubarTrigger, {
2422
2413
  "aria-label": labels2.refresh,
2423
2414
  onClick: features.refresh,
2424
2415
  children: [
2425
- /* @__PURE__ */ jsx18(RefreshCw, {}),
2426
- /* @__PURE__ */ jsx18("span", {
2416
+ /* @__PURE__ */ jsx17(RefreshCw, {}),
2417
+ /* @__PURE__ */ jsx17("span", {
2427
2418
  className: "hidden sm:inline",
2428
2419
  children: labels2.refresh
2429
2420
  })
@@ -2436,25 +2427,25 @@ var DataTableToolbar = ({
2436
2427
  "aria-label": labels2.export,
2437
2428
  disabled: !exportRows.length,
2438
2429
  children: [
2439
- /* @__PURE__ */ jsx18(Download, {}),
2440
- /* @__PURE__ */ jsx18("span", {
2430
+ /* @__PURE__ */ jsx17(Download, {}),
2431
+ /* @__PURE__ */ jsx17("span", {
2441
2432
  className: "hidden sm:inline",
2442
2433
  children: labels2.export
2443
2434
  })
2444
2435
  ]
2445
2436
  }),
2446
- /* @__PURE__ */ jsx18(MenubarContent, {
2437
+ /* @__PURE__ */ jsx17(MenubarContent, {
2447
2438
  align: "end",
2448
2439
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2449
2440
  children: [
2450
- /* @__PURE__ */ jsx18(MenubarLabel, {
2441
+ /* @__PURE__ */ jsx17(MenubarLabel, {
2451
2442
  children: labels2.export
2452
2443
  }),
2453
- /* @__PURE__ */ jsx18(MenubarSeparator, {}),
2444
+ /* @__PURE__ */ jsx17(MenubarSeparator, {}),
2454
2445
  /* @__PURE__ */ jsxs9(MenubarItem, {
2455
2446
  onClick: () => downloadCsv(model.visibleColumns.map(columnLabel), exportRows.map((row) => model.visibleColumns.map((column) => String(row.values.get(column.id) ?? ""))), features.export ? features.export.baseName : "table"),
2456
2447
  children: [
2457
- /* @__PURE__ */ jsx18(FileText, {}),
2448
+ /* @__PURE__ */ jsx17(FileText, {}),
2458
2449
  labels2.exportCsv
2459
2450
  ]
2460
2451
  }),
@@ -2464,7 +2455,7 @@ var DataTableToolbar = ({
2464
2455
  row.values.get(column.id)
2465
2456
  ]))), features.export ? features.export.baseName : "table"),
2466
2457
  children: [
2467
- /* @__PURE__ */ jsx18(FileJson, {}),
2458
+ /* @__PURE__ */ jsx17(FileJson, {}),
2468
2459
  labels2.exportJson
2469
2460
  ]
2470
2461
  })
@@ -2497,14 +2488,14 @@ var SortMenu = ({
2497
2488
  /* @__PURE__ */ jsxs9(MenubarTrigger, {
2498
2489
  "aria-label": store.config.labels.sortBy,
2499
2490
  children: [
2500
- current ? current.direction === "desc" ? /* @__PURE__ */ jsx18(ArrowDown, {}) : /* @__PURE__ */ jsx18(ArrowUp, {}) : /* @__PURE__ */ jsx18(ChevronsUpDown2, {}),
2501
- /* @__PURE__ */ jsx18("span", {
2491
+ current ? current.direction === "desc" ? /* @__PURE__ */ jsx17(ArrowDown, {}) : /* @__PURE__ */ jsx17(ArrowUp, {}) : /* @__PURE__ */ jsx17(ChevronsUpDown2, {}),
2492
+ /* @__PURE__ */ jsx17("span", {
2502
2493
  className: "hidden sm:inline",
2503
2494
  children: store.config.labels.sortBy
2504
2495
  })
2505
2496
  ]
2506
2497
  }),
2507
- /* @__PURE__ */ jsx18(MenubarContent, {
2498
+ /* @__PURE__ */ jsx17(MenubarContent, {
2508
2499
  align: "end",
2509
2500
  className: "w-52",
2510
2501
  children: columns.map((column) => {
@@ -2513,7 +2504,7 @@ var SortMenu = ({
2513
2504
  children: [
2514
2505
  /* @__PURE__ */ jsxs9(MenubarSubTrigger, {
2515
2506
  children: [
2516
- sortState ? sortState.direction === "desc" ? /* @__PURE__ */ jsx18(ArrowDown, {}) : /* @__PURE__ */ jsx18(ArrowUp, {}) : null,
2507
+ sortState ? sortState.direction === "desc" ? /* @__PURE__ */ jsx17(ArrowDown, {}) : /* @__PURE__ */ jsx17(ArrowUp, {}) : null,
2517
2508
  columnLabel(column)
2518
2509
  ]
2519
2510
  }),
@@ -2522,7 +2513,7 @@ var SortMenu = ({
2522
2513
  /* @__PURE__ */ jsxs9(MenubarItem, {
2523
2514
  onClick: () => sort(column.id, "asc"),
2524
2515
  children: [
2525
- /* @__PURE__ */ jsx18(ArrowUp, {}),
2516
+ /* @__PURE__ */ jsx17(ArrowUp, {}),
2526
2517
  " ",
2527
2518
  store.config.labels.sortAsc
2528
2519
  ]
@@ -2530,21 +2521,21 @@ var SortMenu = ({
2530
2521
  /* @__PURE__ */ jsxs9(MenubarItem, {
2531
2522
  onClick: () => sort(column.id, "desc"),
2532
2523
  children: [
2533
- /* @__PURE__ */ jsx18(ArrowDown, {}),
2524
+ /* @__PURE__ */ jsx17(ArrowDown, {}),
2534
2525
  " ",
2535
2526
  store.config.labels.sortDesc
2536
2527
  ]
2537
2528
  }),
2538
2529
  sortState ? /* @__PURE__ */ jsxs9(Fragment, {
2539
2530
  children: [
2540
- /* @__PURE__ */ jsx18(MenubarSeparator, {}),
2531
+ /* @__PURE__ */ jsx17(MenubarSeparator, {}),
2541
2532
  /* @__PURE__ */ jsxs9(MenubarItem, {
2542
2533
  onClick: () => changeState(setStore, (state) => ({
2543
2534
  ...state,
2544
2535
  sort: state.sort?.filter(({ id }) => id !== column.id)
2545
2536
  })),
2546
2537
  children: [
2547
- /* @__PURE__ */ jsx18(X2, {}),
2538
+ /* @__PURE__ */ jsx17(X2, {}),
2548
2539
  " ",
2549
2540
  store.config.labels.sortClear
2550
2541
  ]
@@ -2569,14 +2560,14 @@ var ViewMenu = ({
2569
2560
  /* @__PURE__ */ jsxs9(MenubarTrigger, {
2570
2561
  "aria-label": store.config.labels.view,
2571
2562
  children: [
2572
- store.state.view === "gallery" ? /* @__PURE__ */ jsx18(LayoutGrid, {}) : /* @__PURE__ */ jsx18(Rows3, {}),
2573
- /* @__PURE__ */ jsx18("span", {
2563
+ store.state.view === "gallery" ? /* @__PURE__ */ jsx17(LayoutGrid, {}) : /* @__PURE__ */ jsx17(Rows3, {}),
2564
+ /* @__PURE__ */ jsx17("span", {
2574
2565
  className: "hidden sm:inline",
2575
2566
  children: store.config.labels.view
2576
2567
  })
2577
2568
  ]
2578
2569
  }),
2579
- /* @__PURE__ */ jsx18(MenubarContent, {
2570
+ /* @__PURE__ */ jsx17(MenubarContent, {
2580
2571
  align: "end",
2581
2572
  children: /* @__PURE__ */ jsxs9(MenubarRadioGroup, {
2582
2573
  onValueChange: (view) => {
@@ -2589,7 +2580,7 @@ var ViewMenu = ({
2589
2580
  /* @__PURE__ */ jsxs9(MenubarRadioItem, {
2590
2581
  value: "table",
2591
2582
  children: [
2592
- /* @__PURE__ */ jsx18(Rows3, {}),
2583
+ /* @__PURE__ */ jsx17(Rows3, {}),
2593
2584
  " ",
2594
2585
  store.config.labels.tableView
2595
2586
  ]
@@ -2597,7 +2588,7 @@ var ViewMenu = ({
2597
2588
  /* @__PURE__ */ jsxs9(MenubarRadioItem, {
2598
2589
  value: "gallery",
2599
2590
  children: [
2600
- /* @__PURE__ */ jsx18(LayoutGrid, {}),
2591
+ /* @__PURE__ */ jsx17(LayoutGrid, {}),
2601
2592
  " ",
2602
2593
  store.config.labels.galleryView
2603
2594
  ]
@@ -2620,22 +2611,22 @@ var ColumnMenu = ({
2620
2611
  /* @__PURE__ */ jsxs9(MenubarTrigger, {
2621
2612
  "aria-label": store.config.labels.columns,
2622
2613
  children: [
2623
- /* @__PURE__ */ jsx18(Settings2, {}),
2624
- /* @__PURE__ */ jsx18("span", {
2614
+ /* @__PURE__ */ jsx17(Settings2, {}),
2615
+ /* @__PURE__ */ jsx17("span", {
2625
2616
  className: "hidden sm:inline",
2626
2617
  children: store.config.labels.columns
2627
2618
  })
2628
2619
  ]
2629
2620
  }),
2630
- /* @__PURE__ */ jsx18(MenubarContent, {
2621
+ /* @__PURE__ */ jsx17(MenubarContent, {
2631
2622
  align: "end",
2632
2623
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2633
2624
  children: [
2634
- /* @__PURE__ */ jsx18(MenubarLabel, {
2625
+ /* @__PURE__ */ jsx17(MenubarLabel, {
2635
2626
  children: store.config.labels.columns
2636
2627
  }),
2637
- /* @__PURE__ */ jsx18(MenubarSeparator, {}),
2638
- columns.map((column) => /* @__PURE__ */ jsx18(MenubarCheckboxItem, {
2628
+ /* @__PURE__ */ jsx17(MenubarSeparator, {}),
2629
+ columns.map((column) => /* @__PURE__ */ jsx17(MenubarCheckboxItem, {
2639
2630
  checked: store.state.columnVisibility[column.id] !== false,
2640
2631
  onCheckedChange: (visible) => changeState(setStore, (state) => ({
2641
2632
  ...state,
@@ -2680,7 +2671,7 @@ var ResizeHandle = ({
2680
2671
  const startWidth = Number(event.currentTarget.dataset.startWidth);
2681
2672
  resize(startWidth + event.clientX - startX);
2682
2673
  };
2683
- return /* @__PURE__ */ jsx18("button", {
2674
+ return /* @__PURE__ */ jsx17("button", {
2684
2675
  "aria-label": store.config.labels.resizeColumn(columnLabel(column)),
2685
2676
  "aria-orientation": "vertical",
2686
2677
  "aria-valuemax": column.colDef.maxWidth ?? DEFAULT_MAX_WIDTH,
@@ -2801,7 +2792,7 @@ var DragHandle = ({
2801
2792
  };
2802
2793
  return /* @__PURE__ */ jsxs9(Fragment, {
2803
2794
  children: [
2804
- /* @__PURE__ */ jsx18(Button, {
2795
+ /* @__PURE__ */ jsx17(Button, {
2805
2796
  "aria-label": store.config.features.reordering && store.config.features.reordering.handleLabel ? store.config.features.reordering.handleLabel : store.config.labels.reorder,
2806
2797
  className: "size-8 cursor-grab touch-none active:cursor-grabbing",
2807
2798
  onClick: (event) => event.stopPropagation(),
@@ -2819,9 +2810,9 @@ var DragHandle = ({
2819
2810
  onPointerUp: finish,
2820
2811
  size: "icon",
2821
2812
  variant: "ghost",
2822
- children: /* @__PURE__ */ jsx18(GripVertical, {})
2813
+ children: /* @__PURE__ */ jsx17(GripVertical, {})
2823
2814
  }),
2824
- overlay ? createPortal(/* @__PURE__ */ jsx18("div", {
2815
+ overlay ? createPortal(/* @__PURE__ */ jsx17("div", {
2825
2816
  "aria-hidden": "true",
2826
2817
  className: "bg-background pointer-events-none fixed z-[100] rounded-md border px-3 py-2 text-sm shadow-lg",
2827
2818
  style: { left: overlay.x + 12, top: overlay.y + 12 },
@@ -2864,36 +2855,36 @@ var TableDataRow = ({
2864
2855
  },
2865
2856
  tabIndex: store.config.onRowClicked ? 0 : undefined,
2866
2857
  children: [
2867
- selection ? /* @__PURE__ */ jsx18(TableCell, {
2858
+ selection ? /* @__PURE__ */ jsx17(TableCell, {
2868
2859
  className: "w-10 pr-0",
2869
2860
  onClick: (event) => event.stopPropagation(),
2870
- children: /* @__PURE__ */ jsx18(Checkbox, {
2861
+ children: /* @__PURE__ */ jsx17(Checkbox, {
2871
2862
  "aria-label": store.config.labels.selectRow,
2872
2863
  checked: !!store.state.rowSelection[row.id],
2873
2864
  disabled: !selectable,
2874
2865
  onCheckedChange: (checked) => toggleRow(store, setStore, row.id, checked)
2875
2866
  })
2876
2867
  }) : null,
2877
- draggable ? /* @__PURE__ */ jsx18(TableCell, {
2868
+ draggable ? /* @__PURE__ */ jsx17(TableCell, {
2878
2869
  className: "w-10 pr-0",
2879
- children: /* @__PURE__ */ jsx18(DragHandle, {
2870
+ children: /* @__PURE__ */ jsx17(DragHandle, {
2880
2871
  tableAtom
2881
2872
  })
2882
2873
  }) : null,
2883
- model.visibleColumns.map((column) => /* @__PURE__ */ jsx18(TableCell, {
2884
- className: cn("min-w-24 overflow-hidden", column.colDef.truncate ? "whitespace-nowrap" : "whitespace-normal"),
2874
+ model.visibleColumns.map((column) => /* @__PURE__ */ jsx17(TableCell, {
2875
+ className: cn("min-w-24 overflow-hidden has-[[data-slot=data-table-relationship-cell]]:relative has-[[data-slot=data-table-relationship-cell]]:p-0", column.colDef.truncate ? "whitespace-nowrap" : "whitespace-normal"),
2885
2876
  style: { width: column.width },
2886
- children: /* @__PURE__ */ jsx18("div", {
2877
+ children: /* @__PURE__ */ jsx17("div", {
2887
2878
  className: cn("min-w-0", column.colDef.truncate && "truncate"),
2888
2879
  children: renderCell(row, column)
2889
2880
  })
2890
2881
  }, column.id)),
2891
- hasRowActionMenu(store) ? /* @__PURE__ */ jsx18(TableCell, {
2882
+ hasRowActionMenu(store) ? /* @__PURE__ */ jsx17(TableCell, {
2892
2883
  className: "bg-background group-data-[state=selected]/row:bg-muted sticky right-0 z-20 w-10 min-w-10 cursor-default p-0 transition-colors group-hover/row:bg-[color-mix(in_oklab,var(--muted)_50%,var(--background))]",
2893
2884
  onClick: (event) => event.stopPropagation(),
2894
- children: /* @__PURE__ */ jsx18("div", {
2885
+ children: /* @__PURE__ */ jsx17("div", {
2895
2886
  className: "flex h-16 items-center justify-center",
2896
- children: /* @__PURE__ */ jsx18(DataTableRowActionMenu, {
2887
+ children: /* @__PURE__ */ jsx17(DataTableRowActionMenu, {
2897
2888
  tableAtom
2898
2889
  })
2899
2890
  })
@@ -2911,23 +2902,23 @@ var GroupActions = ({
2911
2902
  return null;
2912
2903
  return /* @__PURE__ */ jsxs9(DropdownMenu, {
2913
2904
  children: [
2914
- /* @__PURE__ */ jsx18(DropdownMenuTrigger, {
2905
+ /* @__PURE__ */ jsx17(DropdownMenuTrigger, {
2915
2906
  onClick: (event) => event.stopPropagation(),
2916
2907
  render: /* @__PURE__ */ jsxs9(Button, {
2917
2908
  size: "icon",
2918
2909
  variant: "ghost",
2919
2910
  children: [
2920
- /* @__PURE__ */ jsx18("span", {
2911
+ /* @__PURE__ */ jsx17("span", {
2921
2912
  className: "sr-only",
2922
2913
  children: title
2923
2914
  }),
2924
- /* @__PURE__ */ jsx18(MoreHorizontal, {})
2915
+ /* @__PURE__ */ jsx17(MoreHorizontal, {})
2925
2916
  ]
2926
2917
  })
2927
2918
  }),
2928
- /* @__PURE__ */ jsx18(DropdownMenuContent, {
2919
+ /* @__PURE__ */ jsx17(DropdownMenuContent, {
2929
2920
  align: "end",
2930
- children: /* @__PURE__ */ jsx18(DropdownMenuGroup, {
2921
+ children: /* @__PURE__ */ jsx17(DropdownMenuGroup, {
2931
2922
  children: visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem, {
2932
2923
  onClick: () => action.onClick(groupId),
2933
2924
  variant: action.variant,
@@ -2963,10 +2954,10 @@ var GroupedTable = ({
2963
2954
  className: "data-[drop-target=true]:outline-primary relative data-[drop-target=true]:z-30 data-[drop-target=true]:outline-2 data-[drop-target=true]:-outline-offset-2 data-[drop-target=true]:[&>tr]:border-transparent data-[drop-target=true]:[&>tr>td:last-child]:z-0",
2964
2955
  "data-table-group": section.field.onMoveToGroup ? targetKey : undefined,
2965
2956
  children: [
2966
- /* @__PURE__ */ jsx18(TableRow, {
2957
+ /* @__PURE__ */ jsx17(TableRow, {
2967
2958
  className: "bg-muted/40 hover:bg-accent! cursor-pointer",
2968
2959
  onClick: toggleCollapsed,
2969
- children: /* @__PURE__ */ jsx18(TableCell, {
2960
+ children: /* @__PURE__ */ jsx17(TableCell, {
2970
2961
  colSpan: model.visibleColumns.length + extra,
2971
2962
  children: /* @__PURE__ */ jsxs9("div", {
2972
2963
  className: "flex items-center gap-2",
@@ -2977,22 +2968,22 @@ var GroupedTable = ({
2977
2968
  className: "flex flex-1 cursor-pointer items-center gap-2 text-left font-medium",
2978
2969
  type: "button",
2979
2970
  children: [
2980
- collapsed ? /* @__PURE__ */ jsx18(ChevronRight2, {
2971
+ collapsed ? /* @__PURE__ */ jsx17(ChevronRight2, {
2981
2972
  className: "size-4"
2982
- }) : /* @__PURE__ */ jsx18(ChevronDown, {
2973
+ }) : /* @__PURE__ */ jsx17(ChevronDown, {
2983
2974
  className: "size-4"
2984
2975
  }),
2985
- /* @__PURE__ */ jsx18("span", {
2976
+ /* @__PURE__ */ jsx17("span", {
2986
2977
  className: "flex-1",
2987
2978
  children: section.field.renderGroupLabel?.(section.groupId, section.rows.map((row) => row.data)) ?? section.groupId
2988
2979
  })
2989
2980
  ]
2990
2981
  }),
2991
- /* @__PURE__ */ jsx18(Badge, {
2982
+ /* @__PURE__ */ jsx17(Badge, {
2992
2983
  variant: "secondary",
2993
2984
  children: section.rows.length
2994
2985
  }),
2995
- /* @__PURE__ */ jsx18(GroupActions, {
2986
+ /* @__PURE__ */ jsx17(GroupActions, {
2996
2987
  actions: section.field.actions,
2997
2988
  groupId: section.groupId,
2998
2989
  title: section.field.actionsLabel ?? store.config.labels.actions
@@ -3001,14 +2992,14 @@ var GroupedTable = ({
3001
2992
  })
3002
2993
  })
3003
2994
  }),
3004
- !collapsed && !section.children.length ? section.rows.length ? section.rows.map((row) => /* @__PURE__ */ jsx18(RowIdContext.Provider, {
2995
+ !collapsed && !section.children.length ? section.rows.length ? section.rows.map((row) => /* @__PURE__ */ jsx17(RowIdContext.Provider, {
3005
2996
  value: row.id,
3006
- children: /* @__PURE__ */ jsx18(TableDataRow, {
2997
+ children: /* @__PURE__ */ jsx17(TableDataRow, {
3007
2998
  tableAtom
3008
2999
  })
3009
3000
  }, `${section.key}:${row.id}`)) : [
3010
- /* @__PURE__ */ jsx18(TableRow, {
3011
- children: /* @__PURE__ */ jsx18(TableCell, {
3001
+ /* @__PURE__ */ jsx17(TableRow, {
3002
+ children: /* @__PURE__ */ jsx17(TableCell, {
3012
3003
  className: "text-muted-foreground h-16",
3013
3004
  colSpan: model.visibleColumns.length + extra,
3014
3005
  children: section.field.renderEmptyGroup?.(section.groupId) ?? store.config.labels.empty
@@ -3019,7 +3010,7 @@ var GroupedTable = ({
3019
3010
  }, section.key);
3020
3011
  return !collapsed && section.children.length ? [body, renderSections(section.children)] : [body];
3021
3012
  });
3022
- return /* @__PURE__ */ jsx18(Fragment, {
3013
+ return /* @__PURE__ */ jsx17(Fragment, {
3023
3014
  children: renderSections(sections)
3024
3015
  });
3025
3016
  };
@@ -3042,29 +3033,29 @@ var ColumnHeaderMenu = ({
3042
3033
  }));
3043
3034
  const label = columnLabel(column);
3044
3035
  if (!sortingEnabled && !hidingEnabled) {
3045
- return /* @__PURE__ */ jsx18("div", {
3036
+ return /* @__PURE__ */ jsx17("div", {
3046
3037
  className: "truncate",
3047
3038
  children: column.colDef.headerName
3048
3039
  });
3049
3040
  }
3050
3041
  return /* @__PURE__ */ jsxs9(DropdownMenu, {
3051
3042
  children: [
3052
- /* @__PURE__ */ jsx18(DropdownMenuTrigger, {
3043
+ /* @__PURE__ */ jsx17(DropdownMenuTrigger, {
3053
3044
  render: /* @__PURE__ */ jsxs9(Button, {
3054
3045
  "aria-label": label,
3055
3046
  className: "h-8 max-w-full justify-start px-2",
3056
3047
  size: "sm",
3057
3048
  variant: "ghost",
3058
3049
  children: [
3059
- /* @__PURE__ */ jsx18("span", {
3050
+ /* @__PURE__ */ jsx17("span", {
3060
3051
  className: "truncate",
3061
3052
  children: column.colDef.headerName
3062
3053
  }),
3063
- sort ? sort.direction === "desc" ? /* @__PURE__ */ jsx18(ArrowDown, {}) : /* @__PURE__ */ jsx18(ArrowUp, {}) : sortingEnabled ? /* @__PURE__ */ jsx18(ChevronsUpDown2, {}) : null
3054
+ sort ? sort.direction === "desc" ? /* @__PURE__ */ jsx17(ArrowDown, {}) : /* @__PURE__ */ jsx17(ArrowUp, {}) : sortingEnabled ? /* @__PURE__ */ jsx17(ChevronsUpDown2, {}) : null
3064
3055
  ]
3065
3056
  })
3066
3057
  }),
3067
- /* @__PURE__ */ jsx18(DropdownMenuContent, {
3058
+ /* @__PURE__ */ jsx17(DropdownMenuContent, {
3068
3059
  align: "start",
3069
3060
  className: "w-48",
3070
3061
  children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
@@ -3074,7 +3065,7 @@ var ColumnHeaderMenu = ({
3074
3065
  /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3075
3066
  onClick: () => setSort("asc"),
3076
3067
  children: [
3077
- /* @__PURE__ */ jsx18(ArrowUp, {}),
3068
+ /* @__PURE__ */ jsx17(ArrowUp, {}),
3078
3069
  " ",
3079
3070
  store.config.labels.sortAsc
3080
3071
  ]
@@ -3082,7 +3073,7 @@ var ColumnHeaderMenu = ({
3082
3073
  /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3083
3074
  onClick: () => setSort("desc"),
3084
3075
  children: [
3085
- /* @__PURE__ */ jsx18(ArrowDown, {}),
3076
+ /* @__PURE__ */ jsx17(ArrowDown, {}),
3086
3077
  " ",
3087
3078
  store.config.labels.sortDesc
3088
3079
  ]
@@ -3093,14 +3084,14 @@ var ColumnHeaderMenu = ({
3093
3084
  sort: state.sort?.filter(({ id }) => id !== column.id)
3094
3085
  })),
3095
3086
  children: [
3096
- /* @__PURE__ */ jsx18(X2, {}),
3087
+ /* @__PURE__ */ jsx17(X2, {}),
3097
3088
  " ",
3098
3089
  store.config.labels.sortClear
3099
3090
  ]
3100
3091
  }) : null
3101
3092
  ]
3102
3093
  }) : null,
3103
- sortingEnabled && hidingEnabled ? /* @__PURE__ */ jsx18(DropdownMenuSeparator, {}) : null,
3094
+ sortingEnabled && hidingEnabled ? /* @__PURE__ */ jsx17(DropdownMenuSeparator, {}) : null,
3104
3095
  hidingEnabled ? /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3105
3096
  onClick: () => update((state) => ({
3106
3097
  ...state,
@@ -3110,7 +3101,7 @@ var ColumnHeaderMenu = ({
3110
3101
  }
3111
3102
  })),
3112
3103
  children: [
3113
- /* @__PURE__ */ jsx18(EyeOff, {}),
3104
+ /* @__PURE__ */ jsx17(EyeOff, {}),
3114
3105
  " ",
3115
3106
  store.config.labels.hideColumn
3116
3107
  ]
@@ -3132,12 +3123,12 @@ var DataTableHeader = ({
3132
3123
  const selectableRows = getDataTableSelectableRows(model, grouped, selection ? selection.isRowSelectable : undefined);
3133
3124
  const allSelected = selectableRows.length > 0 && selectableRows.every((row) => store.state.rowSelection[row.id]);
3134
3125
  const someSelected = selectableRows.some((row) => store.state.rowSelection[row.id]);
3135
- return /* @__PURE__ */ jsx18(TableHeader, {
3126
+ return /* @__PURE__ */ jsx17(TableHeader, {
3136
3127
  children: /* @__PURE__ */ jsxs9(TableRow, {
3137
3128
  children: [
3138
- selection ? /* @__PURE__ */ jsx18(TableHead, {
3129
+ selection ? /* @__PURE__ */ jsx17(TableHead, {
3139
3130
  className: "w-10 pr-0",
3140
- children: /* @__PURE__ */ jsx18(Checkbox, {
3131
+ children: /* @__PURE__ */ jsx17(Checkbox, {
3141
3132
  "aria-label": store.config.labels.selectAllRows,
3142
3133
  checked: allSelected,
3143
3134
  indeterminate: someSelected && !allSelected,
@@ -3151,27 +3142,27 @@ var DataTableHeader = ({
3151
3142
  }
3152
3143
  })
3153
3144
  }) : null,
3154
- draggable ? /* @__PURE__ */ jsx18(TableHead, {
3145
+ draggable ? /* @__PURE__ */ jsx17(TableHead, {
3155
3146
  className: "w-10"
3156
3147
  }) : null,
3157
3148
  model.visibleColumns.map((column) => {
3158
- return /* @__PURE__ */ jsx18(TableHead, {
3149
+ return /* @__PURE__ */ jsx17(TableHead, {
3159
3150
  className: "relative h-12",
3160
3151
  style: { width: column.width },
3161
3152
  children: /* @__PURE__ */ jsxs9(ColumnIdContext.Provider, {
3162
3153
  value: column.id,
3163
3154
  children: [
3164
- /* @__PURE__ */ jsx18(ColumnHeaderMenu, {
3155
+ /* @__PURE__ */ jsx17(ColumnHeaderMenu, {
3165
3156
  tableAtom
3166
3157
  }),
3167
- /* @__PURE__ */ jsx18(ResizeHandle, {
3158
+ /* @__PURE__ */ jsx17(ResizeHandle, {
3168
3159
  tableAtom
3169
3160
  })
3170
3161
  ]
3171
3162
  })
3172
3163
  }, column.id);
3173
3164
  }),
3174
- hasRowActionMenu(store) ? /* @__PURE__ */ jsx18(TableHead, {
3165
+ hasRowActionMenu(store) ? /* @__PURE__ */ jsx17(TableHead, {
3175
3166
  className: "w-10"
3176
3167
  }) : null
3177
3168
  ]
@@ -3187,28 +3178,28 @@ var DataTableBody = ({
3187
3178
  const rows = grouped ? model.sortedRows : model.pageRows;
3188
3179
  const colSpan = model.visibleColumns.length + (store.config.features.selection ? 1 : 0) + (hasRowActionMenu(store) ? 1 : 0) + (canDragRows(store) ? 1 : 0);
3189
3180
  if (grouped && rows.length && !store.config.status.error) {
3190
- return /* @__PURE__ */ jsx18(GroupedTable, {
3181
+ return /* @__PURE__ */ jsx17(GroupedTable, {
3191
3182
  tableAtom
3192
3183
  });
3193
3184
  }
3194
- return /* @__PURE__ */ jsx18(TableBody, {
3195
- children: store.config.status.error || !rows.length && !store.config.status.loading ? /* @__PURE__ */ jsx18(TableRow, {
3196
- children: /* @__PURE__ */ jsx18(TableCell, {
3185
+ return /* @__PURE__ */ jsx17(TableBody, {
3186
+ children: store.config.status.error || !rows.length && !store.config.status.loading ? /* @__PURE__ */ jsx17(TableRow, {
3187
+ children: /* @__PURE__ */ jsx17(TableCell, {
3197
3188
  className: "h-24 text-center",
3198
3189
  colSpan: Math.max(colSpan, 1),
3199
3190
  children: store.config.status.error ?? store.config.status.empty ?? store.config.labels.empty
3200
3191
  })
3201
- }) : store.config.status.loading && !rows.length ? /* @__PURE__ */ jsx18(TableRow, {
3202
- children: /* @__PURE__ */ jsx18(TableCell, {
3192
+ }) : store.config.status.loading && !rows.length ? /* @__PURE__ */ jsx17(TableRow, {
3193
+ children: /* @__PURE__ */ jsx17(TableCell, {
3203
3194
  className: "h-24 text-center",
3204
3195
  colSpan: Math.max(colSpan, 1),
3205
- children: /* @__PURE__ */ jsx18(Loading, {
3196
+ children: /* @__PURE__ */ jsx17(Loading, {
3206
3197
  label: store.config.labels.loading
3207
3198
  })
3208
3199
  })
3209
- }) : rows.map((row) => /* @__PURE__ */ jsx18(RowIdContext.Provider, {
3200
+ }) : rows.map((row) => /* @__PURE__ */ jsx17(RowIdContext.Provider, {
3210
3201
  value: row.id,
3211
- children: /* @__PURE__ */ jsx18(TableDataRow, {
3202
+ children: /* @__PURE__ */ jsx17(TableDataRow, {
3212
3203
  tableAtom
3213
3204
  })
3214
3205
  }, row.id))
@@ -3231,7 +3222,7 @@ var GalleryCard = ({
3231
3222
  const selection = store.config.features.selection;
3232
3223
  const selectable = !!selection && (selection.isRowSelectable?.(row.data) ?? true);
3233
3224
  const draggable = canDragRows(store);
3234
- return /* @__PURE__ */ jsx18(Card, {
3225
+ return /* @__PURE__ */ jsx17(Card, {
3235
3226
  className: cn("relative gap-3 data-[drag-source=true]:opacity-40 data-[drop-position=before]:border-t-2 data-[drop-position=before]:border-t-primary data-[drop-position=after]:border-b-2 data-[drop-position=after]:border-b-primary", store.config.onRowClicked && "cursor-pointer"),
3236
3227
  "data-table-row": row.id,
3237
3228
  onClick: () => store.config.onRowClicked?.(row.data),
@@ -3248,14 +3239,14 @@ var GalleryCard = ({
3248
3239
  /* @__PURE__ */ jsxs9("div", {
3249
3240
  className: "flex items-center gap-2",
3250
3241
  children: [
3251
- selection ? /* @__PURE__ */ jsx18(Checkbox, {
3242
+ selection ? /* @__PURE__ */ jsx17(Checkbox, {
3252
3243
  "aria-label": store.config.labels.selectRow,
3253
3244
  checked: !!store.state.rowSelection[row.id],
3254
3245
  disabled: !selectable,
3255
3246
  onCheckedChange: (checked) => toggleRow(store, setStore, row.id, checked),
3256
3247
  onClick: (event) => event.stopPropagation()
3257
3248
  }) : null,
3258
- draggable ? /* @__PURE__ */ jsx18(DragHandle, {
3249
+ draggable ? /* @__PURE__ */ jsx17(DragHandle, {
3259
3250
  tableAtom
3260
3251
  }) : null,
3261
3252
  tag ? /* @__PURE__ */ jsxs9(Badge, {
@@ -3267,17 +3258,17 @@ var GalleryCard = ({
3267
3258
  }) : null
3268
3259
  ]
3269
3260
  }),
3270
- /* @__PURE__ */ jsx18(CardTitle, {
3261
+ /* @__PURE__ */ jsx17(CardTitle, {
3271
3262
  children: name ? renderCell(row, name) : row.id
3272
3263
  }),
3273
- description ? /* @__PURE__ */ jsx18("div", {
3264
+ description ? /* @__PURE__ */ jsx17("div", {
3274
3265
  className: "text-muted-foreground line-clamp-3 text-sm",
3275
3266
  children: renderCell(row, description)
3276
3267
  }) : null,
3277
- hasRowActionMenu(store) ? /* @__PURE__ */ jsx18("div", {
3268
+ hasRowActionMenu(store) ? /* @__PURE__ */ jsx17("div", {
3278
3269
  className: "absolute top-4 right-4",
3279
3270
  onClick: (event) => event.stopPropagation(),
3280
- children: /* @__PURE__ */ jsx18(DataTableRowActionMenu, {
3271
+ children: /* @__PURE__ */ jsx17(DataTableRowActionMenu, {
3281
3272
  tableAtom
3282
3273
  })
3283
3274
  }) : null
@@ -3293,31 +3284,31 @@ var DataTableGallery = ({
3293
3284
  const fields = getActiveGrouping(store);
3294
3285
  const rows = fields.length ? model.sortedRows : model.pageRows;
3295
3286
  if (store.config.status.error) {
3296
- return /* @__PURE__ */ jsx18("div", {
3287
+ return /* @__PURE__ */ jsx17("div", {
3297
3288
  className: "text-destructive rounded-lg border border-dashed p-10 text-center",
3298
3289
  children: store.config.status.error
3299
3290
  });
3300
3291
  }
3301
3292
  if (store.config.status.loading && !rows.length) {
3302
- return /* @__PURE__ */ jsx18("div", {
3293
+ return /* @__PURE__ */ jsx17("div", {
3303
3294
  className: "rounded-lg border border-dashed p-10 text-center",
3304
- children: /* @__PURE__ */ jsx18(Loading, {
3295
+ children: /* @__PURE__ */ jsx17(Loading, {
3305
3296
  label: store.config.labels.loading
3306
3297
  })
3307
3298
  });
3308
3299
  }
3309
3300
  if (!rows.length) {
3310
- return /* @__PURE__ */ jsx18("div", {
3301
+ return /* @__PURE__ */ jsx17("div", {
3311
3302
  className: "text-muted-foreground rounded-lg border border-dashed p-10 text-center",
3312
3303
  children: store.config.status.empty ?? store.config.labels.empty
3313
3304
  });
3314
3305
  }
3315
3306
  if (!fields.length) {
3316
- return /* @__PURE__ */ jsx18("div", {
3307
+ return /* @__PURE__ */ jsx17("div", {
3317
3308
  className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
3318
- children: rows.map((row) => /* @__PURE__ */ jsx18(RowIdContext.Provider, {
3309
+ children: rows.map((row) => /* @__PURE__ */ jsx17(RowIdContext.Provider, {
3319
3310
  value: row.id,
3320
- children: /* @__PURE__ */ jsx18(GalleryCard, {
3311
+ children: /* @__PURE__ */ jsx17(GalleryCard, {
3321
3312
  tableAtom
3322
3313
  })
3323
3314
  }, row.id))
@@ -3346,44 +3337,44 @@ var DataTableGallery = ({
3346
3337
  className: "flex flex-1 cursor-pointer items-center gap-2 text-left font-medium",
3347
3338
  type: "button",
3348
3339
  children: [
3349
- collapsed ? /* @__PURE__ */ jsx18(ChevronRight2, {
3340
+ collapsed ? /* @__PURE__ */ jsx17(ChevronRight2, {
3350
3341
  className: "size-4"
3351
- }) : /* @__PURE__ */ jsx18(ChevronDown, {
3342
+ }) : /* @__PURE__ */ jsx17(ChevronDown, {
3352
3343
  className: "size-4"
3353
3344
  }),
3354
- /* @__PURE__ */ jsx18("span", {
3345
+ /* @__PURE__ */ jsx17("span", {
3355
3346
  className: "flex-1",
3356
3347
  children: section.field.renderGroupLabel?.(section.groupId, section.rows.map((row) => row.data)) ?? section.groupId
3357
3348
  }),
3358
- /* @__PURE__ */ jsx18(Badge, {
3349
+ /* @__PURE__ */ jsx17(Badge, {
3359
3350
  variant: "secondary",
3360
3351
  children: section.rows.length
3361
3352
  })
3362
3353
  ]
3363
3354
  }),
3364
- /* @__PURE__ */ jsx18(GroupActions, {
3355
+ /* @__PURE__ */ jsx17(GroupActions, {
3365
3356
  actions: section.field.actions,
3366
3357
  groupId: section.groupId,
3367
3358
  title: section.field.actionsLabel ?? store.config.labels.actions
3368
3359
  })
3369
3360
  ]
3370
3361
  }),
3371
- !collapsed ? section.children.length ? renderSections(section.children) : section.rows.length ? /* @__PURE__ */ jsx18("div", {
3362
+ !collapsed ? section.children.length ? renderSections(section.children) : section.rows.length ? /* @__PURE__ */ jsx17("div", {
3372
3363
  className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
3373
- children: section.rows.map((row) => /* @__PURE__ */ jsx18(RowIdContext.Provider, {
3364
+ children: section.rows.map((row) => /* @__PURE__ */ jsx17(RowIdContext.Provider, {
3374
3365
  value: row.id,
3375
- children: /* @__PURE__ */ jsx18(GalleryCard, {
3366
+ children: /* @__PURE__ */ jsx17(GalleryCard, {
3376
3367
  tableAtom
3377
3368
  })
3378
3369
  }, `${section.key}:${row.id}`))
3379
- }) : /* @__PURE__ */ jsx18("div", {
3370
+ }) : /* @__PURE__ */ jsx17("div", {
3380
3371
  className: "text-muted-foreground rounded-lg border border-dashed p-8 text-center",
3381
3372
  children: section.field.renderEmptyGroup?.(section.groupId) ?? store.config.labels.empty
3382
3373
  }) : null
3383
3374
  ]
3384
3375
  }, section.key);
3385
3376
  });
3386
- return /* @__PURE__ */ jsx18("div", {
3377
+ return /* @__PURE__ */ jsx17("div", {
3387
3378
  className: "space-y-4",
3388
3379
  children: renderSections(groupDataTableRows(rows, fields))
3389
3380
  });
@@ -3410,9 +3401,9 @@ var DataTablePagination = ({
3410
3401
  return null;
3411
3402
  const selected = model.rows.filter((row) => store.state.rowSelection[row.id]).length;
3412
3403
  const setPagination = (next) => changeState(setStore, (state) => ({ ...state, ...next }));
3413
- return /* @__PURE__ */ jsx18("div", {
3404
+ return /* @__PURE__ */ jsx17("div", {
3414
3405
  className: "pt-4",
3415
- children: /* @__PURE__ */ jsx18(Pagination, {
3406
+ children: /* @__PURE__ */ jsx17(Pagination, {
3416
3407
  messages: store.config.labels,
3417
3408
  onPageChange: (page) => setPagination({ page, pageSize: store.state.pageSize }),
3418
3409
  onPageSizeChange: (pageSize) => setPagination({ page: 0, pageSize }),
@@ -3504,13 +3495,13 @@ var HydratedDataTable = ({
3504
3495
  className: "w-full max-w-full min-w-0 rounded-md",
3505
3496
  "data-table-root": "",
3506
3497
  children: [
3507
- /* @__PURE__ */ jsx18(DataTableToolbar, {
3498
+ /* @__PURE__ */ jsx17(DataTableToolbar, {
3508
3499
  tableAtom
3509
3500
  }),
3510
- /* @__PURE__ */ jsx18(DataTableContent, {
3501
+ /* @__PURE__ */ jsx17(DataTableContent, {
3511
3502
  tableAtom
3512
3503
  }),
3513
- /* @__PURE__ */ jsx18(DataTablePagination, {
3504
+ /* @__PURE__ */ jsx17(DataTablePagination, {
3514
3505
  tableAtom
3515
3506
  })
3516
3507
  ]
@@ -3532,13 +3523,13 @@ var DataTable = (props) => {
3532
3523
  }
3533
3524
  const [persistedUiResult, setPersistedUiState] = useAtom(persistedUiAtomRef.current);
3534
3525
  if (!AsyncResult.isSuccess(persistedUiResult) || AsyncResult.isWaiting(persistedUiResult)) {
3535
- return /* @__PURE__ */ jsx18("div", {
3526
+ return /* @__PURE__ */ jsx17("div", {
3536
3527
  "aria-busy": "true",
3537
3528
  className: "invisible w-full max-w-full min-w-0 rounded-md",
3538
3529
  "data-table-root": ""
3539
3530
  });
3540
3531
  }
3541
- return /* @__PURE__ */ jsx18(HydratedDataTable, {
3532
+ return /* @__PURE__ */ jsx17(HydratedDataTable, {
3542
3533
  ...props,
3543
3534
  persistedUiState: persistedUiResult.value,
3544
3535
  setPersistedUiState
@@ -3549,7 +3540,7 @@ var DataTableContent = ({
3549
3540
  }) => {
3550
3541
  const [store] = useTableAtom(tableAtom);
3551
3542
  if (store.config.features.gallery && store.state.view === "gallery") {
3552
- return /* @__PURE__ */ jsx18(DataTableGallery, {
3543
+ return /* @__PURE__ */ jsx17(DataTableGallery, {
3553
3544
  tableAtom
3554
3545
  });
3555
3546
  }
@@ -3562,15 +3553,15 @@ var DataTableContent = ({
3562
3553
  className: "table-fixed",
3563
3554
  style: { width: `max(100%, ${width}px)` },
3564
3555
  children: [
3565
- /* @__PURE__ */ jsx18(DataTableHeader, {
3556
+ /* @__PURE__ */ jsx17(DataTableHeader, {
3566
3557
  tableAtom
3567
3558
  }),
3568
- /* @__PURE__ */ jsx18(DataTableBody, {
3559
+ /* @__PURE__ */ jsx17(DataTableBody, {
3569
3560
  tableAtom
3570
3561
  })
3571
3562
  ]
3572
3563
  }),
3573
- /* @__PURE__ */ jsx18(ScrollBar, {
3564
+ /* @__PURE__ */ jsx17(ScrollBar, {
3574
3565
  orientation: "horizontal"
3575
3566
  })
3576
3567
  ]
@@ -3587,33 +3578,39 @@ var DataTableRelationshipCell = ({
3587
3578
  const [selected, setSelected] = useState([...value]);
3588
3579
  useLayoutEffect(() => setSelected([...value]), [value]);
3589
3580
  const selectedValues = new Set(selected.map((item) => item.value));
3590
- return /* @__PURE__ */ jsx18(VirtualizedCombobox, {
3591
- ariaLabel: manageLabel,
3592
- emptyLabel,
3593
- items: [...options].sort((left, right) => Number(selectedValues.has(right.value)) - Number(selectedValues.has(left.value))),
3594
- messages: { search: manageLabel },
3595
- multiple: true,
3596
- onValueChange: (next) => {
3597
- const nextValues = new Set(next.map((item) => item.value));
3598
- selected.forEach((item) => !nextValues.has(item.value) && onRemove?.(item.value));
3599
- next.forEach((item) => !selectedValues.has(item.value) && onAdd?.(item.value));
3600
- setSelected(next);
3601
- },
3602
- placeholder: emptyLabel,
3603
- trigger: /* @__PURE__ */ jsxs9(Button, {
3604
- className: "h-full min-h-16 w-full justify-between rounded-none",
3605
- variant: "ghost",
3606
- children: [
3607
- /* @__PURE__ */ jsx18(DataTableListSummary, {
3608
- emptyLabel,
3609
- expandable: false,
3610
- items: selected,
3611
- variant: selected.some((item) => item.icon) ? "icon" : "text"
3612
- }),
3613
- /* @__PURE__ */ jsx18(ChevronDown, {})
3614
- ]
3615
- }),
3616
- value: selected
3581
+ return /* @__PURE__ */ jsx17("div", {
3582
+ "data-slot": "data-table-relationship-cell",
3583
+ className: "h-full in-[[data-slot=table-cell]]:absolute in-[[data-slot=table-cell]]:inset-0",
3584
+ onClick: (event) => event.stopPropagation(),
3585
+ onPointerDown: (event) => event.stopPropagation(),
3586
+ children: /* @__PURE__ */ jsx17(VirtualizedCombobox, {
3587
+ ariaLabel: manageLabel,
3588
+ emptyLabel,
3589
+ items: [...options].sort((left, right) => Number(selectedValues.has(right.value)) - Number(selectedValues.has(left.value))),
3590
+ messages: { search: manageLabel },
3591
+ multiple: true,
3592
+ onValueChange: (next) => {
3593
+ const nextValues = new Set(next.map((item) => item.value));
3594
+ selected.forEach((item) => !nextValues.has(item.value) && onRemove?.(item.value));
3595
+ next.forEach((item) => !selectedValues.has(item.value) && onAdd?.(item.value));
3596
+ setSelected(next);
3597
+ },
3598
+ placeholder: emptyLabel,
3599
+ trigger: /* @__PURE__ */ jsxs9(Button, {
3600
+ className: "h-full min-h-16 w-full justify-between rounded-none",
3601
+ variant: "ghost",
3602
+ children: [
3603
+ /* @__PURE__ */ jsx17(DataTableListSummary, {
3604
+ emptyLabel,
3605
+ expandable: false,
3606
+ items: selected,
3607
+ variant: selected.some((item) => item.icon) ? "icon" : "text"
3608
+ }),
3609
+ /* @__PURE__ */ jsx17(ChevronDown, {})
3610
+ ]
3611
+ }),
3612
+ value: selected
3613
+ })
3617
3614
  });
3618
3615
  };
3619
3616
  var DataTableListSummary = ({
@@ -3628,13 +3625,13 @@ var DataTableListSummary = ({
3628
3625
  const labels2 = dataTableMessages();
3629
3626
  const normalized = items.map((item) => Schema.is(Schema.String)(item) ? { label: item } : item);
3630
3627
  if (!normalized.length)
3631
- return /* @__PURE__ */ jsx18("span", {
3628
+ return /* @__PURE__ */ jsx17("span", {
3632
3629
  className: "text-muted-foreground",
3633
3630
  children: emptyLabel
3634
3631
  });
3635
3632
  const visible = normalized.slice(0, visibleCount);
3636
3633
  const remaining = Math.max(totalCount - visible.length, 0);
3637
- const details = /* @__PURE__ */ jsx18(PopoverContent, {
3634
+ const details = /* @__PURE__ */ jsx17(PopoverContent, {
3638
3635
  align: "start",
3639
3636
  className: "max-h-72 w-72 overflow-y-auto p-2",
3640
3637
  children: normalized.map((item, index) => /* @__PURE__ */ jsxs9("div", {
@@ -3646,27 +3643,27 @@ var DataTableListSummary = ({
3646
3643
  }, item.value ?? `${item.label}-${index}`))
3647
3644
  });
3648
3645
  if (variant === "icon") {
3649
- return /* @__PURE__ */ jsx18(TooltipProvider, {
3646
+ return /* @__PURE__ */ jsx17(TooltipProvider, {
3650
3647
  children: /* @__PURE__ */ jsxs9("span", {
3651
3648
  className: "flex items-center",
3652
3649
  children: [
3653
3650
  visible.map((item) => /* @__PURE__ */ jsxs9(Tooltip, {
3654
3651
  children: [
3655
- /* @__PURE__ */ jsx18(TooltipTrigger, {
3656
- render: /* @__PURE__ */ jsx18("span", {
3652
+ /* @__PURE__ */ jsx17(TooltipTrigger, {
3653
+ render: /* @__PURE__ */ jsx17("span", {
3657
3654
  "aria-label": item.label,
3658
3655
  className: "bg-muted -ml-1 flex size-8 items-center justify-center rounded-full",
3659
3656
  children: item.icon ?? item.label.slice(0, 2).toUpperCase()
3660
3657
  })
3661
3658
  }),
3662
- /* @__PURE__ */ jsx18(TooltipContent, {
3659
+ /* @__PURE__ */ jsx17(TooltipContent, {
3663
3660
  children: item.label
3664
3661
  })
3665
3662
  ]
3666
3663
  }, item.value ?? item.label)),
3667
3664
  remaining && expandable ? /* @__PURE__ */ jsxs9(Popover, {
3668
3665
  children: [
3669
- /* @__PURE__ */ jsx18(PopoverTrigger, {
3666
+ /* @__PURE__ */ jsx17(PopoverTrigger, {
3670
3667
  render: /* @__PURE__ */ jsxs9("button", {
3671
3668
  "aria-label": labels2.listOthers(remaining),
3672
3669
  className: "bg-muted -ml-1 flex size-8 items-center justify-center rounded-full",
@@ -3698,8 +3695,8 @@ var DataTableListSummary = ({
3698
3695
  });
3699
3696
  return remaining && expandable ? /* @__PURE__ */ jsxs9(Popover, {
3700
3697
  children: [
3701
- /* @__PURE__ */ jsx18(PopoverTrigger, {
3702
- render: /* @__PURE__ */ jsx18("button", {
3698
+ /* @__PURE__ */ jsx17(PopoverTrigger, {
3699
+ render: /* @__PURE__ */ jsx17("button", {
3703
3700
  className: "text-left text-sm",
3704
3701
  type: "button",
3705
3702
  children: summary
@@ -3707,26 +3704,26 @@ var DataTableListSummary = ({
3707
3704
  }),
3708
3705
  details
3709
3706
  ]
3710
- }) : /* @__PURE__ */ jsx18("span", {
3707
+ }) : /* @__PURE__ */ jsx17("span", {
3711
3708
  className: "text-sm",
3712
3709
  children: summary
3713
3710
  });
3714
3711
  };
3715
3712
  export {
3716
- sortDataTableRows,
3717
- reorderDataTableRows,
3718
- paginateDataTableRows,
3719
- normalizeDataTableColumns,
3720
- groupDataTableRows,
3721
- getDataTableWidth,
3722
- getDataTableSelectableRows,
3723
- filterDataTableRows,
3724
- downloadJson,
3725
- downloadCsv,
3726
- dataTableMessages,
3727
- buildDataTableRows,
3728
- DataTableRowActions,
3729
- DataTableRelationshipCell,
3713
+ DataTable,
3730
3714
  DataTableListSummary,
3731
- DataTable
3715
+ DataTableRelationshipCell,
3716
+ DataTableRowActions,
3717
+ buildDataTableRows,
3718
+ dataTableMessages,
3719
+ downloadCsv,
3720
+ downloadJson,
3721
+ filterDataTableRows,
3722
+ getDataTableSelectableRows,
3723
+ getDataTableWidth,
3724
+ groupDataTableRows,
3725
+ normalizeDataTableColumns,
3726
+ paginateDataTableRows,
3727
+ reorderDataTableRows,
3728
+ sortDataTableRows
3732
3729
  };