@ceed/ads 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
@@ -147,7 +147,7 @@ import {
147
147
  stepperClasses,
148
148
  Skeleton as Skeleton2,
149
149
  skeletonClasses,
150
- styled as styled29
150
+ styled as styled30
151
151
  } from "@mui/joy";
152
152
 
153
153
  // src/components/Accordions/Accordions.tsx
@@ -1836,249 +1836,433 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
1836
1836
  var CurrencyInput_default = CurrencyInput;
1837
1837
 
1838
1838
  // src/components/DataTable/DataTable.tsx
1839
- import React23, {
1840
- useCallback as useCallback9,
1841
- useEffect as useEffect5,
1842
- useMemo as useMemo8,
1843
- useRef as useRef4,
1844
- useState as useState6,
1839
+ import React25, {
1840
+ useCallback as useCallback11,
1841
+ useMemo as useMemo10,
1842
+ useRef as useRef6,
1845
1843
  useId,
1846
1844
  forwardRef as forwardRef7,
1847
1845
  useImperativeHandle as useImperativeHandle2,
1848
- createElement,
1849
- memo,
1850
- useLayoutEffect,
1851
1846
  Fragment as Fragment2
1852
1847
  } from "react";
1853
1848
  import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
1854
- import { styled as styled12, LinearProgress, Link, useTheme, buttonClasses, iconButtonClasses } from "@mui/joy";
1855
- import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
1856
-
1857
- // src/components/Sheet/Sheet.tsx
1858
- import { Sheet as JoySheet } from "@mui/joy";
1859
- import { motion as motion16 } from "framer-motion";
1860
- var MotionSheet = motion16(JoySheet);
1861
- var Sheet = MotionSheet;
1862
- Sheet.displayName = "Sheet";
1863
1849
 
1864
- // src/components/Sheet/index.ts
1865
- var Sheet_default = Sheet;
1866
-
1867
- // src/components/Table/Table.tsx
1868
- import React16 from "react";
1869
- import { Table as JoyTable } from "@mui/joy";
1870
- var Table = (props) => {
1871
- const { children, ...inheritProps } = props;
1872
- return /* @__PURE__ */ React16.createElement(JoyTable, { ...inheritProps }, children);
1873
- };
1874
- Table.displayName = "Table";
1875
- function TableHead(props) {
1876
- const {
1877
- headCells,
1878
- showCheckbox,
1879
- onCheckboxChange,
1880
- slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
1881
- slotProps: { checkbox: checkboxProps = {} } = {}
1882
- } = props;
1883
- return /* @__PURE__ */ React16.createElement("thead", null, /* @__PURE__ */ React16.createElement("tr", null, showCheckbox && /* @__PURE__ */ React16.createElement(
1884
- "th",
1885
- {
1886
- style: {
1887
- width: "40px",
1888
- textAlign: "center"
1889
- }
1890
- },
1891
- /* @__PURE__ */ React16.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
1892
- ), headCells.map((headCell) => /* @__PURE__ */ React16.createElement(
1893
- "th",
1894
- {
1895
- key: headCell.label,
1896
- style: {
1897
- width: headCell.width,
1898
- minWidth: headCell.minWidth,
1899
- maxWidth: headCell.maxWidth,
1900
- textAlign: headCell.numeric ? "right" : "left"
1901
- }
1902
- },
1903
- headCell.label
1904
- ))));
1850
+ // src/components/DataTable/utils.ts
1851
+ function extractFieldsFromGroupingModel(items) {
1852
+ const fields = /* @__PURE__ */ new Set();
1853
+ for (const item of items) {
1854
+ if ("groupId" in item) {
1855
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1856
+ const childFields = extractFieldsFromGroupingModel(children);
1857
+ childFields.forEach((field) => fields.add(field));
1858
+ } else {
1859
+ fields.add(item.field);
1860
+ }
1861
+ }
1862
+ return fields;
1905
1863
  }
1906
- TableHead.displayName = "TableHead";
1907
- function TableBody(props) {
1908
- const {
1909
- rows,
1910
- cellOrder,
1911
- rowOptions,
1912
- showCheckbox,
1913
- onCheckboxChange,
1914
- slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
1915
- slotProps: { checkbox: checkboxProps = {} } = {}
1916
- } = props;
1917
- return /* @__PURE__ */ React16.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React16.createElement("tr", { key: `table-row-${rowIndex}` }, showCheckbox && /* @__PURE__ */ React16.createElement(
1918
- "td",
1919
- {
1920
- style: {
1921
- textAlign: "center"
1922
- }
1923
- },
1924
- /* @__PURE__ */ React16.createElement(RenderCheckbox, { onChange: (event) => onCheckboxChange?.(event, rowIndex), ...checkboxProps })
1925
- ), cellOrder.map((cellKey) => /* @__PURE__ */ React16.createElement(
1926
- "td",
1927
- {
1928
- key: cellKey,
1929
- style: {
1930
- textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
1864
+ function reorderColumnsByGroupingModel(columns, columnGroupingModel) {
1865
+ const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
1866
+ const orderedFields = [];
1867
+ function collectFieldsInOrder(items) {
1868
+ for (const item of items) {
1869
+ if ("groupId" in item) {
1870
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1871
+ collectFieldsInOrder(children);
1872
+ } else {
1873
+ if (!orderedFields.includes(item.field)) {
1874
+ orderedFields.push(item.field);
1875
+ }
1931
1876
  }
1932
- },
1933
- row[cellKey]
1934
- )))));
1935
- }
1936
- TableBody.displayName = "TableBody";
1937
-
1938
- // src/components/DatePicker/DatePicker.tsx
1939
- import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState5 } from "react";
1940
- import { IMaskInput, IMask } from "react-imask";
1941
- import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
1942
- import { styled as styled9, useThemeProps as useThemeProps4 } from "@mui/joy";
1943
- import { FocusTrap, ClickAwayListener, Popper as Popper2 } from "@mui/base";
1944
-
1945
- // src/components/DialogActions/DialogActions.tsx
1946
- import { DialogActions as JoyDialogActions, styled as styled8 } from "@mui/joy";
1947
- import { motion as motion17 } from "framer-motion";
1948
- var MotionDialogActions = motion17(JoyDialogActions);
1949
- var StyledDialogActions = styled8(MotionDialogActions)(({ theme }) => ({
1950
- padding: theme.spacing(2),
1951
- gap: theme.spacing(2),
1952
- flexDirection: "row",
1953
- justifyContent: "flex-end"
1954
- }));
1955
- var DialogActions = StyledDialogActions;
1956
- DialogActions.displayName = "DialogActions";
1957
-
1958
- // src/components/DialogActions/index.ts
1959
- var DialogActions_default = DialogActions;
1960
-
1961
- // src/components/DatePicker/DatePicker.tsx
1962
- var CalendarButton = styled9(IconButton_default, {
1963
- name: "DatePicker",
1964
- slot: "calendarButton"
1965
- })(({ theme }) => ({
1966
- "&:focus": {
1967
- "--Icon-color": "currentColor",
1968
- outlineOffset: `${theme.getCssVar("focus-thickness")}`,
1969
- outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
1970
- }
1971
- }));
1972
- var StyledPopper = styled9(Popper2, {
1973
- name: "DatePicker",
1974
- slot: "popper"
1975
- })(({ theme }) => ({
1976
- zIndex: theme.zIndex.tooltip
1977
- }));
1978
- var CalendarSheet = styled9(Sheet_default, {
1979
- name: "DatePicker",
1980
- slot: "sheet",
1981
- overridesResolver: (props, styles) => styles.root
1982
- })(({ theme }) => ({
1983
- width: "264px",
1984
- boxShadow: theme.shadow.md,
1985
- borderRadius: theme.radius.md
1986
- }));
1987
- var DatePickerRoot = styled9("div", {
1988
- name: "DatePicker",
1989
- slot: "root",
1990
- overridesResolver: (props, styles) => styles.root
1991
- })({
1992
- width: "100%"
1993
- });
1994
- var validValueFormat = (value, format) => {
1995
- try {
1996
- const parsedValue = parseDate(value, format);
1997
- if (parsedValue.toString() === "Invalid Date") {
1998
- return false;
1999
1877
  }
2000
- if (value !== formatValueString(parsedValue, format)) {
2001
- return false;
1878
+ }
1879
+ collectFieldsInOrder(columnGroupingModel);
1880
+ const columnMap = new Map(columns.map((col) => [col.field, col]));
1881
+ const reorderedColumns = [];
1882
+ for (const field of orderedFields) {
1883
+ const column = columnMap.get(field);
1884
+ if (column) {
1885
+ reorderedColumns.push(column);
2002
1886
  }
2003
- const regex = new RegExp(`^${format.replace(/Y/g, "\\d").replace(/M/g, "\\d").replace(/D/g, "\\d")}$`);
2004
- return regex.test(value);
2005
- } catch (e) {
2006
- return false;
2007
1887
  }
2008
- };
2009
- var formatValueString = (date, format) => {
2010
- let day = `${date.getDate()}`;
2011
- let month = `${date.getMonth() + 1}`;
2012
- const year = date.getFullYear();
2013
- if (Number(day) < 10) day = "0" + day;
2014
- if (Number(month) < 10) month = "0" + month;
2015
- return format.replace(/YYYY/g, year.toString()).replace(/MM/g, month).replace(/DD/g, day);
2016
- };
2017
- function parseDate(dateString, format) {
2018
- const formatParts = format.split(/[-./\s]/);
2019
- const dateParts = dateString.split(/[-./\s]/);
2020
- if (formatParts.length !== dateParts.length) {
2021
- throw new Error("Invalid date string or format");
1888
+ for (const column of columns) {
1889
+ if (!fieldsInGroupingModel.has(column.field)) {
1890
+ reorderedColumns.push(column);
1891
+ }
2022
1892
  }
2023
- let day, month, year;
2024
- for (let i = 0; i < formatParts.length; i++) {
2025
- const value = parseInt(dateParts[i], 10);
2026
- switch (formatParts[i]) {
2027
- case "DD":
2028
- day = value;
2029
- break;
2030
- case "MM":
2031
- month = value - 1;
2032
- break;
2033
- case "YYYY":
2034
- year = value;
2035
- break;
1893
+ return reorderedColumns;
1894
+ }
1895
+ function flattenColumnGroups(items, groupPath = [], columnIndex = { current: 0 }) {
1896
+ const result = [];
1897
+ for (const item of items) {
1898
+ if ("groupId" in item) {
1899
+ const newPath = [...groupPath, item.groupId];
1900
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1901
+ result.push(...flattenColumnGroups(children, newPath, columnIndex));
1902
+ } else {
1903
+ result.push({
1904
+ ...item,
1905
+ groupPath,
1906
+ columnIndex: columnIndex.current++
1907
+ });
2036
1908
  }
2037
1909
  }
2038
- const result = new Date(year, month, day);
2039
1910
  return result;
2040
1911
  }
2041
- var formatToPattern = (format) => {
2042
- return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
2043
- };
2044
- var TextMaskAdapter3 = React17.forwardRef(function TextMaskAdapter4(props, ref) {
2045
- const { onChange, format, ...other } = props;
2046
- return /* @__PURE__ */ React17.createElement(
2047
- IMaskInput,
2048
- {
2049
- ...other,
2050
- inputRef: ref,
2051
- onAccept: (value) => onChange({ target: { name: props.name, value } }),
2052
- mask: Date,
2053
- pattern: formatToPattern(format),
2054
- blocks: {
2055
- D: {
2056
- mask: IMask.MaskedRange,
2057
- from: 1,
2058
- to: 31,
2059
- maxLength: 2
2060
- },
2061
- M: {
2062
- mask: IMask.MaskedRange,
2063
- from: 1,
2064
- to: 12,
2065
- maxLength: 2
2066
- },
2067
- Y: {
2068
- mask: IMask.MaskedRange,
2069
- from: 1900,
2070
- to: 9999,
2071
- maxLength: 4
2072
- }
2073
- },
2074
- format: (date) => formatValueString(date, format),
2075
- parse: (str) => parseDate(str, format),
2076
- autofix: "pad",
2077
- overwrite: true
2078
- }
2079
- );
2080
- });
2081
- var DatePicker = forwardRef6((inProps, ref) => {
1912
+ function calculateColumnGroups(columnGroupingModel, columns) {
1913
+ const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
1914
+ const flattenedColumns = flattenColumnGroups(columnGroupingModel);
1915
+ const columnIndexMap = new Map(flattenedColumns.map((col) => [col.field, col.columnIndex]));
1916
+ const processedGroups = /* @__PURE__ */ new Map();
1917
+ const groupsByLevel = [];
1918
+ let maxLevel = 0;
1919
+ function processGroup(items, level, parentGroupId) {
1920
+ let minIndex = Infinity;
1921
+ let maxIndex = -Infinity;
1922
+ for (const item of items) {
1923
+ if ("groupId" in item) {
1924
+ const groupKey = parentGroupId ? `${parentGroupId}.${item.groupId}` : item.groupId;
1925
+ if (!processedGroups.has(groupKey)) {
1926
+ const children = Array.isArray(item.children) ? item.children : [item.children];
1927
+ const { startIndex, colspan } = processGroup(children, level + 1, groupKey);
1928
+ const group = {
1929
+ groupId: item.groupId,
1930
+ headerName: item.headerName,
1931
+ headerClassName: item.headerClassName,
1932
+ colspan,
1933
+ level,
1934
+ startIndex
1935
+ };
1936
+ processedGroups.set(groupKey, group);
1937
+ if (!groupsByLevel[level]) {
1938
+ groupsByLevel[level] = [];
1939
+ }
1940
+ groupsByLevel[level].push(group);
1941
+ maxLevel = Math.max(maxLevel, level);
1942
+ minIndex = Math.min(minIndex, startIndex);
1943
+ maxIndex = Math.max(maxIndex, startIndex + colspan - 1);
1944
+ }
1945
+ } else {
1946
+ const columnIndex = columnIndexMap.get(item.field);
1947
+ if (columnIndex !== void 0) {
1948
+ minIndex = Math.min(minIndex, columnIndex);
1949
+ maxIndex = Math.max(maxIndex, columnIndex);
1950
+ }
1951
+ }
1952
+ }
1953
+ return {
1954
+ startIndex: minIndex === Infinity ? 0 : minIndex,
1955
+ colspan: maxIndex === -Infinity ? 0 : maxIndex - minIndex + 1
1956
+ };
1957
+ }
1958
+ processGroup(columnGroupingModel, 0);
1959
+ groupsByLevel.forEach((level) => {
1960
+ level.sort((a, b) => a.startIndex - b.startIndex);
1961
+ });
1962
+ return { groups: groupsByLevel, maxLevel, fieldsInGroupingModel };
1963
+ }
1964
+ function getTextAlign(props) {
1965
+ return !props.editMode && ["number", "date", "currency"].includes(props.type || "") ? "end" : "start";
1966
+ }
1967
+ var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
1968
+
1969
+ // src/components/DataTable/styled.tsx
1970
+ import React16 from "react";
1971
+ import { styled as styled8, LinearProgress, buttonClasses, iconButtonClasses } from "@mui/joy";
1972
+ import { motion as motion16 } from "framer-motion";
1973
+ import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
1974
+ var EllipsisDiv = styled8("div", {
1975
+ name: "DataTable",
1976
+ slot: "textEllipsis"
1977
+ })({
1978
+ overflow: "hidden",
1979
+ textOverflow: "ellipsis",
1980
+ whiteSpace: "nowrap"
1981
+ });
1982
+ var OverlayWrapper = styled8("tr", {
1983
+ name: "DataTable",
1984
+ slot: "overlayWrapper"
1985
+ })({
1986
+ position: "sticky",
1987
+ top: `calc(var(--unstable_TableCell-height, 32px))`,
1988
+ left: 0,
1989
+ right: 0,
1990
+ zIndex: 1,
1991
+ "& > td": {
1992
+ height: 0,
1993
+ padding: 0,
1994
+ border: "none !important"
1995
+ }
1996
+ });
1997
+ var VirtualizedTableBody = styled8("tbody", {
1998
+ name: "DataTable",
1999
+ slot: "tableBody"
2000
+ })({
2001
+ "&::after": {
2002
+ content: "''",
2003
+ display: "block",
2004
+ height: "0.01em"
2005
+ },
2006
+ [`& .${buttonClasses.root}`]: {
2007
+ "--Button-minHeight": "26px",
2008
+ "--Button-paddingBlock": "0.25rem",
2009
+ lineHeight: 1,
2010
+ marginTop: "-2px",
2011
+ marginBottom: "-2px"
2012
+ },
2013
+ [`& .${iconButtonClasses.root}`]: {
2014
+ "--IconButton-size": "26px",
2015
+ verticalAlign: "middle",
2016
+ marginTop: "-2px",
2017
+ marginBottom: "-2px"
2018
+ }
2019
+ });
2020
+ var StyledTableRow = styled8("tr", {
2021
+ name: "DataTable",
2022
+ slot: "tableRow",
2023
+ shouldForwardProp: (prop) => prop !== "striped"
2024
+ })(({ striped }) => ({
2025
+ ...striped && {
2026
+ backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
2027
+ color: "var(--ceed-palette-text-primary)",
2028
+ "& td": {
2029
+ backgroundColor: "background.surface"
2030
+ }
2031
+ },
2032
+ "&:hover": {
2033
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
2034
+ "& td": {
2035
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
2036
+ }
2037
+ }
2038
+ }));
2039
+ var Asterisk = styled8("span", {
2040
+ name: "DataTable",
2041
+ slot: "headCellAsterisk"
2042
+ })(({ theme }) => ({
2043
+ color: "var(--ceed-palette-danger-500)",
2044
+ marginLeft: theme.spacing(0.5)
2045
+ }));
2046
+ var StyledTh = styled8(motion16.th)(({ theme }) => ({
2047
+ boxShadow: "1px 0 var(--TableCell-borderColor)"
2048
+ }));
2049
+ var StyledTd = styled8("td")(({ theme }) => ({
2050
+ transition: `box-shadow 0.3s`,
2051
+ "&:not(.is-last-left):not(.is-last-right)": {
2052
+ boxShadow: "1px 0 var(--TableCell-borderColor)"
2053
+ },
2054
+ ".ScrollableRight &": {
2055
+ "&.is-last-left": {
2056
+ boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2057
+ }
2058
+ },
2059
+ ".ScrollableLeft &": {
2060
+ "&.is-last-right": {
2061
+ boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2062
+ }
2063
+ }
2064
+ }));
2065
+ var MotionSortIcon = motion16(SortIcon);
2066
+ var DefaultLoadingOverlay = () => /* @__PURE__ */ React16.createElement(LinearProgress, { value: 8, variant: "plain" });
2067
+ var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React16.createElement(
2068
+ Box_default,
2069
+ {
2070
+ sx: {
2071
+ position: "absolute",
2072
+ top: 0,
2073
+ right: 0,
2074
+ bottom: 0,
2075
+ width: "4px",
2076
+ cursor: "col-resize"
2077
+ },
2078
+ onClick: (e) => e.stopPropagation(),
2079
+ onMouseDown: (e) => {
2080
+ const initialX = e.clientX;
2081
+ const initialWidth = ref.current?.getBoundingClientRect().width;
2082
+ const onMouseMove = (e2) => {
2083
+ if (initialWidth && initialX) {
2084
+ ref.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2085
+ targetRef.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2086
+ }
2087
+ };
2088
+ const onMouseUp = () => {
2089
+ document.removeEventListener("mousemove", onMouseMove);
2090
+ document.removeEventListener("mouseup", onMouseUp);
2091
+ };
2092
+ document.addEventListener("mousemove", onMouseMove);
2093
+ document.addEventListener("mouseup", onMouseUp);
2094
+ }
2095
+ }
2096
+ );
2097
+
2098
+ // src/components/DataTable/components.tsx
2099
+ import React22, {
2100
+ useRef as useRef4,
2101
+ useState as useState6,
2102
+ useLayoutEffect,
2103
+ useMemo as useMemo8,
2104
+ useCallback as useCallback8,
2105
+ useEffect as useEffect4,
2106
+ memo,
2107
+ createElement
2108
+ } from "react";
2109
+ import { styled as styled12, useTheme } from "@mui/joy";
2110
+ import { AnimatePresence as AnimatePresence2 } from "framer-motion";
2111
+
2112
+ // src/components/DatePicker/DatePicker.tsx
2113
+ import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState5 } from "react";
2114
+ import { IMaskInput, IMask } from "react-imask";
2115
+ import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
2116
+ import { styled as styled10, useThemeProps as useThemeProps4 } from "@mui/joy";
2117
+ import { FocusTrap, ClickAwayListener, Popper as Popper2 } from "@mui/base";
2118
+
2119
+ // src/components/Sheet/Sheet.tsx
2120
+ import { Sheet as JoySheet } from "@mui/joy";
2121
+ import { motion as motion17 } from "framer-motion";
2122
+ var MotionSheet = motion17(JoySheet);
2123
+ var Sheet = MotionSheet;
2124
+ Sheet.displayName = "Sheet";
2125
+
2126
+ // src/components/Sheet/index.ts
2127
+ var Sheet_default = Sheet;
2128
+
2129
+ // src/components/DialogActions/DialogActions.tsx
2130
+ import { DialogActions as JoyDialogActions, styled as styled9 } from "@mui/joy";
2131
+ import { motion as motion18 } from "framer-motion";
2132
+ var MotionDialogActions = motion18(JoyDialogActions);
2133
+ var StyledDialogActions = styled9(MotionDialogActions)(({ theme }) => ({
2134
+ padding: theme.spacing(2),
2135
+ gap: theme.spacing(2),
2136
+ flexDirection: "row",
2137
+ justifyContent: "flex-end"
2138
+ }));
2139
+ var DialogActions = StyledDialogActions;
2140
+ DialogActions.displayName = "DialogActions";
2141
+
2142
+ // src/components/DialogActions/index.ts
2143
+ var DialogActions_default = DialogActions;
2144
+
2145
+ // src/components/DatePicker/DatePicker.tsx
2146
+ var CalendarButton = styled10(IconButton_default, {
2147
+ name: "DatePicker",
2148
+ slot: "calendarButton"
2149
+ })(({ theme }) => ({
2150
+ "&:focus": {
2151
+ "--Icon-color": "currentColor",
2152
+ outlineOffset: `${theme.getCssVar("focus-thickness")}`,
2153
+ outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
2154
+ }
2155
+ }));
2156
+ var StyledPopper = styled10(Popper2, {
2157
+ name: "DatePicker",
2158
+ slot: "popper"
2159
+ })(({ theme }) => ({
2160
+ zIndex: theme.zIndex.tooltip
2161
+ }));
2162
+ var CalendarSheet = styled10(Sheet_default, {
2163
+ name: "DatePicker",
2164
+ slot: "sheet",
2165
+ overridesResolver: (props, styles) => styles.root
2166
+ })(({ theme }) => ({
2167
+ width: "264px",
2168
+ boxShadow: theme.shadow.md,
2169
+ borderRadius: theme.radius.md
2170
+ }));
2171
+ var DatePickerRoot = styled10("div", {
2172
+ name: "DatePicker",
2173
+ slot: "root",
2174
+ overridesResolver: (props, styles) => styles.root
2175
+ })({
2176
+ width: "100%"
2177
+ });
2178
+ var validValueFormat = (value, format) => {
2179
+ try {
2180
+ const parsedValue = parseDate(value, format);
2181
+ if (parsedValue.toString() === "Invalid Date") {
2182
+ return false;
2183
+ }
2184
+ if (value !== formatValueString(parsedValue, format)) {
2185
+ return false;
2186
+ }
2187
+ const regex = new RegExp(`^${format.replace(/Y/g, "\\d").replace(/M/g, "\\d").replace(/D/g, "\\d")}$`);
2188
+ return regex.test(value);
2189
+ } catch (e) {
2190
+ return false;
2191
+ }
2192
+ };
2193
+ var formatValueString = (date, format) => {
2194
+ let day = `${date.getDate()}`;
2195
+ let month = `${date.getMonth() + 1}`;
2196
+ const year = date.getFullYear();
2197
+ if (Number(day) < 10) day = "0" + day;
2198
+ if (Number(month) < 10) month = "0" + month;
2199
+ return format.replace(/YYYY/g, year.toString()).replace(/MM/g, month).replace(/DD/g, day);
2200
+ };
2201
+ function parseDate(dateString, format) {
2202
+ const formatParts = format.split(/[-./\s]/);
2203
+ const dateParts = dateString.split(/[-./\s]/);
2204
+ if (formatParts.length !== dateParts.length) {
2205
+ throw new Error("Invalid date string or format");
2206
+ }
2207
+ let day, month, year;
2208
+ for (let i = 0; i < formatParts.length; i++) {
2209
+ const value = parseInt(dateParts[i], 10);
2210
+ switch (formatParts[i]) {
2211
+ case "DD":
2212
+ day = value;
2213
+ break;
2214
+ case "MM":
2215
+ month = value - 1;
2216
+ break;
2217
+ case "YYYY":
2218
+ year = value;
2219
+ break;
2220
+ }
2221
+ }
2222
+ const result = new Date(year, month, day);
2223
+ return result;
2224
+ }
2225
+ var formatToPattern = (format) => {
2226
+ return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
2227
+ };
2228
+ var TextMaskAdapter3 = React17.forwardRef(function TextMaskAdapter4(props, ref) {
2229
+ const { onChange, format, ...other } = props;
2230
+ return /* @__PURE__ */ React17.createElement(
2231
+ IMaskInput,
2232
+ {
2233
+ ...other,
2234
+ inputRef: ref,
2235
+ onAccept: (value) => onChange({ target: { name: props.name, value } }),
2236
+ mask: Date,
2237
+ pattern: formatToPattern(format),
2238
+ blocks: {
2239
+ D: {
2240
+ mask: IMask.MaskedRange,
2241
+ from: 1,
2242
+ to: 31,
2243
+ maxLength: 2
2244
+ },
2245
+ M: {
2246
+ mask: IMask.MaskedRange,
2247
+ from: 1,
2248
+ to: 12,
2249
+ maxLength: 2
2250
+ },
2251
+ Y: {
2252
+ mask: IMask.MaskedRange,
2253
+ from: 1900,
2254
+ to: 9999,
2255
+ maxLength: 4
2256
+ }
2257
+ },
2258
+ format: (date) => formatValueString(date, format),
2259
+ parse: (str) => parseDate(str, format),
2260
+ autofix: "pad",
2261
+ overwrite: true
2262
+ }
2263
+ );
2264
+ });
2265
+ var DatePicker = forwardRef6((inProps, ref) => {
2082
2266
  const props = useThemeProps4({ props: inProps, name: "DatePicker" });
2083
2267
  const {
2084
2268
  onChange,
@@ -2301,448 +2485,187 @@ var DatePicker_default = DatePicker;
2301
2485
  // src/components/Textarea/Textarea.tsx
2302
2486
  import React18 from "react";
2303
2487
  import { Textarea as JoyTextarea } from "@mui/joy";
2304
- import { motion as motion18 } from "framer-motion";
2305
- var MotionTextarea = motion18(JoyTextarea);
2306
- var Textarea = (props) => {
2307
- const {
2308
- label,
2309
- error,
2310
- helperText,
2311
- color,
2312
- size,
2313
- disabled,
2314
- required,
2315
- minRows = 2,
2316
- maxRows = 4,
2317
- // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
2318
- sx,
2319
- className,
2320
- ...innerProps
2321
- } = props;
2322
- const textarea = /* @__PURE__ */ React18.createElement(
2323
- MotionTextarea,
2324
- {
2325
- required,
2326
- disabled,
2327
- color: error ? "danger" : color,
2328
- size,
2329
- minRows,
2330
- maxRows,
2331
- ...innerProps
2332
- }
2333
- );
2334
- return /* @__PURE__ */ React18.createElement(
2335
- FormControl_default,
2336
- {
2337
- required,
2338
- disabled,
2339
- color,
2340
- size,
2341
- error,
2342
- sx,
2343
- className
2344
- },
2345
- label && /* @__PURE__ */ React18.createElement(FormLabel_default, null, label),
2346
- textarea,
2347
- helperText && /* @__PURE__ */ React18.createElement(FormHelperText_default, null, helperText)
2348
- );
2349
- };
2350
- Textarea.displayName = "Textarea";
2351
-
2352
- // src/components/Textarea/index.ts
2353
- var Textarea_default = Textarea;
2354
-
2355
- // src/components/Select/Select.tsx
2356
- import React19, { useMemo as useMemo7 } from "react";
2357
- import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
2358
2488
  import { motion as motion19 } from "framer-motion";
2359
- var MotionOption = motion19(JoyOption);
2360
- var Option = MotionOption;
2361
- Option.displayName = "Option";
2362
- function Select(props) {
2363
- const {
2364
- label,
2365
- helperText,
2366
- error,
2367
- size,
2368
- color,
2369
- disabled,
2370
- required,
2371
- onChange,
2372
- // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
2373
- sx,
2374
- className,
2375
- ...innerProps
2376
- } = props;
2377
- const options = useMemo7(
2378
- () => props.options.map((option) => {
2379
- if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
2380
- return option;
2381
- }
2382
- return {
2383
- value: option,
2384
- label: option
2385
- };
2386
- }),
2387
- [props.options]
2388
- );
2389
- const handleChange = (event, newValue) => {
2390
- const _event = event || { target: {} };
2391
- const newEvent = {
2392
- ..._event,
2393
- target: {
2394
- ..._event.target,
2395
- // @ts-expect-error target에 name이 있을 수 있다.
2396
- name: _event.target?.name || props.name,
2397
- value: newValue
2398
- }
2399
- };
2400
- onChange?.(newEvent, newValue);
2401
- };
2402
- const select = /* @__PURE__ */ React19.createElement(
2403
- JoySelect,
2404
- {
2405
- ...innerProps,
2406
- required,
2407
- disabled,
2408
- size,
2409
- color: error ? "danger" : color,
2410
- onChange: handleChange
2411
- },
2412
- options.map((option) => /* @__PURE__ */ React19.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.label))
2413
- );
2414
- return /* @__PURE__ */ React19.createElement(
2415
- FormControl_default,
2416
- {
2417
- required,
2418
- disabled,
2419
- size,
2420
- color,
2421
- error,
2422
- sx,
2423
- className
2424
- },
2425
- label && /* @__PURE__ */ React19.createElement(FormLabel_default, null, label),
2426
- select,
2427
- helperText && /* @__PURE__ */ React19.createElement(FormHelperText_default, null, helperText)
2428
- );
2429
- }
2430
- Select.displayName = "Select";
2431
-
2432
- // src/components/Select/index.ts
2433
- var Select_default = Select;
2434
-
2435
- // src/components/Tooltip/Tooltip.tsx
2436
- import React20 from "react";
2437
- import { Tooltip as JoyTooltip } from "@mui/joy";
2438
- import { motion as motion20 } from "framer-motion";
2439
- var MotionTooltip = motion20(JoyTooltip);
2440
- var Tooltip = (props) => {
2441
- return /* @__PURE__ */ React20.createElement(MotionTooltip, { ...props });
2442
- };
2443
- Tooltip.displayName = "Tooltip";
2444
-
2445
- // src/components/Tooltip/index.ts
2446
- var Tooltip_default = Tooltip;
2447
-
2448
- // src/components/DataTable/DataTable.tsx
2449
- import { motion as motion21, AnimatePresence as AnimatePresence2 } from "framer-motion";
2450
-
2451
- // src/components/Pagination/Pagination.tsx
2452
- import React21, { useCallback as useCallback8, useEffect as useEffect4 } from "react";
2453
- import PreviousIcon from "@mui/icons-material/ChevronLeft";
2454
- import NextIcon from "@mui/icons-material/ChevronRight";
2455
- import { styled as styled10 } from "@mui/joy";
2456
- var PaginationButton = styled10(Button_default, {
2457
- name: "Pagination",
2458
- slot: "button"
2459
- })(({ theme, active, size }) => ({
2460
- "--Button-size": {
2461
- sm: "32px",
2462
- md: "40px",
2463
- lg: "48px"
2464
- }[size],
2465
- width: "var(--Button-size)",
2466
- height: "var(--Button-size)",
2467
- backgroundColor: active ? theme.vars.palette.primary.softHoverBg : "transparent",
2468
- color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.plainColor,
2469
- "&:hover": {
2470
- color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.softColor,
2471
- backgroundColor: active ? theme.vars.palette.primary.softActiveBg : theme.vars.palette.neutral.softHoverBg
2472
- }
2473
- }));
2474
- var PaginationIconButton = styled10(IconButton_default, {
2475
- name: "Pagination",
2476
- slot: "button"
2477
- })(({ theme, size }) => ({
2478
- "--IconButton-size": {
2479
- sm: "32px",
2480
- md: "40px",
2481
- lg: "48px"
2482
- }[size],
2483
- "--Icon-fontSize": "20px",
2484
- width: "var(--IconButton-size)",
2485
- height: "var(--IconButton-size)",
2486
- color: theme.vars.palette.neutral.plainColor,
2487
- "&:hover": {
2488
- color: theme.vars.palette.neutral.softColor,
2489
- backgroundColor: theme.vars.palette.neutral.softHoverBg
2490
- }
2491
- }));
2492
- var PaginationRoot = styled10(Stack_default, {
2493
- name: "Pagination",
2494
- slot: "root"
2495
- })({});
2496
- var PaginationContainer = styled10(Stack_default, {
2497
- name: "Pagination",
2498
- slot: "container"
2499
- })(({ theme, size }) => ({
2500
- gap: {
2501
- sm: theme.spacing(1),
2502
- md: theme.spacing(1.5),
2503
- lg: theme.spacing(2)
2504
- }[size]
2505
- }));
2506
- function Pagination(props) {
2489
+ var MotionTextarea = motion19(JoyTextarea);
2490
+ var Textarea = (props) => {
2507
2491
  const {
2508
- paginationModel: _paginationModel,
2509
- defaultPaginationModel = { page: 1, pageSize: 25 },
2510
- onPageChange,
2511
- rowCount,
2512
- size = "md",
2492
+ label,
2493
+ error,
2494
+ helperText,
2495
+ color,
2496
+ size,
2497
+ disabled,
2498
+ required,
2499
+ minRows = 2,
2500
+ maxRows = 4,
2501
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
2502
+ sx,
2503
+ className,
2513
2504
  ...innerProps
2514
2505
  } = props;
2515
- const [paginationModel, setPaginationModel] = useControlledState(
2516
- _paginationModel,
2517
- defaultPaginationModel,
2518
- useCallback8(
2519
- (newPage) => {
2520
- onPageChange(newPage.page);
2521
- },
2522
- [onPageChange]
2523
- )
2524
- );
2525
- const handlePageChange = (newPage) => {
2526
- setPaginationModel({ ...paginationModel, page: newPage });
2527
- };
2528
- const firstPage = 1;
2529
- const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
2530
- const beforePages = [paginationModel.page - 2, paginationModel.page - 1].filter((p) => p > 1);
2531
- const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
2532
- const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
2533
- const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
2534
- useEffect4(() => {
2535
- if (paginationModel.page > lastPage) {
2536
- setPaginationModel({ ...paginationModel, page: lastPage });
2537
- }
2538
- }, [rowCount, paginationModel, lastPage, setPaginationModel]);
2539
- return /* @__PURE__ */ React21.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React21.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React21.createElement(
2540
- PaginationIconButton,
2541
- {
2542
- size,
2543
- variant: "plain",
2544
- color: "neutral",
2545
- onClick: () => handlePageChange(paginationModel.page - 1),
2546
- disabled: paginationModel.page === firstPage,
2547
- "aria-label": "Previous page"
2548
- },
2549
- /* @__PURE__ */ React21.createElement(PreviousIcon, null)
2550
- ), paginationModel.page !== firstPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ React21.createElement(
2551
- PaginationButton,
2552
- {
2553
- size,
2554
- variant: "plain",
2555
- color: "neutral",
2556
- onClick: () => handlePageChange(paginationModel.page - 3),
2557
- "aria-label": "More previous pages"
2558
- },
2559
- "..."
2560
- ), beforePages.map((p) => /* @__PURE__ */ React21.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React21.createElement(PaginationButton, { active: "true", 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(
2561
- PaginationButton,
2506
+ const textarea = /* @__PURE__ */ React18.createElement(
2507
+ MotionTextarea,
2562
2508
  {
2509
+ required,
2510
+ disabled,
2511
+ color: error ? "danger" : color,
2563
2512
  size,
2564
- variant: "plain",
2565
- color: "neutral",
2566
- "aria-label": "More next pages",
2567
- onClick: () => handlePageChange(paginationModel.page + 3)
2568
- },
2569
- "..."
2570
- ), paginationModel.page !== lastPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ React21.createElement(
2571
- PaginationIconButton,
2513
+ minRows,
2514
+ maxRows,
2515
+ ...innerProps
2516
+ }
2517
+ );
2518
+ return /* @__PURE__ */ React18.createElement(
2519
+ FormControl_default,
2572
2520
  {
2521
+ required,
2522
+ disabled,
2523
+ color,
2573
2524
  size,
2574
- variant: "plain",
2575
- color: "neutral",
2576
- onClick: () => handlePageChange(paginationModel.page + 1),
2577
- disabled: paginationModel.page === lastPage,
2578
- "aria-label": "Next page"
2579
- },
2580
- /* @__PURE__ */ React21.createElement(NextIcon, null)
2581
- )));
2582
- }
2583
- Pagination.displayName = "Pagination";
2584
-
2585
- // src/components/Pagination/index.ts
2586
- var Pagination_default = Pagination;
2587
-
2588
- // src/components/InfoSign/InfoSign.tsx
2589
- import React22 from "react";
2590
- import { styled as styled11, tooltipClasses } from "@mui/joy";
2591
- import MuiInfoIcon from "@mui/icons-material/Info";
2592
- var InfoIcon = styled11(MuiInfoIcon, {
2593
- name: "InfoSign",
2594
- slot: "InfoSign"
2595
- })(({ theme }) => ({
2596
- color: theme.palette.text.icon,
2597
- width: "14px",
2598
- height: "14px"
2599
- }));
2600
- function InfoSign(props) {
2601
- const { message, placement } = props;
2602
- return /* @__PURE__ */ React22.createElement(
2603
- Tooltip_default,
2604
- {
2605
- arrow: true,
2606
- placement,
2607
- sx: {
2608
- [`&.${tooltipClasses.root}`]: {
2609
- maxWidth: "320px"
2610
- }
2611
- },
2612
- title: message?.split("\n").map((line, i) => /* @__PURE__ */ React22.createElement("div", { key: `info-sign-${i}` }, line))
2525
+ error,
2526
+ sx,
2527
+ className
2613
2528
  },
2614
- /* @__PURE__ */ React22.createElement(InfoIcon, null)
2529
+ label && /* @__PURE__ */ React18.createElement(FormLabel_default, null, label),
2530
+ textarea,
2531
+ helperText && /* @__PURE__ */ React18.createElement(FormHelperText_default, null, helperText)
2615
2532
  );
2616
- }
2533
+ };
2534
+ Textarea.displayName = "Textarea";
2617
2535
 
2618
- // src/components/InfoSign/index.ts
2619
- var InfoSign_default = InfoSign;
2536
+ // src/components/Textarea/index.ts
2537
+ var Textarea_default = Textarea;
2620
2538
 
2621
- // src/components/DataTable/DataTable.tsx
2622
- function extractFieldsFromGroupingModel(items) {
2623
- const fields = /* @__PURE__ */ new Set();
2624
- for (const item of items) {
2625
- if ("groupId" in item) {
2626
- const children = Array.isArray(item.children) ? item.children : [item.children];
2627
- const childFields = extractFieldsFromGroupingModel(children);
2628
- childFields.forEach((field) => fields.add(field));
2629
- } else {
2630
- fields.add(item.field);
2631
- }
2632
- }
2633
- return fields;
2634
- }
2635
- function reorderColumnsByGroupingModel(columns, columnGroupingModel) {
2636
- const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
2637
- const orderedFields = [];
2638
- function collectFieldsInOrder(items) {
2639
- for (const item of items) {
2640
- if ("groupId" in item) {
2641
- const children = Array.isArray(item.children) ? item.children : [item.children];
2642
- collectFieldsInOrder(children);
2643
- } else {
2644
- if (!orderedFields.includes(item.field)) {
2645
- orderedFields.push(item.field);
2646
- }
2539
+ // src/components/Select/Select.tsx
2540
+ import React19, { useMemo as useMemo7 } from "react";
2541
+ import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
2542
+ import { motion as motion20 } from "framer-motion";
2543
+ var MotionOption = motion20(JoyOption);
2544
+ var Option = MotionOption;
2545
+ Option.displayName = "Option";
2546
+ function Select(props) {
2547
+ const {
2548
+ label,
2549
+ helperText,
2550
+ error,
2551
+ size,
2552
+ color,
2553
+ disabled,
2554
+ required,
2555
+ onChange,
2556
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
2557
+ sx,
2558
+ className,
2559
+ ...innerProps
2560
+ } = props;
2561
+ const options = useMemo7(
2562
+ () => props.options.map((option) => {
2563
+ if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
2564
+ return option;
2647
2565
  }
2648
- }
2649
- }
2650
- collectFieldsInOrder(columnGroupingModel);
2651
- const columnMap = new Map(columns.map((col) => [col.field, col]));
2652
- const reorderedColumns = [];
2653
- for (const field of orderedFields) {
2654
- const column = columnMap.get(field);
2655
- if (column) {
2656
- reorderedColumns.push(column);
2657
- }
2658
- }
2659
- for (const column of columns) {
2660
- if (!fieldsInGroupingModel.has(column.field)) {
2661
- reorderedColumns.push(column);
2662
- }
2663
- }
2664
- return reorderedColumns;
2665
- }
2666
- function flattenColumnGroups(items, groupPath = [], columnIndex = { current: 0 }) {
2667
- const result = [];
2668
- for (const item of items) {
2669
- if ("groupId" in item) {
2670
- const newPath = [...groupPath, item.groupId];
2671
- const children = Array.isArray(item.children) ? item.children : [item.children];
2672
- result.push(...flattenColumnGroups(children, newPath, columnIndex));
2673
- } else {
2674
- result.push({
2675
- ...item,
2676
- groupPath,
2677
- columnIndex: columnIndex.current++
2678
- });
2679
- }
2680
- }
2681
- return result;
2682
- }
2683
- function calculateColumnGroups(columnGroupingModel, columns) {
2684
- const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
2685
- const flattenedColumns = flattenColumnGroups(columnGroupingModel);
2686
- const columnIndexMap = new Map(flattenedColumns.map((col) => [col.field, col.columnIndex]));
2687
- const processedGroups = /* @__PURE__ */ new Map();
2688
- const groupsByLevel = [];
2689
- let maxLevel = 0;
2690
- function processGroup(items, level, parentGroupId) {
2691
- let minIndex = Infinity;
2692
- let maxIndex = -Infinity;
2693
- for (const item of items) {
2694
- if ("groupId" in item) {
2695
- const groupKey = parentGroupId ? `${parentGroupId}.${item.groupId}` : item.groupId;
2696
- if (!processedGroups.has(groupKey)) {
2697
- const children = Array.isArray(item.children) ? item.children : [item.children];
2698
- const { startIndex, colspan } = processGroup(children, level + 1, groupKey);
2699
- const group = {
2700
- groupId: item.groupId,
2701
- headerName: item.headerName,
2702
- colspan,
2703
- level,
2704
- startIndex
2705
- };
2706
- processedGroups.set(groupKey, group);
2707
- if (!groupsByLevel[level]) {
2708
- groupsByLevel[level] = [];
2709
- }
2710
- groupsByLevel[level].push(group);
2711
- maxLevel = Math.max(maxLevel, level);
2712
- minIndex = Math.min(minIndex, startIndex);
2713
- maxIndex = Math.max(maxIndex, startIndex + colspan - 1);
2714
- }
2715
- } else {
2716
- const columnIndex = columnIndexMap.get(item.field);
2717
- if (columnIndex !== void 0) {
2718
- minIndex = Math.min(minIndex, columnIndex);
2719
- maxIndex = Math.max(maxIndex, columnIndex);
2720
- }
2566
+ return {
2567
+ value: option,
2568
+ label: option
2569
+ };
2570
+ }),
2571
+ [props.options]
2572
+ );
2573
+ const handleChange = (event, newValue) => {
2574
+ const _event = event || { target: {} };
2575
+ const newEvent = {
2576
+ ..._event,
2577
+ target: {
2578
+ ..._event.target,
2579
+ // @ts-expect-error target에 name이 있을 수 있다.
2580
+ name: _event.target?.name || props.name,
2581
+ value: newValue
2721
2582
  }
2722
- }
2723
- return {
2724
- startIndex: minIndex === Infinity ? 0 : minIndex,
2725
- colspan: maxIndex === -Infinity ? 0 : maxIndex - minIndex + 1
2726
2583
  };
2727
- }
2728
- processGroup(columnGroupingModel, 0);
2729
- groupsByLevel.forEach((level) => {
2730
- level.sort((a, b) => a.startIndex - b.startIndex);
2731
- });
2732
- return { groups: groupsByLevel, maxLevel, fieldsInGroupingModel };
2584
+ onChange?.(newEvent, newValue);
2585
+ };
2586
+ const select = /* @__PURE__ */ React19.createElement(
2587
+ JoySelect,
2588
+ {
2589
+ ...innerProps,
2590
+ required,
2591
+ disabled,
2592
+ size,
2593
+ color: error ? "danger" : color,
2594
+ onChange: handleChange
2595
+ },
2596
+ options.map((option) => /* @__PURE__ */ React19.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.label))
2597
+ );
2598
+ return /* @__PURE__ */ React19.createElement(
2599
+ FormControl_default,
2600
+ {
2601
+ required,
2602
+ disabled,
2603
+ size,
2604
+ color,
2605
+ error,
2606
+ sx,
2607
+ className
2608
+ },
2609
+ label && /* @__PURE__ */ React19.createElement(FormLabel_default, null, label),
2610
+ select,
2611
+ helperText && /* @__PURE__ */ React19.createElement(FormHelperText_default, null, helperText)
2612
+ );
2733
2613
  }
2734
- function getTextAlign(props) {
2735
- return !props.editMode && ["number", "date", "currency"].includes(props.type || "") ? "end" : "start";
2614
+ Select.displayName = "Select";
2615
+
2616
+ // src/components/Select/index.ts
2617
+ var Select_default = Select;
2618
+
2619
+ // src/components/DataTable/components.tsx
2620
+ import { Link } from "@mui/joy";
2621
+
2622
+ // src/components/Tooltip/Tooltip.tsx
2623
+ import React20 from "react";
2624
+ import { Tooltip as JoyTooltip } from "@mui/joy";
2625
+ import { motion as motion21 } from "framer-motion";
2626
+ var MotionTooltip = motion21(JoyTooltip);
2627
+ var Tooltip = (props) => {
2628
+ return /* @__PURE__ */ React20.createElement(MotionTooltip, { ...props });
2629
+ };
2630
+ Tooltip.displayName = "Tooltip";
2631
+
2632
+ // src/components/Tooltip/index.ts
2633
+ var Tooltip_default = Tooltip;
2634
+
2635
+ // src/components/InfoSign/InfoSign.tsx
2636
+ import React21 from "react";
2637
+ import { styled as styled11, tooltipClasses } from "@mui/joy";
2638
+ import MuiInfoIcon from "@mui/icons-material/Info";
2639
+ var InfoIcon = styled11(MuiInfoIcon, {
2640
+ name: "InfoSign",
2641
+ slot: "InfoSign"
2642
+ })(({ theme }) => ({
2643
+ color: theme.palette.text.icon,
2644
+ width: "14px",
2645
+ height: "14px"
2646
+ }));
2647
+ function InfoSign(props) {
2648
+ const { message, placement } = props;
2649
+ return /* @__PURE__ */ React21.createElement(
2650
+ Tooltip_default,
2651
+ {
2652
+ arrow: true,
2653
+ placement,
2654
+ sx: {
2655
+ [`&.${tooltipClasses.root}`]: {
2656
+ maxWidth: "320px"
2657
+ }
2658
+ },
2659
+ title: message?.split("\n").map((line, i) => /* @__PURE__ */ React21.createElement("div", { key: `info-sign-${i}` }, line))
2660
+ },
2661
+ /* @__PURE__ */ React21.createElement(InfoIcon, null)
2662
+ );
2736
2663
  }
2737
- var DefaultLoadingOverlay = () => /* @__PURE__ */ React23.createElement(LinearProgress, { value: 8, variant: "plain" });
2738
- var EllipsisDiv = styled12("div", {
2739
- name: "DataTable",
2740
- slot: "textEllipsis"
2741
- })({
2742
- overflow: "hidden",
2743
- textOverflow: "ellipsis",
2744
- whiteSpace: "nowrap"
2745
- });
2664
+
2665
+ // src/components/InfoSign/index.ts
2666
+ var InfoSign_default = InfoSign;
2667
+
2668
+ // src/components/DataTable/components.tsx
2746
2669
  var TextEllipsis = ({ children }) => {
2747
2670
  const textRef = useRef4(null);
2748
2671
  const [showTooltip, setShowTooltip] = useState6(false);
@@ -2753,9 +2676,9 @@ var TextEllipsis = ({ children }) => {
2753
2676
  setShowTooltip(isTextTruncated);
2754
2677
  }
2755
2678
  }, [children]);
2756
- const content = /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef }, children);
2679
+ const content = /* @__PURE__ */ React22.createElement(EllipsisDiv, { ref: textRef }, children);
2757
2680
  if (showTooltip) {
2758
- return /* @__PURE__ */ React23.createElement(Tooltip_default, { title: children, placement: "top", onClick: (e) => e.stopPropagation() }, content);
2681
+ return /* @__PURE__ */ React22.createElement(Tooltip_default, { title: children, placement: "top", onClick: (e) => e.stopPropagation() }, content);
2759
2682
  }
2760
2683
  return content;
2761
2684
  };
@@ -2769,9 +2692,9 @@ var CellTextEllipsis = ({ children }) => {
2769
2692
  setShowTooltip(isTextTruncated);
2770
2693
  }
2771
2694
  }, [children]);
2772
- const content = /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef }, children);
2695
+ const content = /* @__PURE__ */ React22.createElement(EllipsisDiv, { ref: textRef }, children);
2773
2696
  if (showTooltip) {
2774
- return /* @__PURE__ */ React23.createElement(
2697
+ return /* @__PURE__ */ React22.createElement(
2775
2698
  Tooltip_default,
2776
2699
  {
2777
2700
  title: children,
@@ -2785,130 +2708,6 @@ var CellTextEllipsis = ({ children }) => {
2785
2708
  }
2786
2709
  return content;
2787
2710
  };
2788
- var OverlayWrapper = styled12("tr", {
2789
- name: "DataTable",
2790
- slot: "overlayWrapper"
2791
- })({
2792
- position: "sticky",
2793
- top: `calc(var(--unstable_TableCell-height, 32px))`,
2794
- left: 0,
2795
- right: 0,
2796
- zIndex: 1,
2797
- "& > td": {
2798
- height: 0,
2799
- padding: 0,
2800
- border: "none !important"
2801
- }
2802
- });
2803
- var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
2804
- var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React23.createElement(
2805
- Box_default,
2806
- {
2807
- sx: {
2808
- position: "absolute",
2809
- top: 0,
2810
- right: 0,
2811
- bottom: 0,
2812
- width: "4px",
2813
- cursor: "col-resize"
2814
- },
2815
- onClick: (e) => e.stopPropagation(),
2816
- onMouseDown: (e) => {
2817
- const initialX = e.clientX;
2818
- const initialWidth = ref.current?.getBoundingClientRect().width;
2819
- const onMouseMove = (e2) => {
2820
- if (initialWidth && initialX) {
2821
- ref.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2822
- targetRef.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
2823
- }
2824
- };
2825
- const onMouseUp = () => {
2826
- document.removeEventListener("mousemove", onMouseMove);
2827
- document.removeEventListener("mouseup", onMouseUp);
2828
- };
2829
- document.addEventListener("mousemove", onMouseMove);
2830
- document.addEventListener("mouseup", onMouseUp);
2831
- }
2832
- }
2833
- );
2834
- var VirtualizedTableBody = styled12("tbody", {
2835
- name: "DataTable",
2836
- slot: "tableBody"
2837
- })({
2838
- // HACK: for virtualization: tbody의 height를 렌더링 된 tr의 총 높이 보다 높은 값으로 지정하고도 tr의 size를 유지하기 위한 꼼수
2839
- "&::after": {
2840
- content: "''",
2841
- display: "block",
2842
- height: "0.01em"
2843
- },
2844
- // NOTE: 테이블 안에 버튼을 넣을 때 버튼의 높이가 테이블의 높이를 넘어가지 않도록 설정
2845
- [`& .${buttonClasses.root}`]: {
2846
- "--Button-minHeight": "26px",
2847
- "--Button-paddingBlock": "0.25rem",
2848
- lineHeight: 1,
2849
- marginTop: "-2px",
2850
- marginBottom: "-2px"
2851
- },
2852
- [`& .${iconButtonClasses.root}`]: {
2853
- "--IconButton-size": "26px",
2854
- verticalAlign: "middle",
2855
- marginTop: "-2px",
2856
- marginBottom: "-2px"
2857
- }
2858
- });
2859
- var StyledTableRow = styled12("tr", {
2860
- name: "DataTable",
2861
- slot: "tableRow",
2862
- shouldForwardProp: (prop) => prop !== "striped"
2863
- })(({ striped }) => ({
2864
- ...striped && {
2865
- backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
2866
- color: "var(--ceed-palette-text-primary)",
2867
- "& td": {
2868
- backgroundColor: "background.surface"
2869
- }
2870
- },
2871
- "&:hover": {
2872
- backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
2873
- "& td": {
2874
- backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
2875
- }
2876
- }
2877
- }));
2878
- var VirtualizedTableRow = memo(StyledTableRow, (prevProps, nextProps) => {
2879
- return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
2880
- prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
2881
- prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Include children check to handle isCellEditable changes
2882
- prevProps.children === nextProps.children;
2883
- });
2884
- var Asterisk = styled12("span", {
2885
- name: "DataTable",
2886
- slot: "headCellAsterisk"
2887
- })(({ theme }) => ({
2888
- color: "var(--ceed-palette-danger-500)",
2889
- marginLeft: theme.spacing(0.5)
2890
- }));
2891
- var StyledTh = styled12(motion21.th)(({ theme }) => ({
2892
- boxShadow: "1px 0 var(--TableCell-borderColor)"
2893
- // border 대신 box-shadow를 사용하여 stickyHeader와 함께 사용할 때 border가 겹치는 문제를 해결
2894
- }));
2895
- var StyledTd = styled12("td")(({ theme }) => ({
2896
- transition: `box-shadow 0.3s`,
2897
- "&:not(.is-last-left):not(.is-last-right)": {
2898
- boxShadow: "1px 0 var(--TableCell-borderColor)"
2899
- },
2900
- ".ScrollableRight &": {
2901
- "&.is-last-left": {
2902
- boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2903
- }
2904
- },
2905
- ".ScrollableLeft &": {
2906
- "&.is-last-right": {
2907
- boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
2908
- }
2909
- }
2910
- }));
2911
- var MotionSortIcon = motion21(SortIcon);
2912
2711
  var HeadCell = (props) => {
2913
2712
  const {
2914
2713
  width,
@@ -2931,7 +2730,8 @@ var HeadCell = (props) => {
2931
2730
  pinnedStartPosition,
2932
2731
  pinnedEndPosition,
2933
2732
  headerRef,
2934
- tableColRef
2733
+ tableColRef,
2734
+ headerClassName
2935
2735
  } = props;
2936
2736
  const theme = useTheme();
2937
2737
  const ref = headerRef;
@@ -2964,7 +2764,7 @@ var HeadCell = (props) => {
2964
2764
  const sortIcon = useMemo8(() => {
2965
2765
  const isSorted = !!sort;
2966
2766
  const isVisible = sortable && (isSorted || isHovered);
2967
- return /* @__PURE__ */ React23.createElement(AnimatePresence2, { mode: "wait" }, isVisible && /* @__PURE__ */ React23.createElement(
2767
+ return /* @__PURE__ */ React22.createElement(AnimatePresence2, { mode: "wait" }, isVisible && /* @__PURE__ */ React22.createElement(
2968
2768
  MotionSortIcon,
2969
2769
  {
2970
2770
  key: "sort-icon",
@@ -2993,10 +2793,20 @@ var HeadCell = (props) => {
2993
2793
  ));
2994
2794
  }, [headId, initialSort, sort, sortable, isHovered]);
2995
2795
  const infoSign = useMemo8(
2996
- () => description ? /* @__PURE__ */ React23.createElement(InfoSign_default, { message: description, placement: "bottom" }) : null,
2796
+ () => description ? /* @__PURE__ */ React22.createElement(InfoSign_default, { message: description, placement: "bottom" }) : null,
2997
2797
  [description]
2998
2798
  );
2999
- return /* @__PURE__ */ React23.createElement(
2799
+ const params = useMemo8(
2800
+ () => ({
2801
+ field
2802
+ }),
2803
+ [field]
2804
+ );
2805
+ const computedHeaderClassName = useMemo8(
2806
+ () => (typeof headerClassName === "function" ? headerClassName(params) : headerClassName) || void 0,
2807
+ [headerClassName, params]
2808
+ );
2809
+ return /* @__PURE__ */ React22.createElement(
3000
2810
  StyledTh,
3001
2811
  {
3002
2812
  id: headId,
@@ -3005,16 +2815,17 @@ var HeadCell = (props) => {
3005
2815
  ref,
3006
2816
  key: field,
3007
2817
  style,
3008
- onClick: useCallback9(
2818
+ onClick: useCallback8(
3009
2819
  (e) => sortable && onSortChange?.({ field, currentSort: sort, multiple: e.shiftKey }),
3010
2820
  [field, onSortChange, sort, sortable]
3011
2821
  ),
3012
2822
  onMouseEnter: () => setIsHovered(true),
3013
2823
  onMouseLeave: () => setIsHovered(false),
3014
2824
  whileHover: "hover",
3015
- initial: "initial"
2825
+ initial: "initial",
2826
+ className: computedHeaderClassName
3016
2827
  },
3017
- /* @__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),
2828
+ /* @__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),
3018
2829
  resizer
3019
2830
  );
3020
2831
  };
@@ -3129,18 +2940,18 @@ var BodyCell = (props) => {
3129
2940
  return createElement(memo(renderEditCell), params);
3130
2941
  }
3131
2942
  return {
3132
- date: /* @__PURE__ */ React23.createElement(DatePicker_default, { value, ...editModeComponentProps }),
3133
- currency: /* @__PURE__ */ React23.createElement(
2943
+ date: /* @__PURE__ */ React22.createElement(DatePicker_default, { value, ...editModeComponentProps }),
2944
+ currency: /* @__PURE__ */ React22.createElement(
3134
2945
  CurrencyInput_default,
3135
2946
  {
3136
2947
  value,
3137
2948
  ...editModeComponentProps
3138
2949
  }
3139
2950
  ),
3140
- number: /* @__PURE__ */ React23.createElement(Input_default, { value, type: "number", ...editModeComponentProps }),
3141
- text: /* @__PURE__ */ React23.createElement(Input_default, { value, type: "text", ...editModeComponentProps }),
3142
- longText: /* @__PURE__ */ React23.createElement(Textarea_default, { value, ...editModeComponentProps }),
3143
- autocomplete: /* @__PURE__ */ React23.createElement(
2951
+ number: /* @__PURE__ */ React22.createElement(Input_default, { value, type: "number", ...editModeComponentProps }),
2952
+ text: /* @__PURE__ */ React22.createElement(Input_default, { value, type: "text", ...editModeComponentProps }),
2953
+ longText: /* @__PURE__ */ React22.createElement(Textarea_default, { value, ...editModeComponentProps }),
2954
+ autocomplete: /* @__PURE__ */ React22.createElement(
3144
2955
  Autocomplete_default,
3145
2956
  {
3146
2957
  value,
@@ -3148,7 +2959,7 @@ var BodyCell = (props) => {
3148
2959
  ...editModeComponentProps
3149
2960
  }
3150
2961
  ),
3151
- select: /* @__PURE__ */ React23.createElement(
2962
+ select: /* @__PURE__ */ React22.createElement(
3152
2963
  Select_default,
3153
2964
  {
3154
2965
  value,
@@ -3165,7 +2976,7 @@ var BodyCell = (props) => {
3165
2976
  }
3166
2977
  const innerText = value;
3167
2978
  const typedComponent = {
3168
- link: React23.createElement(linkComponentFromProps || Link, {
2979
+ link: React22.createElement(linkComponentFromProps || Link, {
3169
2980
  children: innerText,
3170
2981
  ...componentProps
3171
2982
  })
@@ -3175,7 +2986,7 @@ var BodyCell = (props) => {
3175
2986
  const getActions = props.getActions;
3176
2987
  const CellComponent = useMemo8(() => {
3177
2988
  if (type === "actions") {
3178
- return /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
2989
+ return /* @__PURE__ */ React22.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
3179
2990
  }
3180
2991
  return editMode && EditModeComponent ? EditModeComponent : ReadModeComponent;
3181
2992
  }, [type, getActions, params, editMode, EditModeComponent, ReadModeComponent]);
@@ -3185,10 +2996,10 @@ var BodyCell = (props) => {
3185
2996
  () => (typeof cellClassName === "function" ? cellClassName(params) : cellClassName) || "",
3186
2997
  [cellClassName, params]
3187
2998
  );
3188
- useEffect5(() => {
2999
+ useEffect4(() => {
3189
3000
  setValue(row[field]);
3190
3001
  }, [row, field]);
3191
- return /* @__PURE__ */ React23.createElement(
3002
+ return /* @__PURE__ */ React22.createElement(
3192
3003
  StyledTd,
3193
3004
  {
3194
3005
  ref: cellRef,
@@ -3206,7 +3017,7 @@ var BodyCell = (props) => {
3206
3017
  className: [isLastStartPinnedColumn && "is-last-left", isLastEndPinnedColumn && "is-last-right", computedCellClassName].filter(Boolean).join(" ") || ""
3207
3018
  },
3208
3019
  useMemo8(
3209
- () => showTooltip ? /* @__PURE__ */ React23.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
3020
+ () => showTooltip ? /* @__PURE__ */ React22.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
3210
3021
  [CellComponent, showTooltip]
3211
3022
  )
3212
3023
  );
@@ -3214,7 +3025,7 @@ var BodyCell = (props) => {
3214
3025
  var BodyRow = memo(
3215
3026
  (props) => {
3216
3027
  const { tableId, columns, rowId, editMode, noWrap, row } = props;
3217
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, columns.map((column, i) => /* @__PURE__ */ React23.createElement(
3028
+ return /* @__PURE__ */ React22.createElement(React22.Fragment, null, columns.map((column, i) => /* @__PURE__ */ React22.createElement(
3218
3029
  BodyCell,
3219
3030
  {
3220
3031
  key: `${rowId}_${column.field.toString()}_${i}`,
@@ -3228,10 +3039,38 @@ var BodyRow = memo(
3228
3039
  )));
3229
3040
  }
3230
3041
  );
3042
+ var StyledTableRow2 = styled12("tr", {
3043
+ name: "DataTable",
3044
+ slot: "tableRow",
3045
+ shouldForwardProp: (prop) => prop !== "striped"
3046
+ })(({ striped }) => ({
3047
+ ...striped && {
3048
+ backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
3049
+ color: "var(--ceed-palette-text-primary)",
3050
+ "& td": {
3051
+ backgroundColor: "background.surface"
3052
+ }
3053
+ },
3054
+ "&:hover": {
3055
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
3056
+ "& td": {
3057
+ backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
3058
+ }
3059
+ }
3060
+ }));
3061
+ var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
3062
+ return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
3063
+ prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
3064
+ prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Include children check to handle isCellEditable changes
3065
+ prevProps.children === nextProps.children;
3066
+ });
3067
+
3068
+ // src/components/DataTable/hooks.ts
3069
+ import { useState as useState7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useMemo as useMemo9, useCallback as useCallback9, useEffect as useEffect5, createRef } from "react";
3231
3070
  function useColumnWidths(columnsByField) {
3232
- const [widths, setWidths] = useState6({});
3233
- const roRef = useRef4();
3234
- useLayoutEffect(() => {
3071
+ const [widths, setWidths] = useState7({});
3072
+ const roRef = useRef5();
3073
+ useLayoutEffect2(() => {
3235
3074
  if (roRef.current) roRef.current.disconnect();
3236
3075
  roRef.current = new ResizeObserver((entries) => {
3237
3076
  let changed = false;
@@ -3279,33 +3118,32 @@ function useDataTableRenderer({
3279
3118
  isTotalSelected: _isTotalSelected,
3280
3119
  isRowSelectable,
3281
3120
  columnGroupingModel
3282
- // Add this prop
3283
3121
  }) {
3284
3122
  if (pinnedColumns && columnGroupingModel) {
3285
3123
  throw new Error(
3286
3124
  "You cannot use both `pinnedColumns` and `columnGroupingModel` at the same time. Please choose one of them."
3287
3125
  );
3288
3126
  }
3289
- const onSelectionModelChangeRef = useRef4(onSelectionModelChange);
3127
+ const onSelectionModelChangeRef = useRef5(onSelectionModelChange);
3290
3128
  onSelectionModelChangeRef.current = onSelectionModelChange;
3291
- const [focusedRowId, setFocusedRowId] = useState6(null);
3129
+ const [focusedRowId, setFocusedRowId] = useState7(null);
3292
3130
  const [sortModel, setSortModel] = useControlledState(
3293
3131
  controlledSortModel,
3294
3132
  initialState?.sorting?.sortModel ?? [],
3295
3133
  useCallback9((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
3296
3134
  );
3297
- const reorderedColumns = useMemo8(() => {
3135
+ const reorderedColumns = useMemo9(() => {
3298
3136
  if (!columnGroupingModel) return columnsProp;
3299
3137
  return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
3300
3138
  }, [columnsProp, columnGroupingModel]);
3301
- const columnsByField = useMemo8(
3139
+ const columnsByField = useMemo9(
3302
3140
  () => reorderedColumns.reduce(
3303
3141
  (acc, curr) => ({
3304
3142
  ...acc,
3305
3143
  [curr.field]: {
3306
3144
  ...curr,
3307
- headerRef: React23.createRef(),
3308
- tableColRef: React23.createRef()
3145
+ headerRef: createRef(),
3146
+ tableColRef: createRef()
3309
3147
  }
3310
3148
  }),
3311
3149
  {}
@@ -3340,47 +3178,42 @@ function useDataTableRenderer({
3340
3178
  },
3341
3179
  [sortModel, columnsByField]
3342
3180
  );
3343
- const rows = useMemo8(
3181
+ const rows = useMemo9(
3344
3182
  () => sortModel.length ? [..._rows].sort(sortComparator) : _rows,
3345
3183
  [_rows, sortModel, sortComparator]
3346
3184
  );
3347
- const sortOrder = useMemo8(
3348
- // NOTE: default value를 props destructuring에서 할당하면 렌더링 시점에 초기화가 되어버린다.
3185
+ const sortOrder = useMemo9(
3349
3186
  () => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
3350
3187
  [_sortOrder]
3351
3188
  );
3352
- const [page, setPage] = useState6(paginationModel?.page || 1);
3189
+ const [page, setPage] = useState7(paginationModel?.page || 1);
3353
3190
  const pageSize = paginationModel?.pageSize || 20;
3354
3191
  const getId = useCallback9(
3355
3192
  (row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
3356
3193
  [_getId, page, pageSize]
3357
3194
  );
3358
- const selectedModelSet = useMemo8(
3359
- // NOTE: default value를 props destructuring에서 할당하면 렌더링 시점에 초기화가 되어버린다.
3360
- () => new Set(selectionModel || []),
3361
- [selectionModel]
3362
- );
3363
- const dataInPage = useMemo8(
3195
+ const selectedModelSet = useMemo9(() => new Set(selectionModel || []), [selectionModel]);
3196
+ const dataInPage = useMemo9(
3364
3197
  () => !pagination || paginationMode === "server" ? rows : rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
3365
3198
  [rows, page, pageSize, paginationMode, pagination]
3366
3199
  );
3367
- const selectableDataInPage = useMemo8(
3200
+ const selectableDataInPage = useMemo9(
3368
3201
  () => dataInPage.filter((row, i) => {
3369
3202
  if (!isRowSelectable) return true;
3370
3203
  return isRowSelectable({ row, id: getId(row, i) });
3371
3204
  }),
3372
3205
  [dataInPage, isRowSelectable, getId]
3373
3206
  );
3374
- const isAllSelected = useMemo8(
3207
+ const isAllSelected = useMemo9(
3375
3208
  () => selectableDataInPage.length > 0 && selectableDataInPage.every((row, i) => selectedModelSet.has(getId(row, i))),
3376
3209
  [selectableDataInPage, selectedModelSet, getId]
3377
3210
  );
3378
3211
  const rowCount = totalRowsProp || rows.length;
3379
- const selectableRowCount = useMemo8(() => {
3212
+ const selectableRowCount = useMemo9(() => {
3380
3213
  if (!isRowSelectable) return rowCount;
3381
3214
  return rows.filter((row, i) => isRowSelectable({ row, id: getId(row, i) })).length;
3382
3215
  }, [rows, isRowSelectable, getId, rowCount]);
3383
- const isTotalSelected = useMemo8(
3216
+ const isTotalSelected = useMemo9(
3384
3217
  () => _isTotalSelected ?? (selectableRowCount > 0 && (selectionModel?.length || 0) === selectableRowCount),
3385
3218
  [_isTotalSelected, selectionModel, selectableRowCount]
3386
3219
  );
@@ -3390,17 +3223,14 @@ function useDataTableRenderer({
3390
3223
  columnsByField[f].minWidth ?? 0,
3391
3224
  [columnWidths, columnsByField]
3392
3225
  );
3393
- const processedColumnGroups = useMemo8(() => {
3226
+ const processedColumnGroups = useMemo9(() => {
3394
3227
  if (!columnGroupingModel) return null;
3395
3228
  return calculateColumnGroups(columnGroupingModel, reorderedColumns);
3396
3229
  }, [columnGroupingModel, reorderedColumns]);
3397
- const columns = useMemo8(() => {
3398
- const baseColumns = reorderedColumns.length > 0 ? reorderedColumns : (
3399
- // fallback
3400
- Object.keys(rows[0] || {}).map((key) => ({
3401
- field: key
3402
- }))
3403
- );
3230
+ const columns = useMemo9(() => {
3231
+ const baseColumns = reorderedColumns.length > 0 ? reorderedColumns : Object.keys(rows[0] || {}).map((key) => ({
3232
+ field: key
3233
+ }));
3404
3234
  return baseColumns.map((column) => {
3405
3235
  const isLeftPinned = pinnedColumns?.left?.includes(column.field);
3406
3236
  const isRightPinned = pinnedColumns?.right?.includes(column.field);
@@ -3415,7 +3245,6 @@ function useDataTableRenderer({
3415
3245
  isPinned,
3416
3246
  isLastStartPinnedColumn: isLeftPinned && [...pinnedColumns?.left || []].pop() === column.field,
3417
3247
  isLastEndPinnedColumn: isRightPinned && (pinnedColumns?.right?.[0] ?? null) === column.field,
3418
- // pinned 관련 계산부
3419
3248
  pinnedStartPosition: pinnedColumns?.left?.slice(0, isLeftPinned ? pinnedColumns.left.indexOf(column.field) : pinnedColumns.left.length).reduce((acc, curr) => acc + getWidth(curr), 0),
3420
3249
  pinnedEndPosition: pinnedColumns?.right?.slice(isRightPinned ? pinnedColumns.right.indexOf(column.field) + 1 : 0).reduce((acc, curr) => acc + getWidth(curr), 0)
3421
3250
  };
@@ -3487,7 +3316,6 @@ function useDataTableRenderer({
3487
3316
  dataInPage,
3488
3317
  handleSortChange,
3489
3318
  isAllSelected,
3490
- // all rows are selected on this page
3491
3319
  isTotalSelected,
3492
3320
  isSelectedRow: useCallback9((model) => selectedModelSet.has(model), [selectedModelSet]),
3493
3321
  isRowSelectable: useCallback9(
@@ -3527,6 +3355,216 @@ function useDataTableRenderer({
3527
3355
  }, [isTotalSelected, rows, onSelectionModelChange, getId, isRowSelectable])
3528
3356
  };
3529
3357
  }
3358
+
3359
+ // src/components/Table/Table.tsx
3360
+ import React23 from "react";
3361
+ import { Table as JoyTable } from "@mui/joy";
3362
+ var Table = (props) => {
3363
+ const { children, ...inheritProps } = props;
3364
+ return /* @__PURE__ */ React23.createElement(JoyTable, { ...inheritProps }, children);
3365
+ };
3366
+ Table.displayName = "Table";
3367
+ function TableHead(props) {
3368
+ const {
3369
+ headCells,
3370
+ showCheckbox,
3371
+ onCheckboxChange,
3372
+ slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
3373
+ slotProps: { checkbox: checkboxProps = {} } = {}
3374
+ } = props;
3375
+ return /* @__PURE__ */ React23.createElement("thead", null, /* @__PURE__ */ React23.createElement("tr", null, showCheckbox && /* @__PURE__ */ React23.createElement(
3376
+ "th",
3377
+ {
3378
+ style: {
3379
+ width: "40px",
3380
+ textAlign: "center"
3381
+ }
3382
+ },
3383
+ /* @__PURE__ */ React23.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
3384
+ ), headCells.map((headCell) => /* @__PURE__ */ React23.createElement(
3385
+ "th",
3386
+ {
3387
+ key: headCell.label,
3388
+ style: {
3389
+ width: headCell.width,
3390
+ minWidth: headCell.minWidth,
3391
+ maxWidth: headCell.maxWidth,
3392
+ textAlign: headCell.numeric ? "right" : "left"
3393
+ }
3394
+ },
3395
+ headCell.label
3396
+ ))));
3397
+ }
3398
+ TableHead.displayName = "TableHead";
3399
+ function TableBody(props) {
3400
+ const {
3401
+ rows,
3402
+ cellOrder,
3403
+ rowOptions,
3404
+ showCheckbox,
3405
+ onCheckboxChange,
3406
+ slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
3407
+ slotProps: { checkbox: checkboxProps = {} } = {}
3408
+ } = props;
3409
+ return /* @__PURE__ */ React23.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React23.createElement("tr", { key: `table-row-${rowIndex}` }, showCheckbox && /* @__PURE__ */ React23.createElement(
3410
+ "td",
3411
+ {
3412
+ style: {
3413
+ textAlign: "center"
3414
+ }
3415
+ },
3416
+ /* @__PURE__ */ React23.createElement(RenderCheckbox, { onChange: (event) => onCheckboxChange?.(event, rowIndex), ...checkboxProps })
3417
+ ), cellOrder.map((cellKey) => /* @__PURE__ */ React23.createElement(
3418
+ "td",
3419
+ {
3420
+ key: cellKey,
3421
+ style: {
3422
+ textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
3423
+ }
3424
+ },
3425
+ row[cellKey]
3426
+ )))));
3427
+ }
3428
+ TableBody.displayName = "TableBody";
3429
+
3430
+ // src/components/Pagination/Pagination.tsx
3431
+ import React24, { useCallback as useCallback10, useEffect as useEffect6 } from "react";
3432
+ import PreviousIcon from "@mui/icons-material/ChevronLeft";
3433
+ import NextIcon from "@mui/icons-material/ChevronRight";
3434
+ import { styled as styled13 } from "@mui/joy";
3435
+ var PaginationButton = styled13(Button_default, {
3436
+ name: "Pagination",
3437
+ slot: "button"
3438
+ })(({ theme, active, size }) => ({
3439
+ "--Button-size": {
3440
+ sm: "32px",
3441
+ md: "40px",
3442
+ lg: "48px"
3443
+ }[size],
3444
+ width: "var(--Button-size)",
3445
+ height: "var(--Button-size)",
3446
+ backgroundColor: active ? theme.vars.palette.primary.softHoverBg : "transparent",
3447
+ color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.plainColor,
3448
+ "&:hover": {
3449
+ color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.softColor,
3450
+ backgroundColor: active ? theme.vars.palette.primary.softActiveBg : theme.vars.palette.neutral.softHoverBg
3451
+ }
3452
+ }));
3453
+ var PaginationIconButton = styled13(IconButton_default, {
3454
+ name: "Pagination",
3455
+ slot: "button"
3456
+ })(({ theme, size }) => ({
3457
+ "--IconButton-size": {
3458
+ sm: "32px",
3459
+ md: "40px",
3460
+ lg: "48px"
3461
+ }[size],
3462
+ "--Icon-fontSize": "20px",
3463
+ width: "var(--IconButton-size)",
3464
+ height: "var(--IconButton-size)",
3465
+ color: theme.vars.palette.neutral.plainColor,
3466
+ "&:hover": {
3467
+ color: theme.vars.palette.neutral.softColor,
3468
+ backgroundColor: theme.vars.palette.neutral.softHoverBg
3469
+ }
3470
+ }));
3471
+ var PaginationRoot = styled13(Stack_default, {
3472
+ name: "Pagination",
3473
+ slot: "root"
3474
+ })({});
3475
+ var PaginationContainer = styled13(Stack_default, {
3476
+ name: "Pagination",
3477
+ slot: "container"
3478
+ })(({ theme, size }) => ({
3479
+ gap: {
3480
+ sm: theme.spacing(1),
3481
+ md: theme.spacing(1.5),
3482
+ lg: theme.spacing(2)
3483
+ }[size]
3484
+ }));
3485
+ function Pagination(props) {
3486
+ const {
3487
+ paginationModel: _paginationModel,
3488
+ defaultPaginationModel = { page: 1, pageSize: 25 },
3489
+ onPageChange,
3490
+ rowCount,
3491
+ size = "md",
3492
+ ...innerProps
3493
+ } = props;
3494
+ const [paginationModel, setPaginationModel] = useControlledState(
3495
+ _paginationModel,
3496
+ defaultPaginationModel,
3497
+ useCallback10(
3498
+ (newPage) => {
3499
+ onPageChange(newPage.page);
3500
+ },
3501
+ [onPageChange]
3502
+ )
3503
+ );
3504
+ const handlePageChange = (newPage) => {
3505
+ setPaginationModel({ ...paginationModel, page: newPage });
3506
+ };
3507
+ const firstPage = 1;
3508
+ const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
3509
+ const beforePages = [paginationModel.page - 2, paginationModel.page - 1].filter((p) => p > 1);
3510
+ const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
3511
+ const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
3512
+ const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
3513
+ useEffect6(() => {
3514
+ if (paginationModel.page > lastPage) {
3515
+ setPaginationModel({ ...paginationModel, page: lastPage });
3516
+ }
3517
+ }, [rowCount, paginationModel, lastPage, setPaginationModel]);
3518
+ return /* @__PURE__ */ React24.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React24.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React24.createElement(
3519
+ PaginationIconButton,
3520
+ {
3521
+ size,
3522
+ variant: "plain",
3523
+ color: "neutral",
3524
+ onClick: () => handlePageChange(paginationModel.page - 1),
3525
+ disabled: paginationModel.page === firstPage,
3526
+ "aria-label": "Previous page"
3527
+ },
3528
+ /* @__PURE__ */ React24.createElement(PreviousIcon, null)
3529
+ ), paginationModel.page !== firstPage && /* @__PURE__ */ React24.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ React24.createElement(
3530
+ PaginationButton,
3531
+ {
3532
+ size,
3533
+ variant: "plain",
3534
+ color: "neutral",
3535
+ onClick: () => handlePageChange(paginationModel.page - 3),
3536
+ "aria-label": "More previous pages"
3537
+ },
3538
+ "..."
3539
+ ), beforePages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React24.createElement(PaginationButton, { active: "true", 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(
3540
+ PaginationButton,
3541
+ {
3542
+ size,
3543
+ variant: "plain",
3544
+ color: "neutral",
3545
+ "aria-label": "More next pages",
3546
+ onClick: () => handlePageChange(paginationModel.page + 3)
3547
+ },
3548
+ "..."
3549
+ ), paginationModel.page !== lastPage && /* @__PURE__ */ React24.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ React24.createElement(
3550
+ PaginationIconButton,
3551
+ {
3552
+ size,
3553
+ variant: "plain",
3554
+ color: "neutral",
3555
+ onClick: () => handlePageChange(paginationModel.page + 1),
3556
+ disabled: paginationModel.page === lastPage,
3557
+ "aria-label": "Next page"
3558
+ },
3559
+ /* @__PURE__ */ React24.createElement(NextIcon, null)
3560
+ )));
3561
+ }
3562
+ Pagination.displayName = "Pagination";
3563
+
3564
+ // src/components/Pagination/index.ts
3565
+ var Pagination_default = Pagination;
3566
+
3567
+ // src/components/DataTable/DataTable.tsx
3530
3568
  function Component(props, apiRef) {
3531
3569
  const {
3532
3570
  rows,
@@ -3574,8 +3612,8 @@ function Component(props, apiRef) {
3574
3612
  ...innerProps
3575
3613
  } = props;
3576
3614
  const tableId = useId();
3577
- const parentRef = useRef4(null);
3578
- const tableBodyRef = useRef4(null);
3615
+ const parentRef = useRef6(null);
3616
+ const tableBodyRef = useRef6(null);
3579
3617
  const {
3580
3618
  columns,
3581
3619
  processedColumnGroups,
@@ -3606,29 +3644,29 @@ function Component(props, apiRef) {
3606
3644
  measureElement: (element) => element.clientHeight,
3607
3645
  overscan: 10
3608
3646
  });
3609
- const paginationModel = useMemo8(() => ({ page, pageSize }), [page, pageSize]);
3647
+ const paginationModel = useMemo10(() => ({ page, pageSize }), [page, pageSize]);
3610
3648
  const totalSize = virtualizer.getTotalSize();
3611
3649
  const virtualizedItems = virtualizer.getVirtualItems();
3612
- const getRowClickHandler = useCallback9(
3650
+ const getRowClickHandler = useCallback11(
3613
3651
  (row, rowId) => (e) => {
3614
3652
  onRowClick?.({ row, rowId }, e);
3615
3653
  checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
3616
3654
  },
3617
3655
  [onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
3618
3656
  );
3619
- const getRowFocusHandler = useCallback9(
3657
+ const getRowFocusHandler = useCallback11(
3620
3658
  (rowId) => () => {
3621
3659
  onRowFocus(rowId);
3622
3660
  },
3623
3661
  [onRowFocus]
3624
3662
  );
3625
- const getCheckboxClickHandler = useCallback9(
3663
+ const getCheckboxClickHandler = useCallback11(
3626
3664
  () => (e) => {
3627
3665
  e.stopPropagation();
3628
3666
  },
3629
3667
  []
3630
3668
  );
3631
- const getCheckboxChangeHandler = useCallback9(
3669
+ const getCheckboxChangeHandler = useCallback11(
3632
3670
  (rowId, row) => (e) => {
3633
3671
  if (isRowSelectableCheck(rowId, row)) {
3634
3672
  onCheckboxChange(e, rowId);
@@ -3652,7 +3690,7 @@ function Component(props, apiRef) {
3652
3690
  });
3653
3691
  }
3654
3692
  }));
3655
- return /* @__PURE__ */ React23.createElement(
3693
+ return /* @__PURE__ */ React25.createElement(
3656
3694
  Box_default,
3657
3695
  {
3658
3696
  sx: {
@@ -3662,7 +3700,7 @@ function Component(props, apiRef) {
3662
3700
  flexDirection: "column"
3663
3701
  }
3664
3702
  },
3665
- (!!checkboxSelection || !!Toolbar) && /* @__PURE__ */ React23.createElement(
3703
+ (!!checkboxSelection || !!Toolbar) && /* @__PURE__ */ React25.createElement(
3666
3704
  Stack_default,
3667
3705
  {
3668
3706
  direction: "row",
@@ -3672,10 +3710,10 @@ function Component(props, apiRef) {
3672
3710
  justifyContent: "space-between",
3673
3711
  alignItems: "center"
3674
3712
  },
3675
- !!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"))),
3676
- Toolbar && /* @__PURE__ */ React23.createElement(Toolbar, { ...toolbarProps || {} })
3713
+ !!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"))),
3714
+ Toolbar && /* @__PURE__ */ React25.createElement(Toolbar, { ...toolbarProps || {} })
3677
3715
  ),
3678
- /* @__PURE__ */ React23.createElement(
3716
+ /* @__PURE__ */ React25.createElement(
3679
3717
  Sheet_default,
3680
3718
  {
3681
3719
  variant: "outlined",
@@ -3696,14 +3734,14 @@ function Component(props, apiRef) {
3696
3734
  ref: parentRef,
3697
3735
  ...backgroundProps
3698
3736
  },
3699
- /* @__PURE__ */ React23.createElement(Table, { ...innerProps }, /* @__PURE__ */ React23.createElement("colgroup", null, checkboxSelection && /* @__PURE__ */ React23.createElement(
3737
+ /* @__PURE__ */ React25.createElement(Table, { ...innerProps }, /* @__PURE__ */ React25.createElement("colgroup", null, checkboxSelection && /* @__PURE__ */ React25.createElement(
3700
3738
  "col",
3701
3739
  {
3702
3740
  style: {
3703
3741
  width: "40px"
3704
3742
  }
3705
3743
  }
3706
- ), columns.map((c) => /* @__PURE__ */ React23.createElement(
3744
+ ), columns.map((c) => /* @__PURE__ */ React25.createElement(
3707
3745
  "col",
3708
3746
  {
3709
3747
  ref: c.tableColRef,
@@ -3712,7 +3750,7 @@ function Component(props, apiRef) {
3712
3750
  width: c.width
3713
3751
  }
3714
3752
  }
3715
- ))), /* @__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(
3753
+ ))), /* @__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(
3716
3754
  "th",
3717
3755
  {
3718
3756
  rowSpan: processedColumnGroups.maxLevel + 2,
@@ -3722,7 +3760,7 @@ function Component(props, apiRef) {
3722
3760
  verticalAlign: "middle"
3723
3761
  }
3724
3762
  },
3725
- /* @__PURE__ */ React23.createElement(
3763
+ /* @__PURE__ */ React25.createElement(
3726
3764
  RenderCheckbox,
3727
3765
  {
3728
3766
  onChange: onAllCheckboxChange,
@@ -3732,10 +3770,12 @@ function Component(props, apiRef) {
3732
3770
  ...checkboxProps
3733
3771
  }
3734
3772
  )
3735
- ), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */ React23.createElement("th", { key: `empty-${level}-${i}` })), levelGroups.map((group, groupIndex) => {
3773
+ ), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */ React25.createElement("th", { key: `empty-${level}-${i}` })), levelGroups.map((group, groupIndex) => {
3736
3774
  const nextGroup = levelGroups[groupIndex + 1];
3737
3775
  const emptyCells = nextGroup ? nextGroup.startIndex - (group.startIndex + group.colspan) : columns.length - (group.startIndex + group.colspan);
3738
- return /* @__PURE__ */ React23.createElement(Fragment2, { key: group.groupId }, /* @__PURE__ */ React23.createElement(
3776
+ const params = { groupId: group.groupId };
3777
+ const computedHeaderClassName = group.headerClassName ? typeof group.headerClassName === "function" ? group.headerClassName(params) : group.headerClassName : void 0;
3778
+ return /* @__PURE__ */ React25.createElement(Fragment2, { key: group.groupId }, /* @__PURE__ */ React25.createElement(
3739
3779
  "th",
3740
3780
  {
3741
3781
  colSpan: group.colspan,
@@ -3743,11 +3783,12 @@ function Component(props, apiRef) {
3743
3783
  textAlign: "center",
3744
3784
  fontWeight: "bold",
3745
3785
  verticalAlign: "middle"
3746
- }
3786
+ },
3787
+ className: computedHeaderClassName
3747
3788
  },
3748
3789
  group.headerName ?? group.groupId
3749
- ), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */ React23.createElement("th", { key: `empty-between-${level}-${groupIndex}-${i}`, colSpan: 1 })));
3750
- }))), /* @__PURE__ */ React23.createElement("tr", null, !processedColumnGroups && checkboxSelection && /* @__PURE__ */ React23.createElement(
3790
+ ), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */ React25.createElement("th", { key: `empty-between-${level}-${groupIndex}-${i}`, colSpan: 1 })));
3791
+ }))), /* @__PURE__ */ React25.createElement("tr", null, !processedColumnGroups && checkboxSelection && /* @__PURE__ */ React25.createElement(
3751
3792
  "th",
3752
3793
  {
3753
3794
  style: {
@@ -3755,7 +3796,7 @@ function Component(props, apiRef) {
3755
3796
  textAlign: "center"
3756
3797
  }
3757
3798
  },
3758
- /* @__PURE__ */ React23.createElement(
3799
+ /* @__PURE__ */ React25.createElement(
3759
3800
  RenderCheckbox,
3760
3801
  {
3761
3802
  onChange: onAllCheckboxChange,
@@ -3767,7 +3808,7 @@ function Component(props, apiRef) {
3767
3808
  )
3768
3809
  ), columns.map((c, i) => (
3769
3810
  // @ts-ignore
3770
- /* @__PURE__ */ React23.createElement(
3811
+ /* @__PURE__ */ React25.createElement(
3771
3812
  HeadCell2,
3772
3813
  {
3773
3814
  tableId,
@@ -3778,7 +3819,7 @@ function Component(props, apiRef) {
3778
3819
  ...c
3779
3820
  }
3780
3821
  )
3781
- )))), /* @__PURE__ */ React23.createElement(
3822
+ )))), /* @__PURE__ */ React25.createElement(
3782
3823
  VirtualizedTableBody,
3783
3824
  {
3784
3825
  ref: tableBodyRef,
@@ -3788,7 +3829,7 @@ function Component(props, apiRef) {
3788
3829
  role: "rowgroup",
3789
3830
  "aria-label": "DataTableBody"
3790
3831
  },
3791
- !!loading && /* @__PURE__ */ React23.createElement(OverlayWrapper, null, /* @__PURE__ */ React23.createElement(
3832
+ !!loading && /* @__PURE__ */ React25.createElement(OverlayWrapper, null, /* @__PURE__ */ React25.createElement(
3792
3833
  "td",
3793
3834
  {
3794
3835
  style: {
@@ -3797,7 +3838,7 @@ function Component(props, apiRef) {
3797
3838
  overflow: "visible"
3798
3839
  }
3799
3840
  },
3800
- /* @__PURE__ */ React23.createElement(
3841
+ /* @__PURE__ */ React25.createElement(
3801
3842
  Box_default,
3802
3843
  {
3803
3844
  sx: {
@@ -3807,7 +3848,7 @@ function Component(props, apiRef) {
3807
3848
  right: 0
3808
3849
  }
3809
3850
  },
3810
- /* @__PURE__ */ React23.createElement(LoadingOverlay, null)
3851
+ /* @__PURE__ */ React25.createElement(LoadingOverlay, null)
3811
3852
  )
3812
3853
  )),
3813
3854
  virtualizedItems.map((virtualizedRow, index) => {
@@ -3815,7 +3856,7 @@ function Component(props, apiRef) {
3815
3856
  const row = dataInPage[rowIndex];
3816
3857
  const rowId = getId(row, rowIndex);
3817
3858
  const striped = stripe && (stripe === "even" && (rowIndex + 1) % 2 === 0 || stripe === "odd" && (rowIndex + 1) % 2 === 1);
3818
- return /* @__PURE__ */ React23.createElement(
3859
+ return /* @__PURE__ */ React25.createElement(
3819
3860
  VirtualizedTableRow,
3820
3861
  {
3821
3862
  key: virtualizedRow.key,
@@ -3833,7 +3874,7 @@ function Component(props, apiRef) {
3833
3874
  transform: `translateY(${virtualizedRow.start - index * virtualizedRow.size}px)`
3834
3875
  }
3835
3876
  },
3836
- checkboxSelection && /* @__PURE__ */ React23.createElement(
3877
+ checkboxSelection && /* @__PURE__ */ React25.createElement(
3837
3878
  "th",
3838
3879
  {
3839
3880
  scope: "row",
@@ -3841,7 +3882,7 @@ function Component(props, apiRef) {
3841
3882
  textAlign: "center"
3842
3883
  }
3843
3884
  },
3844
- /* @__PURE__ */ React23.createElement(
3885
+ /* @__PURE__ */ React25.createElement(
3845
3886
  RenderCheckbox,
3846
3887
  {
3847
3888
  onClick: getCheckboxClickHandler(),
@@ -3852,7 +3893,7 @@ function Component(props, apiRef) {
3852
3893
  }
3853
3894
  )
3854
3895
  ),
3855
- /* @__PURE__ */ React23.createElement(
3896
+ /* @__PURE__ */ React25.createElement(
3856
3897
  BodyRow2,
3857
3898
  {
3858
3899
  tableId,
@@ -3865,9 +3906,9 @@ function Component(props, apiRef) {
3865
3906
  )
3866
3907
  );
3867
3908
  })
3868
- ), Footer && /* @__PURE__ */ React23.createElement(Footer, null))
3909
+ ), Footer && /* @__PURE__ */ React25.createElement(Footer, null))
3869
3910
  ),
3870
- pagination && /* @__PURE__ */ React23.createElement(
3911
+ pagination && /* @__PURE__ */ React25.createElement(
3871
3912
  Pagination_default,
3872
3913
  {
3873
3914
  pt: 2,
@@ -3884,12 +3925,12 @@ var DataTable = forwardRef7(Component);
3884
3925
  DataTable.displayName = "DataTable";
3885
3926
 
3886
3927
  // src/components/DateRangePicker/DateRangePicker.tsx
3887
- 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";
3928
+ 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";
3888
3929
  import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
3889
3930
  import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
3890
- import { styled as styled13, useThemeProps as useThemeProps5 } from "@mui/joy";
3931
+ import { styled as styled14, useThemeProps as useThemeProps5 } from "@mui/joy";
3891
3932
  import { FocusTrap as FocusTrap2, ClickAwayListener as ClickAwayListener2, Popper as Popper3 } from "@mui/base";
3892
- var CalendarButton2 = styled13(IconButton_default, {
3933
+ var CalendarButton2 = styled14(IconButton_default, {
3893
3934
  name: "DateRangePicker",
3894
3935
  slot: "calendarButton"
3895
3936
  })(({ theme }) => ({
@@ -3899,13 +3940,13 @@ var CalendarButton2 = styled13(IconButton_default, {
3899
3940
  outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
3900
3941
  }
3901
3942
  }));
3902
- var StyledPopper2 = styled13(Popper3, {
3943
+ var StyledPopper2 = styled14(Popper3, {
3903
3944
  name: "DateRangePicker",
3904
3945
  slot: "popper"
3905
3946
  })(({ theme }) => ({
3906
3947
  zIndex: theme.zIndex.tooltip
3907
3948
  }));
3908
- var CalendarSheet2 = styled13(Sheet_default, {
3949
+ var CalendarSheet2 = styled14(Sheet_default, {
3909
3950
  name: "DateRangePicker",
3910
3951
  slot: "sheet",
3911
3952
  overridesResolver: (props, styles) => styles.root
@@ -3915,7 +3956,7 @@ var CalendarSheet2 = styled13(Sheet_default, {
3915
3956
  boxShadow: theme.shadow.md,
3916
3957
  borderRadius: theme.radius.md
3917
3958
  }));
3918
- var DateRangePickerRoot = styled13("div", {
3959
+ var DateRangePickerRoot = styled14("div", {
3919
3960
  name: "DateRangePicker",
3920
3961
  slot: "root",
3921
3962
  overridesResolver: (props, styles) => styles.root
@@ -3985,9 +4026,9 @@ var parseDates = (str, format) => {
3985
4026
  var formatToPattern2 = (format) => {
3986
4027
  return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
3987
4028
  };
3988
- var TextMaskAdapter5 = React24.forwardRef(function TextMaskAdapter6(props, ref) {
4029
+ var TextMaskAdapter5 = React26.forwardRef(function TextMaskAdapter6(props, ref) {
3989
4030
  const { onChange, format, ...other } = props;
3990
- return /* @__PURE__ */ React24.createElement(
4031
+ return /* @__PURE__ */ React26.createElement(
3991
4032
  IMaskInput2,
3992
4033
  {
3993
4034
  ...other,
@@ -4045,23 +4086,23 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4045
4086
  readOnly,
4046
4087
  ...innerProps
4047
4088
  } = props;
4048
- const innerRef = useRef5(null);
4049
- const buttonRef = useRef5(null);
4089
+ const innerRef = useRef7(null);
4090
+ const buttonRef = useRef7(null);
4050
4091
  const [value, setValue] = useControlledState(
4051
4092
  props.value,
4052
4093
  props.defaultValue || "",
4053
- useCallback10((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4094
+ useCallback12((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
4054
4095
  );
4055
- const [displayValue, setDisplayValue] = useState7(
4096
+ const [displayValue, setDisplayValue] = useState8(
4056
4097
  () => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
4057
4098
  );
4058
- const [anchorEl, setAnchorEl] = useState7(null);
4099
+ const [anchorEl, setAnchorEl] = useState8(null);
4059
4100
  const open = Boolean(anchorEl);
4060
- const calendarValue = useMemo9(
4101
+ const calendarValue = useMemo11(
4061
4102
  () => value ? parseDates(value, format) : void 0,
4062
4103
  [value, format]
4063
4104
  );
4064
- useEffect6(() => {
4105
+ useEffect7(() => {
4065
4106
  if (value) {
4066
4107
  try {
4067
4108
  const dates = parseDates(value, format);
@@ -4073,13 +4114,13 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4073
4114
  setDisplayValue("");
4074
4115
  }
4075
4116
  }, [displayFormat, value, format]);
4076
- useEffect6(() => {
4117
+ useEffect7(() => {
4077
4118
  if (!anchorEl) {
4078
4119
  innerRef.current?.blur();
4079
4120
  }
4080
4121
  }, [anchorEl, innerRef]);
4081
4122
  useImperativeHandle3(ref, () => innerRef.current, [innerRef]);
4082
- const handleChange = useCallback10(
4123
+ const handleChange = useCallback12(
4083
4124
  (event) => {
4084
4125
  const value2 = event.target.value;
4085
4126
  setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat) : value2);
@@ -4087,7 +4128,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4087
4128
  },
4088
4129
  [displayFormat, format, setValue]
4089
4130
  );
4090
- const handleDisplayInputChange = useCallback10(
4131
+ const handleDisplayInputChange = useCallback12(
4091
4132
  (event) => {
4092
4133
  if (event.target.value === "") {
4093
4134
  handleChange({
@@ -4112,14 +4153,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4112
4153
  },
4113
4154
  [displayFormat, format, handleChange, props.name]
4114
4155
  );
4115
- const handleCalendarToggle = useCallback10(
4156
+ const handleCalendarToggle = useCallback12(
4116
4157
  (event) => {
4117
4158
  setAnchorEl(anchorEl ? null : event.currentTarget);
4118
4159
  innerRef.current?.focus();
4119
4160
  },
4120
4161
  [anchorEl, setAnchorEl, innerRef]
4121
4162
  );
4122
- const handleCalendarChange = useCallback10(
4163
+ const handleCalendarChange = useCallback12(
4123
4164
  ([date1, date2]) => {
4124
4165
  if (!date1 || !date2) return;
4125
4166
  const formattedValue = formatValueString2([date1, date2], format);
@@ -4133,7 +4174,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4133
4174
  },
4134
4175
  [props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat]
4135
4176
  );
4136
- const handleInputMouseDown = useCallback10(
4177
+ const handleInputMouseDown = useCallback12(
4137
4178
  (event) => {
4138
4179
  if (inputReadOnly) {
4139
4180
  event.preventDefault();
@@ -4142,7 +4183,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4142
4183
  },
4143
4184
  [inputReadOnly, buttonRef]
4144
4185
  );
4145
- return /* @__PURE__ */ React24.createElement(DateRangePickerRoot, null, /* @__PURE__ */ React24.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
4186
+ return /* @__PURE__ */ React26.createElement(DateRangePickerRoot, null, /* @__PURE__ */ React26.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
4146
4187
  Input_default,
4147
4188
  {
4148
4189
  ...innerProps,
@@ -4170,7 +4211,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4170
4211
  error,
4171
4212
  className,
4172
4213
  sx,
4173
- endDecorator: /* @__PURE__ */ React24.createElement(
4214
+ endDecorator: /* @__PURE__ */ React26.createElement(
4174
4215
  CalendarButton2,
4175
4216
  {
4176
4217
  ref: buttonRef,
@@ -4182,13 +4223,13 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4182
4223
  "aria-expanded": open,
4183
4224
  disabled
4184
4225
  },
4185
- /* @__PURE__ */ React24.createElement(CalendarTodayIcon2, null)
4226
+ /* @__PURE__ */ React26.createElement(CalendarTodayIcon2, null)
4186
4227
  ),
4187
4228
  label,
4188
4229
  helperText,
4189
4230
  readOnly: readOnly || inputReadOnly
4190
4231
  }
4191
- ), open && /* @__PURE__ */ React24.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React24.createElement(
4232
+ ), open && /* @__PURE__ */ React26.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React26.createElement(
4192
4233
  StyledPopper2,
4193
4234
  {
4194
4235
  id: "date-range-picker-popper",
@@ -4207,7 +4248,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4207
4248
  "aria-label": "Calendar Tooltip",
4208
4249
  "aria-expanded": open
4209
4250
  },
4210
- /* @__PURE__ */ React24.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React24.createElement(
4251
+ /* @__PURE__ */ React26.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React26.createElement(
4211
4252
  Calendar_default,
4212
4253
  {
4213
4254
  rangeSelection: true,
@@ -4218,14 +4259,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4218
4259
  disableFuture,
4219
4260
  disablePast
4220
4261
  }
4221
- ), !hideClearButton && /* @__PURE__ */ React24.createElement(
4262
+ ), !hideClearButton && /* @__PURE__ */ React26.createElement(
4222
4263
  DialogActions_default,
4223
4264
  {
4224
4265
  sx: {
4225
4266
  p: 1
4226
4267
  }
4227
4268
  },
4228
- /* @__PURE__ */ React24.createElement(
4269
+ /* @__PURE__ */ React26.createElement(
4229
4270
  Button_default,
4230
4271
  {
4231
4272
  size,
@@ -4245,10 +4286,10 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
4245
4286
  DateRangePicker.displayName = "DateRangePicker";
4246
4287
 
4247
4288
  // src/components/DialogContent/DialogContent.tsx
4248
- import { DialogContent as JoyDialogContent, styled as styled14 } from "@mui/joy";
4289
+ import { DialogContent as JoyDialogContent, styled as styled15 } from "@mui/joy";
4249
4290
  import { motion as motion22 } from "framer-motion";
4250
4291
  var MotionDialogContent = motion22(JoyDialogContent);
4251
- var StyledDialogContent = styled14(MotionDialogContent)(({ theme }) => ({
4292
+ var StyledDialogContent = styled15(MotionDialogContent)(({ theme }) => ({
4252
4293
  padding: theme.spacing(0, 6, 5)
4253
4294
  }));
4254
4295
  var DialogContent = StyledDialogContent;
@@ -4258,10 +4299,10 @@ DialogContent.displayName = "DialogContent";
4258
4299
  var DialogContent_default = DialogContent;
4259
4300
 
4260
4301
  // src/components/DialogTitle/DialogTitle.tsx
4261
- import { DialogTitle as JoyDialogTitle, styled as styled15 } from "@mui/joy";
4302
+ import { DialogTitle as JoyDialogTitle, styled as styled16 } from "@mui/joy";
4262
4303
  import { motion as motion23 } from "framer-motion";
4263
4304
  var MotionDialogTitle = motion23(JoyDialogTitle);
4264
- var StyledDialogTitle = styled15(MotionDialogTitle)(({ theme }) => ({
4305
+ var StyledDialogTitle = styled16(MotionDialogTitle)(({ theme }) => ({
4265
4306
  padding: theme.spacing(4, 6)
4266
4307
  }));
4267
4308
  var DialogTitle = StyledDialogTitle;
@@ -4271,22 +4312,22 @@ DialogTitle.displayName = "DialogTitle";
4271
4312
  var DialogTitle_default = DialogTitle;
4272
4313
 
4273
4314
  // src/components/DialogFrame/DialogFrame.tsx
4274
- import React26 from "react";
4315
+ import React28 from "react";
4275
4316
 
4276
4317
  // src/components/Modal/Modal.tsx
4277
- import React25 from "react";
4318
+ import React27 from "react";
4278
4319
  import {
4279
4320
  Modal as JoyModal,
4280
4321
  ModalDialog as JoyModalDialog,
4281
4322
  ModalClose as JoyModalClose,
4282
4323
  ModalOverflow as JoyModalOverflow,
4283
- styled as styled16
4324
+ styled as styled17
4284
4325
  } from "@mui/joy";
4285
4326
  import { motion as motion24 } from "framer-motion";
4286
4327
  var MotionModal = motion24(JoyModal);
4287
4328
  var Modal = MotionModal;
4288
4329
  Modal.displayName = "Modal";
4289
- var StyledModalDialog = styled16(JoyModalDialog)({
4330
+ var StyledModalDialog = styled17(JoyModalDialog)({
4290
4331
  padding: 0
4291
4332
  });
4292
4333
  var ModalDialog = StyledModalDialog;
@@ -4297,37 +4338,37 @@ var ModalOverflow = MotionModalOverflow;
4297
4338
  ModalOverflow.displayName = "ModalOverflow";
4298
4339
  function ModalFrame(props) {
4299
4340
  const { title, children, titleStartDecorator, onClose, ...innerProps } = props;
4300
- return /* @__PURE__ */ React25.createElement(StyledModalDialog, { ...innerProps }, /* @__PURE__ */ React25.createElement(ModalClose, { onClick: onClose }), /* @__PURE__ */ React25.createElement(DialogTitle_default, null, titleStartDecorator, title), /* @__PURE__ */ React25.createElement(DialogContent_default, null, children));
4341
+ return /* @__PURE__ */ React27.createElement(StyledModalDialog, { ...innerProps }, /* @__PURE__ */ React27.createElement(ModalClose, { onClick: onClose }), /* @__PURE__ */ React27.createElement(DialogTitle_default, null, titleStartDecorator, title), /* @__PURE__ */ React27.createElement(DialogContent_default, null, children));
4301
4342
  }
4302
4343
  ModalFrame.displayName = "ModalFrame";
4303
4344
 
4304
4345
  // src/components/DialogFrame/DialogFrame.tsx
4305
- import { styled as styled17 } from "@mui/joy";
4306
- var StyledDialogFrame = styled17(ModalDialog, {
4346
+ import { styled as styled18 } from "@mui/joy";
4347
+ var StyledDialogFrame = styled18(ModalDialog, {
4307
4348
  name: "Dialog",
4308
4349
  slot: "Root"
4309
4350
  })({
4310
4351
  padding: 0
4311
4352
  });
4312
- var DialogFrame = React26.forwardRef((props, ref) => {
4353
+ var DialogFrame = React28.forwardRef((props, ref) => {
4313
4354
  const { title, children, actions, fullscreen, ...innerProps } = props;
4314
- return /* @__PURE__ */ React26.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...innerProps }, /* @__PURE__ */ React26.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React26.createElement(DialogContent_default, null, children), /* @__PURE__ */ React26.createElement(DialogActions_default, null, actions));
4355
+ return /* @__PURE__ */ React28.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...innerProps }, /* @__PURE__ */ React28.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React28.createElement(DialogContent_default, null, children), /* @__PURE__ */ React28.createElement(DialogActions_default, null, actions));
4315
4356
  });
4316
4357
  DialogFrame.displayName = "DialogFrame";
4317
4358
 
4318
4359
  // src/components/Divider/Divider.tsx
4319
- import React27 from "react";
4360
+ import React29 from "react";
4320
4361
  import { Divider as JoyDivider } from "@mui/joy";
4321
4362
  import { motion as motion25 } from "framer-motion";
4322
4363
  var MotionDivider = motion25(JoyDivider);
4323
4364
  var Divider = (props) => {
4324
- return /* @__PURE__ */ React27.createElement(MotionDivider, { ...props });
4365
+ return /* @__PURE__ */ React29.createElement(MotionDivider, { ...props });
4325
4366
  };
4326
4367
  Divider.displayName = "Divider";
4327
4368
 
4328
4369
  // src/components/InsetDrawer/InsetDrawer.tsx
4329
- import { Drawer as JoyDrawer, styled as styled18, drawerClasses } from "@mui/joy";
4330
- var InsetDrawer = styled18(JoyDrawer)(({ theme }) => ({
4370
+ import { Drawer as JoyDrawer, styled as styled19, drawerClasses } from "@mui/joy";
4371
+ var InsetDrawer = styled19(JoyDrawer)(({ theme }) => ({
4331
4372
  [`& .${drawerClasses.content}`]: {
4332
4373
  backgroundColor: "transparent",
4333
4374
  boxShadow: "none",
@@ -4342,16 +4383,16 @@ var InsetDrawer = styled18(JoyDrawer)(({ theme }) => ({
4342
4383
  }));
4343
4384
 
4344
4385
  // src/components/FilterMenu/FilterMenu.tsx
4345
- import React37, { useCallback as useCallback19 } from "react";
4386
+ import React39, { useCallback as useCallback21 } from "react";
4346
4387
  import { Button as Button2, Stack as Stack10 } from "@mui/joy";
4347
4388
 
4348
4389
  // src/components/FilterMenu/components/CheckboxGroup.tsx
4349
- import React28, { useCallback as useCallback11 } from "react";
4390
+ import React30, { useCallback as useCallback13 } from "react";
4350
4391
  import { Stack as Stack2 } from "@mui/joy";
4351
4392
  function CheckboxGroup(props) {
4352
4393
  const { id, label, options, value, onChange, hidden } = props;
4353
4394
  const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
4354
- const handleCheckboxChange = useCallback11(
4395
+ const handleCheckboxChange = useCallback13(
4355
4396
  (optionValue) => (event) => {
4356
4397
  const checked = event.target.checked;
4357
4398
  let newValue;
@@ -4367,7 +4408,7 @@ function CheckboxGroup(props) {
4367
4408
  if (hidden) {
4368
4409
  return null;
4369
4410
  }
4370
- return /* @__PURE__ */ React28.createElement(Stack2, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React28.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), options.map((option) => /* @__PURE__ */ React28.createElement(
4411
+ return /* @__PURE__ */ React30.createElement(Stack2, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React30.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), options.map((option) => /* @__PURE__ */ React30.createElement(
4371
4412
  Checkbox_default,
4372
4413
  {
4373
4414
  key: `${id}-${option.value}`,
@@ -4380,7 +4421,7 @@ function CheckboxGroup(props) {
4380
4421
  CheckboxGroup.displayName = "CheckboxGroup";
4381
4422
 
4382
4423
  // src/components/FilterMenu/components/RadioGroup.tsx
4383
- import React29, { useCallback as useCallback12 } from "react";
4424
+ import React31, { useCallback as useCallback14 } from "react";
4384
4425
 
4385
4426
  // src/components/Radio/Radio.tsx
4386
4427
  import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
@@ -4397,7 +4438,7 @@ import { Stack as Stack3 } from "@mui/joy";
4397
4438
  function RadioGroup2(props) {
4398
4439
  const { id, label, options, value, onChange, hidden } = props;
4399
4440
  const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
4400
- const handleRadioChange = useCallback12(
4441
+ const handleRadioChange = useCallback14(
4401
4442
  (event) => {
4402
4443
  const newValue = event.target.value;
4403
4444
  const option = options.find((opt) => opt.value.toString() === newValue);
@@ -4409,12 +4450,12 @@ function RadioGroup2(props) {
4409
4450
  if (hidden) {
4410
4451
  return null;
4411
4452
  }
4412
- return /* @__PURE__ */ React29.createElement(Stack3, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React29.createElement(Stack3, { spacing: 1 }, /* @__PURE__ */ React29.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label)), /* @__PURE__ */ React29.createElement(RadioGroup, { name: id, value: internalValue?.toString(), onChange: handleRadioChange }, options.map((option) => /* @__PURE__ */ React29.createElement(Radio, { key: `${id}-${option.value}`, value: option.value.toString(), label: option.label }))));
4453
+ return /* @__PURE__ */ React31.createElement(Stack3, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React31.createElement(Stack3, { spacing: 1 }, /* @__PURE__ */ React31.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label)), /* @__PURE__ */ React31.createElement(RadioGroup, { name: id, value: internalValue?.toString(), onChange: handleRadioChange }, options.map((option) => /* @__PURE__ */ React31.createElement(Radio, { key: `${id}-${option.value}`, value: option.value.toString(), label: option.label }))));
4413
4454
  }
4414
4455
  RadioGroup2.displayName = "RadioGroup";
4415
4456
 
4416
4457
  // src/components/FilterMenu/components/DateRange.tsx
4417
- import React30, { useCallback as useCallback13, useMemo as useMemo10, useState as useState8, useEffect as useEffect7 } from "react";
4458
+ import React32, { useCallback as useCallback15, useMemo as useMemo12, useState as useState9, useEffect as useEffect8 } from "react";
4418
4459
  import { Stack as Stack4 } from "@mui/joy";
4419
4460
  function DateRange(props) {
4420
4461
  const {
@@ -4433,8 +4474,8 @@ function DateRange(props) {
4433
4474
  hideClearButton
4434
4475
  } = props;
4435
4476
  const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
4436
- const [selectedOption, setSelectedOption] = useState8("all-time");
4437
- const dateRangeOptions = useMemo10(
4477
+ const [selectedOption, setSelectedOption] = useState9("all-time");
4478
+ const dateRangeOptions = useMemo12(
4438
4479
  () => [
4439
4480
  { label: "All Time", value: "all-time" },
4440
4481
  { label: "This Month", value: "this-month" },
@@ -4444,7 +4485,7 @@ function DateRange(props) {
4444
4485
  ],
4445
4486
  []
4446
4487
  );
4447
- const getDateRangeForOption = useCallback13(
4488
+ const getDateRangeForOption = useCallback15(
4448
4489
  (option) => {
4449
4490
  const now = /* @__PURE__ */ new Date();
4450
4491
  const currentYear = now.getFullYear();
@@ -4483,7 +4524,7 @@ function DateRange(props) {
4483
4524
  },
4484
4525
  [internalValue]
4485
4526
  );
4486
- const determineOptionFromValue = useCallback13(
4527
+ const determineOptionFromValue = useCallback15(
4487
4528
  (value2) => {
4488
4529
  if (!value2) {
4489
4530
  return "all-time";
@@ -4499,17 +4540,17 @@ function DateRange(props) {
4499
4540
  },
4500
4541
  [getDateRangeForOption]
4501
4542
  );
4502
- const customDateRangeValue = useMemo10(() => {
4543
+ const customDateRangeValue = useMemo12(() => {
4503
4544
  if (selectedOption === "custom" && internalValue) {
4504
4545
  return `${internalValue[0]} - ${internalValue[1]}`;
4505
4546
  }
4506
4547
  return "";
4507
4548
  }, [selectedOption, internalValue]);
4508
- useEffect7(() => {
4549
+ useEffect8(() => {
4509
4550
  const newOption = determineOptionFromValue(internalValue);
4510
4551
  setSelectedOption(newOption);
4511
4552
  }, [internalValue, determineOptionFromValue]);
4512
- const handleOptionChange = useCallback13(
4553
+ const handleOptionChange = useCallback15(
4513
4554
  (event) => {
4514
4555
  const newOption = event.target.value;
4515
4556
  setSelectedOption(newOption);
@@ -4518,7 +4559,7 @@ function DateRange(props) {
4518
4559
  },
4519
4560
  [getDateRangeForOption, setInternalValue]
4520
4561
  );
4521
- const handleCustomDateChange = useCallback13(
4562
+ const handleCustomDateChange = useCallback15(
4522
4563
  (event) => {
4523
4564
  const dateRangeString = event.target.value;
4524
4565
  if (dateRangeString && dateRangeString.includes(" - ")) {
@@ -4536,7 +4577,7 @@ function DateRange(props) {
4536
4577
  if (hidden) {
4537
4578
  return null;
4538
4579
  }
4539
- return /* @__PURE__ */ React30.createElement(Stack4, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React30.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React30.createElement(RadioGroup, { name: `${id}-options`, value: selectedOption, onChange: handleOptionChange }, dateRangeOptions.map((option) => /* @__PURE__ */ React30.createElement(Radio, { key: `${id}-${option.value}`, value: option.value, label: option.label }))), selectedOption === "custom" && /* @__PURE__ */ React30.createElement(
4580
+ return /* @__PURE__ */ React32.createElement(Stack4, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React32.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React32.createElement(RadioGroup, { name: `${id}-options`, value: selectedOption, onChange: handleOptionChange }, dateRangeOptions.map((option) => /* @__PURE__ */ React32.createElement(Radio, { key: `${id}-${option.value}`, value: option.value, label: option.label }))), selectedOption === "custom" && /* @__PURE__ */ React32.createElement(
4540
4581
  DateRangePicker,
4541
4582
  {
4542
4583
  value: customDateRangeValue,
@@ -4555,12 +4596,12 @@ function DateRange(props) {
4555
4596
  DateRange.displayName = "DateRange";
4556
4597
 
4557
4598
  // src/components/FilterMenu/components/CurrencyInput.tsx
4558
- import React31, { useCallback as useCallback14 } from "react";
4599
+ import React33, { useCallback as useCallback16 } from "react";
4559
4600
  import { Stack as Stack5 } from "@mui/joy";
4560
4601
  function CurrencyInput3(props) {
4561
4602
  const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
4562
4603
  const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
4563
- const handleCurrencyChange = useCallback14(
4604
+ const handleCurrencyChange = useCallback16(
4564
4605
  (event) => {
4565
4606
  const newValue = event.target.value;
4566
4607
  setInternalValue(newValue);
@@ -4570,7 +4611,7 @@ function CurrencyInput3(props) {
4570
4611
  if (hidden) {
4571
4612
  return null;
4572
4613
  }
4573
- return /* @__PURE__ */ React31.createElement(Stack5, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React31.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React31.createElement(
4614
+ return /* @__PURE__ */ React33.createElement(Stack5, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React33.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React33.createElement(
4574
4615
  CurrencyInput,
4575
4616
  {
4576
4617
  value: internalValue,
@@ -4586,14 +4627,14 @@ function CurrencyInput3(props) {
4586
4627
  CurrencyInput3.displayName = "CurrencyInput";
4587
4628
 
4588
4629
  // src/components/FilterMenu/components/CurrencyRange.tsx
4589
- import React32, { useCallback as useCallback15 } from "react";
4630
+ import React34, { useCallback as useCallback17 } from "react";
4590
4631
  import { Stack as Stack6 } from "@mui/joy";
4591
4632
  function CurrencyRange(props) {
4592
4633
  const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
4593
4634
  const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
4594
4635
  const minValue = internalValue?.[0];
4595
4636
  const maxValue = internalValue?.[1];
4596
- const handleMinChange = useCallback15(
4637
+ const handleMinChange = useCallback17(
4597
4638
  (event) => {
4598
4639
  const newMinValue = event.target.value;
4599
4640
  const currentMaxValue = maxValue;
@@ -4607,7 +4648,7 @@ function CurrencyRange(props) {
4607
4648
  },
4608
4649
  [maxValue, setInternalValue]
4609
4650
  );
4610
- const handleMaxChange = useCallback15(
4651
+ const handleMaxChange = useCallback17(
4611
4652
  (event) => {
4612
4653
  const newMaxValue = event.target.value;
4613
4654
  const currentMinValue = minValue;
@@ -4624,7 +4665,7 @@ function CurrencyRange(props) {
4624
4665
  if (hidden) {
4625
4666
  return null;
4626
4667
  }
4627
- return /* @__PURE__ */ React32.createElement(Stack6, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React32.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React32.createElement(Stack6, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React32.createElement(
4668
+ return /* @__PURE__ */ React34.createElement(Stack6, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React34.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React34.createElement(Stack6, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React34.createElement(
4628
4669
  CurrencyInput,
4629
4670
  {
4630
4671
  label: "Minimum",
@@ -4637,7 +4678,7 @@ function CurrencyRange(props) {
4637
4678
  "aria-labelledby": label ? id : void 0,
4638
4679
  "aria-label": "Minimum amount"
4639
4680
  }
4640
- ), /* @__PURE__ */ React32.createElement(
4681
+ ), /* @__PURE__ */ React34.createElement(
4641
4682
  CurrencyInput,
4642
4683
  {
4643
4684
  label: "Maximum",
@@ -4655,20 +4696,20 @@ function CurrencyRange(props) {
4655
4696
  CurrencyRange.displayName = "CurrencyRange";
4656
4697
 
4657
4698
  // src/components/FilterMenu/components/PercentageInput.tsx
4658
- import React34 from "react";
4699
+ import React36 from "react";
4659
4700
  import { Stack as Stack7, Typography as Typography2 } from "@mui/joy";
4660
4701
 
4661
4702
  // src/components/PercentageInput/PercentageInput.tsx
4662
- import React33, { useCallback as useCallback16, useMemo as useMemo11, useState as useState9 } from "react";
4703
+ import React35, { useCallback as useCallback18, useMemo as useMemo13, useState as useState10 } from "react";
4663
4704
  import { NumericFormat as NumericFormat2 } from "react-number-format";
4664
- import { styled as styled19, useThemeProps as useThemeProps6 } from "@mui/joy";
4705
+ import { styled as styled20, useThemeProps as useThemeProps6 } from "@mui/joy";
4665
4706
  var padDecimal = (value, decimalScale) => {
4666
4707
  const [integer, decimal = ""] = `${value}`.split(".");
4667
4708
  return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
4668
4709
  };
4669
- var TextMaskAdapter7 = React33.forwardRef(function TextMaskAdapter8(props, ref) {
4710
+ var TextMaskAdapter7 = React35.forwardRef(function TextMaskAdapter8(props, ref) {
4670
4711
  const { onChange, min, max, ...innerProps } = props;
4671
- return /* @__PURE__ */ React33.createElement(
4712
+ return /* @__PURE__ */ React35.createElement(
4672
4713
  NumericFormat2,
4673
4714
  {
4674
4715
  ...innerProps,
@@ -4688,12 +4729,12 @@ var TextMaskAdapter7 = React33.forwardRef(function TextMaskAdapter8(props, ref)
4688
4729
  }
4689
4730
  );
4690
4731
  });
4691
- var PercentageInputRoot = styled19(Input_default, {
4732
+ var PercentageInputRoot = styled20(Input_default, {
4692
4733
  name: "PercentageInput",
4693
4734
  slot: "Root",
4694
4735
  overridesResolver: (props, styles) => styles.root
4695
4736
  })({});
4696
- var PercentageInput = React33.forwardRef(
4737
+ var PercentageInput = React35.forwardRef(
4697
4738
  function PercentageInput2(inProps, ref) {
4698
4739
  const props = useThemeProps6({ props: inProps, name: "PercentageInput" });
4699
4740
  const {
@@ -4716,18 +4757,18 @@ var PercentageInput = React33.forwardRef(
4716
4757
  const [_value, setValue] = useControlledState(
4717
4758
  props.value,
4718
4759
  props.defaultValue,
4719
- useCallback16((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
4760
+ useCallback18((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
4720
4761
  );
4721
- const [internalError, setInternalError] = useState9(
4762
+ const [internalError, setInternalError] = useState10(
4722
4763
  max && _value && _value > max || min && _value && _value < min
4723
4764
  );
4724
- const value = useMemo11(() => {
4765
+ const value = useMemo13(() => {
4725
4766
  if (_value && useMinorUnit) {
4726
4767
  return _value / Math.pow(10, maxDecimalScale);
4727
4768
  }
4728
4769
  return _value;
4729
4770
  }, [_value, useMinorUnit, maxDecimalScale]);
4730
- const handleChange = useCallback16(
4771
+ const handleChange = useCallback18(
4731
4772
  (event) => {
4732
4773
  if (event.target.value === "") {
4733
4774
  setValue(void 0);
@@ -4744,7 +4785,7 @@ var PercentageInput = React33.forwardRef(
4744
4785
  },
4745
4786
  [setValue, useMinorUnit, maxDecimalScale, min, max]
4746
4787
  );
4747
- return /* @__PURE__ */ React33.createElement(
4788
+ return /* @__PURE__ */ React35.createElement(
4748
4789
  PercentageInputRoot,
4749
4790
  {
4750
4791
  ...innerProps,
@@ -4791,7 +4832,7 @@ var PercentageInput3 = ({
4791
4832
  if (hidden) {
4792
4833
  return null;
4793
4834
  }
4794
- return /* @__PURE__ */ React34.createElement(Stack7, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React34.createElement(Typography2, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React34.createElement(
4835
+ return /* @__PURE__ */ React36.createElement(Stack7, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React36.createElement(Typography2, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React36.createElement(
4795
4836
  PercentageInput,
4796
4837
  {
4797
4838
  value: _value,
@@ -4806,7 +4847,7 @@ var PercentageInput3 = ({
4806
4847
  };
4807
4848
 
4808
4849
  // src/components/FilterMenu/components/PercentageRange.tsx
4809
- import React35, { useCallback as useCallback17 } from "react";
4850
+ import React37, { useCallback as useCallback19 } from "react";
4810
4851
  import { Stack as Stack8 } from "@mui/joy";
4811
4852
  function PercentageRange(props) {
4812
4853
  const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
@@ -4817,7 +4858,7 @@ function PercentageRange(props) {
4817
4858
  );
4818
4859
  const minValue = internalValue?.[0];
4819
4860
  const maxValue = internalValue?.[1];
4820
- const handleMinChange = useCallback17(
4861
+ const handleMinChange = useCallback19(
4821
4862
  (event) => {
4822
4863
  const newMinValue = event.target.value;
4823
4864
  const currentMaxValue = maxValue;
@@ -4829,7 +4870,7 @@ function PercentageRange(props) {
4829
4870
  },
4830
4871
  [maxValue, setInternalValue]
4831
4872
  );
4832
- const handleMaxChange = useCallback17(
4873
+ const handleMaxChange = useCallback19(
4833
4874
  (event) => {
4834
4875
  const newMaxValue = event.target.value;
4835
4876
  const currentMinValue = minValue;
@@ -4844,7 +4885,7 @@ function PercentageRange(props) {
4844
4885
  if (hidden) {
4845
4886
  return null;
4846
4887
  }
4847
- return /* @__PURE__ */ React35.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React35.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React35.createElement(Stack8, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React35.createElement(
4888
+ return /* @__PURE__ */ React37.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React37.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React37.createElement(Stack8, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React37.createElement(
4848
4889
  PercentageInput,
4849
4890
  {
4850
4891
  label: "Minimum",
@@ -4858,7 +4899,7 @@ function PercentageRange(props) {
4858
4899
  "aria-label": "Minimum percentage",
4859
4900
  placeholder: "0%"
4860
4901
  }
4861
- ), /* @__PURE__ */ React35.createElement(
4902
+ ), /* @__PURE__ */ React37.createElement(
4862
4903
  PercentageInput,
4863
4904
  {
4864
4905
  label: "Maximum",
@@ -4877,13 +4918,13 @@ function PercentageRange(props) {
4877
4918
  PercentageRange.displayName = "PercentageRange";
4878
4919
 
4879
4920
  // src/components/FilterMenu/components/Autocomplete.tsx
4880
- import React36, { useCallback as useCallback18 } from "react";
4921
+ import React38, { useCallback as useCallback20 } from "react";
4881
4922
  import { Stack as Stack9 } from "@mui/joy";
4882
4923
  function Autocomplete2(props) {
4883
4924
  const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
4884
4925
  const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
4885
4926
  const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
4886
- const handleChange = useCallback18(
4927
+ const handleChange = useCallback20(
4887
4928
  (event) => {
4888
4929
  const val = event.target.value;
4889
4930
  if (val) {
@@ -4898,7 +4939,7 @@ function Autocomplete2(props) {
4898
4939
  if (hidden) {
4899
4940
  return null;
4900
4941
  }
4901
- return /* @__PURE__ */ React36.createElement(Stack9, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React36.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React36.createElement(
4942
+ return /* @__PURE__ */ React38.createElement(Stack9, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React38.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React38.createElement(
4902
4943
  Autocomplete,
4903
4944
  {
4904
4945
  value: autocompleteValue,
@@ -4931,7 +4972,7 @@ function FilterMenu(props) {
4931
4972
  void 0
4932
4973
  // onChange는 Apply 버튼에서만 호출
4933
4974
  );
4934
- const handleFilterChange = useCallback19(
4975
+ const handleFilterChange = useCallback21(
4935
4976
  (filterId, value) => {
4936
4977
  setInternalValues((prev) => ({
4937
4978
  ...prev,
@@ -4940,17 +4981,17 @@ function FilterMenu(props) {
4940
4981
  },
4941
4982
  [setInternalValues]
4942
4983
  );
4943
- const handleApply = useCallback19(() => {
4984
+ const handleApply = useCallback21(() => {
4944
4985
  onChange?.(internalValues);
4945
4986
  onClose?.();
4946
4987
  }, [onChange, onClose, internalValues]);
4947
- const handleClear = useCallback19(() => {
4988
+ const handleClear = useCallback21(() => {
4948
4989
  const clearedValues = resetValues || {};
4949
4990
  setInternalValues(clearedValues);
4950
4991
  onChange?.(clearedValues);
4951
4992
  onClose?.();
4952
4993
  }, [resetValues, setInternalValues, onChange, onClose]);
4953
- return /* @__PURE__ */ React37.createElement(
4994
+ return /* @__PURE__ */ React39.createElement(
4954
4995
  ModalDialog,
4955
4996
  {
4956
4997
  sx: {
@@ -4960,9 +5001,9 @@ function FilterMenu(props) {
4960
5001
  top: "initial"
4961
5002
  }
4962
5003
  },
4963
- /* @__PURE__ */ React37.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ React37.createElement(Stack10, { spacing: 6 }, filters?.map((filter) => {
5004
+ /* @__PURE__ */ React39.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ React39.createElement(Stack10, { spacing: 6 }, filters?.map((filter) => {
4964
5005
  const FilterComponent = componentMap[filter.type];
4965
- return FilterComponent ? /* @__PURE__ */ React37.createElement(
5006
+ return FilterComponent ? /* @__PURE__ */ React39.createElement(
4966
5007
  FilterComponent,
4967
5008
  {
4968
5009
  key: filter.id,
@@ -4974,14 +5015,14 @@ function FilterMenu(props) {
4974
5015
  }
4975
5016
  ) : null;
4976
5017
  }))),
4977
- /* @__PURE__ */ React37.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ React37.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Clear"), useReset && !useClear && /* @__PURE__ */ React37.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Reset"), /* @__PURE__ */ React37.createElement(Button2, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
5018
+ /* @__PURE__ */ React39.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ React39.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Clear"), useReset && !useClear && /* @__PURE__ */ React39.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Reset"), /* @__PURE__ */ React39.createElement(Button2, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
4978
5019
  );
4979
5020
  }
4980
5021
  FilterMenu.displayName = "FilterMenu";
4981
5022
 
4982
5023
  // src/components/Uploader/Uploader.tsx
4983
- import React38, { useCallback as useCallback20, useEffect as useEffect8, useMemo as useMemo12, useRef as useRef6, useState as useState10 } from "react";
4984
- import { styled as styled20, Input as Input2 } from "@mui/joy";
5024
+ import React40, { useCallback as useCallback22, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef8, useState as useState11 } from "react";
5025
+ import { styled as styled21, Input as Input2 } from "@mui/joy";
4985
5026
  import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
4986
5027
  import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
4987
5028
  import MuiClearIcon from "@mui/icons-material/ClearRounded";
@@ -5003,7 +5044,7 @@ var esmFiles = {
5003
5044
  "@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js"
5004
5045
  )
5005
5046
  };
5006
- var VisuallyHiddenInput = styled20(Input2)({
5047
+ var VisuallyHiddenInput = styled21(Input2)({
5007
5048
  width: "1px",
5008
5049
  height: "1px",
5009
5050
  overflow: "hidden",
@@ -5012,18 +5053,18 @@ var VisuallyHiddenInput = styled20(Input2)({
5012
5053
  clipPath: "inset(50%)",
5013
5054
  position: "absolute"
5014
5055
  });
5015
- var PreviewRoot = styled20(Stack_default, {
5056
+ var PreviewRoot = styled21(Stack_default, {
5016
5057
  name: "Uploader",
5017
5058
  slot: "PreviewRoot"
5018
5059
  })({});
5019
- var UploadCard = styled20(Card, {
5060
+ var UploadCard = styled21(Card, {
5020
5061
  name: "Uploader",
5021
5062
  slot: "UploadCard"
5022
5063
  })(({ theme }) => ({
5023
5064
  padding: theme.spacing(2.5),
5024
5065
  border: `1px solid ${theme.palette.neutral.outlinedBorder}`
5025
5066
  }));
5026
- var UploadFileIcon = styled20(MuiUploadFileIcon, {
5067
+ var UploadFileIcon = styled21(MuiUploadFileIcon, {
5027
5068
  name: "Uploader",
5028
5069
  slot: "UploadFileIcon"
5029
5070
  })(({ theme }) => ({
@@ -5031,7 +5072,7 @@ var UploadFileIcon = styled20(MuiUploadFileIcon, {
5031
5072
  width: "32px",
5032
5073
  height: "32px"
5033
5074
  }));
5034
- var ClearIcon2 = styled20(MuiClearIcon, {
5075
+ var ClearIcon2 = styled21(MuiClearIcon, {
5035
5076
  name: "Uploader",
5036
5077
  slot: "ClearIcon"
5037
5078
  })(({ theme }) => ({
@@ -5057,40 +5098,50 @@ var getFileSize = (n) => {
5057
5098
  };
5058
5099
  var Preview = (props) => {
5059
5100
  const { files, uploaded, onDelete } = props;
5060
- return /* @__PURE__ */ React38.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React38.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React38.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React38.createElement(UploadFileIcon, null), /* @__PURE__ */ React38.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ React38.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ React38.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React38.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React38.createElement(ClearIcon2, null))))));
5101
+ return /* @__PURE__ */ React40.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React40.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React40.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React40.createElement(UploadFileIcon, null), /* @__PURE__ */ React40.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ React40.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ React40.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React40.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React40.createElement(ClearIcon2, null))))));
5061
5102
  };
5062
- var UploaderRoot = styled20(Stack_default, {
5103
+ var UploaderRoot = styled21(Stack_default, {
5063
5104
  name: "Uploader",
5064
5105
  slot: "root"
5065
5106
  })(({ theme }) => ({
5066
5107
  gap: theme.spacing(2)
5067
5108
  }));
5068
- var FileDropZone = styled20(Sheet_default, {
5109
+ var FileDropZone = styled21(Sheet_default, {
5069
5110
  name: "Uploader",
5070
5111
  slot: "dropZone",
5071
- shouldForwardProp: (prop) => prop !== "error"
5072
- })(({ theme, state, error }) => ({
5073
- width: "100%",
5074
- display: "flex",
5075
- flexDirection: "column",
5076
- justifyContent: "center",
5077
- alignItems: "center",
5078
- padding: theme.spacing(5),
5079
- gap: theme.spacing(4),
5080
- cursor: "pointer",
5081
- backgroundColor: theme.palette.background.surface,
5082
- border: error ? `1px solid ${theme.palette.danger.outlinedBorder}` : state === "idle" ? `1px solid ${theme.palette.neutral.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
5083
- }));
5084
- var UploaderIcon = styled20(MuiFileUploadIcon, {
5112
+ shouldForwardProp: (prop) => prop !== "error" && prop !== "disabled"
5113
+ })(
5114
+ ({ theme, state, error, disabled }) => ({
5115
+ width: "100%",
5116
+ display: "flex",
5117
+ flexDirection: "column",
5118
+ justifyContent: "center",
5119
+ alignItems: "center",
5120
+ padding: theme.spacing(5),
5121
+ gap: theme.spacing(4),
5122
+ cursor: disabled ? "not-allowed" : "pointer",
5123
+ backgroundColor: theme.palette.background.surface,
5124
+ 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}`,
5125
+ "&:hover": {
5126
+ border: disabled ? `1px solid ${theme.palette.danger.outlinedDisabledBorder}` : error ? `1px solid ${theme.palette.danger.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
5127
+ }
5128
+ })
5129
+ );
5130
+ var UploaderIcon = styled21(MuiFileUploadIcon, {
5085
5131
  name: "Uploader",
5086
5132
  slot: "iconContainer",
5087
- shouldForwardProp: (prop) => prop !== "error"
5088
- })(({ theme, state, error }) => ({
5089
- color: error ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)` : state === "over" ? `rgba(${theme.palette.primary.mainChannel} / 0.6)` : theme.palette.neutral.softActiveBg,
5090
- width: "32px",
5091
- height: "32px"
5092
- }));
5093
- var Uploader = React38.memo(
5133
+ shouldForwardProp: (prop) => prop !== "error" && prop !== "disabled"
5134
+ })(
5135
+ ({ theme, state, error, disabled }) => ({
5136
+ 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,
5137
+ width: "32px",
5138
+ height: "32px",
5139
+ ".MuiSheet-root:hover &": {
5140
+ color: disabled ? theme.palette.primary.outlinedDisabledBorder : error ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)` : `rgba(${theme.palette.primary.mainChannel} / 0.6)`
5141
+ }
5142
+ })
5143
+ );
5144
+ var Uploader = React40.memo(
5094
5145
  (props) => {
5095
5146
  const {
5096
5147
  accept,
@@ -5105,14 +5156,14 @@ var Uploader = React38.memo(
5105
5156
  disabled,
5106
5157
  onDelete
5107
5158
  } = props;
5108
- const dropZoneRef = useRef6(null);
5109
- const inputRef = useRef6(null);
5110
- const [errorText, setErrorText] = useState10();
5111
- const [files, setFiles] = useState10([]);
5112
- const [uploaded, setUploaded] = useState10(props.uploaded || []);
5113
- const [previewState, setPreviewState] = useState10("idle");
5114
- const accepts = useMemo12(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
5115
- const parsedAccepts = useMemo12(
5159
+ const dropZoneRef = useRef8(null);
5160
+ const inputRef = useRef8(null);
5161
+ const [errorText, setErrorText] = useState11();
5162
+ const [files, setFiles] = useState11([]);
5163
+ const [uploaded, setUploaded] = useState11(props.uploaded || []);
5164
+ const [previewState, setPreviewState] = useState11("idle");
5165
+ const accepts = useMemo14(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
5166
+ const parsedAccepts = useMemo14(
5116
5167
  () => accepts.flatMap((type) => {
5117
5168
  if (["image/*", "video/*", "audio/*"].includes(type)) {
5118
5169
  return ALL_EXTENSIONS_BY_TYPE[type];
@@ -5121,7 +5172,7 @@ var Uploader = React38.memo(
5121
5172
  }),
5122
5173
  [accepts]
5123
5174
  );
5124
- const helperText = useMemo12(() => {
5175
+ const helperText = useMemo14(() => {
5125
5176
  const [allAcceptedTypes, acceptedTypes] = [
5126
5177
  accepts.filter((accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)).map((accept2) => {
5127
5178
  const [type] = accept2.split("/");
@@ -5148,12 +5199,12 @@ var Uploader = React38.memo(
5148
5199
  }
5149
5200
  return helperTexts.join(", ");
5150
5201
  }, [accepts, maxFileTotalSize, maxCount]);
5151
- const error = useMemo12(() => !!errorText || props.error, [props.error, errorText]);
5152
- const showDropZone = useMemo12(
5202
+ const error = useMemo14(() => !!errorText || props.error, [props.error, errorText]);
5203
+ const showDropZone = useMemo14(
5153
5204
  () => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
5154
5205
  [files, maxCount, uploaded]
5155
5206
  );
5156
- const addFiles = useCallback20(
5207
+ const addFiles = useCallback22(
5157
5208
  (uploads) => {
5158
5209
  try {
5159
5210
  const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
@@ -5198,7 +5249,7 @@ var Uploader = React38.memo(
5198
5249
  },
5199
5250
  [files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
5200
5251
  );
5201
- useEffect8(() => {
5252
+ useEffect9(() => {
5202
5253
  if (!dropZoneRef.current || disabled) {
5203
5254
  return;
5204
5255
  }
@@ -5236,7 +5287,7 @@ var Uploader = React38.memo(
5236
5287
  );
5237
5288
  return () => cleanup?.();
5238
5289
  }, [disabled, addFiles]);
5239
- useEffect8(() => {
5290
+ useEffect9(() => {
5240
5291
  if (inputRef.current && minCount) {
5241
5292
  if (files.length < minCount) {
5242
5293
  inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
@@ -5245,14 +5296,14 @@ var Uploader = React38.memo(
5245
5296
  }
5246
5297
  }
5247
5298
  }, [inputRef, files, minCount]);
5248
- const handleFileChanged = useCallback20(
5299
+ const handleFileChanged = useCallback22(
5249
5300
  (event) => {
5250
5301
  const files2 = Array.from(event.target.files || []);
5251
5302
  addFiles(files2);
5252
5303
  },
5253
5304
  [addFiles]
5254
5305
  );
5255
- const handleDeleteFile = useCallback20(
5306
+ const handleDeleteFile = useCallback22(
5256
5307
  (deletedFile) => {
5257
5308
  if (deletedFile instanceof File) {
5258
5309
  setFiles((current) => {
@@ -5272,19 +5323,20 @@ var Uploader = React38.memo(
5272
5323
  },
5273
5324
  [name, onChange, onDelete]
5274
5325
  );
5275
- const handleUploaderButtonClick = useCallback20(() => {
5326
+ const handleUploaderButtonClick = useCallback22(() => {
5276
5327
  inputRef.current?.click();
5277
5328
  }, []);
5278
- const uploader = /* @__PURE__ */ React38.createElement(
5329
+ const uploader = /* @__PURE__ */ React40.createElement(
5279
5330
  FileDropZone,
5280
5331
  {
5281
5332
  state: previewState,
5282
5333
  error: !!(error || errorText),
5334
+ disabled,
5283
5335
  ref: dropZoneRef,
5284
5336
  onClick: handleUploaderButtonClick
5285
5337
  },
5286
- /* @__PURE__ */ React38.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React38.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText) })),
5287
- /* @__PURE__ */ React38.createElement(
5338
+ /* @__PURE__ */ React40.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React40.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText), disabled })),
5339
+ /* @__PURE__ */ React40.createElement(
5288
5340
  VisuallyHiddenInput,
5289
5341
  {
5290
5342
  disabled,
@@ -5307,7 +5359,7 @@ var Uploader = React38.memo(
5307
5359
  }
5308
5360
  )
5309
5361
  );
5310
- return /* @__PURE__ */ React38.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React38.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React38.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React38.createElement(FormHelperText_default, null, /* @__PURE__ */ React38.createElement(Stack_default, null, errorText && /* @__PURE__ */ React38.createElement("div", null, errorText), /* @__PURE__ */ React38.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React38.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
5362
+ return /* @__PURE__ */ React40.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React40.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React40.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React40.createElement(FormHelperText_default, null, /* @__PURE__ */ React40.createElement(Stack_default, null, errorText && /* @__PURE__ */ React40.createElement("div", null, errorText), /* @__PURE__ */ React40.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React40.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
5311
5363
  }
5312
5364
  );
5313
5365
  Uploader.displayName = "Uploader";
@@ -5316,7 +5368,7 @@ Uploader.displayName = "Uploader";
5316
5368
  import { Grid } from "@mui/joy";
5317
5369
 
5318
5370
  // src/components/IconMenuButton/IconMenuButton.tsx
5319
- import React39 from "react";
5371
+ import React41 from "react";
5320
5372
  import { MenuButton as JoyMenuButton2, IconButton as JoyIconButton2 } from "@mui/joy";
5321
5373
  function IconMenuButton(props) {
5322
5374
  const {
@@ -5330,7 +5382,7 @@ function IconMenuButton(props) {
5330
5382
  placement = "bottom"
5331
5383
  } = props;
5332
5384
  if (!items.length) {
5333
- return /* @__PURE__ */ React39.createElement(
5385
+ return /* @__PURE__ */ React41.createElement(
5334
5386
  JoyIconButton2,
5335
5387
  {
5336
5388
  component: props.buttonComponent ?? "button",
@@ -5344,7 +5396,7 @@ function IconMenuButton(props) {
5344
5396
  icon
5345
5397
  );
5346
5398
  }
5347
- return /* @__PURE__ */ React39.createElement(Dropdown_default, null, /* @__PURE__ */ React39.createElement(
5399
+ return /* @__PURE__ */ React41.createElement(Dropdown_default, null, /* @__PURE__ */ React41.createElement(
5348
5400
  JoyMenuButton2,
5349
5401
  {
5350
5402
  slots: { root: JoyIconButton2 },
@@ -5361,19 +5413,19 @@ function IconMenuButton(props) {
5361
5413
  }
5362
5414
  },
5363
5415
  icon
5364
- ), /* @__PURE__ */ React39.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React39.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
5416
+ ), /* @__PURE__ */ React41.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React41.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
5365
5417
  }
5366
5418
  IconMenuButton.displayName = "IconMenuButton";
5367
5419
 
5368
5420
  // src/components/Markdown/Markdown.tsx
5369
- import React40, { lazy, Suspense, useEffect as useEffect9, useState as useState11 } from "react";
5421
+ import React42, { lazy, Suspense, useEffect as useEffect10, useState as useState12 } from "react";
5370
5422
  import { Skeleton } from "@mui/joy";
5371
5423
  import { Link as Link2 } from "@mui/joy";
5372
5424
  import remarkGfm from "remark-gfm";
5373
5425
  var LazyReactMarkdown = lazy(() => import("react-markdown"));
5374
5426
  var Markdown = (props) => {
5375
- const [rehypeAccent2, setRehypeAccent] = useState11(null);
5376
- useEffect9(() => {
5427
+ const [rehypeAccent2, setRehypeAccent] = useState12(null);
5428
+ useEffect10(() => {
5377
5429
  const loadRehypeAccent = async () => {
5378
5430
  const module = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
5379
5431
  setRehypeAccent(() => module.rehypeAccent);
@@ -5395,12 +5447,12 @@ var Markdown = (props) => {
5395
5447
  if (!rehypeAccent2) {
5396
5448
  return null;
5397
5449
  }
5398
- return /* @__PURE__ */ React40.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React40.createElement(
5450
+ return /* @__PURE__ */ React42.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React42.createElement(
5399
5451
  Suspense,
5400
5452
  {
5401
- fallback: fallback || /* @__PURE__ */ React40.createElement(Typography, null, /* @__PURE__ */ React40.createElement(Skeleton, null, content || ""))
5453
+ fallback: fallback || /* @__PURE__ */ React42.createElement(Typography, null, /* @__PURE__ */ React42.createElement(Skeleton, null, content || ""))
5402
5454
  },
5403
- /* @__PURE__ */ React40.createElement(
5455
+ /* @__PURE__ */ React42.createElement(
5404
5456
  LazyReactMarkdown,
5405
5457
  {
5406
5458
  ...markdownOptions,
@@ -5408,15 +5460,15 @@ var Markdown = (props) => {
5408
5460
  rehypePlugins: [[rehypeAccent2, { accentColor }]],
5409
5461
  remarkPlugins: [remarkGfm],
5410
5462
  components: {
5411
- h1: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h1" }, children),
5412
- h2: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h2" }, children),
5413
- h3: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h3" }, children),
5414
- h4: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h4" }, children),
5415
- p: ({ children, node }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
5416
- a: ({ children, href }) => /* @__PURE__ */ React40.createElement(Link2, { href, target: defaultLinkAction }, children),
5417
- hr: () => /* @__PURE__ */ React40.createElement(Divider, null),
5418
- b: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { fontWeight: boldFontWeight }, children),
5419
- strong: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { fontWeight: boldFontWeight }, children),
5463
+ h1: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h1" }, children),
5464
+ h2: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h2" }, children),
5465
+ h3: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h3" }, children),
5466
+ h4: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h4" }, children),
5467
+ p: ({ children, node }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
5468
+ a: ({ children, href }) => /* @__PURE__ */ React42.createElement(Link2, { href, target: defaultLinkAction }, children),
5469
+ hr: () => /* @__PURE__ */ React42.createElement(Divider, null),
5470
+ b: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { fontWeight: boldFontWeight }, children),
5471
+ strong: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { fontWeight: boldFontWeight }, children),
5420
5472
  ...markdownOptions?.components
5421
5473
  }
5422
5474
  }
@@ -5426,7 +5478,7 @@ var Markdown = (props) => {
5426
5478
  Markdown.displayName = "Markdown";
5427
5479
 
5428
5480
  // src/components/MenuButton/MenuButton.tsx
5429
- import React41 from "react";
5481
+ import React43 from "react";
5430
5482
  import { MenuButton as JoyMenuButton3, Button as JoyButton2 } from "@mui/joy";
5431
5483
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
5432
5484
  function MenuButton(props) {
@@ -5444,7 +5496,7 @@ function MenuButton(props) {
5444
5496
  placement = "bottom"
5445
5497
  } = props;
5446
5498
  if (!items.length) {
5447
- return /* @__PURE__ */ React41.createElement(
5499
+ return /* @__PURE__ */ React43.createElement(
5448
5500
  JoyButton2,
5449
5501
  {
5450
5502
  component: props.buttonComponent ?? "button",
@@ -5455,12 +5507,12 @@ function MenuButton(props) {
5455
5507
  loading,
5456
5508
  startDecorator,
5457
5509
  ...props.buttonComponentProps ?? {},
5458
- endDecorator: showIcon ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, endDecorator, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React41.createElement(React41.Fragment, null, endDecorator)
5510
+ endDecorator: showIcon ? /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator, /* @__PURE__ */ React43.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator)
5459
5511
  },
5460
5512
  buttonText
5461
5513
  );
5462
5514
  }
5463
- return /* @__PURE__ */ React41.createElement(Dropdown_default, null, /* @__PURE__ */ React41.createElement(
5515
+ return /* @__PURE__ */ React43.createElement(Dropdown_default, null, /* @__PURE__ */ React43.createElement(
5464
5516
  JoyMenuButton3,
5465
5517
  {
5466
5518
  component: props.buttonComponent ?? "button",
@@ -5471,25 +5523,25 @@ function MenuButton(props) {
5471
5523
  loading,
5472
5524
  startDecorator,
5473
5525
  ...props.buttonComponentProps ?? {},
5474
- endDecorator: showIcon ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, endDecorator, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React41.createElement(React41.Fragment, null, endDecorator)
5526
+ endDecorator: showIcon ? /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator, /* @__PURE__ */ React43.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator)
5475
5527
  },
5476
5528
  buttonText
5477
- ), /* @__PURE__ */ React41.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React41.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
5529
+ ), /* @__PURE__ */ React43.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React43.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
5478
5530
  }
5479
5531
  MenuButton.displayName = "MenuButton";
5480
5532
 
5481
5533
  // src/components/MonthPicker/MonthPicker.tsx
5482
- import React42, { forwardRef as forwardRef9, useCallback as useCallback21, useEffect as useEffect10, useImperativeHandle as useImperativeHandle4, useRef as useRef7, useState as useState12 } from "react";
5534
+ import React44, { forwardRef as forwardRef9, useCallback as useCallback23, useEffect as useEffect11, useImperativeHandle as useImperativeHandle4, useRef as useRef9, useState as useState13 } from "react";
5483
5535
  import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
5484
- import { styled as styled21, useThemeProps as useThemeProps7 } from "@mui/joy";
5536
+ import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
5485
5537
  import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
5486
- var StyledPopper3 = styled21(Popper4, {
5538
+ var StyledPopper3 = styled22(Popper4, {
5487
5539
  name: "MonthPicker",
5488
5540
  slot: "popper"
5489
5541
  })(({ theme }) => ({
5490
5542
  zIndex: theme.zIndex.tooltip
5491
5543
  }));
5492
- var CalendarSheet3 = styled21(Sheet_default, {
5544
+ var CalendarSheet3 = styled22(Sheet_default, {
5493
5545
  name: "MonthPicker",
5494
5546
  slot: "sheet",
5495
5547
  overridesResolver: (props, styles) => styles.root
@@ -5498,7 +5550,7 @@ var CalendarSheet3 = styled21(Sheet_default, {
5498
5550
  boxShadow: theme.shadow.md,
5499
5551
  borderRadius: theme.radius.md
5500
5552
  }));
5501
- var MonthPickerRoot = styled21("div", {
5553
+ var MonthPickerRoot = styled22("div", {
5502
5554
  name: "MonthPicker",
5503
5555
  slot: "root",
5504
5556
  overridesResolver: (props, styles) => styles.root
@@ -5561,14 +5613,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5561
5613
  locale,
5562
5614
  ...innerProps
5563
5615
  } = props;
5564
- const innerRef = useRef7(null);
5565
- const buttonRef = useRef7(null);
5616
+ const innerRef = useRef9(null);
5617
+ const buttonRef = useRef9(null);
5566
5618
  const [value, setValue, isControlled] = useControlledState(
5567
5619
  props.value,
5568
5620
  props.defaultValue || "",
5569
- useCallback21((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
5621
+ useCallback23((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
5570
5622
  );
5571
- const getFormattedDisplayValue = useCallback21(
5623
+ const getFormattedDisplayValue = useCallback23(
5572
5624
  (inputValue) => {
5573
5625
  if (!inputValue) return "";
5574
5626
  try {
@@ -5579,19 +5631,19 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5579
5631
  },
5580
5632
  [format, displayFormat, locale]
5581
5633
  );
5582
- const [displayValue, setDisplayValue] = useState12(() => getFormattedDisplayValue(value));
5583
- const [anchorEl, setAnchorEl] = useState12(null);
5634
+ const [displayValue, setDisplayValue] = useState13(() => getFormattedDisplayValue(value));
5635
+ const [anchorEl, setAnchorEl] = useState13(null);
5584
5636
  const open = Boolean(anchorEl);
5585
- useEffect10(() => {
5637
+ useEffect11(() => {
5586
5638
  if (!anchorEl) {
5587
5639
  innerRef.current?.blur();
5588
5640
  }
5589
5641
  }, [anchorEl, innerRef]);
5590
5642
  useImperativeHandle4(ref, () => innerRef.current, [innerRef]);
5591
- useEffect10(() => {
5643
+ useEffect11(() => {
5592
5644
  setDisplayValue(getFormattedDisplayValue(value));
5593
5645
  }, [value, getFormattedDisplayValue]);
5594
- const handleChange = useCallback21(
5646
+ const handleChange = useCallback23(
5595
5647
  (event) => {
5596
5648
  const newValue = event.target.value;
5597
5649
  setValue(newValue);
@@ -5601,21 +5653,21 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5601
5653
  },
5602
5654
  [setValue, getFormattedDisplayValue, isControlled]
5603
5655
  );
5604
- const handleCalendarToggle = useCallback21(
5656
+ const handleCalendarToggle = useCallback23(
5605
5657
  (event) => {
5606
5658
  setAnchorEl(anchorEl ? null : event.currentTarget);
5607
5659
  innerRef.current?.focus();
5608
5660
  },
5609
5661
  [anchorEl, setAnchorEl, innerRef]
5610
5662
  );
5611
- const handleInputMouseDown = useCallback21(
5663
+ const handleInputMouseDown = useCallback23(
5612
5664
  (event) => {
5613
5665
  event.preventDefault();
5614
5666
  buttonRef.current?.focus();
5615
5667
  },
5616
5668
  [buttonRef]
5617
5669
  );
5618
- return /* @__PURE__ */ React42.createElement(MonthPickerRoot, null, /* @__PURE__ */ React42.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(
5670
+ return /* @__PURE__ */ React44.createElement(MonthPickerRoot, null, /* @__PURE__ */ React44.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(
5619
5671
  Input_default,
5620
5672
  {
5621
5673
  ...innerProps,
@@ -5645,7 +5697,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5645
5697
  // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
5646
5698
  fontFamily: "monospace"
5647
5699
  },
5648
- endDecorator: /* @__PURE__ */ React42.createElement(
5700
+ endDecorator: /* @__PURE__ */ React44.createElement(
5649
5701
  IconButton_default,
5650
5702
  {
5651
5703
  ref: buttonRef,
@@ -5657,12 +5709,12 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5657
5709
  "aria-expanded": open,
5658
5710
  disabled
5659
5711
  },
5660
- /* @__PURE__ */ React42.createElement(CalendarTodayIcon3, null)
5712
+ /* @__PURE__ */ React44.createElement(CalendarTodayIcon3, null)
5661
5713
  ),
5662
5714
  label,
5663
5715
  helperText
5664
5716
  }
5665
- ), open && /* @__PURE__ */ React42.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React42.createElement(
5717
+ ), open && /* @__PURE__ */ React44.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React44.createElement(
5666
5718
  StyledPopper3,
5667
5719
  {
5668
5720
  id: "month-picker-popper",
@@ -5681,7 +5733,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5681
5733
  "aria-label": "Calendar Tooltip",
5682
5734
  "aria-expanded": open
5683
5735
  },
5684
- /* @__PURE__ */ React42.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React42.createElement(
5736
+ /* @__PURE__ */ React44.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React44.createElement(
5685
5737
  Calendar_default,
5686
5738
  {
5687
5739
  view: "month",
@@ -5702,14 +5754,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5702
5754
  disablePast,
5703
5755
  locale
5704
5756
  }
5705
- ), /* @__PURE__ */ React42.createElement(
5757
+ ), /* @__PURE__ */ React44.createElement(
5706
5758
  DialogActions_default,
5707
5759
  {
5708
5760
  sx: {
5709
5761
  p: 1
5710
5762
  }
5711
5763
  },
5712
- /* @__PURE__ */ React42.createElement(
5764
+ /* @__PURE__ */ React44.createElement(
5713
5765
  Button_default,
5714
5766
  {
5715
5767
  size,
@@ -5732,18 +5784,18 @@ var MonthPicker = forwardRef9((inProps, ref) => {
5732
5784
  });
5733
5785
 
5734
5786
  // src/components/MonthRangePicker/MonthRangePicker.tsx
5735
- import React43, { forwardRef as forwardRef10, useCallback as useCallback22, useEffect as useEffect11, useImperativeHandle as useImperativeHandle5, useMemo as useMemo13, useRef as useRef8, useState as useState13 } from "react";
5787
+ import React45, { forwardRef as forwardRef10, useCallback as useCallback24, useEffect as useEffect12, useImperativeHandle as useImperativeHandle5, useMemo as useMemo15, useRef as useRef10, useState as useState14 } from "react";
5736
5788
  import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
5737
5789
  import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
5738
- import { styled as styled22, useThemeProps as useThemeProps8 } from "@mui/joy";
5790
+ import { styled as styled23, useThemeProps as useThemeProps8 } from "@mui/joy";
5739
5791
  import { FocusTrap as FocusTrap4, ClickAwayListener as ClickAwayListener4, Popper as Popper5 } from "@mui/base";
5740
- var StyledPopper4 = styled22(Popper5, {
5792
+ var StyledPopper4 = styled23(Popper5, {
5741
5793
  name: "MonthRangePicker",
5742
5794
  slot: "popper"
5743
5795
  })(({ theme }) => ({
5744
5796
  zIndex: theme.zIndex.tooltip
5745
5797
  }));
5746
- var CalendarSheet4 = styled22(Sheet_default, {
5798
+ var CalendarSheet4 = styled23(Sheet_default, {
5747
5799
  name: "MonthRangePicker",
5748
5800
  slot: "sheet",
5749
5801
  overridesResolver: (props, styles) => styles.root
@@ -5753,7 +5805,7 @@ var CalendarSheet4 = styled22(Sheet_default, {
5753
5805
  boxShadow: theme.shadow.md,
5754
5806
  borderRadius: theme.radius.md
5755
5807
  }));
5756
- var MonthRangePickerRoot = styled22("div", {
5808
+ var MonthRangePickerRoot = styled23("div", {
5757
5809
  name: "MonthRangePicker",
5758
5810
  slot: "root",
5759
5811
  overridesResolver: (props, styles) => styles.root
@@ -5790,9 +5842,9 @@ var parseDates2 = (str) => {
5790
5842
  var formatToPattern3 = (format) => {
5791
5843
  return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
5792
5844
  };
5793
- var TextMaskAdapter9 = React43.forwardRef(function TextMaskAdapter10(props, ref) {
5845
+ var TextMaskAdapter9 = React45.forwardRef(function TextMaskAdapter10(props, ref) {
5794
5846
  const { onChange, format, ...other } = props;
5795
- return /* @__PURE__ */ React43.createElement(
5847
+ return /* @__PURE__ */ React45.createElement(
5796
5848
  IMaskInput3,
5797
5849
  {
5798
5850
  ...other,
@@ -5840,35 +5892,35 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5840
5892
  size,
5841
5893
  ...innerProps
5842
5894
  } = props;
5843
- const innerRef = useRef8(null);
5895
+ const innerRef = useRef10(null);
5844
5896
  const [value, setValue] = useControlledState(
5845
5897
  props.value,
5846
5898
  props.defaultValue || "",
5847
- useCallback22((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
5899
+ useCallback24((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
5848
5900
  );
5849
- const [anchorEl, setAnchorEl] = useState13(null);
5901
+ const [anchorEl, setAnchorEl] = useState14(null);
5850
5902
  const open = Boolean(anchorEl);
5851
- const calendarValue = useMemo13(() => value ? parseDates2(value) : void 0, [value]);
5852
- useEffect11(() => {
5903
+ const calendarValue = useMemo15(() => value ? parseDates2(value) : void 0, [value]);
5904
+ useEffect12(() => {
5853
5905
  if (!anchorEl) {
5854
5906
  innerRef.current?.blur();
5855
5907
  }
5856
5908
  }, [anchorEl, innerRef]);
5857
5909
  useImperativeHandle5(ref, () => innerRef.current, [innerRef]);
5858
- const handleChange = useCallback22(
5910
+ const handleChange = useCallback24(
5859
5911
  (event) => {
5860
5912
  setValue(event.target.value);
5861
5913
  },
5862
5914
  [setValue]
5863
5915
  );
5864
- const handleCalendarToggle = useCallback22(
5916
+ const handleCalendarToggle = useCallback24(
5865
5917
  (event) => {
5866
5918
  setAnchorEl(anchorEl ? null : event.currentTarget);
5867
5919
  innerRef.current?.focus();
5868
5920
  },
5869
5921
  [anchorEl, setAnchorEl, innerRef]
5870
5922
  );
5871
- const handleCalendarChange = useCallback22(
5923
+ const handleCalendarChange = useCallback24(
5872
5924
  ([date1, date2]) => {
5873
5925
  if (!date1 || !date2) return;
5874
5926
  setValue(formatValueString4([date1, date2], format));
@@ -5876,7 +5928,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5876
5928
  },
5877
5929
  [setValue, setAnchorEl, format]
5878
5930
  );
5879
- return /* @__PURE__ */ React43.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React43.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(
5931
+ return /* @__PURE__ */ React45.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React45.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(
5880
5932
  Input_default,
5881
5933
  {
5882
5934
  ...innerProps,
@@ -5898,7 +5950,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5898
5950
  // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
5899
5951
  fontFamily: "monospace"
5900
5952
  },
5901
- endDecorator: /* @__PURE__ */ React43.createElement(
5953
+ endDecorator: /* @__PURE__ */ React45.createElement(
5902
5954
  IconButton_default,
5903
5955
  {
5904
5956
  variant: "plain",
@@ -5908,12 +5960,12 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5908
5960
  "aria-haspopup": "dialog",
5909
5961
  "aria-expanded": open
5910
5962
  },
5911
- /* @__PURE__ */ React43.createElement(CalendarTodayIcon4, null)
5963
+ /* @__PURE__ */ React45.createElement(CalendarTodayIcon4, null)
5912
5964
  ),
5913
5965
  label,
5914
5966
  helperText
5915
5967
  }
5916
- ), open && /* @__PURE__ */ React43.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React43.createElement(
5968
+ ), open && /* @__PURE__ */ React45.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React45.createElement(
5917
5969
  StyledPopper4,
5918
5970
  {
5919
5971
  id: "month-range-picker-popper",
@@ -5932,7 +5984,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5932
5984
  "aria-label": "Calendar Tooltip",
5933
5985
  "aria-expanded": open
5934
5986
  },
5935
- /* @__PURE__ */ React43.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React43.createElement(
5987
+ /* @__PURE__ */ React45.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React45.createElement(
5936
5988
  Calendar_default,
5937
5989
  {
5938
5990
  view: "month",
@@ -5945,14 +5997,14 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5945
5997
  disableFuture,
5946
5998
  disablePast
5947
5999
  }
5948
- ), /* @__PURE__ */ React43.createElement(
6000
+ ), /* @__PURE__ */ React45.createElement(
5949
6001
  DialogActions_default,
5950
6002
  {
5951
6003
  sx: {
5952
6004
  p: 1
5953
6005
  }
5954
6006
  },
5955
- /* @__PURE__ */ React43.createElement(
6007
+ /* @__PURE__ */ React45.createElement(
5956
6008
  Button_default,
5957
6009
  {
5958
6010
  size,
@@ -5971,16 +6023,16 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
5971
6023
  MonthRangePicker.displayName = "MonthRangePicker";
5972
6024
 
5973
6025
  // src/components/NavigationGroup/NavigationGroup.tsx
5974
- import React44 from "react";
6026
+ import React46 from "react";
5975
6027
  import {
5976
6028
  Accordion as JoyAccordion2,
5977
6029
  AccordionSummary as JoyAccordionSummary2,
5978
6030
  AccordionDetails as JoyAccordionDetails2,
5979
- styled as styled23,
6031
+ styled as styled24,
5980
6032
  accordionSummaryClasses,
5981
6033
  Stack as Stack11
5982
6034
  } from "@mui/joy";
5983
- var AccordionSummary2 = styled23(JoyAccordionSummary2, {
6035
+ var AccordionSummary2 = styled24(JoyAccordionSummary2, {
5984
6036
  name: "NavigationGroup",
5985
6037
  slot: "Summary",
5986
6038
  shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
@@ -5993,7 +6045,7 @@ var AccordionSummary2 = styled23(JoyAccordionSummary2, {
5993
6045
  }
5994
6046
  }
5995
6047
  }));
5996
- var AccordionDetails2 = styled23(JoyAccordionDetails2, {
6048
+ var AccordionDetails2 = styled24(JoyAccordionDetails2, {
5997
6049
  name: "NavigationGroup",
5998
6050
  slot: "Details"
5999
6051
  })(({ theme }) => ({
@@ -6002,19 +6054,19 @@ var AccordionDetails2 = styled23(JoyAccordionDetails2, {
6002
6054
  }));
6003
6055
  function NavigationGroup(props) {
6004
6056
  const { title, children, startDecorator, level, ...rest } = props;
6005
- return /* @__PURE__ */ React44.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React44.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React44.createElement(Stack11, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ React44.createElement(AccordionDetails2, null, children));
6057
+ return /* @__PURE__ */ React46.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React46.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React46.createElement(Stack11, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ React46.createElement(AccordionDetails2, null, children));
6006
6058
  }
6007
6059
 
6008
6060
  // src/components/NavigationItem/NavigationItem.tsx
6009
- import React45 from "react";
6061
+ import React47 from "react";
6010
6062
  import {
6011
6063
  ListItem as JoyListItem,
6012
6064
  ListItemButton as JoyListItemButton,
6013
6065
  ListItemDecorator as JoyListItemDecorator,
6014
- styled as styled24,
6066
+ styled as styled25,
6015
6067
  listItemButtonClasses
6016
6068
  } from "@mui/joy";
6017
- var ListItemButton = styled24(JoyListItemButton, {
6069
+ var ListItemButton = styled25(JoyListItemButton, {
6018
6070
  name: "NavigationItem",
6019
6071
  slot: "Button",
6020
6072
  shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
@@ -6041,7 +6093,7 @@ function NavigationItem(props) {
6041
6093
  const handleClick = () => {
6042
6094
  onClick?.(id);
6043
6095
  };
6044
- return /* @__PURE__ */ React45.createElement(JoyListItem, { ...rest }, /* @__PURE__ */ React45.createElement(
6096
+ return /* @__PURE__ */ React47.createElement(JoyListItem, { ...rest }, /* @__PURE__ */ React47.createElement(
6045
6097
  ListItemButton,
6046
6098
  {
6047
6099
  level,
@@ -6050,21 +6102,21 @@ function NavigationItem(props) {
6050
6102
  "aria-current": selected,
6051
6103
  onClick: handleClick
6052
6104
  },
6053
- startDecorator && /* @__PURE__ */ React45.createElement(JoyListItemDecorator, null, startDecorator),
6105
+ startDecorator && /* @__PURE__ */ React47.createElement(JoyListItemDecorator, null, startDecorator),
6054
6106
  children
6055
6107
  ));
6056
6108
  }
6057
6109
 
6058
6110
  // src/components/Navigator/Navigator.tsx
6059
- import React46 from "react";
6111
+ import React48 from "react";
6060
6112
  function Navigator(props) {
6061
6113
  const { items, level = 0, onSelect } = props;
6062
6114
  const handleItemClick = (id) => {
6063
6115
  onSelect?.(id);
6064
6116
  };
6065
- return /* @__PURE__ */ React46.createElement("div", null, items.map((item, index) => {
6117
+ return /* @__PURE__ */ React48.createElement("div", null, items.map((item, index) => {
6066
6118
  if (item.type === "item") {
6067
- return /* @__PURE__ */ React46.createElement(
6119
+ return /* @__PURE__ */ React48.createElement(
6068
6120
  NavigationItem,
6069
6121
  {
6070
6122
  key: item.id,
@@ -6077,7 +6129,7 @@ function Navigator(props) {
6077
6129
  item.title
6078
6130
  );
6079
6131
  } else if (item.type === "group") {
6080
- return /* @__PURE__ */ React46.createElement(
6132
+ return /* @__PURE__ */ React48.createElement(
6081
6133
  NavigationGroup,
6082
6134
  {
6083
6135
  key: `${item.title}-${index}`,
@@ -6095,22 +6147,22 @@ function Navigator(props) {
6095
6147
  Navigator.displayName = "Navigator";
6096
6148
 
6097
6149
  // src/components/ProfileMenu/ProfileMenu.tsx
6098
- import React47, { useCallback as useCallback23, useMemo as useMemo14 } from "react";
6099
- import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as styled25, MenuButton as MenuButton2 } from "@mui/joy";
6150
+ import React49, { useCallback as useCallback25, useMemo as useMemo16 } from "react";
6151
+ import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as styled26, MenuButton as MenuButton2 } from "@mui/joy";
6100
6152
  import { ClickAwayListener as ClickAwayListener5 } from "@mui/base";
6101
6153
  import DropdownIcon from "@mui/icons-material/ArrowDropDown";
6102
- var StyledProfileCard = styled25(Stack, {
6154
+ var StyledProfileCard = styled26(Stack, {
6103
6155
  name: "ProfileMenu",
6104
6156
  slot: "item"
6105
6157
  })({});
6106
6158
  function ProfileCard(props) {
6107
6159
  const { children, chip, caption, size } = props;
6108
- const captionLevel = useMemo14(() => size === "sm" ? "body-xs" : "body-sm", [size]);
6109
- const nameLevel = useMemo14(() => size === "sm" ? "body-sm" : "body-md", [size]);
6110
- return /* @__PURE__ */ React47.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ React47.createElement(Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React47.createElement(Typography, { level: nameLevel, fontWeight: "bold", textColor: "text.primary" }, children), chip && /* @__PURE__ */ React47.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ React47.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
6160
+ const captionLevel = useMemo16(() => size === "sm" ? "body-xs" : "body-sm", [size]);
6161
+ const nameLevel = useMemo16(() => size === "sm" ? "body-sm" : "body-md", [size]);
6162
+ return /* @__PURE__ */ React49.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ React49.createElement(Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React49.createElement(Typography, { level: nameLevel, fontWeight: "bold", textColor: "text.primary" }, children), chip && /* @__PURE__ */ React49.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ React49.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
6111
6163
  }
6112
6164
  ProfileCard.displayName = "ProfileCard";
6113
- var StyledProfileMenuButton = styled25(MenuButton2, {
6165
+ var StyledProfileMenuButton = styled26(MenuButton2, {
6114
6166
  name: "ProfileMenu",
6115
6167
  slot: "button"
6116
6168
  })(({ theme }) => ({
@@ -6119,20 +6171,20 @@ var StyledProfileMenuButton = styled25(MenuButton2, {
6119
6171
  }));
6120
6172
  function ProfileMenuButton(props) {
6121
6173
  const { size = "md", src, alt, children, getInitial, ...innerProps } = props;
6122
- return /* @__PURE__ */ React47.createElement(
6174
+ return /* @__PURE__ */ React49.createElement(
6123
6175
  StyledProfileMenuButton,
6124
6176
  {
6125
6177
  variant: "plain",
6126
6178
  color: "neutral",
6127
6179
  size,
6128
- endDecorator: /* @__PURE__ */ React47.createElement(DropdownIcon, null),
6180
+ endDecorator: /* @__PURE__ */ React49.createElement(DropdownIcon, null),
6129
6181
  ...innerProps
6130
6182
  },
6131
- /* @__PURE__ */ React47.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
6183
+ /* @__PURE__ */ React49.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
6132
6184
  );
6133
6185
  }
6134
6186
  ProfileMenuButton.displayName = "ProfileMenuButton";
6135
- var ProfileMenuRoot = styled25(Menu, {
6187
+ var ProfileMenuRoot = styled26(Menu, {
6136
6188
  name: "ProfileMenu",
6137
6189
  slot: "root"
6138
6190
  })(({ theme }) => ({
@@ -6147,9 +6199,9 @@ function ProfileMenu(props) {
6147
6199
  const [open, setOpen] = useControlledState(
6148
6200
  _open,
6149
6201
  defaultOpen ?? false,
6150
- useCallback23((value) => onOpenChange?.(value), [onOpenChange])
6202
+ useCallback25((value) => onOpenChange?.(value), [onOpenChange])
6151
6203
  );
6152
- return /* @__PURE__ */ React47.createElement(ClickAwayListener5, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ React47.createElement("div", null, /* @__PURE__ */ React47.createElement(Dropdown2, { open }, /* @__PURE__ */ React47.createElement(
6204
+ return /* @__PURE__ */ React49.createElement(ClickAwayListener5, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement(Dropdown2, { open }, /* @__PURE__ */ React49.createElement(
6153
6205
  ProfileMenuButton,
6154
6206
  {
6155
6207
  size,
@@ -6159,7 +6211,7 @@ function ProfileMenu(props) {
6159
6211
  getInitial
6160
6212
  },
6161
6213
  profile.name
6162
- ), /* @__PURE__ */ React47.createElement(ProfileMenuRoot, { size, placement: "bottom-end", ...innerProps, onClose: () => setOpen(false) }, /* @__PURE__ */ React47.createElement(ProfileCard, { size, caption: profile.caption, chip: profile.chip }, profile.name), !!menuItems.length && /* @__PURE__ */ React47.createElement(ListDivider, null), menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ React47.createElement(
6214
+ ), /* @__PURE__ */ React49.createElement(ProfileMenuRoot, { size, placement: "bottom-end", ...innerProps, onClose: () => setOpen(false) }, /* @__PURE__ */ React49.createElement(ProfileCard, { size, caption: profile.caption, chip: profile.chip }, profile.name), !!menuItems.length && /* @__PURE__ */ React49.createElement(ListDivider, null), menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ React49.createElement(
6163
6215
  MenuItem,
6164
6216
  {
6165
6217
  key: label,
@@ -6175,30 +6227,30 @@ function ProfileMenu(props) {
6175
6227
  ProfileMenu.displayName = "ProfileMenu";
6176
6228
 
6177
6229
  // src/components/RadioList/RadioList.tsx
6178
- import React48 from "react";
6230
+ import React50 from "react";
6179
6231
  function RadioList(props) {
6180
6232
  const { items, ...innerProps } = props;
6181
- return /* @__PURE__ */ React48.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React48.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
6233
+ return /* @__PURE__ */ React50.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React50.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
6182
6234
  }
6183
6235
  RadioList.displayName = "RadioList";
6184
6236
 
6185
6237
  // src/components/Stepper/Stepper.tsx
6186
- import React49 from "react";
6238
+ import React51 from "react";
6187
6239
  import {
6188
6240
  Stepper as JoyStepper,
6189
6241
  Step as JoyStep,
6190
6242
  StepIndicator as JoyStepIndicator,
6191
6243
  stepClasses,
6192
6244
  stepIndicatorClasses,
6193
- styled as styled26
6245
+ styled as styled27
6194
6246
  } from "@mui/joy";
6195
6247
  import CheckIcon from "@mui/icons-material/Check";
6196
6248
  import { motion as motion27 } from "framer-motion";
6197
- var Step = styled26(JoyStep)({});
6249
+ var Step = styled27(JoyStep)({});
6198
6250
  Step.displayName = "Step";
6199
- var StepIndicator = styled26(JoyStepIndicator)({});
6251
+ var StepIndicator = styled27(JoyStepIndicator)({});
6200
6252
  StepIndicator.displayName = "StepIndicator";
6201
- var StyledStepper = styled26(JoyStepper)(({ theme }) => ({
6253
+ var StyledStepper = styled27(JoyStepper)(({ theme }) => ({
6202
6254
  "--StepIndicator-size": "24px",
6203
6255
  "--Step-gap": theme.spacing(2),
6204
6256
  "--joy-palette-success-solidBg": "var(--joy-palette-success-400)",
@@ -6216,7 +6268,7 @@ function Stepper(props) {
6216
6268
  inactiveLineColor = "neutral.300",
6217
6269
  activeStep
6218
6270
  } = props;
6219
- return /* @__PURE__ */ React49.createElement(
6271
+ return /* @__PURE__ */ React51.createElement(
6220
6272
  MotionStepper,
6221
6273
  {
6222
6274
  sx: (theme) => ({
@@ -6250,16 +6302,16 @@ function Stepper(props) {
6250
6302
  const completed = activeStep > i + 1;
6251
6303
  const disabled = activeStep < i + 1;
6252
6304
  const hasContent = step.label || step.extraContent;
6253
- return /* @__PURE__ */ React49.createElement(
6305
+ return /* @__PURE__ */ React51.createElement(
6254
6306
  Step,
6255
6307
  {
6256
6308
  key: `step-${i}`,
6257
- indicator: /* @__PURE__ */ React49.createElement(StepIndicator, { variant: "solid", color: "primary" }, completed ? /* @__PURE__ */ React49.createElement(CheckIcon, null) : step.indicatorContent),
6309
+ indicator: /* @__PURE__ */ React51.createElement(StepIndicator, { variant: "solid", color: "primary" }, completed ? /* @__PURE__ */ React51.createElement(CheckIcon, null) : step.indicatorContent),
6258
6310
  active,
6259
6311
  completed,
6260
6312
  disabled
6261
6313
  },
6262
- hasContent && /* @__PURE__ */ React49.createElement(Stack_default, null, step.label && /* @__PURE__ */ React49.createElement(Typography_default, { level: "title-sm" }, step.label), step.extraContent && /* @__PURE__ */ React49.createElement(Typography_default, { level: "body-xs" }, step.extraContent))
6314
+ hasContent && /* @__PURE__ */ React51.createElement(Stack_default, null, step.label && /* @__PURE__ */ React51.createElement(Typography_default, { level: "title-sm" }, step.label), step.extraContent && /* @__PURE__ */ React51.createElement(Typography_default, { level: "body-xs" }, step.extraContent))
6263
6315
  );
6264
6316
  })
6265
6317
  );
@@ -6267,11 +6319,11 @@ function Stepper(props) {
6267
6319
  Stepper.displayName = "Stepper";
6268
6320
 
6269
6321
  // src/components/Switch/Switch.tsx
6270
- import React50 from "react";
6271
- import { Switch as JoySwitch, styled as styled27, switchClasses } from "@mui/joy";
6322
+ import React52 from "react";
6323
+ import { Switch as JoySwitch, styled as styled28, switchClasses } from "@mui/joy";
6272
6324
  import { motion as motion28 } from "framer-motion";
6273
6325
  var MotionSwitch = motion28(JoySwitch);
6274
- var StyledThumb = styled27(motion28.div)({
6326
+ var StyledThumb = styled28(motion28.div)({
6275
6327
  "--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
6276
6328
  display: "inline-flex",
6277
6329
  justifyContent: "center",
@@ -6289,14 +6341,14 @@ var StyledThumb = styled27(motion28.div)({
6289
6341
  right: "var(--Switch-thumbOffset)"
6290
6342
  }
6291
6343
  });
6292
- var Thumb = (props) => /* @__PURE__ */ React50.createElement(StyledThumb, { ...props, layout: true, transition: spring });
6344
+ var Thumb = (props) => /* @__PURE__ */ React52.createElement(StyledThumb, { ...props, layout: true, transition: spring });
6293
6345
  var spring = {
6294
6346
  type: "spring",
6295
6347
  stiffness: 700,
6296
6348
  damping: 30
6297
6349
  };
6298
6350
  var Switch = (props) => {
6299
- return /* @__PURE__ */ React50.createElement(
6351
+ return /* @__PURE__ */ React52.createElement(
6300
6352
  MotionSwitch,
6301
6353
  {
6302
6354
  ...props,
@@ -6310,21 +6362,21 @@ var Switch = (props) => {
6310
6362
  Switch.displayName = "Switch";
6311
6363
 
6312
6364
  // src/components/Tabs/Tabs.tsx
6313
- import React51, { forwardRef as forwardRef11 } from "react";
6365
+ import React53, { forwardRef as forwardRef11 } from "react";
6314
6366
  import {
6315
6367
  Tabs as JoyTabs,
6316
6368
  Tab as JoyTab,
6317
6369
  TabList as JoyTabList,
6318
6370
  TabPanel as JoyTabPanel,
6319
- styled as styled28,
6371
+ styled as styled29,
6320
6372
  tabClasses
6321
6373
  } from "@mui/joy";
6322
- var StyledTabs = styled28(JoyTabs)(({ theme }) => ({
6374
+ var StyledTabs = styled29(JoyTabs)(({ theme }) => ({
6323
6375
  backgroundColor: theme.palette.background.body
6324
6376
  }));
6325
6377
  var Tabs = StyledTabs;
6326
6378
  Tabs.displayName = "Tabs";
6327
- var StyledTab = styled28(JoyTab)(({ theme }) => ({
6379
+ var StyledTab = styled29(JoyTab)(({ theme }) => ({
6328
6380
  gap: theme.spacing(2),
6329
6381
  [`&:not(.${tabClasses.selected})`]: {
6330
6382
  color: theme.palette.neutral[700]
@@ -6334,14 +6386,14 @@ var StyledTab = styled28(JoyTab)(({ theme }) => ({
6334
6386
  }
6335
6387
  }));
6336
6388
  var Tab = forwardRef11(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
6337
- return /* @__PURE__ */ React51.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
6389
+ return /* @__PURE__ */ React53.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
6338
6390
  });
6339
6391
  Tab.displayName = "Tab";
6340
6392
  var TabList = JoyTabList;
6341
6393
  var TabPanel = JoyTabPanel;
6342
6394
 
6343
6395
  // src/components/ThemeProvider/ThemeProvider.tsx
6344
- import React52 from "react";
6396
+ import React54 from "react";
6345
6397
  import { CssBaseline, CssVarsProvider, checkboxClasses, extendTheme, inputClasses } from "@mui/joy";
6346
6398
  var colorScheme = {
6347
6399
  palette: {
@@ -6620,7 +6672,7 @@ var defaultTheme = extendTheme({
6620
6672
  });
6621
6673
  function ThemeProvider(props) {
6622
6674
  const theme = props.theme || defaultTheme;
6623
- return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(CssVarsProvider, { theme }, /* @__PURE__ */ React52.createElement(CssBaseline, null), props.children));
6675
+ return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(CssVarsProvider, { theme }, /* @__PURE__ */ React54.createElement(CssBaseline, null), props.children));
6624
6676
  }
6625
6677
  ThemeProvider.displayName = "ThemeProvider";
6626
6678
  export {
@@ -6786,7 +6838,7 @@ export {
6786
6838
  stepButtonClasses,
6787
6839
  stepClasses2 as stepClasses,
6788
6840
  stepperClasses,
6789
- styled29 as styled,
6841
+ styled30 as styled,
6790
6842
  switchClasses2 as switchClasses,
6791
6843
  tabListClasses,
6792
6844
  tabPanelClasses,