@ceed/cds 1.9.0 → 1.11.0-next.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.
package/dist/index.js CHANGED
@@ -152,7 +152,7 @@ import {
152
152
  stepperClasses,
153
153
  Skeleton as Skeleton2,
154
154
  skeletonClasses,
155
- styled as styled29
155
+ styled as styled30
156
156
  } from "@mui/joy";
157
157
 
158
158
  // src/components/Accordions/Accordions.tsx
@@ -1846,117 +1846,301 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
1846
1846
  var CurrencyInput_default = CurrencyInput;
1847
1847
 
1848
1848
  // src/components/DataTable/DataTable.tsx
1849
- import React23, {
1850
- useCallback as useCallback9,
1851
- useEffect as useEffect5,
1852
- useMemo as useMemo8,
1853
- useRef as useRef4,
1854
- useState as useState6,
1849
+ import React25, {
1850
+ useCallback as useCallback11,
1851
+ useMemo as useMemo10,
1852
+ useRef as useRef6,
1855
1853
  useId,
1856
1854
  forwardRef as forwardRef7,
1857
1855
  useImperativeHandle as useImperativeHandle2,
1858
- createElement,
1859
- memo,
1860
- useLayoutEffect,
1861
1856
  Fragment as Fragment2
1862
1857
  } from "react";
1863
1858
  import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
1864
- import { styled as styled12, LinearProgress, Link, useTheme, buttonClasses, iconButtonClasses } from "@mui/joy";
1865
- import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
1866
1859
 
1867
- // src/components/Sheet/Sheet.tsx
1868
- import { Sheet as JoySheet } from "@mui/joy";
1869
- import { motion as motion16 } from "framer-motion";
1870
- var MotionSheet = motion16(JoySheet);
1871
- var Sheet = MotionSheet;
1872
- Sheet.displayName = "Sheet";
1873
-
1874
- // src/components/Sheet/index.ts
1875
- var Sheet_default = Sheet;
1876
-
1877
- // src/components/Table/Table.tsx
1878
- import React16 from "react";
1879
- import { Table as JoyTable } from "@mui/joy";
1880
- var Table = (props) => {
1881
- const { children, ...inheritProps } = props;
1882
- return /* @__PURE__ */ React16.createElement(JoyTable, { ...inheritProps }, children);
1883
- };
1884
- Table.displayName = "Table";
1885
- function TableHead(props) {
1886
- const {
1887
- headCells,
1888
- showCheckbox,
1889
- onCheckboxChange,
1890
- slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
1891
- slotProps: { checkbox: checkboxProps = {} } = {}
1892
- } = props;
1893
- return /* @__PURE__ */ React16.createElement("thead", null, /* @__PURE__ */ React16.createElement("tr", null, showCheckbox && /* @__PURE__ */ React16.createElement(
1894
- "th",
1895
- {
1896
- style: {
1897
- width: "40px",
1898
- textAlign: "center"
1899
- }
1900
- },
1901
- /* @__PURE__ */ React16.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
1902
- ), headCells.map((headCell) => /* @__PURE__ */ React16.createElement(
1903
- "th",
1904
- {
1905
- key: headCell.label,
1906
- style: {
1907
- width: headCell.width,
1908
- minWidth: headCell.minWidth,
1909
- maxWidth: headCell.maxWidth,
1910
- textAlign: headCell.numeric ? "right" : "left"
1911
- }
1912
- },
1913
- headCell.label
1914
- ))));
1860
+ // src/components/DataTable/utils.ts
1861
+ function extractFieldsFromGroupingModel(items) {
1862
+ const fields = /* @__PURE__ */ new Set();
1863
+ for (const item of items) {
1864
+ if ("groupId" in item) {
1865
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1866
+ const childFields = extractFieldsFromGroupingModel(children);
1867
+ childFields.forEach((field) => fields.add(field));
1868
+ } else {
1869
+ fields.add(item.field);
1870
+ }
1871
+ }
1872
+ return fields;
1915
1873
  }
1916
- TableHead.displayName = "TableHead";
1917
- function TableBody(props) {
1918
- const {
1919
- rows,
1920
- cellOrder,
1921
- rowOptions,
1922
- showCheckbox,
1923
- onCheckboxChange,
1924
- slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
1925
- slotProps: { checkbox: checkboxProps = {} } = {}
1926
- } = props;
1927
- return /* @__PURE__ */ React16.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React16.createElement("tr", { key: `table-row-${rowIndex}` }, showCheckbox && /* @__PURE__ */ React16.createElement(
1928
- "td",
1929
- {
1930
- style: {
1931
- textAlign: "center"
1874
+ function reorderColumnsByGroupingModel(columns, columnGroupingModel) {
1875
+ const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
1876
+ const orderedFields = [];
1877
+ function collectFieldsInOrder(items) {
1878
+ for (const item of items) {
1879
+ if ("groupId" in item) {
1880
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1881
+ collectFieldsInOrder(children);
1882
+ } else {
1883
+ if (!orderedFields.includes(item.field)) {
1884
+ orderedFields.push(item.field);
1885
+ }
1932
1886
  }
1933
- },
1934
- /* @__PURE__ */ React16.createElement(RenderCheckbox, { onChange: (event) => onCheckboxChange?.(event, rowIndex), ...checkboxProps })
1935
- ), cellOrder.map((cellKey) => /* @__PURE__ */ React16.createElement(
1936
- "td",
1937
- {
1938
- key: cellKey,
1939
- style: {
1940
- textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
1887
+ }
1888
+ }
1889
+ collectFieldsInOrder(columnGroupingModel);
1890
+ const columnMap = new Map(columns.map((col) => [col.field, col]));
1891
+ const reorderedColumns = [];
1892
+ for (const field of orderedFields) {
1893
+ const column = columnMap.get(field);
1894
+ if (column) {
1895
+ reorderedColumns.push(column);
1896
+ }
1897
+ }
1898
+ for (const column of columns) {
1899
+ if (!fieldsInGroupingModel.has(column.field)) {
1900
+ reorderedColumns.push(column);
1901
+ }
1902
+ }
1903
+ return reorderedColumns;
1904
+ }
1905
+ function flattenColumnGroups(items, groupPath = [], columnIndex = { current: 0 }) {
1906
+ const result = [];
1907
+ for (const item of items) {
1908
+ if ("groupId" in item) {
1909
+ const newPath = [...groupPath, item.groupId];
1910
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1911
+ result.push(...flattenColumnGroups(children, newPath, columnIndex));
1912
+ } else {
1913
+ result.push({
1914
+ ...item,
1915
+ groupPath,
1916
+ columnIndex: columnIndex.current++
1917
+ });
1918
+ }
1919
+ }
1920
+ return result;
1921
+ }
1922
+ function calculateColumnGroups(columnGroupingModel, columns) {
1923
+ const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
1924
+ const flattenedColumns = flattenColumnGroups(columnGroupingModel);
1925
+ const columnIndexMap = new Map(flattenedColumns.map((col) => [col.field, col.columnIndex]));
1926
+ const processedGroups = /* @__PURE__ */ new Map();
1927
+ const groupsByLevel = [];
1928
+ let maxLevel = 0;
1929
+ function processGroup(items, level, parentGroupId) {
1930
+ let minIndex = Infinity;
1931
+ let maxIndex = -Infinity;
1932
+ for (const item of items) {
1933
+ if ("groupId" in item) {
1934
+ const groupKey = parentGroupId ? `${parentGroupId}.${item.groupId}` : item.groupId;
1935
+ if (!processedGroups.has(groupKey)) {
1936
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1937
+ const { startIndex, colspan } = processGroup(children, level + 1, groupKey);
1938
+ const group = {
1939
+ groupId: item.groupId,
1940
+ headerName: item.headerName,
1941
+ headerClassName: item.headerClassName,
1942
+ colspan,
1943
+ level,
1944
+ startIndex
1945
+ };
1946
+ processedGroups.set(groupKey, group);
1947
+ if (!groupsByLevel[level]) {
1948
+ groupsByLevel[level] = [];
1949
+ }
1950
+ groupsByLevel[level].push(group);
1951
+ maxLevel = Math.max(maxLevel, level);
1952
+ minIndex = Math.min(minIndex, startIndex);
1953
+ maxIndex = Math.max(maxIndex, startIndex + colspan - 1);
1954
+ }
1955
+ } else {
1956
+ const columnIndex = columnIndexMap.get(item.field);
1957
+ if (columnIndex !== void 0) {
1958
+ minIndex = Math.min(minIndex, columnIndex);
1959
+ maxIndex = Math.max(maxIndex, columnIndex);
1960
+ }
1941
1961
  }
1942
- },
1943
- row[cellKey]
1944
- )))));
1962
+ }
1963
+ return {
1964
+ startIndex: minIndex === Infinity ? 0 : minIndex,
1965
+ colspan: maxIndex === -Infinity ? 0 : maxIndex - minIndex + 1
1966
+ };
1967
+ }
1968
+ processGroup(columnGroupingModel, 0);
1969
+ groupsByLevel.forEach((level) => {
1970
+ level.sort((a, b) => a.startIndex - b.startIndex);
1971
+ });
1972
+ return { groups: groupsByLevel, maxLevel, fieldsInGroupingModel };
1945
1973
  }
1946
- TableBody.displayName = "TableBody";
1974
+ function getTextAlign(props) {
1975
+ return !props.editMode && ["number", "date", "currency"].includes(props.type || "") ? "end" : "start";
1976
+ }
1977
+ var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
1978
+
1979
+ // src/components/DataTable/styled.tsx
1980
+ import React16 from "react";
1981
+ import { styled as styled8, LinearProgress, buttonClasses, iconButtonClasses } from "@mui/joy";
1982
+ import { motion as motion16 } from "framer-motion";
1983
+ import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
1984
+ var EllipsisDiv = styled8("div", {
1985
+ name: "DataTable",
1986
+ slot: "textEllipsis"
1987
+ })({
1988
+ overflow: "hidden",
1989
+ textOverflow: "ellipsis",
1990
+ whiteSpace: "nowrap"
1991
+ });
1992
+ var OverlayWrapper = styled8("tr", {
1993
+ name: "DataTable",
1994
+ slot: "overlayWrapper"
1995
+ })({
1996
+ position: "sticky",
1997
+ top: `calc(var(--unstable_TableCell-height, 32px))`,
1998
+ left: 0,
1999
+ right: 0,
2000
+ zIndex: 1,
2001
+ "& > td": {
2002
+ height: 0,
2003
+ padding: 0,
2004
+ border: "none !important"
2005
+ }
2006
+ });
2007
+ var VirtualizedTableBody = styled8("tbody", {
2008
+ name: "DataTable",
2009
+ slot: "tableBody"
2010
+ })({
2011
+ "&::after": {
2012
+ content: "''",
2013
+ display: "block",
2014
+ height: "0.01em"
2015
+ },
2016
+ [`& .${buttonClasses.root}`]: {
2017
+ "--Button-minHeight": "26px",
2018
+ "--Button-paddingBlock": "0.25rem",
2019
+ lineHeight: 1,
2020
+ marginTop: "-2px",
2021
+ marginBottom: "-2px"
2022
+ },
2023
+ [`& .${iconButtonClasses.root}`]: {
2024
+ "--IconButton-size": "26px",
2025
+ verticalAlign: "middle",
2026
+ marginTop: "-2px",
2027
+ marginBottom: "-2px"
2028
+ }
2029
+ });
2030
+ var StyledTableRow = styled8("tr", {
2031
+ name: "DataTable",
2032
+ slot: "tableRow",
2033
+ shouldForwardProp: (prop) => prop !== "striped"
2034
+ })(({ striped }) => ({
2035
+ ...striped && {
2036
+ backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
2037
+ color: "var(--ceed-palette-text-primary)",
2038
+ "& td": {
2039
+ backgroundColor: "background.surface"
2040
+ }
2041
+ },
2042
+ "&:hover": {
2043
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
2044
+ "& td": {
2045
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
2046
+ }
2047
+ }
2048
+ }));
2049
+ var Asterisk = styled8("span", {
2050
+ name: "DataTable",
2051
+ slot: "headCellAsterisk"
2052
+ })(({ theme }) => ({
2053
+ color: "var(--ceed-palette-danger-500)",
2054
+ marginLeft: theme.spacing(0.5)
2055
+ }));
2056
+ var StyledTh = styled8(motion16.th)(({ theme }) => ({
2057
+ boxShadow: "1px 0 var(--TableCell-borderColor)"
2058
+ }));
2059
+ var StyledTd = styled8("td")(({ theme }) => ({
2060
+ transition: `box-shadow 0.3s`,
2061
+ "&:not(.is-last-left):not(.is-last-right)": {
2062
+ boxShadow: "1px 0 var(--TableCell-borderColor)"
2063
+ },
2064
+ ".ScrollableRight &": {
2065
+ "&.is-last-left": {
2066
+ boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2067
+ }
2068
+ },
2069
+ ".ScrollableLeft &": {
2070
+ "&.is-last-right": {
2071
+ boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2072
+ }
2073
+ }
2074
+ }));
2075
+ var MotionSortIcon = motion16(SortIcon);
2076
+ var DefaultLoadingOverlay = () => /* @__PURE__ */ React16.createElement(LinearProgress, { value: 8, variant: "plain" });
2077
+ var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React16.createElement(
2078
+ Box_default,
2079
+ {
2080
+ sx: {
2081
+ position: "absolute",
2082
+ top: 0,
2083
+ right: 0,
2084
+ bottom: 0,
2085
+ width: "4px",
2086
+ cursor: "col-resize"
2087
+ },
2088
+ onClick: (e) => e.stopPropagation(),
2089
+ onMouseDown: (e) => {
2090
+ const initialX = e.clientX;
2091
+ const initialWidth = ref.current?.getBoundingClientRect().width;
2092
+ const onMouseMove = (e2) => {
2093
+ if (initialWidth && initialX) {
2094
+ ref.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2095
+ targetRef.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2096
+ }
2097
+ };
2098
+ const onMouseUp = () => {
2099
+ document.removeEventListener("mousemove", onMouseMove);
2100
+ document.removeEventListener("mouseup", onMouseUp);
2101
+ };
2102
+ document.addEventListener("mousemove", onMouseMove);
2103
+ document.addEventListener("mouseup", onMouseUp);
2104
+ }
2105
+ }
2106
+ );
2107
+
2108
+ // src/components/DataTable/components.tsx
2109
+ import React22, {
2110
+ useRef as useRef4,
2111
+ useState as useState6,
2112
+ useLayoutEffect,
2113
+ useMemo as useMemo8,
2114
+ useCallback as useCallback8,
2115
+ useEffect as useEffect4,
2116
+ memo,
2117
+ createElement
2118
+ } from "react";
2119
+ import { styled as styled12, useTheme } from "@mui/joy";
2120
+ import { AnimatePresence as AnimatePresence2 } from "framer-motion";
1947
2121
 
1948
2122
  // src/components/DatePicker/DatePicker.tsx
1949
2123
  import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState5 } from "react";
1950
2124
  import { IMaskInput, IMask } from "react-imask";
1951
2125
  import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
1952
- import { styled as styled9, useThemeProps as useThemeProps4 } from "@mui/joy";
2126
+ import { styled as styled10, useThemeProps as useThemeProps4 } from "@mui/joy";
1953
2127
  import { FocusTrap, ClickAwayListener, Popper as Popper2 } from "@mui/base";
1954
2128
 
1955
- // src/components/DialogActions/DialogActions.tsx
1956
- import { DialogActions as JoyDialogActions, styled as styled8 } from "@mui/joy";
2129
+ // src/components/Sheet/Sheet.tsx
2130
+ import { Sheet as JoySheet } from "@mui/joy";
1957
2131
  import { motion as motion17 } from "framer-motion";
1958
- var MotionDialogActions = motion17(JoyDialogActions);
1959
- var StyledDialogActions = styled8(MotionDialogActions)(({ theme }) => ({
2132
+ var MotionSheet = motion17(JoySheet);
2133
+ var Sheet = MotionSheet;
2134
+ Sheet.displayName = "Sheet";
2135
+
2136
+ // src/components/Sheet/index.ts
2137
+ var Sheet_default = Sheet;
2138
+
2139
+ // src/components/DialogActions/DialogActions.tsx
2140
+ import { DialogActions as JoyDialogActions, styled as styled9 } from "@mui/joy";
2141
+ import { motion as motion18 } from "framer-motion";
2142
+ var MotionDialogActions = motion18(JoyDialogActions);
2143
+ var StyledDialogActions = styled9(MotionDialogActions)(({ theme }) => ({
1960
2144
  padding: theme.spacing(2),
1961
2145
  gap: theme.spacing(2),
1962
2146
  flexDirection: "row",
@@ -1969,7 +2153,7 @@ DialogActions.displayName = "DialogActions";
1969
2153
  var DialogActions_default = DialogActions;
1970
2154
 
1971
2155
  // src/components/DatePicker/DatePicker.tsx
1972
- var CalendarButton = styled9(IconButton_default, {
2156
+ var CalendarButton = styled10(IconButton_default, {
1973
2157
  name: "DatePicker",
1974
2158
  slot: "calendarButton"
1975
2159
  })(({ theme }) => ({
@@ -1979,13 +2163,13 @@ var CalendarButton = styled9(IconButton_default, {
1979
2163
  outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
1980
2164
  }
1981
2165
  }));
1982
- var StyledPopper = styled9(Popper2, {
2166
+ var StyledPopper = styled10(Popper2, {
1983
2167
  name: "DatePicker",
1984
2168
  slot: "popper"
1985
2169
  })(({ theme }) => ({
1986
2170
  zIndex: theme.zIndex.tooltip
1987
2171
  }));
1988
- var CalendarSheet = styled9(Sheet_default, {
2172
+ var CalendarSheet = styled10(Sheet_default, {
1989
2173
  name: "DatePicker",
1990
2174
  slot: "sheet",
1991
2175
  overridesResolver: (props, styles) => styles.root
@@ -1994,7 +2178,7 @@ var CalendarSheet = styled9(Sheet_default, {
1994
2178
  boxShadow: theme.shadow.md,
1995
2179
  borderRadius: theme.radius.md
1996
2180
  }));
1997
- var DatePickerRoot = styled9("div", {
2181
+ var DatePickerRoot = styled10("div", {
1998
2182
  name: "DatePicker",
1999
2183
  slot: "root",
2000
2184
  overridesResolver: (props, styles) => styles.root
@@ -2311,8 +2495,8 @@ var DatePicker_default = DatePicker;
2311
2495
  // src/components/Textarea/Textarea.tsx
2312
2496
  import React18 from "react";
2313
2497
  import { Textarea as JoyTextarea } from "@mui/joy";
2314
- import { motion as motion18 } from "framer-motion";
2315
- var MotionTextarea = motion18(JoyTextarea);
2498
+ import { motion as motion19 } from "framer-motion";
2499
+ var MotionTextarea = motion19(JoyTextarea);
2316
2500
  var Textarea = (props) => {
2317
2501
  const {
2318
2502
  label,
@@ -2365,8 +2549,8 @@ var Textarea_default = Textarea;
2365
2549
  // src/components/Select/Select.tsx
2366
2550
  import React19, { useMemo as useMemo7 } from "react";
2367
2551
  import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
2368
- import { motion as motion19 } from "framer-motion";
2369
- var MotionOption = motion19(JoyOption);
2552
+ import { motion as motion20 } from "framer-motion";
2553
+ var MotionOption = motion20(JoyOption);
2370
2554
  var Option = MotionOption;
2371
2555
  Option.displayName = "Option";
2372
2556
  function Select(props) {
@@ -2442,11 +2626,14 @@ Select.displayName = "Select";
2442
2626
  // src/components/Select/index.ts
2443
2627
  var Select_default = Select;
2444
2628
 
2629
+ // src/components/DataTable/components.tsx
2630
+ import { Link } from "@mui/joy";
2631
+
2445
2632
  // src/components/Tooltip/Tooltip.tsx
2446
2633
  import React20 from "react";
2447
2634
  import { Tooltip as JoyTooltip } from "@mui/joy";
2448
- import { motion as motion20 } from "framer-motion";
2449
- var MotionTooltip = motion20(JoyTooltip);
2635
+ import { motion as motion21 } from "framer-motion";
2636
+ var MotionTooltip = motion21(JoyTooltip);
2450
2637
  var Tooltip = (props) => {
2451
2638
  return /* @__PURE__ */ React20.createElement(MotionTooltip, { ...props });
2452
2639
  };
@@ -2455,148 +2642,8 @@ Tooltip.displayName = "Tooltip";
2455
2642
  // src/components/Tooltip/index.ts
2456
2643
  var Tooltip_default = Tooltip;
2457
2644
 
2458
- // src/components/DataTable/DataTable.tsx
2459
- import { motion as motion21, AnimatePresence as AnimatePresence2 } from "framer-motion";
2460
-
2461
- // src/components/Pagination/Pagination.tsx
2462
- import React21, { useCallback as useCallback8, useEffect as useEffect4 } from "react";
2463
- import PreviousIcon from "@mui/icons-material/ChevronLeft";
2464
- import NextIcon from "@mui/icons-material/ChevronRight";
2465
- import { styled as styled10 } from "@mui/joy";
2466
- var PaginationButton = styled10(Button_default, {
2467
- name: "Pagination",
2468
- slot: "button"
2469
- })(({ theme, active, size }) => ({
2470
- "--Button-size": {
2471
- sm: "32px",
2472
- md: "40px",
2473
- lg: "48px"
2474
- }[size],
2475
- width: "var(--Button-size)",
2476
- height: "var(--Button-size)",
2477
- backgroundColor: active ? theme.vars.palette.primary.softHoverBg : "transparent",
2478
- color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.plainColor,
2479
- "&:hover": {
2480
- color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.softColor,
2481
- backgroundColor: active ? theme.vars.palette.primary.softActiveBg : theme.vars.palette.neutral.softHoverBg
2482
- }
2483
- }));
2484
- var PaginationIconButton = styled10(IconButton_default, {
2485
- name: "Pagination",
2486
- slot: "button"
2487
- })(({ theme, size }) => ({
2488
- "--IconButton-size": {
2489
- sm: "32px",
2490
- md: "40px",
2491
- lg: "48px"
2492
- }[size],
2493
- "--Icon-fontSize": "20px",
2494
- width: "var(--IconButton-size)",
2495
- height: "var(--IconButton-size)",
2496
- color: theme.vars.palette.neutral.plainColor,
2497
- "&:hover": {
2498
- color: theme.vars.palette.neutral.softColor,
2499
- backgroundColor: theme.vars.palette.neutral.softHoverBg
2500
- }
2501
- }));
2502
- var PaginationRoot = styled10(Stack_default, {
2503
- name: "Pagination",
2504
- slot: "root"
2505
- })({});
2506
- var PaginationContainer = styled10(Stack_default, {
2507
- name: "Pagination",
2508
- slot: "container"
2509
- })(({ theme, size }) => ({
2510
- gap: {
2511
- sm: theme.spacing(1),
2512
- md: theme.spacing(1.5),
2513
- lg: theme.spacing(2)
2514
- }[size]
2515
- }));
2516
- function Pagination(props) {
2517
- const {
2518
- paginationModel: _paginationModel,
2519
- defaultPaginationModel = { page: 1, pageSize: 25 },
2520
- onPageChange,
2521
- rowCount,
2522
- size = "md",
2523
- ...innerProps
2524
- } = props;
2525
- const [paginationModel, setPaginationModel] = useControlledState(
2526
- _paginationModel,
2527
- defaultPaginationModel,
2528
- useCallback8(
2529
- (newPage) => {
2530
- onPageChange(newPage.page);
2531
- },
2532
- [onPageChange]
2533
- )
2534
- );
2535
- const handlePageChange = (newPage) => {
2536
- setPaginationModel({ ...paginationModel, page: newPage });
2537
- };
2538
- const firstPage = 1;
2539
- const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
2540
- const beforePages = [paginationModel.page - 2, paginationModel.page - 1].filter((p) => p > 1);
2541
- const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
2542
- const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
2543
- const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
2544
- useEffect4(() => {
2545
- if (paginationModel.page > lastPage) {
2546
- setPaginationModel({ ...paginationModel, page: lastPage });
2547
- }
2548
- }, [rowCount, paginationModel, lastPage, setPaginationModel]);
2549
- return /* @__PURE__ */ React21.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React21.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React21.createElement(
2550
- PaginationIconButton,
2551
- {
2552
- size,
2553
- variant: "plain",
2554
- color: "neutral",
2555
- onClick: () => handlePageChange(paginationModel.page - 1),
2556
- disabled: paginationModel.page === firstPage,
2557
- "aria-label": "Previous page"
2558
- },
2559
- /* @__PURE__ */ React21.createElement(PreviousIcon, null)
2560
- ), paginationModel.page !== firstPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ React21.createElement(
2561
- PaginationButton,
2562
- {
2563
- size,
2564
- variant: "plain",
2565
- color: "neutral",
2566
- onClick: () => handlePageChange(paginationModel.page - 3),
2567
- "aria-label": "More previous pages"
2568
- },
2569
- "..."
2570
- ), beforePages.map((p) => /* @__PURE__ */ React21.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React21.createElement(PaginationButton, { active: "active", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ React21.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), isMoreAfterPages && /* @__PURE__ */ React21.createElement(
2571
- PaginationButton,
2572
- {
2573
- size,
2574
- variant: "plain",
2575
- color: "neutral",
2576
- "aria-label": "More next pages",
2577
- onClick: () => handlePageChange(paginationModel.page + 3)
2578
- },
2579
- "..."
2580
- ), paginationModel.page !== lastPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ React21.createElement(
2581
- PaginationIconButton,
2582
- {
2583
- size,
2584
- variant: "plain",
2585
- color: "neutral",
2586
- onClick: () => handlePageChange(paginationModel.page + 1),
2587
- disabled: paginationModel.page === lastPage,
2588
- "aria-label": "Next page"
2589
- },
2590
- /* @__PURE__ */ React21.createElement(NextIcon, null)
2591
- )));
2592
- }
2593
- Pagination.displayName = "Pagination";
2594
-
2595
- // src/components/Pagination/index.ts
2596
- var Pagination_default = Pagination;
2597
-
2598
2645
  // src/components/InfoSign/InfoSign.tsx
2599
- import React22 from "react";
2646
+ import React21 from "react";
2600
2647
  import { styled as styled11, tooltipClasses } from "@mui/joy";
2601
2648
  import MuiInfoIcon from "@mui/icons-material/Info";
2602
2649
  var InfoIcon = styled11(MuiInfoIcon, {
@@ -2609,7 +2656,7 @@ var InfoIcon = styled11(MuiInfoIcon, {
2609
2656
  }));
2610
2657
  function InfoSign(props) {
2611
2658
  const { message, placement } = props;
2612
- return /* @__PURE__ */ React22.createElement(
2659
+ return /* @__PURE__ */ React21.createElement(
2613
2660
  Tooltip_default,
2614
2661
  {
2615
2662
  arrow: true,
@@ -2618,141 +2665,17 @@ function InfoSign(props) {
2618
2665
  [`&.${tooltipClasses.root}`]: {
2619
2666
  maxWidth: "320px"
2620
2667
  }
2621
- },
2622
- title: message?.split("\n").map((line, i) => /* @__PURE__ */ React22.createElement("div", { key: `info-sign-${i}` }, line))
2623
- },
2624
- /* @__PURE__ */ React22.createElement(InfoIcon, null)
2625
- );
2626
- }
2627
-
2628
- // src/components/InfoSign/index.ts
2629
- var InfoSign_default = InfoSign;
2630
-
2631
- // src/components/DataTable/DataTable.tsx
2632
- function extractFieldsFromGroupingModel(items) {
2633
- const fields = /* @__PURE__ */ new Set();
2634
- for (const item of items) {
2635
- if ("groupId" in item) {
2636
- const children = Array.isArray(item.children) ? item.children : [item.children];
2637
- const childFields = extractFieldsFromGroupingModel(children);
2638
- childFields.forEach((field) => fields.add(field));
2639
- } else {
2640
- fields.add(item.field);
2641
- }
2642
- }
2643
- return fields;
2644
- }
2645
- function reorderColumnsByGroupingModel(columns, columnGroupingModel) {
2646
- const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
2647
- const orderedFields = [];
2648
- function collectFieldsInOrder(items) {
2649
- for (const item of items) {
2650
- if ("groupId" in item) {
2651
- const children = Array.isArray(item.children) ? item.children : [item.children];
2652
- collectFieldsInOrder(children);
2653
- } else {
2654
- if (!orderedFields.includes(item.field)) {
2655
- orderedFields.push(item.field);
2656
- }
2657
- }
2658
- }
2659
- }
2660
- collectFieldsInOrder(columnGroupingModel);
2661
- const columnMap = new Map(columns.map((col) => [col.field, col]));
2662
- const reorderedColumns = [];
2663
- for (const field of orderedFields) {
2664
- const column = columnMap.get(field);
2665
- if (column) {
2666
- reorderedColumns.push(column);
2667
- }
2668
- }
2669
- for (const column of columns) {
2670
- if (!fieldsInGroupingModel.has(column.field)) {
2671
- reorderedColumns.push(column);
2672
- }
2673
- }
2674
- return reorderedColumns;
2675
- }
2676
- function flattenColumnGroups(items, groupPath = [], columnIndex = { current: 0 }) {
2677
- const result = [];
2678
- for (const item of items) {
2679
- if ("groupId" in item) {
2680
- const newPath = [...groupPath, item.groupId];
2681
- const children = Array.isArray(item.children) ? item.children : [item.children];
2682
- result.push(...flattenColumnGroups(children, newPath, columnIndex));
2683
- } else {
2684
- result.push({
2685
- ...item,
2686
- groupPath,
2687
- columnIndex: columnIndex.current++
2688
- });
2689
- }
2690
- }
2691
- return result;
2692
- }
2693
- function calculateColumnGroups(columnGroupingModel, columns) {
2694
- const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
2695
- const flattenedColumns = flattenColumnGroups(columnGroupingModel);
2696
- const columnIndexMap = new Map(flattenedColumns.map((col) => [col.field, col.columnIndex]));
2697
- const processedGroups = /* @__PURE__ */ new Map();
2698
- const groupsByLevel = [];
2699
- let maxLevel = 0;
2700
- function processGroup(items, level, parentGroupId) {
2701
- let minIndex = Infinity;
2702
- let maxIndex = -Infinity;
2703
- for (const item of items) {
2704
- if ("groupId" in item) {
2705
- const groupKey = parentGroupId ? `${parentGroupId}.${item.groupId}` : item.groupId;
2706
- if (!processedGroups.has(groupKey)) {
2707
- const children = Array.isArray(item.children) ? item.children : [item.children];
2708
- const { startIndex, colspan } = processGroup(children, level + 1, groupKey);
2709
- const group = {
2710
- groupId: item.groupId,
2711
- headerName: item.headerName,
2712
- colspan,
2713
- level,
2714
- startIndex
2715
- };
2716
- processedGroups.set(groupKey, group);
2717
- if (!groupsByLevel[level]) {
2718
- groupsByLevel[level] = [];
2719
- }
2720
- groupsByLevel[level].push(group);
2721
- maxLevel = Math.max(maxLevel, level);
2722
- minIndex = Math.min(minIndex, startIndex);
2723
- maxIndex = Math.max(maxIndex, startIndex + colspan - 1);
2724
- }
2725
- } else {
2726
- const columnIndex = columnIndexMap.get(item.field);
2727
- if (columnIndex !== void 0) {
2728
- minIndex = Math.min(minIndex, columnIndex);
2729
- maxIndex = Math.max(maxIndex, columnIndex);
2730
- }
2731
- }
2732
- }
2733
- return {
2734
- startIndex: minIndex === Infinity ? 0 : minIndex,
2735
- colspan: maxIndex === -Infinity ? 0 : maxIndex - minIndex + 1
2736
- };
2737
- }
2738
- processGroup(columnGroupingModel, 0);
2739
- groupsByLevel.forEach((level) => {
2740
- level.sort((a, b) => a.startIndex - b.startIndex);
2741
- });
2742
- return { groups: groupsByLevel, maxLevel, fieldsInGroupingModel };
2743
- }
2744
- function getTextAlign(props) {
2745
- return !props.editMode && ["number", "date", "currency"].includes(props.type || "") ? "end" : "start";
2668
+ },
2669
+ title: message?.split("\n").map((line, i) => /* @__PURE__ */ React21.createElement("div", { key: `info-sign-${i}` }, line))
2670
+ },
2671
+ /* @__PURE__ */ React21.createElement(InfoIcon, null)
2672
+ );
2746
2673
  }
2747
- var DefaultLoadingOverlay = () => /* @__PURE__ */ React23.createElement(LinearProgress, { value: 8, variant: "plain" });
2748
- var EllipsisDiv = styled12("div", {
2749
- name: "DataTable",
2750
- slot: "textEllipsis"
2751
- })({
2752
- overflow: "hidden",
2753
- textOverflow: "ellipsis",
2754
- whiteSpace: "nowrap"
2755
- });
2674
+
2675
+ // src/components/InfoSign/index.ts
2676
+ var InfoSign_default = InfoSign;
2677
+
2678
+ // src/components/DataTable/components.tsx
2756
2679
  var TextEllipsis = ({ children }) => {
2757
2680
  const textRef = useRef4(null);
2758
2681
  const [showTooltip, setShowTooltip] = useState6(false);
@@ -2763,9 +2686,9 @@ var TextEllipsis = ({ children }) => {
2763
2686
  setShowTooltip(isTextTruncated);
2764
2687
  }
2765
2688
  }, [children]);
2766
- const content = /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef }, children);
2689
+ const content = /* @__PURE__ */ React22.createElement(EllipsisDiv, { ref: textRef }, children);
2767
2690
  if (showTooltip) {
2768
- return /* @__PURE__ */ React23.createElement(Tooltip_default, { title: children, placement: "top", onClick: (e) => e.stopPropagation() }, content);
2691
+ return /* @__PURE__ */ React22.createElement(Tooltip_default, { title: children, placement: "top", onClick: (e) => e.stopPropagation() }, content);
2769
2692
  }
2770
2693
  return content;
2771
2694
  };
@@ -2779,9 +2702,9 @@ var CellTextEllipsis = ({ children }) => {
2779
2702
  setShowTooltip(isTextTruncated);
2780
2703
  }
2781
2704
  }, [children]);
2782
- const content = /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef }, children);
2705
+ const content = /* @__PURE__ */ React22.createElement(EllipsisDiv, { ref: textRef }, children);
2783
2706
  if (showTooltip) {
2784
- return /* @__PURE__ */ React23.createElement(
2707
+ return /* @__PURE__ */ React22.createElement(
2785
2708
  Tooltip_default,
2786
2709
  {
2787
2710
  title: children,
@@ -2795,130 +2718,6 @@ var CellTextEllipsis = ({ children }) => {
2795
2718
  }
2796
2719
  return content;
2797
2720
  };
2798
- var OverlayWrapper = styled12("tr", {
2799
- name: "DataTable",
2800
- slot: "overlayWrapper"
2801
- })({
2802
- position: "sticky",
2803
- top: `calc(var(--unstable_TableCell-height, 32px))`,
2804
- left: 0,
2805
- right: 0,
2806
- zIndex: 1,
2807
- "& > td": {
2808
- height: 0,
2809
- padding: 0,
2810
- border: "none !important"
2811
- }
2812
- });
2813
- var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
2814
- var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React23.createElement(
2815
- Box_default,
2816
- {
2817
- sx: {
2818
- position: "absolute",
2819
- top: 0,
2820
- right: 0,
2821
- bottom: 0,
2822
- width: "4px",
2823
- cursor: "col-resize"
2824
- },
2825
- onClick: (e) => e.stopPropagation(),
2826
- onMouseDown: (e) => {
2827
- const initialX = e.clientX;
2828
- const initialWidth = ref.current?.getBoundingClientRect().width;
2829
- const onMouseMove = (e2) => {
2830
- if (initialWidth && initialX) {
2831
- ref.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2832
- targetRef.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2833
- }
2834
- };
2835
- const onMouseUp = () => {
2836
- document.removeEventListener("mousemove", onMouseMove);
2837
- document.removeEventListener("mouseup", onMouseUp);
2838
- };
2839
- document.addEventListener("mousemove", onMouseMove);
2840
- document.addEventListener("mouseup", onMouseUp);
2841
- }
2842
- }
2843
- );
2844
- var VirtualizedTableBody = styled12("tbody", {
2845
- name: "DataTable",
2846
- slot: "tableBody"
2847
- })({
2848
- // HACK: for virtualization: tbody의 height를 렌더링 된 tr의 총 높이 보다 높은 값으로 지정하고도 tr의 size를 유지하기 위한 꼼수
2849
- "&::after": {
2850
- content: "''",
2851
- display: "block",
2852
- height: "0.01em"
2853
- },
2854
- // NOTE: 테이블 안에 버튼을 넣을 때 버튼의 높이가 테이블의 높이를 넘어가지 않도록 설정
2855
- [`& .${buttonClasses.root}`]: {
2856
- "--Button-minHeight": "26px",
2857
- "--Button-paddingBlock": "0.25rem",
2858
- lineHeight: 1,
2859
- marginTop: "-2px",
2860
- marginBottom: "-2px"
2861
- },
2862
- [`& .${iconButtonClasses.root}`]: {
2863
- "--IconButton-size": "26px",
2864
- verticalAlign: "middle",
2865
- marginTop: "-2px",
2866
- marginBottom: "-2px"
2867
- }
2868
- });
2869
- var StyledTableRow = styled12("tr", {
2870
- name: "DataTable",
2871
- slot: "tableRow",
2872
- shouldForwardProp: (prop) => prop !== "striped"
2873
- })(({ striped }) => ({
2874
- ...striped && {
2875
- backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
2876
- color: "var(--ceed-palette-text-primary)",
2877
- "& td": {
2878
- backgroundColor: "background.surface"
2879
- }
2880
- },
2881
- "&:hover": {
2882
- backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
2883
- "& td": {
2884
- backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
2885
- }
2886
- }
2887
- }));
2888
- var VirtualizedTableRow = memo(StyledTableRow, (prevProps, nextProps) => {
2889
- return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
2890
- prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
2891
- prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Include children check to handle isCellEditable changes
2892
- prevProps.children === nextProps.children;
2893
- });
2894
- var Asterisk = styled12("span", {
2895
- name: "DataTable",
2896
- slot: "headCellAsterisk"
2897
- })(({ theme }) => ({
2898
- color: "var(--ceed-palette-danger-500)",
2899
- marginLeft: theme.spacing(0.5)
2900
- }));
2901
- var StyledTh = styled12(motion21.th)(({ theme }) => ({
2902
- boxShadow: "1px 0 var(--TableCell-borderColor)"
2903
- // border 대신 box-shadow를 사용하여 stickyHeader와 함께 사용할 때 border가 겹치는 문제를 해결
2904
- }));
2905
- var StyledTd = styled12("td")(({ theme }) => ({
2906
- transition: `box-shadow 0.3s`,
2907
- "&:not(.is-last-left):not(.is-last-right)": {
2908
- boxShadow: "1px 0 var(--TableCell-borderColor)"
2909
- },
2910
- ".ScrollableRight &": {
2911
- "&.is-last-left": {
2912
- boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2913
- }
2914
- },
2915
- ".ScrollableLeft &": {
2916
- "&.is-last-right": {
2917
- boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2918
- }
2919
- }
2920
- }));
2921
- var MotionSortIcon = motion21(SortIcon);
2922
2721
  var HeadCell = (props) => {
2923
2722
  const {
2924
2723
  width,
@@ -2941,7 +2740,8 @@ var HeadCell = (props) => {
2941
2740
  pinnedStartPosition,
2942
2741
  pinnedEndPosition,
2943
2742
  headerRef,
2944
- tableColRef
2743
+ tableColRef,
2744
+ headerClassName
2945
2745
  } = props;
2946
2746
  const theme = useTheme();
2947
2747
  const ref = headerRef;
@@ -2974,7 +2774,7 @@ var HeadCell = (props) => {
2974
2774
  const sortIcon = useMemo8(() => {
2975
2775
  const isSorted = !!sort;
2976
2776
  const isVisible = sortable && (isSorted || isHovered);
2977
- return /* @__PURE__ */ React23.createElement(AnimatePresence2, { mode: "wait" }, isVisible && /* @__PURE__ */ React23.createElement(
2777
+ return /* @__PURE__ */ React22.createElement(AnimatePresence2, { mode: "wait" }, isVisible && /* @__PURE__ */ React22.createElement(
2978
2778
  MotionSortIcon,
2979
2779
  {
2980
2780
  key: "sort-icon",
@@ -3003,10 +2803,20 @@ var HeadCell = (props) => {
3003
2803
  ));
3004
2804
  }, [headId, initialSort, sort, sortable, isHovered]);
3005
2805
  const infoSign = useMemo8(
3006
- () => description ? /* @__PURE__ */ React23.createElement(InfoSign_default, { message: description, placement: "bottom" }) : null,
2806
+ () => description ? /* @__PURE__ */ React22.createElement(InfoSign_default, { message: description, placement: "bottom" }) : null,
3007
2807
  [description]
3008
2808
  );
3009
- return /* @__PURE__ */ React23.createElement(
2809
+ const params = useMemo8(
2810
+ () => ({
2811
+ field
2812
+ }),
2813
+ [field]
2814
+ );
2815
+ const computedHeaderClassName = useMemo8(
2816
+ () => (typeof headerClassName === "function" ? headerClassName(params) : headerClassName) || void 0,
2817
+ [headerClassName, params]
2818
+ );
2819
+ return /* @__PURE__ */ React22.createElement(
3010
2820
  StyledTh,
3011
2821
  {
3012
2822
  id: headId,
@@ -3015,16 +2825,17 @@ var HeadCell = (props) => {
3015
2825
  ref,
3016
2826
  key: field,
3017
2827
  style,
3018
- onClick: useCallback9(
2828
+ onClick: useCallback8(
3019
2829
  (e) => sortable && onSortChange?.({ field, currentSort: sort, multiple: e.shiftKey }),
3020
2830
  [field, onSortChange, sort, sortable]
3021
2831
  ),
3022
2832
  onMouseEnter: () => setIsHovered(true),
3023
2833
  onMouseLeave: () => setIsHovered(false),
3024
2834
  whileHover: "hover",
3025
- initial: "initial"
2835
+ initial: "initial",
2836
+ className: computedHeaderClassName
3026
2837
  },
3027
- /* @__PURE__ */ React23.createElement(Stack_default, { gap: 1, direction: "row", justifyContent: textAlign, alignItems: "center" }, textAlign === "end" && sortIcon, textAlign === "end" && infoSign, /* @__PURE__ */ React23.createElement(TextEllipsis, null, headerName ?? field, editMode && required && /* @__PURE__ */ React23.createElement(Asterisk, null, "*")), textAlign === "start" && infoSign, textAlign === "start" && sortIcon),
2838
+ /* @__PURE__ */ React22.createElement(Stack_default, { gap: 1, direction: "row", justifyContent: textAlign, alignItems: "center" }, textAlign === "end" && sortIcon, textAlign === "end" && infoSign, /* @__PURE__ */ React22.createElement(TextEllipsis, null, headerName ?? field, editMode && required && /* @__PURE__ */ React22.createElement(Asterisk, null, "*")), textAlign === "start" && infoSign, textAlign === "start" && sortIcon),
3028
2839
  resizer
3029
2840
  );
3030
2841
  };
@@ -3139,18 +2950,18 @@ var BodyCell = (props) => {
3139
2950
  return createElement(memo(renderEditCell), params);
3140
2951
  }
3141
2952
  return {
3142
- date: /* @__PURE__ */ React23.createElement(DatePicker_default, { value, ...editModeComponentProps }),
3143
- currency: /* @__PURE__ */ React23.createElement(
2953
+ date: /* @__PURE__ */ React22.createElement(DatePicker_default, { value, ...editModeComponentProps }),
2954
+ currency: /* @__PURE__ */ React22.createElement(
3144
2955
  CurrencyInput_default,
3145
2956
  {
3146
2957
  value,
3147
2958
  ...editModeComponentProps
3148
2959
  }
3149
2960
  ),
3150
- number: /* @__PURE__ */ React23.createElement(Input_default, { value, type: "number", ...editModeComponentProps }),
3151
- text: /* @__PURE__ */ React23.createElement(Input_default, { value, type: "text", ...editModeComponentProps }),
3152
- longText: /* @__PURE__ */ React23.createElement(Textarea_default, { value, ...editModeComponentProps }),
3153
- autocomplete: /* @__PURE__ */ React23.createElement(
2961
+ number: /* @__PURE__ */ React22.createElement(Input_default, { value, type: "number", ...editModeComponentProps }),
2962
+ text: /* @__PURE__ */ React22.createElement(Input_default, { value, type: "text", ...editModeComponentProps }),
2963
+ longText: /* @__PURE__ */ React22.createElement(Textarea_default, { value, ...editModeComponentProps }),
2964
+ autocomplete: /* @__PURE__ */ React22.createElement(
3154
2965
  Autocomplete_default,
3155
2966
  {
3156
2967
  value,
@@ -3158,7 +2969,7 @@ var BodyCell = (props) => {
3158
2969
  ...editModeComponentProps
3159
2970
  }
3160
2971
  ),
3161
- select: /* @__PURE__ */ React23.createElement(
2972
+ select: /* @__PURE__ */ React22.createElement(
3162
2973
  Select_default,
3163
2974
  {
3164
2975
  value,
@@ -3175,7 +2986,7 @@ var BodyCell = (props) => {
3175
2986
  }
3176
2987
  const innerText = value;
3177
2988
  const typedComponent = {
3178
- link: React23.createElement(linkComponentFromProps || Link, {
2989
+ link: React22.createElement(linkComponentFromProps || Link, {
3179
2990
  children: innerText,
3180
2991
  ...componentProps
3181
2992
  })
@@ -3185,7 +2996,7 @@ var BodyCell = (props) => {
3185
2996
  const getActions = props.getActions;
3186
2997
  const CellComponent = useMemo8(() => {
3187
2998
  if (type === "actions") {
3188
- return /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
2999
+ return /* @__PURE__ */ React22.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
3189
3000
  }
3190
3001
  return editMode && EditModeComponent ? EditModeComponent : ReadModeComponent;
3191
3002
  }, [type, getActions, params, editMode, EditModeComponent, ReadModeComponent]);
@@ -3195,10 +3006,10 @@ var BodyCell = (props) => {
3195
3006
  () => (typeof cellClassName === "function" ? cellClassName(params) : cellClassName) || "",
3196
3007
  [cellClassName, params]
3197
3008
  );
3198
- useEffect5(() => {
3009
+ useEffect4(() => {
3199
3010
  setValue(row[field]);
3200
3011
  }, [row, field]);
3201
- return /* @__PURE__ */ React23.createElement(
3012
+ return /* @__PURE__ */ React22.createElement(
3202
3013
  StyledTd,
3203
3014
  {
3204
3015
  ref: cellRef,
@@ -3216,7 +3027,7 @@ var BodyCell = (props) => {
3216
3027
  className: [isLastStartPinnedColumn && "is-last-left", isLastEndPinnedColumn && "is-last-right", computedCellClassName].filter(Boolean).join(" ") || ""
3217
3028
  },
3218
3029
  useMemo8(
3219
- () => showTooltip ? /* @__PURE__ */ React23.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
3030
+ () => showTooltip ? /* @__PURE__ */ React22.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
3220
3031
  [CellComponent, showTooltip]
3221
3032
  )
3222
3033
  );
@@ -3224,7 +3035,7 @@ var BodyCell = (props) => {
3224
3035
  var BodyRow = memo(
3225
3036
  (props) => {
3226
3037
  const { tableId, columns, rowId, editMode, noWrap, row } = props;
3227
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, columns.map((column, i) => /* @__PURE__ */ React23.createElement(
3038
+ return /* @__PURE__ */ React22.createElement(React22.Fragment, null, columns.map((column, i) => /* @__PURE__ */ React22.createElement(
3228
3039
  BodyCell,
3229
3040
  {
3230
3041
  key: `${rowId}_${column.field.toString()}_${i}`,
@@ -3238,10 +3049,38 @@ var BodyRow = memo(
3238
3049
  )));
3239
3050
  }
3240
3051
  );
3052
+ var StyledTableRow2 = styled12("tr", {
3053
+ name: "DataTable",
3054
+ slot: "tableRow",
3055
+ shouldForwardProp: (prop) => prop !== "striped"
3056
+ })(({ striped }) => ({
3057
+ ...striped && {
3058
+ backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
3059
+ color: "var(--ceed-palette-text-primary)",
3060
+ "& td": {
3061
+ backgroundColor: "background.surface"
3062
+ }
3063
+ },
3064
+ "&:hover": {
3065
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
3066
+ "& td": {
3067
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
3068
+ }
3069
+ }
3070
+ }));
3071
+ var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
3072
+ return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
3073
+ prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
3074
+ prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Include children check to handle isCellEditable changes
3075
+ prevProps.children === nextProps.children;
3076
+ });
3077
+
3078
+ // src/components/DataTable/hooks.ts
3079
+ import { useState as useState7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useMemo as useMemo9, useCallback as useCallback9, useEffect as useEffect5, createRef } from "react";
3241
3080
  function useColumnWidths(columnsByField) {
3242
- const [widths, setWidths] = useState6({});
3243
- const roRef = useRef4();
3244
- useLayoutEffect(() => {
3081
+ const [widths, setWidths] = useState7({});
3082
+ const roRef = useRef5();
3083
+ useLayoutEffect2(() => {
3245
3084
  if (roRef.current) roRef.current.disconnect();
3246
3085
  roRef.current = new ResizeObserver((entries) => {
3247
3086
  let changed = false;
@@ -3289,33 +3128,32 @@ function useDataTableRenderer({
3289
3128
  isTotalSelected: _isTotalSelected,
3290
3129
  isRowSelectable,
3291
3130
  columnGroupingModel
3292
- // Add this prop
3293
3131
  }) {
3294
3132
  if (pinnedColumns && columnGroupingModel) {
3295
3133
  throw new Error(
3296
3134
  "You cannot use both `pinnedColumns` and `columnGroupingModel` at the same time. Please choose one of them."
3297
3135
  );
3298
3136
  }
3299
- const onSelectionModelChangeRef = useRef4(onSelectionModelChange);
3137
+ const onSelectionModelChangeRef = useRef5(onSelectionModelChange);
3300
3138
  onSelectionModelChangeRef.current = onSelectionModelChange;
3301
- const [focusedRowId, setFocusedRowId] = useState6(null);
3139
+ const [focusedRowId, setFocusedRowId] = useState7(null);
3302
3140
  const [sortModel, setSortModel] = useControlledState(
3303
3141
  controlledSortModel,
3304
3142
  initialState?.sorting?.sortModel ?? [],
3305
3143
  useCallback9((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
3306
3144
  );
3307
- const reorderedColumns = useMemo8(() => {
3145
+ const reorderedColumns = useMemo9(() => {
3308
3146
  if (!columnGroupingModel) return columnsProp;
3309
3147
  return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
3310
3148
  }, [columnsProp, columnGroupingModel]);
3311
- const columnsByField = useMemo8(
3149
+ const columnsByField = useMemo9(
3312
3150
  () => reorderedColumns.reduce(
3313
3151
  (acc, curr) => ({
3314
3152
  ...acc,
3315
3153
  [curr.field]: {
3316
3154
  ...curr,
3317
- headerRef: React23.createRef(),
3318
- tableColRef: React23.createRef()
3155
+ headerRef: createRef(),
3156
+ tableColRef: createRef()
3319
3157
  }
3320
3158
  }),
3321
3159
  {}
@@ -3350,47 +3188,42 @@ function useDataTableRenderer({
3350
3188
  },
3351
3189
  [sortModel, columnsByField]
3352
3190
  );
3353
- const rows = useMemo8(
3191
+ const rows = useMemo9(
3354
3192
  () => sortModel.length ? [..._rows].sort(sortComparator) : _rows,
3355
3193
  [_rows, sortModel, sortComparator]
3356
3194
  );
3357
- const sortOrder = useMemo8(
3358
- // NOTE: default value를 props destructuring에서 할당하면 렌더링 시점에 초기화가 되어버린다.
3195
+ const sortOrder = useMemo9(
3359
3196
  () => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
3360
3197
  [_sortOrder]
3361
3198
  );
3362
- const [page, setPage] = useState6(paginationModel?.page || 1);
3199
+ const [page, setPage] = useState7(paginationModel?.page || 1);
3363
3200
  const pageSize = paginationModel?.pageSize || 20;
3364
3201
  const getId = useCallback9(
3365
3202
  (row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
3366
3203
  [_getId, page, pageSize]
3367
3204
  );
3368
- const selectedModelSet = useMemo8(
3369
- // NOTE: default value를 props destructuring에서 할당하면 렌더링 시점에 초기화가 되어버린다.
3370
- () => new Set(selectionModel || []),
3371
- [selectionModel]
3372
- );
3373
- const dataInPage = useMemo8(
3205
+ const selectedModelSet = useMemo9(() => new Set(selectionModel || []), [selectionModel]);
3206
+ const dataInPage = useMemo9(
3374
3207
  () => !pagination || paginationMode === "server" ? rows : rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
3375
3208
  [rows, page, pageSize, paginationMode, pagination]
3376
3209
  );
3377
- const selectableDataInPage = useMemo8(
3210
+ const selectableDataInPage = useMemo9(
3378
3211
  () => dataInPage.filter((row, i) => {
3379
3212
  if (!isRowSelectable) return true;
3380
3213
  return isRowSelectable({ row, id: getId(row, i) });
3381
3214
  }),
3382
3215
  [dataInPage, isRowSelectable, getId]
3383
3216
  );
3384
- const isAllSelected = useMemo8(
3217
+ const isAllSelected = useMemo9(
3385
3218
  () => selectableDataInPage.length > 0 && selectableDataInPage.every((row, i) => selectedModelSet.has(getId(row, i))),
3386
3219
  [selectableDataInPage, selectedModelSet, getId]
3387
3220
  );
3388
3221
  const rowCount = totalRowsProp || rows.length;
3389
- const selectableRowCount = useMemo8(() => {
3222
+ const selectableRowCount = useMemo9(() => {
3390
3223
  if (!isRowSelectable) return rowCount;
3391
3224
  return rows.filter((row, i) => isRowSelectable({ row, id: getId(row, i) })).length;
3392
3225
  }, [rows, isRowSelectable, getId, rowCount]);
3393
- const isTotalSelected = useMemo8(
3226
+ const isTotalSelected = useMemo9(
3394
3227
  () => _isTotalSelected ?? (selectableRowCount > 0 && (selectionModel?.length || 0) === selectableRowCount),
3395
3228
  [_isTotalSelected, selectionModel, selectableRowCount]
3396
3229
  );
@@ -3400,17 +3233,14 @@ function useDataTableRenderer({
3400
3233
  columnsByField[f].minWidth ?? 0,
3401
3234
  [columnWidths, columnsByField]
3402
3235
  );
3403
- const processedColumnGroups = useMemo8(() => {
3236
+ const processedColumnGroups = useMemo9(() => {
3404
3237
  if (!columnGroupingModel) return null;
3405
3238
  return calculateColumnGroups(columnGroupingModel, reorderedColumns);
3406
3239
  }, [columnGroupingModel, reorderedColumns]);
3407
- const columns = useMemo8(() => {
3408
- const baseColumns = reorderedColumns.length > 0 ? reorderedColumns : (
3409
- // fallback
3410
- Object.keys(rows[0] || {}).map((key) => ({
3411
- field: key
3412
- }))
3413
- );
3240
+ const columns = useMemo9(() => {
3241
+ const baseColumns = reorderedColumns.length > 0 ? reorderedColumns : Object.keys(rows[0] || {}).map((key) => ({
3242
+ field: key
3243
+ }));
3414
3244
  return baseColumns.map((column) => {
3415
3245
  const isLeftPinned = pinnedColumns?.left?.includes(column.field);
3416
3246
  const isRightPinned = pinnedColumns?.right?.includes(column.field);
@@ -3425,7 +3255,6 @@ function useDataTableRenderer({
3425
3255
  isPinned,
3426
3256
  isLastStartPinnedColumn: isLeftPinned && [...pinnedColumns?.left || []].pop() === column.field,
3427
3257
  isLastEndPinnedColumn: isRightPinned && (pinnedColumns?.right?.[0] ?? null) === column.field,
3428
- // pinned 관련 계산부
3429
3258
  pinnedStartPosition: pinnedColumns?.left?.slice(0, isLeftPinned ? pinnedColumns.left.indexOf(column.field) : pinnedColumns.left.length).reduce((acc, curr) => acc + getWidth(curr), 0),
3430
3259
  pinnedEndPosition: pinnedColumns?.right?.slice(isRightPinned ? pinnedColumns.right.indexOf(column.field) + 1 : 0).reduce((acc, curr) => acc + getWidth(curr), 0)
3431
3260
  };
@@ -3487,56 +3316,265 @@ function useDataTableRenderer({
3487
3316
  }, [page]);
3488
3317
  return {
3489
3318
  rowCount,
3490
- selectableRowCount,
3491
- page,
3492
- pageSize,
3493
- onPaginationModelChange: handlePageChange,
3494
- getId,
3495
- HeadCell,
3496
- BodyRow,
3497
- dataInPage,
3498
- handleSortChange,
3499
- isAllSelected,
3500
- // all rows are selected on this page
3501
- isTotalSelected,
3502
- isSelectedRow: useCallback9((model) => selectedModelSet.has(model), [selectedModelSet]),
3503
- isRowSelectable: useCallback9(
3504
- (rowId, row) => {
3505
- if (!isRowSelectable) return true;
3506
- return isRowSelectable({ row, id: rowId });
3507
- },
3508
- [isRowSelectable]
3509
- ),
3510
- focusedRowId,
3511
- onRowFocus: useCallback9((rowId) => {
3512
- setFocusedRowId(rowId);
3513
- }, []),
3514
- onAllCheckboxChange: useCallback9(() => {
3515
- onSelectionModelChange?.(isAllSelected ? [] : selectableDataInPage.map(getId));
3516
- }, [isAllSelected, selectableDataInPage, onSelectionModelChange, getId]),
3517
- onCheckboxChange: useCallback9(
3518
- (event, selectedModel) => {
3519
- if (selectedModelSet.has(selectedModel)) {
3520
- const newSelectionModel = (selectionModel || []).filter((model) => model !== selectedModel);
3521
- onSelectionModelChange?.(newSelectionModel);
3522
- } else {
3523
- const newSelectionModel = [...selectionModel || [], selectedModel];
3524
- onSelectionModelChange?.(newSelectionModel);
3525
- }
3319
+ selectableRowCount,
3320
+ page,
3321
+ pageSize,
3322
+ onPaginationModelChange: handlePageChange,
3323
+ getId,
3324
+ HeadCell,
3325
+ BodyRow,
3326
+ dataInPage,
3327
+ handleSortChange,
3328
+ isAllSelected,
3329
+ isTotalSelected,
3330
+ isSelectedRow: useCallback9((model) => selectedModelSet.has(model), [selectedModelSet]),
3331
+ isRowSelectable: useCallback9(
3332
+ (rowId, row) => {
3333
+ if (!isRowSelectable) return true;
3334
+ return isRowSelectable({ row, id: rowId });
3335
+ },
3336
+ [isRowSelectable]
3337
+ ),
3338
+ focusedRowId,
3339
+ onRowFocus: useCallback9((rowId) => {
3340
+ setFocusedRowId(rowId);
3341
+ }, []),
3342
+ onAllCheckboxChange: useCallback9(() => {
3343
+ onSelectionModelChange?.(isAllSelected ? [] : selectableDataInPage.map(getId));
3344
+ }, [isAllSelected, selectableDataInPage, onSelectionModelChange, getId]),
3345
+ onCheckboxChange: useCallback9(
3346
+ (event, selectedModel) => {
3347
+ if (selectedModelSet.has(selectedModel)) {
3348
+ const newSelectionModel = (selectionModel || []).filter((model) => model !== selectedModel);
3349
+ onSelectionModelChange?.(newSelectionModel);
3350
+ } else {
3351
+ const newSelectionModel = [...selectionModel || [], selectedModel];
3352
+ onSelectionModelChange?.(newSelectionModel);
3353
+ }
3354
+ },
3355
+ [selectionModel, onSelectionModelChange, selectedModelSet]
3356
+ ),
3357
+ columns,
3358
+ processedColumnGroups,
3359
+ onTotalSelect: useCallback9(() => {
3360
+ const selectableRows = rows.filter((row, i) => {
3361
+ if (!isRowSelectable) return true;
3362
+ return isRowSelectable({ row, id: getId(row, i) });
3363
+ });
3364
+ onSelectionModelChange?.(isTotalSelected ? [] : selectableRows.map(getId), !isTotalSelected);
3365
+ }, [isTotalSelected, rows, onSelectionModelChange, getId, isRowSelectable])
3366
+ };
3367
+ }
3368
+
3369
+ // src/components/Table/Table.tsx
3370
+ import React23 from "react";
3371
+ import { Table as JoyTable } from "@mui/joy";
3372
+ var Table = (props) => {
3373
+ const { children, ...inheritProps } = props;
3374
+ return /* @__PURE__ */ React23.createElement(JoyTable, { ...inheritProps }, children);
3375
+ };
3376
+ Table.displayName = "Table";
3377
+ function TableHead(props) {
3378
+ const {
3379
+ headCells,
3380
+ showCheckbox,
3381
+ onCheckboxChange,
3382
+ slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
3383
+ slotProps: { checkbox: checkboxProps = {} } = {}
3384
+ } = props;
3385
+ return /* @__PURE__ */ React23.createElement("thead", null, /* @__PURE__ */ React23.createElement("tr", null, showCheckbox && /* @__PURE__ */ React23.createElement(
3386
+ "th",
3387
+ {
3388
+ style: {
3389
+ width: "40px",
3390
+ textAlign: "center"
3391
+ }
3392
+ },
3393
+ /* @__PURE__ */ React23.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
3394
+ ), headCells.map((headCell) => /* @__PURE__ */ React23.createElement(
3395
+ "th",
3396
+ {
3397
+ key: headCell.label,
3398
+ style: {
3399
+ width: headCell.width,
3400
+ minWidth: headCell.minWidth,
3401
+ maxWidth: headCell.maxWidth,
3402
+ textAlign: headCell.numeric ? "right" : "left"
3403
+ }
3404
+ },
3405
+ headCell.label
3406
+ ))));
3407
+ }
3408
+ TableHead.displayName = "TableHead";
3409
+ function TableBody(props) {
3410
+ const {
3411
+ rows,
3412
+ cellOrder,
3413
+ rowOptions,
3414
+ showCheckbox,
3415
+ onCheckboxChange,
3416
+ slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
3417
+ slotProps: { checkbox: checkboxProps = {} } = {}
3418
+ } = props;
3419
+ return /* @__PURE__ */ React23.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React23.createElement("tr", { key: `table-row-${rowIndex}` }, showCheckbox && /* @__PURE__ */ React23.createElement(
3420
+ "td",
3421
+ {
3422
+ style: {
3423
+ textAlign: "center"
3424
+ }
3425
+ },
3426
+ /* @__PURE__ */ React23.createElement(RenderCheckbox, { onChange: (event) => onCheckboxChange?.(event, rowIndex), ...checkboxProps })
3427
+ ), cellOrder.map((cellKey) => /* @__PURE__ */ React23.createElement(
3428
+ "td",
3429
+ {
3430
+ key: cellKey,
3431
+ style: {
3432
+ textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
3433
+ }
3434
+ },
3435
+ row[cellKey]
3436
+ )))));
3437
+ }
3438
+ TableBody.displayName = "TableBody";
3439
+
3440
+ // src/components/Pagination/Pagination.tsx
3441
+ import React24, { useCallback as useCallback10, useEffect as useEffect6 } from "react";
3442
+ import PreviousIcon from "@mui/icons-material/ChevronLeft";
3443
+ import NextIcon from "@mui/icons-material/ChevronRight";
3444
+ import { styled as styled13 } from "@mui/joy";
3445
+ var PaginationButton = styled13(Button_default, {
3446
+ name: "Pagination",
3447
+ slot: "button"
3448
+ })(({ theme, active, size }) => ({
3449
+ "--Button-size": {
3450
+ sm: "32px",
3451
+ md: "40px",
3452
+ lg: "48px"
3453
+ }[size],
3454
+ width: "var(--Button-size)",
3455
+ height: "var(--Button-size)",
3456
+ backgroundColor: active ? theme.vars.palette.primary.softHoverBg : "transparent",
3457
+ color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.plainColor,
3458
+ "&:hover": {
3459
+ color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.softColor,
3460
+ backgroundColor: active ? theme.vars.palette.primary.softActiveBg : theme.vars.palette.neutral.softHoverBg
3461
+ }
3462
+ }));
3463
+ var PaginationIconButton = styled13(IconButton_default, {
3464
+ name: "Pagination",
3465
+ slot: "button"
3466
+ })(({ theme, size }) => ({
3467
+ "--IconButton-size": {
3468
+ sm: "32px",
3469
+ md: "40px",
3470
+ lg: "48px"
3471
+ }[size],
3472
+ "--Icon-fontSize": "20px",
3473
+ width: "var(--IconButton-size)",
3474
+ height: "var(--IconButton-size)",
3475
+ color: theme.vars.palette.neutral.plainColor,
3476
+ "&:hover": {
3477
+ color: theme.vars.palette.neutral.softColor,
3478
+ backgroundColor: theme.vars.palette.neutral.softHoverBg
3479
+ }
3480
+ }));
3481
+ var PaginationRoot = styled13(Stack_default, {
3482
+ name: "Pagination",
3483
+ slot: "root"
3484
+ })({});
3485
+ var PaginationContainer = styled13(Stack_default, {
3486
+ name: "Pagination",
3487
+ slot: "container"
3488
+ })(({ theme, size }) => ({
3489
+ gap: {
3490
+ sm: theme.spacing(1),
3491
+ md: theme.spacing(1.5),
3492
+ lg: theme.spacing(2)
3493
+ }[size]
3494
+ }));
3495
+ function Pagination(props) {
3496
+ const {
3497
+ paginationModel: _paginationModel,
3498
+ defaultPaginationModel = { page: 1, pageSize: 25 },
3499
+ onPageChange,
3500
+ rowCount,
3501
+ size = "md",
3502
+ ...innerProps
3503
+ } = props;
3504
+ const [paginationModel, setPaginationModel] = useControlledState(
3505
+ _paginationModel,
3506
+ defaultPaginationModel,
3507
+ useCallback10(
3508
+ (newPage) => {
3509
+ onPageChange(newPage.page);
3526
3510
  },
3527
- [selectionModel, onSelectionModelChange, selectedModelSet]
3528
- ),
3529
- columns,
3530
- processedColumnGroups,
3531
- onTotalSelect: useCallback9(() => {
3532
- const selectableRows = rows.filter((row, i) => {
3533
- if (!isRowSelectable) return true;
3534
- return isRowSelectable({ row, id: getId(row, i) });
3535
- });
3536
- onSelectionModelChange?.(isTotalSelected ? [] : selectableRows.map(getId), !isTotalSelected);
3537
- }, [isTotalSelected, rows, onSelectionModelChange, getId, isRowSelectable])
3511
+ [onPageChange]
3512
+ )
3513
+ );
3514
+ const handlePageChange = (newPage) => {
3515
+ setPaginationModel({ ...paginationModel, page: newPage });
3538
3516
  };
3517
+ const firstPage = 1;
3518
+ const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
3519
+ const beforePages = [paginationModel.page - 2, paginationModel.page - 1].filter((p) => p > 1);
3520
+ const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
3521
+ const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
3522
+ const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
3523
+ useEffect6(() => {
3524
+ if (paginationModel.page > lastPage) {
3525
+ setPaginationModel({ ...paginationModel, page: lastPage });
3526
+ }
3527
+ }, [rowCount, paginationModel, lastPage, setPaginationModel]);
3528
+ return /* @__PURE__ */ React24.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React24.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React24.createElement(
3529
+ PaginationIconButton,
3530
+ {
3531
+ size,
3532
+ variant: "plain",
3533
+ color: "neutral",
3534
+ onClick: () => handlePageChange(paginationModel.page - 1),
3535
+ disabled: paginationModel.page === firstPage,
3536
+ "aria-label": "Previous page"
3537
+ },
3538
+ /* @__PURE__ */ React24.createElement(PreviousIcon, null)
3539
+ ), paginationModel.page !== firstPage && /* @__PURE__ */ React24.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ React24.createElement(
3540
+ PaginationButton,
3541
+ {
3542
+ size,
3543
+ variant: "plain",
3544
+ color: "neutral",
3545
+ onClick: () => handlePageChange(paginationModel.page - 3),
3546
+ "aria-label": "More previous pages"
3547
+ },
3548
+ "..."
3549
+ ), beforePages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React24.createElement(PaginationButton, { active: "active", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), isMoreAfterPages && /* @__PURE__ */ React24.createElement(
3550
+ PaginationButton,
3551
+ {
3552
+ size,
3553
+ variant: "plain",
3554
+ color: "neutral",
3555
+ "aria-label": "More next pages",
3556
+ onClick: () => handlePageChange(paginationModel.page + 3)
3557
+ },
3558
+ "..."
3559
+ ), paginationModel.page !== lastPage && /* @__PURE__ */ React24.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ React24.createElement(
3560
+ PaginationIconButton,
3561
+ {
3562
+ size,
3563
+ variant: "plain",
3564
+ color: "neutral",
3565
+ onClick: () => handlePageChange(paginationModel.page + 1),
3566
+ disabled: paginationModel.page === lastPage,
3567
+ "aria-label": "Next page"
3568
+ },
3569
+ /* @__PURE__ */ React24.createElement(NextIcon, null)
3570
+ )));
3539
3571
  }
3572
+ Pagination.displayName = "Pagination";
3573
+
3574
+ // src/components/Pagination/index.ts
3575
+ var Pagination_default = Pagination;
3576
+
3577
+ // src/components/DataTable/DataTable.tsx
3540
3578
  function Component(props, apiRef) {
3541
3579
  const {
3542
3580
  rows,
@@ -3584,8 +3622,8 @@ function Component(props, apiRef) {
3584
3622
  ...innerProps
3585
3623
  } = props;
3586
3624
  const tableId = useId();
3587
- const parentRef = useRef4(null);
3588
- const tableBodyRef = useRef4(null);
3625
+ const parentRef = useRef6(null);
3626
+ const tableBodyRef = useRef6(null);
3589
3627
  const {
3590
3628
  columns,
3591
3629
  processedColumnGroups,
@@ -3616,29 +3654,29 @@ function Component(props, apiRef) {
3616
3654
  measureElement: (element) => element.clientHeight,
3617
3655
  overscan: 10
3618
3656
  });
3619
- const paginationModel = useMemo8(() => ({ page, pageSize }), [page, pageSize]);
3657
+ const paginationModel = useMemo10(() => ({ page, pageSize }), [page, pageSize]);
3620
3658
  const totalSize = virtualizer.getTotalSize();
3621
3659
  const virtualizedItems = virtualizer.getVirtualItems();
3622
- const getRowClickHandler = useCallback9(
3660
+ const getRowClickHandler = useCallback11(
3623
3661
  (row, rowId) => (e) => {
3624
3662
  onRowClick?.({ row, rowId }, e);
3625
3663
  checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
3626
3664
  },
3627
3665
  [onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
3628
3666
  );
3629
- const getRowFocusHandler = useCallback9(
3667
+ const getRowFocusHandler = useCallback11(
3630
3668
  (rowId) => () => {
3631
3669
  onRowFocus(rowId);
3632
3670
  },
3633
3671
  [onRowFocus]
3634
3672
  );
3635
- const getCheckboxClickHandler = useCallback9(
3673
+ const getCheckboxClickHandler = useCallback11(
3636
3674
  () => (e) => {
3637
3675
  e.stopPropagation();
3638
3676
  },
3639
3677
  []
3640
3678
  );
3641
- const getCheckboxChangeHandler = useCallback9(
3679
+ const getCheckboxChangeHandler = useCallback11(
3642
3680
  (rowId, row) => (e) => {
3643
3681
  if (isRowSelectableCheck(rowId, row)) {
3644
3682
  onCheckboxChange(e, rowId);
@@ -3662,7 +3700,7 @@ function Component(props, apiRef) {
3662
3700
  });
3663
3701
  }
3664
3702
  }));
3665
- return /* @__PURE__ */ React23.createElement(
3703
+ return /* @__PURE__ */ React25.createElement(
3666
3704
  Box_default,
3667
3705
  {
3668
3706
  sx: {
@@ -3672,7 +3710,7 @@ function Component(props, apiRef) {
3672
3710
  flexDirection: "column"
3673
3711
  }
3674
3712
  },
3675
- (!!checkboxSelection || !!Toolbar) && /* @__PURE__ */ React23.createElement(
3713
+ (!!checkboxSelection || !!Toolbar) && /* @__PURE__ */ React25.createElement(
3676
3714
  Stack_default,
3677
3715
  {
3678
3716
  direction: "row",
@@ -3682,10 +3720,10 @@ function Component(props, apiRef) {
3682
3720
  justifyContent: "space-between",
3683
3721
  alignItems: "center"
3684
3722
  },
3685
- !!checkboxSelection && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React23.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(selectableRowCount), " items")), isTotalSelected && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectableRowCount), " items are selected."), /* @__PURE__ */ React23.createElement(Button_default, { size: "sm", variant: "plain", color: "danger", onClick: onTotalSelect }, "Cancel"))),
3686
- Toolbar && /* @__PURE__ */ React23.createElement(Toolbar, { ...toolbarProps || {} })
3723
+ !!checkboxSelection && /* @__PURE__ */ React25.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React25.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React25.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React25.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React25.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(selectableRowCount), " items")), isTotalSelected && /* @__PURE__ */ React25.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React25.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectableRowCount), " items are selected."), /* @__PURE__ */ React25.createElement(Button_default, { size: "sm", variant: "plain", color: "danger", onClick: onTotalSelect }, "Cancel"))),
3724
+ Toolbar && /* @__PURE__ */ React25.createElement(Toolbar, { ...toolbarProps || {} })
3687
3725
  ),
3688
- /* @__PURE__ */ React23.createElement(
3726
+ /* @__PURE__ */ React25.createElement(
3689
3727
  Sheet_default,
3690
3728
  {
3691
3729
  variant: "outlined",
@@ -3706,14 +3744,14 @@ function Component(props, apiRef) {
3706
3744
  ref: parentRef,
3707
3745
  ...backgroundProps
3708
3746
  },
3709
- /* @__PURE__ */ React23.createElement(Table, { ...innerProps }, /* @__PURE__ */ React23.createElement("colgroup", null, checkboxSelection && /* @__PURE__ */ React23.createElement(
3747
+ /* @__PURE__ */ React25.createElement(Table, { ...innerProps }, /* @__PURE__ */ React25.createElement("colgroup", null, checkboxSelection && /* @__PURE__ */ React25.createElement(
3710
3748
  "col",
3711
3749
  {
3712
3750
  style: {
3713
3751
  width: "40px"
3714
3752
  }
3715
3753
  }
3716
- ), columns.map((c) => /* @__PURE__ */ React23.createElement(
3754
+ ), columns.map((c) => /* @__PURE__ */ React25.createElement(
3717
3755
  "col",
3718
3756
  {
3719
3757
  ref: c.tableColRef,
@@ -3722,7 +3760,7 @@ function Component(props, apiRef) {
3722
3760
  width: c.width
3723
3761
  }
3724
3762
  }
3725
- ))), /* @__PURE__ */ React23.createElement("thead", null, processedColumnGroups && processedColumnGroups.groups.map((levelGroups, level) => /* @__PURE__ */ React23.createElement("tr", { key: `group-level-${level}` }, checkboxSelection && level === 0 && /* @__PURE__ */ React23.createElement(
3763
+ ))), /* @__PURE__ */ React25.createElement("thead", null, processedColumnGroups && processedColumnGroups.groups.map((levelGroups, level) => /* @__PURE__ */ React25.createElement("tr", { key: `group-level-${level}` }, checkboxSelection && level === 0 && /* @__PURE__ */ React25.createElement(
3726
3764
  "th",
3727
3765
  {
3728
3766
  rowSpan: processedColumnGroups.maxLevel + 2,
@@ -3732,7 +3770,7 @@ function Component(props, apiRef) {
3732
3770
  verticalAlign: "middle"
3733
3771
  }
3734
3772
  },
3735
- /* @__PURE__ */ React23.createElement(
3773
+ /* @__PURE__ */ React25.createElement(
3736
3774
  RenderCheckbox,
3737
3775
  {
3738
3776
  onChange: onAllCheckboxChange,
@@ -3742,10 +3780,12 @@ function Component(props, apiRef) {
3742
3780
  ...checkboxProps
3743
3781
  }
3744
3782
  )
3745
- ), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */ React23.createElement("th", { key: `empty-${level}-${i}` })), levelGroups.map((group, groupIndex) => {
3783
+ ), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */ React25.createElement("th", { key: `empty-${level}-${i}` })), levelGroups.map((group, groupIndex) => {
3746
3784
  const nextGroup = levelGroups[groupIndex + 1];
3747
3785
  const emptyCells = nextGroup ? nextGroup.startIndex - (group.startIndex + group.colspan) : columns.length - (group.startIndex + group.colspan);
3748
- return /* @__PURE__ */ React23.createElement(Fragment2, { key: group.groupId }, /* @__PURE__ */ React23.createElement(
3786
+ const params = { groupId: group.groupId };
3787
+ const computedHeaderClassName = group.headerClassName ? typeof group.headerClassName === "function" ? group.headerClassName(params) : group.headerClassName : void 0;
3788
+ return /* @__PURE__ */ React25.createElement(Fragment2, { key: group.groupId }, /* @__PURE__ */ React25.createElement(
3749
3789
  "th",
3750
3790
  {
3751
3791
  colSpan: group.colspan,
@@ -3753,11 +3793,12 @@ function Component(props, apiRef) {
3753
3793
  textAlign: "center",
3754
3794
  fontWeight: "bold",
3755
3795
  verticalAlign: "middle"
3756
- }
3796
+ },
3797
+ className: computedHeaderClassName
3757
3798
  },
3758
3799
  group.headerName ?? group.groupId
3759
- ), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */ React23.createElement("th", { key: `empty-between-${level}-${groupIndex}-${i}`, colSpan: 1 })));
3760
- }))), /* @__PURE__ */ React23.createElement("tr", null, !processedColumnGroups && checkboxSelection && /* @__PURE__ */ React23.createElement(
3800
+ ), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */ React25.createElement("th", { key: `empty-between-${level}-${groupIndex}-${i}`, colSpan: 1 })));
3801
+ }))), /* @__PURE__ */ React25.createElement("tr", null, !processedColumnGroups && checkboxSelection && /* @__PURE__ */ React25.createElement(
3761
3802
  "th",
3762
3803
  {
3763
3804
  style: {
@@ -3765,7 +3806,7 @@ function Component(props, apiRef) {
3765
3806
  textAlign: "center"
3766
3807
  }
3767
3808
  },
3768
- /* @__PURE__ */ React23.createElement(
3809
+ /* @__PURE__ */ React25.createElement(
3769
3810
  RenderCheckbox,
3770
3811
  {
3771
3812
  onChange: onAllCheckboxChange,
@@ -3777,7 +3818,7 @@ function Component(props, apiRef) {
3777
3818
  )
3778
3819
  ), columns.map((c, i) => (
3779
3820
  // @ts-ignore
3780
- /* @__PURE__ */ React23.createElement(
3821
+ /* @__PURE__ */ React25.createElement(
3781
3822
  HeadCell2,
3782
3823
  {
3783
3824
  tableId,
@@ -3788,7 +3829,7 @@ function Component(props, apiRef) {
3788
3829
  ...c
3789
3830
  }
3790
3831
  )
3791
- )))), /* @__PURE__ */ React23.createElement(
3832
+ )))), /* @__PURE__ */ React25.createElement(
3792
3833
  VirtualizedTableBody,
3793
3834
  {
3794
3835
  ref: tableBodyRef,
@@ -3798,7 +3839,7 @@ function Component(props, apiRef) {
3798
3839
  role: "rowgroup",
3799
3840
  "aria-label": "DataTableBody"
3800
3841
  },
3801
- !!loading && /* @__PURE__ */ React23.createElement(OverlayWrapper, null, /* @__PURE__ */ React23.createElement(
3842
+ !!loading && /* @__PURE__ */ React25.createElement(OverlayWrapper, null, /* @__PURE__ */ React25.createElement(
3802
3843
  "td",
3803
3844
  {
3804
3845
  style: {
@@ -3807,7 +3848,7 @@ function Component(props, apiRef) {
3807
3848
  overflow: "visible"
3808
3849
  }
3809
3850
  },
3810
- /* @__PURE__ */ React23.createElement(
3851
+ /* @__PURE__ */ React25.createElement(
3811
3852
  Box_default,
3812
3853
  {
3813
3854
  sx: {
@@ -3817,7 +3858,7 @@ function Component(props, apiRef) {
3817
3858
  right: 0
3818
3859
  }
3819
3860
  },
3820
- /* @__PURE__ */ React23.createElement(LoadingOverlay, null)
3861
+ /* @__PURE__ */ React25.createElement(LoadingOverlay, null)
3821
3862
  )
3822
3863
  )),
3823
3864
  virtualizedItems.map((virtualizedRow, index) => {
@@ -3825,7 +3866,7 @@ function Component(props, apiRef) {
3825
3866
  const row = dataInPage[rowIndex];
3826
3867
  const rowId = getId(row, rowIndex);
3827
3868
  const striped = stripe && (stripe === "even" && (rowIndex + 1) % 2 === 0 || stripe === "odd" && (rowIndex + 1) % 2 === 1);
3828
- return /* @__PURE__ */ React23.createElement(
3869
+ return /* @__PURE__ */ React25.createElement(
3829
3870
  VirtualizedTableRow,
3830
3871
  {
3831
3872
  key: virtualizedRow.key,
@@ -3843,7 +3884,7 @@ function Component(props, apiRef) {
3843
3884
  transform: `translateY(${virtualizedRow.start - index * virtualizedRow.size}px)`
3844
3885
  }
3845
3886
  },
3846
- checkboxSelection && /* @__PURE__ */ React23.createElement(
3887
+ checkboxSelection && /* @__PURE__ */ React25.createElement(
3847
3888
  "th",
3848
3889
  {
3849
3890
  scope: "row",
@@ -3851,7 +3892,7 @@ function Component(props, apiRef) {
3851
3892
  textAlign: "center"
3852
3893
  }
3853
3894
  },
3854
- /* @__PURE__ */ React23.createElement(
3895
+ /* @__PURE__ */ React25.createElement(
3855
3896
  RenderCheckbox,
3856
3897
  {
3857
3898
  onClick: getCheckboxClickHandler(),
@@ -3862,7 +3903,7 @@ function Component(props, apiRef) {
3862
3903
  }
3863
3904
  )
3864
3905
  ),
3865
- /* @__PURE__ */ React23.createElement(
3906
+ /* @__PURE__ */ React25.createElement(
3866
3907
  BodyRow2,
3867
3908
  {
3868
3909
  tableId,
@@ -3875,9 +3916,9 @@ function Component(props, apiRef) {
3875
3916
  )
3876
3917
  );
3877
3918
  })
3878
- ), Footer && /* @__PURE__ */ React23.createElement(Footer, null))
3919
+ ), Footer && /* @__PURE__ */ React25.createElement(Footer, null))
3879
3920
  ),
3880
- pagination && /* @__PURE__ */ React23.createElement(
3921
+ pagination && /* @__PURE__ */ React25.createElement(
3881
3922
  Pagination_default,
3882
3923
  {
3883
3924
  pt: 2,
@@ -3894,12 +3935,12 @@ var DataTable = forwardRef7(Component);
3894
3935
  DataTable.displayName = "DataTable";
3895
3936
 
3896
3937
  // src/components/DateRangePicker/DateRangePicker.tsx
3897
- import React24, { forwardRef as forwardRef8, useCallback as useCallback10, useEffect as useEffect6, useImperativeHandle as useImperativeHandle3, useMemo as useMemo9, useRef as useRef5, useState as useState7 } from "react";
3938
+ import React26, { forwardRef as forwardRef8, useCallback as useCallback12, useEffect as useEffect7, useImperativeHandle as useImperativeHandle3, useMemo as useMemo11, useRef as useRef7, useState as useState8 } from "react";
3898
3939
  import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
3899
3940
  import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
3900
- import { styled as styled13, useThemeProps as useThemeProps5 } from "@mui/joy";
3941
+ import { styled as styled14, useThemeProps as useThemeProps5 } from "@mui/joy";
3901
3942
  import { FocusTrap as FocusTrap2, ClickAwayListener as ClickAwayListener2, Popper as Popper3 } from "@mui/base";
3902
- var CalendarButton2 = styled13(IconButton_default, {
3943
+ var CalendarButton2 = styled14(IconButton_default, {
3903
3944
  name: "DateRangePicker",
3904
3945
  slot: "calendarButton"
3905
3946
  })(({ theme }) => ({
@@ -3909,13 +3950,13 @@ var CalendarButton2 = styled13(IconButton_default, {
3909
3950
  outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
3910
3951
  }
3911
3952
  }));
3912
- var StyledPopper2 = styled13(Popper3, {
3953
+ var StyledPopper2 = styled14(Popper3, {
3913
3954
  name: "DateRangePicker",
3914
3955
  slot: "popper"
3915
3956
  })(({ theme }) => ({
3916
3957
  zIndex: theme.zIndex.tooltip
3917
3958
  }));
3918
- var CalendarSheet2 = styled13(Sheet_default, {
3959
+ var CalendarSheet2 = styled14(Sheet_default, {
3919
3960
  name: "DateRangePicker",
3920
3961
  slot: "sheet",
3921
3962
  overridesResolver: (props, styles) => styles.root
@@ -3925,7 +3966,7 @@ var CalendarSheet2 = styled13(Sheet_default, {
3925
3966
  boxShadow: theme.shadow.md,
3926
3967
  borderRadius: theme.radius.md
3927
3968
  }));
3928
- var DateRangePickerRoot = styled13("div", {
3969
+ var DateRangePickerRoot = styled14("div", {
3929
3970
  name: "DateRangePicker",
3930
3971
  slot: "root",
3931
3972
  overridesResolver: (props, styles) => styles.root
@@ -3995,9 +4036,9 @@ var parseDates = (str, format) => {
3995
4036
  var formatToPattern2 = (format) => {
3996
4037
  return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
3997
4038
  };
3998
- var TextMaskAdapter5 = React24.forwardRef(function TextMaskAdapter6(props, ref) {
4039
+ var TextMaskAdapter5 = React26.forwardRef(function TextMaskAdapter6(props, ref) {
3999
4040
  const { onChange, format, ...other } = props;
4000
- return /* @__PURE__ */ React24.createElement(
4041
+ return /* @__PURE__ */ React26.createElement(
4001
4042
  IMaskInput2,
4002
4043
  {
4003
4044
  ...other,
@@ -4055,23 +4096,23 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4055
4096
  readOnly,
4056
4097
  ...innerProps
4057
4098
  } = props;
4058
- const innerRef = useRef5(null);
4059
- const buttonRef = useRef5(null);
4099
+ const innerRef = useRef7(null);
4100
+ const buttonRef = useRef7(null);
4060
4101
  const [value, setValue] = useControlledState(
4061
4102
  props.value,
4062
4103
  props.defaultValue || "",
4063
- useCallback10((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4104
+ useCallback12((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4064
4105
  );
4065
- const [displayValue, setDisplayValue] = useState7(
4106
+ const [displayValue, setDisplayValue] = useState8(
4066
4107
  () => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
4067
4108
  );
4068
- const [anchorEl, setAnchorEl] = useState7(null);
4109
+ const [anchorEl, setAnchorEl] = useState8(null);
4069
4110
  const open = Boolean(anchorEl);
4070
- const calendarValue = useMemo9(
4111
+ const calendarValue = useMemo11(
4071
4112
  () => value ? parseDates(value, format) : void 0,
4072
4113
  [value, format]
4073
4114
  );
4074
- useEffect6(() => {
4115
+ useEffect7(() => {
4075
4116
  if (value) {
4076
4117
  try {
4077
4118
  const dates = parseDates(value, format);
@@ -4083,13 +4124,13 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4083
4124
  setDisplayValue("");
4084
4125
  }
4085
4126
  }, [displayFormat, value, format]);
4086
- useEffect6(() => {
4127
+ useEffect7(() => {
4087
4128
  if (!anchorEl) {
4088
4129
  innerRef.current?.blur();
4089
4130
  }
4090
4131
  }, [anchorEl, innerRef]);
4091
4132
  useImperativeHandle3(ref, () => innerRef.current, [innerRef]);
4092
- const handleChange = useCallback10(
4133
+ const handleChange = useCallback12(
4093
4134
  (event) => {
4094
4135
  const value2 = event.target.value;
4095
4136
  setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat) : value2);
@@ -4097,7 +4138,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4097
4138
  },
4098
4139
  [displayFormat, format, setValue]
4099
4140
  );
4100
- const handleDisplayInputChange = useCallback10(
4141
+ const handleDisplayInputChange = useCallback12(
4101
4142
  (event) => {
4102
4143
  if (event.target.value === "") {
4103
4144
  handleChange({
@@ -4122,14 +4163,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4122
4163
  },
4123
4164
  [displayFormat, format, handleChange, props.name]
4124
4165
  );
4125
- const handleCalendarToggle = useCallback10(
4166
+ const handleCalendarToggle = useCallback12(
4126
4167
  (event) => {
4127
4168
  setAnchorEl(anchorEl ? null : event.currentTarget);
4128
4169
  innerRef.current?.focus();
4129
4170
  },
4130
4171
  [anchorEl, setAnchorEl, innerRef]
4131
4172
  );
4132
- const handleCalendarChange = useCallback10(
4173
+ const handleCalendarChange = useCallback12(
4133
4174
  ([date1, date2]) => {
4134
4175
  if (!date1 || !date2) return;
4135
4176
  const formattedValue = formatValueString2([date1, date2], format);
@@ -4143,7 +4184,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4143
4184
  },
4144
4185
  [props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat]
4145
4186
  );
4146
- const handleInputMouseDown = useCallback10(
4187
+ const handleInputMouseDown = useCallback12(
4147
4188
  (event) => {
4148
4189
  if (inputReadOnly) {
4149
4190
  event.preventDefault();
@@ -4152,7 +4193,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4152
4193
  },
4153
4194
  [inputReadOnly, buttonRef]
4154
4195
  );
4155
- return /* @__PURE__ */ React24.createElement(DateRangePickerRoot, null, /* @__PURE__ */ React24.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
4196
+ return /* @__PURE__ */ React26.createElement(DateRangePickerRoot, null, /* @__PURE__ */ React26.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
4156
4197
  Input_default,
4157
4198
  {
4158
4199
  ...innerProps,
@@ -4180,7 +4221,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4180
4221
  error,
4181
4222
  className,
4182
4223
  sx,
4183
- endDecorator: /* @__PURE__ */ React24.createElement(
4224
+ endDecorator: /* @__PURE__ */ React26.createElement(
4184
4225
  CalendarButton2,
4185
4226
  {
4186
4227
  ref: buttonRef,
@@ -4192,13 +4233,13 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4192
4233
  "aria-expanded": open,
4193
4234
  disabled
4194
4235
  },
4195
- /* @__PURE__ */ React24.createElement(CalendarTodayIcon2, null)
4236
+ /* @__PURE__ */ React26.createElement(CalendarTodayIcon2, null)
4196
4237
  ),
4197
4238
  label,
4198
4239
  helperText,
4199
4240
  readOnly: readOnly || inputReadOnly
4200
4241
  }
4201
- ), open && /* @__PURE__ */ React24.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React24.createElement(
4242
+ ), open && /* @__PURE__ */ React26.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React26.createElement(
4202
4243
  StyledPopper2,
4203
4244
  {
4204
4245
  id: "date-range-picker-popper",
@@ -4217,7 +4258,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4217
4258
  "aria-label": "Calendar Tooltip",
4218
4259
  "aria-expanded": open
4219
4260
  },
4220
- /* @__PURE__ */ React24.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React24.createElement(
4261
+ /* @__PURE__ */ React26.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React26.createElement(
4221
4262
  Calendar_default,
4222
4263
  {
4223
4264
  rangeSelection: true,
@@ -4228,14 +4269,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4228
4269
  disableFuture,
4229
4270
  disablePast
4230
4271
  }
4231
- ), !hideClearButton && /* @__PURE__ */ React24.createElement(
4272
+ ), !hideClearButton && /* @__PURE__ */ React26.createElement(
4232
4273
  DialogActions_default,
4233
4274
  {
4234
4275
  sx: {
4235
4276
  p: 1
4236
4277
  }
4237
4278
  },
4238
- /* @__PURE__ */ React24.createElement(
4279
+ /* @__PURE__ */ React26.createElement(
4239
4280
  Button_default,
4240
4281
  {
4241
4282
  size,
@@ -4255,11 +4296,11 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4255
4296
  DateRangePicker.displayName = "DateRangePicker";
4256
4297
 
4257
4298
  // src/components/Drawer/Drawer.tsx
4258
- import React25 from "react";
4259
- import { Drawer as JoyDrawer, styled as styled14, drawerClasses } from "@mui/joy";
4299
+ import React27 from "react";
4300
+ import { Drawer as JoyDrawer, styled as styled15, drawerClasses } from "@mui/joy";
4260
4301
  import { motion as motion22 } from "framer-motion";
4261
4302
  var MotionDrawer = motion22(JoyDrawer);
4262
- var StyledDrawer = styled14(MotionDrawer)(({ theme, size = "md" }) => ({
4303
+ var StyledDrawer = styled15(MotionDrawer)(({ theme, size = "md" }) => ({
4263
4304
  "--Drawer-horizontalSize": {
4264
4305
  sm: "360px",
4265
4306
  md: "600px",
@@ -4273,15 +4314,15 @@ var StyledDrawer = styled14(MotionDrawer)(({ theme, size = "md" }) => ({
4273
4314
  }));
4274
4315
  var Drawer = (props) => {
4275
4316
  const { children, ...innerProps } = props;
4276
- return /* @__PURE__ */ React25.createElement(StyledDrawer, { ...innerProps }, children);
4317
+ return /* @__PURE__ */ React27.createElement(StyledDrawer, { ...innerProps }, children);
4277
4318
  };
4278
4319
  Drawer.displayName = "Drawer";
4279
4320
 
4280
4321
  // src/components/DialogContent/DialogContent.tsx
4281
- import { DialogContent as JoyDialogContent, styled as styled15 } from "@mui/joy";
4322
+ import { DialogContent as JoyDialogContent, styled as styled16 } from "@mui/joy";
4282
4323
  import { motion as motion23 } from "framer-motion";
4283
4324
  var MotionDialogContent = motion23(JoyDialogContent);
4284
- var StyledDialogContent = styled15(MotionDialogContent)(({ theme }) => ({
4325
+ var StyledDialogContent = styled16(MotionDialogContent)(({ theme }) => ({
4285
4326
  padding: theme.spacing(0, 6, 5)
4286
4327
  }));
4287
4328
  var DialogContent = StyledDialogContent;
@@ -4291,10 +4332,10 @@ DialogContent.displayName = "DialogContent";
4291
4332
  var DialogContent_default = DialogContent;
4292
4333
 
4293
4334
  // src/components/DialogTitle/DialogTitle.tsx
4294
- import { DialogTitle as JoyDialogTitle, styled as styled16 } from "@mui/joy";
4335
+ import { DialogTitle as JoyDialogTitle, styled as styled17 } from "@mui/joy";
4295
4336
  import { motion as motion24 } from "framer-motion";
4296
4337
  var MotionDialogTitle = motion24(JoyDialogTitle);
4297
- var StyledDialogTitle = styled16(MotionDialogTitle)(({ theme }) => ({
4338
+ var StyledDialogTitle = styled17(MotionDialogTitle)(({ theme }) => ({
4298
4339
  padding: theme.spacing(4, 6)
4299
4340
  }));
4300
4341
  var DialogTitle = StyledDialogTitle;
@@ -4304,22 +4345,22 @@ DialogTitle.displayName = "DialogTitle";
4304
4345
  var DialogTitle_default = DialogTitle;
4305
4346
 
4306
4347
  // src/components/DialogFrame/DialogFrame.tsx
4307
- import React27 from "react";
4348
+ import React29 from "react";
4308
4349
 
4309
4350
  // src/components/Modal/Modal.tsx
4310
- import React26 from "react";
4351
+ import React28 from "react";
4311
4352
  import {
4312
4353
  Modal as JoyModal,
4313
4354
  ModalDialog as JoyModalDialog,
4314
4355
  ModalClose as JoyModalClose,
4315
4356
  ModalOverflow as JoyModalOverflow,
4316
- styled as styled17
4357
+ styled as styled18
4317
4358
  } from "@mui/joy";
4318
4359
  import { motion as motion25 } from "framer-motion";
4319
4360
  var MotionModal = motion25(JoyModal);
4320
4361
  var Modal = MotionModal;
4321
4362
  Modal.displayName = "Modal";
4322
- var StyledModalDialog = styled17(JoyModalDialog)({
4363
+ var StyledModalDialog = styled18(JoyModalDialog)({
4323
4364
  padding: 0
4324
4365
  });
4325
4366
  var ModalDialog = StyledModalDialog;
@@ -4330,37 +4371,37 @@ var ModalOverflow = MotionModalOverflow;
4330
4371
  ModalOverflow.displayName = "ModalOverflow";
4331
4372
  function ModalFrame(props) {
4332
4373
  const { title, children, titleStartDecorator, onClose, ...innerProps } = props;
4333
- return /* @__PURE__ */ React26.createElement(StyledModalDialog, { ...innerProps }, /* @__PURE__ */ React26.createElement(ModalClose, { onClick: onClose }), /* @__PURE__ */ React26.createElement(DialogTitle_default, null, titleStartDecorator, title), /* @__PURE__ */ React26.createElement(DialogContent_default, null, children));
4374
+ return /* @__PURE__ */ React28.createElement(StyledModalDialog, { ...innerProps }, /* @__PURE__ */ React28.createElement(ModalClose, { onClick: onClose }), /* @__PURE__ */ React28.createElement(DialogTitle_default, null, titleStartDecorator, title), /* @__PURE__ */ React28.createElement(DialogContent_default, null, children));
4334
4375
  }
4335
4376
  ModalFrame.displayName = "ModalFrame";
4336
4377
 
4337
4378
  // src/components/DialogFrame/DialogFrame.tsx
4338
- import { styled as styled18 } from "@mui/joy";
4339
- var StyledDialogFrame = styled18(ModalDialog, {
4379
+ import { styled as styled19 } from "@mui/joy";
4380
+ var StyledDialogFrame = styled19(ModalDialog, {
4340
4381
  name: "Dialog",
4341
4382
  slot: "Root"
4342
4383
  })({
4343
4384
  padding: 0
4344
4385
  });
4345
- var DialogFrame = React27.forwardRef((props, ref) => {
4386
+ var DialogFrame = React29.forwardRef((props, ref) => {
4346
4387
  const { title, children, actions, fullscreen, ...innerProps } = props;
4347
- return /* @__PURE__ */ React27.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...innerProps }, /* @__PURE__ */ React27.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React27.createElement(DialogContent_default, null, children), /* @__PURE__ */ React27.createElement(DialogActions_default, null, actions));
4388
+ return /* @__PURE__ */ React29.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...innerProps }, /* @__PURE__ */ React29.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React29.createElement(DialogContent_default, null, children), /* @__PURE__ */ React29.createElement(DialogActions_default, null, actions));
4348
4389
  });
4349
4390
  DialogFrame.displayName = "DialogFrame";
4350
4391
 
4351
4392
  // src/components/Divider/Divider.tsx
4352
- import React28 from "react";
4393
+ import React30 from "react";
4353
4394
  import { Divider as JoyDivider } from "@mui/joy";
4354
4395
  import { motion as motion26 } from "framer-motion";
4355
4396
  var MotionDivider = motion26(JoyDivider);
4356
4397
  var Divider = (props) => {
4357
- return /* @__PURE__ */ React28.createElement(MotionDivider, { ...props });
4398
+ return /* @__PURE__ */ React30.createElement(MotionDivider, { ...props });
4358
4399
  };
4359
4400
  Divider.displayName = "Divider";
4360
4401
 
4361
4402
  // src/components/InsetDrawer/InsetDrawer.tsx
4362
- import { Drawer as JoyDrawer2, styled as styled19, drawerClasses as drawerClasses2 } from "@mui/joy";
4363
- var InsetDrawer = styled19(JoyDrawer2)(({ theme }) => ({
4403
+ import { Drawer as JoyDrawer2, styled as styled20, drawerClasses as drawerClasses2 } from "@mui/joy";
4404
+ var InsetDrawer = styled20(JoyDrawer2)(({ theme }) => ({
4364
4405
  [`& .${drawerClasses2.content}`]: {
4365
4406
  backgroundColor: "transparent",
4366
4407
  boxShadow: "none",
@@ -4378,7 +4419,7 @@ var InsetDrawer = styled19(JoyDrawer2)(({ theme }) => ({
4378
4419
  import { Grid } from "@mui/joy";
4379
4420
 
4380
4421
  // src/components/IconMenuButton/IconMenuButton.tsx
4381
- import React29 from "react";
4422
+ import React31 from "react";
4382
4423
  import { MenuButton as JoyMenuButton2, IconButton as JoyIconButton2 } from "@mui/joy";
4383
4424
  function IconMenuButton(props) {
4384
4425
  const {
@@ -4392,7 +4433,7 @@ function IconMenuButton(props) {
4392
4433
  placement = "bottom"
4393
4434
  } = props;
4394
4435
  if (!items.length) {
4395
- return /* @__PURE__ */ React29.createElement(
4436
+ return /* @__PURE__ */ React31.createElement(
4396
4437
  JoyIconButton2,
4397
4438
  {
4398
4439
  component: props.buttonComponent ?? "button",
@@ -4406,7 +4447,7 @@ function IconMenuButton(props) {
4406
4447
  icon
4407
4448
  );
4408
4449
  }
4409
- return /* @__PURE__ */ React29.createElement(Dropdown_default, null, /* @__PURE__ */ React29.createElement(
4450
+ return /* @__PURE__ */ React31.createElement(Dropdown_default, null, /* @__PURE__ */ React31.createElement(
4410
4451
  JoyMenuButton2,
4411
4452
  {
4412
4453
  slots: { root: JoyIconButton2 },
@@ -4423,19 +4464,19 @@ function IconMenuButton(props) {
4423
4464
  }
4424
4465
  },
4425
4466
  icon
4426
- ), /* @__PURE__ */ React29.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React29.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
4467
+ ), /* @__PURE__ */ React31.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React31.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
4427
4468
  }
4428
4469
  IconMenuButton.displayName = "IconMenuButton";
4429
4470
 
4430
4471
  // src/components/Markdown/Markdown.tsx
4431
- import React30, { lazy, Suspense, useEffect as useEffect7, useState as useState8 } from "react";
4472
+ import React32, { lazy, Suspense, useEffect as useEffect8, useState as useState9 } from "react";
4432
4473
  import { Skeleton } from "@mui/joy";
4433
4474
  import { Link as Link2 } from "@mui/joy";
4434
4475
  import remarkGfm from "remark-gfm";
4435
4476
  var LazyReactMarkdown = lazy(() => import("react-markdown"));
4436
4477
  var Markdown = (props) => {
4437
- const [rehypeAccent2, setRehypeAccent] = useState8(null);
4438
- useEffect7(() => {
4478
+ const [rehypeAccent2, setRehypeAccent] = useState9(null);
4479
+ useEffect8(() => {
4439
4480
  const loadRehypeAccent = async () => {
4440
4481
  const module = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
4441
4482
  setRehypeAccent(() => module.rehypeAccent);
@@ -4457,12 +4498,12 @@ var Markdown = (props) => {
4457
4498
  if (!rehypeAccent2) {
4458
4499
  return null;
4459
4500
  }
4460
- return /* @__PURE__ */ React30.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React30.createElement(
4501
+ return /* @__PURE__ */ React32.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React32.createElement(
4461
4502
  Suspense,
4462
4503
  {
4463
- fallback: fallback || /* @__PURE__ */ React30.createElement(Typography, null, /* @__PURE__ */ React30.createElement(Skeleton, null, content || ""))
4504
+ fallback: fallback || /* @__PURE__ */ React32.createElement(Typography, null, /* @__PURE__ */ React32.createElement(Skeleton, null, content || ""))
4464
4505
  },
4465
- /* @__PURE__ */ React30.createElement(
4506
+ /* @__PURE__ */ React32.createElement(
4466
4507
  LazyReactMarkdown,
4467
4508
  {
4468
4509
  ...markdownOptions,
@@ -4470,15 +4511,15 @@ var Markdown = (props) => {
4470
4511
  rehypePlugins: [[rehypeAccent2, { accentColor }]],
4471
4512
  remarkPlugins: [remarkGfm],
4472
4513
  components: {
4473
- h1: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: "h1" }, children),
4474
- h2: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: "h2" }, children),
4475
- h3: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: "h3" }, children),
4476
- h4: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: "h4" }, children),
4477
- p: ({ children, node }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
4478
- a: ({ children, href }) => /* @__PURE__ */ React30.createElement(Link2, { href, target: defaultLinkAction }, children),
4479
- hr: () => /* @__PURE__ */ React30.createElement(Divider, null),
4480
- b: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { fontWeight: boldFontWeight }, children),
4481
- strong: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { fontWeight: boldFontWeight }, children),
4514
+ h1: ({ children }) => /* @__PURE__ */ React32.createElement(Typography, { color, textColor, level: "h1" }, children),
4515
+ h2: ({ children }) => /* @__PURE__ */ React32.createElement(Typography, { color, textColor, level: "h2" }, children),
4516
+ h3: ({ children }) => /* @__PURE__ */ React32.createElement(Typography, { color, textColor, level: "h3" }, children),
4517
+ h4: ({ children }) => /* @__PURE__ */ React32.createElement(Typography, { color, textColor, level: "h4" }, children),
4518
+ p: ({ children, node }) => /* @__PURE__ */ React32.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
4519
+ a: ({ children, href }) => /* @__PURE__ */ React32.createElement(Link2, { href, target: defaultLinkAction }, children),
4520
+ hr: () => /* @__PURE__ */ React32.createElement(Divider, null),
4521
+ b: ({ children }) => /* @__PURE__ */ React32.createElement(Typography, { fontWeight: boldFontWeight }, children),
4522
+ strong: ({ children }) => /* @__PURE__ */ React32.createElement(Typography, { fontWeight: boldFontWeight }, children),
4482
4523
  ...markdownOptions?.components
4483
4524
  }
4484
4525
  }
@@ -4488,7 +4529,7 @@ var Markdown = (props) => {
4488
4529
  Markdown.displayName = "Markdown";
4489
4530
 
4490
4531
  // src/components/MenuButton/MenuButton.tsx
4491
- import React31 from "react";
4532
+ import React33 from "react";
4492
4533
  import { MenuButton as JoyMenuButton3, Button as JoyButton2 } from "@mui/joy";
4493
4534
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
4494
4535
  function MenuButton(props) {
@@ -4506,7 +4547,7 @@ function MenuButton(props) {
4506
4547
  placement = "bottom"
4507
4548
  } = props;
4508
4549
  if (!items.length) {
4509
- return /* @__PURE__ */ React31.createElement(
4550
+ return /* @__PURE__ */ React33.createElement(
4510
4551
  JoyButton2,
4511
4552
  {
4512
4553
  component: props.buttonComponent ?? "button",
@@ -4517,12 +4558,12 @@ function MenuButton(props) {
4517
4558
  loading,
4518
4559
  startDecorator,
4519
4560
  ...props.buttonComponentProps ?? {},
4520
- endDecorator: showIcon ? /* @__PURE__ */ React31.createElement(React31.Fragment, null, endDecorator, /* @__PURE__ */ React31.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React31.createElement(React31.Fragment, null, endDecorator)
4561
+ endDecorator: showIcon ? /* @__PURE__ */ React33.createElement(React33.Fragment, null, endDecorator, /* @__PURE__ */ React33.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React33.createElement(React33.Fragment, null, endDecorator)
4521
4562
  },
4522
4563
  buttonText
4523
4564
  );
4524
4565
  }
4525
- return /* @__PURE__ */ React31.createElement(Dropdown_default, null, /* @__PURE__ */ React31.createElement(
4566
+ return /* @__PURE__ */ React33.createElement(Dropdown_default, null, /* @__PURE__ */ React33.createElement(
4526
4567
  JoyMenuButton3,
4527
4568
  {
4528
4569
  component: props.buttonComponent ?? "button",
@@ -4533,25 +4574,25 @@ function MenuButton(props) {
4533
4574
  loading,
4534
4575
  startDecorator,
4535
4576
  ...props.buttonComponentProps ?? {},
4536
- endDecorator: showIcon ? /* @__PURE__ */ React31.createElement(React31.Fragment, null, endDecorator, /* @__PURE__ */ React31.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React31.createElement(React31.Fragment, null, endDecorator)
4577
+ endDecorator: showIcon ? /* @__PURE__ */ React33.createElement(React33.Fragment, null, endDecorator, /* @__PURE__ */ React33.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React33.createElement(React33.Fragment, null, endDecorator)
4537
4578
  },
4538
4579
  buttonText
4539
- ), /* @__PURE__ */ React31.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React31.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
4580
+ ), /* @__PURE__ */ React33.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React33.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
4540
4581
  }
4541
4582
  MenuButton.displayName = "MenuButton";
4542
4583
 
4543
4584
  // src/components/MonthPicker/MonthPicker.tsx
4544
- import React32, { forwardRef as forwardRef9, useCallback as useCallback11, useEffect as useEffect8, useImperativeHandle as useImperativeHandle4, useRef as useRef6, useState as useState9 } from "react";
4585
+ import React34, { forwardRef as forwardRef9, useCallback as useCallback13, useEffect as useEffect9, useImperativeHandle as useImperativeHandle4, useRef as useRef8, useState as useState10 } from "react";
4545
4586
  import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
4546
- import { styled as styled20, useThemeProps as useThemeProps6 } from "@mui/joy";
4587
+ import { styled as styled21, useThemeProps as useThemeProps6 } from "@mui/joy";
4547
4588
  import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
4548
- var StyledPopper3 = styled20(Popper4, {
4589
+ var StyledPopper3 = styled21(Popper4, {
4549
4590
  name: "MonthPicker",
4550
4591
  slot: "popper"
4551
4592
  })(({ theme }) => ({
4552
4593
  zIndex: theme.zIndex.tooltip
4553
4594
  }));
4554
- var CalendarSheet3 = styled20(Sheet_default, {
4595
+ var CalendarSheet3 = styled21(Sheet_default, {
4555
4596
  name: "MonthPicker",
4556
4597
  slot: "sheet",
4557
4598
  overridesResolver: (props, styles) => styles.root
@@ -4560,7 +4601,7 @@ var CalendarSheet3 = styled20(Sheet_default, {
4560
4601
  boxShadow: theme.shadow.md,
4561
4602
  borderRadius: theme.radius.md
4562
4603
  }));
4563
- var MonthPickerRoot = styled20("div", {
4604
+ var MonthPickerRoot = styled21("div", {
4564
4605
  name: "MonthPicker",
4565
4606
  slot: "root",
4566
4607
  overridesResolver: (props, styles) => styles.root
@@ -4623,14 +4664,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4623
4664
  locale,
4624
4665
  ...innerProps
4625
4666
  } = props;
4626
- const innerRef = useRef6(null);
4627
- const buttonRef = useRef6(null);
4667
+ const innerRef = useRef8(null);
4668
+ const buttonRef = useRef8(null);
4628
4669
  const [value, setValue, isControlled] = useControlledState(
4629
4670
  props.value,
4630
4671
  props.defaultValue || "",
4631
- useCallback11((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4672
+ useCallback13((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4632
4673
  );
4633
- const getFormattedDisplayValue = useCallback11(
4674
+ const getFormattedDisplayValue = useCallback13(
4634
4675
  (inputValue) => {
4635
4676
  if (!inputValue) return "";
4636
4677
  try {
@@ -4641,19 +4682,19 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4641
4682
  },
4642
4683
  [format, displayFormat, locale]
4643
4684
  );
4644
- const [displayValue, setDisplayValue] = useState9(() => getFormattedDisplayValue(value));
4645
- const [anchorEl, setAnchorEl] = useState9(null);
4685
+ const [displayValue, setDisplayValue] = useState10(() => getFormattedDisplayValue(value));
4686
+ const [anchorEl, setAnchorEl] = useState10(null);
4646
4687
  const open = Boolean(anchorEl);
4647
- useEffect8(() => {
4688
+ useEffect9(() => {
4648
4689
  if (!anchorEl) {
4649
4690
  innerRef.current?.blur();
4650
4691
  }
4651
4692
  }, [anchorEl, innerRef]);
4652
4693
  useImperativeHandle4(ref, () => innerRef.current, [innerRef]);
4653
- useEffect8(() => {
4694
+ useEffect9(() => {
4654
4695
  setDisplayValue(getFormattedDisplayValue(value));
4655
4696
  }, [value, getFormattedDisplayValue]);
4656
- const handleChange = useCallback11(
4697
+ const handleChange = useCallback13(
4657
4698
  (event) => {
4658
4699
  const newValue = event.target.value;
4659
4700
  setValue(newValue);
@@ -4663,21 +4704,21 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4663
4704
  },
4664
4705
  [setValue, getFormattedDisplayValue, isControlled]
4665
4706
  );
4666
- const handleCalendarToggle = useCallback11(
4707
+ const handleCalendarToggle = useCallback13(
4667
4708
  (event) => {
4668
4709
  setAnchorEl(anchorEl ? null : event.currentTarget);
4669
4710
  innerRef.current?.focus();
4670
4711
  },
4671
4712
  [anchorEl, setAnchorEl, innerRef]
4672
4713
  );
4673
- const handleInputMouseDown = useCallback11(
4714
+ const handleInputMouseDown = useCallback13(
4674
4715
  (event) => {
4675
4716
  event.preventDefault();
4676
4717
  buttonRef.current?.focus();
4677
4718
  },
4678
4719
  [buttonRef]
4679
4720
  );
4680
- return /* @__PURE__ */ React32.createElement(MonthPickerRoot, null, /* @__PURE__ */ React32.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(
4721
+ return /* @__PURE__ */ React34.createElement(MonthPickerRoot, null, /* @__PURE__ */ React34.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(
4681
4722
  Input_default,
4682
4723
  {
4683
4724
  ...innerProps,
@@ -4707,7 +4748,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4707
4748
  // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
4708
4749
  fontFamily: "monospace"
4709
4750
  },
4710
- endDecorator: /* @__PURE__ */ React32.createElement(
4751
+ endDecorator: /* @__PURE__ */ React34.createElement(
4711
4752
  IconButton_default,
4712
4753
  {
4713
4754
  ref: buttonRef,
@@ -4719,12 +4760,12 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4719
4760
  "aria-expanded": open,
4720
4761
  disabled
4721
4762
  },
4722
- /* @__PURE__ */ React32.createElement(CalendarTodayIcon3, null)
4763
+ /* @__PURE__ */ React34.createElement(CalendarTodayIcon3, null)
4723
4764
  ),
4724
4765
  label,
4725
4766
  helperText
4726
4767
  }
4727
- ), open && /* @__PURE__ */ React32.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React32.createElement(
4768
+ ), open && /* @__PURE__ */ React34.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React34.createElement(
4728
4769
  StyledPopper3,
4729
4770
  {
4730
4771
  id: "month-picker-popper",
@@ -4743,7 +4784,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4743
4784
  "aria-label": "Calendar Tooltip",
4744
4785
  "aria-expanded": open
4745
4786
  },
4746
- /* @__PURE__ */ React32.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React32.createElement(
4787
+ /* @__PURE__ */ React34.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React34.createElement(
4747
4788
  Calendar_default,
4748
4789
  {
4749
4790
  view: "month",
@@ -4764,14 +4805,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4764
4805
  disablePast,
4765
4806
  locale
4766
4807
  }
4767
- ), /* @__PURE__ */ React32.createElement(
4808
+ ), /* @__PURE__ */ React34.createElement(
4768
4809
  DialogActions_default,
4769
4810
  {
4770
4811
  sx: {
4771
4812
  p: 1
4772
4813
  }
4773
4814
  },
4774
- /* @__PURE__ */ React32.createElement(
4815
+ /* @__PURE__ */ React34.createElement(
4775
4816
  Button_default,
4776
4817
  {
4777
4818
  size,
@@ -4794,18 +4835,18 @@ var MonthPicker = forwardRef9((inProps, ref) => {
4794
4835
  });
4795
4836
 
4796
4837
  // src/components/MonthRangePicker/MonthRangePicker.tsx
4797
- import React33, { forwardRef as forwardRef10, useCallback as useCallback12, useEffect as useEffect9, useImperativeHandle as useImperativeHandle5, useMemo as useMemo10, useRef as useRef7, useState as useState10 } from "react";
4838
+ import React35, { forwardRef as forwardRef10, useCallback as useCallback14, useEffect as useEffect10, useImperativeHandle as useImperativeHandle5, useMemo as useMemo12, useRef as useRef9, useState as useState11 } from "react";
4798
4839
  import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
4799
4840
  import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
4800
- import { styled as styled21, useThemeProps as useThemeProps7 } from "@mui/joy";
4841
+ import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
4801
4842
  import { FocusTrap as FocusTrap4, ClickAwayListener as ClickAwayListener4, Popper as Popper5 } from "@mui/base";
4802
- var StyledPopper4 = styled21(Popper5, {
4843
+ var StyledPopper4 = styled22(Popper5, {
4803
4844
  name: "MonthRangePicker",
4804
4845
  slot: "popper"
4805
4846
  })(({ theme }) => ({
4806
4847
  zIndex: theme.zIndex.tooltip
4807
4848
  }));
4808
- var CalendarSheet4 = styled21(Sheet_default, {
4849
+ var CalendarSheet4 = styled22(Sheet_default, {
4809
4850
  name: "MonthRangePicker",
4810
4851
  slot: "sheet",
4811
4852
  overridesResolver: (props, styles) => styles.root
@@ -4815,7 +4856,7 @@ var CalendarSheet4 = styled21(Sheet_default, {
4815
4856
  boxShadow: theme.shadow.md,
4816
4857
  borderRadius: theme.radius.md
4817
4858
  }));
4818
- var MonthRangePickerRoot = styled21("div", {
4859
+ var MonthRangePickerRoot = styled22("div", {
4819
4860
  name: "MonthRangePicker",
4820
4861
  slot: "root",
4821
4862
  overridesResolver: (props, styles) => styles.root
@@ -4852,9 +4893,9 @@ var parseDates2 = (str) => {
4852
4893
  var formatToPattern3 = (format) => {
4853
4894
  return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
4854
4895
  };
4855
- var TextMaskAdapter7 = React33.forwardRef(function TextMaskAdapter8(props, ref) {
4896
+ var TextMaskAdapter7 = React35.forwardRef(function TextMaskAdapter8(props, ref) {
4856
4897
  const { onChange, format, ...other } = props;
4857
- return /* @__PURE__ */ React33.createElement(
4898
+ return /* @__PURE__ */ React35.createElement(
4858
4899
  IMaskInput3,
4859
4900
  {
4860
4901
  ...other,
@@ -4902,35 +4943,35 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
4902
4943
  size,
4903
4944
  ...innerProps
4904
4945
  } = props;
4905
- const innerRef = useRef7(null);
4946
+ const innerRef = useRef9(null);
4906
4947
  const [value, setValue] = useControlledState(
4907
4948
  props.value,
4908
4949
  props.defaultValue || "",
4909
- useCallback12((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4950
+ useCallback14((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4910
4951
  );
4911
- const [anchorEl, setAnchorEl] = useState10(null);
4952
+ const [anchorEl, setAnchorEl] = useState11(null);
4912
4953
  const open = Boolean(anchorEl);
4913
- const calendarValue = useMemo10(() => value ? parseDates2(value) : void 0, [value]);
4914
- useEffect9(() => {
4954
+ const calendarValue = useMemo12(() => value ? parseDates2(value) : void 0, [value]);
4955
+ useEffect10(() => {
4915
4956
  if (!anchorEl) {
4916
4957
  innerRef.current?.blur();
4917
4958
  }
4918
4959
  }, [anchorEl, innerRef]);
4919
4960
  useImperativeHandle5(ref, () => innerRef.current, [innerRef]);
4920
- const handleChange = useCallback12(
4961
+ const handleChange = useCallback14(
4921
4962
  (event) => {
4922
4963
  setValue(event.target.value);
4923
4964
  },
4924
4965
  [setValue]
4925
4966
  );
4926
- const handleCalendarToggle = useCallback12(
4967
+ const handleCalendarToggle = useCallback14(
4927
4968
  (event) => {
4928
4969
  setAnchorEl(anchorEl ? null : event.currentTarget);
4929
4970
  innerRef.current?.focus();
4930
4971
  },
4931
4972
  [anchorEl, setAnchorEl, innerRef]
4932
4973
  );
4933
- const handleCalendarChange = useCallback12(
4974
+ const handleCalendarChange = useCallback14(
4934
4975
  ([date1, date2]) => {
4935
4976
  if (!date1 || !date2) return;
4936
4977
  setValue(formatValueString4([date1, date2], format));
@@ -4938,7 +4979,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
4938
4979
  },
4939
4980
  [setValue, setAnchorEl, format]
4940
4981
  );
4941
- return /* @__PURE__ */ React33.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React33.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(
4982
+ return /* @__PURE__ */ React35.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React35.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(
4942
4983
  Input_default,
4943
4984
  {
4944
4985
  ...innerProps,
@@ -4960,7 +5001,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
4960
5001
  // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
4961
5002
  fontFamily: "monospace"
4962
5003
  },
4963
- endDecorator: /* @__PURE__ */ React33.createElement(
5004
+ endDecorator: /* @__PURE__ */ React35.createElement(
4964
5005
  IconButton_default,
4965
5006
  {
4966
5007
  variant: "plain",
@@ -4970,12 +5011,12 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
4970
5011
  "aria-haspopup": "dialog",
4971
5012
  "aria-expanded": open
4972
5013
  },
4973
- /* @__PURE__ */ React33.createElement(CalendarTodayIcon4, null)
5014
+ /* @__PURE__ */ React35.createElement(CalendarTodayIcon4, null)
4974
5015
  ),
4975
5016
  label,
4976
5017
  helperText
4977
5018
  }
4978
- ), open && /* @__PURE__ */ React33.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React33.createElement(
5019
+ ), open && /* @__PURE__ */ React35.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React35.createElement(
4979
5020
  StyledPopper4,
4980
5021
  {
4981
5022
  id: "month-range-picker-popper",
@@ -4994,7 +5035,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
4994
5035
  "aria-label": "Calendar Tooltip",
4995
5036
  "aria-expanded": open
4996
5037
  },
4997
- /* @__PURE__ */ React33.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React33.createElement(
5038
+ /* @__PURE__ */ React35.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React35.createElement(
4998
5039
  Calendar_default,
4999
5040
  {
5000
5041
  view: "month",
@@ -5007,14 +5048,14 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5007
5048
  disableFuture,
5008
5049
  disablePast
5009
5050
  }
5010
- ), /* @__PURE__ */ React33.createElement(
5051
+ ), /* @__PURE__ */ React35.createElement(
5011
5052
  DialogActions_default,
5012
5053
  {
5013
5054
  sx: {
5014
5055
  p: 1
5015
5056
  }
5016
5057
  },
5017
- /* @__PURE__ */ React33.createElement(
5058
+ /* @__PURE__ */ React35.createElement(
5018
5059
  Button_default,
5019
5060
  {
5020
5061
  size,
@@ -5033,16 +5074,16 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5033
5074
  MonthRangePicker.displayName = "MonthRangePicker";
5034
5075
 
5035
5076
  // src/components/NavigationGroup/NavigationGroup.tsx
5036
- import React34 from "react";
5077
+ import React36 from "react";
5037
5078
  import {
5038
5079
  Accordion as JoyAccordion2,
5039
5080
  AccordionSummary as JoyAccordionSummary2,
5040
5081
  AccordionDetails as JoyAccordionDetails2,
5041
- styled as styled22,
5082
+ styled as styled23,
5042
5083
  accordionSummaryClasses,
5043
5084
  Stack as Stack2
5044
5085
  } from "@mui/joy";
5045
- var AccordionSummary2 = styled22(JoyAccordionSummary2, {
5086
+ var AccordionSummary2 = styled23(JoyAccordionSummary2, {
5046
5087
  name: "NavigationGroup",
5047
5088
  slot: "Summary",
5048
5089
  shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
@@ -5055,7 +5096,7 @@ var AccordionSummary2 = styled22(JoyAccordionSummary2, {
5055
5096
  }
5056
5097
  }
5057
5098
  }));
5058
- var AccordionDetails2 = styled22(JoyAccordionDetails2, {
5099
+ var AccordionDetails2 = styled23(JoyAccordionDetails2, {
5059
5100
  name: "NavigationGroup",
5060
5101
  slot: "Details"
5061
5102
  })(({ theme }) => ({
@@ -5064,19 +5105,19 @@ var AccordionDetails2 = styled22(JoyAccordionDetails2, {
5064
5105
  }));
5065
5106
  function NavigationGroup(props) {
5066
5107
  const { title, children, startDecorator, level, ...rest } = props;
5067
- return /* @__PURE__ */ React34.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React34.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React34.createElement(Stack2, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ React34.createElement(AccordionDetails2, null, children));
5108
+ return /* @__PURE__ */ React36.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React36.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React36.createElement(Stack2, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ React36.createElement(AccordionDetails2, null, children));
5068
5109
  }
5069
5110
 
5070
5111
  // src/components/NavigationItem/NavigationItem.tsx
5071
- import React35 from "react";
5112
+ import React37 from "react";
5072
5113
  import {
5073
5114
  ListItem as JoyListItem,
5074
5115
  ListItemButton as JoyListItemButton,
5075
5116
  ListItemDecorator as JoyListItemDecorator,
5076
- styled as styled23,
5117
+ styled as styled24,
5077
5118
  listItemButtonClasses
5078
5119
  } from "@mui/joy";
5079
- var ListItemButton = styled23(JoyListItemButton, {
5120
+ var ListItemButton = styled24(JoyListItemButton, {
5080
5121
  name: "NavigationItem",
5081
5122
  slot: "Button",
5082
5123
  shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
@@ -5103,7 +5144,7 @@ function NavigationItem(props) {
5103
5144
  const handleClick = () => {
5104
5145
  onClick?.(id);
5105
5146
  };
5106
- return /* @__PURE__ */ React35.createElement(JoyListItem, { ...rest }, /* @__PURE__ */ React35.createElement(
5147
+ return /* @__PURE__ */ React37.createElement(JoyListItem, { ...rest }, /* @__PURE__ */ React37.createElement(
5107
5148
  ListItemButton,
5108
5149
  {
5109
5150
  level,
@@ -5112,21 +5153,21 @@ function NavigationItem(props) {
5112
5153
  "aria-current": selected,
5113
5154
  onClick: handleClick
5114
5155
  },
5115
- startDecorator && /* @__PURE__ */ React35.createElement(JoyListItemDecorator, null, startDecorator),
5156
+ startDecorator && /* @__PURE__ */ React37.createElement(JoyListItemDecorator, null, startDecorator),
5116
5157
  children
5117
5158
  ));
5118
5159
  }
5119
5160
 
5120
5161
  // src/components/Navigator/Navigator.tsx
5121
- import React36 from "react";
5162
+ import React38 from "react";
5122
5163
  function Navigator(props) {
5123
5164
  const { items, level = 0, onSelect } = props;
5124
5165
  const handleItemClick = (id) => {
5125
5166
  onSelect?.(id);
5126
5167
  };
5127
- return /* @__PURE__ */ React36.createElement("div", null, items.map((item, index) => {
5168
+ return /* @__PURE__ */ React38.createElement("div", null, items.map((item, index) => {
5128
5169
  if (item.type === "item") {
5129
- return /* @__PURE__ */ React36.createElement(
5170
+ return /* @__PURE__ */ React38.createElement(
5130
5171
  NavigationItem,
5131
5172
  {
5132
5173
  key: item.id,
@@ -5139,7 +5180,7 @@ function Navigator(props) {
5139
5180
  item.title
5140
5181
  );
5141
5182
  } else if (item.type === "group") {
5142
- return /* @__PURE__ */ React36.createElement(
5183
+ return /* @__PURE__ */ React38.createElement(
5143
5184
  NavigationGroup,
5144
5185
  {
5145
5186
  key: `${item.title}-${index}`,
@@ -5157,16 +5198,16 @@ function Navigator(props) {
5157
5198
  Navigator.displayName = "Navigator";
5158
5199
 
5159
5200
  // src/components/PercentageInput/PercentageInput.tsx
5160
- import React37, { useCallback as useCallback13, useMemo as useMemo11, useState as useState11 } from "react";
5201
+ import React39, { useCallback as useCallback15, useMemo as useMemo13, useState as useState12 } from "react";
5161
5202
  import { NumericFormat as NumericFormat2 } from "react-number-format";
5162
- import { styled as styled24, useThemeProps as useThemeProps8 } from "@mui/joy";
5203
+ import { styled as styled25, useThemeProps as useThemeProps8 } from "@mui/joy";
5163
5204
  var padDecimal = (value, decimalScale) => {
5164
5205
  const [integer, decimal = ""] = `${value}`.split(".");
5165
5206
  return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
5166
5207
  };
5167
- var TextMaskAdapter9 = React37.forwardRef(function TextMaskAdapter10(props, ref) {
5208
+ var TextMaskAdapter9 = React39.forwardRef(function TextMaskAdapter10(props, ref) {
5168
5209
  const { onChange, min, max, ...innerProps } = props;
5169
- return /* @__PURE__ */ React37.createElement(
5210
+ return /* @__PURE__ */ React39.createElement(
5170
5211
  NumericFormat2,
5171
5212
  {
5172
5213
  ...innerProps,
@@ -5186,12 +5227,12 @@ var TextMaskAdapter9 = React37.forwardRef(function TextMaskAdapter10(props, ref)
5186
5227
  }
5187
5228
  );
5188
5229
  });
5189
- var PercentageInputRoot = styled24(Input_default, {
5230
+ var PercentageInputRoot = styled25(Input_default, {
5190
5231
  name: "PercentageInput",
5191
5232
  slot: "Root",
5192
5233
  overridesResolver: (props, styles) => styles.root
5193
5234
  })({});
5194
- var PercentageInput = React37.forwardRef(
5235
+ var PercentageInput = React39.forwardRef(
5195
5236
  function PercentageInput2(inProps, ref) {
5196
5237
  const props = useThemeProps8({ props: inProps, name: "PercentageInput" });
5197
5238
  const {
@@ -5214,18 +5255,18 @@ var PercentageInput = React37.forwardRef(
5214
5255
  const [_value, setValue] = useControlledState(
5215
5256
  props.value,
5216
5257
  props.defaultValue,
5217
- useCallback13((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
5258
+ useCallback15((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
5218
5259
  );
5219
- const [internalError, setInternalError] = useState11(
5260
+ const [internalError, setInternalError] = useState12(
5220
5261
  max && _value && _value > max || min && _value && _value < min
5221
5262
  );
5222
- const value = useMemo11(() => {
5263
+ const value = useMemo13(() => {
5223
5264
  if (_value && useMinorUnit) {
5224
5265
  return _value / Math.pow(10, maxDecimalScale);
5225
5266
  }
5226
5267
  return _value;
5227
5268
  }, [_value, useMinorUnit, maxDecimalScale]);
5228
- const handleChange = useCallback13(
5269
+ const handleChange = useCallback15(
5229
5270
  (event) => {
5230
5271
  if (event.target.value === "") {
5231
5272
  setValue(void 0);
@@ -5242,7 +5283,7 @@ var PercentageInput = React37.forwardRef(
5242
5283
  },
5243
5284
  [setValue, useMinorUnit, maxDecimalScale, min, max]
5244
5285
  );
5245
- return /* @__PURE__ */ React37.createElement(
5286
+ return /* @__PURE__ */ React39.createElement(
5246
5287
  PercentageInputRoot,
5247
5288
  {
5248
5289
  ...innerProps,
@@ -5283,30 +5324,30 @@ var RadioGroup = MotionRadioGroup;
5283
5324
  RadioGroup.displayName = "RadioGroup";
5284
5325
 
5285
5326
  // src/components/RadioList/RadioList.tsx
5286
- import React38 from "react";
5327
+ import React40 from "react";
5287
5328
  function RadioList(props) {
5288
5329
  const { items, ...innerProps } = props;
5289
- return /* @__PURE__ */ React38.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React38.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
5330
+ return /* @__PURE__ */ React40.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React40.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
5290
5331
  }
5291
5332
  RadioList.displayName = "RadioList";
5292
5333
 
5293
5334
  // src/components/Stepper/Stepper.tsx
5294
- import React39 from "react";
5335
+ import React41 from "react";
5295
5336
  import {
5296
5337
  Stepper as JoyStepper,
5297
5338
  Step as JoyStep,
5298
5339
  StepIndicator as JoyStepIndicator,
5299
5340
  stepClasses,
5300
5341
  stepIndicatorClasses,
5301
- styled as styled25
5342
+ styled as styled26
5302
5343
  } from "@mui/joy";
5303
5344
  import CheckIcon from "@mui/icons-material/Check";
5304
5345
  import { motion as motion28 } from "framer-motion";
5305
- var Step = styled25(JoyStep)({});
5346
+ var Step = styled26(JoyStep)({});
5306
5347
  Step.displayName = "Step";
5307
- var StepIndicator = styled25(JoyStepIndicator)({});
5348
+ var StepIndicator = styled26(JoyStepIndicator)({});
5308
5349
  StepIndicator.displayName = "StepIndicator";
5309
- var StyledStepper = styled25(JoyStepper)(({ theme }) => ({
5350
+ var StyledStepper = styled26(JoyStepper)(({ theme }) => ({
5310
5351
  "--StepIndicator-size": "24px",
5311
5352
  "--Step-gap": theme.spacing(2),
5312
5353
  "--joy-palette-success-solidBg": "var(--joy-palette-success-400)",
@@ -5324,7 +5365,7 @@ function Stepper(props) {
5324
5365
  inactiveLineColor = "neutral.300",
5325
5366
  activeStep
5326
5367
  } = props;
5327
- return /* @__PURE__ */ React39.createElement(
5368
+ return /* @__PURE__ */ React41.createElement(
5328
5369
  MotionStepper,
5329
5370
  {
5330
5371
  sx: (theme) => ({
@@ -5358,16 +5399,16 @@ function Stepper(props) {
5358
5399
  const completed = activeStep > i + 1;
5359
5400
  const disabled = activeStep < i + 1;
5360
5401
  const hasContent = step.label || step.extraContent;
5361
- return /* @__PURE__ */ React39.createElement(
5402
+ return /* @__PURE__ */ React41.createElement(
5362
5403
  Step,
5363
5404
  {
5364
5405
  key: `step-${i}`,
5365
- indicator: /* @__PURE__ */ React39.createElement(StepIndicator, { variant: "solid", color: "primary" }, completed ? /* @__PURE__ */ React39.createElement(CheckIcon, null) : step.indicatorContent),
5406
+ indicator: /* @__PURE__ */ React41.createElement(StepIndicator, { variant: "solid", color: "primary" }, completed ? /* @__PURE__ */ React41.createElement(CheckIcon, null) : step.indicatorContent),
5366
5407
  active,
5367
5408
  completed,
5368
5409
  disabled
5369
5410
  },
5370
- hasContent && /* @__PURE__ */ React39.createElement(Stack_default, null, step.label && /* @__PURE__ */ React39.createElement(Typography_default, { level: "title-sm" }, step.label), step.extraContent && /* @__PURE__ */ React39.createElement(Typography_default, { level: "body-xs" }, step.extraContent))
5411
+ hasContent && /* @__PURE__ */ React41.createElement(Stack_default, null, step.label && /* @__PURE__ */ React41.createElement(Typography_default, { level: "title-sm" }, step.label), step.extraContent && /* @__PURE__ */ React41.createElement(Typography_default, { level: "body-xs" }, step.extraContent))
5371
5412
  );
5372
5413
  })
5373
5414
  );
@@ -5375,11 +5416,11 @@ function Stepper(props) {
5375
5416
  Stepper.displayName = "Stepper";
5376
5417
 
5377
5418
  // src/components/Switch/Switch.tsx
5378
- import React40 from "react";
5379
- import { Switch as JoySwitch, styled as styled26, switchClasses } from "@mui/joy";
5419
+ import React42 from "react";
5420
+ import { Switch as JoySwitch, styled as styled27, switchClasses } from "@mui/joy";
5380
5421
  import { motion as motion29 } from "framer-motion";
5381
5422
  var MotionSwitch = motion29(JoySwitch);
5382
- var StyledThumb = styled26(motion29.div)({
5423
+ var StyledThumb = styled27(motion29.div)({
5383
5424
  "--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
5384
5425
  display: "inline-flex",
5385
5426
  justifyContent: "center",
@@ -5397,14 +5438,14 @@ var StyledThumb = styled26(motion29.div)({
5397
5438
  right: "var(--Switch-thumbOffset)"
5398
5439
  }
5399
5440
  });
5400
- var Thumb = (props) => /* @__PURE__ */ React40.createElement(StyledThumb, { ...props, layout: true, transition: spring });
5441
+ var Thumb = (props) => /* @__PURE__ */ React42.createElement(StyledThumb, { ...props, layout: true, transition: spring });
5401
5442
  var spring = {
5402
5443
  type: "spring",
5403
5444
  stiffness: 700,
5404
5445
  damping: 30
5405
5446
  };
5406
5447
  var Switch = (props) => {
5407
- return /* @__PURE__ */ React40.createElement(
5448
+ return /* @__PURE__ */ React42.createElement(
5408
5449
  MotionSwitch,
5409
5450
  {
5410
5451
  ...props,
@@ -5418,21 +5459,21 @@ var Switch = (props) => {
5418
5459
  Switch.displayName = "Switch";
5419
5460
 
5420
5461
  // src/components/Tabs/Tabs.tsx
5421
- import React41, { forwardRef as forwardRef11 } from "react";
5462
+ import React43, { forwardRef as forwardRef11 } from "react";
5422
5463
  import {
5423
5464
  Tabs as JoyTabs,
5424
5465
  Tab as JoyTab,
5425
5466
  TabList as JoyTabList,
5426
5467
  TabPanel as JoyTabPanel,
5427
- styled as styled27,
5468
+ styled as styled28,
5428
5469
  tabClasses
5429
5470
  } from "@mui/joy";
5430
- var StyledTabs = styled27(JoyTabs)(({ theme }) => ({
5471
+ var StyledTabs = styled28(JoyTabs)(({ theme }) => ({
5431
5472
  backgroundColor: theme.palette.background.body
5432
5473
  }));
5433
5474
  var Tabs = StyledTabs;
5434
5475
  Tabs.displayName = "Tabs";
5435
- var StyledTab = styled27(JoyTab)(({ theme }) => ({
5476
+ var StyledTab = styled28(JoyTab)(({ theme }) => ({
5436
5477
  gap: theme.spacing(2),
5437
5478
  [`&:not(.${tabClasses.selected})`]: {
5438
5479
  color: theme.palette.neutral[700]
@@ -5442,14 +5483,14 @@ var StyledTab = styled27(JoyTab)(({ theme }) => ({
5442
5483
  }
5443
5484
  }));
5444
5485
  var Tab = forwardRef11(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
5445
- return /* @__PURE__ */ React41.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
5486
+ return /* @__PURE__ */ React43.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
5446
5487
  });
5447
5488
  Tab.displayName = "Tab";
5448
5489
  var TabList = JoyTabList;
5449
5490
  var TabPanel = JoyTabPanel;
5450
5491
 
5451
5492
  // src/components/ThemeProvider/ThemeProvider.tsx
5452
- import React42 from "react";
5493
+ import React44 from "react";
5453
5494
  import {
5454
5495
  CssBaseline,
5455
5496
  CssVarsProvider,
@@ -5705,13 +5746,13 @@ var defaultTheme = extendTheme({
5705
5746
  });
5706
5747
  function ThemeProvider(props) {
5707
5748
  const theme = props.theme || defaultTheme;
5708
- return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(CssVarsProvider, { theme }, /* @__PURE__ */ React42.createElement(CssBaseline, null), props.children));
5749
+ return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(CssVarsProvider, { theme }, /* @__PURE__ */ React44.createElement(CssBaseline, null), props.children));
5709
5750
  }
5710
5751
  ThemeProvider.displayName = "ThemeProvider";
5711
5752
 
5712
5753
  // src/components/Uploader/Uploader.tsx
5713
- import React43, { useCallback as useCallback14, useEffect as useEffect10, useMemo as useMemo12, useRef as useRef8, useState as useState12 } from "react";
5714
- import { styled as styled28, Input as Input2 } from "@mui/joy";
5754
+ import React45, { useCallback as useCallback16, useEffect as useEffect11, useMemo as useMemo14, useRef as useRef10, useState as useState13 } from "react";
5755
+ import { styled as styled29, Input as Input2 } from "@mui/joy";
5715
5756
  import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
5716
5757
  import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
5717
5758
  import MuiClearIcon from "@mui/icons-material/ClearRounded";
@@ -5733,7 +5774,7 @@ var esmFiles = {
5733
5774
  "@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js"
5734
5775
  )
5735
5776
  };
5736
- var VisuallyHiddenInput = styled28(Input2)({
5777
+ var VisuallyHiddenInput = styled29(Input2)({
5737
5778
  width: "1px",
5738
5779
  height: "1px",
5739
5780
  overflow: "hidden",
@@ -5742,18 +5783,18 @@ var VisuallyHiddenInput = styled28(Input2)({
5742
5783
  clipPath: "inset(50%)",
5743
5784
  position: "absolute"
5744
5785
  });
5745
- var PreviewRoot = styled28(Stack_default, {
5786
+ var PreviewRoot = styled29(Stack_default, {
5746
5787
  name: "Uploader",
5747
5788
  slot: "PreviewRoot"
5748
5789
  })({});
5749
- var UploadCard = styled28(Card, {
5790
+ var UploadCard = styled29(Card, {
5750
5791
  name: "Uploader",
5751
5792
  slot: "UploadCard"
5752
5793
  })(({ theme }) => ({
5753
5794
  padding: theme.spacing(2.5),
5754
5795
  border: `1px solid ${theme.palette.neutral.outlinedBorder}`
5755
5796
  }));
5756
- var UploadFileIcon = styled28(MuiUploadFileIcon, {
5797
+ var UploadFileIcon = styled29(MuiUploadFileIcon, {
5757
5798
  name: "Uploader",
5758
5799
  slot: "UploadFileIcon"
5759
5800
  })(({ theme }) => ({
@@ -5761,7 +5802,7 @@ var UploadFileIcon = styled28(MuiUploadFileIcon, {
5761
5802
  width: "32px",
5762
5803
  height: "32px"
5763
5804
  }));
5764
- var ClearIcon2 = styled28(MuiClearIcon, {
5805
+ var ClearIcon2 = styled29(MuiClearIcon, {
5765
5806
  name: "Uploader",
5766
5807
  slot: "ClearIcon"
5767
5808
  })(({ theme }) => ({
@@ -5787,40 +5828,50 @@ var getFileSize = (n) => {
5787
5828
  };
5788
5829
  var Preview = (props) => {
5789
5830
  const { files, uploaded, onDelete } = props;
5790
- return /* @__PURE__ */ React43.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React43.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React43.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React43.createElement(UploadFileIcon, null), /* @__PURE__ */ React43.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ React43.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ React43.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React43.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React43.createElement(ClearIcon2, null))))));
5831
+ return /* @__PURE__ */ React45.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React45.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React45.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React45.createElement(UploadFileIcon, null), /* @__PURE__ */ React45.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ React45.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ React45.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React45.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React45.createElement(ClearIcon2, null))))));
5791
5832
  };
5792
- var UploaderRoot = styled28(Stack_default, {
5833
+ var UploaderRoot = styled29(Stack_default, {
5793
5834
  name: "Uploader",
5794
5835
  slot: "root"
5795
5836
  })(({ theme }) => ({
5796
5837
  gap: theme.spacing(2)
5797
5838
  }));
5798
- var FileDropZone = styled28(Sheet_default, {
5839
+ var FileDropZone = styled29(Sheet_default, {
5799
5840
  name: "Uploader",
5800
5841
  slot: "dropZone",
5801
- shouldForwardProp: (prop) => prop !== "error"
5802
- })(({ theme, state, error }) => ({
5803
- width: "100%",
5804
- display: "flex",
5805
- flexDirection: "column",
5806
- justifyContent: "center",
5807
- alignItems: "center",
5808
- padding: theme.spacing(5),
5809
- gap: theme.spacing(4),
5810
- cursor: "pointer",
5811
- backgroundColor: theme.palette.background.surface,
5812
- border: error ? `1px solid ${theme.palette.danger.outlinedBorder}` : state === "idle" ? `1px solid ${theme.palette.neutral.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
5813
- }));
5814
- var UploaderIcon = styled28(MuiFileUploadIcon, {
5842
+ shouldForwardProp: (prop) => prop !== "error" && prop !== "disabled"
5843
+ })(
5844
+ ({ theme, state, error, disabled }) => ({
5845
+ width: "100%",
5846
+ display: "flex",
5847
+ flexDirection: "column",
5848
+ justifyContent: "center",
5849
+ alignItems: "center",
5850
+ padding: theme.spacing(5),
5851
+ gap: theme.spacing(4),
5852
+ cursor: disabled ? "not-allowed" : "pointer",
5853
+ backgroundColor: theme.palette.background.surface,
5854
+ border: disabled ? `1px solid ${theme.palette.danger.outlinedDisabledBorder}` : error ? `1px solid ${theme.palette.danger.outlinedBorder}` : state === "idle" ? `1px solid ${theme.palette.neutral.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`,
5855
+ "&:hover": {
5856
+ border: disabled ? `1px solid ${theme.palette.danger.outlinedDisabledBorder}` : error ? `1px solid ${theme.palette.danger.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
5857
+ }
5858
+ })
5859
+ );
5860
+ var UploaderIcon = styled29(MuiFileUploadIcon, {
5815
5861
  name: "Uploader",
5816
5862
  slot: "iconContainer",
5817
- shouldForwardProp: (prop) => prop !== "error"
5818
- })(({ theme, state, error }) => ({
5819
- color: error ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)` : state === "over" ? `rgba(${theme.palette.primary.mainChannel} / 0.6)` : theme.palette.neutral.softActiveBg,
5820
- width: "32px",
5821
- height: "32px"
5822
- }));
5823
- var Uploader = React43.memo(
5863
+ shouldForwardProp: (prop) => prop !== "error" && prop !== "disabled"
5864
+ })(
5865
+ ({ theme, state, error, disabled }) => ({
5866
+ color: disabled ? theme.palette.primary.outlinedDisabledBorder : error ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)` : state === "over" ? `rgba(${theme.palette.primary.mainChannel} / 0.6)` : theme.palette.neutral.softActiveBg,
5867
+ width: "32px",
5868
+ height: "32px",
5869
+ ".MuiSheet-root:hover &": {
5870
+ color: disabled ? theme.palette.primary.outlinedDisabledBorder : error ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)` : `rgba(${theme.palette.primary.mainChannel} / 0.6)`
5871
+ }
5872
+ })
5873
+ );
5874
+ var Uploader = React45.memo(
5824
5875
  (props) => {
5825
5876
  const {
5826
5877
  accept,
@@ -5835,14 +5886,14 @@ var Uploader = React43.memo(
5835
5886
  disabled,
5836
5887
  onDelete
5837
5888
  } = props;
5838
- const dropZoneRef = useRef8(null);
5839
- const inputRef = useRef8(null);
5840
- const [errorText, setErrorText] = useState12();
5841
- const [files, setFiles] = useState12([]);
5842
- const [uploaded, setUploaded] = useState12(props.uploaded || []);
5843
- const [previewState, setPreviewState] = useState12("idle");
5844
- const accepts = useMemo12(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
5845
- const parsedAccepts = useMemo12(
5889
+ const dropZoneRef = useRef10(null);
5890
+ const inputRef = useRef10(null);
5891
+ const [errorText, setErrorText] = useState13();
5892
+ const [files, setFiles] = useState13([]);
5893
+ const [uploaded, setUploaded] = useState13(props.uploaded || []);
5894
+ const [previewState, setPreviewState] = useState13("idle");
5895
+ const accepts = useMemo14(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
5896
+ const parsedAccepts = useMemo14(
5846
5897
  () => accepts.flatMap((type) => {
5847
5898
  if (["image/*", "video/*", "audio/*"].includes(type)) {
5848
5899
  return ALL_EXTENSIONS_BY_TYPE[type];
@@ -5851,7 +5902,7 @@ var Uploader = React43.memo(
5851
5902
  }),
5852
5903
  [accepts]
5853
5904
  );
5854
- const helperText = useMemo12(() => {
5905
+ const helperText = useMemo14(() => {
5855
5906
  const [allAcceptedTypes, acceptedTypes] = [
5856
5907
  accepts.filter((accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)).map((accept2) => {
5857
5908
  const [type] = accept2.split("/");
@@ -5878,12 +5929,12 @@ var Uploader = React43.memo(
5878
5929
  }
5879
5930
  return helperTexts.join(", ");
5880
5931
  }, [accepts, maxFileTotalSize, maxCount]);
5881
- const error = useMemo12(() => !!errorText || props.error, [props.error, errorText]);
5882
- const showDropZone = useMemo12(
5932
+ const error = useMemo14(() => !!errorText || props.error, [props.error, errorText]);
5933
+ const showDropZone = useMemo14(
5883
5934
  () => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
5884
5935
  [files, maxCount, uploaded]
5885
5936
  );
5886
- const addFiles = useCallback14(
5937
+ const addFiles = useCallback16(
5887
5938
  (uploads) => {
5888
5939
  try {
5889
5940
  const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
@@ -5928,7 +5979,7 @@ var Uploader = React43.memo(
5928
5979
  },
5929
5980
  [files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
5930
5981
  );
5931
- useEffect10(() => {
5982
+ useEffect11(() => {
5932
5983
  if (!dropZoneRef.current || disabled) {
5933
5984
  return;
5934
5985
  }
@@ -5966,7 +6017,7 @@ var Uploader = React43.memo(
5966
6017
  );
5967
6018
  return () => cleanup?.();
5968
6019
  }, [disabled, addFiles]);
5969
- useEffect10(() => {
6020
+ useEffect11(() => {
5970
6021
  if (inputRef.current && minCount) {
5971
6022
  if (files.length < minCount) {
5972
6023
  inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
@@ -5975,14 +6026,14 @@ var Uploader = React43.memo(
5975
6026
  }
5976
6027
  }
5977
6028
  }, [inputRef, files, minCount]);
5978
- const handleFileChanged = useCallback14(
6029
+ const handleFileChanged = useCallback16(
5979
6030
  (event) => {
5980
6031
  const files2 = Array.from(event.target.files || []);
5981
6032
  addFiles(files2);
5982
6033
  },
5983
6034
  [addFiles]
5984
6035
  );
5985
- const handleDeleteFile = useCallback14(
6036
+ const handleDeleteFile = useCallback16(
5986
6037
  (deletedFile) => {
5987
6038
  if (deletedFile instanceof File) {
5988
6039
  setFiles((current) => {
@@ -6002,19 +6053,20 @@ var Uploader = React43.memo(
6002
6053
  },
6003
6054
  [name, onChange, onDelete]
6004
6055
  );
6005
- const handleUploaderButtonClick = useCallback14(() => {
6056
+ const handleUploaderButtonClick = useCallback16(() => {
6006
6057
  inputRef.current?.click();
6007
6058
  }, []);
6008
- const uploader = /* @__PURE__ */ React43.createElement(
6059
+ const uploader = /* @__PURE__ */ React45.createElement(
6009
6060
  FileDropZone,
6010
6061
  {
6011
6062
  state: previewState,
6012
6063
  error: !!(error || errorText),
6064
+ disabled,
6013
6065
  ref: dropZoneRef,
6014
6066
  onClick: handleUploaderButtonClick
6015
6067
  },
6016
- /* @__PURE__ */ React43.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React43.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText) })),
6017
- /* @__PURE__ */ React43.createElement(
6068
+ /* @__PURE__ */ React45.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React45.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText), disabled })),
6069
+ /* @__PURE__ */ React45.createElement(
6018
6070
  VisuallyHiddenInput,
6019
6071
  {
6020
6072
  disabled,
@@ -6037,7 +6089,7 @@ var Uploader = React43.memo(
6037
6089
  }
6038
6090
  )
6039
6091
  );
6040
- return /* @__PURE__ */ React43.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React43.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React43.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React43.createElement(FormHelperText_default, null, /* @__PURE__ */ React43.createElement(Stack_default, null, errorText && /* @__PURE__ */ React43.createElement("div", null, errorText), /* @__PURE__ */ React43.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React43.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
6092
+ return /* @__PURE__ */ React45.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React45.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React45.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React45.createElement(FormHelperText_default, null, /* @__PURE__ */ React45.createElement(Stack_default, null, errorText && /* @__PURE__ */ React45.createElement("div", null, errorText), /* @__PURE__ */ React45.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React45.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
6041
6093
  }
6042
6094
  );
6043
6095
  Uploader.displayName = "Uploader";
@@ -6201,7 +6253,7 @@ export {
6201
6253
  stepButtonClasses,
6202
6254
  stepClasses2 as stepClasses,
6203
6255
  stepperClasses,
6204
- styled29 as styled,
6256
+ styled30 as styled,
6205
6257
  switchClasses2 as switchClasses,
6206
6258
  tabListClasses,
6207
6259
  tabPanelClasses,