@ceed/cds 1.13.3 → 1.13.4
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/components/Input/Input.d.ts +9 -1
- package/dist/index.cjs +25 -1
- package/dist/index.js +57 -33
- package/framer/index.js +37 -37
- package/package.json +1 -1
|
@@ -5,11 +5,19 @@ declare const Input: React.ForwardRefExoticComponent<Omit<{
|
|
|
5
5
|
helperText?: React.ReactNode;
|
|
6
6
|
error?: boolean | undefined;
|
|
7
7
|
enableClearable?: boolean | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Disables the password toggle button for password inputs.
|
|
10
|
+
* This has no effect when type is not "password".
|
|
11
|
+
*/
|
|
12
|
+
disableTogglePasswordButton?: boolean | undefined;
|
|
8
13
|
} & {
|
|
9
14
|
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
10
15
|
} & Pick<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "autoFocus" | "id" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "onClick" | "disabled" | "type" | "name" | "value" | "autoComplete" | "placeholder" | "readOnly" | "required"> & {
|
|
11
16
|
className?: string | undefined;
|
|
12
|
-
color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").InputPropsColorOverrides> | undefined;
|
|
17
|
+
color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").InputPropsColorOverrides> | undefined; /**
|
|
18
|
+
* @see https://github.com/Ecube-Labs/hds/pull/36#discussion_r1722720909
|
|
19
|
+
* NOTE: onChange(React.SyntheticEvent)의 타입과 맞지 않아 타입 에러가 발생. 이대로 사용하다가 문제가 생기면 대응한다.
|
|
20
|
+
*/
|
|
13
21
|
endDecorator?: React.ReactNode;
|
|
14
22
|
error?: boolean | undefined;
|
|
15
23
|
fullWidth?: boolean | undefined;
|
package/dist/index.cjs
CHANGED
|
@@ -1569,6 +1569,8 @@ var import_react16 = __toESM(require("react"));
|
|
|
1569
1569
|
var import_joy22 = require("@mui/joy");
|
|
1570
1570
|
var import_framer_motion15 = require("framer-motion");
|
|
1571
1571
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
1572
|
+
var import_Visibility = __toESM(require("@mui/icons-material/Visibility"));
|
|
1573
|
+
var import_VisibilityOff = __toESM(require("@mui/icons-material/VisibilityOff"));
|
|
1572
1574
|
var MotionInput = (0, import_framer_motion15.motion)(import_joy22.Input);
|
|
1573
1575
|
var Input = import_react16.default.forwardRef((props, ref) => {
|
|
1574
1576
|
const {
|
|
@@ -1582,12 +1584,18 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1582
1584
|
required,
|
|
1583
1585
|
onChange,
|
|
1584
1586
|
name,
|
|
1587
|
+
type,
|
|
1585
1588
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
1586
1589
|
sx,
|
|
1587
1590
|
className,
|
|
1588
1591
|
enableClearable,
|
|
1592
|
+
disableTogglePasswordButton,
|
|
1589
1593
|
...innerProps
|
|
1590
1594
|
} = props;
|
|
1595
|
+
if (type === "password" && innerProps.endDecorator) {
|
|
1596
|
+
console.warn('Input: endDecorator is not supported when type="password"');
|
|
1597
|
+
}
|
|
1598
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react16.useState)(false);
|
|
1591
1599
|
const [value, setValue] = useControlledState(
|
|
1592
1600
|
props.value,
|
|
1593
1601
|
props.defaultValue,
|
|
@@ -1611,6 +1619,12 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1611
1619
|
const handleClear = () => {
|
|
1612
1620
|
setValue(props.defaultValue || "");
|
|
1613
1621
|
};
|
|
1622
|
+
const handleTogglePasswordVisibility = () => {
|
|
1623
|
+
setPasswordVisible((prev) => !prev);
|
|
1624
|
+
};
|
|
1625
|
+
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
1626
|
+
const isPasswordType = type === "password";
|
|
1627
|
+
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
1614
1628
|
const input = /* @__PURE__ */ import_react16.default.createElement(
|
|
1615
1629
|
MotionInput,
|
|
1616
1630
|
{
|
|
@@ -1620,12 +1634,22 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1620
1634
|
required,
|
|
1621
1635
|
color: error ? "danger" : color,
|
|
1622
1636
|
disabled,
|
|
1637
|
+
type: actualType,
|
|
1623
1638
|
slotProps: {
|
|
1624
1639
|
input: { ref, ...innerProps.slotProps?.input },
|
|
1625
1640
|
...innerProps.slotProps
|
|
1626
1641
|
},
|
|
1627
1642
|
...innerProps,
|
|
1628
|
-
endDecorator:
|
|
1643
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ import_react16.default.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ import_react16.default.createElement(
|
|
1644
|
+
IconButton_default,
|
|
1645
|
+
{
|
|
1646
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1647
|
+
onClick: handleTogglePasswordVisibility,
|
|
1648
|
+
disabled,
|
|
1649
|
+
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
1650
|
+
},
|
|
1651
|
+
passwordVisible ? /* @__PURE__ */ import_react16.default.createElement(import_VisibilityOff.default, null) : /* @__PURE__ */ import_react16.default.createElement(import_Visibility.default, null)
|
|
1652
|
+
)) : null : enableClearable ? /* @__PURE__ */ import_react16.default.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ import_react16.default.createElement(
|
|
1629
1653
|
IconButton_default,
|
|
1630
1654
|
{
|
|
1631
1655
|
onMouseDown: (e) => e.preventDefault(),
|
package/dist/index.js
CHANGED
|
@@ -1482,15 +1482,17 @@ var Container = forwardRef5(function Container2(props, ref) {
|
|
|
1482
1482
|
Container.displayName = "Container";
|
|
1483
1483
|
|
|
1484
1484
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1485
|
-
import React15, { useCallback as useCallback6, useMemo as useMemo5, useState as
|
|
1485
|
+
import React15, { useCallback as useCallback6, useMemo as useMemo5, useState as useState5 } from "react";
|
|
1486
1486
|
import { IntlMessageFormat as IntlMessageFormat2 } from "intl-messageformat";
|
|
1487
1487
|
import { NumericFormat } from "react-number-format";
|
|
1488
1488
|
|
|
1489
1489
|
// src/components/Input/Input.tsx
|
|
1490
|
-
import React14, { useCallback as useCallback5 } from "react";
|
|
1490
|
+
import React14, { useCallback as useCallback5, useState as useState4 } from "react";
|
|
1491
1491
|
import { Input as JoyInput } from "@mui/joy";
|
|
1492
1492
|
import { motion as motion15 } from "framer-motion";
|
|
1493
1493
|
import ClearIcon from "@mui/icons-material/Close";
|
|
1494
|
+
import VisibilityIcon from "@mui/icons-material/Visibility";
|
|
1495
|
+
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
|
1494
1496
|
var MotionInput = motion15(JoyInput);
|
|
1495
1497
|
var Input = React14.forwardRef((props, ref) => {
|
|
1496
1498
|
const {
|
|
@@ -1504,12 +1506,18 @@ var Input = React14.forwardRef((props, ref) => {
|
|
|
1504
1506
|
required,
|
|
1505
1507
|
onChange,
|
|
1506
1508
|
name,
|
|
1509
|
+
type,
|
|
1507
1510
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
1508
1511
|
sx,
|
|
1509
1512
|
className,
|
|
1510
1513
|
enableClearable,
|
|
1514
|
+
disableTogglePasswordButton,
|
|
1511
1515
|
...innerProps
|
|
1512
1516
|
} = props;
|
|
1517
|
+
if (type === "password" && innerProps.endDecorator) {
|
|
1518
|
+
console.warn('Input: endDecorator is not supported when type="password"');
|
|
1519
|
+
}
|
|
1520
|
+
const [passwordVisible, setPasswordVisible] = useState4(false);
|
|
1513
1521
|
const [value, setValue] = useControlledState(
|
|
1514
1522
|
props.value,
|
|
1515
1523
|
props.defaultValue,
|
|
@@ -1533,6 +1541,12 @@ var Input = React14.forwardRef((props, ref) => {
|
|
|
1533
1541
|
const handleClear = () => {
|
|
1534
1542
|
setValue(props.defaultValue || "");
|
|
1535
1543
|
};
|
|
1544
|
+
const handleTogglePasswordVisibility = () => {
|
|
1545
|
+
setPasswordVisible((prev) => !prev);
|
|
1546
|
+
};
|
|
1547
|
+
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
1548
|
+
const isPasswordType = type === "password";
|
|
1549
|
+
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
1536
1550
|
const input = /* @__PURE__ */ React14.createElement(
|
|
1537
1551
|
MotionInput,
|
|
1538
1552
|
{
|
|
@@ -1542,12 +1556,22 @@ var Input = React14.forwardRef((props, ref) => {
|
|
|
1542
1556
|
required,
|
|
1543
1557
|
color: error ? "danger" : color,
|
|
1544
1558
|
disabled,
|
|
1559
|
+
type: actualType,
|
|
1545
1560
|
slotProps: {
|
|
1546
1561
|
input: { ref, ...innerProps.slotProps?.input },
|
|
1547
1562
|
...innerProps.slotProps
|
|
1548
1563
|
},
|
|
1549
1564
|
...innerProps,
|
|
1550
|
-
endDecorator:
|
|
1565
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ React14.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ React14.createElement(
|
|
1566
|
+
IconButton_default,
|
|
1567
|
+
{
|
|
1568
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1569
|
+
onClick: handleTogglePasswordVisibility,
|
|
1570
|
+
disabled,
|
|
1571
|
+
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
1572
|
+
},
|
|
1573
|
+
passwordVisible ? /* @__PURE__ */ React14.createElement(VisibilityOffIcon, null) : /* @__PURE__ */ React14.createElement(VisibilityIcon, null)
|
|
1574
|
+
)) : null : enableClearable ? /* @__PURE__ */ React14.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ React14.createElement(
|
|
1551
1575
|
IconButton_default,
|
|
1552
1576
|
{
|
|
1553
1577
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -1800,7 +1824,7 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
|
1800
1824
|
}
|
|
1801
1825
|
return props.max;
|
|
1802
1826
|
}, [props.max, useMinorUnit, decimalScale]);
|
|
1803
|
-
const [isOverLimit, setIsOverLimit] =
|
|
1827
|
+
const [isOverLimit, setIsOverLimit] = useState5(!!max && !!value && value > max);
|
|
1804
1828
|
const handleChange = useCallback6(
|
|
1805
1829
|
(event) => {
|
|
1806
1830
|
if (event.target.value === "") {
|
|
@@ -2118,7 +2142,7 @@ var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React16.createElement(
|
|
|
2118
2142
|
// src/components/DataTable/components.tsx
|
|
2119
2143
|
import React22, {
|
|
2120
2144
|
useRef as useRef4,
|
|
2121
|
-
useState as
|
|
2145
|
+
useState as useState7,
|
|
2122
2146
|
useLayoutEffect,
|
|
2123
2147
|
useMemo as useMemo8,
|
|
2124
2148
|
useCallback as useCallback8,
|
|
@@ -2130,7 +2154,7 @@ import { styled as styled12, useTheme } from "@mui/joy";
|
|
|
2130
2154
|
import { AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
2131
2155
|
|
|
2132
2156
|
// src/components/DatePicker/DatePicker.tsx
|
|
2133
|
-
import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as
|
|
2157
|
+
import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState6 } from "react";
|
|
2134
2158
|
import { IMaskInput, IMask } from "react-imask";
|
|
2135
2159
|
import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
|
|
2136
2160
|
import { styled as styled10, useThemeProps as useThemeProps4 } from "@mui/joy";
|
|
@@ -2311,10 +2335,10 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2311
2335
|
props.defaultValue || "",
|
|
2312
2336
|
useCallback7((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
2313
2337
|
);
|
|
2314
|
-
const [displayValue, setDisplayValue] =
|
|
2338
|
+
const [displayValue, setDisplayValue] = useState6(
|
|
2315
2339
|
() => value ? formatValueString(parseDate(value, format), displayFormat) : ""
|
|
2316
2340
|
);
|
|
2317
|
-
const [anchorEl, setAnchorEl] =
|
|
2341
|
+
const [anchorEl, setAnchorEl] = useState6(null);
|
|
2318
2342
|
const open = Boolean(anchorEl);
|
|
2319
2343
|
useEffect3(() => {
|
|
2320
2344
|
if (!anchorEl) {
|
|
@@ -2685,7 +2709,7 @@ var InfoSign_default = InfoSign;
|
|
|
2685
2709
|
// src/components/DataTable/components.tsx
|
|
2686
2710
|
var TextEllipsis = ({ children }) => {
|
|
2687
2711
|
const textRef = useRef4(null);
|
|
2688
|
-
const [showTooltip, setShowTooltip] =
|
|
2712
|
+
const [showTooltip, setShowTooltip] = useState7(false);
|
|
2689
2713
|
useLayoutEffect(() => {
|
|
2690
2714
|
const element = textRef.current;
|
|
2691
2715
|
if (element) {
|
|
@@ -2701,7 +2725,7 @@ var TextEllipsis = ({ children }) => {
|
|
|
2701
2725
|
};
|
|
2702
2726
|
var CellTextEllipsis = ({ children }) => {
|
|
2703
2727
|
const textRef = useRef4(null);
|
|
2704
|
-
const [showTooltip, setShowTooltip] =
|
|
2728
|
+
const [showTooltip, setShowTooltip] = useState7(false);
|
|
2705
2729
|
useLayoutEffect(() => {
|
|
2706
2730
|
const element = textRef.current;
|
|
2707
2731
|
if (element) {
|
|
@@ -2753,7 +2777,7 @@ var HeadCell = (props) => {
|
|
|
2753
2777
|
const theme = useTheme();
|
|
2754
2778
|
const ref = headerRef;
|
|
2755
2779
|
const colRef = tableColRef;
|
|
2756
|
-
const [isHovered, setIsHovered] =
|
|
2780
|
+
const [isHovered, setIsHovered] = useState7(false);
|
|
2757
2781
|
const sortable = type === "actions" ? false : _sortable;
|
|
2758
2782
|
const headId = useMemo8(
|
|
2759
2783
|
() => `${tableId}_header_${headerName ?? field}`.trim(),
|
|
@@ -2867,7 +2891,7 @@ var BodyCell = (props) => {
|
|
|
2867
2891
|
onCellEditStop
|
|
2868
2892
|
} = props;
|
|
2869
2893
|
const theme = useTheme();
|
|
2870
|
-
const [value, setValue] =
|
|
2894
|
+
const [value, setValue] = useState7(row[field]);
|
|
2871
2895
|
const cellRef = useRef4(null);
|
|
2872
2896
|
const params = useMemo8(
|
|
2873
2897
|
() => ({
|
|
@@ -3083,9 +3107,9 @@ var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
|
|
|
3083
3107
|
});
|
|
3084
3108
|
|
|
3085
3109
|
// src/components/DataTable/hooks.ts
|
|
3086
|
-
import { useState as
|
|
3110
|
+
import { useState as useState8, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useMemo as useMemo9, useCallback as useCallback9, useEffect as useEffect5, createRef } from "react";
|
|
3087
3111
|
function useColumnWidths(columnsByField) {
|
|
3088
|
-
const [widths, setWidths] =
|
|
3112
|
+
const [widths, setWidths] = useState8({});
|
|
3089
3113
|
const roRef = useRef5();
|
|
3090
3114
|
useLayoutEffect2(() => {
|
|
3091
3115
|
if (roRef.current) roRef.current.disconnect();
|
|
@@ -3143,7 +3167,7 @@ function useDataTableRenderer({
|
|
|
3143
3167
|
}
|
|
3144
3168
|
const onSelectionModelChangeRef = useRef5(onSelectionModelChange);
|
|
3145
3169
|
onSelectionModelChangeRef.current = onSelectionModelChange;
|
|
3146
|
-
const [focusedRowId, setFocusedRowId] =
|
|
3170
|
+
const [focusedRowId, setFocusedRowId] = useState8(null);
|
|
3147
3171
|
const [sortModel, setSortModel] = useControlledState(
|
|
3148
3172
|
controlledSortModel,
|
|
3149
3173
|
initialState?.sorting?.sortModel ?? [],
|
|
@@ -3203,7 +3227,7 @@ function useDataTableRenderer({
|
|
|
3203
3227
|
() => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
|
|
3204
3228
|
[_sortOrder]
|
|
3205
3229
|
);
|
|
3206
|
-
const [page, setPage] =
|
|
3230
|
+
const [page, setPage] = useState8(paginationModel?.page || 1);
|
|
3207
3231
|
const pageSize = paginationModel?.pageSize || 20;
|
|
3208
3232
|
const getId = useCallback9(
|
|
3209
3233
|
(row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
|
|
@@ -3942,7 +3966,7 @@ var DataTable = forwardRef7(Component);
|
|
|
3942
3966
|
DataTable.displayName = "DataTable";
|
|
3943
3967
|
|
|
3944
3968
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
3945
|
-
import React26, { forwardRef as forwardRef8, useCallback as useCallback12, useEffect as useEffect7, useImperativeHandle as useImperativeHandle3, useMemo as useMemo11, useRef as useRef7, useState as
|
|
3969
|
+
import React26, { forwardRef as forwardRef8, useCallback as useCallback12, useEffect as useEffect7, useImperativeHandle as useImperativeHandle3, useMemo as useMemo11, useRef as useRef7, useState as useState9 } from "react";
|
|
3946
3970
|
import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
|
|
3947
3971
|
import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
|
|
3948
3972
|
import { styled as styled14, useThemeProps as useThemeProps5 } from "@mui/joy";
|
|
@@ -4110,10 +4134,10 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4110
4134
|
props.defaultValue || "",
|
|
4111
4135
|
useCallback12((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
4112
4136
|
);
|
|
4113
|
-
const [displayValue, setDisplayValue] =
|
|
4137
|
+
const [displayValue, setDisplayValue] = useState9(
|
|
4114
4138
|
() => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
|
|
4115
4139
|
);
|
|
4116
|
-
const [anchorEl, setAnchorEl] =
|
|
4140
|
+
const [anchorEl, setAnchorEl] = useState9(null);
|
|
4117
4141
|
const open = Boolean(anchorEl);
|
|
4118
4142
|
const calendarValue = useMemo11(
|
|
4119
4143
|
() => value ? parseDates(value, format) : void 0,
|
|
@@ -4476,13 +4500,13 @@ function IconMenuButton(props) {
|
|
|
4476
4500
|
IconMenuButton.displayName = "IconMenuButton";
|
|
4477
4501
|
|
|
4478
4502
|
// src/components/Markdown/Markdown.tsx
|
|
4479
|
-
import React32, { lazy, Suspense, useEffect as useEffect8, useState as
|
|
4503
|
+
import React32, { lazy, Suspense, useEffect as useEffect8, useState as useState10 } from "react";
|
|
4480
4504
|
import { Skeleton } from "@mui/joy";
|
|
4481
4505
|
import { Link as Link2 } from "@mui/joy";
|
|
4482
4506
|
import remarkGfm from "remark-gfm";
|
|
4483
4507
|
var LazyReactMarkdown = lazy(() => import("react-markdown"));
|
|
4484
4508
|
var Markdown = (props) => {
|
|
4485
|
-
const [rehypeAccent2, setRehypeAccent] =
|
|
4509
|
+
const [rehypeAccent2, setRehypeAccent] = useState10(null);
|
|
4486
4510
|
useEffect8(() => {
|
|
4487
4511
|
const loadRehypeAccent = async () => {
|
|
4488
4512
|
const module = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
@@ -4589,7 +4613,7 @@ function MenuButton(props) {
|
|
|
4589
4613
|
MenuButton.displayName = "MenuButton";
|
|
4590
4614
|
|
|
4591
4615
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
4592
|
-
import React34, { forwardRef as forwardRef9, useCallback as useCallback13, useEffect as useEffect9, useImperativeHandle as useImperativeHandle4, useRef as useRef8, useState as
|
|
4616
|
+
import React34, { forwardRef as forwardRef9, useCallback as useCallback13, useEffect as useEffect9, useImperativeHandle as useImperativeHandle4, useRef as useRef8, useState as useState11 } from "react";
|
|
4593
4617
|
import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
|
|
4594
4618
|
import { styled as styled21, useThemeProps as useThemeProps6 } from "@mui/joy";
|
|
4595
4619
|
import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
|
|
@@ -4689,8 +4713,8 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
4689
4713
|
},
|
|
4690
4714
|
[format, displayFormat, locale]
|
|
4691
4715
|
);
|
|
4692
|
-
const [displayValue, setDisplayValue] =
|
|
4693
|
-
const [anchorEl, setAnchorEl] =
|
|
4716
|
+
const [displayValue, setDisplayValue] = useState11(() => getFormattedDisplayValue(value));
|
|
4717
|
+
const [anchorEl, setAnchorEl] = useState11(null);
|
|
4694
4718
|
const open = Boolean(anchorEl);
|
|
4695
4719
|
useEffect9(() => {
|
|
4696
4720
|
if (!anchorEl) {
|
|
@@ -4842,7 +4866,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
4842
4866
|
});
|
|
4843
4867
|
|
|
4844
4868
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
4845
|
-
import React35, { forwardRef as forwardRef10, useCallback as useCallback14, useEffect as useEffect10, useImperativeHandle as useImperativeHandle5, useMemo as useMemo12, useRef as useRef9, useState as
|
|
4869
|
+
import React35, { forwardRef as forwardRef10, useCallback as useCallback14, useEffect as useEffect10, useImperativeHandle as useImperativeHandle5, useMemo as useMemo12, useRef as useRef9, useState as useState12 } from "react";
|
|
4846
4870
|
import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
|
|
4847
4871
|
import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
|
|
4848
4872
|
import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
|
|
@@ -4956,7 +4980,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
4956
4980
|
props.defaultValue || "",
|
|
4957
4981
|
useCallback14((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
4958
4982
|
);
|
|
4959
|
-
const [anchorEl, setAnchorEl] =
|
|
4983
|
+
const [anchorEl, setAnchorEl] = useState12(null);
|
|
4960
4984
|
const open = Boolean(anchorEl);
|
|
4961
4985
|
const calendarValue = useMemo12(() => value ? parseDates2(value) : void 0, [value]);
|
|
4962
4986
|
useEffect10(() => {
|
|
@@ -5205,7 +5229,7 @@ function Navigator(props) {
|
|
|
5205
5229
|
Navigator.displayName = "Navigator";
|
|
5206
5230
|
|
|
5207
5231
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
5208
|
-
import React39, { useCallback as useCallback15, useMemo as useMemo13, useState as
|
|
5232
|
+
import React39, { useCallback as useCallback15, useMemo as useMemo13, useState as useState13 } from "react";
|
|
5209
5233
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
5210
5234
|
import { styled as styled25, useThemeProps as useThemeProps8 } from "@mui/joy";
|
|
5211
5235
|
var padDecimal = (value, decimalScale) => {
|
|
@@ -5264,7 +5288,7 @@ var PercentageInput = React39.forwardRef(
|
|
|
5264
5288
|
props.defaultValue,
|
|
5265
5289
|
useCallback15((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
5266
5290
|
);
|
|
5267
|
-
const [internalError, setInternalError] =
|
|
5291
|
+
const [internalError, setInternalError] = useState13(
|
|
5268
5292
|
max && _value && _value > max || min && _value && _value < min
|
|
5269
5293
|
);
|
|
5270
5294
|
const value = useMemo13(() => {
|
|
@@ -5758,7 +5782,7 @@ function ThemeProvider(props) {
|
|
|
5758
5782
|
ThemeProvider.displayName = "ThemeProvider";
|
|
5759
5783
|
|
|
5760
5784
|
// src/components/Uploader/Uploader.tsx
|
|
5761
|
-
import React45, { useCallback as useCallback16, useEffect as useEffect11, useMemo as useMemo14, useRef as useRef10, useState as
|
|
5785
|
+
import React45, { useCallback as useCallback16, useEffect as useEffect11, useMemo as useMemo14, useRef as useRef10, useState as useState14 } from "react";
|
|
5762
5786
|
import { styled as styled29, Input as Input2 } from "@mui/joy";
|
|
5763
5787
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
5764
5788
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
@@ -5909,10 +5933,10 @@ var Uploader = React45.memo(
|
|
|
5909
5933
|
} = props;
|
|
5910
5934
|
const dropZoneRef = useRef10(null);
|
|
5911
5935
|
const inputRef = useRef10(null);
|
|
5912
|
-
const [errorText, setErrorText] =
|
|
5913
|
-
const [files, setFiles] =
|
|
5914
|
-
const [uploaded, setUploaded] =
|
|
5915
|
-
const [previewState, setPreviewState] =
|
|
5936
|
+
const [errorText, setErrorText] = useState14();
|
|
5937
|
+
const [files, setFiles] = useState14([]);
|
|
5938
|
+
const [uploaded, setUploaded] = useState14(props.uploaded || []);
|
|
5939
|
+
const [previewState, setPreviewState] = useState14("idle");
|
|
5916
5940
|
const accepts = useMemo14(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
5917
5941
|
const parsedAccepts = useMemo14(
|
|
5918
5942
|
() => accepts.flatMap((type) => {
|