@gridkitjs/react 0.0.0-dev-20261119130019 → 0.0.0-dev-20261119135354

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1265,9 +1265,40 @@ function GridFooter({
1265
1265
  ) });
1266
1266
  }
1267
1267
 
1268
+ // src/DataGrid/components/GridLoadingOverlay.tsx
1269
+ import { jsx as jsx10 } from "react/jsx-runtime";
1270
+ function GridLoadingOverlay({
1271
+ empty,
1272
+ viewportWidth,
1273
+ children
1274
+ }) {
1275
+ const contentStyle = viewportWidth === null ? void 0 : {
1276
+ "--gridkit-loading-width": `${String(viewportWidth)}px`
1277
+ };
1278
+ return /* @__PURE__ */ jsx10(
1279
+ "div",
1280
+ {
1281
+ role: "row",
1282
+ className: classNames(
1283
+ "gridkit-grid-loading-overlay",
1284
+ empty && "is-empty"
1285
+ ),
1286
+ children: /* @__PURE__ */ jsx10(
1287
+ "div",
1288
+ {
1289
+ role: "gridcell",
1290
+ className: "gridkit-grid-loading-overlay-content",
1291
+ style: contentStyle,
1292
+ children
1293
+ }
1294
+ )
1295
+ }
1296
+ );
1297
+ }
1298
+
1268
1299
  // src/DataGrid/components/GridPager.tsx
1269
1300
  import { paginationWindow } from "@gridkitjs/core/renderer";
