react-better-html 1.1.191 → 1.1.193

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -7705,17 +7705,132 @@ var ColorThemeSwitch_default = ColorThemeSwitch2;
7705
7705
  // src/components/Table.tsx
7706
7706
  import {
7707
7707
  forwardRef as forwardRef15,
7708
- memo as memo22,
7709
- useCallback as useCallback11,
7710
- useMemo as useMemo8,
7711
- useState as useState9,
7708
+ memo as memo23,
7709
+ useCallback as useCallback12,
7710
+ useMemo as useMemo9,
7711
+ useState as useState10,
7712
7712
  useImperativeHandle as useImperativeHandle2,
7713
7713
  useRef as useRef6,
7714
- useEffect as useEffect10,
7714
+ useEffect as useEffect11,
7715
7715
  Fragment as Fragment6
7716
7716
  } from "react";
7717
7717
  import styled12, { css as css2 } from "styled-components";
7718
- import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
7718
+
7719
+ // src/components/Pagination.tsx
7720
+ import { memo as memo22, useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo8, useState as useState9 } from "react";
7721
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
7722
+ var PaginationComponent = function Pagination({
7723
+ currentPage = 1,
7724
+ itemsLength = 0,
7725
+ itemsPerPage,
7726
+ pageCount,
7727
+ maximumVisiblePages: maximumVisiblePages2 = 11,
7728
+ onClickPreviousPage,
7729
+ onClickNextPage,
7730
+ onChangePage
7731
+ }) {
7732
+ const theme2 = useTheme();
7733
+ const mediaQuery = useMediaQuery();
7734
+ const [currentPageInternal, setCurrentPage] = useState9(currentPage);
7735
+ const pageCountInternal = pageCount ?? (itemsPerPage !== void 0 ? Math.ceil(itemsLength / itemsPerPage) : 1);
7736
+ const onClickPreviousPageElement = useCallback11(() => {
7737
+ const newPage = currentPageInternal <= 1 ? 1 : currentPageInternal - 1;
7738
+ setCurrentPage(newPage);
7739
+ onClickPreviousPage?.(newPage);
7740
+ }, [currentPageInternal, onClickPreviousPage]);
7741
+ const onClickNextPageElement = useCallback11(() => {
7742
+ const newPage = currentPageInternal >= pageCountInternal ? pageCountInternal : currentPageInternal + 1;
7743
+ setCurrentPage(newPage);
7744
+ onClickNextPage?.(newPage);
7745
+ }, [currentPageInternal, pageCountInternal, onClickNextPage]);
7746
+ const paginationItems = useMemo8(() => {
7747
+ const halfRange = Math.floor(maximumVisiblePages2 / 2);
7748
+ let startPage = Math.max(1, currentPageInternal - halfRange);
7749
+ let endPage = Math.min(pageCountInternal, currentPageInternal + halfRange);
7750
+ if (endPage - startPage + 1 < maximumVisiblePages2) {
7751
+ startPage = Math.max(1, endPage - maximumVisiblePages2 + 1);
7752
+ endPage = Math.min(pageCountInternal, startPage + maximumVisiblePages2 - 1);
7753
+ }
7754
+ return Array.from(
7755
+ {
7756
+ length: endPage - startPage + 1
7757
+ },
7758
+ (_, index) => startPage + index
7759
+ );
7760
+ }, [pageCountInternal, currentPageInternal]);
7761
+ useEffect10(() => {
7762
+ onChangePage?.(currentPageInternal);
7763
+ }, [currentPageInternal, onChangePage]);
7764
+ useEffect10(() => {
7765
+ setCurrentPage(currentPage);
7766
+ }, [currentPage]);
7767
+ const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages2 / 1.4;
7768
+ return /* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", justifyContent: "center", gap: theme2.styles.gap * 2, children: [
7769
+ pageCountInternal > maximumVisiblePages2 && /* @__PURE__ */ jsx22(
7770
+ Button_default.icon,
7771
+ {
7772
+ icon: "doubleChevronLeft",
7773
+ disabled: currentPageInternal === 1,
7774
+ value: 1,
7775
+ onClickWithValue: setCurrentPage
7776
+ }
7777
+ ),
7778
+ /* @__PURE__ */ jsx22(Button_default.icon, { icon: "chevronLeft", disabled: currentPageInternal === 1, onClick: onClickPreviousPageElement }),
7779
+ /* @__PURE__ */ jsx22(
7780
+ Div_default.row,
7781
+ {
7782
+ alignItems: "center",
7783
+ justifyContent: "center",
7784
+ flexWrap: mobileFooterBreakingPoint ? "wrap" : void 0,
7785
+ gap: theme2.styles.gap,
7786
+ children: paginationItems.map((pageIndex) => {
7787
+ const isActive = currentPageInternal === pageIndex;
7788
+ return /* @__PURE__ */ jsx22(
7789
+ Div_default,
7790
+ {
7791
+ cursor: "pointer",
7792
+ userSelect: "none",
7793
+ value: pageIndex,
7794
+ onClickWithValue: setCurrentPage,
7795
+ children: /* @__PURE__ */ jsx22(
7796
+ Text_default,
7797
+ {
7798
+ fontWeight: isActive ? 700 : 400,
7799
+ color: isActive ? theme2.colors.primary : theme2.colors.textSecondary,
7800
+ transition: theme2.styles.transition,
7801
+ children: pageIndex
7802
+ }
7803
+ )
7804
+ },
7805
+ pageIndex
7806
+ );
7807
+ })
7808
+ }
7809
+ ),
7810
+ /* @__PURE__ */ jsx22(
7811
+ Button_default.icon,
7812
+ {
7813
+ icon: "chevronRight",
7814
+ disabled: currentPageInternal === pageCountInternal,
7815
+ onClick: onClickNextPageElement
7816
+ }
7817
+ ),
7818
+ pageCountInternal > maximumVisiblePages2 && /* @__PURE__ */ jsx22(
7819
+ Button_default.icon,
7820
+ {
7821
+ icon: "doubleChevronRight",
7822
+ disabled: currentPageInternal === pageCountInternal,
7823
+ onClickWithValue: setCurrentPage,
7824
+ value: pageCountInternal
7825
+ }
7826
+ )
7827
+ ] });
7828
+ };
7829
+ var Pagination2 = memo22(PaginationComponent);
7830
+ var Pagination_default = Pagination2;
7831
+
7832
+ // src/components/Table.tsx
7833
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
7719
7834
  var defaultImageWidth = 160;
7720
7835
  var maximumVisiblePages = 11;
