@ostack.tech/ui 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/chunks/{en-Czf-_HZt.js → en-MXAz48KY.js} +2 -1
  2. package/dist/chunks/{en-Czf-_HZt.js.map → en-MXAz48KY.js.map} +1 -1
  3. package/dist/locales/en-GB.js +1 -1
  4. package/dist/locales/en-US.js +1 -1
  5. package/dist/locales/fr-FR.js +1 -0
  6. package/dist/locales/fr-FR.js.map +1 -1
  7. package/dist/locales/pt-PT.js +1 -0
  8. package/dist/locales/pt-PT.js.map +1 -1
  9. package/dist/ostack-ui.css +88 -83
  10. package/dist/ostack-ui.js +1120 -1022
  11. package/dist/ostack-ui.js.map +1 -1
  12. package/package.json +1 -1
  13. package/scss/components/Calendar/_Calendar-variables.scss +1 -1
  14. package/scss/components/Calendar/_Calendar.scss +15 -16
  15. package/scss/components/ControlAddon/_ControlAddon.scss +3 -5
  16. package/scss/components/DataTable/_DataTable.scss +7 -2
  17. package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -1
  18. package/scss/components/Feedback/_Feedback.scss +2 -0
  19. package/scss/components/Field/_Field.scss +0 -1
  20. package/scss/components/HelperText/_HelperText.scss +2 -1
  21. package/scss/components/Input/_Input.scss +1 -1
  22. package/scss/components/Label/_Label.scss +1 -0
  23. package/scss/components/Link/_Link.scss +1 -1
  24. package/scss/components/Root/_Root.scss +1 -1
  25. package/scss/components/Stack/_Stack.scss +1 -1
  26. package/scss/components/Table/_Table.scss +23 -9
  27. package/scss/components/Tabs/_Tabs.scss +2 -2
  28. package/scss/scss/helpers/_margin-utils.scss +13 -11
  29. package/scss/scss/helpers/_padding-utils.scss +13 -11
  30. package/scss/scss/helpers/_sizing-utils.scss +19 -17
  31. package/scss/scss/helpers/_text-utils.scss +19 -17
  32. package/scss/scss/helpers/_visually-hidden.scss +1 -1
  33. package/scss/scss/utils/_button-reset.scss +1 -1
  34. package/types/components/Form/FormError.d.ts +1 -1
  35. package/types/components/Keybinds/KeyPress.d.ts +3 -3
  36. package/types/components/Keybinds/Keybind.d.ts +2 -2
  37. package/types/components/Keybinds/Keybinds.d.ts +1 -1
  38. package/types/components/Printer/Printer.d.ts +1 -1
  39. package/types/components/Printer/PrinterContentContext.d.ts +4 -16
  40. package/types/components/Printer/PrinterContext.d.ts +1 -2
  41. package/types/components/Printer/index.d.ts +1 -1
  42. package/types/components/Printer/usePrintClassNames.d.ts +6 -2
  43. package/types/components/Table/TableContext.d.ts +2 -0
  44. package/types/components/Table/columnUtils.d.ts +4 -0
  45. package/types/index.d.ts +1 -0
  46. package/types/utils/useIntersectionObserver.d.ts +6 -2
  47. package/types/utils/useResizeObserver.d.ts +6 -0
