@gridkitjs/react 0.0.0-dev-20261118223155 → 0.0.0-dev-20261119132858

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
@@ -593,6 +593,27 @@ function createRowPropsResolver() {
593
593
  };
594
594
  }
595
595
 
596
+ // src/DataGrid/components/GridEmptyRow.tsx
597
+ import { jsx as jsx4 } from "react/jsx-runtime";
598
+ function GridEmptyRow({
599
+ columnCount,
600
+ viewportWidth,
601
+ children
602
+ }) {
603
+ const contentStyle = viewportWidth === null ? void 0 : {
604
+ "--gridkit-empty-width": `${String(viewportWidth)}px`
605
+ };
606
+ return /* @__PURE__ */ jsx4("tr", { role: "row", className: "gridkit-grid-empty-row", children: /* @__PURE__ */ jsx4(
607
+ "td",
608
+ {
609
+ role: "gridcell",
610
+ colSpan: columnCount,
611
+ className: "gridkit-grid-empty-cell",
612
+ children: /* @__PURE__ */ jsx4("div", { className: "gridkit-grid-empty-content", style: contentStyle, children })
613
+ }
614
+ ) });
615
+ }
616
+
596
617
  // src/DataGrid/components/GridGroupRow.tsx
597
618
  import { memo } from "react";