7721
7836
  var TableStyledComponent = styled12.table.withConfig({
@@ -7887,13 +8002,13 @@ var TableComponent = forwardRef15(function Table({
7887
8002
  const mediaQuery = useMediaQuery();
7888
8003
  const { colorTheme } = useBetterHtmlContextInternal();
7889
8004
  const filterModalRef = useRef6(null);
7890
- const readyColumns = useMemo8(() => columns.filter((column) => !column.hidden), [columns]);
8005
+ const readyColumns = useMemo9(() => columns.filter((column) => !column.hidden), [columns]);
7891
8006
  const columnsRef = useRef6(readyColumns);
7892
8007
  columnsRef.current = readyColumns;
7893
- const [checkedItems, setCheckedItems] = useState9([]);
7894
- const [expandedRows, setExpandedRows] = useState9([]);
7895
- const [currentPage, setCurrentPage] = useState9(1);
7896
- const [filterData, setFilterData] = useState9(() => {
8008
+ const [checkedItems, setCheckedItems] = useState10([]);
8009
+ const [expandedRows, setExpandedRows] = useState10([]);
8010
+ const [currentPage, setCurrentPage] = useState10(1);
8011
+ const [filterData, setFilterData] = useState10(() => {
7897
8012
  if (!memoizeFilters || !name) return {};
7898
8013
  const localStorageData = JSON.parse(localStorage.getItem(`react-better-html-table-filters-${name}`) || "{}");
7899
8014
  const timestamp = localStorageData.timestamp;
@@ -7902,8 +8017,8 @@ var TableComponent = forwardRef15(function Table({
7902
8017
  if (timeDiff > memoizeFiltersLifespan) return {};
7903
8018
  return data2;
7904
8019
  });
7905
- const [openedFilterColumnIndex, setOpenedFilterColumnIndex] = useState9();
7906
- const [filterListSelectedItems, setFilterListSelectedItems] = useState9();
8020
+ const [openedFilterColumnIndex, setOpenedFilterColumnIndex] = useState10();
8021
+ const [filterListSelectedItems, setFilterListSelectedItems] = useState10();
7907
8022
  const openedFilterData = openedFilterColumnIndex !== void 0 ? filterData[openedFilterColumnIndex] : void 0;
7908
8023
  const openedFilterColumn = openedFilterColumnIndex !== void 0 ? readyColumns[openedFilterColumnIndex] : void 0;
7909
8024
  const filterForm = useForm({
@@ -7933,26 +8048,26 @@ var TableComponent = forwardRef15(function Table({
7933
8048
  filterModalRef.current?.close();
7934
8049
  }
7935
8050
  });
7936
- const expandColumn = useMemo8(() => readyColumns.find((column) => column.type === "expand"), [readyColumns]);
7937
- const renderCellContent = useCallback11(
8051
+ const expandColumn = useMemo9(() => readyColumns.find((column) => column.type === "expand"), [readyColumns]);
8052
+ const renderCellContent = useCallback12(
7938
8053
  (column, item, itemIndex) => {
7939
8054
  switch (column.type) {
7940
8055
  case "text": {
7941
8056
  const value = column.keyName ? item[column.keyName] : void 0;
7942
8057
  const textProps = (typeof column.getTextProps === "function" ? column.getTextProps?.(item, itemIndex) : column.getTextProps) ?? {};
7943
- return /* @__PURE__ */ jsx22(Text_default, { ...textProps, children: column.format?.(item, itemIndex) ?? String(value ?? "") });
8058
+ return /* @__PURE__ */ jsx23(Text_default, { ...textProps, children: column.format?.(item, itemIndex) ?? String(value ?? "") });
7944
8059
  }
7945
8060
  case "element": {
7946
- return column.render?.(item, itemIndex) ?? /* @__PURE__ */ jsx22(Fragment7, {});
8061
+ return column.render?.(item, itemIndex) ?? /* @__PURE__ */ jsx23(Fragment7, {});
7947
8062
  }
7948
8063
  case "image": {
7949
8064
  const imageProps = (typeof column.getImageProps === "function" ? column.getImageProps?.(item, itemIndex) : column.getImageProps) ?? {};
7950
- return /* @__PURE__ */ jsx22(Image_default, { width: "100%", borderRadius: theme2.styles.borderRadius / 2, ...imageProps });
8065
+ return /* @__PURE__ */ jsx23(Image_default, { width: "100%", borderRadius: theme2.styles.borderRadius / 2, ...imageProps });
7951
8066
  }
7952
8067
  case "checkbox": {
7953
8068
  const { onChange, ...toggleInputProps } = (typeof column.getToggleInputProps === "function" ? column.getToggleInputProps?.(item, itemIndex) : column.getToggleInputProps) ?? {};
7954
8069
  const checkedValue = checkedItems[itemIndex];
7955
- return /* @__PURE__ */ jsx22(
8070
+ return /* @__PURE__ */ jsx23(
7956
8071
  ToggleInput_default.checkbox,
7957
8072
  {
7958
8073
  checked: checkedValue,
@@ -7973,7 +8088,7 @@ var TableComponent = forwardRef15(function Table({
7973
8088
  );
7974
8089
  }
7975
8090
  case "expand": {
7976
- return /* @__PURE__ */ jsx22(Div_default, { isTabAccessed: true, children: /* @__PURE__ */ jsx22(
8091
+ return /* @__PURE__ */ jsx23(Div_default, { isTabAccessed: true, children: /* @__PURE__ */ jsx23(
7977
8092
  Icon_default,
7978
8093
  {
7979
8094
  name: "chevronDown",
@@ -7983,13 +8098,13 @@ var TableComponent = forwardRef15(function Table({
7983
8098
  ) });
7984
8099
  }
7985
8100
  default: {
7986
- return /* @__PURE__ */ jsx22(Fragment7, {});
8101
+ return /* @__PURE__ */ jsx23(Fragment7, {});
7987
8102
  }
7988
8103
  }
7989
8104
  },
7990
8105
  [theme2, checkedItems, expandedRows]
7991
8106
  );
7992
- const onClickRowElement = useCallback11(
8107
+ const onClickRowElement = useCallback12(
7993
8108
  (item, index) => {
7994
8109
  if (expandColumn) {
7995
8110
  setExpandedRows((oldValue) => {
@@ -8006,14 +8121,14 @@ var TableComponent = forwardRef15(function Table({
8006
8121
  },
8007
8122
  [onClickRow, expandColumn]
8008
8123
  );
8009
- const onClickAllCheckboxesElement = useCallback11(
8124
+ const onClickAllCheckboxesElement = useCallback12(
8010
8125
  (checked) => {
8011
8126
  onClickAllCheckboxes?.(checked);
8012
8127
  setCheckedItems(data.map(() => checked));
8013
8128
  },
8014
8129
  [onClickAllCheckboxes, data]
8015
8130
  );
8016
- const onClickFilterButton = useCallback11(
8131
+ const onClickFilterButton = useCallback12(
8017
8132
  (columnIndex) => {
8018
8133
  const thisFilterData = filterData[columnIndex];
8019
8134
  if (thisFilterData?.type === "number" || thisFilterData?.type === "date" || thisFilterData?.type === "date-time") {
@@ -8029,12 +8144,12 @@ var TableComponent = forwardRef15(function Table({
8029
8144
  },
8030
8145
  [filterData]
8031
8146
  );
8032
- const onCloseFilterModal = useCallback11(() => {
8147
+ const onCloseFilterModal = useCallback12(() => {
8033
8148
  setTimeout(() => setOpenedFilterColumnIndex(void 0), 0.2 * 1e3);
8034
8149
  setFilterListSelectedItems(void 0);
8035
8150
  filterForm.reset();
8036
8151
  }, []);
8037
- const onClickCancelFormFilter = useCallback11(() => {
8152
+ const onClickCancelFormFilter = useCallback12(() => {
8038
8153
  if (openedFilterColumnIndex === void 0) return;
8039
8154
  setFilterData(
8040
8155
  (oldValue) => Object.entries({
@@ -8047,7 +8162,7 @@ var TableComponent = forwardRef15(function Table({
8047
8162
  );
8048
8163
  filterModalRef.current?.close();
8049
8164
  }, [openedFilterColumnIndex]);
8050
- const onClickFilterListItem = useCallback11(
8165
+ const onClickFilterListItem = useCallback12(
8051
8166
  (value) => setFilterListSelectedItems((oldValue) => {
8052
8167
  if (!oldValue) return [value];
8053
8168
  if (oldValue.includes(value)) return oldValue.filter((item) => item !== value);
@@ -8055,7 +8170,7 @@ var TableComponent = forwardRef15(function Table({
8055
8170
  }),
8056
8171
  []
8057
8172
  );
8058
- const onClickFilterPreset = useCallback11(
8173
+ const onClickFilterPreset = useCallback12(
8059
8174
  (preset) => {
8060
8175
  const getValueForDate = (date) => {
8061
8176
  if (openedFilterColumn?.filter === "date") return date.toISOString().split("T")[0];
@@ -8140,7 +8255,7 @@ var TableComponent = forwardRef15(function Table({
8140
8255
  },
8141
8256
  [openedFilterColumn]
8142
8257
  );
8143
- const renderExpandedRow = useCallback11(
8258
+ const renderExpandedRow = useCallback12(
8144
8259
  (...props2) => {
8145
8260
  const expandColumn2 = readyColumns.find((column) => column.type === "expand");
8146
8261
  if (!expandColumn2) return;
@@ -8148,7 +8263,7 @@ var TableComponent = forwardRef15(function Table({
8148
8263
  },
8149
8264
  [readyColumns]
8150
8265
  );
8151
- const dataAfterFilter = useMemo8(
8266
+ const dataAfterFilter = useMemo9(
8152
8267
  () => data.filter(
8153
8268
  (item) => Object.entries(filterData).every(([columnIndex, filter]) => {
8154
8269
  if (!filter) return true;
@@ -8177,17 +8292,17 @@ var TableComponent = forwardRef15(function Table({
8177
8292
  ),
8178
8293
  [data, filterData]
8179
8294
  );
8180
- const dataAfterPagination = useMemo8(() => {
8295
+ const dataAfterPagination = useMemo9(() => {
8181
8296
  if (pageSize === void 0) return dataAfterFilter;
8182
8297
  if (pageCount !== void 0) return dataAfterFilter;
8183
8298
  const pageStartItemIndex = (currentPage - 1) * (pageSize ?? 0);
8184
8299
  const pageEndItemIndex = pageStartItemIndex + (pageSize ?? 0);
8185
8300
  return dataAfterFilter.slice(pageStartItemIndex, pageEndItemIndex);
8186
8301
  }, [dataAfterFilter, pageSize, currentPage, pageCount]);
8187
- const everythingIsChecked = useMemo8(() => {
8302
+ const everythingIsChecked = useMemo9(() => {
8188
8303
  return data.length > 0 && checkedItems.every((checked) => checked) && checkedItems.length === data.length;
8189
8304
  }, [data, checkedItems]);
8190
- const possibleFilterListValues = useMemo8(() => {
8305
+ const possibleFilterListValues = useMemo9(() => {
8191
8306
  if (!openedFilterColumn) return [];
8192
8307
  return data.reduce((previousValue, currentValue) => {
8193
8308
  const valueFromList = openedFilterColumn.filter === "list" && openedFilterColumn.getValueForList ? openedFilterColumn.getValueForList(currentValue) : void 0;
@@ -8216,39 +8331,18 @@ var TableComponent = forwardRef15(function Table({
8216
8331
  }, []);
8217
8332
  }, [data, openedFilterColumn, filterForm.values.search]);
8218
8333
  const pageCountInternal = pageCount ?? (pageSize !== void 0 ? Math.ceil(dataAfterFilter.length / pageSize) : 1);
8219
- const paginationItems = useMemo8(() => {
8220
- const halfRange = Math.floor(maximumVisiblePages / 2);
8221
- let startPage = Math.max(1, currentPage - halfRange);
8222
- let endPage = Math.min(pageCountInternal, currentPage + halfRange);
8223
- if (endPage - startPage + 1 < maximumVisiblePages) {
8224
- startPage = Math.max(1, endPage - maximumVisiblePages + 1);
8225
- endPage = Math.min(pageCountInternal, startPage + maximumVisiblePages - 1);
8226
- }
8227
- return Array.from(
8228
- {
8229
- length: endPage - startPage + 1
8230
- },
8231
- (_, index) => startPage + index
8232
- );
8233
- }, [pageCountInternal, currentPage]);
8234
- const onClickNextPage = useCallback11(() => {
8235
- setCurrentPage((oldValue) => oldValue >= pageCountInternal ? pageCountInternal : oldValue + 1);
8236
- }, [pageCountInternal]);
8237
- const onClickPreviousPage = useCallback11(() => {
8238
- setCurrentPage((oldValue) => oldValue <= 1 ? 1 : oldValue - 1);
8239
- }, []);
8240
- const onClickSelectAllFilterListItems = useCallback11(
8334
+ const onClickSelectAllFilterListItems = useCallback12(
8241
8335
  () => setFilterListSelectedItems(possibleFilterListValues.map((item) => item.value)),
8242
8336
  [possibleFilterListValues]
8243
8337
  );
8244
- const onClickDeselectAllFilterListItems = useCallback11(() => setFilterListSelectedItems([]), []);
8245
- useEffect10(() => {
8338
+ const onClickDeselectAllFilterListItems = useCallback12(() => setFilterListSelectedItems([]), []);
8339
+ useEffect11(() => {
8246
8340
  onChangePage?.(currentPage);
8247
8341
  }, [onChangePage, currentPage]);
8248
- useEffect10(() => {
8342
+ useEffect11(() => {
8249
8343
  onChangeFilter?.(filterData);
8250
8344
  }, [onChangeFilter, filterData]);
8251
- useEffect10(() => {
8345
+ useEffect11(() => {
8252
8346
  if (!memoizeFilters) return;
8253
8347
  if (!name) return;
8254
8348
  localStorage.setItem(
@@ -8259,7 +8353,7 @@ var TableComponent = forwardRef15(function Table({
8259
8353
  })
8260
8354
  );
8261
8355
  }, [memoizeFilters, name, filterData]);
8262
- useEffect10(() => {
8356
+ useEffect11(() => {
8263
8357
  onChangeFilterDataValue?.(dataAfterFilter);
8264
8358
  }, [onChangeFilterDataValue, dataAfterFilter]);
8265
8359
  useImperativeHandle2(
@@ -8276,8 +8370,8 @@ var TableComponent = forwardRef15(function Table({
8276
8370
  );
8277
8371
  const withFooter = pageSize !== void 0 && pageCountInternal > 1;
8278
8372
  const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages / 1.4;
8279
- return /* @__PURE__ */ jsxs18(Fragment7, { children: [
8280
- /* @__PURE__ */ jsx22(
8373
+ return /* @__PURE__ */ jsxs19(Fragment7, { children: [
8374
+ /* @__PURE__ */ jsx23(
8281
8375
  Div_default,
8282
8376
  {
8283
8377
  border: `1px solid ${theme2.colors.border}`,
@@ -8285,7 +8379,7 @@ var TableComponent = forwardRef15(function Table({
8285
8379
  overflow: !containsOverflowComponents ? "auto" : void 0,
8286
8380
  ...props,
8287
8381
  ref: wrapperComponentRef,
8288
- children: /* @__PURE__ */ jsxs18(
8382
+ children: /* @__PURE__ */ jsxs19(
8289
8383
  TableStyledComponent,
8290
8384
  {
8291
8385
  isStriped,
@@ -8296,14 +8390,14 @@ var TableComponent = forwardRef15(function Table({
8296
8390
  containsOverflowComponents,
8297
8391
  withFooter,
8298
8392
  children: [
8299
- /* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsx22("tr", { className: "isHeader", children: readyColumns.map((column, index) => /* @__PURE__ */ jsx22(
8393
+ /* @__PURE__ */ jsx23("thead", { children: /* @__PURE__ */ jsx23("tr", { className: "isHeader", children: readyColumns.map((column, index) => /* @__PURE__ */ jsx23(
8300
8394
  ThStyledComponent,
8301
8395
  {
8302
8396
  width: column.width ?? (column.type === "image" ? defaultImageWidth : column.type === "checkbox" ? 26 : column.type === "expand" ? 16 : void 0),
8303
8397
  minWidth: column.minWidth,
8304
8398
  maxWidth: column.maxWidth,
8305
8399
  textAlign: column.align,
8306
- children: /* @__PURE__ */ jsxs18(
8400
+ children: /* @__PURE__ */ jsxs19(
8307
8401
  Div_default.row,
8308
8402
  {
8309
8403
  width: "100%",
@@ -8311,15 +8405,15 @@ var TableComponent = forwardRef15(function Table({
8311
8405
  justifyContent: column.filter ? "space-between" : column.align === "center" ? "center" : column.align === "right" ? "flex-end" : "flex-start",
8312
8406
  gap: theme2.styles.gap,
8313
8407
  children: [
8314
- column.type === "checkbox" && onClickAllCheckboxes ? /* @__PURE__ */ jsx22(
8408
+ column.type === "checkbox" && onClickAllCheckboxes ? /* @__PURE__ */ jsx23(
8315
8409
  ToggleInput_default.checkbox,
8316
8410
  {
8317
8411
  checked: everythingIsChecked,
8318
8412
  disabled: data.length === 0,
8319
8413
  onChange: onClickAllCheckboxesElement
8320
8414
  }
8321
- ) : column.label ? column.renderLabel ? column.renderLabel(column.label) : /* @__PURE__ */ jsx22(Text_default, { children: column.label }) : void 0,
8322
- column.filter && /* @__PURE__ */ jsx22(
8415
+ ) : column.label ? column.renderLabel ? column.renderLabel(column.label) : /* @__PURE__ */ jsx23(Text_default, { children: column.label }) : void 0,
8416
+ column.filter && /* @__PURE__ */ jsx23(
8323
8417
  Button_default.icon,
8324
8418
  {
8325
8419
  icon: "filter",
@@ -8334,14 +8428,14 @@ var TableComponent = forwardRef15(function Table({
8334
8428
  },
8335
8429
  column.type + column.label + index
8336
8430
  )) }) }),
8337
- /* @__PURE__ */ jsx22("tbody", { children: isLoading ? /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: readyColumns.length, children: /* @__PURE__ */ jsx22(Loader_default.box, {}) }) }) : dataAfterPagination.length > 0 ? dataAfterPagination.map((item, rowIndex) => /* @__PURE__ */ jsxs18(Fragment6, { children: [
8338
- /* @__PURE__ */ jsx22(
8431
+ /* @__PURE__ */ jsx23("tbody", { children: isLoading ? /* @__PURE__ */ jsx23("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx23("td", { className: "noData", colSpan: readyColumns.length, children: /* @__PURE__ */ jsx23(Loader_default.box, {}) }) }) : dataAfterPagination.length > 0 ? dataAfterPagination.map((item, rowIndex) => /* @__PURE__ */ jsxs19(Fragment6, { children: [
8432
+ /* @__PURE__ */ jsx23(
8339
8433
  "tr",
8340
8434
  {
8341
8435
  className: isInsideTableExpandRow && onClickRow === void 0 && expandColumn === void 0 ? "withoutHover" : void 0,
8342
8436
  style: getRowStyle?.(item, rowIndex),
8343
8437
  onClick: () => onClickRowElement(item, rowIndex),
8344
- children: readyColumns.map((column, colIndex) => /* @__PURE__ */ jsx22(
8438
+ children: readyColumns.map((column, colIndex) => /* @__PURE__ */ jsx23(
8345
8439
  TdStyledComponent,
8346
8440
  {
8347
8441
  textAlign: column.align,
@@ -8354,9 +8448,9 @@ var TableComponent = forwardRef15(function Table({
8354
8448
  ))
8355
8449
  }
8356
8450
  ),
8357
- expandedRows[rowIndex] && /* @__PURE__ */ jsx22("tr", { className: "withoutHover isExpandRow", children: /* @__PURE__ */ jsx22("td", { colSpan: readyColumns.length, children: renderExpandedRow(item, rowIndex) }) })
8358
- ] }, JSON.stringify(item) + rowIndex)) : /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: readyColumns.length, children: /* @__PURE__ */ jsx22(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
8359
- withFooter && /* @__PURE__ */ jsx22("tfoot", { children: /* @__PURE__ */ jsx22("tr", { className: "isFooter", children: /* @__PURE__ */ jsx22("td", { colSpan: readyColumns.length, children: /* @__PURE__ */ jsxs18(
8451
+ expandedRows[rowIndex] && /* @__PURE__ */ jsx23("tr", { className: "withoutHover isExpandRow", children: /* @__PURE__ */ jsx23("td", { colSpan: readyColumns.length, children: renderExpandedRow(item, rowIndex) }) })
8452
+ ] }, JSON.stringify(item) + rowIndex)) : /* @__PURE__ */ jsx23("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx23("td", { className: "noData", colSpan: readyColumns.length, children: /* @__PURE__ */ jsx23(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
8453
+ withFooter && /* @__PURE__ */ jsx23("tfoot", { children: /* @__PURE__ */ jsx23("tr", { className: "isFooter", children: /* @__PURE__ */ jsx23("td", { colSpan: readyColumns.length, children: /* @__PURE__ */ jsxs19(
8360
8454
  Div_default.column,
8361
8455
  {
8362
8456
  position: "relative",
@@ -8365,7 +8459,7 @@ var TableComponent = forwardRef15(function Table({
8365
8459
  flexReverse: true,
8366
8460
  gap: theme2.styles.gap / 2,
8367
8461
  children: [
8368
- /* @__PURE__ */ jsxs18(
8462
+ /* @__PURE__ */ jsxs19(
8369
8463
  Text_default,
8370
8464
  {
8371
8465
  position: mobileFooterBreakingPoint ? "relative" : "absolute",
@@ -8380,73 +8474,17 @@ var TableComponent = forwardRef15(function Table({
8380
8474
  ]
8381
8475
  }
8382
8476
  ),
8383
- /* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", justifyContent: "center", gap: theme2.styles.gap * 2, children: [
8384
- pageCountInternal > maximumVisiblePages && /* @__PURE__ */ jsx22(
8385
- Button_default.icon,
8386
- {
8387
- icon: "doubleChevronLeft",
8388
- disabled: currentPage === 1,
8389
- value: 1,
8390
- onClickWithValue: setCurrentPage
8391
- }
8392
- ),
8393
- /* @__PURE__ */ jsx22(
8394
- Button_default.icon,
8395
- {
8396
- icon: "chevronLeft",
8397
- disabled: currentPage === 1,
8398
- onClick: onClickPreviousPage
8399
- }
8400
- ),
8401
- /* @__PURE__ */ jsx22(
8402
- Div_default.row,
8403
- {
8404
- alignItems: "center",
8405
- justifyContent: "center",
8406
- flexWrap: mobileFooterBreakingPoint ? "wrap" : void 0,
8407
- gap: theme2.styles.gap,
8408
- children: paginationItems.map((pageIndex) => {
8409
- const isActive = currentPage === pageIndex;
8410
- return /* @__PURE__ */ jsx22(
8411
- Div_default,
8412
- {
8413
- cursor: "pointer",
8414
- userSelect: "none",
8415
- value: pageIndex,
8416
- onClickWithValue: setCurrentPage,
8417
- children: /* @__PURE__ */ jsx22(
8418
- Text_default,
8419
- {
8420
- fontWeight: isActive ? 700 : 400,
8421
- color: isActive ? theme2.colors.primary : theme2.colors.textSecondary,
8422
- transition: theme2.styles.transition,
8423
- children: pageIndex
8424
- }
8425
- )
8426
- },
8427
- pageIndex
8428
- );
8429
- })
8430
- }
8431
- ),
8432
- /* @__PURE__ */ jsx22(
8433
- Button_default.icon,
8434
- {
8435
- icon: "chevronRight",
8436
- disabled: currentPage === pageCountInternal,
8437
- onClick: onClickNextPage
8438
- }
8439
- ),
8440
- pageCountInternal > maximumVisiblePages && /* @__PURE__ */ jsx22(
8441
- Button_default.icon,
8442
- {
8443
- icon: "doubleChevronRight",
8444
- disabled: currentPage === pageCountInternal,
8445
- onClickWithValue: setCurrentPage,
8446
- value: pageCountInternal
8447
- }
8448
- )
8449
- ] })
8477
+ /* @__PURE__ */ jsx23(
8478
+ Pagination_default,
8479
+ {
8480
+ currentPage,
8481
+ itemsLength: dataAfterFilter.length,
8482
+ itemsPerPage: pageSize,
8483
+ pageCount,
8484
+ maximumVisiblePages,
8485
+ onChangePage: setCurrentPage
8486
+ }
8487
+ )
8450
8488
  ]
8451
8489
  }
8452
8490
  ) }) }) })
@@ -8455,26 +8493,26 @@ var TableComponent = forwardRef15(function Table({
8455
8493
  )
8456
8494
  }
8457
8495
  ),
8458
- /* @__PURE__ */ jsx22(
8496
+ /* @__PURE__ */ jsx23(
8459
8497
  Modal_default,
8460
8498
  {
8461
8499
  title: `Filter ${openedFilterColumn?.label ?? ""}`,
8462
8500
  description: openedFilterColumn?.filter === "number" ? "Enter minimum and maximum values to filter" : openedFilterColumn?.filter === "date" || openedFilterColumn?.filter === "date-time" ? "Enter minimum and maximum dates to filter" : openedFilterColumn?.filter === "list" ? "Select values to filter from the list bellow" : "",
8463
8501
  onClose: onCloseFilterModal,
8464
8502
  ref: filterModalRef,
8465
- children: openedFilterColumn ? openedFilterColumn.filter === "number" ? /* @__PURE__ */ jsx22(
8503
+ children: openedFilterColumn ? openedFilterColumn.filter === "number" ? /* @__PURE__ */ jsx23(
8466
8504
  Form_default,
8467
8505
  {
8468
8506
  form: filterForm,
8469
8507
  submitButtonText: "Filter",
8470
8508
  cancelButtonText: "Clear",
8471
8509
  onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
8472
- children: /* @__PURE__ */ jsxs18(FormRow_default, { children: [
8473
- /* @__PURE__ */ jsx22(InputField_default, { type: "number", label: "Min", ...filterForm.getInputFieldProps("min") }),
8474
- /* @__PURE__ */ jsx22(InputField_default, { type: "number", label: "Max", ...filterForm.getInputFieldProps("max") })
8510
+ children: /* @__PURE__ */ jsxs19(FormRow_default, { children: [
8511
+ /* @__PURE__ */ jsx23(InputField_default, { type: "number", label: "Min", ...filterForm.getInputFieldProps("min") }),
8512
+ /* @__PURE__ */ jsx23(InputField_default, { type: "number", label: "Max", ...filterForm.getInputFieldProps("max") })
8475
8513
  ] })
8476
8514
  }
8477
- ) : openedFilterColumn.filter === "date" || openedFilterColumn.filter === "date-time" ? /* @__PURE__ */ jsxs18(
8515
+ ) : openedFilterColumn.filter === "date" || openedFilterColumn.filter === "date-time" ? /* @__PURE__ */ jsxs19(
8478
8516
  Form_default,
8479
8517
  {
8480
8518
  form: filterForm,
@@ -8483,16 +8521,16 @@ var TableComponent = forwardRef15(function Table({
8483
8521
  cancelButtonText: "Clear",
8484
8522
  onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
8485
8523
  children: [
8486
- /* @__PURE__ */ jsx22(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */ jsxs18(Fragment7, { children: [
8487
- /* @__PURE__ */ jsx22(InputField_default.date, { label: "Min", ...filterForm.getInputFieldProps("min") }),
8488
- /* @__PURE__ */ jsx22(InputField_default.date, { label: "Max", ...filterForm.getInputFieldProps("max") })
8489
- ] }) : /* @__PURE__ */ jsxs18(Fragment7, { children: [
8490
- /* @__PURE__ */ jsx22(InputField_default.dateTime, { label: "Min", ...filterForm.getInputFieldProps("min") }),
8491
- /* @__PURE__ */ jsx22(InputField_default.dateTime, { label: "Max", ...filterForm.getInputFieldProps("max") })
8524
+ /* @__PURE__ */ jsx23(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */ jsxs19(Fragment7, { children: [
8525
+ /* @__PURE__ */ jsx23(InputField_default.date, { label: "Min", ...filterForm.getInputFieldProps("min") }),
8526
+ /* @__PURE__ */ jsx23(InputField_default.date, { label: "Max", ...filterForm.getInputFieldProps("max") })
8527
+ ] }) : /* @__PURE__ */ jsxs19(Fragment7, { children: [
8528
+ /* @__PURE__ */ jsx23(InputField_default.dateTime, { label: "Min", ...filterForm.getInputFieldProps("min") }),
8529
+ /* @__PURE__ */ jsx23(InputField_default.dateTime, { label: "Max", ...filterForm.getInputFieldProps("max") })
8492
8530
  ] }) }),
8493
- openedFilterColumn.presets && /* @__PURE__ */ jsxs18(Div_default.column, { gap: theme2.styles.gap / 2, children: [
8494
- /* @__PURE__ */ jsx22(Label_default, { text: "Presets" }),
8495
- /* @__PURE__ */ jsx22(Div_default.row, { alignItems: "center", flexWrap: "wrap", gap: theme2.styles.gap, children: openedFilterColumn.presets.map((preset) => /* @__PURE__ */ jsx22(
8531
+ openedFilterColumn.presets && /* @__PURE__ */ jsxs19(Div_default.column, { gap: theme2.styles.gap / 2, children: [
8532
+ /* @__PURE__ */ jsx23(Label_default, { text: "Presets" }),
8533
+ /* @__PURE__ */ jsx23(Div_default.row, { alignItems: "center", flexWrap: "wrap", gap: theme2.styles.gap, children: openedFilterColumn.presets.map((preset) => /* @__PURE__ */ jsx23(
8496
8534
  Button_default.secondary,
8497
8535
  {
8498
8536
  text: filterPresetsText[preset],
@@ -8505,14 +8543,14 @@ var TableComponent = forwardRef15(function Table({
8505
8543
  ] })
8506
8544
  ]
8507
8545
  }
8508
- ) : openedFilterColumn.filter === "list" ? /* @__PURE__ */ jsxs18(
8546
+ ) : openedFilterColumn.filter === "list" ? /* @__PURE__ */ jsxs19(
8509
8547
  Form_default,
8510
8548
  {
8511
8549
  gap: theme2.styles.space,
8512
8550
  submitButtonText: "Filter",
8513
8551
  cancelButtonText: "Clear",
8514
- renderActionButtons: /* @__PURE__ */ jsxs18(Div_default.row, { marginRight: "auto", alignItems: "center", gap: theme2.styles.gap, children: [
8515
- /* @__PURE__ */ jsx22(
8552
+ renderActionButtons: /* @__PURE__ */ jsxs19(Div_default.row, { marginRight: "auto", alignItems: "center", gap: theme2.styles.gap, children: [
8553
+ /* @__PURE__ */ jsx23(
8516
8554
  Button_default.secondary,
8517
8555
  {
8518
8556
  text: "Select All",
@@ -8521,7 +8559,7 @@ var TableComponent = forwardRef15(function Table({
8521
8559
  onClick: onClickSelectAllFilterListItems
8522
8560
  }
8523
8561
  ),
8524
- /* @__PURE__ */ jsx22(
8562
+ /* @__PURE__ */ jsx23(
8525
8563
  Button_default.secondary,
8526
8564
  {
8527
8565
  text: "Deselect All",
@@ -8534,7 +8572,7 @@ var TableComponent = forwardRef15(function Table({
8534
8572
  onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
8535
8573
  onSubmit: filterForm.onSubmit,
8536
8574
  children: [
8537
- openedFilterColumn?.withSearch && /* @__PURE__ */ jsx22(FormRow_default, { oneItemOnly: true, children: /* @__PURE__ */ jsx22(
8575
+ openedFilterColumn?.withSearch && /* @__PURE__ */ jsx23(FormRow_default, { oneItemOnly: true, children: /* @__PURE__ */ jsx23(
8538
8576
  InputField_default.search,
8539
8577
  {
8540
8578
  label: "Search",
@@ -8542,19 +8580,19 @@ var TableComponent = forwardRef15(function Table({
8542
8580
  ...filterForm.getInputFieldProps("search")
8543
8581
  }
8544
8582
  ) }),
8545
- /* @__PURE__ */ jsxs18(Div_default.column, { gap: theme2.styles.gap / 2, children: [
8546
- /* @__PURE__ */ jsx22(Label_default, { text: "Possible values" }),
8547
- /* @__PURE__ */ jsx22(Div_default.row, { flexWrap: "wrap", gap: theme2.styles.gap, children: possibleFilterListValues.length > 0 ? possibleFilterListValues.map((value) => {
8583
+ /* @__PURE__ */ jsxs19(Div_default.column, { gap: theme2.styles.gap / 2, children: [
8584
+ /* @__PURE__ */ jsx23(Label_default, { text: "Possible values" }),
8585
+ /* @__PURE__ */ jsx23(Div_default.row, { flexWrap: "wrap", gap: theme2.styles.gap, children: possibleFilterListValues.length > 0 ? possibleFilterListValues.map((value) => {
8548
8586
  const isActive = filterListSelectedItems?.includes(value.value);
8549
- return /* @__PURE__ */ jsx22(
8587
+ return /* @__PURE__ */ jsx23(
8550
8588
  Div_default.box,
8551
8589
  {
8552
8590
  isActive,
8553
8591
  value: value.value,
8554
8592
  onClickWithValue: onClickFilterListItem,
8555
- children: /* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", gap: theme2.styles.gap / 2, children: [
8556
- /* @__PURE__ */ jsx22(Text_default, { children: value.label || value.value }),
8557
- openedFilterColumn.withTotalNumber && /* @__PURE__ */ jsxs18(
8593
+ children: /* @__PURE__ */ jsxs19(Div_default.row, { alignItems: "center", gap: theme2.styles.gap / 2, children: [
8594
+ /* @__PURE__ */ jsx23(Text_default, { children: value.label || value.value }),
8595
+ openedFilterColumn.withTotalNumber && /* @__PURE__ */ jsxs19(
8558
8596
  Text_default,
8559
8597
  {
8560
8598
  fontSize: 14,
@@ -8570,23 +8608,23 @@ var TableComponent = forwardRef15(function Table({
8570
8608
  },
8571
8609
  value.value
8572
8610
  );
8573
- }) : /* @__PURE__ */ jsx22(Text_default.unknown, { children: "No values" }) })
8611
+ }) : /* @__PURE__ */ jsx23(Text_default.unknown, { children: "No values" }) })
8574
8612
  ] }),
8575
- /* @__PURE__ */ jsx22(Div_default, {})
8613
+ /* @__PURE__ */ jsx23(Div_default, {})
8576
8614
  ]
8577
8615
  }
8578
- ) : /* @__PURE__ */ jsx22(Text_default.unknown, { children: "Unknown filter" }) : /* @__PURE__ */ jsx22(Loader_default.box, {})
8616
+ ) : /* @__PURE__ */ jsx23(Text_default.unknown, { children: "Unknown filter" }) : /* @__PURE__ */ jsx23(Loader_default.box, {})
8579
8617
  }
8580
8618
  )
8581
8619
  ] });
8582
8620
  });
8583
- var Table2 = memo22(TableComponent);
8621
+ var Table2 = memo23(TableComponent);
8584
8622
  var Table_default = Table2;
8585
8623
 
8586
8624
  // src/components/Tooltip.tsx
8587
- import { memo as memo23, useCallback as useCallback12, useRef as useRef7, useState as useState10, useEffect as useEffect11, forwardRef as forwardRef16, useImperativeHandle as useImperativeHandle3, useMemo as useMemo9 } from "react";
8625
+ import { memo as memo24, useCallback as useCallback13, useRef as useRef7, useState as useState11, useEffect as useEffect12, forwardRef as forwardRef16, useImperativeHandle as useImperativeHandle3, useMemo as useMemo10 } from "react";
8588
8626
  import styled13, { css as css3 } from "styled-components";
8589
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
8627
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
8590
8628
  var tooltipContainerStyle = (props) => ({
8591
8629
  top: css3`
8592
8630
  bottom: calc(100% + ${props.gap}px + ${props.arrowSize}px);
@@ -8688,10 +8726,10 @@ var arrowStyle = (props, borderWidth) => ({
8688
8726
  transform: !borderWidth && props.align === "center" ? "translateY(-50%);" : void 0
8689
8727
  }
8690
8728
  });
8691
- var Arrow = memo23(function Arrow2(props) {
8729
+ var Arrow = memo24(function Arrow2(props) {
8692
8730
  const theme2 = useTheme();
8693
8731
  const { position, size } = props;
8694
- const outerProps = useMemo9(
8732
+ const outerProps = useMemo10(
8695
8733
  () => ({
8696
8734
  ...props,
8697
8735
  color: theme2.colors.border
@@ -8699,7 +8737,7 @@ var Arrow = memo23(function Arrow2(props) {
8699
8737
  [props, theme2]
8700
8738
  );
8701
8739
  const borderWidth = 1;
8702
- return /* @__PURE__ */ jsx23(
8740
+ return /* @__PURE__ */ jsx24(
8703
8741
  Div_default,
8704
8742
  {
8705
8743
  position: "absolute",
@@ -8707,7 +8745,7 @@ var Arrow = memo23(function Arrow2(props) {
8707
8745
  height: 0,
8708
8746
  border: `${size}px solid transparent`,
8709
8747
  ...arrowStyle(outerProps)[position],
8710
- children: /* @__PURE__ */ jsx23(
8748
+ children: /* @__PURE__ */ jsx24(
8711
8749
  Div_default,
8712
8750
  {
8713
8751
  position: "absolute",
@@ -8743,13 +8781,13 @@ var TooltipComponent = forwardRef16(function Tooltip({
8743
8781
  const contentRef = useRef7(null);
8744
8782
  const tooltipContainerRef = useRef7(null);
8745
8783
  const closeTimerRef = useRef7(void 0);
8746
- const [isOpen, setIsOpen] = useState10(false);
8747
- const [isOpenLate, setIsOpenLate] = useState10(false);
8784
+ const [isOpen, setIsOpen] = useState11(false);
8785
+ const [isOpenLate, setIsOpenLate] = useState11(false);
8748
8786
  const arrowSize = withArrow ? theme2.styles.gap : 0;
8749
8787
  const gap = theme2.styles.gap / 2;
8750
8788
  const outsideScreenGap = theme2.styles.gap / 2;
8751
8789
  const totalGap = arrowSize + gap;
8752
- const openTooltip = useCallback12(() => {
8790
+ const openTooltip = useCallback13(() => {
8753
8791
  if (closeTimerRef.current) clearTimeout(closeTimerRef.current);
8754
8792
  setIsOpen(true);
8755
8793
  setIsOpenLate(true);
@@ -8773,18 +8811,18 @@ var TooltipComponent = forwardRef16(function Tooltip({
8773
8811
  }, 1);
8774
8812
  onOpen?.();
8775
8813
  }, [onOpen, outsideScreenGap, totalGap]);
8776
- const closeTooltip = useCallback12(() => {
8814
+ const closeTooltip = useCallback13(() => {
8777
8815
  setIsOpen(false);
8778
8816
  closeTimerRef.current = setTimeout(() => setIsOpenLate(false), 300);
8779
8817
  onClose?.();
8780
8818
  }, [onClose]);
8781
- const onMouseEnter = useCallback12(() => {
8819
+ const onMouseEnter = useCallback13(() => {
8782
8820
  if (trigger === "hover") openTooltip();
8783
8821
  }, [trigger, openTooltip]);
8784
- const onMouseLeave = useCallback12(() => {
8822
+ const onMouseLeave = useCallback13(() => {
8785
8823
  if (trigger === "hover") closeTooltip();
8786
8824
  }, [trigger, closeTooltip]);
8787
- const onClickHolder = useCallback12(
8825
+ const onClickHolder = useCallback13(
8788
8826
  (event) => {
8789
8827
  if (trigger === "click") {
8790
8828
  if (!isOpen) openTooltip();
@@ -8793,7 +8831,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
8793
8831
  },
8794
8832
  [trigger, openTooltip, isOpen, closeTooltip]
8795
8833
  );
8796
- const onClickOutside = useCallback12(
8834
+ const onClickOutside = useCallback13(
8797
8835
  (event) => {
8798
8836
  if (!isOpen) return;
8799
8837
  if (trigger !== "click") return;
@@ -8803,7 +8841,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
8803
8841
  },
8804
8842
  [trigger, isOpen, closeTooltip]
8805
8843
  );
8806
- useEffect11(() => {
8844
+ useEffect12(() => {
8807
8845
  if (trigger === "click") {
8808
8846
  document.addEventListener("mousedown", onClickOutside);
8809
8847
  return () => {
@@ -8822,7 +8860,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
8822
8860
  },
8823
8861
  [isOpen, openTooltip, closeTooltip]
8824
8862
  );
8825
- return /* @__PURE__ */ jsxs19(
8863
+ return /* @__PURE__ */ jsxs20(
8826
8864
  Div_default,
8827
8865
  {
8828
8866
  position: "relative",
@@ -8832,7 +8870,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
8832
8870
  onMouseEnter,
8833
8871
  onMouseLeave,
8834
8872
  children: [
8835
- /* @__PURE__ */ jsx23(
8873
+ /* @__PURE__ */ jsx24(
8836
8874
  Div_default,
8837
8875
  {
8838
8876
  width: childrenWrapperWidth,
@@ -8842,7 +8880,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
8842
8880
  children
8843
8881
  }
8844
8882
  ),
8845
- /* @__PURE__ */ jsx23(
8883
+ /* @__PURE__ */ jsx24(
8846
8884
  TooltipContainer,
8847
8885
  {
8848
8886
  theme: theme2,
@@ -8854,8 +8892,8 @@ var TooltipComponent = forwardRef16(function Tooltip({
8854
8892
  isOpen,
8855
8893
  role: "tooltip",
8856
8894
  ref: tooltipContainerRef,
8857
- children: (isOpen || isOpenLate) && /* @__PURE__ */ jsxs19(Div_default, { position: "relative", ref: contentRef, children: [
8858
- /* @__PURE__ */ jsx23(
8895
+ children: (isOpen || isOpenLate) && /* @__PURE__ */ jsxs20(Div_default, { position: "relative", ref: contentRef, children: [
8896
+ /* @__PURE__ */ jsx24(
8859
8897
  Div_default.box,
8860
8898
  {
8861
8899
  position: "relative",
@@ -8869,7 +8907,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
8869
8907
  children: content
8870
8908
  }
8871
8909
  ),
8872
- /* @__PURE__ */ jsx23(
8910
+ /* @__PURE__ */ jsx24(
8873
8911
  Div_default,
8874
8912
  {
8875
8913
  position: "absolute",
@@ -8883,7 +8921,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
8883
8921
  borderTopRightRadius: 999
8884
8922
  }
8885
8923
  ),
8886
- withArrow && /* @__PURE__ */ jsx23(
8924
+ withArrow && /* @__PURE__ */ jsx24(
8887
8925
  Arrow,
8888
8926
  {
8889
8927
  position,
@@ -8915,7 +8953,7 @@ TooltipComponent.item = forwardRef16(function Item({
8915
8953
  onClickWithValue
8916
8954
  }, ref) {
8917
8955
  const theme2 = useTheme();
8918
- return /* @__PURE__ */ jsxs19(
8956
+ return /* @__PURE__ */ jsxs20(
8919
8957
  Div_default.row,
8920
8958
  {
8921
8959
  alignItems: "center",
@@ -8933,10 +8971,10 @@ TooltipComponent.item = forwardRef16(function Item({
8933
8971
  onClickWithValue: !disabled ? onClickWithValue : void 0,
8934
8972
  ref,
8935
8973
  children: [
8936
- icon && /* @__PURE__ */ jsx23(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme2.colors.textSecondary : void 0) }),
8937
- /* @__PURE__ */ jsxs19(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
8938
- /* @__PURE__ */ jsx23(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme2.colors.textPrimary, children: text }),
8939
- description && /* @__PURE__ */ jsx23(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: description })
8974
+ icon && /* @__PURE__ */ jsx24(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme2.colors.textSecondary : void 0) }),
8975
+ /* @__PURE__ */ jsxs20(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
8976
+ /* @__PURE__ */ jsx24(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme2.colors.textPrimary, children: text }),
8977
+ description && /* @__PURE__ */ jsx24(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: description })
8940
8978
  ] })
8941
8979
  ]
8942
8980
  }
@@ -8944,11 +8982,11 @@ TooltipComponent.item = forwardRef16(function Item({
8944
8982
  });
8945
8983
  TooltipComponent.divider = forwardRef16(function DividerComponent(props, ref) {
8946
8984
  const theme2 = useTheme();
8947
- return /* @__PURE__ */ jsx23(Divider_default.horizontal, { marginBlock: theme2.styles.gap, ...props, ref });
8985
+ return /* @__PURE__ */ jsx24(Divider_default.horizontal, { marginBlock: theme2.styles.gap, ...props, ref });
8948
8986
  });
8949
8987
  TooltipComponent.sectionTitle = forwardRef16(function SectionTitle({ text, ...props }, ref) {
8950
8988
  const theme2 = useTheme();
8951
- return /* @__PURE__ */ jsx23(
8989
+ return /* @__PURE__ */ jsx24(
8952
8990
  Text_default,
8953
8991
  {
8954
8992
  fontSize: 12,
@@ -8962,15 +9000,15 @@ TooltipComponent.sectionTitle = forwardRef16(function SectionTitle({ text, ...pr
8962
9000
  }
8963
9001
  );
8964
9002
  });
8965
- var Tooltip2 = memo23(TooltipComponent);
9003
+ var Tooltip2 = memo24(TooltipComponent);
8966
9004
  Tooltip2.item = TooltipComponent.item;
8967
9005
  Tooltip2.divider = TooltipComponent.divider;
8968
9006
  Tooltip2.sectionTitle = TooltipComponent.sectionTitle;
8969
9007
  var Tooltip_default = Tooltip2;
8970
9008
 
8971
9009
  // src/components/Tabs.tsx
8972
- import { forwardRef as forwardRef17, memo as memo24, useCallback as useCallback13, useEffect as useEffect12, useImperativeHandle as useImperativeHandle4, useMemo as useMemo10, useRef as useRef8, useState as useState11 } from "react";
8973
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
9010
+ import { forwardRef as forwardRef17, memo as memo25, useCallback as useCallback14, useEffect as useEffect13, useImperativeHandle as useImperativeHandle4, useMemo as useMemo11, useRef as useRef8, useState as useState12 } from "react";
9011
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
8974
9012
  var tabBottomLineWidth = 2;
8975
9013
  var tabDotSize = 6;
8976
9014
  var defaultTabName = "tab";
@@ -8981,7 +9019,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
8981
9019
  const { colorTheme, componentsState } = useBetterHtmlContextInternal();
8982
9020
  const firstRenderPassedRef = useRef8(false);
8983
9021
  const tabsRef = useRef8({});
8984
- const [selectedTab, setSelectedTab] = useState11(() => {
9022
+ const [selectedTab, setSelectedTab] = useState12(() => {
8985
9023
  const selectedTabValue = tabs[0] ?? "";
8986
9024
  if (urlQuery) {
8987
9025
  const tabQueryValue = urlQuery.getQuery(name ?? defaultTabName);
@@ -8990,9 +9028,9 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
8990
9028
  }
8991
9029
  return selectedTabValue;
8992
9030
  });
8993
- const [rerenderState, setRerenderState] = useState11(0);
9031
+ const [rerenderState, setRerenderState] = useState12(0);
8994
9032
  const tabsGap = style === "box" ? theme2.styles.gap / 2 : 0;
8995
- const onClickTab = useCallback13(
9033
+ const onClickTab = useCallback14(
8996
9034
  (tab) => {
8997
9035
  setSelectedTab(tab);
8998
9036
  onChange?.(tab);
@@ -9004,11 +9042,11 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9004
9042
  },
9005
9043
  [onChange, name, urlQuery]
9006
9044
  );
9007
- const width = useMemo10(
9045
+ const width = useMemo11(
9008
9046
  () => tabsRef.current[selectedTab]?.getBoundingClientRect().width ?? 0,
9009
9047
  [rerenderState, selectedTab]
9010
9048
  );
9011
- const leftSpacing = useMemo10(() => {
9049
+ const leftSpacing = useMemo11(() => {
9012
9050
  const selectedTabIndex = tabs.findIndex((tab) => tab === selectedTab);
9013
9051
  let spacing = 0;
9014
9052
  Object.values(tabsRef.current).forEach((tab, index) => {
@@ -9016,7 +9054,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9016
9054
  });
9017
9055
  return spacing;
9018
9056
  }, [selectedTab, tabs, tabsGap]);
9019
- useEffect12(() => {
9057
+ useEffect13(() => {
9020
9058
  const timeout = setTimeout(() => {
9021
9059
  setRerenderState(Math.random());
9022
9060
  firstRenderPassedRef.current = true;
@@ -9025,7 +9063,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9025
9063
  clearTimeout(timeout);
9026
9064
  };
9027
9065
  }, []);
9028
- useEffect12(() => {
9066
+ useEffect13(() => {
9029
9067
  componentsState.tabs.setTabGroups((oldValue) => {
9030
9068
  const thisTabGroup = oldValue.find((item) => item.name === (name ?? defaultTabName));
9031
9069
  if (thisTabGroup) {
@@ -9046,13 +9084,13 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9046
9084
  }
9047
9085
  });
9048
9086
  }, [selectedTab, name]);
9049
- useEffect12(() => {
9087
+ useEffect13(() => {
9050
9088
  tabsRef.current[selectedTab]?.scrollIntoView({
9051
9089
  behavior: firstRenderPassedRef.current ? "smooth" : void 0,
9052
9090
  block: "nearest"
9053
9091
  });
9054
9092
  }, [selectedTab]);
9055
- useEffect12(() => {
9093
+ useEffect13(() => {
9056
9094
  return () => {
9057
9095
  componentsState.tabs.setTabGroups(
9058
9096
  (oldValue) => oldValue.filter((item) => item.name !== (name ?? defaultTabName))
@@ -9069,11 +9107,11 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9069
9107
  },
9070
9108
  [selectedTab, onClickTab]
9071
9109
  );
9072
- return /* @__PURE__ */ jsxs20(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
9073
- /* @__PURE__ */ jsxs20(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
9074
- /* @__PURE__ */ jsx24(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
9110
+ return /* @__PURE__ */ jsxs21(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
9111
+ /* @__PURE__ */ jsxs21(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
9112
+ /* @__PURE__ */ jsx25(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
9075
9113
  const selected = tab === selectedTab;
9076
- return /* @__PURE__ */ jsxs20(
9114
+ return /* @__PURE__ */ jsxs21(
9077
9115
  Div_default,
9078
9116
  {
9079
9117
  position: "relative",
@@ -9094,7 +9132,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9094
9132
  tabsRef.current[tab] = ref2;
9095
9133
  },
9096
9134
  children: [
9097
- componentsState.tabs.tabsWithDots.includes(tab) && /* @__PURE__ */ jsx24(
9135
+ componentsState.tabs.tabsWithDots.includes(tab) && /* @__PURE__ */ jsx25(
9098
9136
  Div_default,
9099
9137
  {
9100
9138
  position: "absolute",
@@ -9107,7 +9145,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9107
9145
  transition: theme2.styles.transition
9108
9146
  }
9109
9147
  ),
9110
- /* @__PURE__ */ jsx24(
9148
+ /* @__PURE__ */ jsx25(
9111
9149
  Text_default,
9112
9150
  {
9113
9151
  fontWeight: 700,
@@ -9122,7 +9160,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9122
9160
  tab
9123
9161
  );
9124
9162
  }) }),
9125
- style !== "box" && /* @__PURE__ */ jsx24(
9163
+ style !== "box" && /* @__PURE__ */ jsx25(
9126
9164
  Div_default,
9127
9165
  {
9128
9166
  position: "absolute",
@@ -9135,16 +9173,16 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
9135
9173
  }
9136
9174
  )
9137
9175
  ] }),
9138
- children && /* @__PURE__ */ jsx24(Div_default, { width: "100%", children })
9176
+ children && /* @__PURE__ */ jsx25(Div_default, { width: "100%", children })
9139
9177
  ] });
9140
9178
  });
9141
9179
  TabsComponent.content = function Content({ tab, tabWithDot, tabsGroupName, isInitialTab, children }) {
9142
9180
  const { componentsState } = useBetterHtmlContextInternal();
9143
- const thisTabGroupData = useMemo10(
9181
+ const thisTabGroupData = useMemo11(
9144
9182
  () => componentsState.tabs.tabGroups.find((item) => item.name === (tabsGroupName ?? defaultTabName)),
9145
9183
  [componentsState.tabs, tabsGroupName]
9146
9184
  );
9147
- useEffect12(() => {
9185
+ useEffect13(() => {
9148
9186
  if (tabWithDot) {
9149
9187
  componentsState.tabs.setTabsWithDots?.((oldValue) => oldValue.includes(tab) ? oldValue : [...oldValue, tab]);
9150
9188
  } else {
@@ -9153,15 +9191,15 @@ TabsComponent.content = function Content({ tab, tabWithDot, tabsGroupName, isIni
9153
9191
  );
9154
9192
  }
9155
9193
  }, [tabWithDot]);
9156
- return (thisTabGroupData ? thisTabGroupData.selectedTab === tab : isInitialTab) ? /* @__PURE__ */ jsx24(Div_default, { width: "100%", children }) : void 0;
9194
+ return (thisTabGroupData ? thisTabGroupData.selectedTab === tab : isInitialTab) ? /* @__PURE__ */ jsx25(Div_default, { width: "100%", children }) : void 0;
9157
9195
  };
9158
- var Tabs2 = memo24(TabsComponent);
9196
+ var Tabs2 = memo25(TabsComponent);
9159
9197
  Tabs2.content = TabsComponent.content;
9160
9198
  var Tabs_default = Tabs2;
9161
9199
 
9162
9200
  // src/components/Foldable.tsx
9163
- import { forwardRef as forwardRef18, memo as memo25, useCallback as useCallback14, useEffect as useEffect13, useImperativeHandle as useImperativeHandle5, useRef as useRef9, useState as useState12 } from "react";
9164
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
9201
+ import { forwardRef as forwardRef18, memo as memo26, useCallback as useCallback15, useEffect as useEffect14, useImperativeHandle as useImperativeHandle5, useRef as useRef9, useState as useState13 } from "react";
9202
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
9165
9203
  var animationDurationClose = 0.15;
9166
9204
  var animationDurationOpen = animationDurationClose * 2;
9167
9205
  var FoldableComponent = forwardRef18(function Foldable({
@@ -9181,21 +9219,21 @@ var FoldableComponent = forwardRef18(function Foldable({
9181
9219
  const theme2 = useTheme();
9182
9220
  const bodyRef = useRef9(null);
9183
9221
  const [internalIsOpen, setInternalIsOpen] = useBooleanState(defaultOpen);
9184
- const [bodyVirtualHeight, setBodyVirtualHeight] = useState12();
9222
+ const [bodyVirtualHeight, setBodyVirtualHeight] = useState13();
9185
9223
  const isOpen = controlledIsOpen !== void 0 ? controlledIsOpen : internalIsOpen;
9186
- const open = useCallback14(() => {
9224
+ const open = useCallback15(() => {
9187
9225
  if (controlledIsOpen === void 0) setInternalIsOpen.setTrue();
9188
9226
  onOpenChange?.(true);
9189
9227
  }, [controlledIsOpen, onOpenChange]);
9190
- const close = useCallback14(() => {
9228
+ const close = useCallback15(() => {
9191
9229
  if (controlledIsOpen === void 0) setInternalIsOpen.setFalse();
9192
9230
  onOpenChange?.(false);
9193
9231
  }, [controlledIsOpen, onOpenChange]);
9194
- const toggleOpen = useCallback14(() => {
9232
+ const toggleOpen = useCallback15(() => {
9195
9233
  if (controlledIsOpen === void 0) setInternalIsOpen.toggle();
9196
9234
  onOpenChange?.(!isOpen);
9197
9235
  }, [controlledIsOpen, isOpen, onOpenChange]);
9198
- useEffect13(() => {
9236
+ useEffect14(() => {
9199
9237
  if (!bodyRef.current) return;
9200
9238
  const body = bodyRef.current;
9201
9239
  setBodyVirtualHeight(body.scrollHeight * 2);
@@ -9206,7 +9244,7 @@ var FoldableComponent = forwardRef18(function Foldable({
9206
9244
  clearTimeout(timeout);
9207
9245
  };
9208
9246
  }, [isOpen]);
9209
- useEffect13(() => {
9247
+ useEffect14(() => {
9210
9248
  if (!isOpen) return;
9211
9249
  if (!bodyRef.current) return;
9212
9250
  const observer = new ResizeObserver(() => {
@@ -9230,8 +9268,8 @@ var FoldableComponent = forwardRef18(function Foldable({
9230
9268
  },
9231
9269
  [open, close, toggleOpen, isOpen]
9232
9270
  );
9233
- return /* @__PURE__ */ jsxs21(Div_default.column, { width: "100%", ...props, children: [
9234
- renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */ jsxs21(
9271
+ return /* @__PURE__ */ jsxs22(Div_default.column, { width: "100%", ...props, children: [
9272
+ renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */ jsxs22(
9235
9273
  Div_default.row,
9236
9274
  {
9237
9275
  width: "100%",
@@ -9243,15 +9281,15 @@ var FoldableComponent = forwardRef18(function Foldable({
9243
9281
  onClick: toggleOpen,
9244
9282
  userSelect: "none",
9245
9283
  children: [
9246
- /* @__PURE__ */ jsxs21(Div_default.row, { flex: 1, alignItems: "center", gap: theme2.styles.space, children: [
9247
- icon && /* @__PURE__ */ jsx25(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
9248
- image && /* @__PURE__ */ jsx25(Image_default.profileImage, { name: image, size: 24, flexShrink: 0 }),
9249
- /* @__PURE__ */ jsxs21(Div_default.column, { gap: theme2.styles.gap / 2, children: [
9250
- title && /* @__PURE__ */ jsx25(Text_default, { as: "h3", fontWeight: 700, lineHeight: "20px", children: title }),
9251
- description && /* @__PURE__ */ jsx25(Text_default, { color: theme2.colors.textSecondary, children: description })
9284
+ /* @__PURE__ */ jsxs22(Div_default.row, { flex: 1, alignItems: "center", gap: theme2.styles.space, children: [
9285
+ icon && /* @__PURE__ */ jsx26(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
9286
+ image && /* @__PURE__ */ jsx26(Image_default.profileImage, { name: image, size: 24, flexShrink: 0 }),
9287
+ /* @__PURE__ */ jsxs22(Div_default.column, { gap: theme2.styles.gap / 2, children: [
9288
+ title && /* @__PURE__ */ jsx26(Text_default, { as: "h3", fontWeight: 700, lineHeight: "20px", children: title }),
9289
+ description && /* @__PURE__ */ jsx26(Text_default, { color: theme2.colors.textSecondary, children: description })
9252
9290
  ] })
9253
9291
  ] }),
9254
- /* @__PURE__ */ jsx25(
9292
+ /* @__PURE__ */ jsx26(
9255
9293
  Icon_default,
9256
9294
  {
9257
9295
  name: "chevronDown",
@@ -9262,8 +9300,8 @@ var FoldableComponent = forwardRef18(function Foldable({
9262
9300
  ]
9263
9301
  }
9264
9302
  ),
9265
- /* @__PURE__ */ jsx25(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx25(Divider_default.horizontal, {}) }),
9266
- /* @__PURE__ */ jsx25(
9303
+ /* @__PURE__ */ jsx26(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx26(Divider_default.horizontal, {}) }),
9304
+ /* @__PURE__ */ jsx26(
9267
9305
  Div_default,
9268
9306
  {
9269
9307
  maxHeight: isOpen ? bodyVirtualHeight : 0,
@@ -9272,14 +9310,14 @@ var FoldableComponent = forwardRef18(function Foldable({
9272
9310
  overflow: !isOpen ? "hidden" : void 0,
9273
9311
  pointerEvents: !isOpen ? "none" : void 0,
9274
9312
  ref: bodyRef,
9275
- children: /* @__PURE__ */ jsx25(Div_default, { paddingBlock: theme2.styles.gap, paddingInline: headerPaddingInline, children })
9313
+ children: /* @__PURE__ */ jsx26(Div_default, { paddingBlock: theme2.styles.gap, paddingInline: headerPaddingInline, children })
9276
9314
  }
9277
9315
  )
9278
9316
  ] });
9279
9317
  });
9280
9318
  FoldableComponent.box = forwardRef18(function Box3({ ...props }, ref) {
9281
9319
  const theme2 = useTheme();
9282
- return /* @__PURE__ */ jsx25(
9320
+ return /* @__PURE__ */ jsx26(
9283
9321
  FoldableComponent,
9284
9322
  {
9285
9323
  backgroundColor: theme2.colors.backgroundContent,
@@ -9292,14 +9330,14 @@ FoldableComponent.box = forwardRef18(function Box3({ ...props }, ref) {
9292
9330
  }
9293
9331
  );
9294
9332
  });
9295
- var Foldable2 = memo25(FoldableComponent);
9333
+ var Foldable2 = memo26(FoldableComponent);
9296
9334
  Foldable2.box = FoldableComponent.box;
9297
9335
  var Foldable_default = Foldable2;
9298
9336
 
9299
9337
  // src/components/SideMenu.tsx
9300
- import { memo as memo26, useCallback as useCallback15, useEffect as useEffect14, useMemo as useMemo11 } from "react";
9301
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
9302
- var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9338
+ import { memo as memo27, useCallback as useCallback16, useEffect as useEffect15, useMemo as useMemo12 } from "react";
9339
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
9340
+ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundColor, onClick }) {
9303
9341
  const reactRouterDomPlugin2 = usePlugin("react-router-dom");
9304
9342
  if (!reactRouterDomPlugin2) {
9305
9343
  throw new Error(
@@ -9312,13 +9350,14 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9312
9350
  const location = reactRouterDomPluginConfig.useLocation();
9313
9351
  const { colorTheme, components, sideMenuIsCollapsed } = useBetterHtmlContextInternal();
9314
9352
  const [isOpened, setIsOpened] = useBooleanState();
9315
- const onClickElement = useCallback15(() => {
9353
+ const onClickElement = useCallback16(() => {
9316
9354
  if (item.disabled) return;
9317
9355
  if (item.onClickCloseSideMenu !== false) onClick?.();
9318
9356
  item.onClick?.(item);
9319
9357
  }, [onClick, item]);
9320
9358
  const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
9321
9359
  const isActive = item.href ? location.pathname === "/" ? location.pathname === item.href : location.pathname.startsWith(item.href) && item.href !== "/" : false;
9360
+ const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
9322
9361
  const iconSize = 16;
9323
9362
  const paddingBlock = theme2.styles.gap;
9324
9363
  const paddingLeft = theme2.styles.gap + 2;
@@ -9326,13 +9365,13 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9326
9365
  const lineHeight = 20;
9327
9366
  const lineWidth = 2;
9328
9367
  const lineEndRadius = iconSize / 2 + iconGap * 2;
9329
- const content = /* @__PURE__ */ jsxs22(
9368
+ const content = /* @__PURE__ */ jsxs23(
9330
9369
  Div_default.row,
9331
9370
  {
9332
9371
  alignItems: "center",
9333
9372
  gap: iconGap,
9334
9373
  whiteSpace: "nowrap",
9335
- backgroundColor: isActive ? colorTheme === "dark" ? lightenColor(theme2.colors.primary, 0.7) : lightenColor(theme2.colors.primary, 0.85) : theme2.colors.backgroundContent,
9374
+ backgroundColor: isActive ? colorTheme === "dark" ? lightenColor(theme2.colors.primary, 0.7) : lightenColor(theme2.colors.primary, 0.85) : readyBackgroundColor,
9336
9375
  borderRadius: theme2.styles.borderRadius,
9337
9376
  paddingBlock,
9338
9377
  paddingLeft: isCollapsed ? theme2.styles.space : paddingLeft,
@@ -9343,8 +9382,8 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9343
9382
  opacity: item.disabled ? 0.6 : void 0,
9344
9383
  onClick: item.children ? setIsOpened.toggle : onClickElement,
9345
9384
  children: [
9346
- /* @__PURE__ */ jsx26(Icon_default, { name: item.iconName, color: theme2.colors.primary, size: iconSize, flexShrink: 0 }),
9347
- /* @__PURE__ */ jsx26(
9385
+ /* @__PURE__ */ jsx27(Icon_default, { name: item.iconName, color: theme2.colors.primary, size: iconSize, flexShrink: 0 }),
9386
+ /* @__PURE__ */ jsx27(
9348
9387
  Text_default,
9349
9388
  {
9350
9389
  flex: 1,
@@ -9355,7 +9394,7 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9355
9394
  children: item.text
9356
9395
  }
9357
9396
  ),
9358
- item.children && /* @__PURE__ */ jsx26(
9397
+ item.children && /* @__PURE__ */ jsx27(
9359
9398
  Icon_default,
9360
9399
  {
9361
9400
  name: "chevronDown",
@@ -9368,7 +9407,7 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9368
9407
  ]
9369
9408
  }
9370
9409
  );
9371
- useEffect14(() => {
9410
+ useEffect15(() => {
9372
9411
  if (!item.children) return;
9373
9412
  const toBeOpened = item.children.some(
9374
9413
  (child) => child.href ? location.pathname === "/" ? location.pathname === child.href : location.pathname.startsWith(child.href) && child.href !== "/" : false
@@ -9376,9 +9415,9 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9376
9415
  setIsOpened.setState(toBeOpened);
9377
9416
  }, [item]);
9378
9417
  const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
9379
- return /* @__PURE__ */ jsxs22(Div_default, { width: "100%", children: [
9380
- item.href ? /* @__PURE__ */ jsx26(LinkComponentTag, { to: item.href, href: item.href, onClick: onClickElement, children: content }) : content,
9381
- item.children && /* @__PURE__ */ jsxs22(
9418
+ return /* @__PURE__ */ jsxs23(Div_default, { width: "100%", children: [
9419
+ item.href ? /* @__PURE__ */ jsx27(LinkComponentTag, { to: item.href, href: item.href, onClick: onClickElement, children: content }) : content,
9420
+ item.children && /* @__PURE__ */ jsxs23(
9382
9421
  Div_default.column,
9383
9422
  {
9384
9423
  position: "relative",
@@ -9389,8 +9428,16 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9389
9428
  overflow: "hidden",
9390
9429
  transition: `max-height ${theme2.styles.transition}, margin-top ${theme2.styles.transition}`,
9391
9430
  children: [
9392
- item.children.map((child) => /* @__PURE__ */ jsx26(MenuItemComponent2, { item: child, onClick }, child.text)),
9393
- /* @__PURE__ */ jsxs22(
9431
+ item.children.map((child) => /* @__PURE__ */ jsx27(
9432
+ MenuItemComponent2,
9433
+ {
9434
+ item: child,
9435
+ backgroundColor: readyBackgroundColor,
9436
+ onClick
9437
+ },
9438
+ child.text
9439
+ )),
9440
+ /* @__PURE__ */ jsxs23(
9394
9441
  Div_default,
9395
9442
  {
9396
9443
  position: "absolute",
@@ -9399,7 +9446,7 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9399
9446
  left: paddingLeft + iconSize / 2,
9400
9447
  zIndex: -1,
9401
9448
  children: [
9402
- /* @__PURE__ */ jsx26(
9449
+ /* @__PURE__ */ jsx27(
9403
9450
  Div_default,
9404
9451
  {
9405
9452
  position: "relative",
@@ -9409,7 +9456,7 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9409
9456
  zIndex: 1
9410
9457
  }
9411
9458
  ),
9412
- /* @__PURE__ */ jsx26(
9459
+ /* @__PURE__ */ jsx27(
9413
9460
  Div_default,
9414
9461
  {
9415
9462
  position: "absolute",
@@ -9419,9 +9466,9 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9419
9466
  left: 0,
9420
9467
  border: `${lineWidth}px solid ${theme2.colors.border}`,
9421
9468
  borderRadius: 999,
9422
- borderTopColor: theme2.colors.backgroundContent,
9423
- borderLeftColor: theme2.colors.backgroundContent,
9424
- borderRightColor: theme2.colors.backgroundContent,
9469
+ borderTopColor: readyBackgroundColor,
9470
+ borderLeftColor: readyBackgroundColor,
9471
+ borderRightColor: readyBackgroundColor,
9425
9472
  transform: "rotate(45deg)"
9426
9473
  }
9427
9474
  )
@@ -9443,23 +9490,25 @@ var SideMenuComponent = function SideMenu({
9443
9490
  logoFontFamily,
9444
9491
  collapsable,
9445
9492
  withCloseButton,
9446
- widthMobileHandle
9493
+ widthMobileHandle,
9494
+ backgroundColor
9447
9495
  }) {
9448
9496
  const theme2 = useTheme();
9449
9497
  const mediaQuery = useMediaQuery();
9450
9498
  const { components, sideMenuIsCollapsed, setSideMenuIsCollapsed, sideMenuIsOpenMobile, setSideMenuIsOpenMobile } = useBetterHtmlContextInternal();
9451
- const onClickXButton = useCallback15(() => {
9499
+ const onClickXButton = useCallback16(() => {
9452
9500
  setSideMenuIsOpenMobile.setFalse();
9453
9501
  }, []);
9454
- const readyItems = useMemo11(() => items.filter((item) => !item.hidden), [items]);
9455
- const readyBottomItems = useMemo11(() => bottomItems?.filter((item) => !item.hidden), [bottomItems]);
9502
+ const readyItems = useMemo12(() => items.filter((item) => !item.hidden), [items]);
9503
+ const readyBottomItems = useMemo12(() => bottomItems?.filter((item) => !item.hidden), [bottomItems]);
9456
9504
  const isCollapsable = collapsable && !mediaQuery.size1000;
9457
9505
  const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
9458
9506
  const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
9459
9507
  const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
9460
- const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + 1 + theme2.styles.space;
9508
+ const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
9509
+ const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
9461
9510
  const logoSize = sideMenuCollapsedWidth - theme2.styles.space * 2;
9462
- return /* @__PURE__ */ jsxs22(
9511
+ return /* @__PURE__ */ jsxs23(
9463
9512
  Div_default.column,
9464
9513
  {
9465
9514
  position: "fixed",
@@ -9467,7 +9516,7 @@ var SideMenuComponent = function SideMenu({
9467
9516
  height: `calc(100svh - ${topSpace}px)`,
9468
9517
  top: topSpace,
9469
9518
  left: 0,
9470
- backgroundColor: theme2.colors.backgroundContent,
9519
+ backgroundColor: readyBackgroundColor,
9471
9520
  borderRight: `solid 1px ${theme2.colors.border}`,
9472
9521
  transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : "translateX(-100%)",
9473
9522
  paddingTop: logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space,
@@ -9475,9 +9524,9 @@ var SideMenuComponent = function SideMenu({
9475
9524
  userSelect: "none",
9476
9525
  zIndex: 10,
9477
9526
  children: [
9478
- /* @__PURE__ */ jsxs22(Div_default.column, { width: "100%", height: "100%", gap: theme2.styles.space, children: [
9479
- (logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs22(Div_default.row, { alignItems: "center", paddingInline: theme2.styles.space, children: [
9480
- (logoAssetName || logoUrl) && /* @__PURE__ */ jsx26(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs22(
9527
+ /* @__PURE__ */ jsxs23(Div_default.column, { width: "100%", height: "100%", gap: theme2.styles.space, children: [
9528
+ (logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs23(Div_default.row, { alignItems: "center", paddingInline: theme2.styles.space, children: [
9529
+ (logoAssetName || logoUrl) && /* @__PURE__ */ jsx27(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs23(
9481
9530
  Div_default.row,
9482
9531
  {
9483
9532
  alignItems: "center",
@@ -9486,7 +9535,7 @@ var SideMenuComponent = function SideMenu({
9486
9535
  whiteSpace: "nowrap",
9487
9536
  gap: theme2.styles.gap,
9488
9537
  children: [
9489
- /* @__PURE__ */ jsx26(
9538
+ /* @__PURE__ */ jsx27(
9490
9539
  Image_default,
9491
9540
  {
9492
9541
  name: logoAssetName,
@@ -9496,7 +9545,7 @@ var SideMenuComponent = function SideMenu({
9496
9545
  objectFit: "contain"
9497
9546
  }
9498
9547
  ),
9499
- logoText && /* @__PURE__ */ jsx26(
9548
+ logoText && /* @__PURE__ */ jsx27(
9500
9549
  Text_default,
9501
9550
  {
9502
9551
  fontFamily: logoFontFamily,
@@ -9511,9 +9560,9 @@ var SideMenuComponent = function SideMenu({
9511
9560
  ]
9512
9561
  }
9513
9562
  ) }),
9514
- withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx26(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
9563
+ withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx27(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
9515
9564
  ] }),
9516
- /* @__PURE__ */ jsx26(
9565
+ /* @__PURE__ */ jsx27(
9517
9566
  Div_default.column,
9518
9567
  {
9519
9568
  width: "100%",
@@ -9521,10 +9570,18 @@ var SideMenuComponent = function SideMenu({
9521
9570
  overflowY: "auto",
9522
9571
  paddingInline: theme2.styles.space,
9523
9572
  paddingBottom: !isCollapsable && !readyBottomItems ? theme2.styles.space : void 0,
9524
- children: /* @__PURE__ */ jsx26(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx26(MenuItemComponent, { item, onClick: onClickXButton }, item.text)) })
9573
+ children: /* @__PURE__ */ jsx27(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx27(
9574
+ MenuItemComponent,
9575
+ {
9576
+ item,
9577
+ backgroundColor: readyBackgroundColor,
9578
+ onClick: onClickXButton
9579
+ },
9580
+ item.text
9581
+ )) })
9525
9582
  }
9526
9583
  ),
9527
- readyBottomItems && /* @__PURE__ */ jsx26(
9584
+ readyBottomItems && /* @__PURE__ */ jsx27(
9528
9585
  Div_default.column,
9529
9586
  {
9530
9587
  borderTop: mediaQuery.size1000 ? `solid 1px ${theme2.colors.border}` : void 0,
@@ -9533,29 +9590,37 @@ var SideMenuComponent = function SideMenu({
9533
9590
  paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
9534
9591
  paddingInline: theme2.styles.space,
9535
9592
  paddingBottom: !isCollapsable ? theme2.styles.space : void 0,
9536
- children: readyBottomItems.map((item) => /* @__PURE__ */ jsx26(MenuItemComponent, { item, onClick: onClickXButton }, item.text))
9593
+ children: readyBottomItems.map((item) => /* @__PURE__ */ jsx27(
9594
+ MenuItemComponent,
9595
+ {
9596
+ item,
9597
+ backgroundColor: readyBackgroundColor,
9598
+ onClick: onClickXButton
9599
+ },
9600
+ item.text
9601
+ ))
9537
9602
  }
9538
9603
  ),
9539
- isCollapsable && /* @__PURE__ */ jsx26(
9604
+ isCollapsable && /* @__PURE__ */ jsx27(
9540
9605
  Div_default,
9541
9606
  {
9542
9607
  borderTop: `solid 1px ${theme2.colors.border}`,
9543
9608
  marginTop: !readyBottomItems ? "auto" : void 0,
9544
9609
  paddingInline: theme2.styles.space,
9545
9610
  paddingBlock: theme2.styles.space,
9546
- children: /* @__PURE__ */ jsx26(
9611
+ children: /* @__PURE__ */ jsx27(
9547
9612
  Div_default.row,
9548
9613
  {
9549
9614
  alignItems: "center",
9550
9615
  justifyContent: "center",
9551
- backgroundColor: theme2.colors.backgroundContent,
9616
+ backgroundColor: readyBackgroundColor,
9552
9617
  borderRadius: theme2.styles.borderRadius,
9553
9618
  cursor: "pointer",
9554
9619
  filterHover: filterHover().z1,
9555
9620
  isTabAccessed: true,
9556
9621
  paddingBlock: theme2.styles.gap,
9557
9622
  onClick: setSideMenuIsCollapsed.toggle,
9558
- children: /* @__PURE__ */ jsx26(
9623
+ children: /* @__PURE__ */ jsx27(
9559
9624
  Icon_default,
9560
9625
  {
9561
9626
  name: "chevronRight",
@@ -9570,13 +9635,13 @@ var SideMenuComponent = function SideMenu({
9570
9635
  }
9571
9636
  )
9572
9637
  ] }),
9573
- widthMobileHandle && /* @__PURE__ */ jsx26(
9638
+ widthMobileHandle && /* @__PURE__ */ jsx27(
9574
9639
  Div_default.row,
9575
9640
  {
9576
9641
  position: "absolute",
9577
9642
  top: theme2.styles.space,
9578
9643
  left: "100%",
9579
- backgroundColor: theme2.colors.backgroundContent,
9644
+ backgroundColor: readyBackgroundColor,
9580
9645
  border: `solid 1px ${theme2.colors.border}`,
9581
9646
  borderLeft: "none",
9582
9647
  borderTopRightRadius: theme2.styles.borderRadius,
@@ -9590,7 +9655,7 @@ var SideMenuComponent = function SideMenu({
9590
9655
  transform: !mediaQuery.size1000 ? "translateX(-100%)" : void 0,
9591
9656
  transition: theme2.styles.transition,
9592
9657
  onClick: setSideMenuIsOpenMobile.toggle,
9593
- children: /* @__PURE__ */ jsx26(
9658
+ children: /* @__PURE__ */ jsx27(
9594
9659
  Icon_default,
9595
9660
  {
9596
9661
  name: "chevronRight",
@@ -9611,8 +9676,8 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({ outsideComponent, .
9611
9676
  const mediaQuery = useMediaQuery();
9612
9677
  const { components, sideMenuIsCollapsed } = useBetterHtmlContextInternal();
9613
9678
  const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
9614
- const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + 1 + theme2.styles.space;
9615
- return /* @__PURE__ */ jsxs22(
9679
+ const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
9680
+ return /* @__PURE__ */ jsxs23(
9616
9681
  Div_default,
9617
9682
  {
9618
9683
  position: "relative",
@@ -9621,7 +9686,7 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({ outsideComponent, .
9621
9686
  transition: theme2.styles.transition,
9622
9687
  children: [
9623
9688
  outsideComponent,
9624
- /* @__PURE__ */ jsx26(PageHolder_default, { ...props })
9689
+ /* @__PURE__ */ jsx27(PageHolder_default, { ...props })
9625
9690
  ]
9626
9691
  }
9627
9692
  );
@@ -9631,7 +9696,7 @@ SideMenuComponent.burgerButton = function BurgerButton() {
9631
9696
  const { sideMenuIsOpenMobile, setSideMenuIsOpenMobile } = useBetterHtmlContextInternal();
9632
9697
  const [isHovered, setIsHovered] = useBooleanState();
9633
9698
  const width = 2;
9634
- return /* @__PURE__ */ jsxs22(
9699
+ return /* @__PURE__ */ jsxs23(
9635
9700
  Div_default,
9636
9701
  {
9637
9702
  position: "relative",
@@ -9643,7 +9708,7 @@ SideMenuComponent.burgerButton = function BurgerButton() {
9643
9708
  onMouseOut: setIsHovered.setFalse,
9644
9709
  onClick: setSideMenuIsOpenMobile.toggle,
9645
9710
  children: [
9646
- /* @__PURE__ */ jsx26(
9711
+ /* @__PURE__ */ jsx27(
9647
9712
  Div_default,
9648
9713
  {
9649
9714
  position: "absolute",
@@ -9657,7 +9722,7 @@ SideMenuComponent.burgerButton = function BurgerButton() {
9657
9722
  transition: theme2.styles.transition
9658
9723
  }
9659
9724
  ),
9660
- /* @__PURE__ */ jsx26(
9725
+ /* @__PURE__ */ jsx27(
9661
9726
  Div_default,
9662
9727
  {
9663
9728
  position: "absolute",
@@ -9672,7 +9737,7 @@ SideMenuComponent.burgerButton = function BurgerButton() {
9672
9737
  transition: theme2.styles.transition
9673
9738
  }
9674
9739
  ),
9675
- /* @__PURE__ */ jsx26(
9740
+ /* @__PURE__ */ jsx27(
9676
9741
  Div_default,
9677
9742
  {
9678
9743
  position: "absolute",
@@ -9690,7 +9755,7 @@ SideMenuComponent.burgerButton = function BurgerButton() {
9690
9755
  }
9691
9756
  );
9692
9757
  };
9693
- var SideMenu2 = memo26(SideMenuComponent);
9758
+ var SideMenu2 = memo27(SideMenuComponent);
9694
9759
  SideMenu2.pageHolder = SideMenuComponent.pageHolder;
9695
9760
  SideMenu2.burgerButton = SideMenuComponent.burgerButton;
9696
9761
  var SideMenu_default = SideMenu2;
@@ -9778,6 +9843,7 @@ export {
9778
9843
  Modal_default as Modal,
9779
9844
  PageHeader_default as PageHeader,
9780
9845
  PageHolder_default as PageHolder,
9846
+ Pagination_default as Pagination,
9781
9847
  SideMenu_default as SideMenu,
9782
9848
  Table_default as Table,
9783
9849
  Tabs_default as Tabs,