@krak-stack/registry 0.10.1 → 0.10.3

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.
@@ -746,6 +746,8 @@ var paginationMessages = (locale = "en", translations) => ({
746
746
  ...translations?.[locale]
747
747
  });
748
748
  function Pagination({
749
+ className,
750
+ pageSizeContentClassName,
749
751
  compact = false,
750
752
  locale: localeOverride,
751
753
  messages: messageOverrides,
@@ -765,7 +767,8 @@ function Pagination({
765
767
  const canGoBack = page > 0;
766
768
  const canGoForward = page + 1 < pageCount;
767
769
  return /* @__PURE__ */ jsxs6("div", {
768
- className: cn("flex flex-col gap-3 px-2 sm:flex-row sm:items-center sm:justify-between", compact && "gap-2 px-0 sm:flex-col sm:items-stretch"),
770
+ "data-slot": "pagination",
771
+ className: cn("flex flex-col gap-3 px-2 sm:flex-row sm:items-center sm:justify-between", compact && "gap-2 px-0 sm:flex-col sm:items-stretch", className),
769
772
  children: [
770
773
  showResults ? /* @__PURE__ */ jsxs6("div", {
771
774
  className: "text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
@@ -806,6 +809,7 @@ function Pagination({
806
809
  }),
807
810
  /* @__PURE__ */ jsx11(SelectContent, {
808
811
  side: "top",
812
+ className: pageSizeContentClassName,
809
813
  children: pageSizes.map((size) => /* @__PURE__ */ jsx11(SelectItem, {
810
814
  value: `${size}`,
811
815
  children: size
@@ -1204,6 +1208,45 @@ var PaginationMeta = Schema.Struct({
1204
1208
  // ../../src/components/ui/data-table.tsx
1205
1209
  import { useKrakstackLocale as useKrakstackLocale3 } from "@krak-stack/registry/krakstack-provider";
1206
1210
  import { jsx as jsx15, jsxs as jsxs9, Fragment } from "react/jsx-runtime";
1211
+ var DataTableStylesContext = createContext(undefined);
1212
+ var styledTablePart = (Part, slot, style) => {
1213
+ const StyledPart = (props) => {
1214
+ const styles = useContext(DataTableStylesContext);
1215
+ const className = cn(props.className, style(styles));
1216
+ return /* @__PURE__ */ jsx15(Part, {
1217
+ "data-table-slot": slot,
1218
+ ...props,
1219
+ className
1220
+ });
1221
+ };
1222
+ return StyledPart;
1223
+ };
1224
+ var Table2 = styledTablePart(Table, "table", (s) => s?.table?.content);
1225
+ var TableHeader2 = styledTablePart(TableHeader, "header", (s) => s?.table?.header);
1226
+ var TableBody2 = styledTablePart(TableBody, "body", (s) => s?.table?.body);
1227
+ var TableRow2 = styledTablePart(TableRow, "row", (s) => s?.table?.row);
1228
+ var TableHead2 = styledTablePart(TableHead, "head", (s) => s?.table?.head);
1229
+ var TableCell2 = styledTablePart(TableCell, "cell", (s) => s?.table?.cell);
1230
+ var Input2 = styledTablePart(Input, "input", (s) => s?.toolbar?.search);
1231
+ var Menubar2 = styledTablePart(Menubar, "menubar", (s) => s?.toolbar?.content);
1232
+ var MenubarTrigger2 = styledTablePart(MenubarTrigger, "menu-trigger", (s) => s?.toolbar?.trigger);
1233
+ var MenubarContent2 = styledTablePart(MenubarContent, "menu", (s) => s?.menu?.content);
1234
+ var MenubarSubContent2 = styledTablePart(MenubarSubContent, "submenu", (s) => s?.menu?.subContent);
1235
+ var MenubarSubTrigger2 = styledTablePart(MenubarSubTrigger, "submenu-trigger", (s) => s?.menu?.subTrigger);
1236
+ var MenubarItem2 = styledTablePart(MenubarItem, "menu-item", (s) => s?.menu?.item);
1237
+ var MenubarCheckboxItem2 = styledTablePart(MenubarCheckboxItem, "menu-checkbox-item", (s) => s?.menu?.item);
1238
+ var MenubarRadioItem2 = styledTablePart(MenubarRadioItem, "menu-radio-item", (s) => s?.menu?.item);
1239
+ var MenubarLabel2 = styledTablePart(MenubarLabel, "menu-label", (s) => s?.menu?.label);
1240
+ var MenubarSeparator2 = styledTablePart(MenubarSeparator, "menu-separator", (s) => s?.menu?.separator);
1241
+ var DropdownMenuTrigger2 = styledTablePart(DropdownMenuTrigger, "row-menu-trigger", (s) => s?.toolbar?.trigger);
1242
+ var DropdownMenuContent2 = styledTablePart(DropdownMenuContent, "row-menu", (s) => s?.menu?.content);
1243
+ var DropdownMenuSubContent2 = styledTablePart(DropdownMenuSubContent, "row-submenu", (s) => s?.menu?.subContent);
1244
+ var DropdownMenuSubTrigger2 = styledTablePart(DropdownMenuSubTrigger, "row-submenu-trigger", (s) => s?.menu?.subTrigger);
1245
+ var DropdownMenuItem2 = styledTablePart(DropdownMenuItem, "row-menu-item", (s) => s?.menu?.item);
1246
+ var DropdownMenuLabel2 = styledTablePart(DropdownMenuLabel, "row-menu-label", (s) => s?.menu?.label);
1247
+ var DropdownMenuSeparator2 = styledTablePart(DropdownMenuSeparator, "row-menu-separator", (s) => s?.menu?.separator);
1248
+ var SelectContent2 = styledTablePart(SelectContent, "select-popup", (s) => s?.popup?.select);
1249
+ var TooltipContent2 = styledTablePart(TooltipContent, "tooltip", (s) => s?.popup?.tooltip);
1207
1250
  var DataTablePersistedUiStateSchema = Schema2.Struct({
1208
1251
  columnVisibility: Schema2.Record(Schema2.String, Schema2.Boolean),
1209
1252
  columnSizing: Schema2.Record(Schema2.String, Schema2.Finite),
@@ -1967,7 +2010,7 @@ var DataTableRowActions = ({
1967
2010
  return null;
1968
2011
  return /* @__PURE__ */ jsxs9(DropdownMenu, {
1969
2012
  children: [
1970
- /* @__PURE__ */ jsx15(DropdownMenuTrigger, {
2013
+ /* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
1971
2014
  onClick: (event) => event.stopPropagation(),
1972
2015
  render: /* @__PURE__ */ jsxs9(Button, {
1973
2016
  className: "size-8 focus-visible:ring-inset [&_svg:not([class*='size-'])]:size-4",
@@ -1982,16 +2025,16 @@ var DataTableRowActions = ({
1982
2025
  ]
1983
2026
  })
1984
2027
  }),
1985
- /* @__PURE__ */ jsx15(DropdownMenuContent, {
2028
+ /* @__PURE__ */ jsx15(DropdownMenuContent2, {
1986
2029
  align: "end",
1987
2030
  className: "w-max",
1988
2031
  children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
1989
2032
  children: [
1990
- /* @__PURE__ */ jsx15(DropdownMenuLabel, {
2033
+ /* @__PURE__ */ jsx15(DropdownMenuLabel2, {
1991
2034
  children: title
1992
2035
  }),
1993
- /* @__PURE__ */ jsx15(DropdownMenuSeparator, {}),
1994
- visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem, {
2036
+ /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}),
2037
+ visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
1995
2038
  onClick: (event) => {
1996
2039
  event.stopPropagation();
1997
2040
  action.onClick(row);
@@ -2097,7 +2140,7 @@ var DataTableToolbar = ({
2097
2140
  /* @__PURE__ */ jsx15(Search, {
2098
2141
  className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"
2099
2142
  }),
2100
- /* @__PURE__ */ jsx15(Input, {
2143
+ /* @__PURE__ */ jsx15(Input2, {
2101
2144
  className: "px-9",
2102
2145
  onChange: (event) => update((state) => ({
2103
2146
  ...state,
@@ -2123,12 +2166,12 @@ var DataTableToolbar = ({
2123
2166
  }) : null,
2124
2167
  /* @__PURE__ */ jsx15("div", {
2125
2168
  className: "-m-1 flex overflow-x-auto p-1",
2126
- children: /* @__PURE__ */ jsxs9(Menubar, {
2169
+ children: /* @__PURE__ */ jsxs9(Menubar2, {
2127
2170
  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",
2128
2171
  children: [
2129
2172
  visibleBulkActions.length ? /* @__PURE__ */ jsxs9(MenubarMenu, {
2130
2173
  children: [
2131
- /* @__PURE__ */ jsxs9(MenubarTrigger, {
2174
+ /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2132
2175
  className: "bg-primary text-primary-foreground hover:bg-primary/90 aria-expanded:bg-primary/90",
2133
2176
  children: [
2134
2177
  labels.selected,
@@ -2139,16 +2182,16 @@ var DataTableToolbar = ({
2139
2182
  /* @__PURE__ */ jsx15(ChevronDown, {})
2140
2183
  ]
2141
2184
  }),
2142
- /* @__PURE__ */ jsx15(MenubarContent, {
2185
+ /* @__PURE__ */ jsx15(MenubarContent2, {
2143
2186
  align: "end",
2144
2187
  className: "w-max",
2145
2188
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2146
2189
  children: [
2147
- /* @__PURE__ */ jsx15(MenubarLabel, {
2190
+ /* @__PURE__ */ jsx15(MenubarLabel2, {
2148
2191
  children: bulkActions && bulkActions.label ? bulkActions.label : labels.actions
2149
2192
  }),
2150
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2151
- visibleBulkActions.map((action) => /* @__PURE__ */ jsxs9(MenubarItem, {
2193
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2194
+ visibleBulkActions.map((action) => /* @__PURE__ */ jsxs9(MenubarItem2, {
2152
2195
  onClick: () => action.onClick(selectedRows),
2153
2196
  variant: action.variant ?? "default",
2154
2197
  children: [
@@ -2167,7 +2210,7 @@ var DataTableToolbar = ({
2167
2210
  }) : null,
2168
2211
  grouping ? /* @__PURE__ */ jsxs9(MenubarMenu, {
2169
2212
  children: [
2170
- /* @__PURE__ */ jsxs9(MenubarTrigger, {
2213
+ /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2171
2214
  "aria-label": labels.groupBy,
2172
2215
  children: [
2173
2216
  /* @__PURE__ */ jsx15(Rows3, {}),
@@ -2177,15 +2220,15 @@ var DataTableToolbar = ({
2177
2220
  })
2178
2221
  ]
2179
2222
  }),
2180
- /* @__PURE__ */ jsx15(MenubarContent, {
2223
+ /* @__PURE__ */ jsx15(MenubarContent2, {
2181
2224
  align: "end",
2182
2225
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2183
2226
  children: [
2184
- /* @__PURE__ */ jsx15(MenubarLabel, {
2227
+ /* @__PURE__ */ jsx15(MenubarLabel2, {
2185
2228
  children: labels.groupBy
2186
2229
  }),
2187
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2188
- grouping.fields.map((field) => /* @__PURE__ */ jsx15(MenubarCheckboxItem, {
2230
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2231
+ grouping.fields.map((field) => /* @__PURE__ */ jsx15(MenubarCheckboxItem2, {
2189
2232
  checked: store.state.grouping.includes(field.id),
2190
2233
  onCheckedChange: (checked) => update((state) => ({
2191
2234
  ...state,
@@ -2208,7 +2251,7 @@ var DataTableToolbar = ({
2208
2251
  tableAtom
2209
2252
  }) : null,
2210
2253
  features.refresh ? /* @__PURE__ */ jsx15(MenubarMenu, {
2211
- children: /* @__PURE__ */ jsxs9(MenubarTrigger, {
2254
+ children: /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2212
2255
  "aria-label": labels.refresh,
2213
2256
  onClick: features.refresh,
2214
2257
  children: [
@@ -2222,7 +2265,7 @@ var DataTableToolbar = ({
2222
2265
  }) : null,
2223
2266
  features.export ? /* @__PURE__ */ jsxs9(MenubarMenu, {
2224
2267
  children: [
2225
- /* @__PURE__ */ jsxs9(MenubarTrigger, {
2268
+ /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2226
2269
  "aria-label": labels.export,
2227
2270
  "aria-busy": exporting,
2228
2271
  disabled: exporting || !canExport,
@@ -2236,17 +2279,17 @@ var DataTableToolbar = ({
2236
2279
  })
2237
2280
  ]
2238
2281
  }),
2239
- /* @__PURE__ */ jsx15(MenubarContent, {
2282
+ /* @__PURE__ */ jsx15(MenubarContent2, {
2240
2283
  align: "end",
2241
2284
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2242
2285
  children: [
2243
- /* @__PURE__ */ jsx15(MenubarLabel, {
2286
+ /* @__PURE__ */ jsx15(MenubarLabel2, {
2244
2287
  children: labels.export
2245
2288
  }),
2246
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2289
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2247
2290
  builtInExport ? /* @__PURE__ */ jsxs9(Fragment, {
2248
2291
  children: [
2249
- /* @__PURE__ */ jsxs9(MenubarItem, {
2292
+ /* @__PURE__ */ jsxs9(MenubarItem2, {
2250
2293
  disabled: exporting || !exportRows.length,
2251
2294
  onClick: () => downloadCsv(exportColumns.map(columnLabel), exportRows.map((row) => exportColumns.map((column) => dataTableValueText(getDataTableExportValue(row, column, store.config.locale) ?? ""))), features.export ? features.export.baseName : "table"),
2252
2295
  children: [
@@ -2254,7 +2297,7 @@ var DataTableToolbar = ({
2254
2297
  labels.exportCsv
2255
2298
  ]
2256
2299
  }),
2257
- /* @__PURE__ */ jsxs9(MenubarItem, {
2300
+ /* @__PURE__ */ jsxs9(MenubarItem2, {
2258
2301
  disabled: exporting || !exportRows.length,
2259
2302
  onClick: () => downloadJson(exportRows.map((row) => Object.fromEntries(exportColumns.map((column) => [
2260
2303
  column.id,
@@ -2267,8 +2310,8 @@ var DataTableToolbar = ({
2267
2310
  })
2268
2311
  ]
2269
2312
  }) : null,
2270
- builtInExport && exportActions.length ? /* @__PURE__ */ jsx15(MenubarSeparator, {}) : null,
2271
- exportActions.map((action) => /* @__PURE__ */ jsxs9(MenubarItem, {
2313
+ builtInExport && exportActions.length ? /* @__PURE__ */ jsx15(MenubarSeparator2, {}) : null,
2314
+ exportActions.map((action) => /* @__PURE__ */ jsxs9(MenubarItem2, {
2272
2315
  disabled: exporting || action.disabled,
2273
2316
  onClick: () => void runExport(action),
2274
2317
  children: [
@@ -2334,20 +2377,20 @@ var FilterEditor = ({
2334
2377
  value: current?.kind === "boolean" ? String(current.value) : "",
2335
2378
  onValueChange: (value) => apply({ id: column.id, kind, value: value === "true" }),
2336
2379
  children: [
2337
- /* @__PURE__ */ jsx15(MenubarRadioItem, {
2380
+ /* @__PURE__ */ jsx15(MenubarRadioItem2, {
2338
2381
  value: "true",
2339
2382
  closeOnClick: false,
2340
2383
  children: column.colDef.type === "boolean" ? column.colDef.typeOptions?.trueLabel ?? labels.filterTrue : labels.filterTrue
2341
2384
  }),
2342
- /* @__PURE__ */ jsx15(MenubarRadioItem, {
2385
+ /* @__PURE__ */ jsx15(MenubarRadioItem2, {
2343
2386
  value: "false",
2344
2387
  closeOnClick: false,
2345
2388
  children: column.colDef.type === "boolean" ? column.colDef.typeOptions?.falseLabel ?? labels.filterFalse : labels.filterFalse
2346
2389
  })
2347
2390
  ]
2348
2391
  }),
2349
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2350
- /* @__PURE__ */ jsx15(MenubarItem, {
2392
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2393
+ /* @__PURE__ */ jsx15(MenubarItem2, {
2351
2394
  closeOnClick: false,
2352
2395
  onClick: () => onChange(undefined),
2353
2396
  children: labels.filterClear
@@ -2363,7 +2406,7 @@ var FilterEditor = ({
2363
2406
  children: [
2364
2407
  options.length > 8 ? /* @__PURE__ */ jsx15("div", {
2365
2408
  className: "p-1",
2366
- children: /* @__PURE__ */ jsx15(Input, {
2409
+ children: /* @__PURE__ */ jsx15(Input2, {
2367
2410
  "aria-label": labels.filter,
2368
2411
  placeholder: labels.filter,
2369
2412
  value: optionSearch,
@@ -2374,7 +2417,7 @@ var FilterEditor = ({
2374
2417
  }
2375
2418
  })
2376
2419
  }) : null,
2377
- filteredOptions.map((option) => /* @__PURE__ */ jsxs9(MenubarCheckboxItem, {
2420
+ filteredOptions.map((option) => /* @__PURE__ */ jsxs9(MenubarCheckboxItem2, {
2378
2421
  checked: selected.includes(option.value),
2379
2422
  closeOnClick: false,
2380
2423
  onCheckedChange: (checked) => {
@@ -2400,8 +2443,8 @@ var FilterEditor = ({
2400
2443
  className: "text-muted-foreground px-2 py-1.5 text-sm",
2401
2444
  children: labels.empty
2402
2445
  }) : null,
2403
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2404
- /* @__PURE__ */ jsx15(MenubarItem, {
2446
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2447
+ /* @__PURE__ */ jsx15(MenubarItem2, {
2405
2448
  closeOnClick: false,
2406
2449
  onClick: () => onChange(undefined),
2407
2450
  children: labels.filterClear
@@ -2463,7 +2506,7 @@ var FilterEditor = ({
2463
2506
  id: `${inputId}-operator`,
2464
2507
  children: /* @__PURE__ */ jsx15(SelectValue, {})
2465
2508
  }),
2466
- /* @__PURE__ */ jsx15(SelectContent, {
2509
+ /* @__PURE__ */ jsx15(SelectContent2, {
2467
2510
  children: /* @__PURE__ */ jsx15(SelectGroup, {
2468
2511
  children: operatorOptions.map((option) => /* @__PURE__ */ jsx15(SelectItem, {
2469
2512
  value: option.value,
@@ -2482,7 +2525,7 @@ var FilterEditor = ({
2482
2525
  htmlFor: `${inputId}-primary`,
2483
2526
  children: kind === "text" ? labels.filterValue : kind === "date" ? labels.filterFrom : labels.filterMin
2484
2527
  }),
2485
- /* @__PURE__ */ jsx15(Input, {
2528
+ /* @__PURE__ */ jsx15(Input2, {
2486
2529
  id: `${inputId}-primary`,
2487
2530
  type: kind === "text" ? "text" : kind === "date" ? "date" : "number",
2488
2531
  step: kind === "number" ? "any" : undefined,
@@ -2502,7 +2545,7 @@ var FilterEditor = ({
2502
2545
  htmlFor: `${inputId}-secondary`,
2503
2546
  children: kind === "date" ? labels.filterTo : labels.filterMax
2504
2547
  }),
2505
- /* @__PURE__ */ jsx15(Input, {
2548
+ /* @__PURE__ */ jsx15(Input2, {
2506
2549
  id: `${inputId}-secondary`,
2507
2550
  type: kind === "date" ? "date" : "number",
2508
2551
  step: kind === "number" ? "any" : undefined,
@@ -2562,7 +2605,7 @@ var FilterMenu = ({
2562
2605
  const update = (id, filter) => changeState(setStore, (state) => withColumnFilter(state, id, filter));
2563
2606
  return /* @__PURE__ */ jsxs9(MenubarMenu, {
2564
2607
  children: [
2565
- /* @__PURE__ */ jsxs9(MenubarTrigger, {
2608
+ /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2566
2609
  "aria-label": store.config.labels.filters,
2567
2610
  children: [
2568
2611
  /* @__PURE__ */ jsx15(ListFilter, {}),
@@ -2575,18 +2618,18 @@ var FilterMenu = ({
2575
2618
  }) : null
2576
2619
  ]
2577
2620
  }),
2578
- /* @__PURE__ */ jsx15(MenubarContent, {
2621
+ /* @__PURE__ */ jsx15(MenubarContent2, {
2579
2622
  align: "end",
2580
2623
  className: "w-80 max-w-[calc(100vw-2rem)]",
2581
2624
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2582
2625
  children: [
2583
- /* @__PURE__ */ jsx15(MenubarLabel, {
2626
+ /* @__PURE__ */ jsx15(MenubarLabel2, {
2584
2627
  children: store.config.labels.filters
2585
2628
  }),
2586
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2629
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2587
2630
  columns.map(({ column, label }) => /* @__PURE__ */ jsxs9(MenubarSub, {
2588
2631
  children: [
2589
- /* @__PURE__ */ jsxs9(MenubarSubTrigger, {
2632
+ /* @__PURE__ */ jsxs9(MenubarSubTrigger2, {
2590
2633
  children: [
2591
2634
  /* @__PURE__ */ jsx15("span", {
2592
2635
  className: "min-w-0 flex-1 truncate",
@@ -2595,7 +2638,7 @@ var FilterMenu = ({
2595
2638
  filters.some((filter) => filter.id === column.id) ? /* @__PURE__ */ jsx15(Check, {}) : null
2596
2639
  ]
2597
2640
  }),
2598
- /* @__PURE__ */ jsx15(MenubarSubContent, {
2641
+ /* @__PURE__ */ jsx15(MenubarSubContent2, {
2599
2642
  className: "w-80 max-w-[calc(100vw-2rem)]",
2600
2643
  children: /* @__PURE__ */ jsx15(FilterEditor, {
2601
2644
  column,
@@ -2609,8 +2652,8 @@ var FilterMenu = ({
2609
2652
  }, column.id)),
2610
2653
  filters.length ? /* @__PURE__ */ jsxs9(Fragment, {
2611
2654
  children: [
2612
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2613
- /* @__PURE__ */ jsxs9(MenubarItem, {
2655
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2656
+ /* @__PURE__ */ jsxs9(MenubarItem2, {
2614
2657
  onClick: () => changeState(setStore, (state) => ({
2615
2658
  ...state,
2616
2659
  page: 0,
@@ -2650,7 +2693,7 @@ var SortMenu = ({
2650
2693
  }));
2651
2694
  return /* @__PURE__ */ jsxs9(MenubarMenu, {
2652
2695
  children: [
2653
- /* @__PURE__ */ jsxs9(MenubarTrigger, {
2696
+ /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2654
2697
  "aria-label": store.config.labels.sortBy,
2655
2698
  children: [
2656
2699
  current ? current.direction === "desc" ? /* @__PURE__ */ jsx15(ArrowDown, {}) : /* @__PURE__ */ jsx15(ArrowUp, {}) : /* @__PURE__ */ jsx15(ChevronsUpDown, {}),
@@ -2660,28 +2703,28 @@ var SortMenu = ({
2660
2703
  })
2661
2704
  ]
2662
2705
  }),
2663
- /* @__PURE__ */ jsx15(MenubarContent, {
2706
+ /* @__PURE__ */ jsx15(MenubarContent2, {
2664
2707
  align: "end",
2665
2708
  className: "w-52",
2666
2709
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2667
2710
  children: [
2668
- /* @__PURE__ */ jsx15(MenubarLabel, {
2711
+ /* @__PURE__ */ jsx15(MenubarLabel2, {
2669
2712
  children: store.config.labels.sortBy
2670
2713
  }),
2671
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2714
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2672
2715
  columns.map((column) => {
2673
2716
  const sortState = store.state.sort?.find(({ id }) => id === column.id);
2674
2717
  return /* @__PURE__ */ jsxs9(MenubarSub, {
2675
2718
  children: [
2676
- /* @__PURE__ */ jsxs9(MenubarSubTrigger, {
2719
+ /* @__PURE__ */ jsxs9(MenubarSubTrigger2, {
2677
2720
  children: [
2678
2721
  sortState ? sortState.direction === "desc" ? /* @__PURE__ */ jsx15(ArrowDown, {}) : /* @__PURE__ */ jsx15(ArrowUp, {}) : null,
2679
2722
  columnLabel(column)
2680
2723
  ]
2681
2724
  }),
2682
- /* @__PURE__ */ jsxs9(MenubarSubContent, {
2725
+ /* @__PURE__ */ jsxs9(MenubarSubContent2, {
2683
2726
  children: [
2684
- /* @__PURE__ */ jsxs9(MenubarItem, {
2727
+ /* @__PURE__ */ jsxs9(MenubarItem2, {
2685
2728
  onClick: () => sort(column.id, "asc"),
2686
2729
  children: [
2687
2730
  /* @__PURE__ */ jsx15(ArrowUp, {}),
@@ -2689,7 +2732,7 @@ var SortMenu = ({
2689
2732
  store.config.labels.sortAsc
2690
2733
  ]
2691
2734
  }),
2692
- /* @__PURE__ */ jsxs9(MenubarItem, {
2735
+ /* @__PURE__ */ jsxs9(MenubarItem2, {
2693
2736
  onClick: () => sort(column.id, "desc"),
2694
2737
  children: [
2695
2738
  /* @__PURE__ */ jsx15(ArrowDown, {}),
@@ -2699,8 +2742,8 @@ var SortMenu = ({
2699
2742
  }),
2700
2743
  sortState ? /* @__PURE__ */ jsxs9(Fragment, {
2701
2744
  children: [
2702
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2703
- /* @__PURE__ */ jsxs9(MenubarItem, {
2745
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2746
+ /* @__PURE__ */ jsxs9(MenubarItem2, {
2704
2747
  onClick: () => changeState(setStore, (state) => ({
2705
2748
  ...state,
2706
2749
  sort: state.sort?.filter(({ id }) => id !== column.id)
@@ -2730,7 +2773,7 @@ var ViewMenu = ({
2730
2773
  const [store, setStore] = useTableAtom(tableAtom);
2731
2774
  return /* @__PURE__ */ jsxs9(MenubarMenu, {
2732
2775
  children: [
2733
- /* @__PURE__ */ jsxs9(MenubarTrigger, {
2776
+ /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2734
2777
  "aria-label": store.config.labels.view,
2735
2778
  children: [
2736
2779
  store.state.view === "gallery" ? /* @__PURE__ */ jsx15(LayoutGrid, {}) : /* @__PURE__ */ jsx15(Rows3, {}),
@@ -2740,14 +2783,14 @@ var ViewMenu = ({
2740
2783
  })
2741
2784
  ]
2742
2785
  }),
2743
- /* @__PURE__ */ jsx15(MenubarContent, {
2786
+ /* @__PURE__ */ jsx15(MenubarContent2, {
2744
2787
  align: "end",
2745
2788
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2746
2789
  children: [
2747
- /* @__PURE__ */ jsx15(MenubarLabel, {
2790
+ /* @__PURE__ */ jsx15(MenubarLabel2, {
2748
2791
  children: store.config.labels.view
2749
2792
  }),
2750
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2793
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2751
2794
  /* @__PURE__ */ jsxs9(MenubarRadioGroup, {
2752
2795
  onValueChange: (view) => {
2753
2796
  if (view === "table" || view === "gallery") {
@@ -2756,7 +2799,7 @@ var ViewMenu = ({
2756
2799
  },
2757
2800
  value: store.state.view,
2758
2801
  children: [
2759
- /* @__PURE__ */ jsxs9(MenubarRadioItem, {
2802
+ /* @__PURE__ */ jsxs9(MenubarRadioItem2, {
2760
2803
  value: "table",
2761
2804
  children: [
2762
2805
  /* @__PURE__ */ jsx15(Rows3, {}),
@@ -2764,7 +2807,7 @@ var ViewMenu = ({
2764
2807
  store.config.labels.tableView
2765
2808
  ]
2766
2809
  }),
2767
- /* @__PURE__ */ jsxs9(MenubarRadioItem, {
2810
+ /* @__PURE__ */ jsxs9(MenubarRadioItem2, {
2768
2811
  value: "gallery",
2769
2812
  children: [
2770
2813
  /* @__PURE__ */ jsx15(LayoutGrid, {}),
@@ -2789,7 +2832,7 @@ var ColumnMenu = ({
2789
2832
  return null;
2790
2833
  return /* @__PURE__ */ jsxs9(MenubarMenu, {
2791
2834
  children: [
2792
- /* @__PURE__ */ jsxs9(MenubarTrigger, {
2835
+ /* @__PURE__ */ jsxs9(MenubarTrigger2, {
2793
2836
  "aria-label": store.config.labels.columns,
2794
2837
  children: [
2795
2838
  /* @__PURE__ */ jsx15(Settings2, {}),
@@ -2799,15 +2842,15 @@ var ColumnMenu = ({
2799
2842
  })
2800
2843
  ]
2801
2844
  }),
2802
- /* @__PURE__ */ jsx15(MenubarContent, {
2845
+ /* @__PURE__ */ jsx15(MenubarContent2, {
2803
2846
  align: "end",
2804
2847
  children: /* @__PURE__ */ jsxs9(MenubarGroup, {
2805
2848
  children: [
2806
- /* @__PURE__ */ jsx15(MenubarLabel, {
2849
+ /* @__PURE__ */ jsx15(MenubarLabel2, {
2807
2850
  children: store.config.labels.columns
2808
2851
  }),
2809
- /* @__PURE__ */ jsx15(MenubarSeparator, {}),
2810
- columns.map((column) => /* @__PURE__ */ jsx15(MenubarCheckboxItem, {
2852
+ /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2853
+ columns.map((column) => /* @__PURE__ */ jsx15(MenubarCheckboxItem2, {
2811
2854
  checked: store.state.columnVisibility[column.id] !== false,
2812
2855
  onCheckedChange: (visible) => changeState(setStore, (state) => ({
2813
2856
  ...state,
@@ -3034,7 +3077,7 @@ var TableDataRow = ({
3034
3077
  const selection = store.config.features.selection;
3035
3078
  const selectable = !!selection && (selection.isRowSelectable?.(row.data) ?? true);
3036
3079
  const draggable = canDragRows(store);
3037
- return /* @__PURE__ */ jsxs9(TableRow, {
3080
+ return /* @__PURE__ */ jsxs9(TableRow2, {
3038
3081
  className: cn("group/row data-[drop-position=before]:[&>td]:border-primary data-[drop-position=after]:[&>td]:border-primary h-16 data-[drag-source=true]:opacity-40 data-[drop-position=after]:[&>td]:border-b-2 data-[drop-position=before]:[&>td]:border-t-2", store.config.onRowClicked && "cursor-pointer"),
3039
3082
  "data-state": store.state.rowSelection[row.id] && "selected",
3040
3083
  "data-table-row": row.id,
@@ -3047,7 +3090,7 @@ var TableDataRow = ({
3047
3090
  },
3048
3091
  tabIndex: store.config.onRowClicked ? 0 : undefined,
3049
3092
  children: [
3050
- selection ? /* @__PURE__ */ jsx15(TableCell, {
3093
+ selection ? /* @__PURE__ */ jsx15(TableCell2, {
3051
3094
  className: "w-10 pr-0",
3052
3095
  onClick: (event) => event.stopPropagation(),
3053
3096
  children: /* @__PURE__ */ jsx15(Checkbox, {
@@ -3057,13 +3100,13 @@ var TableDataRow = ({
3057
3100
  onCheckedChange: (checked) => toggleRow(store, setStore, row.id, checked)
3058
3101
  })
3059
3102
  }) : null,
3060
- draggable ? /* @__PURE__ */ jsx15(TableCell, {
3103
+ draggable ? /* @__PURE__ */ jsx15(TableCell2, {
3061
3104
  className: "w-10 pr-0",
3062
3105
  children: /* @__PURE__ */ jsx15(DragHandle, {
3063
3106
  tableAtom
3064
3107
  })
3065
3108
  }) : null,
3066
- model.visibleColumns.map((column) => /* @__PURE__ */ jsx15(TableCell, {
3109
+ model.visibleColumns.map((column) => /* @__PURE__ */ jsx15(TableCell2, {
3067
3110
  className: cn("min-w-24 overflow-hidden has-[[data-slot=data-table-boolean-cell]]:relative has-[[data-slot=data-table-boolean-cell]]:p-0 has-[[data-slot=data-table-list-cell]]:relative has-[[data-slot=data-table-list-cell]]:p-0", column.colDef.truncate ? "whitespace-nowrap" : "whitespace-normal"),
3068
3111
  style: { width: column.width },
3069
3112
  children: /* @__PURE__ */ jsx15("div", {
@@ -3071,7 +3114,7 @@ var TableDataRow = ({
3071
3114
  children: renderCell(row, column, store.config.locale, store.config.labels)
3072
3115
  })
3073
3116
  }, column.id)),
3074
- hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(TableCell, {
3117
+ hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(TableCell2, {
3075
3118
  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))]",
3076
3119
  onClick: (event) => event.stopPropagation(),
3077
3120
  children: /* @__PURE__ */ jsx15("div", {
@@ -3094,7 +3137,7 @@ var GroupActions = ({
3094
3137
  return null;
3095
3138
  return /* @__PURE__ */ jsxs9(DropdownMenu, {
3096
3139
  children: [
3097
- /* @__PURE__ */ jsx15(DropdownMenuTrigger, {
3140
+ /* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
3098
3141
  onClick: (event) => event.stopPropagation(),
3099
3142
  render: /* @__PURE__ */ jsxs9(Button, {
3100
3143
  size: "icon",
@@ -3108,10 +3151,10 @@ var GroupActions = ({
3108
3151
  ]
3109
3152
  })
3110
3153
  }),
3111
- /* @__PURE__ */ jsx15(DropdownMenuContent, {
3154
+ /* @__PURE__ */ jsx15(DropdownMenuContent2, {
3112
3155
  align: "end",
3113
3156
  children: /* @__PURE__ */ jsx15(DropdownMenuGroup, {
3114
- children: visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3157
+ children: visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
3115
3158
  onClick: () => action.onClick(groupId),
3116
3159
  variant: action.variant ?? "default",
3117
3160
  children: [
@@ -3142,14 +3185,14 @@ var GroupedTable = ({
3142
3185
  [section.key]: !collapsed
3143
3186
  }
3144
3187
  }));
3145
- const body = /* @__PURE__ */ jsxs9(TableBody, {
3188
+ const body = /* @__PURE__ */ jsxs9(TableBody2, {
3146
3189
  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",
3147
3190
  "data-table-group": section.field.onMoveToGroup ? targetKey : undefined,
3148
3191
  children: [
3149
- /* @__PURE__ */ jsx15(TableRow, {
3192
+ /* @__PURE__ */ jsx15(TableRow2, {
3150
3193
  className: "bg-muted/40 hover:bg-accent! cursor-pointer",
3151
3194
  onClick: toggleCollapsed,
3152
- children: /* @__PURE__ */ jsx15(TableCell, {
3195
+ children: /* @__PURE__ */ jsx15(TableCell2, {
3153
3196
  colSpan: model.visibleColumns.length + extra,
3154
3197
  children: /* @__PURE__ */ jsxs9("div", {
3155
3198
  className: "flex items-center gap-2",
@@ -3190,8 +3233,8 @@ var GroupedTable = ({
3190
3233
  tableAtom
3191
3234
  })
3192
3235
  }, `${section.key}:${row.id}`)) : [
3193
- /* @__PURE__ */ jsx15(TableRow, {
3194
- children: /* @__PURE__ */ jsx15(TableCell, {
3236
+ /* @__PURE__ */ jsx15(TableRow2, {
3237
+ children: /* @__PURE__ */ jsx15(TableCell2, {
3195
3238
  className: "text-muted-foreground h-16",
3196
3239
  colSpan: model.visibleColumns.length + extra,
3197
3240
  children: section.field.renderEmptyGroup?.(section.groupId) ?? store.config.labels.empty
@@ -3240,7 +3283,7 @@ var ColumnHeaderMenu = ({
3240
3283
  const label = columnLabel(column);
3241
3284
  const sortItems = (field) => /* @__PURE__ */ jsxs9(Fragment, {
3242
3285
  children: [
3243
- /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3286
+ /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
3244
3287
  onClick: () => setSort(field.id, "asc"),
3245
3288
  children: [
3246
3289
  /* @__PURE__ */ jsx15(ArrowUp, {}),
@@ -3248,7 +3291,7 @@ var ColumnHeaderMenu = ({
3248
3291
  store.config.labels.sortAsc
3249
3292
  ]
3250
3293
  }),
3251
- /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3294
+ /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
3252
3295
  onClick: () => setSort(field.id, "desc"),
3253
3296
  children: [
3254
3297
  /* @__PURE__ */ jsx15(ArrowDown, {}),
@@ -3266,7 +3309,7 @@ var ColumnHeaderMenu = ({
3266
3309
  }
3267
3310
  return /* @__PURE__ */ jsxs9(DropdownMenu, {
3268
3311
  children: [
3269
- /* @__PURE__ */ jsx15(DropdownMenuTrigger, {
3312
+ /* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
3270
3313
  render: /* @__PURE__ */ jsxs9(Button, {
3271
3314
  "aria-label": label,
3272
3315
  "aria-description": activeFilters.length ? `${store.config.labels.filters}: ${activeFilters.length}` : undefined,
@@ -3282,7 +3325,7 @@ var ColumnHeaderMenu = ({
3282
3325
  ]
3283
3326
  })
3284
3327
  }),
3285
- /* @__PURE__ */ jsx15(DropdownMenuContent, {
3328
+ /* @__PURE__ */ jsx15(DropdownMenuContent2, {
3286
3329
  align: "start",
3287
3330
  className: "w-48",
3288
3331
  children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
@@ -3291,17 +3334,17 @@ var ColumnHeaderMenu = ({
3291
3334
  children: [
3292
3335
  column.colDef.fields?.length ? sortColumns.map((field) => /* @__PURE__ */ jsxs9(DropdownMenuSub, {
3293
3336
  children: [
3294
- /* @__PURE__ */ jsx15(DropdownMenuSubTrigger, {
3337
+ /* @__PURE__ */ jsx15(DropdownMenuSubTrigger2, {
3295
3338
  children: columnLabel(field)
3296
3339
  }),
3297
- /* @__PURE__ */ jsx15(DropdownMenuSubContent, {
3340
+ /* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
3298
3341
  children: /* @__PURE__ */ jsx15(DropdownMenuGroup, {
3299
3342
  children: sortItems(field)
3300
3343
  })
3301
3344
  })
3302
3345
  ]
3303
3346
  }, field.id)) : sortItems(column),
3304
- sort ? /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3347
+ sort ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
3305
3348
  onClick: () => update((state) => ({
3306
3349
  ...state,
3307
3350
  sort: state.sort?.filter(({ id }) => !ownsSort(id))
@@ -3314,29 +3357,29 @@ var ColumnHeaderMenu = ({
3314
3357
  }) : null
3315
3358
  ]
3316
3359
  }) : null,
3317
- sortingEnabled && filteringEnabled ? /* @__PURE__ */ jsx15(DropdownMenuSeparator, {}) : null,
3360
+ sortingEnabled && filteringEnabled ? /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}) : null,
3318
3361
  filteringEnabled ? /* @__PURE__ */ jsxs9(Fragment, {
3319
3362
  children: [
3320
3363
  /* @__PURE__ */ jsxs9(DropdownMenuSub, {
3321
3364
  children: [
3322
- /* @__PURE__ */ jsxs9(DropdownMenuSubTrigger, {
3365
+ /* @__PURE__ */ jsxs9(DropdownMenuSubTrigger2, {
3323
3366
  children: [
3324
3367
  /* @__PURE__ */ jsx15(ListFilter, {}),
3325
3368
  store.config.labels.filters
3326
3369
  ]
3327
3370
  }),
3328
- /* @__PURE__ */ jsx15(DropdownMenuSubContent, {
3371
+ /* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
3329
3372
  className: "w-80 max-w-[calc(100vw-2rem)]",
3330
3373
  children: column.colDef.fields?.length ? /* @__PURE__ */ jsx15(DropdownMenuGroup, {
3331
3374
  children: filterColumns.map((field) => /* @__PURE__ */ jsxs9(DropdownMenuSub, {
3332
3375
  children: [
3333
- /* @__PURE__ */ jsxs9(DropdownMenuSubTrigger, {
3376
+ /* @__PURE__ */ jsxs9(DropdownMenuSubTrigger2, {
3334
3377
  children: [
3335
3378
  columnLabel(field),
3336
3379
  activeFilters.some((filter) => filter.id === field.id) ? /* @__PURE__ */ jsx15(Check, {}) : null
3337
3380
  ]
3338
3381
  }),
3339
- /* @__PURE__ */ jsx15(DropdownMenuSubContent, {
3382
+ /* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
3340
3383
  className: "w-80 max-w-[calc(100vw-2rem)]",
3341
3384
  children: filterEditor(field)
3342
3385
  })
@@ -3346,7 +3389,7 @@ var ColumnHeaderMenu = ({
3346
3389
  })
3347
3390
  ]
3348
3391
  }),
3349
- activeFilters.length ? /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3392
+ activeFilters.length ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
3350
3393
  onClick: () => update((state) => {
3351
3394
  const filters = state.filters?.filter(({ id }) => !ownsFilter(id));
3352
3395
  return {
@@ -3362,8 +3405,8 @@ var ColumnHeaderMenu = ({
3362
3405
  }) : null
3363
3406
  ]
3364
3407
  }) : null,
3365
- (sortingEnabled || filteringEnabled) && hidingEnabled ? /* @__PURE__ */ jsx15(DropdownMenuSeparator, {}) : null,
3366
- hidingEnabled ? /* @__PURE__ */ jsxs9(DropdownMenuItem, {
3408
+ (sortingEnabled || filteringEnabled) && hidingEnabled ? /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}) : null,
3409
+ hidingEnabled ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
3367
3410
  onClick: () => update((state) => ({
3368
3411
  ...state,
3369
3412
  columnVisibility: {
@@ -3394,10 +3437,10 @@ var DataTableHeader = ({
3394
3437
  const selectableRows = getDataTableSelectableRows(model, grouped, selection ? selection.isRowSelectable : undefined);
3395
3438
  const allSelected = selectableRows.length > 0 && selectableRows.every((row) => store.state.rowSelection[row.id]);
3396
3439
  const someSelected = selectableRows.some((row) => store.state.rowSelection[row.id]);
3397
- return /* @__PURE__ */ jsx15(TableHeader, {
3398
- children: /* @__PURE__ */ jsxs9(TableRow, {
3440
+ return /* @__PURE__ */ jsx15(TableHeader2, {
3441
+ children: /* @__PURE__ */ jsxs9(TableRow2, {
3399
3442
  children: [
3400
- selection ? /* @__PURE__ */ jsx15(TableHead, {
3443
+ selection ? /* @__PURE__ */ jsx15(TableHead2, {
3401
3444
  className: "w-10 pr-0",
3402
3445
  children: /* @__PURE__ */ jsx15(Checkbox, {
3403
3446
  "aria-label": store.config.labels.selectAllRows,
@@ -3413,12 +3456,12 @@ var DataTableHeader = ({
3413
3456
  }
3414
3457
  })
3415
3458
  }) : null,
3416
- draggable ? /* @__PURE__ */ jsx15(TableHead, {
3459
+ draggable ? /* @__PURE__ */ jsx15(TableHead2, {
3417
3460
  className: "w-10"
3418
3461
  }) : null,
3419
3462
  model.visibleColumns.map((column) => {
3420
3463
  const direction = store.state.sort?.find(({ id }) => id === column.id)?.direction;
3421
- return /* @__PURE__ */ jsx15(TableHead, {
3464
+ return /* @__PURE__ */ jsx15(TableHead2, {
3422
3465
  "aria-sort": direction === "asc" ? "ascending" : direction === "desc" ? "descending" : undefined,
3423
3466
  className: "relative h-12 p-0",
3424
3467
  scope: "col",
@@ -3436,7 +3479,7 @@ var DataTableHeader = ({
3436
3479
  })
3437
3480
  }, column.id);
3438
3481
  }),
3439
- hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(TableHead, {
3482
+ hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(TableHead2, {
3440
3483
  className: "w-10"
3441
3484
  }) : null
3442
3485
  ]
@@ -3446,6 +3489,7 @@ var DataTableHeader = ({
3446
3489
  var DataTableBody = ({
3447
3490
  tableAtom
3448
3491
  }) => {
3492
+ const styles = useContext(DataTableStylesContext);
3449
3493
  const [store] = useTableAtom(tableAtom);
3450
3494
  const model = deriveModel(store);
3451
3495
  const fields = getActiveGrouping(store);
@@ -3459,16 +3503,18 @@ var DataTableBody = ({
3459
3503
  sections
3460
3504
  });
3461
3505
  }
3462
- return /* @__PURE__ */ jsx15(TableBody, {
3463
- children: store.config.status.error || !rows.length && !store.config.status.loading ? /* @__PURE__ */ jsx15(TableRow, {
3464
- children: /* @__PURE__ */ jsx15(TableCell, {
3465
- className: "h-24 text-center",
3506
+ return /* @__PURE__ */ jsx15(TableBody2, {
3507
+ children: store.config.status.error || !rows.length && !store.config.status.loading ? /* @__PURE__ */ jsx15(TableRow2, {
3508
+ children: /* @__PURE__ */ jsx15(TableCell2, {
3509
+ "data-table-slot": store.config.status.error ? "error" : "empty",
3510
+ className: cn("h-24 text-center", store.config.status.error ? styles?.feedback?.error : styles?.feedback?.empty),
3466
3511
  colSpan: Math.max(colSpan, 1),
3467
3512
  children: store.config.status.error ?? store.config.status.empty ?? store.config.labels.empty
3468
3513
  })
3469
- }) : store.config.status.loading && !rows.length ? /* @__PURE__ */ jsx15(TableRow, {
3470
- children: /* @__PURE__ */ jsx15(TableCell, {
3471
- className: "h-24 text-center",
3514
+ }) : store.config.status.loading && !rows.length ? /* @__PURE__ */ jsx15(TableRow2, {
3515
+ children: /* @__PURE__ */ jsx15(TableCell2, {
3516
+ "data-table-slot": "loading",
3517
+ className: cn("h-24 text-center", styles?.feedback?.loading),
3472
3518
  colSpan: Math.max(colSpan, 1),
3473
3519
  children: /* @__PURE__ */ jsx15(Loading, {
3474
3520
  label: store.config.labels.loading
@@ -3556,6 +3602,7 @@ var GalleryCard = ({
3556
3602
  var DataTableGallery = ({
3557
3603
  tableAtom
3558
3604
  }) => {
3605
+ const styles = useContext(DataTableStylesContext);
3559
3606
  const [store, setStore] = useTableAtom(tableAtom);
3560
3607
  const model = deriveModel(store);
3561
3608
  const fields = getActiveGrouping(store);
@@ -3563,13 +3610,15 @@ var DataTableGallery = ({
3563
3610
  const sections = groupDataTableRows(rows, fields);
3564
3611
  if (store.config.status.error) {
3565
3612
  return /* @__PURE__ */ jsx15("div", {
3566
- className: "text-destructive rounded-lg border border-dashed p-10 text-center",
3613
+ "data-table-slot": "error",
3614
+ className: cn("text-destructive rounded-lg border border-dashed p-10 text-center", styles?.feedback?.error),
3567
3615
  children: store.config.status.error
3568
3616
  });
3569
3617
  }
3570
3618
  if (store.config.status.loading && !rows.length) {
3571
3619
  return /* @__PURE__ */ jsx15("div", {
3572
- className: "rounded-lg border border-dashed p-10 text-center",
3620
+ "data-table-slot": "loading",
3621
+ className: cn("rounded-lg border border-dashed p-10 text-center", styles?.feedback?.loading),
3573
3622
  children: /* @__PURE__ */ jsx15(Loading, {
3574
3623
  label: store.config.labels.loading
3575
3624
  })
@@ -3577,13 +3626,15 @@ var DataTableGallery = ({
3577
3626
  }
3578
3627
  if (!rows.length && !sections.length) {
3579
3628
  return /* @__PURE__ */ jsx15("div", {
3580
- className: "text-muted-foreground rounded-lg border border-dashed p-10 text-center",
3629
+ "data-table-slot": "empty",
3630
+ className: cn("text-muted-foreground rounded-lg border border-dashed p-10 text-center", styles?.feedback?.empty),
3581
3631
  children: store.config.status.empty ?? store.config.labels.empty
3582
3632
  });
3583
3633
  }
3584
3634
  if (!fields.length) {
3585
3635
  return /* @__PURE__ */ jsx15("div", {
3586
- className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
3636
+ "data-table-slot": "gallery",
3637
+ className: cn("grid gap-3 sm:grid-cols-2 xl:grid-cols-3", styles?.gallery),
3587
3638
  children: rows.map((row) => /* @__PURE__ */ jsx15(RowIdContext.Provider, {
3588
3639
  value: row.id,
3589
3640
  children: /* @__PURE__ */ jsx15(GalleryCard, {
@@ -3638,7 +3689,8 @@ var DataTableGallery = ({
3638
3689
  ]
3639
3690
  }),
3640
3691
  !collapsed ? section.children.length ? renderSections(section.children) : section.rows.length ? /* @__PURE__ */ jsx15("div", {
3641
- className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
3692
+ "data-table-slot": "gallery",
3693
+ className: cn("grid gap-3 sm:grid-cols-2 xl:grid-cols-3", styles?.gallery),
3642
3694
  children: section.rows.map((row) => /* @__PURE__ */ jsx15(RowIdContext.Provider, {
3643
3695
  value: row.id,
3644
3696
  children: /* @__PURE__ */ jsx15(GalleryCard, {
@@ -3660,6 +3712,7 @@ var DataTableGallery = ({
3660
3712
  var DataTablePagination = ({
3661
3713
  tableAtom
3662
3714
  }) => {
3715
+ const styles = useContext(DataTableStylesContext);
3663
3716
  const [store, setStore] = useTableAtom(tableAtom);
3664
3717
  const model = deriveModel(store);
3665
3718
  const pagination = store.config.features.pagination ?? { mode: "client" };
@@ -3680,8 +3733,10 @@ var DataTablePagination = ({
3680
3733
  const selected = model.rows.filter((row) => store.state.rowSelection[row.id]).length;
3681
3734
  const setPagination = (next) => changeState(setStore, (state) => ({ ...state, ...next }));
3682
3735
  return /* @__PURE__ */ jsx15("div", {
3683
- className: "pt-4",
3736
+ "data-table-slot": "pagination",
3737
+ className: cn("pt-4", styles?.pagination),
3684
3738
  children: /* @__PURE__ */ jsx15(Pagination, {
3739
+ pageSizeContentClassName: styles?.popup?.select,
3685
3740
  locale: store.config.locale,
3686
3741
  messages: { [store.config.locale]: store.config.labels },
3687
3742
  onPageChange: (page) => setPagination({ page, pageSize: store.state.pageSize }),
@@ -3776,7 +3831,7 @@ var HydratedDataTable = ({
3776
3831
  uiState
3777
3832
  ]);
3778
3833
  return /* @__PURE__ */ jsxs9("div", {
3779
- className: "w-full max-w-full min-w-0 rounded-md",
3834
+ className: cn("w-full max-w-full min-w-0 rounded-md", props.className),
3780
3835
  "data-table-root": "",
3781
3836
  children: [
3782
3837
  /* @__PURE__ */ jsx15(DataTableToolbar, {
@@ -3820,15 +3875,18 @@ var DataTable = (props) => {
3820
3875
  if (!persistedUiState || AsyncResult.isWaiting(persistedUiResult)) {
3821
3876
  return /* @__PURE__ */ jsx15("div", {
3822
3877
  "aria-busy": "true",
3823
- className: "invisible w-full max-w-full min-w-0 rounded-md",
3878
+ className: cn("invisible w-full max-w-full min-w-0 rounded-md", props.className),
3824
3879
  "data-table-root": ""
3825
3880
  });
3826
3881
  }
3827
- return /* @__PURE__ */ jsx15(HydratedDataTable, {
3828
- ...props,
3829
- locale,
3830
- persistedUiState,
3831
- setPersistedUiState
3882
+ return /* @__PURE__ */ jsx15(DataTableStylesContext.Provider, {
3883
+ value: props.classNames,
3884
+ children: /* @__PURE__ */ jsx15(HydratedDataTable, {
3885
+ ...props,
3886
+ locale,
3887
+ persistedUiState,
3888
+ setPersistedUiState
3889
+ })
3832
3890
  });
3833
3891
  };
3834
3892
  var DataTableContent = ({
@@ -3845,7 +3903,7 @@ var DataTableContent = ({
3845
3903
  return /* @__PURE__ */ jsxs9(ScrollArea, {
3846
3904
  className: "max-w-full min-w-0",
3847
3905
  children: [
3848
- /* @__PURE__ */ jsxs9(Table, {
3906
+ /* @__PURE__ */ jsxs9(Table2, {
3849
3907
  className: "table-fixed",
3850
3908
  style: { width: `max(100%, ${width}px)` },
3851
3909
  children: [
@@ -4024,7 +4082,7 @@ var DataTableListMenu = ({
4024
4082
  const resolvedLabel = label ?? (hasActions ? labels.actions : labels.listDetails);
4025
4083
  return /* @__PURE__ */ jsxs9(DropdownMenu, {
4026
4084
  children: [
4027
- /* @__PURE__ */ jsx15(DropdownMenuTrigger, {
4085
+ /* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
4028
4086
  onClick: (event) => event.stopPropagation(),
4029
4087
  onPointerDown: (event) => event.stopPropagation(),
4030
4088
  render: trigger ?? /* @__PURE__ */ jsx15(Button, {
@@ -4035,28 +4093,28 @@ var DataTableListMenu = ({
4035
4093
  children: /* @__PURE__ */ jsx15(MoreHorizontal, {})
4036
4094
  })
4037
4095
  }),
4038
- /* @__PURE__ */ jsx15(DropdownMenuContent, {
4096
+ /* @__PURE__ */ jsx15(DropdownMenuContent2, {
4039
4097
  align: "end",
4040
4098
  className: "max-h-[min(18rem,var(--available-height))] w-72 max-w-[calc(100vw-2rem)]",
4041
4099
  onClick: (event) => event.stopPropagation(),
4042
4100
  onPointerDown: (event) => event.stopPropagation(),
4043
4101
  children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
4044
4102
  children: [
4045
- /* @__PURE__ */ jsx15(DropdownMenuLabel, {
4103
+ /* @__PURE__ */ jsx15(DropdownMenuLabel2, {
4046
4104
  children: resolvedLabel
4047
4105
  }),
4048
- /* @__PURE__ */ jsx15(DropdownMenuSeparator, {}),
4106
+ /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}),
4049
4107
  entries.map(({ item, visibleActions }, index) => visibleActions.length ? /* @__PURE__ */ jsxs9(DropdownMenuSub, {
4050
4108
  children: [
4051
- /* @__PURE__ */ jsx15(DropdownMenuSubTrigger, {
4109
+ /* @__PURE__ */ jsx15(DropdownMenuSubTrigger2, {
4052
4110
  children: /* @__PURE__ */ jsx15(DataTableListEntry, {
4053
4111
  item,
4054
4112
  appearance: display === "icon" ? "detail" : "list"
4055
4113
  })
4056
4114
  }),
4057
- /* @__PURE__ */ jsx15(DropdownMenuSubContent, {
4115
+ /* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
4058
4116
  className: "w-max",
4059
- children: visibleActions.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem, {
4117
+ children: visibleActions.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
4060
4118
  closeOnClick: action.closeOnClick,
4061
4119
  disabled: action.disabled?.(item),
4062
4120
  onClick: (event) => {
@@ -4071,7 +4129,7 @@ var DataTableListMenu = ({
4071
4129
  }, action.id ?? action.name))
4072
4130
  })
4073
4131
  ]
4074
- }, item.value ?? `${item.label}-${index}`) : /* @__PURE__ */ jsx15(DropdownMenuItem, {
4132
+ }, item.value ?? `${item.label}-${index}`) : /* @__PURE__ */ jsx15(DropdownMenuItem2, {
4075
4133
  closeOnClick: Boolean(onItemClick),
4076
4134
  onClick: (event) => {
4077
4135
  event.stopPropagation();
@@ -4084,7 +4142,7 @@ var DataTableListMenu = ({
4084
4142
  }, item.value ?? `${item.label}-${index}`)),
4085
4143
  onAdd && addOptions?.length ? /* @__PURE__ */ jsxs9(Fragment, {
4086
4144
  children: [
4087
- entries.length ? /* @__PURE__ */ jsx15(DropdownMenuSeparator, {}) : null,
4145
+ entries.length ? /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}) : null,
4088
4146
  /* @__PURE__ */ jsx15(DataTableListAddMenu, {
4089
4147
  emptyLabel: addEmptyLabel,
4090
4148
  label: addLabel ?? labels.addItem,
@@ -4126,13 +4184,13 @@ var DataTableListAddMenu = ({
4126
4184
  setSearch("");
4127
4185
  },
4128
4186
  children: [
4129
- /* @__PURE__ */ jsxs9(DropdownMenuSubTrigger, {
4187
+ /* @__PURE__ */ jsxs9(DropdownMenuSubTrigger2, {
4130
4188
  children: [
4131
4189
  /* @__PURE__ */ jsx15(Plus, {}),
4132
4190
  label
4133
4191
  ]
4134
4192
  }),
4135
- /* @__PURE__ */ jsxs9(DropdownMenuSubContent, {
4193
+ /* @__PURE__ */ jsxs9(DropdownMenuSubContent2, {
4136
4194
  className: "w-64",
4137
4195
  children: [
4138
4196
  /* @__PURE__ */ jsxs9("div", {
@@ -4141,7 +4199,7 @@ var DataTableListAddMenu = ({
4141
4199
  /* @__PURE__ */ jsx15(Search, {
4142
4200
  className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"
4143
4201
  }),
4144
- /* @__PURE__ */ jsx15(Input, {
4202
+ /* @__PURE__ */ jsx15(Input2, {
4145
4203
  "aria-label": searchLabel,
4146
4204
  className: "h-8 pl-8",
4147
4205
  onChange: (event) => setSearch(event.target.value),
@@ -4155,8 +4213,8 @@ var DataTableListAddMenu = ({
4155
4213
  })
4156
4214
  ]
4157
4215
  }),
4158
- /* @__PURE__ */ jsx15(DropdownMenuSeparator, {}),
4159
- filtered.length ? filtered.map((item) => /* @__PURE__ */ jsx15(DropdownMenuItem, {
4216
+ /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}),
4217
+ filtered.length ? filtered.map((item) => /* @__PURE__ */ jsx15(DropdownMenuItem2, {
4160
4218
  closeOnClick: false,
4161
4219
  onClick: () => onAdd(item),
4162
4220
  children: /* @__PURE__ */ jsx15(DataTableListEntry, {
@@ -4272,7 +4330,7 @@ var DataTableListEntry = ({
4272
4330
  }),
4273
4331
  children: icon
4274
4332
  }),
4275
- /* @__PURE__ */ jsx15(TooltipContent, {
4333
+ /* @__PURE__ */ jsx15(TooltipContent2, {
4276
4334
  children: item.label
4277
4335
  })
4278
4336
  ]