598
619
  import {
@@ -615,7 +636,7 @@ function renderAggregate(value, spec, column, rows, locale) {
615
636
  }
616
637
 
617
638
  // src/DataGrid/components/GridGroupRow.tsx
618
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
639
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
619
640
  function GridGroupRowComponent({
620
641
  columnCount,
621
642
  groupId,
@@ -637,7 +658,7 @@ function GridGroupRowComponent({
637
658
  cellMessages,
638
659
  ref
639
660
  }) {
640
- return /* @__PURE__ */ jsx4(
661
+ return /* @__PURE__ */ jsx5(
641
662
  "tr",
642
663
  {
643
664
  ref,
@@ -653,7 +674,7 @@ function GridGroupRowComponent({
653
674
  "gridkit-grid-group-row",
654
675
  `is-group-level-${String(level)}`
655
676
  ),
656
- children: /* @__PURE__ */ jsx4(
677
+ children: /* @__PURE__ */ jsx5(
657
678
  "td",
658
679
  {
659
680
  role: "gridcell",
@@ -667,7 +688,7 @@ function GridGroupRowComponent({
667
688
  className: "gridkit-grid-group-cell-content",
668
689
  style: { paddingInlineStart: `${String(level * 1.25 + 0.5)}rem` },
669
690
  children: [
670
- /* @__PURE__ */ jsx4(
691
+ /* @__PURE__ */ jsx5(
671
692
  "span",
672
693
  {
673
694
  className: classNames(
@@ -688,7 +709,7 @@ function GridGroupRowComponent({
688
709
  count,
689
710
  ")"
690
711
  ] }),
691
- aggregates.length > 0 && /* @__PURE__ */ jsx4("span", { className: "gridkit-group-aggregates", children: aggregates.map((spec) => {
712
+ aggregates.length > 0 && /* @__PURE__ */ jsx5("span", { className: "gridkit-group-aggregates", children: aggregates.map((spec) => {
692
713
  const key = spec.id ?? spec.columnId;
693
714
  const aggregateValue = results.get(key);
694
715
  const column = definitions.get(spec.columnId);
@@ -735,7 +756,7 @@ function textAlignFor(alignment) {
735
756
  }
736
757
 
737
758
  // src/DataGrid/components/GridGroupSummaryRow.tsx
738
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
759
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
739
760
  function GridGroupSummaryRowComponent({
740
761
  groupId,
741
762
  level,
@@ -747,7 +768,7 @@ function GridGroupSummaryRowComponent({
747
768
  locale,
748
769
  ref
749
770
  }) {
750
- return /* @__PURE__ */ jsx5(
771
+ return /* @__PURE__ */ jsx6(
751
772
  "tr",
752
773
  {
753
774
  ref,
@@ -777,7 +798,7 @@ function GridGroupSummaryRowComponent({
777
798
  ...pinnedCellStyle(entry)
778
799
  },
779
800
  children: [
780
- entry.id === columns[0]?.id && /* @__PURE__ */ jsx5(
801
+ entry.id === columns[0]?.id && /* @__PURE__ */ jsx6(
781
802
  "span",
782
803
  {
783
804
  className: "gridkit-grid-group-summary-indent",
@@ -815,7 +836,7 @@ import {
815
836
  formatCellValue
816
837
  } from "@gridkitjs/core";
817
838
  import { memo as memo3 } from "react";
818
- import { jsx as jsx6 } from "react/jsx-runtime";
839
+ import { jsx as jsx7 } from "react/jsx-runtime";
819
840
  function GridRowComponent({
820
841
  columns,
821
842
  rowId,
@@ -843,7 +864,7 @@ function GridRowComponent({
843
864
  cellsSelectable ? "Space Enter" : "",
844
865
  contextMenu ? "Shift+F10" : ""
845
866
  ].filter(Boolean).join(" ");
846
- return /* @__PURE__ */ jsx6(
867
+ return /* @__PURE__ */ jsx7(
847
868
  "tr",
848
869
  {
849
870
  ...rowAttributes,
@@ -865,7 +886,7 @@ function GridRowComponent({
865
886
  const { id, column, alignment } = entry;
866
887
  const value = accessDotted(row, column.field);
867
888
  const cellSelected = id === selectedColumnId;
868
- return /* @__PURE__ */ jsx6(
889
+ return /* @__PURE__ */ jsx7(
869
890
  "td",
870
891
  {
871
892
  role: "gridcell",
@@ -905,7 +926,7 @@ var GridRow = memo3(GridRowComponent);
905
926
  var GridRow_default = GridRow;
906
927
 
907
928
  // src/DataGrid/components/GridBody.tsx
908
- import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
929
+ import { Fragment, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
909
930
  function GridBody({
910
931
  columns,
911
932
  definitions,
@@ -919,6 +940,9 @@ function GridBody({
919
940
  virtualRange,
920
941
  infiniteScroll,
921
942
  sentinelRef,
943
+ empty,
944
+ emptyTemplate,
945
+ viewportWidth,
922
946
  locale,
923
947
  getRowProps,
924
948
  onRowClick,
@@ -1050,7 +1074,7 @@ function GridBody({
1050
1074
  // to give the browser's scrollbar the correct total height and thumb
1051
1075
  // position, the same way `GridFooter`'s `<tfoot>` isn't a "row" to
1052
1076
  // any of this grid's own row-counting logic.
1053
- /* @__PURE__ */ jsx7("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx7(
1077
+ /* @__PURE__ */ jsx8("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx8(
1054
1078
  "td",
1055
1079
  {
1056
1080
  style: {
@@ -1064,7 +1088,7 @@ function GridBody({
1064
1088
  switch (entry.kind) {
1065
1089
  case "data": {
1066
1090
  const rowProps = rowPropsOf(entry.rowId);
1067
- return /* @__PURE__ */ jsx7(
1091
+ return /* @__PURE__ */ jsx8(
1068
1092
  GridRow_default,
1069
1093
  {
1070
1094
  ref: virtualRange?.measureRow(entry.rowIndex),
@@ -1096,7 +1120,7 @@ function GridBody({
1096
1120
  );
1097
1121
  }
1098
1122
  case "group-summary":
1099
- return /* @__PURE__ */ jsx7(
1123
+ return /* @__PURE__ */ jsx8(
1100
1124
  GridGroupSummaryRow_default,
1101
1125
  {
1102
1126
  ref: virtualRange?.measureRow(entry.rowIndex),
@@ -1112,7 +1136,7 @@ function GridBody({
1112
1136
  `${entry.groupId}-summary`
1113
1137
  );
1114
1138
  case "group":
1115
- return /* @__PURE__ */ jsx7(
1139
+ return /* @__PURE__ */ jsx8(
1116
1140
  GridGroupRow_default,
1117
1141
  {
1118
1142
  ref: virtualRange?.measureRow(entry.rowIndex),
@@ -1141,7 +1165,15 @@ function GridBody({
1141
1165
  return entry;
1142
1166
  }
1143
1167
  }),
1144
- virtualRange !== null && virtualRange.offsetAfter > 0 && /* @__PURE__ */ jsx7("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx7(
1168
+ empty !== null && /* @__PURE__ */ jsx8(
1169
+ GridEmptyRow,
1170
+ {
1171
+ columnCount: columns.length,
1172
+ viewportWidth,
1173
+ children: emptyTemplate ? emptyTemplate(empty) : empty.filtered ? messages.noMatchingRows : messages.noRows
1174
+ }
1175
+ ),
1176
+ virtualRange !== null && virtualRange.offsetAfter > 0 && /* @__PURE__ */ jsx8("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx8(
1145
1177
  "td",
1146
1178
  {
1147
1179
  style: {
@@ -1152,7 +1184,7 @@ function GridBody({
1152
1184
  }
1153
1185
  ) }),
1154
1186
  infiniteScroll?.hasMore && /* @__PURE__ */ jsxs5(Fragment, { children: [
1155
- infiniteScroll.isLoadingMore === true && /* @__PURE__ */ jsx7("tr", { "aria-hidden": "true", className: "gridkit-grid-loading-row", children: /* @__PURE__ */ jsx7(
1187
+ infiniteScroll.isLoadingMore === true && /* @__PURE__ */ jsx8("tr", { "aria-hidden": "true", className: "gridkit-grid-loading-row", children: /* @__PURE__ */ jsx8(
1156
1188
  "td",
1157
1189
  {
1158
1190
  colSpan: columns.length,
@@ -1160,13 +1192,13 @@ function GridBody({
1160
1192
  children: infiniteScroll.loadingTemplate ? infiniteScroll.loadingTemplate() : messages.loadingMore
1161
1193
  }
1162
1194
  ) }),
1163
- /* @__PURE__ */ jsx7(
1195
+ /* @__PURE__ */ jsx8(
1164
1196
  "tr",
1165
1197
  {
1166
1198
  "aria-hidden": "true",
1167
1199
  ref: sentinelRef,
1168
1200
  className: "gridkit-grid-sentinel-row",
1169
- children: /* @__PURE__ */ jsx7(
1201
+ children: /* @__PURE__ */ jsx8(
1170
1202
  "td",
1171
1203
  {
1172
1204
  colSpan: columns.length,
@@ -1182,7 +1214,7 @@ function GridBody({
1182
1214
  }
1183
1215
 
1184
1216
  // src/DataGrid/components/GridFooter.tsx
1185
- import { jsx as jsx8 } from "react/jsx-runtime";
1217
+ import { jsx as jsx9 } from "react/jsx-runtime";
1186
1218
  function GridFooter({
1187
1219
  columns,
1188
1220
  aggregates,
@@ -1191,7 +1223,7 @@ function GridFooter({
1191
1223
  locale,
1192
1224
  ariaRowIndex
1193
1225
  }) {
1194
- return /* @__PURE__ */ jsx8("tfoot", { role: "rowgroup", children: /* @__PURE__ */ jsx8(
1226
+ return /* @__PURE__ */ jsx9("tfoot", { role: "rowgroup", children: /* @__PURE__ */ jsx9(
1195
1227
  "tr",
1196
1228
  {
1197
1229
  className: "gridkit-grid-footer",
@@ -1201,7 +1233,7 @@ function GridFooter({
1201
1233
  const specs = aggregates.filter(
1202
1234
  (candidate) => candidate.columnId === entry.id
1203
1235
  );
1204
- return /* @__PURE__ */ jsx8(
1236
+ return /* @__PURE__ */ jsx9(
1205
1237
  "td",
1206
1238
  {
1207
1239
  role: "gridcell",
@@ -1233,9 +1265,40 @@ function GridFooter({
1233
1265
  ) });
1234
1266
  }
1235
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
+
1236
1299
  // src/DataGrid/components/GridPager.tsx
1237
1300
  import { paginationWindow } from "@gridkitjs/core/renderer";
1238
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1301
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1239
1302
  function PagerNavButton({
1240
1303
  className,
1241
1304
  label,
@@ -1243,7 +1306,7 @@ function PagerNavButton({
1243
1306
  onClick,
1244
1307
  children
1245
1308
  }) {
1246
- return /* @__PURE__ */ jsx9(
1309
+ return /* @__PURE__ */ jsx11(
1247
1310
  "button",
1248
1311
  {
1249
1312
  type: "button",
@@ -1259,13 +1322,15 @@ function PagerNavButton({
1259
1322
  );
1260
1323
  }
1261
1324
  function GridPager({ pager, config, messages }) {
1262
- const { pagination, pageCount, currentPage } = pager;
1325
+ const { pagination } = pager;
1326
+ const pageCount = Math.max(1, pager.pageCount);
1327
+ const currentPage = Math.max(1, pager.currentPage);
1263
1328
  const variant = config?.variant ?? "compact";
1264
1329
  const sizeOptions = config?.sizeOptions;
1265
1330
  const atFirst = pagination.pageIndex <= 0;
1266
1331
  const atLast = pagination.pageIndex >= pageCount - 1;
1267
1332
  const barStyle = {
1268
- "--gridkit-pager-digits": String(String(Math.max(1, pageCount)).length)
1333
+ "--gridkit-pager-digits": String(String(pageCount).length)
1269
1334
  };
1270
1335
  return /* @__PURE__ */ jsxs6(
1271
1336
  "div",
@@ -1275,7 +1340,7 @@ function GridPager({ pager, config, messages }) {
1275
1340
  "aria-label": messages.pagerLabel,
1276
1341
  children: [
1277
1342
  /* @__PURE__ */ jsxs6("div", { className: "gridkit-grid-pager-bar", style: barStyle, children: [
1278
- /* @__PURE__ */ jsx9(
1343
+ /* @__PURE__ */ jsx11(
1279
1344
  PagerNavButton,
1280
1345
  {
1281
1346
  className: "gridkit-grid-pager-first",
@@ -1284,10 +1349,10 @@ function GridPager({ pager, config, messages }) {
1284
1349
  onClick: () => {
1285
1350
  pager.goToPage(0);
1286
1351
  },
1287
- children: /* @__PURE__ */ jsx9(ChevronsLeftIcon, {})
1352
+ children: /* @__PURE__ */ jsx11(ChevronsLeftIcon, {})
1288
1353
  }
1289
1354
  ),
1290
- /* @__PURE__ */ jsx9(
1355
+ /* @__PURE__ */ jsx11(
1291
1356
  PagerNavButton,
1292
1357
  {
1293
1358
  className: "gridkit-grid-pager-previous",
@@ -1296,14 +1361,14 @@ function GridPager({ pager, config, messages }) {
1296
1361
  onClick: () => {
1297
1362
  pager.previousPage();
1298
1363
  },
1299
- children: /* @__PURE__ */ jsx9(ChevronLeftIcon, {})
1364
+ children: /* @__PURE__ */ jsx11(ChevronLeftIcon, {})
1300
1365
  }
1301
1366
  ),
1302
1367
  variant === "numbered" ? paginationWindow(currentPage, pageCount, {
1303
1368
  boundaryCount: config?.boundaryCount,
1304
1369
  siblingCount: config?.siblingCount
1305
1370
  }).map(
1306
- (entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx9(
1371
+ (entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx11(
1307
1372
  "span",
1308
1373
  {
1309
1374
  className: "gridkit-grid-pager-ellipsis",
@@ -1311,7 +1376,7 @@ function GridPager({ pager, config, messages }) {
1311
1376
  children: "\u2026"
1312
1377
  },
1313
1378
  `ellipsis-${String(index)}`
1314
- ) : /* @__PURE__ */ jsx9(
1379
+ ) : /* @__PURE__ */ jsx11(
1315
1380
  "button",
1316
1381
  {
1317
1382
  type: "button",
@@ -1326,11 +1391,8 @@ function GridPager({ pager, config, messages }) {
1326
1391
  entry
1327
1392
  )
1328
1393
  ) : /* @__PURE__ */ jsxs6("span", { className: "gridkit-grid-pager-status-slot", children: [
1329
- /* @__PURE__ */ jsx9("span", { className: "gridkit-grid-pager-status", children: messages.pageStatus(
1330
- pageCount === 0 ? 0 : currentPage,
1331
- pageCount
1332
- ) }),
1333
- /* @__PURE__ */ jsx9(
1394
+ /* @__PURE__ */ jsx11("span", { className: "gridkit-grid-pager-status", children: messages.pageStatus(currentPage, pageCount) }),
1395
+ /* @__PURE__ */ jsx11(
1334
1396
  "span",
1335
1397
  {
1336
1398
  className: "gridkit-grid-pager-status-sizer",
@@ -1339,7 +1401,7 @@ function GridPager({ pager, config, messages }) {
1339
1401
  }
1340
1402
  )
1341
1403
  ] }),
1342
- /* @__PURE__ */ jsx9(
1404
+ /* @__PURE__ */ jsx11(
1343
1405
  PagerNavButton,
1344
1406
  {
1345
1407
  className: "gridkit-grid-pager-next",
@@ -1348,10 +1410,10 @@ function GridPager({ pager, config, messages }) {
1348
1410
  onClick: () => {
1349
1411
  pager.nextPage();
1350
1412
  },
1351
- children: /* @__PURE__ */ jsx9(ChevronRightIcon, {})
1413
+ children: /* @__PURE__ */ jsx11(ChevronRightIcon, {})
1352
1414
  }
1353
1415
  ),
1354
- /* @__PURE__ */ jsx9(
1416
+ /* @__PURE__ */ jsx11(
1355
1417
  PagerNavButton,
1356
1418
  {
1357
1419
  className: "gridkit-grid-pager-last",
@@ -1360,22 +1422,22 @@ function GridPager({ pager, config, messages }) {
1360
1422
  onClick: () => {
1361
1423
  pager.goToPage(pageCount - 1);
1362
1424
  },
1363
- children: /* @__PURE__ */ jsx9(ChevronsRightIcon, {})
1425
+ children: /* @__PURE__ */ jsx11(ChevronsRightIcon, {})
1364
1426
  }
1365
1427
  )
1366
1428
  ] }),
1367
1429
  sizeOptions !== void 0 && sizeOptions.length > 0 && /* @__PURE__ */ jsxs6("label", { className: "gridkit-grid-pager-page-size", children: [
1368
- /* @__PURE__ */ jsx9(
1430
+ /* @__PURE__ */ jsx11(
1369
1431
  "select",
1370
1432
  {
1371
1433
  value: pagination.pageSize,
1372
1434
  onChange: (event) => {
1373
1435
  pager.setPageSize(Number(event.target.value));
1374
1436
  },
1375
- children: sizeOptions.map((size) => /* @__PURE__ */ jsx9("option", { value: size, children: size }, size))
1437
+ children: sizeOptions.map((size) => /* @__PURE__ */ jsx11("option", { value: size, children: size }, size))
1376
1438
  }
1377
1439
  ),
1378
- /* @__PURE__ */ jsx9("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 })
1379
1441
  ] })
1380
1442
  ]
1381
1443
  }
@@ -1507,7 +1569,7 @@ function useGroupByDrag({
1507
1569
  }
1508
1570
 
1509
1571
  // src/DataGrid/components/GroupByBar.tsx
1510
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
1572
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1511
1573
  function GroupByBar({
1512
1574
  columns,
1513
1575
  definitions,
@@ -1556,7 +1618,7 @@ function GroupByBar({
1556
1618
  role: "group",
1557
1619
  "aria-label": messages.groupByBarLabel,
1558
1620
  children: [
1559
- showPlaceholder && /* @__PURE__ */ jsx10("span", { className: "gridkit-group-by-bar-placeholder", children: messages.groupByBarPlaceholder }),
1621
+ showPlaceholder && /* @__PURE__ */ jsx12("span", { className: "gridkit-group-by-bar-placeholder", children: messages.groupByBarPlaceholder }),
1560
1622
  groupBy.map((entry, index) => {
1561
1623
  const dropBefore = activeDropTarget?.beforeColumnId === entry.columnId;
1562
1624
  const dropAfter = activeDropTarget?.beforeColumnId === null && index === groupBy.length - 1;
@@ -1592,8 +1654,8 @@ function GroupByBar({
1592
1654
  }
1593
1655
  },
1594
1656
  children: [
1595
- /* @__PURE__ */ jsx10("span", { className: "gridkit-group-by-chip-label", children: labelFor(entry.columnId) }),
1596
- /* @__PURE__ */ jsx10(
1657
+ /* @__PURE__ */ jsx12("span", { className: "gridkit-group-by-chip-label", children: labelFor(entry.columnId) }),
1658
+ /* @__PURE__ */ jsx12(
1597
1659
  "button",
1598
1660
  {
1599
1661
  type: "button",
@@ -1614,7 +1676,7 @@ function GroupByBar({
1614
1676
  );
1615
1677
  }),
1616
1678
  chipDrag.draggedColumnId !== null && chipDrag.ghostTransform !== null && createPortal2(
1617
- /* @__PURE__ */ jsx10(
1679
+ /* @__PURE__ */ jsx12(
1618
1680
  "span",
1619
1681
  {
1620
1682
  className: "gridkit-group-by-chip gridkit-drag-ghost",
@@ -1765,7 +1827,10 @@ function announcedCallbacks({
1765
1827
  onPaginationChange: (event) => {
1766
1828
  callbacks.onPaginationChange?.(event);
1767
1829
  announce(
1768
- messages.pageStatus(event.pagination.pageIndex + 1, event.pageCount)
1830
+ messages.pageStatus(
1831
+ event.pagination.pageIndex + 1,
1832
+ Math.max(1, event.pageCount)
1833
+ )
1769
1834
  );
1770
1835
  },
1771
1836
  /**
@@ -2058,7 +2123,7 @@ import {
2058
2123
  attachOverlay,
2059
2124
  writingDirection as writingDirection4
2060
2125
  } from "@gridkitjs/dom";
2061
- import { jsx as jsx11 } from "react/jsx-runtime";
2126
+ import { jsx as jsx13 } from "react/jsx-runtime";
2062
2127
  var ANCHOR_GAP = 4;
2063
2128
  function attachedFocus(focus) {
2064
2129
  return typeof focus === "object" && !(focus instanceof HTMLElement) ? focus.current ?? "first" : focus;
@@ -2126,7 +2191,7 @@ function Overlay({
2126
2191
  trapFocus
2127
2192
  ]);
2128
2193
  return createPortal3(
2129
- /* @__PURE__ */ jsx11(
2194
+ /* @__PURE__ */ jsx13(
2130
2195
  "div",
2131
2196
  {
2132
2197
  ref: panelRef,
@@ -2140,42 +2205,42 @@ function Overlay({
2140
2205
  }
2141
2206
 
2142
2207
  // src/DataGrid/menu/menuIcons.tsx
2143
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
2208
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2144
2209
  var BUILT_IN_ICONS = {
2145
2210
  sortAscending: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2146
- /* @__PURE__ */ jsx12("path", { d: "m3 8 4-4 4 4" }),
2147
- /* @__PURE__ */ jsx12("path", { d: "M7 4v16" }),
2148
- /* @__PURE__ */ jsx12("path", { d: "M11 12h4" }),
2149
- /* @__PURE__ */ jsx12("path", { d: "M11 16h7" }),
2150
- /* @__PURE__ */ jsx12("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" })
2151
2216
  ] }),
2152
2217
  sortDescending: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2153
- /* @__PURE__ */ jsx12("path", { d: "m3 16 4 4 4-4" }),
2154
- /* @__PURE__ */ jsx12("path", { d: "M7 20V4" }),
2155
- /* @__PURE__ */ jsx12("path", { d: "M11 4h10" }),
2156
- /* @__PURE__ */ jsx12("path", { d: "M11 8h7" }),
2157
- /* @__PURE__ */ jsx12("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" })
2158
2223
  ] }),
2159
- group: () => /* @__PURE__ */ jsx12(GroupIcon, {}),
2224
+ group: () => /* @__PURE__ */ jsx14(GroupIcon, {}),
2160
2225
  hide: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2161
- /* @__PURE__ */ jsx12("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
2162
- /* @__PURE__ */ jsx12("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" }),
2163
- /* @__PURE__ */ jsx12("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" }),
2164
- /* @__PURE__ */ jsx12("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" })
2165
2230
  ] }),
2166
2231
  autoFit: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2167
- /* @__PURE__ */ jsx12("path", { d: "m18 8 4 4-4 4" }),
2168
- /* @__PURE__ */ jsx12("path", { d: "M2 12h20" }),
2169
- /* @__PURE__ */ jsx12("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" })
2170
2235
  ] }),
2171
2236
  copy: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2172
- /* @__PURE__ */ jsx12("rect", { x: "8", y: "8", width: "14", height: "14", rx: "2" }),
2173
- /* @__PURE__ */ jsx12("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" })
2174
2239
  ] }),
2175
2240
  print: () => /* @__PURE__ */ jsxs8(Icon, { children: [
2176
- /* @__PURE__ */ jsx12("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" }),
2177
- /* @__PURE__ */ jsx12("path", { d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6" }),
2178
- /* @__PURE__ */ jsx12("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" })
2179
2244
  ] })
2180
2245
  };
2181
2246
  var ICONS = new Map(Object.entries(BUILT_IN_ICONS));
@@ -2184,20 +2249,20 @@ function MenuIcon({ name }) {
2184
2249
  return draw === void 0 ? null : draw();
2185
2250
  }
2186
2251
  function CheckIcon() {
2187
- return /* @__PURE__ */ jsx12(Icon, { children: /* @__PURE__ */ jsx12("path", { d: "M20 6 9 17l-5-5" }) });
2252
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "M20 6 9 17l-5-5" }) });
2188
2253
  }
2189
2254
  function ChevronDownIcon() {
2190
- return /* @__PURE__ */ jsx12(Icon, { children: /* @__PURE__ */ jsx12("path", { d: "m6 9 6 6 6-6" }) });
2255
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "m6 9 6 6 6-6" }) });
2191
2256
  }
2192
2257
  function ChevronLeftIcon2() {
2193
- return /* @__PURE__ */ jsx12(Icon, { children: /* @__PURE__ */ jsx12("path", { d: "m15 18-6-6 6-6" }) });
2258
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "m15 18-6-6 6-6" }) });
2194
2259
  }
2195
2260
  function ChevronRightIcon2() {
2196
- return /* @__PURE__ */ jsx12(Icon, { children: /* @__PURE__ */ jsx12("path", { d: "m9 18 6-6-6-6" }) });
2261
+ return /* @__PURE__ */ jsx14(Icon, { children: /* @__PURE__ */ jsx14("path", { d: "m9 18 6-6-6-6" }) });
2197
2262
  }
2198
2263
 
2199
2264
  // src/DataGrid/menu/GridMenu.tsx
2200
- import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
2265
+ import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
2201
2266
  var CLOSED = { kind: "closed" };
2202
2267
  var ENTRY_GONE = { kind: "entryGone" };
2203
2268
  function itemElement(menu, id) {
@@ -2228,10 +2293,10 @@ function MenuItem({
2228
2293
  ...ariaAttr(!isItem2, "aria-haspopup", "menu"),
2229
2294
  ...ariaAttr(!isItem2, "aria-expanded", expanded),
2230
2295
  children: [
2231
- /* @__PURE__ */ jsx13("span", { className: "gridkit-menu-item-icon", "aria-hidden": "true", children: checked === true ? /* @__PURE__ */ jsx13(CheckIcon, {}) : /* @__PURE__ */ jsx13(MenuIcon, { name: entry.icon }) }),
2232
- /* @__PURE__ */ jsx13("span", { className: "gridkit-menu-item-label", children: entry.label }),
2233
- shortcut !== void 0 && /* @__PURE__ */ jsx13("span", { className: "gridkit-menu-item-shortcut", "aria-hidden": "true", children: shortcut }),
2234
- !isItem2 && /* @__PURE__ */ jsx13("span", { className: "gridkit-menu-submenu-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx13(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, {}) })
2235
2300
  ]
2236
2301
  }
2237
2302
  );
@@ -2326,7 +2391,7 @@ function GridMenu({
2326
2391
  setSubmenu(ENTRY_GONE);
2327
2392
  }
2328
2393
  return /* @__PURE__ */ jsxs9(Fragment2, { children: [
2329
- /* @__PURE__ */ jsx13(
2394
+ /* @__PURE__ */ jsx15(
2330
2395
  "div",
2331
2396
  {
2332
2397
  ref: menuRef,
@@ -2334,14 +2399,14 @@ function GridMenu({
2334
2399
  "aria-label": label,
2335
2400
  className: "gridkit-menu",
2336
2401
  children: entries.map(
2337
- (entry) => entry.type === "separator" ? /* @__PURE__ */ jsx13(
2402
+ (entry) => entry.type === "separator" ? /* @__PURE__ */ jsx15(
2338
2403
  "div",
2339
2404
  {
2340
2405
  role: "separator",
2341
2406
  className: "gridkit-menu-separator"
2342
2407
  },
2343
2408
  entry.key
2344
- ) : /* @__PURE__ */ jsx13(
2409
+ ) : /* @__PURE__ */ jsx15(
2345
2410
  MenuItem,
2346
2411
  {
2347
2412
  entry,
@@ -2352,7 +2417,7 @@ function GridMenu({
2352
2417
  )
2353
2418
  }
2354
2419
  ),
2355
- submenu.kind === "open" && openEntry !== void 0 && /* @__PURE__ */ jsx13(
2420
+ submenu.kind === "open" && openEntry !== void 0 && /* @__PURE__ */ jsx15(
2356
2421
  Overlay,
2357
2422
  {
2358
2423
  anchor: submenu.anchor,
@@ -2361,7 +2426,7 @@ function GridMenu({
2361
2426
  initialFocus: submenu.focus,
2362
2427
  scope,
2363
2428
  onDismiss: closeSubmenu,
2364
- children: /* @__PURE__ */ jsx13(
2429
+ children: /* @__PURE__ */ jsx15(
2365
2430
  GridMenu,
2366
2431
  {
2367
2432
  entries: openEntry.items,
@@ -2380,7 +2445,7 @@ function GridMenu({
2380
2445
  }
2381
2446
 
2382
2447
  // src/DataGrid/contextMenu/GridContextMenu.tsx
2383
- import { jsx as jsx14 } from "react/jsx-runtime";
2448
+ import { jsx as jsx16 } from "react/jsx-runtime";
2384
2449
  function GridContextMenu({
2385
2450
  contextMenu
2386
2451
  }) {
@@ -2388,7 +2453,7 @@ function GridContextMenu({
2388
2453
  if (menu === null) {
2389
2454
  return null;
2390
2455
  }
2391
- return /* @__PURE__ */ jsx14(
2456
+ return /* @__PURE__ */ jsx16(
2392
2457
  Overlay,
2393
2458
  {
2394
2459
  anchor: menu.anchor,
@@ -2397,7 +2462,7 @@ function GridContextMenu({
2397
2462
  returnFocusFallback,
2398
2463
  scope: menu.scope,
2399
2464
  onDismiss: close,
2400
- children: /* @__PURE__ */ jsx14(
2465
+ children: /* @__PURE__ */ jsx16(
2401
2466
  GridMenu,
2402
2467
  {
2403
2468
  entries: menu.entries,
@@ -2784,7 +2849,7 @@ import { useRef as useRef15 } from "react";
2784
2849
  // src/DataGrid/columnChooser/ColumnChooser.tsx
2785
2850
  import { useLayoutEffect as useLayoutEffect7, useRef as useRef9, useState as useState6 } from "react";
2786
2851
  import { resolveColumnChooser } from "@gridkitjs/core/renderer";
2787
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
2852
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
2788
2853
  function ColumnChooser({
2789
2854
  controller,
2790
2855
  messages
@@ -2815,7 +2880,7 @@ function ColumnChooser({
2815
2880
  "aria-label": messages.columnChooserLabel,
2816
2881
  className: "gridkit-column-chooser",
2817
2882
  children: [
2818
- /* @__PURE__ */ jsx15(
2883
+ /* @__PURE__ */ jsx17(
2819
2884
  "input",
2820
2885
  {
2821
2886
  type: "search",
@@ -2828,9 +2893,9 @@ function ColumnChooser({
2828
2893
  }
2829
2894
  }
2830
2895
  ),
2831
- entries.length === 0 ? /* @__PURE__ */ jsx15("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: [
2832
2897
  /* @__PURE__ */ jsxs10("label", { className: "gridkit-column-chooser-option gridkit-column-chooser-all", children: [
2833
- /* @__PURE__ */ jsx15(
2898
+ /* @__PURE__ */ jsx17(
2834
2899
  "input",
2835
2900
  {
2836
2901
  ref: showAllRef,
@@ -2846,8 +2911,8 @@ function ColumnChooser({
2846
2911
  ),
2847
2912
  messages.showAllColumns
2848
2913
  ] }),
2849
- /* @__PURE__ */ jsx15("ul", { className: "gridkit-column-chooser-list", children: entries.map((entry) => /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs10("label", { className: "gridkit-column-chooser-option", children: [
2850
- /* @__PURE__ */ jsx15(
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(
2851
2916
  "input",
2852
2917
  {
2853
2918
  type: "checkbox",
@@ -2977,7 +3042,7 @@ function useMenuButton({
2977
3042
  }
2978
3043
 
2979
3044
  // src/DataGrid/filterMenu/OperatorMenuButton.tsx
2980
- import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
3045
+ import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
2981
3046
  function gapBeside(button) {
2982
3047
  const dialog = button.closest('[role="dialog"]') ?? button;
2983
3048
  return dialog.getBoundingClientRect().right - button.getBoundingClientRect().right + ANCHOR_GAP;
@@ -3015,20 +3080,20 @@ function OperatorMenuButton({
3015
3080
  className: "gridkit-filter-menu-submenu",
3016
3081
  ...buttonProps,
3017
3082
  children: [
3018
- /* @__PURE__ */ jsx16("span", { className: "gridkit-filter-menu-submenu-icon", "aria-hidden": "true", children: active !== void 0 && /* @__PURE__ */ jsx16(CheckIcon, {}) }),
3083
+ /* @__PURE__ */ jsx18("span", { className: "gridkit-filter-menu-submenu-icon", "aria-hidden": "true", children: active !== void 0 && /* @__PURE__ */ jsx18(CheckIcon, {}) }),
3019
3084
  label,
3020
- /* @__PURE__ */ jsx16(
3085
+ /* @__PURE__ */ jsx18(
3021
3086
  "span",
3022
3087
  {
3023
3088
  className: "gridkit-filter-menu-submenu-indicator",
3024
3089
  "aria-hidden": "true",
3025
- children: /* @__PURE__ */ jsx16(ChevronRightIcon2, {})
3090
+ children: /* @__PURE__ */ jsx18(ChevronRightIcon2, {})
3026
3091
  }
3027
3092
  )
3028
3093
  ]
3029
3094
  }
3030
3095
  ),
3031
- state.kind === "open" && /* @__PURE__ */ jsx16(
3096
+ state.kind === "open" && /* @__PURE__ */ jsx18(
3032
3097
  Overlay,
3033
3098
  {
3034
3099
  anchor: state.anchor,
@@ -3037,7 +3102,7 @@ function OperatorMenuButton({
3037
3102
  returnFocusTo: state.anchor,
3038
3103
  scope: state.scope,
3039
3104
  onDismiss: close,
3040
- children: /* @__PURE__ */ jsx16(
3105
+ children: /* @__PURE__ */ jsx18(
3041
3106
  GridMenu,
3042
3107
  {
3043
3108
  entries,
@@ -3076,7 +3141,7 @@ import {
3076
3141
  filterOperandArity,
3077
3142
  parseFilterOperand
3078
3143
  } from "@gridkitjs/core/renderer";
3079
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
3144
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
3080
3145
  function inputType(family, type) {
3081
3146
  switch (family) {
3082
3147
  case "text":
@@ -3110,12 +3175,12 @@ function OperandField({
3110
3175
  };
3111
3176
  if (family === "boolean") {
3112
3177
  return /* @__PURE__ */ jsxs12("select", { ...field, children: [
3113
- /* @__PURE__ */ jsx17("option", { value: "" }),
3114
- /* @__PURE__ */ jsx17("option", { value: "true", children: messages.booleanTrue }),
3115
- /* @__PURE__ */ jsx17("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 })
3116
3181
  ] });
3117
3182
  }
3118
- return /* @__PURE__ */ jsx17("input", { ...field, type: inputType(family, type) });
3183
+ return /* @__PURE__ */ jsx19("input", { ...field, type: inputType(family, type) });
3119
3184
  }
3120
3185
  function ConditionRow({
3121
3186
  row,
@@ -3142,7 +3207,7 @@ function ConditionRow({
3142
3207
  "aria-label": messages.filterConditionLabel(position),
3143
3208
  className: "gridkit-filter-menu-condition",
3144
3209
  children: [
3145
- /* @__PURE__ */ jsx17(
3210
+ /* @__PURE__ */ jsx19(
3146
3211
  "select",
3147
3212
  {
3148
3213
  ref: arity === 0 ? focusRef : void 0,
@@ -3155,10 +3220,10 @@ function ConditionRow({
3155
3220
  onChange({ ...row, operator });
3156
3221
  }
3157
3222
  },
3158
- children: operators.map((operator) => /* @__PURE__ */ jsx17("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))
3159
3224
  }
3160
3225
  ),
3161
- arity > 0 && /* @__PURE__ */ jsx17(
3226
+ arity > 0 && /* @__PURE__ */ jsx19(
3162
3227
  OperandField,
3163
3228
  {
3164
3229
  ...operand,
@@ -3171,7 +3236,7 @@ function ConditionRow({
3171
3236
  }
3172
3237
  }
3173
3238
  ),
3174
- arity === 2 && /* @__PURE__ */ jsx17(
3239
+ arity === 2 && /* @__PURE__ */ jsx19(
3175
3240
  OperandField,
3176
3241
  {
3177
3242
  ...operand,
@@ -3269,7 +3334,7 @@ function simpleEditorReducer(state, action) {
3269
3334
  }
3270
3335
 
3271
3336
  // src/DataGrid/filterMenu/SimpleFilterEditor.tsx
3272
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
3337
+ import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
3273
3338
  var COMBINATORS = ["and", "or"];
3274
3339
  function holdsUnreadable(row) {
3275
3340
  return Array.from(row?.querySelectorAll("input") ?? []).some(
@@ -3282,14 +3347,14 @@ function CombinatorChoice({
3282
3347
  messages,
3283
3348
  onChange
3284
3349
  }) {
3285
- return /* @__PURE__ */ jsx18(
3350
+ return /* @__PURE__ */ jsx20(
3286
3351
  "div",
3287
3352
  {
3288
3353
  role: "radiogroup",
3289
3354
  "aria-label": messages.filterCombinatorLabel,
3290
3355
  className: "gridkit-filter-menu-combinator",
3291
3356
  children: COMBINATORS.map((choice) => /* @__PURE__ */ jsxs13("label", { className: "gridkit-filter-menu-combinator-option", children: [
3292
- /* @__PURE__ */ jsx18(
3357
+ /* @__PURE__ */ jsx20(
3293
3358
  "input",
3294
3359
  {
3295
3360
  type: "radio",
@@ -3368,11 +3433,11 @@ function SimpleFilterEditor({
3368
3433
  }
3369
3434
  }, [invalid]);
3370
3435
  return /* @__PURE__ */ jsxs13("div", { className: "gridkit-filter-menu-conditions", children: [
3371
- opened.custom && /* @__PURE__ */ jsx18("p", { className: "gridkit-filter-menu-custom", children: messages.customFilter }),
3436
+ opened.custom && /* @__PURE__ */ jsx20("p", { className: "gridkit-filter-menu-custom", children: messages.customFilter }),
3372
3437
  draft.rows.map((row, index) => (
3373
3438
  // A row is its place: the first condition, or the second.
3374
3439
  /* @__PURE__ */ jsxs13(Fragment5, { children: [
3375
- index > 0 && /* @__PURE__ */ jsx18(
3440
+ index > 0 && /* @__PURE__ */ jsx20(
3376
3441
  CombinatorChoice,
3377
3442
  {
3378
3443
  name: combinatorName,
@@ -3383,7 +3448,7 @@ function SimpleFilterEditor({
3383
3448
  }
3384
3449
  }
3385
3450
  ),
3386
- /* @__PURE__ */ jsx18(
3451
+ /* @__PURE__ */ jsx20(
3387
3452
  ConditionRow,
3388
3453
  {
3389
3454
  ref: (element) => {
@@ -3403,7 +3468,7 @@ function SimpleFilterEditor({
3403
3468
  )
3404
3469
  ] }, index)
3405
3470
  )),
3406
- invalid.length > 0 && /* @__PURE__ */ jsx18("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) })
3407
3472
  ] });
3408
3473
  }
3409
3474
 
@@ -3413,7 +3478,7 @@ import {
3413
3478
  attachChecklist,
3414
3479
  createRowVirtualizer
3415
3480
  } from "@gridkitjs/dom";
3416
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
3481
+ import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
3417
3482
  var ESTIMATED_ITEM_HEIGHT = 28;
3418
3483
  var OVERSCAN = 4;
3419
3484
  var NO_RANGE = {
@@ -3479,7 +3544,7 @@ function ValueChecklist({
3479
3544
  "aria-label": label,
3480
3545
  className: "gridkit-filter-menu-checklist",
3481
3546
  children: [
3482
- /* @__PURE__ */ jsx19("div", { role: "presentation", style: { height: range.offsetBefore } }),
3547
+ /* @__PURE__ */ jsx21("div", { role: "presentation", style: { height: range.offsetBefore } }),
3483
3548
  shown.map((item, offset) => {
3484
3549
  const index = range.startIndex + offset;
3485
3550
  return /* @__PURE__ */ jsxs14(
@@ -3494,32 +3559,32 @@ function ValueChecklist({
3494
3559
  "aria-posinset": index + 1,
3495
3560
  className: "gridkit-filter-menu-option",
3496
3561
  children: [
3497
- /* @__PURE__ */ jsx19(
3562
+ /* @__PURE__ */ jsx21(
3498
3563
  "span",
3499
3564
  {
3500
3565
  className: "gridkit-filter-menu-option-check",
3501
3566
  "aria-hidden": "true",
3502
- children: /* @__PURE__ */ jsx19(CheckIcon, {})
3567
+ children: /* @__PURE__ */ jsx21(CheckIcon, {})
3503
3568
  }
3504
3569
  ),
3505
- /* @__PURE__ */ jsx19("span", { className: "gridkit-filter-menu-option-label", children: item.label }),
3570
+ /* @__PURE__ */ jsx21("span", { className: "gridkit-filter-menu-option-label", children: item.label }),
3506
3571
  showCounts && /* @__PURE__ */ jsxs14(Fragment6, { children: [
3507
3572
  " ",
3508
- /* @__PURE__ */ jsx19("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) })
3509
3574
  ] })
3510
3575
  ]
3511
3576
  },
3512
3577
  item.key
3513
3578
  );
3514
3579
  }),
3515
- /* @__PURE__ */ jsx19("div", { role: "presentation", style: { height: range.offsetAfter } })
3580
+ /* @__PURE__ */ jsx21("div", { role: "presentation", style: { height: range.offsetAfter } })
3516
3581
  ]
3517
3582
  }
3518
3583
  );
3519
3584
  }
3520
3585
 
3521
3586
  // src/DataGrid/filterMenu/ExcelFilterEditor.tsx
3522
- import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
3587
+ import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
3523
3588
  var OPENED_ON_VALUES = {
3524
3589
  kind: "values",
3525
3590
  focusOnMount: false
@@ -3596,12 +3661,12 @@ function ExcelFilterEditor({
3596
3661
  setMode({ kind: "values", focusOnMount: true });
3597
3662
  },
3598
3663
  children: [
3599
- /* @__PURE__ */ jsx20("span", { className: "gridkit-filter-menu-back-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(ChevronLeftIcon2, {}) }),
3664
+ /* @__PURE__ */ jsx22("span", { className: "gridkit-filter-menu-back-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx22(ChevronLeftIcon2, {}) }),
3600
3665
  messages.filterBackToValues
3601
3666
  ]
3602
3667
  }
3603
3668
  ),
3604
- /* @__PURE__ */ jsx20(
3669
+ /* @__PURE__ */ jsx22(
3605
3670
  SimpleFilterEditor,
3606
3671
  {
3607
3672
  ref: conditions,
@@ -3620,7 +3685,7 @@ function ExcelFilterEditor({
3620
3685
  }
3621
3686
  const { shape } = opened;
3622
3687
  return /* @__PURE__ */ jsxs15("div", { className: "gridkit-filter-menu-values", children: [
3623
- menu.operators.length > 0 && /* @__PURE__ */ jsx20(
3688
+ menu.operators.length > 0 && /* @__PURE__ */ jsx22(
3624
3689
  OperatorMenuButton,
3625
3690
  {
3626
3691
  ref: operatorButton,
@@ -3632,8 +3697,8 @@ function ExcelFilterEditor({
3632
3697
  }
3633
3698
  }
3634
3699
  ),
3635
- (shape.kind === "conditions" || shape.kind === "custom") && /* @__PURE__ */ jsx20("p", { className: "gridkit-filter-menu-custom", children: shape.kind === "conditions" ? messages.filterByCondition : messages.customFilter }),
3636
- /* @__PURE__ */ jsx20(
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(
3637
3702
  "input",
3638
3703
  {
3639
3704
  ref: initialFocusRef,
@@ -3648,7 +3713,7 @@ function ExcelFilterEditor({
3648
3713
  }
3649
3714
  ),
3650
3715
  /* @__PURE__ */ jsxs15("label", { className: "gridkit-filter-menu-select-all", children: [
3651
- /* @__PURE__ */ jsx20(
3716
+ /* @__PURE__ */ jsx22(
3652
3717
  "input",
3653
3718
  {
3654
3719
  ref: selectAllRef,
@@ -3662,7 +3727,7 @@ function ExcelFilterEditor({
3662
3727
  ),
3663
3728
  messages.filterSelectAll
3664
3729
  ] }),
3665
- checklist.needsSearch ? /* @__PURE__ */ jsx20("p", { className: "gridkit-filter-menu-search-first", children: messages.filterSearchFirst(checklist.total) }) : /* @__PURE__ */ jsx20(
3730
+ checklist.needsSearch ? /* @__PURE__ */ jsx22("p", { className: "gridkit-filter-menu-search-first", children: messages.filterSearchFirst(checklist.total) }) : /* @__PURE__ */ jsx22(
3666
3731
  ValueChecklist,
3667
3732
  {
3668
3733
  items: checklist.items,
@@ -3673,12 +3738,12 @@ function ExcelFilterEditor({
3673
3738
  }
3674
3739
  }
3675
3740
  ),
3676
- checklist.hiddenCount > 0 && /* @__PURE__ */ jsx20("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) })
3677
3742
  ] });
3678
3743
  }
3679
3744
 
3680
3745
  // src/DataGrid/filterMenu/FilterMenu.tsx
3681
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
3746
+ import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
3682
3747
  var SORT_COMMANDS = [
3683
3748
  "sort.ascending",
3684
3749
  "sort.descending",
@@ -3735,7 +3800,7 @@ function FilterMenu({
3735
3800
  close();
3736
3801
  }
3737
3802
  }
3738
- return /* @__PURE__ */ jsx21(
3803
+ return /* @__PURE__ */ jsx23(
3739
3804
  "div",
3740
3805
  {
3741
3806
  role: "dialog",
@@ -3756,7 +3821,7 @@ function FilterMenu({
3756
3821
  }
3757
3822
  },
3758
3823
  children: [
3759
- sortItems.length > 0 && /* @__PURE__ */ jsx21("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(
3760
3825
  "button",
3761
3826
  {
3762
3827
  type: "button",
@@ -3771,12 +3836,12 @@ function FilterMenu({
3771
3836
  run(item);
3772
3837
  },
3773
3838
  children: [
3774
- /* @__PURE__ */ jsx21(
3839
+ /* @__PURE__ */ jsx23(
3775
3840
  "span",
3776
3841
  {
3777
3842
  className: "gridkit-filter-menu-sort-icon",
3778
3843
  "aria-hidden": "true",
3779
- children: /* @__PURE__ */ jsx21(MenuIcon, { name: item.icon })
3844
+ children: /* @__PURE__ */ jsx23(MenuIcon, { name: item.icon })
3780
3845
  }
3781
3846
  ),
3782
3847
  item.label
@@ -3784,9 +3849,9 @@ function FilterMenu({
3784
3849
  },
3785
3850
  item.id
3786
3851
  )) }),
3787
- menu.ui === "excel" ? /* @__PURE__ */ jsx21(ExcelFilterEditor, { ...editorProps, columnValues }) : /* @__PURE__ */ jsx21(SimpleFilterEditor, { ...editorProps }),
3852
+ menu.ui === "excel" ? /* @__PURE__ */ jsx23(ExcelFilterEditor, { ...editorProps, columnValues }) : /* @__PURE__ */ jsx23(SimpleFilterEditor, { ...editorProps }),
3788
3853
  /* @__PURE__ */ jsxs16("div", { className: "gridkit-filter-menu-actions", children: [
3789
- clearItem !== void 0 && /* @__PURE__ */ jsx21(
3854
+ clearItem !== void 0 && /* @__PURE__ */ jsx23(
3790
3855
  "button",
3791
3856
  {
3792
3857
  type: "button",
@@ -3798,7 +3863,7 @@ function FilterMenu({
3798
3863
  children: clearItem.label
3799
3864
  }
3800
3865
  ),
3801
- /* @__PURE__ */ jsx21(
3866
+ /* @__PURE__ */ jsx23(
3802
3867
  "button",
3803
3868
  {
3804
3869
  type: "button",
@@ -3807,7 +3872,7 @@ function FilterMenu({
3807
3872
  children: messages.cancelFilter
3808
3873
  }
3809
3874
  ),
3810
- /* @__PURE__ */ jsx21("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 })
3811
3876
  ] })
3812
3877
  ]
3813
3878
  }
@@ -3864,7 +3929,7 @@ function useFilterValueCache(controller, messages) {
3864
3929
  }
3865
3930
 
3866
3931
  // src/DataGrid/panels/GridPanels.tsx
3867
- import { jsx as jsx22 } from "react/jsx-runtime";
3932
+ import { jsx as jsx24 } from "react/jsx-runtime";
3868
3933
  var panelKinds = {
3869
3934
  columnChooser: { component: ColumnChooser, trapFocus: false },
3870
3935
  filter: { component: FilterMenu, trapFocus: true }
@@ -3887,7 +3952,7 @@ function GridPanels({
3887
3952
  return null;
3888
3953
  }
3889
3954
  const { component: Panel, trapFocus } = panelKinds[panel.kind];
3890
- return /* @__PURE__ */ jsx22(
3955
+ return /* @__PURE__ */ jsx24(
3891
3956
  Overlay,
3892
3957
  {
3893
3958
  anchor: panel.anchor,
@@ -3900,7 +3965,7 @@ function GridPanels({
3900
3965
  trapFocus,
3901
3966
  scope: panel.scope,
3902
3967
  onDismiss: close,
3903
- children: /* @__PURE__ */ jsx22(
3968
+ children: /* @__PURE__ */ jsx24(
3904
3969
  Panel,
3905
3970
  {
3906
3971
  target: panel.target,
@@ -4028,7 +4093,7 @@ import { splitToolbarItems } from "@gridkitjs/core/renderer";
4028
4093
  import { attachToolbar } from "@gridkitjs/dom";
4029
4094
 
4030
4095
  // src/DataGrid/toolbar/ToolbarMenuButton.tsx
4031
- import { Fragment as Fragment8, jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
4096
+ import { Fragment as Fragment8, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
4032
4097
  function ToolbarMenuButton({
4033
4098
  itemKey,
4034
4099
  attributes,
@@ -4055,13 +4120,13 @@ function ToolbarMenuButton({
4055
4120
  ...ariaAttr(more, "data-gridkit-toolbar-more", ""),
4056
4121
  ...buttonProps,
4057
4122
  children: [
4058
- icon !== void 0 && /* @__PURE__ */ jsx23("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(MenuIcon, { name: icon }) }),
4123
+ icon !== void 0 && /* @__PURE__ */ jsx25("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx25(MenuIcon, { name: icon }) }),
4059
4124
  label,
4060
- /* @__PURE__ */ jsx23("span", { className: "gridkit-toolbar-button-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(ChevronDownIcon, {}) })
4125
+ /* @__PURE__ */ jsx25("span", { className: "gridkit-toolbar-button-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx25(ChevronDownIcon, {}) })
4061
4126
  ]
4062
4127
  }
4063
4128
  ),
4064
- state.kind === "open" && /* @__PURE__ */ jsx23(
4129
+ state.kind === "open" && /* @__PURE__ */ jsx25(
4065
4130
  Overlay,
4066
4131
  {
4067
4132
  anchor: state.anchor,
@@ -4071,7 +4136,7 @@ function ToolbarMenuButton({
4071
4136
  returnFocusFallback,
4072
4137
  scope: state.scope,
4073
4138
  onDismiss: close,
4074
- children: /* @__PURE__ */ jsx23(
4139
+ children: /* @__PURE__ */ jsx25(
4075
4140
  GridMenu,
4076
4141
  {
4077
4142
  entries,
@@ -4093,7 +4158,7 @@ function ToolbarMenuButton({
4093
4158
  // src/DataGrid/toolbar/ToolbarSearch.tsx
4094
4159
  import { useEffect as useEffect6, useRef as useRef17, useState as useState12 } from "react";
4095
4160
  import { searchTextOf, setSearchText } from "@gridkitjs/core/renderer";
4096
- import { jsx as jsx24 } from "react/jsx-runtime";
4161
+ import { jsx as jsx26 } from "react/jsx-runtime";
4097
4162
  var SEARCH_DELAY_MS = 250;
4098
4163
  function ToolbarSearch({
4099
4164
  itemKey,
@@ -4129,7 +4194,7 @@ function ToolbarSearch({
4129
4194
  },
4130
4195
  []
4131
4196
  );
4132
- return /* @__PURE__ */ jsx24(
4197
+ return /* @__PURE__ */ jsx26(
4133
4198
  "input",
4134
4199
  {
4135
4200
  ...attributes,
@@ -4198,7 +4263,7 @@ function useToolbarOverflow(toolbarRef, items) {
4198
4263
  }
4199
4264
 
4200
4265
  // src/DataGrid/toolbar/GridToolbar.tsx
4201
- import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
4266
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
4202
4267
  function reporting(run, report) {
4203
4268
  return () => {
4204
4269
  const ran = run();
@@ -4251,7 +4316,7 @@ function GridToolbar(props) {
4251
4316
  return null;
4252
4317
  }
4253
4318
  const options = typeof props.toolbar === "object" ? props.toolbar : void 0;
4254
- return /* @__PURE__ */ jsx25(
4319
+ return /* @__PURE__ */ jsx27(
4255
4320
  Toolbar,
4256
4321
  {
4257
4322
  ...props,
@@ -4317,14 +4382,14 @@ function Toolbar({
4317
4382
  item.run();
4318
4383
  },
4319
4384
  children: [
4320
- item.icon !== void 0 && /* @__PURE__ */ jsx25("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx25(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 }) }),
4321
4386
  item.label
4322
4387
  ]
4323
4388
  },
4324
4389
  item.key
4325
4390
  );
4326
4391
  case "menu":
4327
- return /* @__PURE__ */ jsx25(
4392
+ return /* @__PURE__ */ jsx27(
4328
4393
  ToolbarMenuButton,
4329
4394
  {
4330
4395
  itemKey: item.key,
@@ -4337,7 +4402,7 @@ function Toolbar({
4337
4402
  item.key
4338
4403
  );
4339
4404
  case "search":
4340
- return /* @__PURE__ */ jsx25(
4405
+ return /* @__PURE__ */ jsx27(
4341
4406
  ToolbarSearch,
4342
4407
  {
4343
4408
  itemKey: item.key,
@@ -4349,7 +4414,7 @@ function Toolbar({
4349
4414
  item.key
4350
4415
  );
4351
4416
  case "separator":
4352
- return /* @__PURE__ */ jsx25(
4417
+ return /* @__PURE__ */ jsx27(
4353
4418
  "div",
4354
4419
  {
4355
4420
  role: "separator",
@@ -4360,7 +4425,7 @@ function Toolbar({
4360
4425
  item.key
4361
4426
  );
4362
4427
  case "spacer":
4363
- return /* @__PURE__ */ jsx25(
4428
+ return /* @__PURE__ */ jsx27(
4364
4429
  "div",
4365
4430
  {
4366
4431
  className: "gridkit-toolbar-spacer",
@@ -4369,7 +4434,7 @@ function Toolbar({
4369
4434
  item.key
4370
4435
  );
4371
4436
  case "custom":
4372
- return /* @__PURE__ */ jsx25(
4437
+ return /* @__PURE__ */ jsx27(
4373
4438
  "div",
4374
4439
  {
4375
4440
  ...item.attributes,
@@ -4391,7 +4456,7 @@ function Toolbar({
4391
4456
  className: "gridkit-toolbar",
4392
4457
  children: [
4393
4458
  shown.map(draw),
4394
- overflow.length > 0 && /* @__PURE__ */ jsx25(
4459
+ overflow.length > 0 && /* @__PURE__ */ jsx27(
4395
4460
  ToolbarMenuButton,
4396
4461
  {
4397
4462
  itemKey: "more",
@@ -4735,7 +4800,7 @@ function useRowVirtualizer({
4735
4800
  }
4736
4801
 
4737
4802
  // src/DataGrid/DataGrid.tsx
4738
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
4803
+ import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
4739
4804
  var NO_AGGREGATES = [];
4740
4805
  function paginationReader(controller) {
4741
4806
  let last;
@@ -4773,6 +4838,12 @@ function tablesStyle(height, headerHeight, footerHeight, pinned) {
4773
4838
  const style = { ...heights, ...widths };
4774
4839
  return Object.keys(style).length === 0 ? void 0 : style;
4775
4840
  }
4841
+ function emptyContext(view, filter, loading, infiniteScroll) {
4842
+ if (view.pageRows.length > 0 || view.columns.length === 0 || loading || infiniteScroll?.hasMore === true) {
4843
+ return null;
4844
+ }
4845
+ return { filtered: filter.length > 0 };
4846
+ }
4776
4847
  function DataGrid(props) {
4777
4848
  const {
4778
4849
  borders,
@@ -4784,6 +4855,7 @@ function DataGrid(props) {
4784
4855
  groupableColumns = false,
4785
4856
  groupToggleIconColumns = true,
4786
4857
  groupByBarVisibility = "auto",
4858
+ loading = false,
4787
4859
  paginated = false,
4788
4860
  pager,
4789
4861
  infiniteScroll,
@@ -4861,6 +4933,17 @@ function DataGrid(props) {
4861
4933
  sentinelRef,
4862
4934
  config: infiniteScroll
4863
4935
  });
4936
+ const empty = emptyContext(view, state.filter, loading, infiniteScroll);
4937
+ const messageWidth = useElementWidth(
4938
+ gridRef,
4939
+ (empty !== null || loading) && resizeMode !== "fit"
4940
+ );
4941
+ const bodyViewportWidth = viewportWidth ?? messageWidth;
4942
+ useEffect8(() => {
4943
+ if (loading) {
4944
+ announce(messages.loading);
4945
+ }
4946
+ }, [loading, announce, messages.loading]);
4864
4947
  function columnOf(columnId) {
4865
4948
  return view.dataColumns.find((candidate) => candidate.id === columnId)?.column;
4866
4949
  }
@@ -5140,7 +5223,7 @@ function DataGrid(props) {
5140
5223
  ref: viewportRef,
5141
5224
  tabIndex: -1,
5142
5225
  children: [
5143
- /* @__PURE__ */ jsx26(
5226
+ /* @__PURE__ */ jsx28(
5144
5227
  GridToolbar,
5145
5228
  {
5146
5229
  toolbar: props.toolbar,
@@ -5152,7 +5235,7 @@ function DataGrid(props) {
5152
5235
  announce
5153
5236
  }
5154
5237
  ),
5155
- showGroupByBar && /* @__PURE__ */ jsx26(
5238
+ showGroupByBar && /* @__PURE__ */ jsx28(
5156
5239
  GroupByBar,
5157
5240
  {
5158
5241
  columns: view.columns,
@@ -5183,6 +5266,7 @@ function DataGrid(props) {
5183
5266
  pinnedWidths2(view.columns)
5184
5267
  ),
5185
5268
  ...ariaAttr(multiselectable, "aria-multiselectable", true),
5269
+ ...ariaAttr(loading, "aria-busy", true),
5186
5270
  ...ariaAttr(labelledBy !== void 0, "aria-labelledby", labelledBy),
5187
5271
  ...ariaAttr(
5188
5272
  labelledBy === void 0 && label !== void 0,
@@ -5213,8 +5297,8 @@ function DataGrid(props) {
5213
5297
  style: { width: totalColumnWidth(view.columns) },
5214
5298
  className: classNames(gridTableClassName, "gridkit-data-grid-header"),
5215
5299
  children: [
5216
- /* @__PURE__ */ jsx26(GridColgroup, { columns: view.columns }),
5217
- /* @__PURE__ */ jsx26(
5300
+ /* @__PURE__ */ jsx28(GridColgroup, { columns: view.columns }),
5301
+ /* @__PURE__ */ jsx28(
5218
5302
  GridHeader,
5219
5303
  {
5220
5304
  columns: view.columns,
@@ -5235,49 +5319,62 @@ function DataGrid(props) {
5235
5319
  ]
5236
5320
  }
5237
5321
  ),
5238
- /* @__PURE__ */ jsx26(
5322
+ /* @__PURE__ */ jsxs19(
5239
5323
  "div",
5240
5324
  {
5241
5325
  className: "gridkit-data-grid-body",
5242
5326
  ref: bodyRef,
5243
5327
  role: "rowgroup",
5244
5328
  tabIndex: -1,
5245
- children: /* @__PURE__ */ jsxs19(
5246
- "table",
5247
- {
5248
- ref: bodyTableRef,
5249
- role: "presentation",
5250
- style: { width: totalColumnWidth(view.columns) },
5251
- className: gridTableClassName,
5252
- children: [
5253
- /* @__PURE__ */ jsx26(GridColgroup, { columns: view.columns }),
5254
- /* @__PURE__ */ jsx26(
5255
- GridBody,
5256
- {
5257
- columns: view.columns,
5258
- definitions,
5259
- rows: view.pageRows,
5260
- activeColumnId: resize.activeColumnId,
5261
- nav,
5262
- selection,
5263
- controller,
5264
- aggregates,
5265
- groupAggregateDisplay,
5266
- virtualRange: virtualized ? virtualizer : null,
5267
- infiniteScroll,
5268
- sentinelRef,
5269
- locale,
5270
- getRowProps,
5271
- onRowClick,
5272
- onRowDoubleClick,
5273
- messages,
5274
- cellMenu: contextMenu.opens("cell"),
5275
- groupMenu: contextMenu.opens("group")
5276
- }
5277
- )
5278
- ]
5279
- }
5280
- )
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
+ ]
5281
5378
  }
5282
5379
  ),
5283
5380
  hasFooter && /* @__PURE__ */ jsxs19(
@@ -5291,8 +5388,8 @@ function DataGrid(props) {
5291
5388
  "gridkit-data-grid-footer"
5292
5389
  ),
5293
5390
  children: [
5294
- /* @__PURE__ */ jsx26(GridColgroup, { columns: view.columns }),
5295
- /* @__PURE__ */ jsx26(
5391
+ /* @__PURE__ */ jsx28(GridColgroup, { columns: view.columns }),
5392
+ /* @__PURE__ */ jsx28(
5296
5393
  GridFooter,
5297
5394
  {
5298
5395
  columns: view.columns,
@@ -5309,8 +5406,8 @@ function DataGrid(props) {
5309
5406
  ]
5310
5407
  }
5311
5408
  ),
5312
- /* @__PURE__ */ jsx26(GridContextMenu, { contextMenu }),
5313
- /* @__PURE__ */ jsx26(
5409
+ /* @__PURE__ */ jsx28(GridContextMenu, { contextMenu }),
5410
+ /* @__PURE__ */ jsx28(
5314
5411
  GridPanels,
5315
5412
  {
5316
5413
  panels,
@@ -5319,7 +5416,7 @@ function DataGrid(props) {
5319
5416
  messages
5320
5417
  }
5321
5418
  ),
5322
- paginated && (pager?.template ? pager.template(pagerContext) : /* @__PURE__ */ jsx26(GridPager, { pager: pagerContext, config: pager, messages }))
5419
+ paginated && (pager?.template ? pager.template(pagerContext) : /* @__PURE__ */ jsx28(GridPager, { pager: pagerContext, config: pager, messages }))
5323
5420
  ]
5324
5421
  }
5325
5422
  );