1270
- import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
1301
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1271
1302
  function PagerNavButton({
1272
1303
  className,
1273
1304
  label,
@@ -1275,7 +1306,7 @@ function PagerNavButton({
1275
1306
  onClick,
1276
1307
  children
1277
1308
  }) {
1278
- return /* @__PURE__ */ jsx10(
1309
+ return /* @__PURE__ */ jsx11(
1279
1310
  "button",
1280
1311
  {
1281
1312
  type: "button",
@@ -1309,7 +1340,7 @@ function GridPager({ pager, config, messages }) {
1309
1340
  "aria-label": messages.pagerLabel,
1310
1341
  children: [
1311
1342
  /* @__PURE__ */ jsxs6("div", { className: "gridkit-grid-pager-bar", style: barStyle, children: [
1312
- /* @__PURE__ */ jsx10(
1343
+ /* @__PURE__ */ jsx11(
1313
1344
  PagerNavButton,
1314
1345
  {
1315
1346
  className: "gridkit-grid-pager-first",
@@ -1318,10 +1349,10 @@ function GridPager({ pager, config, messages }) {
1318
1349
  onClick: () => {
1319
1350
  pager.goToPage(0);
1320
1351
  },
1321
- children: /* @__PURE__ */ jsx10(ChevronsLeftIcon, {})
1352
+ children: /* @__PURE__ */ jsx11(ChevronsLeftIcon, {})
1322
1353
  }
1323
1354
  ),
1324
- /* @__PURE__ */ jsx10(
1355
+ /* @__PURE__ */ jsx11(
1325
1356
  PagerNavButton,
1326
1357
  {
1327
1358
  className: "gridkit-grid-pager-previous",
@@ -1330,14 +1361,14 @@ function GridPager({ pager, config, messages }) {
1330
1361
  onClick: () => {
1331
1362
  pager.previousPage();
1332
1363
  },
1333
- children: /* @__PURE__ */ jsx10(ChevronLeftIcon, {})
1364
+ children: /* @__PURE__ */ jsx11(ChevronLeftIcon, {})
1334
1365
  }
1335
1366
  ),
1336
1367
  variant === "numbered" ? paginationWindow(currentPage, pageCount, {
1337
1368
  boundaryCount: config?.boundaryCount,
1338
1369
  siblingCount: config?.siblingCount
1339
1370
  }).map(
1340
- (entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx10(
1371
+ (entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx11(
1341
1372
  "span",
1342
1373
  {
1343
1374
  className: "gridkit-grid-pager-ellipsis",
@@ -1345,7 +1376,7 @@ function GridPager({ pager, config, messages }) {
1345
1376
  children: "\u2026"
1346
1377
  },
1347
1378
  `ellipsis-${String(index)}`
1348
- ) : /* @__PURE__ */ jsx10(
1379
+ ) : /* @__PURE__ */ jsx11(
1349
1380
  "button",
1350
1381
  {
1351
1382
  type: "button",
@@ -1360,8 +1391,8 @@ function GridPager({ pager, config, messages }) {
1360
1391
  entry
1361
1392
  )
1362
1393
  ) : /* @__PURE__ */ jsxs6("span", { className: "gridkit-grid-pager-status-slot", children: [
1363
- /* @__PURE__ */ jsx10("span", { className: "gridkit-grid-pager-status", children: messages.pageStatus(currentPage, pageCount) }),
1364
- /* @__PURE__ */ jsx10(
1394
+ /* @__PURE__ */ jsx11("span", { className: "gridkit-grid-pager-status", children: messages.pageStatus(currentPage, pageCount) }),
1395
+ /* @__PURE__ */ jsx11(
1365
1396
  "span",
1366
1397
  {
1367
1398
  className: "gridkit-grid-pager-status-sizer",
@@ -1370,7 +1401,7 @@ function GridPager({ pager, config, messages }) {
1370
1401
  }
1371
1402
  )
1372
1403
  ] }),
1373
- /* @__PURE__ */ jsx10(
1404
+ /* @__PURE__ */ jsx11(
1374
1405
  PagerNavButton,
1375
1406
  {
1376
1407
  className: "gridkit-grid-pager-next",
@@ -1379,10 +1410,10 @@ function GridPager({ pager, config, messages }) {
1379
1410
  onClick: () => {
1380
1411
  pager.nextPage();
1381
1412
  },
1382
- children: /* @__PURE__ */ jsx10(ChevronRightIcon, {})
1413
+ children: /* @__PURE__ */ jsx11(ChevronRightIcon, {})
1383
1414
  }
1384
1415
  ),
1385
- /* @__PURE__ */ jsx10(
1416
+ /* @__PURE__ */ jsx11(
1386
1417
  PagerNavButton,
1387
1418
  {
1388
1419
  className: "gridkit-grid-pager-last",
@@ -1391,22 +1422,22 @@ function GridPager({ pager, config, messages }) {
1391
1422
  onClick: () => {
1392
1423
  pager.goToPage(pageCount - 1);
1393
1424
  },
1394
- children: /* @__PURE__ */ jsx10(ChevronsRightIcon, {})
1425
+ children: /* @__PURE__ */ jsx11(ChevronsRightIcon, {})
1395
1426
  }
1396
1427
  )
1397
1428
  ] }),
1398
1429
  sizeOptions !== void 0 && sizeOptions.length > 0 && /* @__PURE__ */ jsxs6("label", { className: "gridkit-grid-pager-page-size", children: [
1399
- /* @__PURE__ */ jsx10(
1430
+ /* @__PURE__ */ jsx11(
1400
1431
  "select",
1401
1432
  {
1402
1433
  value: pagination.pageSize,
1403
1434
  onChange: (event) => {
1404
1435
  pager.setPageSize(Number(event.target.value));
1405
1436
  },
1406
- children: sizeOptions.map((size) => /* @__PURE__ */ jsx10("option", { value: size, children: size }, size))
1437
+ children: sizeOptions.map((size) => /* @__PURE__ */ jsx11("option", { value: size, children: size }, size))
1407
1438
  }
1408
1439
  ),
1409
- /* @__PURE__ */ jsx10("span", { className: "gridkit-grid-pager-page-size-label", children: messages.pageSizeLabel })
1440
+ /* @__PURE__ */ jsx11("span", { className: "gridkit-grid-pager-page-size-label", children: messages.pageSizeLabel })
1410
1441
  ] })
1411
1442
  ]
1412
1443
  }
@@ -1538,7 +1569,7 @@ function useGroupByDrag({
1538
1569
  }
1539
1570
 
1540
1571
  // src/DataGrid/components/GroupByBar.tsx
1541
- import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1572
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1542
1573
  function GroupByBar({
1543
1574
  columns,
1544
1575
  definitions,
@@ -1587,7 +1618,7 @@ function GroupByBar({
1587
1618
  role: "group",
1588
1619
  "aria-label": messages.groupByBarLabel,
1589
1620
  children: [
1590
- showPlaceholder && /* @__PURE__ */ jsx11("span", { className: "gridkit-group-by-bar-placeholder", children: messages.groupByBarPlaceholder }),
1621
+ showPlaceholder && /* @__PURE__ */ jsx12("span", { className: "gridkit-group-by-bar-placeholder", children: messages.groupByBarPlaceholder }),
1591
1622
  groupBy.map((entry, index) => {
1592
1623
  const dropBefore = activeDropTarget?.beforeColumnId === entry.columnId;
1593
1624
  const dropAfter = activeDropTarget?.beforeColumnId === null && index === groupBy.length - 1;
@@ -1623,8 +1654,8 @@ function GroupByBar({
1623
1654
  }
1624
1655
  },
1625
1656
  children: [
1626
- /* @__PURE__ */ jsx11("span", { className: "gridkit-group-by-chip-label", children: labelFor(entry.columnId) }),
1627
- /* @__PURE__ */ jsx11(
1657
+ /* @__PURE__ */ jsx12("span", { className: "gridkit-group-by-chip-label", children: labelFor(entry.columnId) }),
1658
+ /* @__PURE__ */ jsx12(
1628
1659
  "button",
1629
1660
  {
1630
1661
  type: "button",
@@ -1645,7 +1676,7 @@ function GroupByBar({
1645
1676
  );
1646
1677
  }),
1647
1678
  chipDrag.draggedColumnId !== null && chipDrag.ghostTransform !== null && createPortal2(
1648
- /* @__PURE__ */ jsx11(
1679
+ /* @__PURE__ */ jsx12(
1649
1680
  "span",
1650
1681
  {
1651
1682
  className: "gridkit-group-by-chip gridkit-drag-ghost",
@@ -2092,7 +2123,7 @@ import {
2092
2123
  attachOverlay,
2093
2124
  writingDirection as writingDirection4
2094
2125
  } from "@gridkitjs/dom";
2095
- import { jsx as jsx12 } from "react/jsx-runtime";
2126
+ import { jsx as jsx13 } from "react/jsx-runtime";
2096
2127
  var ANCHOR_GAP = 4;
2097
2128
  function attachedFocus(focus) {
2098
2129
  return typeof focus === "object" && !(focus instanceof HTMLElement) ? focus.current ?? "first" : focus;
@@ -2160,7 +2191,7 @@ function Overlay({
2160
2191
  trapFocus
2161
2192
  ]);
2162
2193
  return createPortal3(
2163
- /* @__PURE__ */ jsx12(
2194
+ /* @__PURE__ */ jsx13(
2164
2195
  "div",
2165
2196
  {
2166
2197
  ref: panelRef,
@@ -2174,42 +2205,42 @@ function Overlay({
2174
2205
  }
2175
2206
 
2176
2207
  // src/DataGrid/menu/menuIcons.tsx
2177
- import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
2208
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2178
2209
  var BUILT_IN_ICONS = {
2179
2210
  sortAscending: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2180
- /* @__PURE__ */ jsx13("path", { d: "m3 8 4-4 4 4" }),
2181
- /* @__PURE__ */ jsx13("path", { d: "M7 4v16" }),
2182
- /* @__PURE__ */ jsx13("path", { d: "M11 12h4" }),
2183
- /* @__PURE__ */ jsx13("path", { d: "M11 16h7" }),
2184
- /* @__PURE__ */ jsx13("path", { d: "M11 20h10" })
2211
+ /* @__PURE__ */ jsx14("path", { d: "m3 8 4-4 4 4" }),
2212
+ /* @__PURE__ */ jsx14("path", { d: "M7 4v16" }),
2213
+ /* @__PURE__ */ jsx14("path", { d: "M11 12h4" }),
2214
+ /* @__PURE__ */ jsx14("path", { d: "M11 16h7" }),
2215
+ /* @__PURE__ */ jsx14("path", { d: "M11 20h10" })
2185
2216
  ] }),
2186
2217
  sortDescending: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2187
- /* @__PURE__ */ jsx13("path", { d: "m3 16 4 4 4-4" }),
2188
- /* @__PURE__ */ jsx13("path", { d: "M7 20V4" }),
2189
- /* @__PURE__ */ jsx13("path", { d: "M11 4h10" }),
2190
- /* @__PURE__ */ jsx13("path", { d: "M11 8h7" }),
2191
- /* @__PURE__ */ jsx13("path", { d: "M11 12h4" })
2218
+ /* @__PURE__ */ jsx14("path", { d: "m3 16 4 4 4-4" }),
2219
+ /* @__PURE__ */ jsx14("path", { d: "M7 20V4" }),
2220
+ /* @__PURE__ */ jsx14("path", { d: "M11 4h10" }),
2221
+ /* @__PURE__ */ jsx14("path", { d: "M11 8h7" }),
2222
+ /* @__PURE__ */ jsx14("path", { d: "M11 12h4" })
2192
2223
  ] }),
2193
- group: () => /* @__PURE__ */ jsx13(GroupIcon, {}),
2224
+ group: () => /* @__PURE__ */ jsx14(GroupIcon, {}),
2194
2225
  hide: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2195
- /* @__PURE__ */ jsx13("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
2196
- /* @__PURE__ */ jsx13("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
2197
- /* @__PURE__ */ jsx13("path", { d: "M6.61 6.61A13.53 13.53 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
2198
- /* @__PURE__ */ jsx13("path", { d: "m2 2 20 20" })
2226
+ /* @__PURE__ */ jsx14("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
2227
+ /* @__PURE__ */ jsx14("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
2228
+ /* @__PURE__ */ jsx14("path", { d: "M6.61 6.61A13.53 13.53 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
2229
+ /* @__PURE__ */ jsx14("path", { d: "m2 2 20 20" })
2199
2230
  ] }),
2200
2231
  autoFit: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2201
- /* @__PURE__ */ jsx13("path", { d: "m18 8 4 4-4 4" }),
2202
- /* @__PURE__ */ jsx13("path", { d: "M2 12h20" }),
2203
- /* @__PURE__ */ jsx13("path", { d: "m6 8-4 4 4 4" })
2232
+ /* @__PURE__ */ jsx14("path", { d: "m18 8 4 4-4 4" }),
2233
+ /* @__PURE__ */ jsx14("path", { d: "M2 12h20" }),
2234
+ /* @__PURE__ */ jsx14("path", { d: "m6 8-4 4 4 4" })
2204
2235
  ] }),
2205
2236
  copy: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2206
- /* @__PURE__ */ jsx13("rect", { x: "8", y: "8", width: "14", height: "14", rx: "2" }),
2207
- /* @__PURE__ */ jsx13("path", { d: "M4 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2" })
2237
+ /* @__PURE__ */ jsx14("rect", { x: "8", y: "8", width: "14", height: "14", rx: "2" }),
2238
+ /* @__PURE__ */ jsx14("path", { d: "M4 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2" })
2208
2239
  ] }),
2209
2240
  print: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2210
- /* @__PURE__ */ jsx13("path", { d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" }),
2211
- /* @__PURE__ */ jsx13("path", { d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6" }),
2212
- /* @__PURE__ */ jsx13("rect", { x: "6", y: "14", width: "12", height: "8", rx: "1" })
2241
+ /* @__PURE__ */ jsx14("path", { d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" }),
2242
+ /* @__PURE__ */ jsx14("path", { d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6" }),
2243
+ /* @__PURE__ */ jsx14("rect", { x: "6", y: "14", width: "12", height: "8", rx: "1" })
2213
2244
  ] })
2214
2245
  };
2215
2246
  var ICONS = new Map(Object.entries(BUILT_IN_ICONS));
@@ -2218,20 +2249,20 @@ function MenuIcon({ name }) {
2218
2249
  return draw === void 0 ? null : draw();
2219
2250
  }
2220
2251
  function CheckIcon() {
2221
- return /* @__PURE__ */ jsx13(Icon, { children: /* @__PURE__ */ jsx13("path", { d: "M20 6 9 17l-5-5" }) });
2252
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "M20 6 9 17l-5-5" }) });
2222
2253
  }
2223
2254
  function ChevronDownIcon() {
2224
- return /* @__PURE__ */ jsx13(Icon, { children: /* @__PURE__ */ jsx13("path", { d: "m6 9 6 6 6-6" }) });
2255
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "m6 9 6 6 6-6" }) });
2225
2256
  }
2226
2257
  function ChevronLeftIcon2() {
2227
- return /* @__PURE__ */ jsx13(Icon, { children: /* @__PURE__ */ jsx13("path", { d: "m15 18-6-6 6-6" }) });
2258
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "m15 18-6-6 6-6" }) });
2228
2259
  }
2229
2260
  function ChevronRightIcon2() {
2230
- return /* @__PURE__ */ jsx13(Icon, { children: /* @__PURE__ */ jsx13("path", { d: "m9 18 6-6-6-6" }) });
2261
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "m9 18 6-6-6-6" }) });
2231
2262
  }
2232
2263
 
2233
2264
  // src/DataGrid/menu/GridMenu.tsx
2234
- import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
2265
+ import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
2235
2266
  var CLOSED = { kind: "closed" };
2236
2267
  var ENTRY_GONE = { kind: "entryGone" };
2237
2268
  function itemElement(menu, id) {
@@ -2262,10 +2293,10 @@ function MenuItem({
2262
2293
  ...ariaAttr(!isItem2, "aria-haspopup", "menu"),
2263
2294
  ...ariaAttr(!isItem2, "aria-expanded", expanded),
2264
2295
  children: [
2265
- /* @__PURE__ */ jsx14("span", { className: "gridkit-menu-item-icon", "aria-hidden": "true", children: checked === true ? /* @__PURE__ */ jsx14(CheckIcon, {}) : /* @__PURE__ */ jsx14(MenuIcon, { name: entry.icon }) }),
2266
- /* @__PURE__ */ jsx14("span", { className: "gridkit-menu-item-label", children: entry.label }),
2267
- shortcut !== void 0 && /* @__PURE__ */ jsx14("span", { className: "gridkit-menu-item-shortcut", "aria-hidden": "true", children: shortcut }),
2268
- !isItem2 && /* @__PURE__ */ jsx14("span", { className: "gridkit-menu-submenu-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx14(ChevronRightIcon2, {}) })
2296
+ /* @__PURE__ */ jsx15("span", { className: "gridkit-menu-item-icon", "aria-hidden": "true", children: checked === true ? /* @__PURE__ */ jsx15(CheckIcon, {}) : /* @__PURE__ */ jsx15(MenuIcon, { name: entry.icon }) }),
2297
+ /* @__PURE__ */ jsx15("span", { className: "gridkit-menu-item-label", children: entry.label }),
2298
+ shortcut !== void 0 && /* @__PURE__ */ jsx15("span", { className: "gridkit-menu-item-shortcut", "aria-hidden": "true", children: shortcut }),
2299
+ !isItem2 && /* @__PURE__ */ jsx15("span", { className: "gridkit-menu-submenu-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx15(ChevronRightIcon2, {}) })
2269
2300
  ]
2270
2301
  }
2271
2302
  );
@@ -2360,7 +2391,7 @@ function GridMenu({
2360
2391
  setSubmenu(ENTRY_GONE);
2361
2392
  }
2362
2393
  return /* @__PURE__ */ jsxs9(Fragment2, { children: [
2363
- /* @__PURE__ */ jsx14(
2394
+ /* @__PURE__ */ jsx15(
2364
2395
  "div",
2365
2396
  {
2366
2397
  ref: menuRef,
@@ -2368,14 +2399,14 @@ function GridMenu({
2368
2399
  "aria-label": label,
2369
2400
  className: "gridkit-menu",
2370
2401
  children: entries.map(
2371
- (entry) => entry.type === "separator" ? /* @__PURE__ */ jsx14(
2402
+ (entry) => entry.type === "separator" ? /* @__PURE__ */ jsx15(
2372
2403
  "div",
2373
2404
  {
2374
2405
  role: "separator",
2375
2406
  className: "gridkit-menu-separator"
2376
2407
  },
2377
2408
  entry.key
2378
- ) : /* @__PURE__ */ jsx14(
2409
+ ) : /* @__PURE__ */ jsx15(
2379
2410
  MenuItem,
2380
2411
  {
2381
2412
  entry,
@@ -2386,7 +2417,7 @@ function GridMenu({
2386
2417
  )
2387
2418
  }
2388
2419
  ),
2389
- submenu.kind === "open" && openEntry !== void 0 && /* @__PURE__ */ jsx14(
2420
+ submenu.kind === "open" && openEntry !== void 0 && /* @__PURE__ */ jsx15(
2390
2421
  Overlay,
2391
2422
  {
2392
2423
  anchor: submenu.anchor,
@@ -2395,7 +2426,7 @@ function GridMenu({
2395
2426
  initialFocus: submenu.focus,
2396
2427
  scope,
2397
2428
  onDismiss: closeSubmenu,
2398
- children: /* @__PURE__ */ jsx14(
2429
+ children: /* @__PURE__ */ jsx15(
2399
2430
  GridMenu,
2400
2431
  {
2401
2432
  entries: openEntry.items,
@@ -2414,7 +2445,7 @@ function GridMenu({
2414
2445
  }
2415
2446
 
2416
2447
  // src/DataGrid/contextMenu/GridContextMenu.tsx
2417
- import { jsx as jsx15 } from "react/jsx-runtime";
2448
+ import { jsx as jsx16 } from "react/jsx-runtime";
2418
2449
  function GridContextMenu({
2419
2450
  contextMenu
2420
2451
  }) {
@@ -2422,7 +2453,7 @@ function GridContextMenu({
2422
2453
  if (menu === null) {
2423
2454
  return null;
2424
2455
  }
2425
- return /* @__PURE__ */ jsx15(
2456
+ return /* @__PURE__ */ jsx16(
2426
2457
  Overlay,
2427
2458
  {
2428
2459
  anchor: menu.anchor,
@@ -2431,7 +2462,7 @@ function GridContextMenu({
2431
2462
  returnFocusFallback,
2432
2463
  scope: menu.scope,
2433
2464
  onDismiss: close,
2434
- children: /* @__PURE__ */ jsx15(
2465
+ children: /* @__PURE__ */ jsx16(
2435
2466
  GridMenu,
2436
2467
  {
2437
2468
  entries: menu.entries,
@@ -2818,7 +2849,7 @@ import { useRef as useRef15 } from "react";
2818
2849
  // src/DataGrid/columnChooser/ColumnChooser.tsx
2819
2850
  import { useLayoutEffect as useLayoutEffect7, useRef as useRef9, useState as useState6 } from "react";
2820
2851
  import { resolveColumnChooser } from "@gridkitjs/core/renderer";
2821
- import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
2852
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
2822
2853
  function ColumnChooser({
2823
2854
  controller,
2824
2855
  messages
@@ -2849,7 +2880,7 @@ function ColumnChooser({
2849
2880
  "aria-label": messages.columnChooserLabel,
2850
2881
  className: "gridkit-column-chooser",
2851
2882
  children: [
2852
- /* @__PURE__ */ jsx16(
2883
+ /* @__PURE__ */ jsx17(
2853
2884
  "input",
2854
2885
  {
2855
2886
  type: "search",
@@ -2862,9 +2893,9 @@ function ColumnChooser({
2862
2893
  }
2863
2894
  }
2864
2895
  ),
2865
- entries.length === 0 ? /* @__PURE__ */ jsx16("p", { role: "status", className: "gridkit-column-chooser-empty", children: messages.noMatchingColumns }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
2896
+ entries.length === 0 ? /* @__PURE__ */ jsx17("p", { role: "status", className: "gridkit-column-chooser-empty", children: messages.noMatchingColumns }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
2866
2897
  /* @__PURE__ */ jsxs10("label", { className: "gridkit-column-chooser-option gridkit-column-chooser-all", children: [
2867
- /* @__PURE__ */ jsx16(
2898
+ /* @__PURE__ */ jsx17(
2868
2899
  "input",
2869
2900
  {
2870
2901
  ref: showAllRef,
@@ -2880,8 +2911,8 @@ function ColumnChooser({
2880
2911
  ),
2881
2912
  messages.showAllColumns
2882
2913
  ] }),
2883
- /* @__PURE__ */ jsx16("ul", { className: "gridkit-column-chooser-list", children: entries.map((entry) => /* @__PURE__ */ jsx16("li", { children: /* @__PURE__ */ jsxs10("label", { className: "gridkit-column-chooser-option", children: [
2884
- /* @__PURE__ */ jsx16(
2914
+ /* @__PURE__ */ jsx17("ul", { className: "gridkit-column-chooser-list", children: entries.map((entry) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsxs10("label", { className: "gridkit-column-chooser-option", children: [
2915
+ /* @__PURE__ */ jsx17(
2885
2916
  "input",
2886
2917
  {
2887
2918
  type: "checkbox",
@@ -3011,7 +3042,7 @@ function useMenuButton({
3011
3042
  }
3012
3043
 
3013
3044
  // src/DataGrid/filterMenu/OperatorMenuButton.tsx
3014
- import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
3045
+ import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
3015
3046
  function gapBeside(button) {
3016
3047
  const dialog = button.closest('[role="dialog"]') ?? button;
3017
3048
  return dialog.getBoundingClientRect().right - button.getBoundingClientRect().right + ANCHOR_GAP;
@@ -3049,20 +3080,20 @@ function OperatorMenuButton({
3049
3080
  className: "gridkit-filter-menu-submenu",
3050
3081
  ...buttonProps,
3051
3082
  children: [
3052
- /* @__PURE__ */ jsx17("span", { className: "gridkit-filter-menu-submenu-icon", "aria-hidden": "true", children: active !== void 0 && /* @__PURE__ */ jsx17(CheckIcon, {}) }),
3083
+ /* @__PURE__ */ jsx18("span", { className: "gridkit-filter-menu-submenu-icon", "aria-hidden": "true", children: active !== void 0 && /* @__PURE__ */ jsx18(CheckIcon, {}) }),
3053
3084
  label,
3054
- /* @__PURE__ */ jsx17(
3085
+ /* @__PURE__ */ jsx18(
3055
3086
  "span",
3056
3087
  {
3057
3088
  className: "gridkit-filter-menu-submenu-indicator",
3058
3089
  "aria-hidden": "true",
3059
- children: /* @__PURE__ */ jsx17(ChevronRightIcon2, {})
3090
+ children: /* @__PURE__ */ jsx18(ChevronRightIcon2, {})
3060
3091
  }
3061
3092
  )
3062
3093
  ]
3063
3094
  }
3064
3095
  ),
3065
- state.kind === "open" && /* @__PURE__ */ jsx17(
3096
+ state.kind === "open" && /* @__PURE__ */ jsx18(
3066
3097
  Overlay,
3067
3098
  {
3068
3099
  anchor: state.anchor,
@@ -3071,7 +3102,7 @@ function OperatorMenuButton({
3071
3102
  returnFocusTo: state.anchor,
3072
3103
  scope: state.scope,
3073
3104
  onDismiss: close,
3074
- children: /* @__PURE__ */ jsx17(
3105
+ children: /* @__PURE__ */ jsx18(
3075
3106
  GridMenu,
3076
3107
  {
3077
3108
  entries,
@@ -3110,7 +3141,7 @@ import {
3110
3141
  filterOperandArity,
3111
3142
  parseFilterOperand
3112
3143
  } from "@gridkitjs/core/renderer";
3113
- import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
3144
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
3114
3145
  function inputType(family, type) {
3115
3146
  switch (family) {
3116
3147
  case "text":
@@ -3144,12 +3175,12 @@ function OperandField({
3144
3175
  };
3145
3176
  if (family === "boolean") {
3146
3177
  return /* @__PURE__ */ jsxs12("select", { ...field, children: [
3147
- /* @__PURE__ */ jsx18("option", { value: "" }),
3148
- /* @__PURE__ */ jsx18("option", { value: "true", children: messages.booleanTrue }),
3149
- /* @__PURE__ */ jsx18("option", { value: "false", children: messages.booleanFalse })
3178
+ /* @__PURE__ */ jsx19("option", { value: "" }),
3179
+ /* @__PURE__ */ jsx19("option", { value: "true", children: messages.booleanTrue }),
3180
+ /* @__PURE__ */ jsx19("option", { value: "false", children: messages.booleanFalse })
3150
3181
  ] });
3151
3182
  }
3152
- return /* @__PURE__ */ jsx18("input", { ...field, type: inputType(family, type) });
3183
+ return /* @__PURE__ */ jsx19("input", { ...field, type: inputType(family, type) });
3153
3184
  }
3154
3185
  function ConditionRow({
3155
3186
  row,
@@ -3176,7 +3207,7 @@ function ConditionRow({
3176
3207
  "aria-label": messages.filterConditionLabel(position),
3177
3208
  className: "gridkit-filter-menu-condition",
3178
3209
  children: [
3179
- /* @__PURE__ */ jsx18(
3210
+ /* @__PURE__ */ jsx19(
3180
3211
  "select",
3181
3212
  {
3182
3213
  ref: arity === 0 ? focusRef : void 0,
@@ -3189,10 +3220,10 @@ function ConditionRow({
3189
3220
  onChange({ ...row, operator });
3190
3221
  }
3191
3222
  },
3192
- children: operators.map((operator) => /* @__PURE__ */ jsx18("option", { value: operator, children: messages.filterOperatorLabel(operator, menu.family) }, operator))
3223
+ children: operators.map((operator) => /* @__PURE__ */ jsx19("option", { value: operator, children: messages.filterOperatorLabel(operator, menu.family) }, operator))
3193
3224
  }
3194
3225
  ),
3195
- arity > 0 && /* @__PURE__ */ jsx18(
3226
+ arity > 0 && /* @__PURE__ */ jsx19(
3196
3227
  OperandField,
3197
3228
  {
3198
3229
  ...operand,
@@ -3205,7 +3236,7 @@ function ConditionRow({
3205
3236
  }
3206
3237
  }
3207
3238
  ),
3208
- arity === 2 && /* @__PURE__ */ jsx18(
3239
+ arity === 2 && /* @__PURE__ */ jsx19(
3209
3240
  OperandField,
3210
3241
  {
3211
3242
  ...operand,
@@ -3303,7 +3334,7 @@ function simpleEditorReducer(state, action) {
3303
3334
  }
3304
3335
 
3305
3336
  // src/DataGrid/filterMenu/SimpleFilterEditor.tsx
3306
- import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
3337
+ import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
3307
3338
  var COMBINATORS = ["and", "or"];
3308
3339
  function holdsUnreadable(row) {
3309
3340
  return Array.from(row?.querySelectorAll("input") ?? []).some(
@@ -3316,14 +3347,14 @@ function CombinatorChoice({
3316
3347
  messages,
3317
3348
  onChange
3318
3349
  }) {
3319
- return /* @__PURE__ */ jsx19(
3350
+ return /* @__PURE__ */ jsx20(
3320
3351
  "div",
3321
3352
  {
3322
3353
  role: "radiogroup",
3323
3354
  "aria-label": messages.filterCombinatorLabel,
3324
3355
  className: "gridkit-filter-menu-combinator",
3325
3356
  children: COMBINATORS.map((choice) => /* @__PURE__ */ jsxs13("label", { className: "gridkit-filter-menu-combinator-option", children: [
3326
- /* @__PURE__ */ jsx19(
3357
+ /* @__PURE__ */ jsx20(
3327
3358
  "input",
3328
3359
  {
3329
3360
  type: "radio",
@@ -3402,11 +3433,11 @@ function SimpleFilterEditor({
3402
3433
  }
3403
3434
  }, [invalid]);
3404
3435
  return /* @__PURE__ */ jsxs13("div", { className: "gridkit-filter-menu-conditions", children: [
3405
- opened.custom && /* @__PURE__ */ jsx19("p", { className: "gridkit-filter-menu-custom", children: messages.customFilter }),
3436
+ opened.custom && /* @__PURE__ */ jsx20("p", { className: "gridkit-filter-menu-custom", children: messages.customFilter }),
3406
3437
  draft.rows.map((row, index) => (
3407
3438
  // A row is its place: the first condition, or the second.
3408
3439
  /* @__PURE__ */ jsxs13(Fragment5, { children: [
3409
- index > 0 && /* @__PURE__ */ jsx19(
3440
+ index > 0 && /* @__PURE__ */ jsx20(
3410
3441
  CombinatorChoice,
3411
3442
  {
3412
3443
  name: combinatorName,
@@ -3417,7 +3448,7 @@ function SimpleFilterEditor({
3417
3448
  }
3418
3449
  }
3419
3450
  ),
3420
- /* @__PURE__ */ jsx19(
3451
+ /* @__PURE__ */ jsx20(
3421
3452
  ConditionRow,
3422
3453
  {
3423
3454
  ref: (element) => {
@@ -3437,7 +3468,7 @@ function SimpleFilterEditor({
3437
3468
  )
3438
3469
  ] }, index)
3439
3470
  )),
3440
- invalid.length > 0 && /* @__PURE__ */ jsx19("p", { id: invalidMessageId, className: "gridkit-filter-menu-invalid", children: messages.filterValueInvalid(menu.family) })
3471
+ invalid.length > 0 && /* @__PURE__ */ jsx20("p", { id: invalidMessageId, className: "gridkit-filter-menu-invalid", children: messages.filterValueInvalid(menu.family) })
3441
3472
  ] });
3442
3473
  }
3443
3474
 
@@ -3447,7 +3478,7 @@ import {
3447
3478
  attachChecklist,
3448
3479
  createRowVirtualizer
3449
3480
  } from "@gridkitjs/dom";
3450
- import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
3481
+ import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
3451
3482
  var ESTIMATED_ITEM_HEIGHT = 28;
3452
3483
  var OVERSCAN = 4;
3453
3484
  var NO_RANGE = {
@@ -3513,7 +3544,7 @@ function ValueChecklist({
3513
3544
  "aria-label": label,
3514
3545
  className: "gridkit-filter-menu-checklist",
3515
3546
  children: [
3516
- /* @__PURE__ */ jsx20("div", { role: "presentation", style: { height: range.offsetBefore } }),
3547
+ /* @__PURE__ */ jsx21("div", { role: "presentation", style: { height: range.offsetBefore } }),
3517
3548
  shown.map((item, offset) => {
3518
3549
  const index = range.startIndex + offset;
3519
3550
  return /* @__PURE__ */ jsxs14(
@@ -3528,32 +3559,32 @@ function ValueChecklist({
3528
3559
  "aria-posinset": index + 1,
3529
3560
  className: "gridkit-filter-menu-option",
3530
3561
  children: [
3531
- /* @__PURE__ */ jsx20(
3562
+ /* @__PURE__ */ jsx21(
3532
3563
  "span",
3533
3564
  {
3534
3565
  className: "gridkit-filter-menu-option-check",
3535
3566
  "aria-hidden": "true",
3536
- children: /* @__PURE__ */ jsx20(CheckIcon, {})
3567
+ children: /* @__PURE__ */ jsx21(CheckIcon, {})
3537
3568
  }
3538
3569
  ),
3539
- /* @__PURE__ */ jsx20("span", { className: "gridkit-filter-menu-option-label", children: item.label }),
3570
+ /* @__PURE__ */ jsx21("span", { className: "gridkit-filter-menu-option-label", children: item.label }),
3540
3571
  showCounts && /* @__PURE__ */ jsxs14(Fragment6, { children: [
3541
3572
  " ",
3542
- /* @__PURE__ */ jsx20("span", { className: "gridkit-filter-menu-option-count", children: String(item.count) })
3573
+ /* @__PURE__ */ jsx21("span", { className: "gridkit-filter-menu-option-count", children: String(item.count) })
3543
3574
  ] })
3544
3575
  ]
3545
3576
  },
3546
3577
  item.key
3547
3578
  );
3548
3579
  }),
3549
- /* @__PURE__ */ jsx20("div", { role: "presentation", style: { height: range.offsetAfter } })
3580
+ /* @__PURE__ */ jsx21("div", { role: "presentation", style: { height: range.offsetAfter } })
3550
3581
  ]
3551
3582
  }
3552
3583
  );
3553
3584
  }
3554
3585
 
3555
3586
  // src/DataGrid/filterMenu/ExcelFilterEditor.tsx
3556
- import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
3587
+ import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
3557
3588
  var OPENED_ON_VALUES = {
3558
3589
  kind: "values",
3559
3590
  focusOnMount: false
@@ -3630,12 +3661,12 @@ function ExcelFilterEditor({
3630
3661
  setMode({ kind: "values", focusOnMount: true });
3631
3662
  },
3632
3663
  children: [
3633
- /* @__PURE__ */ jsx21("span", { className: "gridkit-filter-menu-back-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(ChevronLeftIcon2, {}) }),
3664
+ /* @__PURE__ */ jsx22("span", { className: "gridkit-filter-menu-back-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx22(ChevronLeftIcon2, {}) }),
3634
3665
  messages.filterBackToValues
3635
3666
  ]
3636
3667
  }
3637
3668
  ),
3638
- /* @__PURE__ */ jsx21(
3669
+ /* @__PURE__ */ jsx22(
3639
3670
  SimpleFilterEditor,
3640
3671
  {
3641
3672
  ref: conditions,
@@ -3654,7 +3685,7 @@ function ExcelFilterEditor({
3654
3685
  }
3655
3686
  const { shape } = opened;
3656
3687
  return /* @__PURE__ */ jsxs15("div", { className: "gridkit-filter-menu-values", children: [
3657
- menu.operators.length > 0 && /* @__PURE__ */ jsx21(
3688
+ menu.operators.length > 0 && /* @__PURE__ */ jsx22(
3658
3689
  OperatorMenuButton,
3659
3690
  {
3660
3691
  ref: operatorButton,
@@ -3666,8 +3697,8 @@ function ExcelFilterEditor({
3666
3697
  }
3667
3698
  }
3668
3699
  ),
3669
- (shape.kind === "conditions" || shape.kind === "custom") && /* @__PURE__ */ jsx21("p", { className: "gridkit-filter-menu-custom", children: shape.kind === "conditions" ? messages.filterByCondition : messages.customFilter }),
3670
- /* @__PURE__ */ jsx21(
3700
+ (shape.kind === "conditions" || shape.kind === "custom") && /* @__PURE__ */ jsx22("p", { className: "gridkit-filter-menu-custom", children: shape.kind === "conditions" ? messages.filterByCondition : messages.customFilter }),
3701
+ /* @__PURE__ */ jsx22(
3671
3702
  "input",
3672
3703
  {
3673
3704
  ref: initialFocusRef,
@@ -3682,7 +3713,7 @@ function ExcelFilterEditor({
3682
3713
  }
3683
3714
  ),
3684
3715
  /* @__PURE__ */ jsxs15("label", { className: "gridkit-filter-menu-select-all", children: [
3685
- /* @__PURE__ */ jsx21(
3716
+ /* @__PURE__ */ jsx22(
3686
3717
  "input",
3687
3718
  {
3688
3719
  ref: selectAllRef,
@@ -3696,7 +3727,7 @@ function ExcelFilterEditor({
3696
3727
  ),
3697
3728
  messages.filterSelectAll
3698
3729
  ] }),
3699
- checklist.needsSearch ? /* @__PURE__ */ jsx21("p", { className: "gridkit-filter-menu-search-first", children: messages.filterSearchFirst(checklist.total) }) : /* @__PURE__ */ jsx21(
3730
+ checklist.needsSearch ? /* @__PURE__ */ jsx22("p", { className: "gridkit-filter-menu-search-first", children: messages.filterSearchFirst(checklist.total) }) : /* @__PURE__ */ jsx22(
3700
3731
  ValueChecklist,
3701
3732
  {
3702
3733
  items: checklist.items,
@@ -3707,12 +3738,12 @@ function ExcelFilterEditor({
3707
3738
  }
3708
3739
  }
3709
3740
  ),
3710
- checklist.hiddenCount > 0 && /* @__PURE__ */ jsx21("p", { role: "status", className: "gridkit-filter-menu-more", children: messages.filterMoreValues(checklist.hiddenCount) })
3741
+ checklist.hiddenCount > 0 && /* @__PURE__ */ jsx22("p", { role: "status", className: "gridkit-filter-menu-more", children: messages.filterMoreValues(checklist.hiddenCount) })
3711
3742
  ] });
3712
3743
  }
3713
3744
 
3714
3745
  // src/DataGrid/filterMenu/FilterMenu.tsx
3715
- import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
3746
+ import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
3716
3747
  var SORT_COMMANDS = [
3717
3748
  "sort.ascending",
3718
3749
  "sort.descending",
@@ -3769,7 +3800,7 @@ function FilterMenu({
3769
3800
  close();
3770
3801
  }
3771
3802
  }
3772
- return /* @__PURE__ */ jsx22(
3803
+ return /* @__PURE__ */ jsx23(
3773
3804
  "div",
3774
3805
  {
3775
3806
  role: "dialog",
@@ -3790,7 +3821,7 @@ function FilterMenu({
3790
3821
  }
3791
3822
  },
3792
3823
  children: [
3793
- sortItems.length > 0 && /* @__PURE__ */ jsx22("div", { className: "gridkit-filter-menu-sort", children: sortItems.map((item) => /* @__PURE__ */ jsxs16(
3824
+ sortItems.length > 0 && /* @__PURE__ */ jsx23("div", { className: "gridkit-filter-menu-sort", children: sortItems.map((item) => /* @__PURE__ */ jsxs16(
3794
3825
  "button",
3795
3826
  {
3796
3827
  type: "button",
@@ -3805,12 +3836,12 @@ function FilterMenu({
3805
3836
  run(item);
3806
3837
  },
3807
3838
  children: [
3808
- /* @__PURE__ */ jsx22(
3839
+ /* @__PURE__ */ jsx23(
3809
3840
  "span",
3810
3841
  {
3811
3842
  className: "gridkit-filter-menu-sort-icon",
3812
3843
  "aria-hidden": "true",
3813
- children: /* @__PURE__ */ jsx22(MenuIcon, { name: item.icon })
3844
+ children: /* @__PURE__ */ jsx23(MenuIcon, { name: item.icon })
3814
3845
  }
3815
3846
  ),
3816
3847
  item.label
@@ -3818,9 +3849,9 @@ function FilterMenu({
3818
3849
  },
3819
3850
  item.id
3820
3851
  )) }),
3821
- menu.ui === "excel" ? /* @__PURE__ */ jsx22(ExcelFilterEditor, { ...editorProps, columnValues }) : /* @__PURE__ */ jsx22(SimpleFilterEditor, { ...editorProps }),
3852
+ menu.ui === "excel" ? /* @__PURE__ */ jsx23(ExcelFilterEditor, { ...editorProps, columnValues }) : /* @__PURE__ */ jsx23(SimpleFilterEditor, { ...editorProps }),
3822
3853
  /* @__PURE__ */ jsxs16("div", { className: "gridkit-filter-menu-actions", children: [
3823
- clearItem !== void 0 && /* @__PURE__ */ jsx22(
3854
+ clearItem !== void 0 && /* @__PURE__ */ jsx23(
3824
3855
  "button",
3825
3856
  {
3826
3857
  type: "button",
@@ -3832,7 +3863,7 @@ function FilterMenu({
3832
3863
  children: clearItem.label
3833
3864
  }
3834
3865
  ),
3835
- /* @__PURE__ */ jsx22(
3866
+ /* @__PURE__ */ jsx23(
3836
3867
  "button",
3837
3868
  {
3838
3869
  type: "button",
@@ -3841,7 +3872,7 @@ function FilterMenu({
3841
3872
  children: messages.cancelFilter
3842
3873
  }
3843
3874
  ),
3844
- /* @__PURE__ */ jsx22("button", { type: "submit", className: "gridkit-filter-menu-apply", children: messages.applyFilter })
3875
+ /* @__PURE__ */ jsx23("button", { type: "submit", className: "gridkit-filter-menu-apply", children: messages.applyFilter })
3845
3876
  ] })
3846
3877
  ]
3847
3878
  }
@@ -3898,7 +3929,7 @@ function useFilterValueCache(controller, messages) {
3898
3929
  }
3899
3930
 
3900
3931
  // src/DataGrid/panels/GridPanels.tsx
3901
- import { jsx as jsx23 } from "react/jsx-runtime";
3932
+ import { jsx as jsx24 } from "react/jsx-runtime";
3902
3933
  var panelKinds = {
3903
3934
  columnChooser: { component: ColumnChooser, trapFocus: false },
3904
3935
  filter: { component: FilterMenu, trapFocus: true }
@@ -3921,7 +3952,7 @@ function GridPanels({
3921
3952
  return null;
3922
3953
  }
3923
3954
  const { component: Panel, trapFocus } = panelKinds[panel.kind];
3924
- return /* @__PURE__ */ jsx23(
3955
+ return /* @__PURE__ */ jsx24(
3925
3956
  Overlay,
3926
3957
  {
3927
3958
  anchor: panel.anchor,
@@ -3934,7 +3965,7 @@ function GridPanels({
3934
3965
  trapFocus,
3935
3966
  scope: panel.scope,
3936
3967
  onDismiss: close,
3937
- children: /* @__PURE__ */ jsx23(
3968
+ children: /* @__PURE__ */ jsx24(
3938
3969
  Panel,
3939
3970
  {
3940
3971
  target: panel.target,
@@ -4062,7 +4093,7 @@ import { splitToolbarItems } from "@gridkitjs/core/renderer";
4062
4093
  import { attachToolbar } from "@gridkitjs/dom";
4063
4094
 
4064
4095
  // src/DataGrid/toolbar/ToolbarMenuButton.tsx
4065
- import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
4096
+ import { Fragment as Fragment8, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
4066
4097
  function ToolbarMenuButton({
4067
4098
  itemKey,
4068
4099
  attributes,
@@ -4089,13 +4120,13 @@ function ToolbarMenuButton({
4089
4120
  ...ariaAttr(more, "data-gridkit-toolbar-more", ""),
4090
4121
  ...buttonProps,
4091
4122
  children: [
4092
- icon !== void 0 && /* @__PURE__ */ jsx24("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx24(MenuIcon, { name: icon }) }),
4123
+ icon !== void 0 && /* @__PURE__ */ jsx25("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx25(MenuIcon, { name: icon }) }),
4093
4124
  label,
4094
- /* @__PURE__ */ jsx24("span", { className: "gridkit-toolbar-button-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx24(ChevronDownIcon, {}) })
4125
+ /* @__PURE__ */ jsx25("span", { className: "gridkit-toolbar-button-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx25(ChevronDownIcon, {}) })
4095
4126
  ]
4096
4127
  }
4097
4128
  ),
4098
- state.kind === "open" && /* @__PURE__ */ jsx24(
4129
+ state.kind === "open" && /* @__PURE__ */ jsx25(
4099
4130
  Overlay,
4100
4131
  {
4101
4132
  anchor: state.anchor,
@@ -4105,7 +4136,7 @@ function ToolbarMenuButton({
4105
4136
  returnFocusFallback,
4106
4137
  scope: state.scope,
4107
4138
  onDismiss: close,
4108
- children: /* @__PURE__ */ jsx24(
4139
+ children: /* @__PURE__ */ jsx25(
4109
4140
  GridMenu,
4110
4141
  {
4111
4142
  entries,
@@ -4127,7 +4158,7 @@ function ToolbarMenuButton({
4127
4158
  // src/DataGrid/toolbar/ToolbarSearch.tsx
4128
4159
  import { useEffect as useEffect6, useRef as useRef17, useState as useState12 } from "react";
4129
4160
  import { searchTextOf, setSearchText } from "@gridkitjs/core/renderer";
4130
- import { jsx as jsx25 } from "react/jsx-runtime";
4161
+ import { jsx as jsx26 } from "react/jsx-runtime";
4131
4162
  var SEARCH_DELAY_MS = 250;
4132
4163
  function ToolbarSearch({
4133
4164
  itemKey,
@@ -4163,7 +4194,7 @@ function ToolbarSearch({
4163
4194
  },
4164
4195
  []
4165
4196
  );
4166
- return /* @__PURE__ */ jsx25(
4197
+ return /* @__PURE__ */ jsx26(
4167
4198
  "input",
4168
4199
  {
4169
4200
  ...attributes,
@@ -4232,7 +4263,7 @@ function useToolbarOverflow(toolbarRef, items) {
4232
4263
  }
4233
4264
 
4234
4265
  // src/DataGrid/toolbar/GridToolbar.tsx
4235
- import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
4266
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
4236
4267
  function reporting(run, report) {
4237
4268
  return () => {
4238
4269
  const ran = run();
@@ -4285,7 +4316,7 @@ function GridToolbar(props) {
4285
4316
  return null;
4286
4317
  }
4287
4318
  const options = typeof props.toolbar === "object" ? props.toolbar : void 0;
4288
- return /* @__PURE__ */ jsx26(
4319
+ return /* @__PURE__ */ jsx27(
4289
4320
  Toolbar,
4290
4321
  {
4291
4322
  ...props,
@@ -4351,14 +4382,14 @@ function Toolbar({
4351
4382
  item.run();
4352
4383
  },
4353
4384
  children: [
4354
- item.icon !== void 0 && /* @__PURE__ */ jsx26("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(MenuIcon, { name: item.icon }) }),
4385
+ item.icon !== void 0 && /* @__PURE__ */ jsx27("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx27(MenuIcon, { name: item.icon }) }),
4355
4386
  item.label
4356
4387
  ]
4357
4388
  },
4358
4389
  item.key
4359
4390
  );
4360
4391
  case "menu":
4361
- return /* @__PURE__ */ jsx26(
4392
+ return /* @__PURE__ */ jsx27(
4362
4393
  ToolbarMenuButton,
4363
4394
  {
4364
4395
  itemKey: item.key,
@@ -4371,7 +4402,7 @@ function Toolbar({
4371
4402
  item.key
4372
4403
  );
4373
4404
  case "search":
4374
- return /* @__PURE__ */ jsx26(
4405
+ return /* @__PURE__ */ jsx27(
4375
4406
  ToolbarSearch,
4376
4407
  {
4377
4408
  itemKey: item.key,
@@ -4383,7 +4414,7 @@ function Toolbar({
4383
4414
  item.key
4384
4415
  );
4385
4416
  case "separator":
4386
- return /* @__PURE__ */ jsx26(
4417
+ return /* @__PURE__ */ jsx27(
4387
4418
  "div",
4388
4419
  {
4389
4420
  role: "separator",
@@ -4394,7 +4425,7 @@ function Toolbar({
4394
4425
  item.key
4395
4426
  );
4396
4427
  case "spacer":
4397
- return /* @__PURE__ */ jsx26(
4428
+ return /* @__PURE__ */ jsx27(
4398
4429
  "div",
4399
4430
  {
4400
4431
  className: "gridkit-toolbar-spacer",
@@ -4403,7 +4434,7 @@ function Toolbar({
4403
4434
  item.key
4404
4435
  );
4405
4436
  case "custom":
4406
- return /* @__PURE__ */ jsx26(
4437
+ return /* @__PURE__ */ jsx27(
4407
4438
  "div",
4408
4439
  {
4409
4440
  ...item.attributes,
@@ -4425,7 +4456,7 @@ function Toolbar({
4425
4456
  className: "gridkit-toolbar",
4426
4457
  children: [
4427
4458
  shown.map(draw),
4428
- overflow.length > 0 && /* @__PURE__ */ jsx26(
4459
+ overflow.length > 0 && /* @__PURE__ */ jsx27(
4429
4460
  ToolbarMenuButton,
4430
4461
  {
4431
4462
  itemKey: "more",
@@ -4769,7 +4800,7 @@ function useRowVirtualizer({
4769
4800
  }
4770
4801
 
4771
4802
  // src/DataGrid/DataGrid.tsx
4772
- import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
4803
+ import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
4773
4804
  var NO_AGGREGATES = [];
4774
4805
  function paginationReader(controller) {
4775
4806
  let last;
@@ -4807,8 +4838,8 @@ function tablesStyle(height, headerHeight, footerHeight, pinned) {
4807
4838
  const style = { ...heights, ...widths };
4808
4839
  return Object.keys(style).length === 0 ? void 0 : style;
4809
4840
  }
4810
- function emptyContext(view, filter, infiniteScroll) {
4811
- if (view.pageRows.length > 0 || view.columns.length === 0 || infiniteScroll?.hasMore === true) {
4841
+ function emptyContext(view, filter, loading, infiniteScroll) {
4842
+ if (view.pageRows.length > 0 || view.columns.length === 0 || loading || infiniteScroll?.hasMore === true) {
4812
4843
  return null;
4813
4844
  }
4814
4845
  return { filtered: filter.length > 0 };
@@ -4824,6 +4855,7 @@ function DataGrid(props) {
4824
4855
  groupableColumns = false,
4825
4856
  groupToggleIconColumns = true,
4826
4857
  groupByBarVisibility = "auto",
4858
+ loading = false,
4827
4859
  paginated = false,
4828
4860
  pager,
4829
4861
  infiniteScroll,
@@ -4901,11 +4933,17 @@ function DataGrid(props) {
4901
4933
  sentinelRef,
4902
4934
  config: infiniteScroll
4903
4935
  });
4904
- const empty = emptyContext(view, state.filter, infiniteScroll);
4905
- const emptyWidth = useElementWidth(
4936
+ const empty = emptyContext(view, state.filter, loading, infiniteScroll);
4937
+ const messageWidth = useElementWidth(
4906
4938
  gridRef,
4907
- empty !== null && resizeMode !== "fit"
4939
+ (empty !== null || loading) && resizeMode !== "fit"
4908
4940
  );
4941
+ const bodyViewportWidth = viewportWidth ?? messageWidth;
4942
+ useEffect8(() => {
4943
+ if (loading) {
4944
+ announce(messages.loading);
4945
+ }
4946
+ }, [loading, announce, messages.loading]);
4909
4947
  function columnOf(columnId) {
4910
4948
  return view.dataColumns.find((candidate) => candidate.id === columnId)?.column;
4911
4949
  }
@@ -5185,7 +5223,7 @@ function DataGrid(props) {
5185
5223
  ref: viewportRef,
5186
5224
  tabIndex: -1,
5187
5225
  children: [
5188
- /* @__PURE__ */ jsx27(
5226
+ /* @__PURE__ */ jsx28(
5189
5227
  GridToolbar,
5190
5228
  {
5191
5229
  toolbar: props.toolbar,
@@ -5197,7 +5235,7 @@ function DataGrid(props) {
5197
5235
  announce
5198
5236
  }
5199
5237
  ),
5200
- showGroupByBar && /* @__PURE__ */ jsx27(
5238
+ showGroupByBar && /* @__PURE__ */ jsx28(
5201
5239
  GroupByBar,
5202
5240
  {
5203
5241
  columns: view.columns,
@@ -5228,6 +5266,7 @@ function DataGrid(props) {
5228
5266
  pinnedWidths2(view.columns)
5229
5267
  ),
5230
5268
  ...ariaAttr(multiselectable, "aria-multiselectable", true),
5269
+ ...ariaAttr(loading, "aria-busy", true),
5231
5270
  ...ariaAttr(labelledBy !== void 0, "aria-labelledby", labelledBy),
5232
5271
  ...ariaAttr(
5233
5272
  labelledBy === void 0 && label !== void 0,
@@ -5258,8 +5297,8 @@ function DataGrid(props) {
5258
5297
  style: { width: totalColumnWidth(view.columns) },
5259
5298
  className: classNames(gridTableClassName, "gridkit-data-grid-header"),
5260
5299
  children: [
5261
- /* @__PURE__ */ jsx27(GridColgroup, { columns: view.columns }),
5262
- /* @__PURE__ */ jsx27(
5300
+ /* @__PURE__ */ jsx28(GridColgroup, { columns: view.columns }),
5301
+ /* @__PURE__ */ jsx28(
5263
5302
  GridHeader,
5264
5303
  {
5265
5304
  columns: view.columns,
@@ -5280,52 +5319,62 @@ function DataGrid(props) {
5280
5319
  ]
5281
5320
  }
5282
5321
  ),
5283
- /* @__PURE__ */ jsx27(
5322
+ /* @__PURE__ */ jsxs19(
5284
5323
  "div",
5285
5324
  {
5286
5325
  className: "gridkit-data-grid-body",
5287
5326
  ref: bodyRef,
5288
5327
  role: "rowgroup",
5289
5328
  tabIndex: -1,
5290
- children: /* @__PURE__ */ jsxs19(
5291
- "table",
5292
- {
5293
- ref: bodyTableRef,
5294
- role: "presentation",
5295
- style: { width: totalColumnWidth(view.columns) },
5296
- className: gridTableClassName,
5297
- children: [
5298
- /* @__PURE__ */ jsx27(GridColgroup, { columns: view.columns }),
5299
- /* @__PURE__ */ jsx27(
5300
- GridBody,
5301
- {
5302
- columns: view.columns,
5303
- definitions,
5304
- rows: view.pageRows,
5305
- activeColumnId: resize.activeColumnId,
5306
- nav,
5307
- selection,
5308
- controller,
5309
- aggregates,
5310
- groupAggregateDisplay,
5311
- virtualRange: virtualized ? virtualizer : null,
5312
- infiniteScroll,
5313
- sentinelRef,
5314
- empty,
5315
- emptyTemplate: props.emptyTemplate,
5316
- viewportWidth: viewportWidth ?? emptyWidth,
5317
- locale,
5318
- getRowProps,
5319
- onRowClick,
5320
- onRowDoubleClick,
5321
- messages,
5322
- cellMenu: contextMenu.opens("cell"),
5323
- groupMenu: contextMenu.opens("group")
5324
- }
5325
- )
5326
- ]
5327
- }
5328
- )
5329
+ children: [
5330
+ /* @__PURE__ */ jsxs19(
5331
+ "table",
5332
+ {
5333
+ ref: bodyTableRef,
5334
+ role: "presentation",
5335
+ style: { width: totalColumnWidth(view.columns) },
5336
+ className: gridTableClassName,
5337
+ children: [
5338
+ /* @__PURE__ */ jsx28(GridColgroup, { columns: view.columns }),
5339
+ /* @__PURE__ */ jsx28(
5340
+ GridBody,
5341
+ {
5342
+ columns: view.columns,
5343
+ definitions,
5344
+ rows: view.pageRows,
5345
+ activeColumnId: resize.activeColumnId,
5346
+ nav,
5347
+ selection,
5348
+ controller,
5349
+ aggregates,
5350
+ groupAggregateDisplay,
5351
+ virtualRange: virtualized ? virtualizer : null,
5352
+ infiniteScroll,
5353
+ sentinelRef,
5354
+ empty,
5355
+ emptyTemplate: props.emptyTemplate,
5356
+ viewportWidth: bodyViewportWidth,
5357
+ locale,
5358
+ getRowProps,
5359
+ onRowClick,
5360
+ onRowDoubleClick,
5361
+ messages,
5362
+ cellMenu: contextMenu.opens("cell"),
5363
+ groupMenu: contextMenu.opens("group")
5364
+ }
5365
+ )
5366
+ ]
5367
+ }
5368
+ ),
5369
+ loading && /* @__PURE__ */ jsx28(
5370
+ GridLoadingOverlay,
5371
+ {
5372
+ empty: view.pageRows.length === 0,
5373
+ viewportWidth: bodyViewportWidth,
5374
+ children: props.loadingTemplate ? props.loadingTemplate() : messages.loading
5375
+ }
5376
+ )
5377
+ ]
5329
5378
  }
5330
5379
  ),
5331
5380
  hasFooter && /* @__PURE__ */ jsxs19(
@@ -5339,8 +5388,8 @@ function DataGrid(props) {
5339
5388
  "gridkit-data-grid-footer"
5340
5389
  ),
5341
5390
  children: [
5342
- /* @__PURE__ */ jsx27(GridColgroup, { columns: view.columns }),
5343
- /* @__PURE__ */ jsx27(
5391
+ /* @__PURE__ */ jsx28(GridColgroup, { columns: view.columns }),
5392
+ /* @__PURE__ */ jsx28(
5344
5393
  GridFooter,
5345
5394
  {
5346
5395
  columns: view.columns,
@@ -5357,8 +5406,8 @@ function DataGrid(props) {
5357
5406
  ]
5358
5407
  }
5359
5408
  ),
5360
- /* @__PURE__ */ jsx27(GridContextMenu, { contextMenu }),
5361
- /* @__PURE__ */ jsx27(
5409
+ /* @__PURE__ */ jsx28(GridContextMenu, { contextMenu }),
5410
+ /* @__PURE__ */ jsx28(
5362
5411
  GridPanels,
5363
5412
  {
5364
5413
  panels,
@@ -5367,7 +5416,7 @@ function DataGrid(props) {
5367
5416
  messages
5368
5417
  }
5369
5418
  ),
5370
- paginated && (pager?.template ? pager.template(pagerContext) : /* @__PURE__ */ jsx27(GridPager, { pager: pagerContext, config: pager, messages }))
5419
+ paginated && (pager?.template ? pager.template(pagerContext) : /* @__PURE__ */ jsx28(GridPager, { pager: pagerContext, config: pager, messages }))
5371
5420
  ]
5372
5421
  }
5373
5422
  );