package/dist/ostack-ui.js CHANGED
@@ -224,7 +224,7 @@ function PrefixProvider(t0) {
224
224
  /** Hook which returns a function which can be used to prefix a string with the current prefix. */
225
225
  function usePrefix() {
226
226
  const $ = c(2);
227
- const defaultPrefix_0 = useStore(defaultPrefixStore, _temp$58);
227
+ const defaultPrefix_0 = useStore(defaultPrefixStore, _temp$60);
228
228
  const prefix = useContext(PrefixContext) ?? defaultPrefix_0;
229
229
  let t0;
230
230
  if ($[0] !== prefix) {
@@ -236,7 +236,7 @@ function usePrefix() {
236
236
  } else t0 = $[1];
237
237
  return t0;
238
238
  }
239
- function _temp$58(t0) {
239
+ function _temp$60(t0) {
240
240
  const { defaultPrefix } = t0;
241
241
  return defaultPrefix;
242
242
  }
@@ -294,7 +294,7 @@ function useMediaQuery(query, options) {
294
294
  let subscribe;
295
295
  if (!matchMedia) {
296
296
  getSnapshot = getDefaultSnapshot;
297
- subscribe = _temp2$37;
297
+ subscribe = _temp2$36;
298
298
  } else {
299
299
  const isWindowMatchMedia = matchMedia === window.matchMedia;
300
300
  let queryData;
@@ -364,10 +364,10 @@ function useMediaQuery(query, options) {
364
364
  function _temp3$20(notify) {
365
365
  return notify();
366
366
  }
367
- function _temp2$37() {
368
- return _temp$57;
367
+ function _temp2$36() {
368
+ return _temp$59;
369
369
  }
370
- function _temp$57() {}
370
+ function _temp$59() {}
371
371
  // src/utils/breakpoints.ts
372
372
  /** Available breakpoints. */
373
373
  var BREAKPOINTS = {
@@ -1346,61 +1346,29 @@ function usePrinting() {
1346
1346
  return usePrinterContentContext().printing;
1347
1347
  }
1348
1348
  /**
1349
- * Marks a printing task as having started and returns a function that should be called when it
1350
- * finishes. The printer will wait for any ongoing printing tasks before printing.
1349
+ * Prevents printing from happening while `pending` is `true`.
1351
1350
  *
1352
- * > **Note:** This hook **can** be called outside the printer context, in which case
1353
- * > starting/finishing printing tasks will be no-ops but **won't** fail.
1351
+ * > **Note:** This hook **can** be called outside the printer context, in which case it is a no-op.
1354
1352
  */
1355
- function useStartPrintingTask(t0) {
1356
- const $ = c(9);
1353
+ function usePrintingTask(pending) {
1354
+ const $ = c(4);
1355
+ const { startPrintingTask } = usePrinterContentContext();
1356
+ let t0;
1357
1357
  let t1;
1358
- if ($[0] !== t0) {
1359
- t1 = t0 === void 0 ? {} : t0;
1360
- $[0] = t0;
1361
- $[1] = t1;
1362
- } else t1 = $[1];
1363
- const { enabled: t2 } = t1;
1364
- const enabled = t2 === void 0 ? true : t2;
1365
- const { startPrintingTask, finishPrintingTask } = usePrinterContentContext();
1366
- const finishedRef = useRef(true);
1367
- let t3;
1368
- if ($[2] !== finishPrintingTask) {
1369
- t3 = () => {
1370
- if (!finishedRef.current) {
1371
- finishedRef.current = true;
1372
- finishPrintingTask?.();
1373
- }
1374
- };
1375
- $[2] = finishPrintingTask;
1376
- $[3] = t3;
1377
- } else t3 = $[3];
1378
- const finish = t3;
1379
- let t4;
1380
- let t5;
1381
- if ($[4] !== enabled || $[5] !== finish || $[6] !== startPrintingTask) {
1382
- t4 = () => {
1383
- if (!enabled || !startPrintingTask) return;
1384
- startPrintingTask();
1385
- finishedRef.current = false;
1386
- return finish;
1358
+ if ($[0] !== pending || $[1] !== startPrintingTask) {
1359
+ t0 = () => {
1360
+ if (pending && startPrintingTask) return startPrintingTask();
1387
1361
  };
1388
- t5 = [
1389
- enabled,
1390
- startPrintingTask,
1391
- finish
1392
- ];
1393
- $[4] = enabled;
1394
- $[5] = finish;
1395
- $[6] = startPrintingTask;
1396
- $[7] = t4;
1397
- $[8] = t5;
1362
+ t1 = [pending, startPrintingTask];
1363
+ $[0] = pending;
1364
+ $[1] = startPrintingTask;
1365
+ $[2] = t0;
1366
+ $[3] = t1;
1398
1367
  } else {
1399
- t4 = $[7];
1400
- t5 = $[8];
1368
+ t0 = $[2];
1369
+ t1 = $[3];
1401
1370
  }
1402
- useSafeLayoutEffect(t4, t5);
1403
- return finish;
1371
+ useSafeLayoutEffect(t0, t1);
1404
1372
  }
1405
1373
  // src/components/DataTable/keyUtils.ts
1406
1374
  /** Returns the key of a row. */
@@ -1409,7 +1377,9 @@ function getRowKey(row, rowKey) {
1409
1377
  }
1410
1378
  /** Compare table row keys. */
1411
1379
  function compareRowKeys(k1, k2) {
1412
- return String(k1).localeCompare(String(k2));
1380
+ const s1 = String(k1);
1381
+ const s2 = String(k2);
1382
+ return s1 < s2 ? -1 : s1 > s2 ? 1 : 0;
1413
1383
  }
1414
1384
  // src/utils/filtering.ts
1415
1385
  /**
@@ -1567,15 +1537,14 @@ function spliceWindow(totalCount, offset, limit, window, startIndex, deleted = 0
1567
1537
  var DataTableContext = createContext(null);
1568
1538
  /** Hook which creates the data table context value. */
1569
1539
  function useCreateDataTableContext(t0) {
1570
- const $ = c(91);
1540
+ const $ = c(90);
1571
1541
  const { displayMode, columns, rows, onVisibleRowsChange, onProcessedRowsChange, getRows, rowKey, loadingCount, required, loading, renderRow, renderCell, dynamicRowHeight, estimatedRowHeight, overscan, showAllRowsWhilePrinting, apiRef, leafColumns, headCount, defaultOffset, offset, onOffsetChange, defaultLimit, limit, onLimitChange, defaultFilter, filter, onFilterChange, defaultSortBy, sortBy, defaultSortDirection, sortDirection, onSort, showSelectionColumn, selectionMode, defaultSelectedRows, selectedRows, onSelectedRowsChange, selectAllChecked, onSelectAll, disabledSelections, selectAllRowsLabel, selectRowLabel } = t0;
1572
1542
  const [locale] = useLocale();
1573
- const { startPrintingTask, finishPrintingTask } = usePrinterContentContext();
1543
+ const { startPrintingTask } = usePrinterContentContext();
1574
1544
  let t1;
1575
- if ($[0] !== finishPrintingTask || $[1] !== onFilterChange || $[2] !== onLimitChange || $[3] !== onOffsetChange || $[4] !== onProcessedRowsChange || $[5] !== onSelectedRowsChange || $[6] !== onSort || $[7] !== onVisibleRowsChange || $[8] !== startPrintingTask) {
1545
+ if ($[0] !== onFilterChange || $[1] !== onLimitChange || $[2] !== onOffsetChange || $[3] !== onProcessedRowsChange || $[4] !== onSelectedRowsChange || $[5] !== onSort || $[6] !== onVisibleRowsChange || $[7] !== startPrintingTask) {
1576
1546
  t1 = {
1577
1547
  startPrintingTask,
1578
- finishPrintingTask,
1579
1548
  onVisibleRowsChange,
1580
1549
  onProcessedRowsChange,
1581
1550
  onOffsetChange,
@@ -1584,30 +1553,29 @@ function useCreateDataTableContext(t0) {
1584
1553
  onFilterChange,
1585
1554
  onSelectedRowsChange
1586
1555
  };
1587
- $[0] = finishPrintingTask;
1588
- $[1] = onFilterChange;
1589
- $[2] = onLimitChange;
1590
- $[3] = onOffsetChange;
1591
- $[4] = onProcessedRowsChange;
1592
- $[5] = onSelectedRowsChange;
1593
- $[6] = onSort;
1594
- $[7] = onVisibleRowsChange;
1595
- $[8] = startPrintingTask;
1596
- $[9] = t1;
1597
- } else t1 = $[9];
1556
+ $[0] = onFilterChange;
1557
+ $[1] = onLimitChange;
1558
+ $[2] = onOffsetChange;
1559
+ $[3] = onProcessedRowsChange;
1560
+ $[4] = onSelectedRowsChange;
1561
+ $[5] = onSort;
1562
+ $[6] = onVisibleRowsChange;
1563
+ $[7] = startPrintingTask;
1564
+ $[8] = t1;
1565
+ } else t1 = $[8];
1598
1566
  const latestRef = useLatestRef(t1);
1599
1567
  let t2;
1600
- if ($[10] !== columns || $[11] !== defaultFilter || $[12] !== defaultLimit || $[13] !== defaultOffset || $[14] !== defaultSelectedRows || $[15] !== defaultSortBy || $[16] !== defaultSortDirection || $[17] !== disabledSelections || $[18] !== displayMode || $[19] !== filter || $[20] !== getRows || $[21] !== headCount || $[22] !== latestRef || $[23] !== leafColumns || $[24] !== limit || $[25] !== loading || $[26] !== loadingCount || $[27] !== locale.languageTag || $[28] !== offset || $[29] !== rows || $[30] !== selectedRows || $[31] !== selectionMode || $[32] !== sortBy || $[33] !== sortDirection) {
1568
+ if ($[9] !== columns || $[10] !== defaultFilter || $[11] !== defaultLimit || $[12] !== defaultOffset || $[13] !== defaultSelectedRows || $[14] !== defaultSortBy || $[15] !== defaultSortDirection || $[16] !== disabledSelections || $[17] !== displayMode || $[18] !== filter || $[19] !== getRows || $[20] !== headCount || $[21] !== latestRef || $[22] !== leafColumns || $[23] !== limit || $[24] !== loading || $[25] !== loadingCount || $[26] !== locale.languageTag || $[27] !== offset || $[28] !== rows || $[29] !== selectedRows || $[30] !== selectionMode || $[31] !== sortBy || $[32] !== sortDirection) {
1601
1569
  t2 = () => {
1602
1570
  const initialSortBy = sortBy ?? defaultSortBy;
1603
1571
  return createStore()(subscribeWithSelector((set, get) => ({
1604
1572
  columns,
1605
1573
  leafColumns,
1606
- hasFooterCells: computed(() => [get().leafColumns], _temp2$36),
1574
+ hasFooterCells: computed(() => [get().leafColumns], _temp2$35),
1607
1575
  headCount,
1608
1576
  _offset: offset ?? defaultOffset,
1609
1577
  offset: computed(() => [get()._offset, get().totalCount()], _temp3$19),
1610
- currentPage: computed(() => [get().offset(), get().limit()], _temp4$8),
1578
+ currentPage: computed(() => [get().offset(), get().limit()], _temp4$9),
1611
1579
  pageOffset: computed(() => [get().currentPage(), get().limit()], _temp5$6),
1612
1580
  limitOptions: void 0,
1613
1581
  _limit: limit ?? defaultLimit,
@@ -1808,13 +1776,13 @@ function useCreateDataTableContext(t0) {
1808
1776
  });
1809
1777
  };
1810
1778
  if (isPromiseLike(result)) {
1811
- const { startPrintingTask: startPrintingTask_0, finishPrintingTask: finishPrintingTask_0 } = latestRef.current;
1812
- startPrintingTask_0?.();
1779
+ const { startPrintingTask: startPrintingTask_0 } = latestRef.current;
1780
+ const finishPrintingTask = startPrintingTask_0?.();
1813
1781
  result.then((result_0) => {
1814
- finishPrintingTask_0?.();
1782
+ finishPrintingTask?.();
1815
1783
  if (!abortController.signal.aborted) cacheRows(result_0);
1816
1784
  }, (err) => {
1817
- finishPrintingTask_0?.();
1785
+ finishPrintingTask?.();
1818
1786
  if (!(err instanceof DOMException) || err.name !== "AbortError") throw err;
1819
1787
  });
1820
1788
  } else cacheRows(result);
@@ -1855,100 +1823,100 @@ function useCreateDataTableContext(t0) {
1855
1823
  }
1856
1824
  })));
1857
1825
  };
1858
- $[10] = columns;
1859
- $[11] = defaultFilter;
1860
- $[12] = defaultLimit;
1861
- $[13] = defaultOffset;
1862
- $[14] = defaultSelectedRows;
1863
- $[15] = defaultSortBy;
1864
- $[16] = defaultSortDirection;
1865
- $[17] = disabledSelections;
1866
- $[18] = displayMode;
1867
- $[19] = filter;
1868
- $[20] = getRows;
1869
- $[21] = headCount;
1870
- $[22] = latestRef;
1871
- $[23] = leafColumns;
1872
- $[24] = limit;
1873
- $[25] = loading;
1874
- $[26] = loadingCount;
1875
- $[27] = locale.languageTag;
1876
- $[28] = offset;
1877
- $[29] = rows;
1878
- $[30] = selectedRows;
1879
- $[31] = selectionMode;
1880
- $[32] = sortBy;
1881
- $[33] = sortDirection;
1882
- $[34] = t2;
1883
- } else t2 = $[34];
1826
+ $[9] = columns;
1827
+ $[10] = defaultFilter;
1828
+ $[11] = defaultLimit;
1829
+ $[12] = defaultOffset;
1830
+ $[13] = defaultSelectedRows;
1831
+ $[14] = defaultSortBy;
1832
+ $[15] = defaultSortDirection;
1833
+ $[16] = disabledSelections;
1834
+ $[17] = displayMode;
1835
+ $[18] = filter;
1836
+ $[19] = getRows;
1837
+ $[20] = headCount;
1838
+ $[21] = latestRef;
1839
+ $[22] = leafColumns;
1840
+ $[23] = limit;
1841
+ $[24] = loading;
1842
+ $[25] = loadingCount;
1843
+ $[26] = locale.languageTag;
1844
+ $[27] = offset;
1845
+ $[28] = rows;
1846
+ $[29] = selectedRows;
1847
+ $[30] = selectionMode;
1848
+ $[31] = sortBy;
1849
+ $[32] = sortDirection;
1850
+ $[33] = t2;
1851
+ } else t2 = $[33];
1884
1852
  const store = useConstant(t2);
1885
1853
  let t3;
1886
1854
  let t4;
1887
- if ($[35] !== getRows || $[36] !== store) {
1855
+ if ($[34] !== getRows || $[35] !== store) {
1888
1856
  t3 = () => {
1889
1857
  if (store.getState().getRows !== getRows) store.getState().actions.setGetRows(getRows);
1890
1858
  };
1891
1859
  t4 = [getRows, store];
1892
- $[35] = getRows;
1893
- $[36] = store;
1894
- $[37] = t3;
1895
- $[38] = t4;
1860
+ $[34] = getRows;
1861
+ $[35] = store;
1862
+ $[36] = t3;
1863
+ $[37] = t4;
1896
1864
  } else {
1897
- t3 = $[37];
1898
- t4 = $[38];
1865
+ t3 = $[36];
1866
+ t4 = $[37];
1899
1867
  }
1900
1868
  useEffect(t3, t4);
1901
1869
  let t5;
1902
1870
  let t6;
1903
- if ($[39] !== offset || $[40] !== store) {
1871
+ if ($[38] !== offset || $[39] !== store) {
1904
1872
  t5 = () => {
1905
1873
  if (offset !== void 0 && offset !== store.getState()._offset) store.getState().actions.setOffset(offset);
1906
1874
  };
1907
1875
  t6 = [offset, store];
1908
- $[39] = offset;
1909
- $[40] = store;
1910
- $[41] = t5;
1911
- $[42] = t6;
1876
+ $[38] = offset;
1877
+ $[39] = store;
1878
+ $[40] = t5;
1879
+ $[41] = t6;
1912
1880
  } else {
1913
- t5 = $[41];
1914
- t6 = $[42];
1881
+ t5 = $[40];
1882
+ t6 = $[41];
1915
1883
  }
1916
1884
  useEffect(t5, t6);
1917
1885
  let t7;
1918
1886
  let t8;
1919
- if ($[43] !== limit || $[44] !== store) {
1887
+ if ($[42] !== limit || $[43] !== store) {
1920
1888
  t7 = () => {
1921
1889
  if (limit !== void 0 && limit !== store.getState()._limit) store.getState().actions.setLimit(limit);
1922
1890
  };
1923
1891
  t8 = [limit, store];
1924
- $[43] = limit;
1925
- $[44] = store;
1926
- $[45] = t7;
1927
- $[46] = t8;
1892
+ $[42] = limit;
1893
+ $[43] = store;
1894
+ $[44] = t7;
1895
+ $[45] = t8;
1928
1896
  } else {
1929
- t7 = $[45];
1930
- t8 = $[46];
1897
+ t7 = $[44];
1898
+ t8 = $[45];
1931
1899
  }
1932
1900
  useEffect(t7, t8);
1933
1901
  let t10;
1934
1902
  let t9;
1935
- if ($[47] !== filter || $[48] !== store) {
1903
+ if ($[46] !== filter || $[47] !== store) {
1936
1904
  t9 = () => {
1937
1905
  if (filter !== void 0 && filter !== store.getState().filter) store.getState().actions.setFilter(filter);
1938
1906
  };
1939
1907
  t10 = [filter, store];
1940
- $[47] = filter;
1941
- $[48] = store;
1942
- $[49] = t10;
1943
- $[50] = t9;
1908
+ $[46] = filter;
1909
+ $[47] = store;
1910
+ $[48] = t10;
1911
+ $[49] = t9;
1944
1912
  } else {
1945
- t10 = $[49];
1946
- t9 = $[50];
1913
+ t10 = $[48];
1914
+ t9 = $[49];
1947
1915
  }
1948
1916
  useEffect(t9, t10);
1949
1917
  let t11;
1950
1918
  let t12;
1951
- if ($[51] !== sortBy || $[52] !== sortDirection || $[53] !== store) {
1919
+ if ($[50] !== sortBy || $[51] !== sortDirection || $[52] !== store) {
1952
1920
  t11 = () => {
1953
1921
  if ((sortBy !== void 0 || sortDirection !== void 0) && (sortBy !== store.getState().sortBy || sortDirection !== store.getState().sortDirection)) store.getState().actions.setSort(sortBy === void 0 ? store.getState().sortBy : sortBy, sortDirection ?? store.getState().sortDirection);
1954
1922
  };
@@ -1957,19 +1925,19 @@ function useCreateDataTableContext(t0) {
1957
1925
  sortDirection,
1958
1926
  store
1959
1927
  ];
1960
- $[51] = sortBy;
1961
- $[52] = sortDirection;
1962
- $[53] = store;
1963
- $[54] = t11;
1964
- $[55] = t12;
1928
+ $[50] = sortBy;
1929
+ $[51] = sortDirection;
1930
+ $[52] = store;
1931
+ $[53] = t11;
1932
+ $[54] = t12;
1965
1933
  } else {
1966
- t11 = $[54];
1967
- t12 = $[55];
1934
+ t11 = $[53];
1935
+ t12 = $[54];
1968
1936
  }
1969
1937
  useEffect(t11, t12);
1970
1938
  let t13;
1971
1939
  let t14;
1972
- if ($[56] !== columns || $[57] !== disabledSelections || $[58] !== headCount || $[59] !== leafColumns || $[60] !== loading || $[61] !== loadingCount || $[62] !== locale.languageTag || $[63] !== rows || $[64] !== selectedRows || $[65] !== selectionMode || $[66] !== store) {
1940
+ if ($[55] !== columns || $[56] !== disabledSelections || $[57] !== headCount || $[58] !== leafColumns || $[59] !== loading || $[60] !== loadingCount || $[61] !== locale.languageTag || $[62] !== rows || $[63] !== selectedRows || $[64] !== selectionMode || $[65] !== store) {
1973
1941
  t13 = () => {
1974
1942
  store.setState({
1975
1943
  columns,
@@ -1997,27 +1965,27 @@ function useCreateDataTableContext(t0) {
1997
1965
  selectionMode,
1998
1966
  locale.languageTag
1999
1967
  ];
2000
- $[56] = columns;
2001
- $[57] = disabledSelections;
2002
- $[58] = headCount;
2003
- $[59] = leafColumns;
2004
- $[60] = loading;
2005
- $[61] = loadingCount;
2006
- $[62] = locale.languageTag;
2007
- $[63] = rows;
2008
- $[64] = selectedRows;
2009
- $[65] = selectionMode;
2010
- $[66] = store;
2011
- $[67] = t13;
2012
- $[68] = t14;
2013
- } else {
2014
- t13 = $[67];
2015
- t14 = $[68];
1968
+ $[55] = columns;
1969
+ $[56] = disabledSelections;
1970
+ $[57] = headCount;
1971
+ $[58] = leafColumns;
1972
+ $[59] = loading;
1973
+ $[60] = loadingCount;
1974
+ $[61] = locale.languageTag;
1975
+ $[62] = rows;
1976
+ $[63] = selectedRows;
1977
+ $[64] = selectionMode;
1978
+ $[65] = store;
1979
+ $[66] = t13;
1980
+ $[67] = t14;
1981
+ } else {
1982
+ t13 = $[66];
1983
+ t14 = $[67];
2016
1984
  }
2017
1985
  useEffect(t13, t14);
2018
1986
  let t15;
2019
1987
  let t16;
2020
- if ($[69] !== latestRef || $[70] !== store) {
1988
+ if ($[68] !== latestRef || $[69] !== store) {
2021
1989
  t15 = () => {
2022
1990
  if (store.getState()._rows) {
2023
1991
  const { visibleRows, processedRows } = store.getState();
@@ -2026,18 +1994,18 @@ function useCreateDataTableContext(t0) {
2026
1994
  }
2027
1995
  };
2028
1996
  t16 = [latestRef, store];
2029
- $[69] = latestRef;
2030
- $[70] = store;
2031
- $[71] = t15;
2032
- $[72] = t16;
1997
+ $[68] = latestRef;
1998
+ $[69] = store;
1999
+ $[70] = t15;
2000
+ $[71] = t16;
2033
2001
  } else {
2034
- t15 = $[71];
2035
- t16 = $[72];
2002
+ t15 = $[70];
2003
+ t16 = $[71];
2036
2004
  }
2037
2005
  useEffect(t15, t16);
2038
2006
  const generatedId = useId();
2039
2007
  let t17;
2040
- if ($[73] !== apiRef || $[74] !== displayMode || $[75] !== dynamicRowHeight || $[76] !== estimatedRowHeight || $[77] !== generatedId || $[78] !== onSelectAll || $[79] !== overscan || $[80] !== renderCell || $[81] !== renderRow || $[82] !== required || $[83] !== rowKey || $[84] !== selectAllChecked || $[85] !== selectAllRowsLabel || $[86] !== selectRowLabel || $[87] !== showAllRowsWhilePrinting || $[88] !== showSelectionColumn || $[89] !== store) {
2008
+ if ($[72] !== apiRef || $[73] !== displayMode || $[74] !== dynamicRowHeight || $[75] !== estimatedRowHeight || $[76] !== generatedId || $[77] !== onSelectAll || $[78] !== overscan || $[79] !== renderCell || $[80] !== renderRow || $[81] !== required || $[82] !== rowKey || $[83] !== selectAllChecked || $[84] !== selectAllRowsLabel || $[85] !== selectRowLabel || $[86] !== showAllRowsWhilePrinting || $[87] !== showSelectionColumn || $[88] !== store) {
2041
2009
  t17 = {
2042
2010
  displayMode,
2043
2011
  rowKey,
@@ -2057,25 +2025,25 @@ function useCreateDataTableContext(t0) {
2057
2025
  apiRef,
2058
2026
  store
2059
2027
  };
2060
- $[73] = apiRef;
2061
- $[74] = displayMode;
2062
- $[75] = dynamicRowHeight;
2063
- $[76] = estimatedRowHeight;
2064
- $[77] = generatedId;
2065
- $[78] = onSelectAll;
2066
- $[79] = overscan;
2067
- $[80] = renderCell;
2068
- $[81] = renderRow;
2069
- $[82] = required;
2070
- $[83] = rowKey;
2071
- $[84] = selectAllChecked;
2072
- $[85] = selectAllRowsLabel;
2073
- $[86] = selectRowLabel;
2074
- $[87] = showAllRowsWhilePrinting;
2075
- $[88] = showSelectionColumn;
2076
- $[89] = store;
2077
- $[90] = t17;
2078
- } else t17 = $[90];
2028
+ $[72] = apiRef;
2029
+ $[73] = displayMode;
2030
+ $[74] = dynamicRowHeight;
2031
+ $[75] = estimatedRowHeight;
2032
+ $[76] = generatedId;
2033
+ $[77] = onSelectAll;
2034
+ $[78] = overscan;
2035
+ $[79] = renderCell;
2036
+ $[80] = renderRow;
2037
+ $[81] = required;
2038
+ $[82] = rowKey;
2039
+ $[83] = selectAllChecked;
2040
+ $[84] = selectAllRowsLabel;
2041
+ $[85] = selectRowLabel;
2042
+ $[86] = showAllRowsWhilePrinting;
2043
+ $[87] = showSelectionColumn;
2044
+ $[88] = store;
2045
+ $[89] = t17;
2046
+ } else t17 = $[89];
2079
2047
  return t17;
2080
2048
  }
2081
2049
  function _temp12(hasFooterCells) {
@@ -2112,16 +2080,16 @@ function _temp6$2(limit_2, limitOptions) {
2112
2080
  function _temp5$6(currentPage, limit_1) {
2113
2081
  return currentPage * limit_1;
2114
2082
  }
2115
- function _temp4$8(offset_1, limit_0) {
2083
+ function _temp4$9(offset_1, limit_0) {
2116
2084
  return Math.floor(offset_1 / limit_0);
2117
2085
  }
2118
2086
  function _temp3$19(offset_0, t0) {
2119
2087
  return Math.min(Math.max(offset_0, 0), Math.max((t0 === void 0 ? offset_0 : t0) - 1, 0));
2120
2088
  }
2121
- function _temp2$36(leafColumns_0) {
2122
- return Object.values(leafColumns_0).some(_temp$56);
2089
+ function _temp2$35(leafColumns_0) {
2090
+ return Object.values(leafColumns_0).some(_temp$58);
2123
2091
  }
2124
- function _temp$56(column) {
2092
+ function _temp$58(column) {
2125
2093
  return typeof column.footer !== "boolean" && column.footer != null;
2126
2094
  }
2127
2095
  /** Hook providing access to the data table context. */
@@ -2145,12 +2113,12 @@ function useDataTableColumnLabelId() {
2145
2113
  var FeedbackContext = createContext(null);
2146
2114
  /** Hook which creates the feedback context value. */
2147
2115
  function useCreateFeedbackContext() {
2148
- return useConstant(_temp2$35);
2116
+ return useConstant(_temp2$34);
2149
2117
  }
2150
- function _temp2$35() {
2151
- return createStore()(subscribeWithSelector(_temp$55));
2118
+ function _temp2$34() {
2119
+ return createStore()(subscribeWithSelector(_temp$57));
2152
2120
  }
2153
- function _temp$55(set) {
2121
+ function _temp$57(set) {
2154
2122
  return {
2155
2123
  controlName: void 0,
2156
2124
  controlStatus: void 0,
@@ -2187,9 +2155,9 @@ function _temp3$18(state) {
2187
2155
  }
2188
2156
  /** Hook exposing the focused status of a control. */
2189
2157
  function useFeedbackControlFocused() {
2190
- return useFeedbackStore(_temp4$7);
2158
+ return useFeedbackStore(_temp4$8);
2191
2159
  }
2192
- function _temp4$7(state) {
2160
+ function _temp4$8(state) {
2193
2161
  return state.controlFocused;
2194
2162
  }
2195
2163
  /** Hook that registers a feedback and returns its identifier. */
@@ -2240,12 +2208,12 @@ function _temp5$5(state) {
2240
2208
  var FieldContext = createContext(null);
2241
2209
  /** Hook which creates the field context value. */
2242
2210
  function useCreateFieldContext() {
2243
- return useConstant(_temp2$34);
2211
+ return useConstant(_temp2$33);
2244
2212
  }
2245
- function _temp2$34() {
2246
- return createStore()(subscribeWithSelector(_temp$54));
2213
+ function _temp2$33() {
2214
+ return createStore()(subscribeWithSelector(_temp$56));
2247
2215
  }
2248
- function _temp$54(_set) {
2216
+ function _temp$56(_set) {
2249
2217
  return { controlHasCode: false };
2250
2218
  }
2251
2219
  /** Hook returning the field's context value. */
@@ -2257,12 +2225,12 @@ function useFieldContext() {
2257
2225
  var HelperTextContext = createContext(null);
2258
2226
  /** Hook which creates the helper text context value. */
2259
2227
  function useCreateHelperTextContext() {
2260
- return useConstant(_temp2$33);
2228
+ return useConstant(_temp2$32);
2261
2229
  }
2262
- function _temp2$33() {
2263
- return createStore()(subscribeWithSelector(_temp$53));
2230
+ function _temp2$32() {
2231
+ return createStore()(subscribeWithSelector(_temp$55));
2264
2232
  }
2265
- function _temp$53(set) {
2233
+ function _temp$55(set) {
2266
2234
  return {
2267
2235
  helperTextIds: [],
2268
2236
  actions: {
@@ -2335,12 +2303,12 @@ function _temp3$17(state) {
2335
2303
  var LabelContext = createContext(null);
2336
2304
  /** Hook which creates the label context value. */
2337
2305
  function useCreateLabelContext() {
2338
- return useConstant(_temp2$32);
2306
+ return useConstant(_temp2$31);
2339
2307
  }
2340
- function _temp2$32() {
2341
- return createStore()(subscribeWithSelector(_temp$52));
2308
+ function _temp2$31() {
2309
+ return createStore()(subscribeWithSelector(_temp$54));
2342
2310
  }
2343
- function _temp$52(_set) {
2311
+ function _temp$54(_set) {
2344
2312
  return {
2345
2313
  label: void 0,
2346
2314
  labelId: void 0,
@@ -2420,9 +2388,9 @@ function _temp3$16(state) {
2420
2388
  }
2421
2389
  /** Hook exposing whether the `tagName` of a control. */
2422
2390
  function useLabelControlTagName() {
2423
- return useLabelStore(_temp4$6);
2391
+ return useLabelStore(_temp4$7);
2424
2392
  }
2425
- function _temp4$6(state) {
2393
+ function _temp4$7(state) {
2426
2394
  return state.controlTagName;
2427
2395
  }
2428
2396
  /** Hook exposing whether a control is marked as required. */
@@ -2539,6 +2507,32 @@ function stickyColumnOffsets(leaves, defaultColumnWidth) {
2539
2507
  }
2540
2508
  return offsets;
2541
2509
  }
2510
+ /** Keys of all columns (leaves and groups), based on their location in the column tree. */
2511
+ function columnKeys(columns) {
2512
+ const keys = /* @__PURE__ */ new Map();
2513
+ const visit = (columns, parentKey) => {
2514
+ const counts = /* @__PURE__ */ new Map();
2515
+ columns.forEach((column, i) => {
2516
+ const { key, label } = column;
2517
+ const segment = key != null ? `k:${key}` : typeof label === "string" || typeof label === "number" ? `v:${label}` : `i:${i}`;
2518
+ const n = counts.get(segment) ?? 0;
2519
+ counts.set(segment, n + 1);
2520
+ const columnKey = `${parentKey}/${n === 0 ? segment : `${segment}#${n}`}`;
2521
+ keys.set(column, columnKey);
2522
+ if (column.subColumns) visit(column.subColumns, columnKey);
2523
+ });
2524
+ };
2525
+ visit(columns, "");
2526
+ return keys;
2527
+ }
2528
+ /** Keys of the `<col>` elements, aligned with the result of `columnWidths`. */
2529
+ function colKeys(leaves, keys) {
2530
+ return leaves.flatMap((column) => {
2531
+ const key = keys.get(column);
2532
+ const colSpan = column.colSpan ?? 1;
2533
+ return colSpan === 1 ? [key] : Array.from({ length: colSpan }, (_, i) => `${key}:${i}`);
2534
+ });
2535
+ }
2542
2536
  // src/components/Table/TableContext.ts
2543
2537
  /** Table context. */
2544
2538
  var TableContext = createContext(null);
@@ -2551,9 +2545,10 @@ function useCreateTableContext(t0) {
2551
2545
  t1 = () => createStore()(subscribeWithSelector((_set, get) => ({
2552
2546
  scrollPosition: void 0,
2553
2547
  leafColumns: void 0,
2548
+ columnKeys: void 0,
2554
2549
  defaultColumnWidth,
2555
- numberOfColumns: computed(() => [get().leafColumns], _temp$51),
2556
- stickyColumnOffsets: computed(() => [get().leafColumns, get().defaultColumnWidth], _temp2$31)
2550
+ numberOfColumns: computed(() => [get().leafColumns], _temp$53),
2551
+ stickyColumnOffsets: computed(() => [get().leafColumns, get().defaultColumnWidth], _temp2$30)
2557
2552
  })));
2558
2553
  $[0] = defaultColumnWidth;
2559
2554
  $[1] = t1;
@@ -2591,10 +2586,10 @@ function useCreateTableContext(t0) {
2591
2586
  } else t4 = $[10];
2592
2587
  return t4;
2593
2588
  }
2594
- function _temp2$31(leaves_0, defaultColumnWidth_0) {
2589
+ function _temp2$30(leaves_0, defaultColumnWidth_0) {
2595
2590
  return leaves_0 && stickyColumnOffsets(leaves_0, defaultColumnWidth_0);
2596
2591
  }
2597
- function _temp$51(leaves) {
2592
+ function _temp$53(leaves) {
2598
2593
  return leaves && numberOfColumns(leaves);
2599
2594
  }
2600
2595
  /** Hook returning the table's context value. */
@@ -2800,7 +2795,7 @@ function Layer(t0) {
2800
2795
  const normalizeZIndex = t1;
2801
2796
  let t2;
2802
2797
  if ($[7] !== normalizeZIndex || $[8] !== parentZIndices || $[9] !== reset || $[10] !== zIndex) {
2803
- const normalizedZIndex = (Array.isArray(zIndex) ? zIndex.map(normalizeZIndex) : [normalizeZIndex(zIndex)]).filter(_temp$50);
2798
+ const normalizedZIndex = (Array.isArray(zIndex) ? zIndex.map(normalizeZIndex) : [normalizeZIndex(zIndex)]).filter(_temp$52);
2804
2799
  t2 = normalizedZIndex == null ? reset ? [] : parentZIndices : reset ? normalizedZIndex : [...parentZIndices, ...normalizedZIndex];
2805
2800
  $[7] = normalizeZIndex;
2806
2801
  $[8] = parentZIndices;
@@ -2836,7 +2831,7 @@ function Layer(t0) {
2836
2831
  } else t3 = $[18];
2837
2832
  return t3;
2838
2833
  }
2839
- function _temp$50(v) {
2834
+ function _temp$52(v) {
2840
2835
  return v != null;
2841
2836
  }
2842
2837
  // src/components/Overlay/Overlay.tsx
@@ -2980,7 +2975,7 @@ function DialogContent(t0) {
2980
2975
  const size = t3 === void 0 ? "md" : t3;
2981
2976
  const prefix = usePrefix();
2982
2977
  const portalContext = usePortalContext();
2983
- const handlePointerDownOutside = _temp$49;
2978
+ const handlePointerDownOutside = _temp$51;
2984
2979
  const t4 = portalContext?.container;
2985
2980
  let t5;
2986
2981
  if ($[13] !== overlayProps?.className || $[14] !== prefix) {
@@ -3088,7 +3083,7 @@ function DialogContent(t0) {
3088
3083
  } else t15 = $[46];
3089
3084
  return t15;
3090
3085
  }
3091
- function _temp$49(evt) {
3086
+ function _temp$51(evt) {
3092
3087
  if (evt.detail.originalEvent.offsetX > evt.currentTarget.clientWidth) evt.preventDefault();
3093
3088
  }
3094
3089
  // src/components/Dialog/DialogDescription.tsx
@@ -3387,15 +3382,26 @@ var ignoreKeyboardShortcutInEditableElements = defaultKeybindingsHandlerIgnore;
3387
3382
  */
3388
3383
  function normalizeKeybinds(keybinds) {
3389
3384
  if (keybinds == null) return [];
3390
- return (Array.isArray(keybinds) ? keybinds : [keybinds]).map((keybind) => parseKeybinding(keybind).map(([reqMods, optMods, key]) => {
3391
- let finalKey;
3392
- if (key instanceof RegExp) finalKey = `(${key.source.slice(1, -1)})`;
3393
- else {
3394
- finalKey = key.replace(KEY_CLEAN_UP, "");
3395
- if (finalKey.length === 1) finalKey = finalKey.toUpperCase();
3385
+ const keybindsArray = Array.isArray(keybinds) ? keybinds : [keybinds];
3386
+ const seen = /* @__PURE__ */ new Set();
3387
+ const result = [];
3388
+ for (const keybind of keybindsArray) {
3389
+ const normalized = parseKeybinding(keybind).map(([reqMods, optMods, key]) => {
3390
+ let finalKey;
3391
+ if (key instanceof RegExp) finalKey = `(${key.source.slice(1, -1)})`;
3392
+ else {
3393
+ finalKey = key.replace(KEY_CLEAN_UP, "");
3394
+ if (finalKey.length === 1) finalKey = finalKey.toUpperCase();
3395
+ }
3396
+ return Array.from(new Set(reqMods.concat(optMods, finalKey)));
3397
+ });
3398
+ const id = JSON.stringify(normalized);
3399
+ if (!seen.has(id)) {
3400
+ seen.add(id);
3401
+ result.push(normalized);
3396
3402
  }
3397
- return reqMods.concat(optMods, finalKey);
3398
- }));
3403
+ }
3404
+ return result;
3399
3405
  }
3400
3406
  /**
3401
3407
  * Converts the provided `tinykeys` keybinds into an `aria-keyshortcuts` string.
@@ -3461,8 +3467,8 @@ function useTextProps(t0) {
3461
3467
  } else t2 = $[10];
3462
3468
  const lineHeightProps = useResponsiveValue("", "line-height", size, t2);
3463
3469
  const alignProps = useResponsiveValue("", "text-align", align);
3464
- const weightProps = useResponsiveValue("", "font-weight", weight, _temp$48);
3465
- const wrapProps = useResponsiveValue("", "text-wrap", wrap, _temp2$30);
3470
+ const weightProps = useResponsiveValue("", "font-weight", weight, _temp$50);
3471
+ const wrapProps = useResponsiveValue("", "text-wrap", wrap, _temp2$29);
3466
3472
  let t3;
3467
3473
  if ($[11] !== alignProps.cssVars || $[12] !== fontSizeProps.cssVars || $[13] !== lineHeightProps.cssVars || $[14] !== weightProps.cssVars || $[15] !== wrapProps.cssVars) {
3468
3474
  t3 = {
@@ -3557,10 +3563,10 @@ function useTextProps(t0) {
3557
3563
  } else t11 = $[43];
3558
3564
  return t11;
3559
3565
  }
3560
- function _temp2$30(v_2) {
3566
+ function _temp2$29(v_2) {
3561
3567
  return v_2 === true ? "wrap" : v_2 === false ? "nowrap" : v_2;
3562
3568
  }
3563
- function _temp$48(v_1) {
3569
+ function _temp$50(v_1) {
3564
3570
  return typeof v_1 === "string" && v_1 in FONT_WEIGHTS ? FONT_WEIGHTS[v_1] : v_1;
3565
3571
  }
3566
3572
  // src/components/VisuallyHidden/VisuallyHidden.tsx
@@ -3944,124 +3950,100 @@ function Key(t0) {
3944
3950
  return t1;
3945
3951
  }
3946
3952
  // src/components/Keybinds/KeyPress.tsx
3947
- var KEY_SEPARATOR = IS_APPLE ? " " : " ⁠+ ";
3948
- function KeyPress({ keyPress, keySymbols, keyLabels }) {
3949
- return intersperse(keyPress.map((key, i) => /* @__PURE__ */ jsx(Key, {
3953
+ var KEYS_SEPARATOR = IS_APPLE ? " " : " ⁠+ ";
3954
+ function KeyPress({ keyPress, keysSeparatorLabel, keySymbols, keyLabels }) {
3955
+ return intersperse(keyPress.map((key) => /* @__PURE__ */ jsx(Key, {
3950
3956
  keyName: key,
3951
3957
  keySymbols,
3952
3958
  keyLabels
3953
- }, `key-${i}`)), (i) => /* @__PURE__ */ jsx("span", {
3954
- "aria-hidden": true,
3955
- children: KEY_SEPARATOR
3956
- }, `key-separator-${i}`));
3959
+ }, `k:${key}`)), (i) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
3960
+ "aria-hidden": !!keysSeparatorLabel || void 0,
3961
+ children: KEYS_SEPARATOR
3962
+ }), keysSeparatorLabel && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
3963
+ " ",
3964
+ keysSeparatorLabel,
3965
+ " "
3966
+ ] })] }, `s:${i}`));
3957
3967
  }
3958
3968
  // src/components/Keybinds/Keybind.tsx
3959
- var KEY_PRESS_SEPARATOR = " ";
3960
- function Keybind(t0) {
3961
- const $ = c(10);
3962
- const { keybind, keyPressesSeparatorLabel: keyPressesSeparatorLabelProp, keySymbols, keyLabels } = t0;
3963
- const [locale] = useLocale();
3964
- const keyPressesSeparatorLabel = keyPressesSeparatorLabelProp ?? locale.Keybinds.keyPressesSeparatorLabel;
3965
- let t1;
3966
- if ($[0] !== keyLabels || $[1] !== keyPressesSeparatorLabel || $[2] !== keySymbols || $[3] !== keybind) {
3967
- let t2;
3968
- if ($[5] !== keyLabels || $[6] !== keySymbols) {
3969
- t2 = (keyPress, i) => /* @__PURE__ */ jsx(KeyPress, {
3970
- keyPress,
3971
- keySymbols,
3972
- keyLabels
3973
- }, `key-press-${i}`);
3974
- $[5] = keyLabels;
3975
- $[6] = keySymbols;
3976
- $[7] = t2;
3977
- } else t2 = $[7];
3978
- let t3;
3979
- if ($[8] !== keyPressesSeparatorLabel) {
3980
- t3 = (i_0) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
3981
- "aria-hidden": true,
3982
- children: KEY_PRESS_SEPARATOR
3983
- }), /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
3984
- " ",
3985
- keyPressesSeparatorLabel,
3986
- " "
3987
- ] })] }, `key-press-separator-${i_0}`);
3988
- $[8] = keyPressesSeparatorLabel;
3989
- $[9] = t3;
3990
- } else t3 = $[9];
3991
- t1 = intersperse(keybind.map(t2), t3);
3992
- $[0] = keyLabels;
3993
- $[1] = keyPressesSeparatorLabel;
3994
- $[2] = keySymbols;
3995
- $[3] = keybind;
3996
- $[4] = t1;
3997
- } else t1 = $[4];
3998
- return t1;
3969
+ var KEY_PRESSES_SEPARATOR = " ";
3970
+ function Keybind({ keybind, keyPressesSeparatorLabel, keysSeparatorLabel, keySymbols, keyLabels }) {
3971
+ return intersperse(keybind.map((keyPress, i) => /* @__PURE__ */ jsx(KeyPress, {
3972
+ keyPress,
3973
+ keysSeparatorLabel,
3974
+ keySymbols,
3975
+ keyLabels
3976
+ }, `k:${i}`)), (i) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
3977
+ "aria-hidden": !!keyPressesSeparatorLabel || void 0,
3978
+ children: KEY_PRESSES_SEPARATOR
3979
+ }), keyPressesSeparatorLabel && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
3980
+ " ",
3981
+ keyPressesSeparatorLabel,
3982
+ " "
3983
+ ] })] }, `s:${i}`));
3999
3984
  }
4000
3985
  // src/components/Keybinds/Keybinds.tsx
4001
- var KEYBIND_SEPARATOR = "\xA0/ ";
3986
+ var KEYBINDS_SEPARATOR = "\xA0/ ";
4002
3987
  /** Component which visually renders [`tinykeys`](https://jamiebuilds.github.io/tinykeys) keybinds. */
4003
3988
  function Keybinds(t0) {
4004
3989
  const $ = c(27);
4005
3990
  let className;
4006
3991
  let keyLabels;
4007
- let keyPressesSeparatorLabel;
3992
+ let keyPressesSeparatorLabelProp;
4008
3993
  let keySymbols;
4009
- let keybindsProp;
3994
+ let keybinds;
4010
3995
  let keybindsSeparatorLabelProp;
3996
+ let keysSeparatorLabelProp;
4011
3997
  let limit;
4012
3998
  let otherProps;
4013
3999
  let style;
4014
4000
  if ($[0] !== t0) {
4015
- ({keybinds: keybindsProp, limit, keybindsSeparatorLabel: keybindsSeparatorLabelProp, keyPressesSeparatorLabel, keySymbols, keyLabels, className, style, ...otherProps} = t0);
4001
+ ({keybinds, limit, keybindsSeparatorLabel: keybindsSeparatorLabelProp, keyPressesSeparatorLabel: keyPressesSeparatorLabelProp, keysSeparatorLabel: keysSeparatorLabelProp, keySymbols, keyLabels, className, style, ...otherProps} = t0);
4016
4002
  $[0] = t0;
4017
4003
  $[1] = className;
4018
4004
  $[2] = keyLabels;
4019
- $[3] = keyPressesSeparatorLabel;
4005
+ $[3] = keyPressesSeparatorLabelProp;
4020
4006
  $[4] = keySymbols;
4021
- $[5] = keybindsProp;
4007
+ $[5] = keybinds;
4022
4008
  $[6] = keybindsSeparatorLabelProp;
4023
- $[7] = limit;
4024
- $[8] = otherProps;
4025
- $[9] = style;
4009
+ $[7] = keysSeparatorLabelProp;
4010
+ $[8] = limit;
4011
+ $[9] = otherProps;
4012
+ $[10] = style;
4026
4013
  } else {
4027
4014
  className = $[1];
4028
4015
  keyLabels = $[2];
4029
- keyPressesSeparatorLabel = $[3];
4016
+ keyPressesSeparatorLabelProp = $[3];
4030
4017
  keySymbols = $[4];
4031
- keybindsProp = $[5];
4018
+ keybinds = $[5];
4032
4019
  keybindsSeparatorLabelProp = $[6];
4033
- limit = $[7];
4034
- otherProps = $[8];
4035
- style = $[9];
4020
+ keysSeparatorLabelProp = $[7];
4021
+ limit = $[8];
4022
+ otherProps = $[9];
4023
+ style = $[10];
4036
4024
  }
4037
4025
  if (limit != null && limit < 1) throw new RangeError("Limit must be >= 1.");
4038
4026
  const prefix = usePrefix();
4039
4027
  const [locale] = useLocale();
4040
- let t1;
4041
- if ($[10] !== keybindsProp || $[11] !== limit) {
4042
- t1 = Array.isArray(keybindsProp) ? keybindsProp.slice(0, limit) : keybindsProp;
4043
- $[10] = keybindsProp;
4044
- $[11] = limit;
4045
- $[12] = t1;
4046
- } else t1 = $[12];
4047
- const keybinds = t1;
4048
4028
  const keybindsSeparatorLabel = keybindsSeparatorLabelProp ?? locale.Keybinds.keybindsSeparatorLabel;
4049
- const t2 = useMarginProps(otherProps);
4029
+ const keyPressesSeparatorLabel = keyPressesSeparatorLabelProp ?? locale.Keybinds.keyPressesSeparatorLabel;
4030
+ const keysSeparatorLabel = keysSeparatorLabelProp ?? locale.Keybinds.keysSeparatorLabel;
4031
+ const t1 = useMarginProps(otherProps);
4050
4032
  let marginProps;
4051
4033
  let nonMarginProps;
4052
- if ($[13] !== t2) {
4053
- ({marginProps, ...nonMarginProps} = t2);
4054
- $[13] = t2;
4055
- $[14] = marginProps;
4056
- $[15] = nonMarginProps;
4034
+ if ($[11] !== t1) {
4035
+ ({marginProps, ...nonMarginProps} = t1);
4036
+ $[11] = t1;
4037
+ $[12] = marginProps;
4038
+ $[13] = nonMarginProps;
4057
4039
  } else {
4058
- marginProps = $[14];
4059
- nonMarginProps = $[15];
4040
+ marginProps = $[12];
4041
+ nonMarginProps = $[13];
4060
4042
  }
4061
- let t3;
4062
- if ($[16] !== className || $[17] !== keyLabels || $[18] !== keyPressesSeparatorLabel || $[19] !== keySymbols || $[20] !== keybinds || $[21] !== keybindsSeparatorLabel || $[22] !== marginProps || $[23] !== nonMarginProps || $[24] !== prefix || $[25] !== style) {
4063
- const normalizedKeybinds = normalizeKeybinds(keybinds);
4064
- t3 = normalizedKeybinds.length === 0 ? null : /* @__PURE__ */ jsx("span", {
4043
+ let t2;
4044
+ if ($[14] !== className || $[15] !== keyLabels || $[16] !== keyPressesSeparatorLabel || $[17] !== keySymbols || $[18] !== keybinds || $[19] !== keybindsSeparatorLabel || $[20] !== keysSeparatorLabel || $[21] !== limit || $[22] !== marginProps || $[23] !== nonMarginProps || $[24] !== prefix || $[25] !== style) {
4045
+ const normalizedKeybinds = normalizeKeybinds(keybinds).slice(0, limit);
4046
+ t2 = normalizedKeybinds.length === 0 ? null : /* @__PURE__ */ jsx("span", {
4065
4047
  className: cx(prefix("keybinds"), className),
4066
4048
  style: {
4067
4049
  ...marginProps.cssVars,
@@ -4069,33 +4051,36 @@ function Keybinds(t0) {
4069
4051
  },
4070
4052
  ...marginProps.dataAttrs,
4071
4053
  ...nonMarginProps,
4072
- children: intersperse(normalizedKeybinds.map((keybind, i) => /* @__PURE__ */ jsx(Keybind, {
4054
+ children: intersperse(normalizedKeybinds.map((keybind) => /* @__PURE__ */ jsx(Keybind, {
4073
4055
  keybind,
4074
4056
  keyPressesSeparatorLabel,
4057
+ keysSeparatorLabel,
4075
4058
  keySymbols,
4076
4059
  keyLabels
4077
- }, `keybind-${i}`)), (i_0) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
4078
- "aria-hidden": true,
4079
- children: KEYBIND_SEPARATOR
4060
+ }, `k:${JSON.stringify(keybind)}`)), (i) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
4061
+ "aria-hidden": !!keybindsSeparatorLabel || void 0,
4062
+ children: KEYBINDS_SEPARATOR
4080
4063
  }), keybindsSeparatorLabel && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
4081
4064
  " ",
4082
4065
  keybindsSeparatorLabel,
4083
4066
  " "
4084
- ] })] }, `keybind-separator-${i_0}`))
4067
+ ] })] }, `s:${i}`))
4085
4068
  });
4086
- $[16] = className;
4087
- $[17] = keyLabels;
4088
- $[18] = keyPressesSeparatorLabel;
4089
- $[19] = keySymbols;
4090
- $[20] = keybinds;
4091
- $[21] = keybindsSeparatorLabel;
4069
+ $[14] = className;
4070
+ $[15] = keyLabels;
4071
+ $[16] = keyPressesSeparatorLabel;
4072
+ $[17] = keySymbols;
4073
+ $[18] = keybinds;
4074
+ $[19] = keybindsSeparatorLabel;
4075
+ $[20] = keysSeparatorLabel;
4076
+ $[21] = limit;
4092
4077
  $[22] = marginProps;
4093
4078
  $[23] = nonMarginProps;
4094
4079
  $[24] = prefix;
4095
4080
  $[25] = style;
4096
- $[26] = t3;
4097
- } else t3 = $[26];
4098
- return t3;
4081
+ $[26] = t2;
4082
+ } else t2 = $[26];
4083
+ return t2;
4099
4084
  }
4100
4085
  // src/components/Spinner/Spinner.tsx
4101
4086
  /**
@@ -5778,8 +5763,8 @@ function useCreateDocumentTitleStore(breadcrumbs) {
5778
5763
  breadcrumbs: breadcrumbs ?? [],
5779
5764
  childrenDocumentTitles: 0,
5780
5765
  actions: {
5781
- addChildDocumentTitle: () => set(_temp$47),
5782
- removeChildDocumentTitle: () => set(_temp2$29)
5766
+ addChildDocumentTitle: () => set(_temp$49),
5767
+ removeChildDocumentTitle: () => set(_temp2$28)
5783
5768
  }
5784
5769
  })));
5785
5770
  $[0] = breadcrumbs;
@@ -5804,11 +5789,11 @@ function useCreateDocumentTitleStore(breadcrumbs) {
5804
5789
  useEffect(t1, t2);
5805
5790
  return store;
5806
5791
  }
5807
- function _temp2$29(t0) {
5792
+ function _temp2$28(t0) {
5808
5793
  const { childrenDocumentTitles: childrenDocumentTitles_0 } = t0;
5809
5794
  return { childrenDocumentTitles: childrenDocumentTitles_0 - 1 };
5810
5795
  }
5811
- function _temp$47(t0) {
5796
+ function _temp$49(t0) {
5812
5797
  const { childrenDocumentTitles } = t0;
5813
5798
  return { childrenDocumentTitles: childrenDocumentTitles + 1 };
5814
5799
  }
@@ -5831,7 +5816,7 @@ function DocumentTitle(t0) {
5831
5816
  const { title, children } = t0;
5832
5817
  const documentTitleProviderContext = useContext(DocumentTitleProviderContext);
5833
5818
  if (!documentTitleProviderContext) throw new Error("Document title provider context not in scope.");
5834
- const actions = useDocumentTitleStore(_temp$46);
5819
+ const actions = useDocumentTitleStore(_temp$48);
5835
5820
  let t1;
5836
5821
  if ($[0] !== title) {
5837
5822
  t1 = (state_0) => title ? [title, ...state_0.breadcrumbs ?? []] : state_0.breadcrumbs ?? [];
@@ -5845,7 +5830,7 @@ function DocumentTitle(t0) {
5845
5830
  t2 = () => {
5846
5831
  if (title) {
5847
5832
  actions?.addChildDocumentTitle();
5848
- const unsubscribe = store.subscribe(_temp2$28, (t4) => {
5833
+ const unsubscribe = store.subscribe(_temp2$27, (t4) => {
5849
5834
  const { breadcrumbs: breadcrumbs_1, childrenDocumentTitles: childrenDocumentTitles_0 } = t4;
5850
5835
  if (childrenDocumentTitles_0 === 0) setDocumentTitle([breadcrumbs_1.join(` ${documentTitleProviderContext.breadcrumbsSeparator} `), documentTitleProviderContext.baseDocumentTitle].join(` ${documentTitleProviderContext.baseSeparator} `));
5851
5836
  }, {
@@ -5891,14 +5876,14 @@ function DocumentTitle(t0) {
5891
5876
  } else t4 = $[12];
5892
5877
  return t4;
5893
5878
  }
5894
- function _temp2$28(t0) {
5879
+ function _temp2$27(t0) {
5895
5880
  const { breadcrumbs: breadcrumbs_0, childrenDocumentTitles } = t0;
5896
5881
  return {
5897
5882
  breadcrumbs: breadcrumbs_0,
5898
5883
  childrenDocumentTitles
5899
5884
  };
5900
5885
  }
5901
- function _temp$46(state) {
5886
+ function _temp$48(state) {
5902
5887
  return state.actions;
5903
5888
  }
5904
5889
  // src/providers/DocumentTitleProvider/DocumentTitleProvider.tsx
@@ -5919,7 +5904,7 @@ function DocumentTitleProvider(t0) {
5919
5904
  let t4;
5920
5905
  let t5;
5921
5906
  if ($[0] !== baseDocumentTitle || $[1] !== store) {
5922
- t4 = () => store.subscribe(_temp$45, (childrenDocumentTitles_0) => {
5907
+ t4 = () => store.subscribe(_temp$47, (childrenDocumentTitles_0) => {
5923
5908
  if (childrenDocumentTitles_0 === 0) setDocumentTitle(baseDocumentTitle ?? "");
5924
5909
  }, { fireImmediately: true });
5925
5910
  t5 = [baseDocumentTitle, store];
@@ -5966,7 +5951,7 @@ function DocumentTitleProvider(t0) {
5966
5951
  } else t8 = $[13];
5967
5952
  return t8;
5968
5953
  }
5969
- function _temp$45(t0) {
5954
+ function _temp$47(t0) {
5970
5955
  const { childrenDocumentTitles } = t0;
5971
5956
  return childrenDocumentTitles;
5972
5957
  }
@@ -7013,7 +6998,7 @@ function useSizingProps(t0) {
7013
6998
  otherProps = $[6];
7014
6999
  width = $[7];
7015
7000
  }
7016
- const sizingMapper = _temp$44;
7001
+ const sizingMapper = _temp$46;
7017
7002
  const widthProps = useResponsiveValue("", "w", width, sizingMapper);
7018
7003
  const minWidthProps = useResponsiveValue("", "min-w", minWidth, sizingMapper);
7019
7004
  const maxWidthProps = useResponsiveValue("", "max-w", maxWidth, sizingMapper);
@@ -7126,7 +7111,7 @@ function useSizingProps(t0) {
7126
7111
  } else t10 = $[45];
7127
7112
  return t10;
7128
7113
  }
7129
- function _temp$44(v) {
7114
+ function _temp$46(v) {
7130
7115
  return typeof v === "number" ? `${v}px` : v;
7131
7116
  }
7132
7117
  // src/components/Box/Box.tsx
@@ -8273,7 +8258,7 @@ function Root(t0) {
8273
8258
  toastViewportProps,
8274
8259
  errorBoundaryProps
8275
8260
  };
8276
- if (isInRoot && Object.values(topMostProps).some(_temp$43)) warnOnce(`Root: Properties ${Object.keys(topMostProps).map(_temp2$27).join(", ")} have no effect in nested \`Root\` components. Please set any of these properties on the top-most \`Root\` component instead.`);
8261
+ if (isInRoot && Object.values(topMostProps).some(_temp$45)) warnOnce(`Root: Properties ${Object.keys(topMostProps).map(_temp2$26).join(", ")} have no effect in nested \`Root\` components. Please set any of these properties on the top-most \`Root\` component instead.`);
8277
8262
  const t1 = !isInRoot;
8278
8263
  let t2;
8279
8264
  if ($[29] !== otherProps || $[30] !== t1) {
@@ -8377,10 +8362,10 @@ function Root(t0) {
8377
8362
  } else t3 = $[60];
8378
8363
  return t3;
8379
8364
  }
8380
- function _temp2$27(prop) {
8365
+ function _temp2$26(prop) {
8381
8366
  return `\`${prop}\``;
8382
8367
  }
8383
- function _temp$43(prop_0) {
8368
+ function _temp$45(prop_0) {
8384
8369
  return prop_0 !== void 0;
8385
8370
  }
8386
8371
  // src/components/DropdownMenu/DropdownMenu.tsx
@@ -10745,7 +10730,7 @@ function Stack(t0) {
10745
10730
  "child-mr": t14,
10746
10731
  "child-mb": t15,
10747
10732
  "child-ml": t16,
10748
- wrap: _temp$42
10733
+ wrap: _temp$44
10749
10734
  };
10750
10735
  $[38] = gapMapper;
10751
10736
  $[39] = t10;
@@ -10822,7 +10807,7 @@ function Stack(t0) {
10822
10807
  } else t23 = $[69];
10823
10808
  return t23;
10824
10809
  }
10825
- function _temp$42(v_0) {
10810
+ function _temp$44(v_0) {
10826
10811
  return v_0 === "reverse" ? "wrap-reverse" : v_0 ? "wrap" : "nowrap";
10827
10812
  }
10828
10813
  // src/components/Actions/useActionsLayouts.ts
@@ -11624,16 +11609,16 @@ function useIsInFeedbackList() {
11624
11609
  }
11625
11610
  /** Hook exposing whether the `id`s of feedbacks. */
11626
11611
  function useFeedbackIds() {
11627
- return useFeedbackStore(_temp$41);
11612
+ return useFeedbackStore(_temp$43);
11628
11613
  }
11629
- function _temp$41(state) {
11614
+ function _temp$43(state) {
11630
11615
  return state.feedbackIds;
11631
11616
  }
11632
11617
  /** Hook exposing whether the `name` of a control. */
11633
11618
  function useFeedbackControlName() {
11634
- return useFeedbackStore(_temp2$26);
11619
+ return useFeedbackStore(_temp2$25);
11635
11620
  }
11636
- function _temp2$26(state) {
11621
+ function _temp2$25(state) {
11637
11622
  return state.controlName;
11638
11623
  }
11639
11624
  /**
@@ -12162,34 +12147,57 @@ function PopoverTrigger(props) {
12162
12147
  } else t0 = $[1];
12163
12148
  return t0;
12164
12149
  }
12150
+ // src/utils/useResizeObserver.ts
12151
+ /**
12152
+ * Hook wrapping a `ResizeObserver` which observes one or more elements. `onResize` is called with
12153
+ * the observer's entries whenever any observed element is resized, including once right after the
12154
+ * elements start being observed.
12155
+ */
12156
+ function useResizeObserver(elements, onResize, options) {
12157
+ const $ = c(5);
12158
+ const latestOnResizeRef = useLatestRef(onResize);
12159
+ let t0;
12160
+ let t1;
12161
+ if ($[0] !== elements || $[1] !== latestOnResizeRef || $[2] !== options) {
12162
+ t0 = () => {
12163
+ const targets = (Array.isArray(elements) ? elements : [elements]).filter(_temp$42);
12164
+ if (targets.length === 0) return;
12165
+ const observer = new ResizeObserver((entries) => latestOnResizeRef.current(entries));
12166
+ for (const target of targets) observer.observe(target, options);
12167
+ return () => observer.disconnect();
12168
+ };
12169
+ t1 = [
12170
+ elements,
12171
+ options,
12172
+ latestOnResizeRef
12173
+ ];
12174
+ $[0] = elements;
12175
+ $[1] = latestOnResizeRef;
12176
+ $[2] = options;
12177
+ $[3] = t0;
12178
+ $[4] = t1;
12179
+ } else {
12180
+ t0 = $[3];
12181
+ t1 = $[4];
12182
+ }
12183
+ useEffect(t0, t1);
12184
+ }
12185
+ function _temp$42(el) {
12186
+ return el != null;
12187
+ }
12165
12188
  // src/utils/useScrollPosition.ts
12166
12189
  /** Hook that tracks the position of an element's scroll. */
12167
12190
  function useScrollPosition(element, setScrollPosition) {
12168
- const $ = c(4);
12191
+ const $ = c(7);
12169
12192
  let t0;
12170
12193
  let t1;
12171
12194
  if ($[0] !== element || $[1] !== setScrollPosition) {
12172
12195
  t0 = () => {
12173
- if (!element) {
12174
- setScrollPosition(void 0);
12175
- return;
12176
- }
12177
- const handler = () => setScrollPosition({
12178
- target: element,
12179
- top: element.scrollTop,
12180
- right: element.scrollWidth - element.scrollLeft - element.clientWidth,
12181
- bottom: element.scrollHeight - element.scrollTop - element.clientHeight,
12182
- left: element.scrollLeft
12183
- });
12196
+ if (!element) return;
12197
+ const handler = () => setScrollPosition(getScrollPosition(element));
12184
12198
  handler();
12185
- const observer = new ResizeObserver(handler);
12186
- observer.observe(element);
12187
- element.addEventListener("scroll", handler, {
12188
- capture: false,
12189
- passive: true
12190
- });
12199
+ element.addEventListener("scroll", handler, { passive: true });
12191
12200
  return () => {
12192
- observer.disconnect();
12193
12201
  element.removeEventListener("scroll", handler);
12194
12202
  setScrollPosition(void 0);
12195
12203
  };
@@ -12204,6 +12212,25 @@ function useScrollPosition(element, setScrollPosition) {
12204
12212
  t1 = $[3];
12205
12213
  }
12206
12214
  useEffect(t0, t1);
12215
+ let t2;
12216
+ if ($[4] !== element || $[5] !== setScrollPosition) {
12217
+ t2 = () => {
12218
+ if (element) setScrollPosition(getScrollPosition(element));
12219
+ };
12220
+ $[4] = element;
12221
+ $[5] = setScrollPosition;
12222
+ $[6] = t2;
12223
+ } else t2 = $[6];
12224
+ useResizeObserver(element, t2);
12225
+ }
12226
+ function getScrollPosition(element) {
12227
+ return {
12228
+ target: element,
12229
+ top: element.scrollTop,
12230
+ right: element.scrollWidth - element.scrollLeft - element.clientWidth,
12231
+ bottom: element.scrollHeight - element.scrollTop - element.clientHeight,
12232
+ left: element.scrollLeft
12233
+ };
12207
12234
  }
12208
12235
  // src/utils/nativeControls.ts
12209
12236
  /** Native form controls. */
@@ -12261,13 +12288,42 @@ function usePrintInProgress() {
12261
12288
  function usePrint() {
12262
12289
  return usePrinterContext().print;
12263
12290
  }
12291
+ // src/components/Printer/usePrintClassNames.ts
12292
+ /** Hook which exposes print-related class names. */
12293
+ function usePrintClassNames() {
12294
+ const $ = c(7);
12295
+ const prefix = usePrefix();
12296
+ let t0;
12297
+ if ($[0] !== prefix) {
12298
+ t0 = prefix("print-only");
12299
+ $[0] = prefix;
12300
+ $[1] = t0;
12301
+ } else t0 = $[1];
12302
+ let t1;
12303
+ if ($[2] !== prefix) {
12304
+ t1 = prefix("print-hidden");
12305
+ $[2] = prefix;
12306
+ $[3] = t1;
12307
+ } else t1 = $[3];
12308
+ let t2;
12309
+ if ($[4] !== t0 || $[5] !== t1) {
12310
+ t2 = {
12311
+ printOnly: t0,
12312
+ printHidden: t1
12313
+ };
12314
+ $[4] = t0;
12315
+ $[5] = t1;
12316
+ $[6] = t2;
12317
+ } else t2 = $[6];
12318
+ return t2;
12319
+ }
12264
12320
  // src/components/Printer/Printer.tsx
12265
12321
  /**
12266
12322
  * Component used to print content using the browser's printing functionality. The content is copied
12267
12323
  * to a hidden `<iframe>` which is then printed by the browser.
12268
12324
  *
12269
12325
  * Content being printed is aware of the fact that it is being printed and can adapt its appearance
12270
- * accordingly. Use the `usePrinting` and `useStartPrintingTask` hooks to control the printing
12326
+ * accordingly. Use the `usePrinting` and `usePrintingTask` hooks to control the printing
12271
12327
  * behaviour.
12272
12328
  *
12273
12329
  * Built on top of the [`react-to-print`](https://github.com/MatthewHerbst/react-to-print) package.
@@ -12300,184 +12356,217 @@ function usePrint() {
12300
12356
  * ```
12301
12357
  */
12302
12358
  function Printer(t0) {
12303
- const $ = c(41);
12359
+ const $ = c(46);
12304
12360
  const { preview, printInForeground, documentTitle, pageSize, pageMargin, printColorAdjust: t1, fonts, copyShadowRoots, nonce, printFn, onBeforePrint, onAfterPrint, iframeProps, children } = t0;
12305
12361
  const printColorAdjust = t1 === void 0 ? "exact" : t1;
12306
12362
  const prefix = usePrefix();
12363
+ const { printOnly } = usePrintClassNames();
12307
12364
  const triggerRef = useRef(null);
12308
12365
  const contentRef = useRef(null);
12309
12366
  const [printInProgress, setPrintInProgress] = useState(false);
12310
12367
  const [printOptions, setPrintOptions] = useState(void 0);
12311
12368
  const resolvePrintRef = useRef(null);
12312
12369
  const rejectPrintRef = useRef(null);
12313
- const pendingPromiseRef = useRef(null);
12314
- const resolvePendingRef = useRef(null);
12315
- const pendingTasksRef = useRef(0);
12316
- const finishedTasksRef = useRef(0);
12370
+ const trackerRef = useRef(null);
12317
12371
  let t2;
12318
12372
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
12319
- t2 = (t3) => {
12320
- const focusTrigger = t3 === void 0 ? false : t3;
12373
+ t2 = () => {
12374
+ if (!trackerRef.current) trackerRef.current = {
12375
+ tasks: /* @__PURE__ */ new Set(),
12376
+ waiters: []
12377
+ };
12378
+ return trackerRef.current;
12379
+ };
12380
+ $[0] = t2;
12381
+ } else t2 = $[0];
12382
+ const getTracker = t2;
12383
+ let t3;
12384
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
12385
+ t3 = (t4) => {
12386
+ const focusTrigger = t4 === void 0 ? false : t4;
12321
12387
  setPrintInProgress(false);
12322
12388
  setPrintOptions(void 0);
12323
12389
  resolvePrintRef.current = null;
12324
12390
  rejectPrintRef.current = null;
12325
- pendingPromiseRef.current = null;
12326
- resolvePendingRef.current = null;
12327
- pendingTasksRef.current = 0;
12328
- finishedTasksRef.current = 0;
12329
12391
  if (focusTrigger) setTimeout(() => triggerRef.current?.focus(), 100);
12330
12392
  };
12331
- $[0] = t2;
12332
- } else t2 = $[0];
12333
- const finishPrint = t2;
12334
- const relevantDocumentTitle = printOptions?.documentTitle ?? documentTitle;
12335
- let t3;
12336
- if ($[1] !== prefix || $[2] !== preview || $[3] !== printInForeground) {
12337
- t3 = preview || printInForeground ? prefix("root") : void 0;
12338
- $[1] = prefix;
12339
- $[2] = preview;
12340
- $[3] = printInForeground;
12341
- $[4] = t3;
12342
- } else t3 = $[4];
12393
+ $[1] = t3;
12394
+ } else t3 = $[1];
12395
+ const finishPrint = t3;
12343
12396
  let t4;
12344
- if ($[5] !== relevantDocumentTitle) {
12345
- t4 = typeof relevantDocumentTitle === "function" ? () => relevantDocumentTitle() ?? getDocumentTitle() : relevantDocumentTitle ?? getDocumentTitle();
12346
- $[5] = relevantDocumentTitle;
12347
- $[6] = t4;
12348
- } else t4 = $[6];
12349
- const t5 = printOptions?.pageSize ?? pageSize;
12350
- const t6 = printOptions?.pageMargin ?? pageMargin;
12351
- const t7 = printOptions?.printColorAdjust ?? printColorAdjust;
12352
- let t8;
12353
- if ($[7] !== t5 || $[8] !== t6 || $[9] !== t7) {
12354
- t8 = printPageStyle({
12355
- pageSize: t5,
12356
- pageMargin: t6,
12357
- printColorAdjust: t7
12358
- });
12359
- $[7] = t5;
12360
- $[8] = t6;
12397
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
12398
+ t4 = () => {
12399
+ const tracker = getTracker();
12400
+ const id = Symbol();
12401
+ tracker.tasks.add(id);
12402
+ return () => {
12403
+ if (!tracker.tasks.delete(id)) return;
12404
+ queueMicrotask(() => {
12405
+ if (tracker.tasks.size === 0) tracker.waiters.splice(0).forEach(_temp$41);
12406
+ });
12407
+ };
12408
+ };
12409
+ $[2] = t4;
12410
+ } else t4 = $[2];
12411
+ const startPrintingTask = t4;
12412
+ let t5;
12413
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
12414
+ t5 = () => {
12415
+ const tracker_0 = getTracker();
12416
+ if (tracker_0.tasks.size === 0) return Promise.resolve();
12417
+ return new Promise((resolve_0) => {
12418
+ tracker_0.waiters.push(resolve_0);
12419
+ });
12420
+ };
12421
+ $[3] = t5;
12422
+ } else t5 = $[3];
12423
+ const waitForPrintingTasks = t5;
12424
+ const relevantDocumentTitle = printOptions?.documentTitle ?? documentTitle;
12425
+ let t6;
12426
+ if ($[4] !== prefix || $[5] !== preview || $[6] !== printInForeground) {
12427
+ t6 = preview || printInForeground ? prefix("root") : void 0;
12428
+ $[4] = prefix;
12429
+ $[5] = preview;
12430
+ $[6] = printInForeground;
12431
+ $[7] = t6;
12432
+ } else t6 = $[7];
12433
+ let t7;
12434
+ if ($[8] !== relevantDocumentTitle) {
12435
+ t7 = typeof relevantDocumentTitle === "function" ? () => relevantDocumentTitle() ?? getDocumentTitle() : relevantDocumentTitle ?? getDocumentTitle();
12436
+ $[8] = relevantDocumentTitle;
12361
12437
  $[9] = t7;
12362
- $[10] = t8;
12363
- } else t8 = $[10];
12364
- const t9 = printOptions?.fonts ?? fonts;
12365
- const t10 = printOptions?.copyShadowRoots ?? copyShadowRoots;
12366
- const t11 = printOptions?.nonce ?? nonce;
12367
- const t12 = printOptions?.iframeProps ?? iframeProps;
12368
- const t13 = printOptions?.printFn ?? printFn;
12369
- let t14;
12370
- if ($[11] !== onAfterPrint) {
12371
- t14 = () => {
12438
+ } else t7 = $[9];
12439
+ const t8 = printOptions?.pageSize ?? pageSize;
12440
+ const t9 = printOptions?.pageMargin ?? pageMargin;
12441
+ const t10 = printOptions?.printColorAdjust ?? printColorAdjust;
12442
+ let t11;
12443
+ if ($[10] !== t10 || $[11] !== t8 || $[12] !== t9) {
12444
+ t11 = printPageStyle({
12445
+ pageSize: t8,
12446
+ pageMargin: t9,
12447
+ printColorAdjust: t10
12448
+ });
12449
+ $[10] = t10;
12450
+ $[11] = t8;
12451
+ $[12] = t9;
12452
+ $[13] = t11;
12453
+ } else t11 = $[13];
12454
+ const t12 = printOptions?.fonts ?? fonts;
12455
+ const t13 = printOptions?.copyShadowRoots ?? copyShadowRoots;
12456
+ const t14 = printOptions?.nonce ?? nonce;
12457
+ const t15 = printOptions?.iframeProps ?? iframeProps;
12458
+ let t16;
12459
+ if ($[14] !== printFn || $[15] !== printOnly || $[16] !== printOptions?.printFn) {
12460
+ t16 = async (iframe) => {
12461
+ const doc = iframe.contentDocument;
12462
+ const win = iframe.contentWindow;
12463
+ if (doc && win) {
12464
+ for (const el of doc.querySelectorAll(`.${printOnly}`)) el.classList.remove(printOnly);
12465
+ await new Promise((res) => win.requestAnimationFrame(res));
12466
+ }
12467
+ const customPrintFn = printOptions?.printFn ?? printFn;
12468
+ if (customPrintFn) return customPrintFn(iframe);
12469
+ win?.print();
12470
+ };
12471
+ $[14] = printFn;
12472
+ $[15] = printOnly;
12473
+ $[16] = printOptions?.printFn;
12474
+ $[17] = t16;
12475
+ } else t16 = $[17];
12476
+ let t17;
12477
+ if ($[18] !== onAfterPrint) {
12478
+ t17 = () => {
12372
12479
  let event;
12373
12480
  withCleanup(() => onAfterPrint?.(event = new Event("ostack-ui.afterPrint")), () => {
12374
- resolvePrintRef.current();
12481
+ resolvePrintRef.current?.();
12375
12482
  finishPrint(!event?.defaultPrevented);
12376
12483
  });
12377
12484
  };
12378
- $[11] = onAfterPrint;
12379
- $[12] = t14;
12380
- } else t14 = $[12];
12381
- let t15;
12382
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
12383
- t15 = (_errorLocation, error) => {
12384
- rejectPrintRef.current(error);
12485
+ $[18] = onAfterPrint;
12486
+ $[19] = t17;
12487
+ } else t17 = $[19];
12488
+ let t18;
12489
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
12490
+ t18 = (_errorLocation, error) => {
12491
+ rejectPrintRef.current?.(error);
12385
12492
  finishPrint();
12386
12493
  };
12387
- $[13] = t15;
12388
- } else t15 = $[13];
12389
- let t16;
12390
- if ($[14] !== t10 || $[15] !== t11 || $[16] !== t12 || $[17] !== t13 || $[18] !== t14 || $[19] !== t3 || $[20] !== t4 || $[21] !== t8 || $[22] !== t9) {
12391
- t16 = {
12392
- bodyClass: t3,
12393
- documentTitle: t4,
12394
- pageStyle: t8,
12395
- fonts: t9,
12396
- copyShadowRoots: t10,
12397
- nonce: t11,
12398
- printIframeProps: t12,
12494
+ $[20] = t18;
12495
+ } else t18 = $[20];
12496
+ let t19;
12497
+ if ($[21] !== t11 || $[22] !== t12 || $[23] !== t13 || $[24] !== t14 || $[25] !== t15 || $[26] !== t16 || $[27] !== t17 || $[28] !== t6 || $[29] !== t7) {
12498
+ t19 = {
12499
+ bodyClass: t6,
12500
+ documentTitle: t7,
12501
+ pageStyle: t11,
12502
+ fonts: t12,
12503
+ copyShadowRoots: t13,
12504
+ nonce: t14,
12505
+ printIframeProps: t15,
12399
12506
  suppressErrors: DEV,
12400
- print: t13,
12401
- onAfterPrint: t14,
12402
- onPrintError: t15
12403
- };
12404
- $[14] = t10;
12405
- $[15] = t11;
12406
- $[16] = t12;
12407
- $[17] = t13;
12408
- $[18] = t14;
12409
- $[19] = t3;
12410
- $[20] = t4;
12411
- $[21] = t8;
12412
- $[22] = t9;
12413
- $[23] = t16;
12414
- } else t16 = $[23];
12415
- const reactToPrintFn = useReactToPrint(t16);
12416
- let t17;
12417
- if ($[24] !== onBeforePrint || $[25] !== printInProgress || $[26] !== reactToPrintFn) {
12418
- t17 = {
12507
+ print: t16,
12508
+ onAfterPrint: t17,
12509
+ onPrintError: t18
12510
+ };
12511
+ $[21] = t11;
12512
+ $[22] = t12;
12513
+ $[23] = t13;
12514
+ $[24] = t14;
12515
+ $[25] = t15;
12516
+ $[26] = t16;
12517
+ $[27] = t17;
12518
+ $[28] = t6;
12519
+ $[29] = t7;
12520
+ $[30] = t19;
12521
+ } else t19 = $[30];
12522
+ const reactToPrintFn = useReactToPrint(t19);
12523
+ let t20;
12524
+ if ($[31] !== onBeforePrint || $[32] !== printInProgress || $[33] !== reactToPrintFn) {
12525
+ t20 = {
12419
12526
  printInProgress,
12420
12527
  reactToPrintFn,
12421
12528
  onBeforePrint
12422
12529
  };
12423
- $[24] = onBeforePrint;
12424
- $[25] = printInProgress;
12425
- $[26] = reactToPrintFn;
12426
- $[27] = t17;
12427
- } else t17 = $[27];
12428
- const latestRef = useLatestRef(t17);
12429
- let t18;
12430
- if ($[28] !== latestRef) {
12431
- t18 = async (options) => {
12530
+ $[31] = onBeforePrint;
12531
+ $[32] = printInProgress;
12532
+ $[33] = reactToPrintFn;
12533
+ $[34] = t20;
12534
+ } else t20 = $[34];
12535
+ const latestRef = useLatestRef(t20);
12536
+ let t21;
12537
+ if ($[35] !== latestRef) {
12538
+ t21 = async (options) => {
12432
12539
  const { printInProgress: printInProgress_0, onBeforePrint: onBeforePrint_0 } = latestRef.current;
12433
12540
  if (printInProgress_0) throw new Error("Printing is already in progress.");
12434
12541
  flushSync(() => {
12435
12542
  setPrintInProgress(true);
12436
12543
  setPrintOptions(options);
12437
12544
  });
12438
- await pendingPromiseRef.current;
12439
- if (onBeforePrint_0) {
12440
- const event_0 = new Event("ostack-ui.print");
12441
- await onBeforePrint_0?.(event_0);
12442
- if (event_0.defaultPrevented) return finishPrint();
12545
+ try {
12546
+ await waitForPrintingTasks();
12547
+ if (onBeforePrint_0) {
12548
+ const event_0 = new Event("ostack-ui.print");
12549
+ await onBeforePrint_0(event_0);
12550
+ if (event_0.defaultPrevented) return finishPrint();
12551
+ }
12552
+ } catch (t22) {
12553
+ const error_0 = t22;
12554
+ finishPrint();
12555
+ throw error_0;
12443
12556
  }
12444
- return new Promise((res, rej) => {
12445
- latestRef.current.reactToPrintFn(() => contentRef.current);
12446
- resolvePrintRef.current = res;
12557
+ return new Promise((res_0, rej) => {
12558
+ resolvePrintRef.current = res_0;
12447
12559
  rejectPrintRef.current = rej;
12560
+ latestRef.current.reactToPrintFn(() => contentRef.current);
12448
12561
  });
12449
12562
  };
12450
- $[28] = latestRef;
12451
- $[29] = t18;
12452
- } else t18 = $[29];
12453
- const handlePrint = t18;
12454
- let t19;
12455
- if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
12456
- t19 = () => {
12457
- let t20 = pendingTasksRef.current;
12458
- const t21 = t20++;
12459
- pendingTasksRef.current = t20;
12460
- if (t21 === 0) pendingPromiseRef.current = new Promise((res_0) => resolvePendingRef.current = res_0);
12461
- };
12462
- $[30] = t19;
12463
- } else t19 = $[30];
12464
- const startPrintingTask = t19;
12465
- let t20;
12466
- if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
12467
- t20 = () => {
12468
- let t21 = finishedTasksRef.current;
12469
- const t22 = ++t21;
12470
- finishedTasksRef.current = t21;
12471
- if (t22 >= pendingTasksRef.current) queueMicrotask(() => {
12472
- if (finishedTasksRef.current >= pendingTasksRef.current) resolvePendingRef.current?.();
12473
- });
12474
- };
12475
- $[31] = t20;
12476
- } else t20 = $[31];
12477
- const finishPrintingTask = t20;
12478
- let t21;
12479
- if ($[32] !== documentTitle || $[33] !== handlePrint || $[34] !== preview || $[35] !== printInForeground || $[36] !== printInProgress) {
12480
- t21 = {
12563
+ $[35] = latestRef;
12564
+ $[36] = t21;
12565
+ } else t21 = $[36];
12566
+ const handlePrint = t21;
12567
+ let t22;
12568
+ if ($[37] !== documentTitle || $[38] !== handlePrint || $[39] !== preview || $[40] !== printInForeground || $[41] !== printInProgress) {
12569
+ t22 = {
12481
12570
  preview,
12482
12571
  printInForeground,
12483
12572
  documentTitle,
@@ -12485,27 +12574,29 @@ function Printer(t0) {
12485
12574
  triggerRef,
12486
12575
  contentRef,
12487
12576
  print: handlePrint,
12488
- startPrintingTask,
12489
- finishPrintingTask
12490
- };
12491
- $[32] = documentTitle;
12492
- $[33] = handlePrint;
12493
- $[34] = preview;
12494
- $[35] = printInForeground;
12495
- $[36] = printInProgress;
12496
- $[37] = t21;
12497
- } else t21 = $[37];
12498
- let t22;
12499
- if ($[38] !== children || $[39] !== t21) {
12500
- t22 = /* @__PURE__ */ jsx(PrinterContext, {
12501
- value: t21,
12577
+ startPrintingTask
12578
+ };
12579
+ $[37] = documentTitle;
12580
+ $[38] = handlePrint;
12581
+ $[39] = preview;
12582
+ $[40] = printInForeground;
12583
+ $[41] = printInProgress;
12584
+ $[42] = t22;
12585
+ } else t22 = $[42];
12586
+ let t23;
12587
+ if ($[43] !== children || $[44] !== t22) {
12588
+ t23 = /* @__PURE__ */ jsx(PrinterContext, {
12589
+ value: t22,
12502
12590
  children
12503
12591
  });
12504
- $[38] = children;
12505
- $[39] = t21;
12506
- $[40] = t22;
12507
- } else t22 = $[40];
12508
- return t22;
12592
+ $[43] = children;
12593
+ $[44] = t22;
12594
+ $[45] = t23;
12595
+ } else t23 = $[45];
12596
+ return t23;
12597
+ }
12598
+ function _temp$41(resolve) {
12599
+ return resolve();
12509
12600
  }
12510
12601
  /** Print page style to use. */
12511
12602
  function printPageStyle({ pageSize, pageMargin, printColorAdjust }) {
@@ -12521,34 +12612,6 @@ function printPageStyle({ pageSize, pageMargin, printColorAdjust }) {
12521
12612
  if (pageMargin != null) pageStyle += `@page { margin: ${pageMargin} }`;
12522
12613
  return pageStyle;
12523
12614
  }
12524
- // src/components/Printer/usePrintClassNames.ts
12525
- function usePrintClassNames() {
12526
- const $ = c(7);
12527
- const prefix = usePrefix();
12528
- let t0;
12529
- if ($[0] !== prefix) {
12530
- t0 = prefix("print-only");
12531
- $[0] = prefix;
12532
- $[1] = t0;
12533
- } else t0 = $[1];
12534
- let t1;
12535
- if ($[2] !== prefix) {
12536
- t1 = prefix("print-hidden");
12537
- $[2] = prefix;
12538
- $[3] = t1;
12539
- } else t1 = $[3];
12540
- let t2;
12541
- if ($[4] !== t0 || $[5] !== t1) {
12542
- t2 = {
12543
- printOnly: t0,
12544
- printHidden: t1
12545
- };
12546
- $[4] = t0;
12547
- $[5] = t1;
12548
- $[6] = t2;
12549
- } else t2 = $[6];
12550
- return t2;
12551
- }
12552
12615
  // src/components/Printer/PrinterContent.tsx
12553
12616
  /**
12554
12617
  * Content to be printed.
@@ -12557,7 +12620,7 @@ function usePrintClassNames() {
12557
12620
  * **only** exists during printing.
12558
12621
  */
12559
12622
  function PrinterContent(t0) {
12560
- const $ = c(30);
12623
+ const $ = c(29);
12561
12624
  let children;
12562
12625
  let className;
12563
12626
  let otherProps;
@@ -12582,58 +12645,55 @@ function PrinterContent(t0) {
12582
12645
  ref = $[6];
12583
12646
  }
12584
12647
  const { printOnly: printOnlyClassName } = usePrintClassNames();
12585
- const { preview, printInForeground, printInProgress, contentRef, startPrintingTask, finishPrintingTask } = usePrinterContext();
12648
+ const { preview, printInForeground, printInProgress, contentRef, startPrintingTask } = usePrinterContext();
12586
12649
  const printing = preview || printInProgress;
12587
12650
  const t1 = printing ? startPrintingTask : void 0;
12588
- const t2 = printing ? finishPrintingTask : void 0;
12589
- let t3;
12590
- if ($[7] !== printing || $[8] !== t1 || $[9] !== t2) {
12591
- t3 = {
12651
+ let t2;
12652
+ if ($[7] !== printing || $[8] !== t1) {
12653
+ t2 = {
12592
12654
  printing,
12593
- startPrintingTask: t1,
12594
- finishPrintingTask: t2
12655
+ startPrintingTask: t1
12595
12656
  };
12596
12657
  $[7] = printing;
12597
12658
  $[8] = t1;
12598
12659
  $[9] = t2;
12599
- $[10] = t3;
12600
- } else t3 = $[10];
12601
- const contentContext = t3;
12660
+ } else t2 = $[9];
12661
+ const contentContext = t2;
12602
12662
  const foregroundPrint = preview || printInForeground;
12603
- const t4 = !foregroundPrint && printOnlyClassName;
12604
- let t5;
12605
- if ($[11] !== className || $[12] !== t4) {
12606
- t5 = cx(t4, className);
12607
- $[11] = className;
12663
+ const t3 = !foregroundPrint && printOnlyClassName;
12664
+ let t4;
12665
+ if ($[10] !== className || $[11] !== t3) {
12666
+ t4 = cx(t3, className);
12667
+ $[10] = className;
12668
+ $[11] = t3;
12608
12669
  $[12] = t4;
12609
- $[13] = t5;
12610
- } else t5 = $[13];
12611
- let t6;
12612
- if ($[14] !== contentRef || $[15] !== ref) {
12613
- t6 = [contentRef, ref];
12614
- $[14] = contentRef;
12615
- $[15] = ref;
12616
- $[16] = t6;
12617
- } else t6 = $[16];
12618
- const t7 = useCombinedRef(t6);
12619
- let t8;
12620
- if ($[17] !== children || $[18] !== otherProps || $[19] !== t5 || $[20] !== t7) {
12621
- t8 = /* @__PURE__ */ jsx(Box, {
12622
- className: t5,
12623
- ref: t7,
12670
+ } else t4 = $[12];
12671
+ let t5;
12672
+ if ($[13] !== contentRef || $[14] !== ref) {
12673
+ t5 = [contentRef, ref];
12674
+ $[13] = contentRef;
12675
+ $[14] = ref;
12676
+ $[15] = t5;
12677
+ } else t5 = $[15];
12678
+ const t6 = useCombinedRef(t5);
12679
+ let t7;
12680
+ if ($[16] !== children || $[17] !== otherProps || $[18] !== t4 || $[19] !== t6) {
12681
+ t7 = /* @__PURE__ */ jsx(Box, {
12682
+ className: t4,
12683
+ ref: t6,
12624
12684
  ...otherProps,
12625
12685
  children
12626
12686
  });
12627
- $[17] = children;
12628
- $[18] = otherProps;
12629
- $[19] = t5;
12687
+ $[16] = children;
12688
+ $[17] = otherProps;
12689
+ $[18] = t4;
12690
+ $[19] = t6;
12630
12691
  $[20] = t7;
12631
- $[21] = t8;
12632
- } else t8 = $[21];
12633
- const content = t8;
12634
- let t9;
12635
- if ($[22] !== children || $[23] !== content || $[24] !== contentContext || $[25] !== foregroundPrint || $[26] !== portalContainer || $[27] !== printInProgress || $[28] !== printOnly) {
12636
- t9 = foregroundPrint ? /* @__PURE__ */ jsx(PrinterContentContext, {
12692
+ } else t7 = $[20];
12693
+ const content = t7;
12694
+ let t8;
12695
+ if ($[21] !== children || $[22] !== content || $[23] !== contentContext || $[24] !== foregroundPrint || $[25] !== portalContainer || $[26] !== printInProgress || $[27] !== printOnly) {
12696
+ t8 = foregroundPrint ? /* @__PURE__ */ jsx(PrinterContentContext, {
12637
12697
  value: contentContext,
12638
12698
  children: content
12639
12699
  }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [!printOnly && /* @__PURE__ */ jsx(PrinterContentContext, {
@@ -12647,16 +12707,16 @@ function PrinterContent(t0) {
12647
12707
  children: content
12648
12708
  })
12649
12709
  })] });
12650
- $[22] = children;
12651
- $[23] = content;
12652
- $[24] = contentContext;
12653
- $[25] = foregroundPrint;
12654
- $[26] = portalContainer;
12655
- $[27] = printInProgress;
12656
- $[28] = printOnly;
12657
- $[29] = t9;
12658
- } else t9 = $[29];
12659
- return t9;
12710
+ $[21] = children;
12711
+ $[22] = content;
12712
+ $[23] = contentContext;
12713
+ $[24] = foregroundPrint;
12714
+ $[25] = portalContainer;
12715
+ $[26] = printInProgress;
12716
+ $[27] = printOnly;
12717
+ $[28] = t8;
12718
+ } else t8 = $[28];
12719
+ return t8;
12660
12720
  }
12661
12721
  // src/components/Printer/PrinterTrigger.tsx
12662
12722
  /**
@@ -13110,9 +13170,9 @@ function _temp$40(state) {
13110
13170
  }
13111
13171
  /** Hook exposing the label's id. */
13112
13172
  function useLabelId() {
13113
- return useLabelStore(_temp2$25);
13173
+ return useLabelStore(_temp2$24);
13114
13174
  }
13115
- function _temp2$25(state) {
13175
+ function _temp2$24(state) {
13116
13176
  return state.labelId;
13117
13177
  }
13118
13178
  /** Hook which runs the provided callback whenever the label's label changes. */
@@ -13273,7 +13333,7 @@ var DEFAULT_TABLE_COLUMN_WIDTH = 150;
13273
13333
  * ```
13274
13334
  */
13275
13335
  function Table(t0) {
13276
- const $ = c(128);
13336
+ const $ = c(127);
13277
13337
  let ariaDescribedBy;
13278
13338
  let ariaLabel;
13279
13339
  let ariaLabelledBy;
@@ -13517,68 +13577,65 @@ function Table(t0) {
13517
13577
  $[67] = variant;
13518
13578
  $[68] = t24;
13519
13579
  } else t24 = $[68];
13520
- const t25 = maxHeight != null || scrollableProps?.style?.maxHeight != null ? void 0 : "hidden";
13521
- const t26 = scrollableProps?.style;
13522
- let t27;
13523
- if ($[69] !== maxHeight || $[70] !== t25 || $[71] !== t26) {
13524
- t27 = {
13580
+ const t25 = scrollableProps?.style;
13581
+ let t26;
13582
+ if ($[69] !== maxHeight || $[70] !== t25) {
13583
+ t26 = {
13525
13584
  maxHeight,
13526
- overflowY: t25,
13527
- ...t26
13585
+ ...t25
13528
13586
  };
13529
13587
  $[69] = maxHeight;
13530
13588
  $[70] = t25;
13531
13589
  $[71] = t26;
13590
+ } else t26 = $[71];
13591
+ const t27 = scrollableProps?.ref;
13592
+ let t28;
13593
+ if ($[72] !== t27) {
13594
+ t28 = [setScrollableEl, t27];
13532
13595
  $[72] = t27;
13533
- } else t27 = $[72];
13534
- const t28 = scrollableProps?.ref;
13535
- let t29;
13536
- if ($[73] !== t28) {
13537
- t29 = [setScrollableEl, t28];
13538
13596
  $[73] = t28;
13539
- $[74] = t29;
13540
- } else t29 = $[74];
13541
- const t30 = useCombinedRef(t29);
13597
+ } else t28 = $[73];
13598
+ const t29 = useCombinedRef(t28);
13599
+ let t30;
13600
+ if ($[74] !== className || $[75] !== layout || $[76] !== prefix || $[77] !== variant) {
13601
+ t30 = cx(prefix("table"), prefix(`table--${variant}`), layout === "fixed" && prefix("table--fixed"), className);
13602
+ $[74] = className;
13603
+ $[75] = layout;
13604
+ $[76] = prefix;
13605
+ $[77] = variant;
13606
+ $[78] = t30;
13607
+ } else t30 = $[78];
13542
13608
  let t31;
13543
- if ($[75] !== className || $[76] !== layout || $[77] !== prefix || $[78] !== variant) {
13544
- t31 = cx(prefix("table"), prefix(`table--${variant}`), layout === "fixed" && prefix("table--fixed"), className);
13545
- $[75] = className;
13546
- $[76] = layout;
13547
- $[77] = prefix;
13548
- $[78] = variant;
13549
- $[79] = t31;
13550
- } else t31 = $[79];
13609
+ if ($[79] !== ariaLabel || $[80] !== ariaLabelledBy || $[81] !== codeId || $[82] !== visuallyHiddenCaptionId) {
13610
+ t31 = ariaLabelledBy ?? (ariaLabel === void 0 && codeId ? combineAriaIds([codeId, visuallyHiddenCaptionId]) : void 0);
13611
+ $[79] = ariaLabel;
13612
+ $[80] = ariaLabelledBy;
13613
+ $[81] = codeId;
13614
+ $[82] = visuallyHiddenCaptionId;
13615
+ $[83] = t31;
13616
+ } else t31 = $[83];
13551
13617
  let t32;
13552
- if ($[80] !== ariaLabel || $[81] !== ariaLabelledBy || $[82] !== codeId || $[83] !== visuallyHiddenCaptionId) {
13553
- t32 = ariaLabelledBy ?? (ariaLabel === void 0 && codeId ? combineAriaIds([codeId, visuallyHiddenCaptionId]) : void 0);
13554
- $[80] = ariaLabel;
13555
- $[81] = ariaLabelledBy;
13556
- $[82] = codeId;
13557
- $[83] = visuallyHiddenCaptionId;
13558
- $[84] = t32;
13559
- } else t32 = $[84];
13560
- let t33;
13561
- if ($[85] !== ariaDescribedBy || $[86] !== feedbackIds || $[87] !== helperTextIds) {
13562
- t33 = combineAriaIds([
13618
+ if ($[84] !== ariaDescribedBy || $[85] !== feedbackIds || $[86] !== helperTextIds) {
13619
+ t32 = combineAriaIds([
13563
13620
  feedbackIds,
13564
13621
  ariaDescribedBy,
13565
13622
  helperTextIds
13566
13623
  ]);
13567
- $[85] = ariaDescribedBy;
13568
- $[86] = feedbackIds;
13569
- $[87] = helperTextIds;
13570
- $[88] = t33;
13571
- } else t33 = $[88];
13572
- let t34;
13573
- if ($[89] !== ref) {
13574
- t34 = [tableRef, ref];
13575
- $[89] = ref;
13576
- $[90] = t34;
13577
- } else t34 = $[90];
13578
- const t35 = useCombinedRef(t34);
13579
- let t36;
13580
- if ($[91] !== visuallyHiddenCaption || $[92] !== visuallyHiddenCaptionId || $[93] !== visuallyHiddenCaptionProps) {
13581
- t36 = visuallyHiddenCaptionId && /* @__PURE__ */ jsx(VisuallyHidden, {
13624
+ $[84] = ariaDescribedBy;
13625
+ $[85] = feedbackIds;
13626
+ $[86] = helperTextIds;
13627
+ $[87] = t32;
13628
+ } else t32 = $[87];
13629
+ let t33;
13630
+ if ($[88] !== ref) {
13631
+ t33 = [tableRef, ref];
13632
+ $[88] = ref;
13633
+ $[89] = t33;
13634
+ } else t33 = $[89];
13635
+ const t34 = useCombinedRef(t33);
13636
+ let t35;
13637
+ if ($[90] !== visuallyHiddenCaption || $[91] !== visuallyHiddenCaptionId || $[92] !== visuallyHiddenCaptionProps) {
13638
+ t35 = visuallyHiddenCaptionId && /* @__PURE__ */ jsx(VisuallyHidden, {
13582
13639
  asChild: true,
13583
13640
  children: /* @__PURE__ */ jsx("caption", {
13584
13641
  ...visuallyHiddenCaptionProps,
@@ -13586,106 +13643,106 @@ function Table(t0) {
13586
13643
  children: visuallyHiddenCaption
13587
13644
  })
13588
13645
  });
13589
- $[91] = visuallyHiddenCaption;
13590
- $[92] = visuallyHiddenCaptionId;
13591
- $[93] = visuallyHiddenCaptionProps;
13592
- $[94] = t36;
13593
- } else t36 = $[94];
13646
+ $[90] = visuallyHiddenCaption;
13647
+ $[91] = visuallyHiddenCaptionId;
13648
+ $[92] = visuallyHiddenCaptionProps;
13649
+ $[93] = t35;
13650
+ } else t35 = $[93];
13651
+ let t36;
13652
+ if ($[94] !== defaultColumnWidth) {
13653
+ t36 = /* @__PURE__ */ jsx(ColumnWidths, { defaultColumnWidth });
13654
+ $[94] = defaultColumnWidth;
13655
+ $[95] = t36;
13656
+ } else t36 = $[95];
13594
13657
  let t37;
13595
- if ($[95] !== defaultColumnWidth) {
13596
- t37 = /* @__PURE__ */ jsx(ColumnWidths, { defaultColumnWidth });
13597
- $[95] = defaultColumnWidth;
13598
- $[96] = t37;
13599
- } else t37 = $[96];
13600
- let t38;
13601
- if ($[97] !== ariaLabel || $[98] !== children || $[99] !== nonMarginProps || $[100] !== status || $[101] !== t31 || $[102] !== t32 || $[103] !== t33 || $[104] !== t35 || $[105] !== t36 || $[106] !== t37) {
13602
- t38 = /* @__PURE__ */ jsxs("table", {
13603
- className: t31,
13658
+ if ($[96] !== ariaLabel || $[97] !== children || $[98] !== nonMarginProps || $[99] !== status || $[100] !== t30 || $[101] !== t31 || $[102] !== t32 || $[103] !== t34 || $[104] !== t35 || $[105] !== t36) {
13659
+ t37 = /* @__PURE__ */ jsxs("table", {
13660
+ className: t30,
13604
13661
  "data-status": status,
13605
13662
  "aria-label": ariaLabel,
13606
- "aria-labelledby": t32,
13607
- "aria-describedby": t33,
13663
+ "aria-labelledby": t31,
13664
+ "aria-describedby": t32,
13608
13665
  ...nonMarginProps,
13609
- ref: t35,
13666
+ ref: t34,
13610
13667
  children: [
13668
+ t35,
13611
13669
  t36,
13612
- t37,
13613
13670
  children
13614
13671
  ]
13615
13672
  });
13616
- $[97] = ariaLabel;
13617
- $[98] = children;
13618
- $[99] = nonMarginProps;
13619
- $[100] = status;
13673
+ $[96] = ariaLabel;
13674
+ $[97] = children;
13675
+ $[98] = nonMarginProps;
13676
+ $[99] = status;
13677
+ $[100] = t30;
13620
13678
  $[101] = t31;
13621
13679
  $[102] = t32;
13622
- $[103] = t33;
13680
+ $[103] = t34;
13623
13681
  $[104] = t35;
13624
13682
  $[105] = t36;
13625
13683
  $[106] = t37;
13626
- $[107] = t38;
13627
- } else t38 = $[107];
13628
- let t39;
13629
- if ($[108] !== controlId || $[109] !== scrollableProps || $[110] !== status || $[111] !== t23 || $[112] !== t24 || $[113] !== t27 || $[114] !== t30 || $[115] !== t38) {
13630
- t39 = /* @__PURE__ */ jsx("div", {
13684
+ } else t37 = $[106];
13685
+ let t38;
13686
+ if ($[107] !== controlId || $[108] !== scrollableProps || $[109] !== status || $[110] !== t23 || $[111] !== t24 || $[112] !== t26 || $[113] !== t29 || $[114] !== t37) {
13687
+ t38 = /* @__PURE__ */ jsx("div", {
13631
13688
  "data-status": status,
13632
13689
  "data-accent": t23,
13633
13690
  tabIndex: 0,
13634
13691
  ...scrollableProps,
13635
13692
  id: controlId,
13636
13693
  className: t24,
13637
- style: t27,
13638
- ref: t30,
13639
- children: t38
13640
- });
13641
- $[108] = controlId;
13642
- $[109] = scrollableProps;
13643
- $[110] = status;
13644
- $[111] = t23;
13645
- $[112] = t24;
13646
- $[113] = t27;
13647
- $[114] = t30;
13694
+ style: t26,
13695
+ ref: t29,
13696
+ children: t37
13697
+ });
13698
+ $[107] = controlId;
13699
+ $[108] = scrollableProps;
13700
+ $[109] = status;
13701
+ $[110] = t23;
13702
+ $[111] = t24;
13703
+ $[112] = t26;
13704
+ $[113] = t29;
13705
+ $[114] = t37;
13648
13706
  $[115] = t38;
13649
- $[116] = t39;
13650
- } else t39 = $[116];
13651
- const t40 = captionSide === "bottom" && captionEl;
13652
- let t41;
13653
- if ($[117] !== containerProps || $[118] !== marginProps.dataAttrs || $[119] !== t19 || $[120] !== t21 || $[121] !== t22 || $[122] !== t39 || $[123] !== t40) {
13654
- t41 = /* @__PURE__ */ jsxs("div", {
13707
+ } else t38 = $[115];
13708
+ const t39 = captionSide === "bottom" && captionEl;
13709
+ let t40;
13710
+ if ($[116] !== containerProps || $[117] !== marginProps.dataAttrs || $[118] !== t19 || $[119] !== t21 || $[120] !== t22 || $[121] !== t38 || $[122] !== t39) {
13711
+ t40 = /* @__PURE__ */ jsxs("div", {
13655
13712
  ...t18,
13656
13713
  ...containerProps,
13657
13714
  className: t19,
13658
13715
  style: t21,
13659
13716
  children: [
13660
13717
  t22,
13661
- t39,
13662
- t40
13718
+ t38,
13719
+ t39
13663
13720
  ]
13664
13721
  });
13665
- $[117] = containerProps;
13666
- $[118] = marginProps.dataAttrs;
13667
- $[119] = t19;
13668
- $[120] = t21;
13669
- $[121] = t22;
13722
+ $[116] = containerProps;
13723
+ $[117] = marginProps.dataAttrs;
13724
+ $[118] = t19;
13725
+ $[119] = t21;
13726
+ $[120] = t22;
13727
+ $[121] = t38;
13670
13728
  $[122] = t39;
13671
13729
  $[123] = t40;
13672
- $[124] = t41;
13673
- } else t41 = $[124];
13674
- let t42;
13675
- if ($[125] !== t41 || $[126] !== tableContextValue) {
13676
- t42 = /* @__PURE__ */ jsx(ClearContexts, { children: /* @__PURE__ */ jsx(TableContext, {
13730
+ } else t40 = $[123];
13731
+ let t41;
13732
+ if ($[124] !== t40 || $[125] !== tableContextValue) {
13733
+ t41 = /* @__PURE__ */ jsx(ClearContexts, { children: /* @__PURE__ */ jsx(TableContext, {
13677
13734
  value: tableContextValue,
13678
- children: t41
13735
+ children: t40
13679
13736
  }) });
13680
- $[125] = t41;
13681
- $[126] = tableContextValue;
13682
- $[127] = t42;
13683
- } else t42 = $[127];
13684
- return t42;
13737
+ $[124] = t40;
13738
+ $[125] = tableContextValue;
13739
+ $[126] = t41;
13740
+ } else t41 = $[126];
13741
+ return t41;
13685
13742
  }
13686
13743
  /** Table column widths. */
13687
13744
  function ColumnWidths(t0) {
13688
- const $ = c(4);
13745
+ const $ = c(5);
13689
13746
  const { defaultColumnWidth } = t0;
13690
13747
  const { store } = useTableContext();
13691
13748
  let t1;
@@ -13695,16 +13752,18 @@ function ColumnWidths(t0) {
13695
13752
  $[1] = t1;
13696
13753
  } else t1 = $[1];
13697
13754
  const widths = useStore(store, useShallow(t1));
13755
+ const keys = useStore(store, useShallow(_temp$39));
13698
13756
  let t2;
13699
- if ($[2] !== widths) {
13700
- t2 = widths && /* @__PURE__ */ jsx("colgroup", { children: widths.map(_temp$39) });
13701
- $[2] = widths;
13702
- $[3] = t2;
13703
- } else t2 = $[3];
13757
+ if ($[2] !== keys || $[3] !== widths) {
13758
+ t2 = widths && keys && /* @__PURE__ */ jsx("colgroup", { children: widths.map((width, i) => /* @__PURE__ */ jsx("col", { style: width != null ? { width } : void 0 }, keys[i])) });
13759
+ $[2] = keys;
13760
+ $[3] = widths;
13761
+ $[4] = t2;
13762
+ } else t2 = $[4];
13704
13763
  return t2;
13705
13764
  }
13706
- function _temp$39(width, i) {
13707
- return /* @__PURE__ */ jsx("col", { style: width != null ? { width } : void 0 }, i);
13765
+ function _temp$39(state_0) {
13766
+ return state_0.leafColumns && state_0.columnKeys && colKeys(state_0.leafColumns, state_0.columnKeys);
13708
13767
  }
13709
13768
  // src/components/Table/TableBody.tsx
13710
13769
  /** Table body component. */
@@ -14111,7 +14170,7 @@ function TableRow(t0) {
14111
14170
  // src/components/Table/TableHead.tsx
14112
14171
  /** Table head component. */
14113
14172
  function TableHead(t0) {
14114
- const $ = c(40);
14173
+ const $ = c(42);
14115
14174
  let children;
14116
14175
  let className;
14117
14176
  let columnsProp;
@@ -14164,49 +14223,61 @@ function TableHead(t0) {
14164
14223
  const rows = Array.from({ length: nRows }, (_, i) => columnsOfRow(columns, i));
14165
14224
  const { printHidden } = usePrintClassNames();
14166
14225
  const generatedId = useId();
14226
+ let keys;
14167
14227
  let leaves;
14168
14228
  let t3;
14169
14229
  if ($[12] !== columns) {
14170
14230
  leaves = leafColumns$1(columns);
14171
- t3 = new Map(leaves.map(_temp2$24));
14231
+ keys = columnKeys(columns);
14232
+ t3 = new Map(leaves.map(_temp2$23));
14172
14233
  $[12] = columns;
14173
- $[13] = leaves;
14174
- $[14] = t3;
14234
+ $[13] = keys;
14235
+ $[14] = leaves;
14236
+ $[15] = t3;
14175
14237
  } else {
14176
- leaves = $[13];
14177
- t3 = $[14];
14238
+ keys = $[13];
14239
+ leaves = $[14];
14240
+ t3 = $[15];
14178
14241
  }
14179
14242
  const leafIndices = t3;
14180
14243
  let t4;
14181
14244
  let t5;
14182
- if ($[15] !== leaves || $[16] !== store) {
14183
- t4 = () => store.setState({ leafColumns: leaves });
14184
- t5 = [leaves, store];
14185
- $[15] = leaves;
14186
- $[16] = store;
14187
- $[17] = t4;
14188
- $[18] = t5;
14245
+ if ($[16] !== keys || $[17] !== leaves || $[18] !== store) {
14246
+ t4 = () => store.setState({
14247
+ leafColumns: leaves,
14248
+ columnKeys: keys
14249
+ });
14250
+ t5 = [
14251
+ keys,
14252
+ leaves,
14253
+ store
14254
+ ];
14255
+ $[16] = keys;
14256
+ $[17] = leaves;
14257
+ $[18] = store;
14258
+ $[19] = t4;
14259
+ $[20] = t5;
14189
14260
  } else {
14190
- t4 = $[17];
14191
- t5 = $[18];
14261
+ t4 = $[19];
14262
+ t5 = $[20];
14192
14263
  }
14193
14264
  useEffect(t4, t5);
14194
14265
  const tableHeadRef = useRef(null);
14195
14266
  let t6;
14196
14267
  let t7;
14197
- if ($[19] !== sticky || $[20] !== store) {
14268
+ if ($[21] !== sticky || $[22] !== store) {
14198
14269
  t6 = () => store.subscribe((t8) => {
14199
14270
  const { scrollPosition } = t8;
14200
14271
  return sticky && scrollPosition != null && scrollPosition.top > 0;
14201
14272
  }, (isStuck) => setBoolDataAttr(tableHeadRef.current, "stuck", isStuck), { fireImmediately: true });
14202
14273
  t7 = [sticky, store];
14203
- $[19] = sticky;
14204
- $[20] = store;
14205
- $[21] = t6;
14206
- $[22] = t7;
14274
+ $[21] = sticky;
14275
+ $[22] = store;
14276
+ $[23] = t6;
14277
+ $[24] = t7;
14207
14278
  } else {
14208
- t6 = $[21];
14209
- t7 = $[22];
14279
+ t6 = $[23];
14280
+ t7 = $[24];
14210
14281
  }
14211
14282
  useEffect(t6, t7);
14212
14283
  const leftMost = leftMostColumns(columns);
@@ -14214,28 +14285,28 @@ function TableHead(t0) {
14214
14285
  const T0 = TableHeadContext;
14215
14286
  const t8 = true;
14216
14287
  let t9;
14217
- if ($[23] !== className || $[24] !== prefix) {
14288
+ if ($[25] !== className || $[26] !== prefix) {
14218
14289
  t9 = cx(prefix("table__head"), className);
14219
- $[23] = className;
14220
- $[24] = prefix;
14221
- $[25] = t9;
14222
- } else t9 = $[25];
14290
+ $[25] = className;
14291
+ $[26] = prefix;
14292
+ $[27] = t9;
14293
+ } else t9 = $[27];
14223
14294
  let t10;
14224
- if ($[26] !== sticky) {
14295
+ if ($[28] !== sticky) {
14225
14296
  t10 = boolDataAttr(sticky);
14226
- $[26] = sticky;
14227
- $[27] = t10;
14228
- } else t10 = $[27];
14297
+ $[28] = sticky;
14298
+ $[29] = t10;
14299
+ } else t10 = $[29];
14229
14300
  let t11;
14230
- if ($[28] !== ref) {
14301
+ if ($[30] !== ref) {
14231
14302
  t11 = [tableHeadRef, ref];
14232
- $[28] = ref;
14233
- $[29] = t11;
14234
- } else t11 = $[29];
14303
+ $[30] = ref;
14304
+ $[31] = t11;
14305
+ } else t11 = $[31];
14235
14306
  const t12 = useCombinedRef(t11);
14236
14307
  const t15 = rows.map((row, i_1) => /* @__PURE__ */ jsx(TableRow, {
14237
14308
  ...typeof rowProps === "function" ? rowProps(i_1) : rowProps,
14238
- children: row.map((column, j) => {
14309
+ children: row.map((column) => {
14239
14310
  const { subColumns: t13, label: label_0, helperText, helperButtonLabel: helperButtonLabelProp, width, fixed: _fixed, header: _header, align, sticky: sticky_0, sortable, defaultSortDirection: t14, sorted, onSort, containerProps, labelProps, sortButtonProps, sortIconContainerProps, sortAscIconProps, sortDescIconProps, helperButtonProps, helperPopoverProps, helperPopoverContentProps, style, ...otherColumnProps } = column;
14240
14311
  const subColumns = t13 === void 0 ? [] : t13;
14241
14312
  const defaultSortDirection = t14 === void 0 ? "asc" : t14;
@@ -14335,11 +14406,11 @@ function TableHead(t0) {
14335
14406
  helperTextEl
14336
14407
  ]
14337
14408
  })
14338
- }, j);
14409
+ }, keys.get(column));
14339
14410
  })
14340
14411
  }, i_1));
14341
14412
  let t16;
14342
- if ($[30] !== children || $[31] !== otherProps || $[32] !== t10 || $[33] !== t12 || $[34] !== t15 || $[35] !== t9) {
14413
+ if ($[32] !== children || $[33] !== otherProps || $[34] !== t10 || $[35] !== t12 || $[36] !== t15 || $[37] !== t9) {
14343
14414
  t16 = /* @__PURE__ */ jsxs("thead", {
14344
14415
  className: t9,
14345
14416
  "data-sticky": t10,
@@ -14347,30 +14418,30 @@ function TableHead(t0) {
14347
14418
  ref: t12,
14348
14419
  children: [t15, children]
14349
14420
  });
14350
- $[30] = children;
14351
- $[31] = otherProps;
14352
- $[32] = t10;
14353
- $[33] = t12;
14354
- $[34] = t15;
14355
- $[35] = t9;
14356
- $[36] = t16;
14357
- } else t16 = $[36];
14421
+ $[32] = children;
14422
+ $[33] = otherProps;
14423
+ $[34] = t10;
14424
+ $[35] = t12;
14425
+ $[36] = t15;
14426
+ $[37] = t9;
14427
+ $[38] = t16;
14428
+ } else t16 = $[38];
14358
14429
  let t17;
14359
- if ($[37] !== T0 || $[38] !== t16) {
14430
+ if ($[39] !== T0 || $[40] !== t16) {
14360
14431
  t17 = /* @__PURE__ */ jsx(T0, {
14361
14432
  value: t8,
14362
14433
  children: t16
14363
14434
  });
14364
- $[37] = T0;
14365
- $[38] = t16;
14366
- $[39] = t17;
14367
- } else t17 = $[39];
14435
+ $[39] = T0;
14436
+ $[40] = t16;
14437
+ $[41] = t17;
14438
+ } else t17 = $[41];
14368
14439
  return t17;
14369
14440
  }
14370
14441
  function _temp3$13(sum, width_0) {
14371
14442
  return sum + width_0;
14372
14443
  }
14373
- function _temp2$24(l, i_0) {
14444
+ function _temp2$23(l, i_0) {
14374
14445
  return [l, i_0];
14375
14446
  }
14376
14447
  function _temp$38(t0) {
@@ -14953,7 +15024,7 @@ function DataTable(t0) {
14953
15024
  groupType: DataTableColumnGroup,
14954
15025
  groupProp: "subColumns",
14955
15026
  allowNestedGroups: true,
14956
- transformChildObject: _temp2$23
15027
+ transformChildObject: _temp2$22
14957
15028
  });
14958
15029
  $[45] = children;
14959
15030
  $[46] = t13;
@@ -15172,7 +15243,7 @@ function DataTable(t0) {
15172
15243
  } else t20 = $[129];
15173
15244
  return t20;
15174
15245
  }
15175
- function _temp2$23(t0) {
15246
+ function _temp2$22(t0) {
15176
15247
  const { children: children_0, render, ...otherProps_0 } = t0;
15177
15248
  return {
15178
15249
  render: render ?? children_0,
@@ -15258,9 +15329,9 @@ function useScrollbarSize() {
15258
15329
  $[0] = t0;
15259
15330
  } else t0 = $[0];
15260
15331
  useEffect(_temp$36, t0);
15261
- return useScrollbarSizeStore(_temp2$22);
15332
+ return useScrollbarSizeStore(_temp2$21);
15262
15333
  }
15263
- function _temp2$22(state) {
15334
+ function _temp2$21(state) {
15264
15335
  return state.measurements;
15265
15336
  }
15266
15337
  function _temp$36() {
@@ -15906,7 +15977,7 @@ function useCreateFormContext(t0) {
15906
15977
  $[5] = t4;
15907
15978
  } else t4 = $[5];
15908
15979
  const store = useConstant(t4);
15909
- const actions_0 = useStore(store, _temp2$21);
15980
+ const actions_0 = useStore(store, _temp2$20);
15910
15981
  let t5;
15911
15982
  if ($[6] !== actions_0) {
15912
15983
  t5 = () => buildFormApi(actions_0);
@@ -15949,7 +16020,7 @@ function useCreateFormContext(t0) {
15949
16020
  } else t8 = $[17];
15950
16021
  return t8;
15951
16022
  }
15952
- function _temp2$21(t0) {
16023
+ function _temp2$20(t0) {
15953
16024
  const { actions } = t0;
15954
16025
  return actions;
15955
16026
  }
@@ -16006,9 +16077,9 @@ function useFormValue(name) {
16006
16077
  /** Hook which returns `true` when the form is currently being submitted. */
16007
16078
  function useFormSubmitting() {
16008
16079
  const { store } = useFormContext();
16009
- return useStore(store, _temp4$5);
16080
+ return useStore(store, _temp4$6);
16010
16081
  }
16011
- function _temp4$5(t0) {
16082
+ function _temp4$6(t0) {
16012
16083
  const { submitting } = t0;
16013
16084
  return submitting;
16014
16085
  }
@@ -16939,15 +17010,15 @@ function useDataTableSelectionColumn() {
16939
17010
  const actualSelectAllRowsLabel = selectAllRowsLabel ?? locale.DataTable.selectAllRowsLabel;
16940
17011
  const actualSelectRowLabel = selectRowLabel ?? locale.DataTable.selectRowLabel;
16941
17012
  const selectionMode = useStore(store, _temp$32);
16942
- const [selectedRows] = useStore(store, _temp2$20);
17013
+ const wrappedSelectedRows = useStore(store, _temp2$19);
16943
17014
  const disabledSelections = useStore(store, _temp3$11);
16944
- const { selectRows, unselectRows } = useStore(store, _temp4$4);
17015
+ const { selectRows, unselectRows } = useStore(store, _temp4$5);
16945
17016
  let t0;
16946
17017
  if ($[0] !== disabledSelections || $[1] !== rowKey || $[2] !== showSelectionColumn) {
16947
17018
  t0 = (state_3) => {
16948
17019
  if (state_3.loading || !showSelectionColumn) return "loading";
16949
17020
  const { selectionMode: selectionMode_0, selectedRows: t1 } = state_3;
16950
- const [selectedRows_0] = t1;
17021
+ const [selectedRows] = t1;
16951
17022
  const visibleRows = state_3.visibleRows();
16952
17023
  let selectedCount = 0;
16953
17024
  let disabledCount = 0;
@@ -16955,7 +17026,7 @@ function useDataTableSelectionColumn() {
16955
17026
  for (const row of visibleRows) {
16956
17027
  if (row === void 0) return "loading";
16957
17028
  const key = getRowKey(row, rowKey);
16958
- const isSelected = selectedRows_0.has(key) === (selectionMode_0 === "additive");
17029
+ const isSelected = selectedRows.has(key) === (selectionMode_0 === "additive");
16959
17030
  const isDisabled = disabledSelections?.has(key) ?? false;
16960
17031
  selectedCount = selectedCount + +isSelected;
16961
17032
  disabledCount = disabledCount + +isDisabled;
@@ -17006,12 +17077,13 @@ function useDataTableSelectionColumn() {
17006
17077
  $[15] = t2;
17007
17078
  } else t2 = $[15];
17008
17079
  let t3;
17009
- if ($[16] !== actualSelectRowLabel || $[17] !== disabledSelections || $[18] !== prefix || $[19] !== rowKey || $[20] !== selectRows || $[21] !== selectedRows || $[22] !== selectionMode || $[23] !== unselectRows) {
17080
+ if ($[16] !== actualSelectRowLabel || $[17] !== disabledSelections || $[18] !== prefix || $[19] !== rowKey || $[20] !== selectRows || $[21] !== selectionMode || $[22] !== unselectRows || $[23] !== wrappedSelectedRows) {
17010
17081
  t3 = (t4) => {
17011
17082
  const { row: row_1 } = t4;
17012
17083
  const key_0 = getRowKey(row_1, rowKey);
17084
+ const [selectedRows_0] = wrappedSelectedRows;
17013
17085
  return /* @__PURE__ */ jsx(Checkbox, {
17014
- checked: selectedRows.has(key_0) === (selectionMode === "additive"),
17086
+ checked: selectedRows_0.has(key_0) === (selectionMode === "additive"),
17015
17087
  onCheckedChange: (checked) => {
17016
17088
  if (checked) selectRows([key_0]);
17017
17089
  else unselectRows([key_0]);
@@ -17026,9 +17098,9 @@ function useDataTableSelectionColumn() {
17026
17098
  $[18] = prefix;
17027
17099
  $[19] = rowKey;
17028
17100
  $[20] = selectRows;
17029
- $[21] = selectedRows;
17030
- $[22] = selectionMode;
17031
- $[23] = unselectRows;
17101
+ $[21] = selectionMode;
17102
+ $[22] = unselectRows;
17103
+ $[23] = wrappedSelectedRows;
17032
17104
  $[24] = t3;
17033
17105
  } else t3 = $[24];
17034
17106
  let t4;
@@ -17052,13 +17124,13 @@ function useDataTableSelectionColumn() {
17052
17124
  return t4;
17053
17125
  }
17054
17126
  }
17055
- function _temp4$4(state_2) {
17127
+ function _temp4$5(state_2) {
17056
17128
  return state_2.actions;
17057
17129
  }
17058
17130
  function _temp3$11(state_1) {
17059
17131
  return state_1.disabledSelections;
17060
17132
  }
17061
- function _temp2$20(state_0) {
17133
+ function _temp2$19(state_0) {
17062
17134
  return state_0.selectedRows;
17063
17135
  }
17064
17136
  function _temp$32(state) {
@@ -17114,7 +17186,7 @@ function DataTableRow(t0) {
17114
17186
  } else t1 = $[7];
17115
17187
  const leafColumns = useStore(store, useShallow(t1));
17116
17188
  const headCount = useStore(store, _temp$31);
17117
- const filter = useStore(store, _temp2$19);
17189
+ const filter = useStore(store, _temp2$18);
17118
17190
  let t2;
17119
17191
  if ($[8] !== row || $[9] !== rowKey) {
17120
17192
  t2 = (state_2) => row && state_2.selectedRows[0].has(getRowKey(row, rowKey));
@@ -17145,7 +17217,7 @@ function DataTableRow(t0) {
17145
17217
  if ($[28] !== filter || $[29] !== generatedId || $[30] !== index || $[31] !== locale || $[32] !== prefix || $[33] !== printing || $[34] !== renderCell || $[35] !== row || $[36] !== rowHeight) {
17146
17218
  t7 = (cells, t8, i) => {
17147
17219
  const [columnId, t9] = t8;
17148
- const { filterable, locale: columnLocale, subColumns: _subColumns, getValue, format, render, compare: _compare, match, footer: _footer, label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t10, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps, footerProps: _footerProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t9;
17220
+ const { filterable, locale: columnLocale, subColumns: _subColumns, getValue, format, render, compare: _compare, match, sortOptions: _sortOptions, footer: _footer, label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t10, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps, footerProps: _footerProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t9;
17149
17221
  if (printing && !(t10 === void 0 ? true : t10)) return cells;
17150
17222
  const loadingRow = row === void 0;
17151
17223
  const value = !loadingRow && (getValue ? getValue({
@@ -17232,7 +17304,7 @@ function DataTableRow(t0) {
17232
17304
  } else t7 = $[43];
17233
17305
  return t7;
17234
17306
  }
17235
- function _temp2$19(state_1) {
17307
+ function _temp2$18(state_1) {
17236
17308
  return state_1.filter;
17237
17309
  }
17238
17310
  function _temp$31(state_0) {
@@ -17246,7 +17318,7 @@ function DataTableEmptyOrLoadingRows(t0) {
17246
17318
  const prefix = usePrefix();
17247
17319
  const { renderRow, store, apiRef } = useDataTableContext();
17248
17320
  const loading = useStore(store, _temp$30);
17249
- const loadingCount = useStore(store, _temp2$18);
17321
+ const loadingCount = useStore(store, _temp2$17);
17250
17322
  const numberOfColumns = useTableNumberOfColumns() ?? 1;
17251
17323
  const headCount = useStore(store, _temp3$10);
17252
17324
  let t1;
@@ -17292,18 +17364,18 @@ function DataTableEmptyOrLoadingRows(t0) {
17292
17364
  }
17293
17365
  function _temp7() {
17294
17366
  return {
17295
- splice: _temp4$3,
17367
+ splice: _temp4$4,
17296
17368
  refresh: _temp5$3,
17297
17369
  goTo: _temp6$1
17298
17370
  };
17299
17371
  }
17300
17372
  function _temp6$1() {}
17301
17373
  function _temp5$3() {}
17302
- function _temp4$3() {}
17374
+ function _temp4$4() {}
17303
17375
  function _temp3$10(state_1) {
17304
17376
  return state_1.headCount;
17305
17377
  }
17306
- function _temp2$18(state_0) {
17378
+ function _temp2$17(state_0) {
17307
17379
  return state_0.loadingCount;
17308
17380
  }
17309
17381
  function _temp$30(state) {
@@ -17519,7 +17591,7 @@ function ScrolledDataTableRows(t0) {
17519
17591
  let t7;
17520
17592
  let t8;
17521
17593
  if ($[19] !== store || $[20] !== update || $[21] !== virtualizer_1) {
17522
- t7 = () => store.subscribe(_temp2$17, () => update(virtualizer_1.getVirtualItems()));
17594
+ t7 = () => store.subscribe(_temp2$16, () => update(virtualizer_1.getVirtualItems()));
17523
17595
  t8 = [
17524
17596
  store,
17525
17597
  update,
@@ -17740,7 +17812,7 @@ function _temp3$9(t0) {
17740
17812
  const { offset: offset_0 } = t0;
17741
17813
  return offset_0();
17742
17814
  }
17743
- function _temp2$17(t0) {
17815
+ function _temp2$16(t0) {
17744
17816
  const { updateCounter } = t0;
17745
17817
  return updateCounter;
17746
17818
  }
@@ -17808,25 +17880,13 @@ function _temp$27(state) {
17808
17880
  // src/utils/useMeasure.ts
17809
17881
  /** Hook that tracks the dimensions of an HTML element using the Resize Observer API. */
17810
17882
  function useMeasure(element, setMeasurement) {
17811
- const $ = c(4);
17883
+ const $ = c(7);
17812
17884
  let t0;
17813
17885
  let t1;
17814
17886
  if ($[0] !== element || $[1] !== setMeasurement) {
17815
17887
  t0 = () => {
17816
- if (!element) {
17817
- setMeasurement(void 0);
17818
- return;
17819
- }
17820
- setMeasurement(element.getBoundingClientRect());
17821
- const observer = new ResizeObserver((t2) => {
17822
- const [entry] = t2;
17823
- return entry && setMeasurement(element.getBoundingClientRect());
17824
- });
17825
- observer.observe(element);
17826
- return () => {
17827
- observer.disconnect();
17828
- setMeasurement(void 0);
17829
- };
17888
+ setMeasurement(element?.getBoundingClientRect());
17889
+ return () => setMeasurement(void 0);
17830
17890
  };
17831
17891
  t1 = [element, setMeasurement];
17832
17892
  $[0] = element;
@@ -17838,6 +17898,16 @@ function useMeasure(element, setMeasurement) {
17838
17898
  t1 = $[3];
17839
17899
  }
17840
17900
  useSafeLayoutEffect(t0, t1);
17901
+ let t2;
17902
+ if ($[4] !== element || $[5] !== setMeasurement) {
17903
+ t2 = () => {
17904
+ if (element) setMeasurement(element.getBoundingClientRect());
17905
+ };
17906
+ $[4] = element;
17907
+ $[5] = setMeasurement;
17908
+ $[6] = t2;
17909
+ } else t2 = $[6];
17910
+ useResizeObserver(element, t2);
17841
17911
  }
17842
17912
  // src/components/DataTable/DataTableFoot.tsx
17843
17913
  /** Foot of the data table. */
@@ -17904,7 +17974,7 @@ function DataTableFoot(t0) {
17904
17974
  $[13] = t4;
17905
17975
  } else t4 = $[13];
17906
17976
  const footRowIndex = useStore(store, t4);
17907
- const rows = useStore(store, _temp2$16);
17977
+ const rows = useStore(store, _temp2$15);
17908
17978
  let t5;
17909
17979
  if ($[14] !== ref) {
17910
17980
  t5 = [setTableFootEl, ref];
@@ -17921,9 +17991,10 @@ function DataTableFoot(t0) {
17921
17991
  "aria-rowindex": footRowIndex,
17922
17992
  children: Object.entries(leafColumns_0).reduce((cells, t7) => {
17923
17993
  const [columnId, t8] = t7;
17924
- const { filterable: _filterable, locale: _locale, subColumns: _subColumns, getValue: _getValue, format: _format, render: _render, compare: _compare, footer, label: _label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t9, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps: _labelProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t8;
17994
+ const { filterable: _filterable, locale: _locale, subColumns: _subColumns, getValue: _getValue, format: _format, render: _render, compare: _compare, match: _match, sortOptions: _sortOptions, footer, footerProps, label: _label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t9, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps: _labelProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t8;
17925
17995
  if (!printing || (t9 === void 0 ? true : t9)) cells.push(/* @__PURE__ */ jsx(TableCell, {
17926
17996
  ...otherProps_0,
17997
+ ...footerProps,
17927
17998
  children: typeof footer === "function" ? footer({ rows }) : footer
17928
17999
  }, columnId));
17929
18000
  return cells;
@@ -17943,7 +18014,7 @@ function DataTableFoot(t0) {
17943
18014
  } else t6 = $[25];
17944
18015
  return t6;
17945
18016
  }
17946
- function _temp2$16(t0) {
18017
+ function _temp2$15(t0) {
17947
18018
  const { processedRows } = t0;
17948
18019
  return processedRows();
17949
18020
  }
@@ -17985,7 +18056,7 @@ function DataTableHead(t0) {
17985
18056
  } else t1 = $[6];
17986
18057
  const columns = useStore(store, useShallow(t1));
17987
18058
  const sortBy = useStore(store, _temp$25);
17988
- const sortDirection = useStore(store, _temp2$15);
18059
+ const sortDirection = useStore(store, _temp2$14);
17989
18060
  const { setSort } = useStore(store, _temp3$8);
17990
18061
  const [tableHeadEl, setTableHeadEl] = useState(null);
17991
18062
  let t2;
@@ -18054,7 +18125,7 @@ function DataTableHead(t0) {
18054
18125
  function _temp3$8(state_2) {
18055
18126
  return state_2.actions;
18056
18127
  }
18057
- function _temp2$15(state_1) {
18128
+ function _temp2$14(state_1) {
18058
18129
  return state_1.sortDirection;
18059
18130
  }
18060
18131
  function _temp$25(state_0) {
@@ -18062,7 +18133,7 @@ function _temp$25(state_0) {
18062
18133
  }
18063
18134
  function dataTableToTableColumns(columns, printing, generatedId, sortingProps) {
18064
18135
  return columns && Object.entries(columns).reduce((columns, [columnId, column]) => {
18065
- const { sortable, subColumns, cellId, showWhilePrinting = true, labelProps, filterable: _filterable, paddingless: _paddingless, getValue: _getValue, format: _format, render: _render, compare: _compare, footer: _footer, footerProps: _footerProps, ...otherColumn } = column;
18136
+ const { sortable, subColumns, cellId, showWhilePrinting = true, labelProps, filterable: _filterable, locale: _locale, getValue: _getValue, format: _format, render: _render, compare: _compare, match: _match, sortOptions: _sortOptions, footer: _footer, footerProps: _footerProps, ...otherColumn } = column;
18066
18137
  if (printing && !showWhilePrinting) return columns;
18067
18138
  const actualLabelProps = {
18068
18139
  id: labelProps?.id ?? `data-table-column-label-${columnId}-${generatedId}`,
@@ -18087,7 +18158,7 @@ function dataTableToTableColumns(columns, printing, generatedId, sortingProps) {
18087
18158
  // src/components/DataTable/DataTableContent.tsx
18088
18159
  /** Component containing the "main content" of the data table, i.e. the table itself. */
18089
18160
  function DataTableContent(t0) {
18090
- const $ = c(62);
18161
+ const $ = c(69);
18091
18162
  let className;
18092
18163
  let containerProps;
18093
18164
  let emptyMessageProp;
@@ -18134,158 +18205,179 @@ function DataTableContent(t0) {
18134
18205
  const [locale] = useLocale();
18135
18206
  const emptyMessage = emptyMessageProp ?? locale.DataTableContent.emptyMessage;
18136
18207
  const { displayMode, required, estimatedRowHeight, store } = useDataTableContext();
18137
- const tableRef = useRef(null);
18208
+ const [tableEl, setTableEl] = useState(null);
18138
18209
  const [scrollableEl, setScrollableEl] = useState(null);
18139
18210
  const { height: scrollbarHeight } = useScrollbarSize();
18211
+ const [overflowsX, setOverflowsX] = useState(false);
18140
18212
  let t2;
18141
- if ($[13] !== estimatedRowHeight) {
18142
- t2 = typeof estimatedRowHeight === "number" ? estimatedRowHeight : estimatedRowHeight(0);
18143
- $[13] = estimatedRowHeight;
18144
- $[14] = t2;
18145
- } else t2 = $[14];
18146
- const rowHeight = t2;
18213
+ if ($[13] !== scrollableEl || $[14] !== tableEl) {
18214
+ t2 = [scrollableEl, tableEl];
18215
+ $[13] = scrollableEl;
18216
+ $[14] = tableEl;
18217
+ $[15] = t2;
18218
+ } else t2 = $[15];
18147
18219
  let t3;
18148
- if ($[15] !== displayMode || $[16] !== rowHeight || $[17] !== scrollbarHeight) {
18149
- t3 = (state) => displayMode === "scrolled" && !state.loading && (state.totalCount() ?? 0) > state.limit() ? (state.tableHeadHeight ?? rowHeight) + (state.tableFootHeight ?? 0) + rowHeight * state.limit() + scrollbarHeight : void 0;
18150
- $[15] = displayMode;
18151
- $[16] = rowHeight;
18152
- $[17] = scrollbarHeight;
18153
- $[18] = t3;
18154
- } else t3 = $[18];
18155
- const maxHeight = useStore(store, t3);
18156
- const stickyHeadFoot = maxHeight !== void 0;
18220
+ if ($[16] !== scrollableEl) {
18221
+ t3 = () => {
18222
+ if (scrollableEl) setOverflowsX(scrollableEl.scrollWidth > scrollableEl.clientWidth);
18223
+ };
18224
+ $[16] = scrollableEl;
18225
+ $[17] = t3;
18226
+ } else t3 = $[17];
18227
+ useResizeObserver(t2, t3);
18157
18228
  let t4;
18229
+ if ($[18] !== estimatedRowHeight) {
18230
+ t4 = typeof estimatedRowHeight === "number" ? estimatedRowHeight : estimatedRowHeight(0);
18231
+ $[18] = estimatedRowHeight;
18232
+ $[19] = t4;
18233
+ } else t4 = $[19];
18234
+ const rowHeight = t4;
18158
18235
  let t5;
18159
- if ($[19] !== store) {
18160
- t4 = () => store.subscribe(_temp$24, (totalCount) => {
18161
- tableRef.current.ariaRowCount = totalCount.toString();
18162
- }, { fireImmediately: true });
18163
- t5 = [store];
18164
- $[19] = store;
18165
- $[20] = t4;
18166
- $[21] = t5;
18167
- } else {
18168
- t4 = $[20];
18169
- t5 = $[21];
18170
- }
18171
- useEffect(t4, t5);
18236
+ if ($[20] !== displayMode || $[21] !== overflowsX || $[22] !== rowHeight || $[23] !== scrollbarHeight) {
18237
+ t5 = (state) => displayMode === "scrolled" && !state.loading && (state.totalCount() ?? 0) > state.limit() ? (state.tableHeadHeight ?? rowHeight) + (state.tableFootHeight ?? 0) + rowHeight * state.limit() + (overflowsX ? scrollbarHeight : 0) : void 0;
18238
+ $[20] = displayMode;
18239
+ $[21] = overflowsX;
18240
+ $[22] = rowHeight;
18241
+ $[23] = scrollbarHeight;
18242
+ $[24] = t5;
18243
+ } else t5 = $[24];
18244
+ const maxHeight = useStore(store, t5);
18245
+ const stickyHeadFoot = maxHeight !== void 0;
18172
18246
  let t6;
18173
- if ($[22] !== className || $[23] !== prefix) {
18174
- t6 = cx(prefix("data-table__content"), className);
18175
- $[22] = className;
18176
- $[23] = prefix;
18177
- $[24] = t6;
18178
- } else t6 = $[24];
18179
18247
  let t7;
18180
- if ($[25] !== containerProps?.className || $[26] !== prefix) {
18181
- t7 = cx(prefix("data-table__content-container"), containerProps?.className);
18182
- $[25] = containerProps?.className;
18183
- $[26] = prefix;
18184
- $[27] = t7;
18185
- } else t7 = $[27];
18248
+ if ($[25] !== store || $[26] !== tableEl) {
18249
+ t6 = () => {
18250
+ if (tableEl) return store.subscribe(_temp$24, (totalCount) => {
18251
+ tableEl.ariaRowCount = totalCount.toString();
18252
+ }, { fireImmediately: true });
18253
+ };
18254
+ t7 = [store, tableEl];
18255
+ $[25] = store;
18256
+ $[26] = tableEl;
18257
+ $[27] = t6;
18258
+ $[28] = t7;
18259
+ } else {
18260
+ t6 = $[27];
18261
+ t7 = $[28];
18262
+ }
18263
+ useEffect(t6, t7);
18186
18264
  let t8;
18187
- if ($[28] !== containerProps || $[29] !== t7) {
18188
- t8 = {
18265
+ if ($[29] !== className || $[30] !== prefix) {
18266
+ t8 = cx(prefix("data-table__content"), className);
18267
+ $[29] = className;
18268
+ $[30] = prefix;
18269
+ $[31] = t8;
18270
+ } else t8 = $[31];
18271
+ let t9;
18272
+ if ($[32] !== containerProps?.className || $[33] !== prefix) {
18273
+ t9 = cx(prefix("data-table__content-container"), containerProps?.className);
18274
+ $[32] = containerProps?.className;
18275
+ $[33] = prefix;
18276
+ $[34] = t9;
18277
+ } else t9 = $[34];
18278
+ let t10;
18279
+ if ($[35] !== containerProps || $[36] !== t9) {
18280
+ t10 = {
18189
18281
  ...containerProps,
18190
- className: t7
18282
+ className: t9
18191
18283
  };
18192
- $[28] = containerProps;
18193
- $[29] = t7;
18194
- $[30] = t8;
18195
- } else t8 = $[30];
18196
- const t9 = scrollableProps?.ref;
18197
- let t10;
18198
- if ($[31] !== t9) {
18199
- t10 = [setScrollableEl, t9];
18200
- $[31] = t9;
18201
- $[32] = t10;
18202
- } else t10 = $[32];
18203
- const t11 = useCombinedRef(t10);
18284
+ $[35] = containerProps;
18285
+ $[36] = t9;
18286
+ $[37] = t10;
18287
+ } else t10 = $[37];
18288
+ const t11 = scrollableProps?.ref;
18204
18289
  let t12;
18205
- if ($[33] !== scrollableProps || $[34] !== t11) {
18206
- t12 = {
18290
+ if ($[38] !== t11) {
18291
+ t12 = [setScrollableEl, t11];
18292
+ $[38] = t11;
18293
+ $[39] = t12;
18294
+ } else t12 = $[39];
18295
+ const t13 = useCombinedRef(t12);
18296
+ let t14;
18297
+ if ($[40] !== scrollableProps || $[41] !== t13) {
18298
+ t14 = {
18207
18299
  ...scrollableProps,
18208
- ref: t11
18300
+ ref: t13
18209
18301
  };
18210
- $[33] = scrollableProps;
18211
- $[34] = t11;
18212
- $[35] = t12;
18213
- } else t12 = $[35];
18214
- let t13;
18215
- if ($[36] !== ref) {
18216
- t13 = [tableRef, ref];
18217
- $[36] = ref;
18218
- $[37] = t13;
18219
- } else t13 = $[37];
18220
- const t14 = useCombinedRef(t13);
18302
+ $[40] = scrollableProps;
18303
+ $[41] = t13;
18304
+ $[42] = t14;
18305
+ } else t14 = $[42];
18221
18306
  let t15;
18222
- if ($[38] !== stickyHeadFoot || $[39] !== tableHeadProps) {
18223
- t15 = /* @__PURE__ */ jsx(DataTableHead, {
18307
+ if ($[43] !== ref) {
18308
+ t15 = [setTableEl, ref];
18309
+ $[43] = ref;
18310
+ $[44] = t15;
18311
+ } else t15 = $[44];
18312
+ const t16 = useCombinedRef(t15);
18313
+ let t17;
18314
+ if ($[45] !== stickyHeadFoot || $[46] !== tableHeadProps) {
18315
+ t17 = /* @__PURE__ */ jsx(DataTableHead, {
18224
18316
  sticky: stickyHeadFoot,
18225
18317
  ...tableHeadProps
18226
18318
  });
18227
- $[38] = stickyHeadFoot;
18228
- $[39] = tableHeadProps;
18229
- $[40] = t15;
18230
- } else t15 = $[40];
18231
- let t16;
18232
- if ($[41] !== emptyMessage || $[42] !== emptyMessageProps || $[43] !== scrollableEl || $[44] !== tableBodyProps) {
18233
- t16 = /* @__PURE__ */ jsx(DataTableBody, {
18319
+ $[45] = stickyHeadFoot;
18320
+ $[46] = tableHeadProps;
18321
+ $[47] = t17;
18322
+ } else t17 = $[47];
18323
+ let t18;
18324
+ if ($[48] !== emptyMessage || $[49] !== emptyMessageProps || $[50] !== scrollableEl || $[51] !== tableBodyProps) {
18325
+ t18 = /* @__PURE__ */ jsx(DataTableBody, {
18234
18326
  scrollableEl,
18235
18327
  emptyMessage,
18236
18328
  emptyMessageProps,
18237
18329
  ...tableBodyProps
18238
18330
  });
18239
- $[41] = emptyMessage;
18240
- $[42] = emptyMessageProps;
18241
- $[43] = scrollableEl;
18242
- $[44] = tableBodyProps;
18243
- $[45] = t16;
18244
- } else t16 = $[45];
18245
- let t17;
18246
- if ($[46] !== showTableFootWhenEmpty || $[47] !== stickyHeadFoot || $[48] !== tableFootContent || $[49] !== tableFootProps) {
18247
- t17 = /* @__PURE__ */ jsx(DataTableFoot, {
18331
+ $[48] = emptyMessage;
18332
+ $[49] = emptyMessageProps;
18333
+ $[50] = scrollableEl;
18334
+ $[51] = tableBodyProps;
18335
+ $[52] = t18;
18336
+ } else t18 = $[52];
18337
+ let t19;
18338
+ if ($[53] !== showTableFootWhenEmpty || $[54] !== stickyHeadFoot || $[55] !== tableFootContent || $[56] !== tableFootProps) {
18339
+ t19 = /* @__PURE__ */ jsx(DataTableFoot, {
18248
18340
  sticky: stickyHeadFoot,
18249
18341
  showWhenEmpty: showTableFootWhenEmpty,
18250
18342
  footContent: tableFootContent,
18251
18343
  ...tableFootProps
18252
18344
  });
18253
- $[46] = showTableFootWhenEmpty;
18254
- $[47] = stickyHeadFoot;
18255
- $[48] = tableFootContent;
18256
- $[49] = tableFootProps;
18257
- $[50] = t17;
18258
- } else t17 = $[50];
18259
- let t18;
18260
- if ($[51] !== maxHeight || $[52] !== otherProps || $[53] !== required || $[54] !== t12 || $[55] !== t14 || $[56] !== t15 || $[57] !== t16 || $[58] !== t17 || $[59] !== t6 || $[60] !== t8) {
18261
- t18 = /* @__PURE__ */ jsxs(Table, {
18262
- className: t6,
18345
+ $[53] = showTableFootWhenEmpty;
18346
+ $[54] = stickyHeadFoot;
18347
+ $[55] = tableFootContent;
18348
+ $[56] = tableFootProps;
18349
+ $[57] = t19;
18350
+ } else t19 = $[57];
18351
+ let t20;
18352
+ if ($[58] !== maxHeight || $[59] !== otherProps || $[60] !== required || $[61] !== t10 || $[62] !== t14 || $[63] !== t16 || $[64] !== t17 || $[65] !== t18 || $[66] !== t19 || $[67] !== t8) {
18353
+ t20 = /* @__PURE__ */ jsxs(Table, {
18354
+ className: t8,
18263
18355
  required,
18264
18356
  maxHeight,
18265
- containerProps: t8,
18266
- scrollableProps: t12,
18357
+ containerProps: t10,
18358
+ scrollableProps: t14,
18267
18359
  ...otherProps,
18268
18360
  layout: "fixed",
18269
- ref: t14,
18361
+ ref: t16,
18270
18362
  children: [
18271
- t15,
18272
- t16,
18273
- t17
18363
+ t17,
18364
+ t18,
18365
+ t19
18274
18366
  ]
18275
18367
  });
18276
- $[51] = maxHeight;
18277
- $[52] = otherProps;
18278
- $[53] = required;
18279
- $[54] = t12;
18280
- $[55] = t14;
18281
- $[56] = t15;
18282
- $[57] = t16;
18283
- $[58] = t17;
18284
- $[59] = t6;
18285
- $[60] = t8;
18286
- $[61] = t18;
18287
- } else t18 = $[61];
18288
- return t18;
18368
+ $[58] = maxHeight;
18369
+ $[59] = otherProps;
18370
+ $[60] = required;
18371
+ $[61] = t10;
18372
+ $[62] = t14;
18373
+ $[63] = t16;
18374
+ $[64] = t17;
18375
+ $[65] = t18;
18376
+ $[66] = t19;
18377
+ $[67] = t8;
18378
+ $[68] = t20;
18379
+ } else t20 = $[68];
18380
+ return t20;
18289
18381
  }
18290
18382
  function _temp$24(state_0) {
18291
18383
  return state_0.headCount + state_0.bodyCount() + state_0.footCount();
@@ -18968,9 +19060,9 @@ function PagedDataTablePagination(t0) {
18968
19060
  const prefix = usePrefix();
18969
19061
  const { store } = useDataTableContext();
18970
19062
  const loading = useStore(store, _temp$22);
18971
- const totalCount = useStore(store, _temp2$14);
19063
+ const totalCount = useStore(store, _temp2$13);
18972
19064
  const limit = useStore(store, _temp3$7);
18973
- const currentPage = useStore(store, _temp4$2);
19065
+ const currentPage = useStore(store, _temp4$3);
18974
19066
  const { setOffset } = useStore(store, _temp5$2);
18975
19067
  let t1;
18976
19068
  if ($[4] !== className || $[5] !== prefix) {
@@ -19020,13 +19112,13 @@ function PagedDataTablePagination(t0) {
19020
19112
  function _temp5$2(state_3) {
19021
19113
  return state_3.actions;
19022
19114
  }
19023
- function _temp4$2(state_2) {
19115
+ function _temp4$3(state_2) {
19024
19116
  return state_2.currentPage();
19025
19117
  }
19026
19118
  function _temp3$7(state_1) {
19027
19119
  return state_1.limit();
19028
19120
  }
19029
- function _temp2$14(state_0) {
19121
+ function _temp2$13(state_0) {
19030
19122
  return state_0.totalCount();
19031
19123
  }
19032
19124
  function _temp$22(state) {
@@ -19056,7 +19148,7 @@ function ScrolledDataTablePagination(t0) {
19056
19148
  const prefix = usePrefix();
19057
19149
  const { store } = useDataTableContext();
19058
19150
  const totalCount = useStore(store, _temp$21);
19059
- const scrolledRangeStart = useStore(store, _temp2$13);
19151
+ const scrolledRangeStart = useStore(store, _temp2$12);
19060
19152
  const scrolledRangeEnd = useStore(store, _temp3$6);
19061
19153
  let t1;
19062
19154
  if ($[5] !== className || $[6] !== prefix) {
@@ -19107,7 +19199,7 @@ function ScrolledDataTablePagination(t0) {
19107
19199
  function _temp3$6(state_1) {
19108
19200
  return state_1.scrolledRangeEnd;
19109
19201
  }
19110
- function _temp2$13(state_0) {
19202
+ function _temp2$12(state_0) {
19111
19203
  return state_0.scrolledRangeStart;
19112
19204
  }
19113
19205
  function _temp$21(state) {
@@ -19299,10 +19391,10 @@ function DataTableRowsPerPage(t0) {
19299
19391
  }
19300
19392
  const { store } = useDataTableContext();
19301
19393
  const limit = useStore(store, _temp$20);
19302
- const { setLimit } = useStore(store, _temp2$12);
19394
+ const { setLimit } = useStore(store, _temp2$11);
19303
19395
  let t3;
19304
19396
  if ($[10] !== limitOptions) {
19305
- t3 = limitOptions === DEFAULT_LIMIT_OPTIONS ? limitOptions : Array.from(new Set(limitOptions.map(Math.trunc))).sort(_temp3$5).filter(_temp4$1);
19397
+ t3 = limitOptions === DEFAULT_LIMIT_OPTIONS ? limitOptions : Array.from(new Set(limitOptions.map(Math.trunc))).sort(_temp3$5).filter(_temp4$2);
19306
19398
  $[10] = limitOptions;
19307
19399
  $[11] = t3;
19308
19400
  } else t3 = $[11];
@@ -19438,13 +19530,13 @@ function _temp5$1(option) {
19438
19530
  children: option
19439
19531
  }, option);
19440
19532
  }
19441
- function _temp4$1(limit_0) {
19533
+ function _temp4$2(limit_0) {
19442
19534
  return limit_0 >= 1;
19443
19535
  }
19444
19536
  function _temp3$5(a, b) {
19445
19537
  return a - b;
19446
19538
  }
19447
- function _temp2$12(state_0) {
19539
+ function _temp2$11(state_0) {
19448
19540
  return state_0.actions;
19449
19541
  }
19450
19542
  function _temp$20(state) {
@@ -22311,7 +22403,7 @@ var SelectContext = createContext(null);
22311
22403
  function useCreateSelectContext(t0) {
22312
22404
  const $ = c(11);
22313
22405
  const { multiple, value, onOptionSelect, status, maxSelected, disabled, readOnly, valueTagCloseButtonLabel, valueTagProps } = t0;
22314
- const store = useConstant(_temp2$11);
22406
+ const store = useConstant(_temp2$10);
22315
22407
  let t1;
22316
22408
  if ($[0] !== disabled || $[1] !== maxSelected || $[2] !== multiple || $[3] !== onOptionSelect || $[4] !== readOnly || $[5] !== status || $[6] !== store || $[7] !== value || $[8] !== valueTagCloseButtonLabel || $[9] !== valueTagProps) {
22317
22409
  t1 = {
@@ -22340,7 +22432,7 @@ function useCreateSelectContext(t0) {
22340
22432
  } else t1 = $[10];
22341
22433
  return t1;
22342
22434
  }
22343
- function _temp2$11() {
22435
+ function _temp2$10() {
22344
22436
  return createStore()(subscribeWithSelector(_temp$16));
22345
22437
  }
22346
22438
  function _temp$16(set, get) {
@@ -22926,7 +23018,7 @@ function SelectMultipleValue() {
22926
23018
  const valuesOptionStates = useStore(store, useShallow(t3));
22927
23019
  let t4;
22928
23020
  if ($[10] !== valuesOptionStates) {
22929
- t4 = valuesOptionStates.map(_temp$14);
23021
+ t4 = valuesOptionStates.filter(_temp$14).map(_temp2$9);
22930
23022
  $[10] = valuesOptionStates;
22931
23023
  $[11] = t4;
22932
23024
  } else t4 = $[11];
@@ -22934,11 +23026,11 @@ function SelectMultipleValue() {
22934
23026
  let t5;
22935
23027
  if ($[12] !== disabled || $[13] !== handleCloseValueTag || $[14] !== prefix || $[15] !== status || $[16] !== valueTagCloseButtonLabel || $[17] !== valueTagProps || $[18] !== valuesOptionStates || $[19] !== valuesToRender) {
22936
23028
  t5 = intersperse(valuesToRender.map((v_0, i_0) => {
22937
- const optionState_0 = valuesOptionStates[i_0];
22938
- return optionState_0 && /* @__PURE__ */ jsx(Tag, {
23029
+ const optionState_1 = valuesOptionStates[i_0];
23030
+ return optionState_1 && /* @__PURE__ */ jsx(Tag, {
22939
23031
  variant: "subtle",
22940
23032
  ...valueTagProps,
22941
- showCloseButton: !optionState_0.disabled,
23033
+ showCloseButton: !optionState_1.disabled,
22942
23034
  closeButtonProps: {
22943
23035
  label: null,
22944
23036
  tooltipContent: valueTagCloseButtonLabel,
@@ -22947,14 +23039,14 @@ function SelectMultipleValue() {
22947
23039
  type: void 0,
22948
23040
  disabled,
22949
23041
  "data-disabled": boolDataAttr(disabled),
22950
- onMouseDown: _temp2$10,
23042
+ onMouseDown: _temp3$4,
22951
23043
  onClick: (evt_1) => handleCloseValueTag(v_0, evt_1),
22952
23044
  "aria-controls": void 0,
22953
23045
  "aria-expanded": void 0,
22954
23046
  "aria-describedby": void 0,
22955
23047
  ...valueTagProps?.closeButtonProps
22956
23048
  },
22957
- color: optionState_0.color ?? controlStatusToAccent(status, "primary"),
23049
+ color: optionState_1.color ?? controlStatusToAccent(status, "primary"),
22958
23050
  className: cx(prefix("select__value-tag"), valueTagProps?.className),
22959
23051
  containerProps: {
22960
23052
  className: cx(prefix("select__value-tag-container"), valueTagProps?.containerProps?.className),
@@ -22964,9 +23056,9 @@ function SelectMultipleValue() {
22964
23056
  className: cx(prefix("select__value-tag-content"), valueTagProps?.contentProps?.className),
22965
23057
  ...valueTagProps?.contentProps
22966
23058
  },
22967
- children: optionState_0.content
23059
+ children: optionState_1.content
22968
23060
  }, v_0);
22969
- }), _temp3$4);
23061
+ }), _temp4$1);
22970
23062
  $[12] = disabled;
22971
23063
  $[13] = handleCloseValueTag;
22972
23064
  $[14] = prefix;
@@ -22989,14 +23081,17 @@ function SelectMultipleValue() {
22989
23081
  } else t8 = $[23];
22990
23082
  return t8;
22991
23083
  }
22992
- function _temp3$4(i_1) {
23084
+ function _temp4$1(i_1) {
22993
23085
  return /* @__PURE__ */ jsx(VisuallyHidden, { children: ", " }, `separator-${i_1}`);
22994
23086
  }
22995
- function _temp2$10(evt_0) {
23087
+ function _temp3$4(evt_0) {
22996
23088
  return evt_0.preventDefault();
22997
23089
  }
22998
- function _temp$14(optionState, i) {
22999
- return /* @__PURE__ */ jsxs(Fragment, { children: [i === 0 ? "" : ", ", optionState?.content] }, i);
23090
+ function _temp2$9(optionState_0, i) {
23091
+ return /* @__PURE__ */ jsxs(Fragment, { children: [i === 0 ? "" : ", ", optionState_0.content] }, optionState_0.value);
23092
+ }
23093
+ function _temp$14(optionState) {
23094
+ return optionState != null;
23000
23095
  }
23001
23096
  // src/components/Form/HiddenFormControl.tsx
23002
23097
  /** Hidden native control meant to be used as the "real" control of a form. */
@@ -23091,7 +23186,7 @@ function SelectNative(t0) {
23091
23186
  }
23092
23187
  const { store } = useSelectContext();
23093
23188
  const hasEmptyOption = useStore(store, _temp$13);
23094
- const optionStates = useStore(store, useShallow(_temp2$9));
23189
+ const optionStates = useStore(store, useShallow(_temp2$8));
23095
23190
  let t1;
23096
23191
  if ($[6] !== multiple || $[7] !== onValueChange) {
23097
23192
  t1 = (evt) => onValueChange(multiple ? Array.from(evt.target.options).filter(_temp3$3).map(_temp4) : evt.target.value);
@@ -23164,7 +23259,7 @@ function _temp4(option_0) {
23164
23259
  function _temp3$3(option) {
23165
23260
  return option.selected;
23166
23261
  }
23167
- function _temp2$9(state_0) {
23262
+ function _temp2$8(state_0) {
23168
23263
  return Array.from(state_0.options[0].values());
23169
23264
  }
23170
23265
  function _temp$13(state) {
@@ -23708,7 +23803,7 @@ function Select(t0) {
23708
23803
  t32 = !readOnly && /* @__PURE__ */ jsx(Icon, {
23709
23804
  icon: showOpen ? faAngleUp : faAngleDown,
23710
23805
  className: cx(prefix("select__arrow"), printHidden, arrowProps?.className),
23711
- onClick: _temp2$8,
23806
+ onClick: _temp2$7,
23712
23807
  "data-status": status,
23713
23808
  "data-disabled": boolDataAttr(disabled || softDisabled)
23714
23809
  });
@@ -24209,7 +24304,7 @@ function Select(t0) {
24209
24304
  } else t96 = $[332];
24210
24305
  return t96;
24211
24306
  }
24212
- function _temp2$8(evt_3) {
24307
+ function _temp2$7(evt_3) {
24213
24308
  return evt_3.preventDefault();
24214
24309
  }
24215
24310
  function _temp$12(open_0) {
@@ -24882,7 +24977,7 @@ function Calendar(t0) {
24882
24977
  case "multiple": {
24883
24978
  let t8;
24884
24979
  if ($[51] !== normalizedValue) {
24885
- t8 = Array.isArray(normalizedValue) ? normalizedValue : normalizedValue === null ? [] : isDate(normalizedValue) ? [normalizedValue] : [normalizedValue.start, normalizedValue.end].filter(_temp2$7);
24980
+ t8 = Array.isArray(normalizedValue) ? normalizedValue : normalizedValue === null ? [] : isDate(normalizedValue) ? [normalizedValue] : [normalizedValue.start, normalizedValue.end].filter(_temp2$6);
24886
24981
  $[51] = normalizedValue;
24887
24982
  $[52] = t8;
24888
24983
  } else t8 = $[52];
@@ -25639,7 +25734,7 @@ function Calendar(t0) {
25639
25734
  function _temp3$2() {
25640
25735
  return /* @__PURE__ */ new Date();
25641
25736
  }
25642
- function _temp2$7(d_0) {
25737
+ function _temp2$6(d_0) {
25643
25738
  return d_0 !== null;
25644
25739
  }
25645
25740
  function _temp$11(dates, d) {
@@ -30060,7 +30155,7 @@ function Form(t0) {
30060
30155
  $[34] = t3;
30061
30156
  } else t3 = $[34];
30062
30157
  const handleReset = t3;
30063
- const handleBeforeUnload = useEffectEvent(_temp2$6);
30158
+ const handleBeforeUnload = useEffectEvent(_temp2$5);
30064
30159
  let t4;
30065
30160
  if ($[35] !== confirmUnloadWhenDirty || $[36] !== handleBeforeUnload || $[37] !== store) {
30066
30161
  t4 = () => {
@@ -30165,7 +30260,7 @@ function _temp3$1(t0) {
30165
30260
  const { submitting: submitting_1, actions: actions_0 } = t0;
30166
30261
  return !submitting_1 && actions_0.isDirty();
30167
30262
  }
30168
- function _temp2$6(event) {
30263
+ function _temp2$5(event) {
30169
30264
  event.preventDefault();
30170
30265
  event.returnValue = "";
30171
30266
  }
@@ -30179,7 +30274,7 @@ function _temp$8(t0) {
30179
30274
  // src/components/Form/FormError.tsx
30180
30275
  /** Error within a `Form`. */
30181
30276
  function FormError(t0) {
30182
- const $ = c(28);
30277
+ const $ = c(25);
30183
30278
  const { name: nameProp, errorDisplayMode: errorDisplayModeProp, nativeErrorMessages, children } = t0;
30184
30279
  const [locale] = useLocale();
30185
30280
  const { errorDisplayMode: formErrorDisplayMode, nativeErrorMessages: formNativeErrorMessages, store } = useFormContext();
@@ -30256,17 +30351,14 @@ function FormError(t0) {
30256
30351
  ...externalErrors_0 ?? []
30257
30352
  ] : [];
30258
30353
  if (errorDisplayMode === "first") messages = messages.slice(0, 1);
30259
- let t8;
30260
- if ($[25] !== children || $[26] !== name) {
30261
- t8 = children ?? ((messages_0) => name === "" ? /* @__PURE__ */ jsx(Alert, {
30262
- severity: "danger",
30263
- children: messages_0.length > 1 ? /* @__PURE__ */ jsx("ul", { children: messages_0.map(_temp$7) }) : messages_0[0]
30264
- }) : /* @__PURE__ */ jsx(FeedbackList, { children: messages_0.map(_temp2$5) }));
30265
- $[25] = children;
30266
- $[26] = name;
30267
- $[27] = t8;
30268
- } else t8 = $[27];
30269
- const render = t8;
30354
+ const keys = messageKeys(messages);
30355
+ const render = children ?? ((messages_0) => name === "" ? /* @__PURE__ */ jsx(Alert, {
30356
+ severity: "danger",
30357
+ children: messages_0.length > 1 ? /* @__PURE__ */ jsx("ul", { children: messages_0.map((message, i) => /* @__PURE__ */ jsx("li", { children: message }, keys[i])) }) : messages_0[0]
30358
+ }) : /* @__PURE__ */ jsx(FeedbackList, { children: messages_0.map((message_0, i_0) => /* @__PURE__ */ jsx(Feedback, {
30359
+ type: "error",
30360
+ children: message_0
30361
+ }, keys[i_0])) }));
30270
30362
  t7 = messages.length > 0 && render(messages);
30271
30363
  $[12] = children;
30272
30364
  $[13] = errorDisplayMode;
@@ -30284,19 +30376,20 @@ function FormError(t0) {
30284
30376
  } else t7 = $[24];
30285
30377
  return t7;
30286
30378
  }
30287
- function _temp2$5(message_0, i_0) {
30288
- return /* @__PURE__ */ jsx(Feedback, {
30289
- type: "error",
30290
- children: message_0
30291
- }, i_0);
30292
- }
30293
- function _temp$7(message, i) {
30294
- return /* @__PURE__ */ jsx("li", { children: message }, i);
30295
- }
30296
30379
  function nativeErrorMessage(nativeErrorMessages, nativeError) {
30297
30380
  const message = nativeErrorMessages?.[nativeError.key];
30298
30381
  return typeof message === "function" ? message(nativeError.element) : message;
30299
30382
  }
30383
+ /** Returns keys for all provided messages. */
30384
+ function messageKeys(messages) {
30385
+ const keyCounts = /* @__PURE__ */ new Map();
30386
+ return messages.map((node, i) => {
30387
+ const key = typeof node === "string" || typeof node === "number" ? `v:${String(node)}` : isValidElement(node) && node.key != null ? `k:${node.key}` : `i:${i}`;
30388
+ const n = keyCounts.get(key) ?? 0;
30389
+ keyCounts.set(key, n + 1);
30390
+ return n === 0 ? key : `${key}#${n}`;
30391
+ });
30392
+ }
30300
30393
  // src/components/Form/FormReset.tsx
30301
30394
  /** Component used to wrap a button to reset the form. */
30302
30395
  function FormReset(t0) {
@@ -32603,7 +32696,7 @@ function useCreateStepperContext(defaultActiveStep, activeStep, onActiveStepChan
32603
32696
  t1 = () => createStore()(subscribeWithSelector((set, get) => ({
32604
32697
  _activeStep: defaultActiveStep ?? 0,
32605
32698
  _controlledActiveStep: activeStep,
32606
- activeStep: computed(() => [get()._controlledActiveStep ?? get()._activeStep, get().stepCount()], _temp$6),
32699
+ activeStep: computed(() => [get()._controlledActiveStep ?? get()._activeStep, get().stepCount()], _temp$7),
32607
32700
  stepsInfo: {},
32608
32701
  stepsContent: {},
32609
32702
  stepCount: computed(() => [get().stepsInfo], _temp2$4),
@@ -32697,7 +32790,7 @@ function useCreateStepperContext(defaultActiveStep, activeStep, onActiveStepChan
32697
32790
  function _temp2$4(stepLabels) {
32698
32791
  return Object.keys(stepLabels).length;
32699
32792
  }
32700
- function _temp$6(activeStep_0, stepCount) {
32793
+ function _temp$7(activeStep_0, stepCount) {
32701
32794
  return Number.isNaN(activeStep_0) ? 0 : Math.max(0, Math.min(activeStep_0, stepCount));
32702
32795
  }
32703
32796
  /** Hooks returning the stepper context value. */
@@ -33519,7 +33612,7 @@ function StepperFinishTrigger(t0) {
33519
33612
  const [locale] = useLocale();
33520
33613
  const { printHidden } = usePrintClassNames();
33521
33614
  const { store } = useStepperContext();
33522
- const isLast = useStore(store, _temp$5);
33615
+ const isLast = useStore(store, _temp$6);
33523
33616
  if (!(showWhenNotLast || isLast)) return null;
33524
33617
  const shouldDisable = !isLast || disabled;
33525
33618
  let t1;
@@ -33586,7 +33679,7 @@ function StepperFinishTrigger(t0) {
33586
33679
  } else t3 = $[25];
33587
33680
  return t3;
33588
33681
  }
33589
- function _temp$5(state) {
33682
+ function _temp$6(state) {
33590
33683
  return state.activeStep() >= state.stepCount() - 1;
33591
33684
  }
33592
33685
  // src/components/Stepper/StepperNextTrigger.tsx
@@ -33623,7 +33716,7 @@ function StepperNextTrigger(t0) {
33623
33716
  const [locale] = useLocale();
33624
33717
  const { printHidden } = usePrintClassNames();
33625
33718
  const { store } = useStepperContext();
33626
- const isLast = useStore(store, _temp$4);
33719
+ const isLast = useStore(store, _temp$5);
33627
33720
  const nextIsDisabled = useStore(store, _temp2$3);
33628
33721
  let t1;
33629
33722
  if ($[8] !== store) {
@@ -33720,7 +33813,7 @@ function StepperNextTrigger(t0) {
33720
33813
  function _temp2$3(state_0) {
33721
33814
  return state_0.actions.getStepInfo(state_0.activeStep() + 1)?.disabled;
33722
33815
  }
33723
- function _temp$4(state) {
33816
+ function _temp$5(state) {
33724
33817
  return state.activeStep() >= state.stepCount() - 1;
33725
33818
  }
33726
33819
  // src/components/Stepper/StepperPreviousTrigger.tsx
@@ -33758,7 +33851,7 @@ function StepperPreviousTrigger(t0) {
33758
33851
  const [locale] = useLocale();
33759
33852
  const { printHidden } = usePrintClassNames();
33760
33853
  const { store } = useStepperContext();
33761
- const isFirst = useStore(store, _temp$3);
33854
+ const isFirst = useStore(store, _temp$4);
33762
33855
  const prevIsDisabled = useStore(store, _temp2$2);
33763
33856
  let t2;
33764
33857
  if ($[8] !== store) {
@@ -33854,7 +33947,7 @@ function StepperPreviousTrigger(t0) {
33854
33947
  function _temp2$2(state_0) {
33855
33948
  return state_0.actions.getStepInfo(state_0.activeStep() - 1)?.disabled;
33856
33949
  }
33857
- function _temp$3(state) {
33950
+ function _temp$4(state) {
33858
33951
  return state.activeStep() === 0;
33859
33952
  }
33860
33953
  // src/components/Stepper/StepperState.tsx
@@ -33953,7 +34046,7 @@ function useRegisterTabLabel(value, label) {
33953
34046
  const $ = c(6);
33954
34047
  const { showAllTabsWhilePrinting, store } = useTabsContext();
33955
34048
  const needsRegisteredTabLabels = usePrinting() && showAllTabsWhilePrinting;
33956
- const { registerTabLabel } = useStore(store, _temp$2);
34049
+ const { registerTabLabel } = useStore(store, _temp$3);
33957
34050
  let t0;
33958
34051
  let t1;
33959
34052
  if ($[0] !== label || $[1] !== needsRegisteredTabLabels || $[2] !== registerTabLabel || $[3] !== value) {
@@ -33978,7 +34071,7 @@ function useRegisterTabLabel(value, label) {
33978
34071
  }
33979
34072
  useEffect(t0, t1);
33980
34073
  }
33981
- function _temp$2(state) {
34074
+ function _temp$3(state) {
33982
34075
  return state.actions;
33983
34076
  }
33984
34077
  /** Hook which returns the label of a tab. */
@@ -34388,7 +34481,7 @@ function TabList(t0) {
34388
34481
  useScrollPosition(containerEl, t3);
34389
34482
  let t4;
34390
34483
  if ($[17] !== containerEl?.scrollWidth || $[18] !== store) {
34391
- t4 = () => store.subscribe(_temp$1, (width_0) => {
34484
+ t4 = () => store.subscribe(_temp$2, (width_0) => {
34392
34485
  store.setState({ showScrollButtons: (containerEl?.scrollWidth ?? 0) > Math.ceil(width_0) });
34393
34486
  }, { fireImmediately: true });
34394
34487
  $[17] = containerEl?.scrollWidth;
@@ -34621,7 +34714,7 @@ function TabList(t0) {
34621
34714
  } else t33 = $[86];
34622
34715
  return t33;
34623
34716
  }
34624
- function _temp$1(t0) {
34717
+ function _temp$2(t0) {
34625
34718
  const { width } = t0;
34626
34719
  return width;
34627
34720
  }
@@ -35106,29 +35199,31 @@ function navigate(url, options) {
35106
35199
  history[options?.replace ? "replaceState" : "pushState"](options?.state, "", url);
35107
35200
  }
35108
35201
  // src/utils/useIntersectionObserver.ts
35109
- /** Hook wrapping an `IntersectionObserver` which tracks the intersection ratio of an element. */
35110
- function useIntersectionObserver(element, onIntersectionEntryChange, options) {
35202
+ /**
35203
+ * Hook wrapping an `IntersectionObserver` which observes one or more elements. `onIntersect` is
35204
+ * called with the observer's entries whenever the intersection of any observed element changes,
35205
+ * including once right after the elements start being observed.
35206
+ */
35207
+ function useIntersectionObserver(elements, onIntersect, options) {
35111
35208
  const $ = c(5);
35209
+ const latestOnIntersectRef = useLatestRef(onIntersect);
35112
35210
  let t0;
35113
35211
  let t1;
35114
- if ($[0] !== element || $[1] !== onIntersectionEntryChange || $[2] !== options) {
35212
+ if ($[0] !== elements || $[1] !== latestOnIntersectRef || $[2] !== options) {
35115
35213
  t0 = () => {
35116
- if (element !== null) {
35117
- const observer = new IntersectionObserver((t2) => {
35118
- const [e] = t2;
35119
- return onIntersectionEntryChange(e);
35120
- }, options);
35121
- observer.observe(element);
35122
- return () => observer.unobserve(element);
35123
- }
35214
+ const targets = (Array.isArray(elements) ? elements : [elements]).filter(_temp$1);
35215
+ if (targets.length === 0) return;
35216
+ const observer = new IntersectionObserver((entries) => latestOnIntersectRef.current(entries), options);
35217
+ for (const target of targets) observer.observe(target);
35218
+ return () => observer.disconnect();
35124
35219
  };
35125
35220
  t1 = [
35126
- element,
35127
- onIntersectionEntryChange,
35128
- options
35221
+ elements,
35222
+ options,
35223
+ latestOnIntersectRef
35129
35224
  ];
35130
- $[0] = element;
35131
- $[1] = onIntersectionEntryChange;
35225
+ $[0] = elements;
35226
+ $[1] = latestOnIntersectRef;
35132
35227
  $[2] = options;
35133
35228
  $[3] = t0;
35134
35229
  $[4] = t1;
@@ -35138,6 +35233,9 @@ function useIntersectionObserver(element, onIntersectionEntryChange, options) {
35138
35233
  }
35139
35234
  useEffect(t0, t1);
35140
35235
  }
35236
+ function _temp$1(el) {
35237
+ return el != null;
35238
+ }
35141
35239
  // src/utils/useLocation.ts
35142
35240
  var MONKEY_PATCHED_HISTORY = Symbol.for("ostack-ui.monkeyPatchedHistory");
35143
35241
  var HISTORY_EVENT_TYPES = [
@@ -35327,6 +35425,6 @@ function _temp2(nextSearchParams, t0) {
35327
35425
  function _temp(location) {
35328
35426
  return location.search;
35329
35427
  }
35330
- export { Action, ActionGroup, ActionMenu, ActionMenuCheckboxItem, ActionMenuRadioGroup, ActionMenuRadioItem, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogProvider, AlertDialogProviderContext, AlertDialogTitle, AlertDialogTrigger, AlertTitle, BREAKPOINTS, Badge, Box, Button, ButtonGroup, Calendar, Card, CardBody, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClearContexts, CloseButton, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandMenu, CommandMenuDialog, CommandMenuGroup, CommandMenuItem, Container, Control, ControlAddon, ControlCode, ControlContext, ControlWithContainerRef, DATA_TABLE_SELECTION_COLUMN_WIDTH, DEFAULT_DATE_FORMAT, DEFAULT_DOCUMENT_TITLE_BASE_SEPARATOR, DEFAULT_DOCUMENT_TITLE_BREADCRUMBS_SEPARATOR, DEFAULT_TABLE_COLUMN_WIDTH, DEFAULT_TABLE_ROW_HEIGHT, DataTable, DataTableCell, DataTableColumn, DataTableColumnGroup, DataTableColumns, DataTableContent, DataTableFilter, DataTablePagination, DataTableRow, DataTableRowsPerPage, DataTableSelectionTrigger, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DocumentTitleProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, ErrorReportingContext, ErrorReportingProvider, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, FieldGroup, FieldGroupBody, FieldGroupHeader, FieldGroupTitle, Form, FormError, FormReset, FormState, FormSubmit, Grid, Heading, HelperText, HelperTextProvider, Icon, IconButton, Input, Keybinds, Keyboard, Label, LabelProvider, Layer, Link, LocalizationContext, LocalizationProvider, Mark, MenuList, MenuListGroup, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Output, Pagination, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Portal, PortalContext, PrefixContext, PrefixProvider, Printer, PrinterContent, PrinterTrigger, Radio, RadioGroup, Root, Select, Separator, Slot, Slottable, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, StepperState, Tab, TabContent, TabList, Table, TableBody, TableCell, TableColumn, TableColumnGroup, TableFoot, TableHead, TableRow, Tabs, Tag, Text, TextArea, Toast, ToastDescription, ToastManagerContext, ToastManagerProvider, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipProvider, VisuallyHidden, boolDataAttr, buildErrorReport, combineAriaIds, compare, compareNumericStrings, computed, controlStatusToAccent, cx, defaultIgnoreKeyboardShortcut, ensureStore, formatNumericValue, ignoreKeyboardShortcutInEditableElements, isNumericStringNegative, isResponsiveValueObject, keybindsToAriaKeyShortcuts, localeLabel, matchAgainstFilter, mergeResponsiveValues, navigate, normalizeKeybinds, normalizeNumericString, numericStringFloatToInt, numericStringIntToFloat, numericStringRepresentsNull, numericToString, parseChildren, parseDateStrict, parseNumericValue, registerKeyboardShortcut, setBoolDataAttr, setDefaultPrefix, setNativeProperty, stableSort, stringHash, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControlContext, useControllableState, useCssVars, useCurrentMediaBreakpoint, useCurrentResponsiveValue, useDataTableApiRef, useDataTableColumnLabel, useDataTableColumnLabelId, useDateTransformer, useErrorBoundary, useErrorReporter, useFeedbackControlName, useFeedbackIds, useFormApi, useFormState, useFormValue, useHelperTextIds, useIntersectionObserver, useIsInFeedbackList, useIsInFeedbackProvider, useIsInField, useIsInLabelProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLabel, useLabelId, useLatestRef, useLayerZIndex, useLocale, useLocation, useMarginProps, useMeasure, useMediaBreakpointDown, useMediaBreakpointUp, useMediaQuery, useNumericTransformer, useOnLabelChange, usePaddingProps, usePortalContext, usePrefix, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting, useRegisterControl, useRegisterControlInField, useRegisterControlInLabelProvider, useRegisterControlNameInFeedbackProvider, useRegisterControlStatusInFeedbackProvider, useResponsiveValue, useResponsiveValues, useSafeLayoutEffect, useScrollPosition, useScrollbarSize, useSearchParam, useSearchParams, useSetControlFocusedInFeedbackProvider, useSizingProps, useSpacing, useStartPrintingTask, useStepperApi, useTableNumberOfColumns, useTextProps, useToastManager, validateNumericTransformerOptions, warnOnce, withCleanup };
35428
+ export { Action, ActionGroup, ActionMenu, ActionMenuCheckboxItem, ActionMenuRadioGroup, ActionMenuRadioItem, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogProvider, AlertDialogProviderContext, AlertDialogTitle, AlertDialogTrigger, AlertTitle, BREAKPOINTS, Badge, Box, Button, ButtonGroup, Calendar, Card, CardBody, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClearContexts, CloseButton, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandMenu, CommandMenuDialog, CommandMenuGroup, CommandMenuItem, Container, Control, ControlAddon, ControlCode, ControlContext, ControlWithContainerRef, DATA_TABLE_SELECTION_COLUMN_WIDTH, DEFAULT_DATE_FORMAT, DEFAULT_DOCUMENT_TITLE_BASE_SEPARATOR, DEFAULT_DOCUMENT_TITLE_BREADCRUMBS_SEPARATOR, DEFAULT_TABLE_COLUMN_WIDTH, DEFAULT_TABLE_ROW_HEIGHT, DataTable, DataTableCell, DataTableColumn, DataTableColumnGroup, DataTableColumns, DataTableContent, DataTableFilter, DataTablePagination, DataTableRow, DataTableRowsPerPage, DataTableSelectionTrigger, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DocumentTitleProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, ErrorReportingContext, ErrorReportingProvider, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, FieldGroup, FieldGroupBody, FieldGroupHeader, FieldGroupTitle, Form, FormError, FormReset, FormState, FormSubmit, Grid, Heading, HelperText, HelperTextProvider, Icon, IconButton, Input, Keybinds, Keyboard, Label, LabelProvider, Layer, Link, LocalizationContext, LocalizationProvider, Mark, MenuList, MenuListGroup, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Output, Pagination, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Portal, PortalContext, PrefixContext, PrefixProvider, Printer, PrinterContent, PrinterTrigger, Radio, RadioGroup, Root, Select, Separator, Slot, Slottable, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, StepperState, Tab, TabContent, TabList, Table, TableBody, TableCell, TableColumn, TableColumnGroup, TableFoot, TableHead, TableRow, Tabs, Tag, Text, TextArea, Toast, ToastDescription, ToastManagerContext, ToastManagerProvider, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipProvider, VisuallyHidden, boolDataAttr, buildErrorReport, combineAriaIds, compare, compareNumericStrings, computed, controlStatusToAccent, cx, defaultIgnoreKeyboardShortcut, ensureStore, formatNumericValue, ignoreKeyboardShortcutInEditableElements, isNumericStringNegative, isResponsiveValueObject, keybindsToAriaKeyShortcuts, localeLabel, matchAgainstFilter, mergeResponsiveValues, navigate, normalizeKeybinds, normalizeNumericString, numericStringFloatToInt, numericStringIntToFloat, numericStringRepresentsNull, numericToString, parseChildren, parseDateStrict, parseNumericValue, registerKeyboardShortcut, setBoolDataAttr, setDefaultPrefix, setNativeProperty, stableSort, stringHash, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControlContext, useControllableState, useCssVars, useCurrentMediaBreakpoint, useCurrentResponsiveValue, useDataTableApiRef, useDataTableColumnLabel, useDataTableColumnLabelId, useDateTransformer, useErrorBoundary, useErrorReporter, useFeedbackControlName, useFeedbackIds, useFormApi, useFormState, useFormValue, useHelperTextIds, useIntersectionObserver, useIsInFeedbackList, useIsInFeedbackProvider, useIsInField, useIsInLabelProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLabel, useLabelId, useLatestRef, useLayerZIndex, useLocale, useLocation, useMarginProps, useMeasure, useMediaBreakpointDown, useMediaBreakpointUp, useMediaQuery, useNumericTransformer, useOnLabelChange, usePaddingProps, usePortalContext, usePrefix, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting, usePrintingTask, useRegisterControl, useRegisterControlInField, useRegisterControlInLabelProvider, useRegisterControlNameInFeedbackProvider, useRegisterControlStatusInFeedbackProvider, useResizeObserver, useResponsiveValue, useResponsiveValues, useSafeLayoutEffect, useScrollPosition, useScrollbarSize, useSearchParam, useSearchParams, useSetControlFocusedInFeedbackProvider, useSizingProps, useSpacing, useStepperApi, useTableNumberOfColumns, useTextProps, useToastManager, validateNumericTransformerOptions, warnOnce, withCleanup };
35331
35429
 
35332
35430
  //# sourceMappingURL=ostack-ui.js.map