@ceed/ads 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 +59 -35
- package/framer/index.js +36 -36
- 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
|
@@ -1568,6 +1568,8 @@ var import_react16 = __toESM(require("react"));
|
|
|
1568
1568
|
var import_joy22 = require("@mui/joy");
|
|
1569
1569
|
var import_framer_motion15 = require("framer-motion");
|
|
1570
1570
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
1571
|
+
var import_Visibility = __toESM(require("@mui/icons-material/Visibility"));
|
|
1572
|
+
var import_VisibilityOff = __toESM(require("@mui/icons-material/VisibilityOff"));
|
|
1571
1573
|
var MotionInput = (0, import_framer_motion15.motion)(import_joy22.Input);
|
|
1572
1574
|
var Input = import_react16.default.forwardRef((props, ref) => {
|
|
1573
1575
|
const {
|
|
@@ -1581,12 +1583,18 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1581
1583
|
required,
|
|
1582
1584
|
onChange,
|
|
1583
1585
|
name,
|
|
1586
|
+
type,
|
|
1584
1587
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
1585
1588
|
sx,
|
|
1586
1589
|
className,
|
|
1587
1590
|
enableClearable,
|
|
1591
|
+
disableTogglePasswordButton,
|
|
1588
1592
|
...innerProps
|
|
1589
1593
|
} = props;
|
|
1594
|
+
if (type === "password" && innerProps.endDecorator) {
|
|
1595
|
+
console.warn('Input: endDecorator is not supported when type="password"');
|
|
1596
|
+
}
|
|
1597
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react16.useState)(false);
|
|
1590
1598
|
const [value, setValue] = useControlledState(
|
|
1591
1599
|
props.value,
|
|
1592
1600
|
props.defaultValue,
|
|
@@ -1610,6 +1618,12 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1610
1618
|
const handleClear = () => {
|
|
1611
1619
|
setValue(props.defaultValue || "");
|
|
1612
1620
|
};
|
|
1621
|
+
const handleTogglePasswordVisibility = () => {
|
|
1622
|
+
setPasswordVisible((prev) => !prev);
|
|
1623
|
+
};
|
|
1624
|
+
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
1625
|
+
const isPasswordType = type === "password";
|
|
1626
|
+
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
1613
1627
|
const input = /* @__PURE__ */ import_react16.default.createElement(
|
|
1614
1628
|
MotionInput,
|
|
1615
1629
|
{
|
|
@@ -1619,12 +1633,22 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1619
1633
|
required,
|
|
1620
1634
|
color: error ? "danger" : color,
|
|
1621
1635
|
disabled,
|
|
1636
|
+
type: actualType,
|
|
1622
1637
|
slotProps: {
|
|
1623
1638
|
input: { ref, ...innerProps.slotProps?.input },
|
|
1624
1639
|
...innerProps.slotProps
|
|
1625
1640
|
},
|
|
1626
1641
|
...innerProps,
|
|
1627
|
-
endDecorator:
|
|
1642
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ import_react16.default.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ import_react16.default.createElement(
|
|
1643
|
+
IconButton_default,
|
|
1644
|
+
{
|
|
1645
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1646
|
+
onClick: handleTogglePasswordVisibility,
|
|
1647
|
+
disabled,
|
|
1648
|
+
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
1649
|
+
},
|
|
1650
|
+
passwordVisible ? /* @__PURE__ */ import_react16.default.createElement(import_VisibilityOff.default, null) : /* @__PURE__ */ import_react16.default.createElement(import_Visibility.default, null)
|
|
1651
|
+
)) : null : enableClearable ? /* @__PURE__ */ import_react16.default.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ import_react16.default.createElement(
|
|
1628
1652
|
IconButton_default,
|
|
1629
1653
|
{
|
|
1630
1654
|
onMouseDown: (e) => e.preventDefault(),
|
package/dist/index.js
CHANGED
|
@@ -1472,15 +1472,17 @@ var Container = forwardRef5(function Container2(props, ref) {
|
|
|
1472
1472
|
Container.displayName = "Container";
|
|
1473
1473
|
|
|
1474
1474
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1475
|
-
import React15, { useCallback as useCallback6, useMemo as useMemo5, useState as
|
|
1475
|
+
import React15, { useCallback as useCallback6, useMemo as useMemo5, useState as useState5 } from "react";
|
|
1476
1476
|
import { IntlMessageFormat as IntlMessageFormat2 } from "intl-messageformat";
|
|
1477
1477
|
import { NumericFormat } from "react-number-format";
|
|
1478
1478
|
|
|
1479
1479
|
// src/components/Input/Input.tsx
|
|
1480
|
-
import React14, { useCallback as useCallback5 } from "react";
|
|
1480
|
+
import React14, { useCallback as useCallback5, useState as useState4 } from "react";
|
|
1481
1481
|
import { Input as JoyInput } from "@mui/joy";
|
|
1482
1482
|
import { motion as motion15 } from "framer-motion";
|
|
1483
1483
|
import ClearIcon from "@mui/icons-material/Close";
|
|
1484
|
+
import VisibilityIcon from "@mui/icons-material/Visibility";
|
|
1485
|
+
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
|
1484
1486
|
var MotionInput = motion15(JoyInput);
|
|
1485
1487
|
var Input = React14.forwardRef((props, ref) => {
|
|
1486
1488
|
const {
|
|
@@ -1494,12 +1496,18 @@ var Input = React14.forwardRef((props, ref) => {
|
|
|
1494
1496
|
required,
|
|
1495
1497
|
onChange,
|
|
1496
1498
|
name,
|
|
1499
|
+
type,
|
|
1497
1500
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
1498
1501
|
sx,
|
|
1499
1502
|
className,
|
|
1500
1503
|
enableClearable,
|
|
1504
|
+
disableTogglePasswordButton,
|
|
1501
1505
|
...innerProps
|
|
1502
1506
|
} = props;
|
|
1507
|
+
if (type === "password" && innerProps.endDecorator) {
|
|
1508
|
+
console.warn('Input: endDecorator is not supported when type="password"');
|
|
1509
|
+
}
|
|
1510
|
+
const [passwordVisible, setPasswordVisible] = useState4(false);
|
|
1503
1511
|
const [value, setValue] = useControlledState(
|
|
1504
1512
|
props.value,
|
|
1505
1513
|
props.defaultValue,
|
|
@@ -1523,6 +1531,12 @@ var Input = React14.forwardRef((props, ref) => {
|
|
|
1523
1531
|
const handleClear = () => {
|
|
1524
1532
|
setValue(props.defaultValue || "");
|
|
1525
1533
|
};
|
|
1534
|
+
const handleTogglePasswordVisibility = () => {
|
|
1535
|
+
setPasswordVisible((prev) => !prev);
|
|
1536
|
+
};
|
|
1537
|
+
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
1538
|
+
const isPasswordType = type === "password";
|
|
1539
|
+
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
1526
1540
|
const input = /* @__PURE__ */ React14.createElement(
|
|
1527
1541
|
MotionInput,
|
|
1528
1542
|
{
|
|
@@ -1532,12 +1546,22 @@ var Input = React14.forwardRef((props, ref) => {
|
|
|
1532
1546
|
required,
|
|
1533
1547
|
color: error ? "danger" : color,
|
|
1534
1548
|
disabled,
|
|
1549
|
+
type: actualType,
|
|
1535
1550
|
slotProps: {
|
|
1536
1551
|
input: { ref, ...innerProps.slotProps?.input },
|
|
1537
1552
|
...innerProps.slotProps
|
|
1538
1553
|
},
|
|
1539
1554
|
...innerProps,
|
|
1540
|
-
endDecorator:
|
|
1555
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ React14.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ React14.createElement(
|
|
1556
|
+
IconButton_default,
|
|
1557
|
+
{
|
|
1558
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1559
|
+
onClick: handleTogglePasswordVisibility,
|
|
1560
|
+
disabled,
|
|
1561
|
+
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
1562
|
+
},
|
|
1563
|
+
passwordVisible ? /* @__PURE__ */ React14.createElement(VisibilityOffIcon, null) : /* @__PURE__ */ React14.createElement(VisibilityIcon, null)
|
|
1564
|
+
)) : null : enableClearable ? /* @__PURE__ */ React14.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ React14.createElement(
|
|
1541
1565
|
IconButton_default,
|
|
1542
1566
|
{
|
|
1543
1567
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -1790,7 +1814,7 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
|
1790
1814
|
}
|
|
1791
1815
|
return props.max;
|
|
1792
1816
|
}, [props.max, useMinorUnit, decimalScale]);
|
|
1793
|
-
const [isOverLimit, setIsOverLimit] =
|
|
1817
|
+
const [isOverLimit, setIsOverLimit] = useState5(!!max && !!value && value > max);
|
|
1794
1818
|
const handleChange = useCallback6(
|
|
1795
1819
|
(event) => {
|
|
1796
1820
|
if (event.target.value === "") {
|
|
@@ -2108,7 +2132,7 @@ var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React16.createElement(
|
|
|
2108
2132
|
// src/components/DataTable/components.tsx
|
|
2109
2133
|
import React22, {
|
|
2110
2134
|
useRef as useRef4,
|
|
2111
|
-
useState as
|
|
2135
|
+
useState as useState7,
|
|
2112
2136
|
useLayoutEffect,
|
|
2113
2137
|
useMemo as useMemo8,
|
|
2114
2138
|
useCallback as useCallback8,
|
|
@@ -2120,7 +2144,7 @@ import { styled as styled12, useTheme } from "@mui/joy";
|
|
|
2120
2144
|
import { AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
2121
2145
|
|
|
2122
2146
|
// src/components/DatePicker/DatePicker.tsx
|
|
2123
|
-
import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as
|
|
2147
|
+
import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState6 } from "react";
|
|
2124
2148
|
import { IMaskInput, IMask } from "react-imask";
|
|
2125
2149
|
import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
|
|
2126
2150
|
import { styled as styled10, useThemeProps as useThemeProps4 } from "@mui/joy";
|
|
@@ -2301,10 +2325,10 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2301
2325
|
props.defaultValue || "",
|
|
2302
2326
|
useCallback7((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
2303
2327
|
);
|
|
2304
|
-
const [displayValue, setDisplayValue] =
|
|
2328
|
+
const [displayValue, setDisplayValue] = useState6(
|
|
2305
2329
|
() => value ? formatValueString(parseDate(value, format), displayFormat) : ""
|
|
2306
2330
|
);
|
|
2307
|
-
const [anchorEl, setAnchorEl] =
|
|
2331
|
+
const [anchorEl, setAnchorEl] = useState6(null);
|
|
2308
2332
|
const open = Boolean(anchorEl);
|
|
2309
2333
|
useEffect3(() => {
|
|
2310
2334
|
if (!anchorEl) {
|
|
@@ -2675,7 +2699,7 @@ var InfoSign_default = InfoSign;
|
|
|
2675
2699
|
// src/components/DataTable/components.tsx
|
|
2676
2700
|
var TextEllipsis = ({ children }) => {
|
|
2677
2701
|
const textRef = useRef4(null);
|
|
2678
|
-
const [showTooltip, setShowTooltip] =
|
|
2702
|
+
const [showTooltip, setShowTooltip] = useState7(false);
|
|
2679
2703
|
useLayoutEffect(() => {
|
|
2680
2704
|
const element = textRef.current;
|
|
2681
2705
|
if (element) {
|
|
@@ -2691,7 +2715,7 @@ var TextEllipsis = ({ children }) => {
|
|
|
2691
2715
|
};
|
|
2692
2716
|
var CellTextEllipsis = ({ children }) => {
|
|
2693
2717
|
const textRef = useRef4(null);
|
|
2694
|
-
const [showTooltip, setShowTooltip] =
|
|
2718
|
+
const [showTooltip, setShowTooltip] = useState7(false);
|
|
2695
2719
|
useLayoutEffect(() => {
|
|
2696
2720
|
const element = textRef.current;
|
|
2697
2721
|
if (element) {
|
|
@@ -2743,7 +2767,7 @@ var HeadCell = (props) => {
|
|
|
2743
2767
|
const theme = useTheme();
|
|
2744
2768
|
const ref = headerRef;
|
|
2745
2769
|
const colRef = tableColRef;
|
|
2746
|
-
const [isHovered, setIsHovered] =
|
|
2770
|
+
const [isHovered, setIsHovered] = useState7(false);
|
|
2747
2771
|
const sortable = type === "actions" ? false : _sortable;
|
|
2748
2772
|
const headId = useMemo8(
|
|
2749
2773
|
() => `${tableId}_header_${headerName ?? field}`.trim(),
|
|
@@ -2857,7 +2881,7 @@ var BodyCell = (props) => {
|
|
|
2857
2881
|
onCellEditStop
|
|
2858
2882
|
} = props;
|
|
2859
2883
|
const theme = useTheme();
|
|
2860
|
-
const [value, setValue] =
|
|
2884
|
+
const [value, setValue] = useState7(row[field]);
|
|
2861
2885
|
const cellRef = useRef4(null);
|
|
2862
2886
|
const params = useMemo8(
|
|
2863
2887
|
() => ({
|
|
@@ -3073,9 +3097,9 @@ var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
|
|
|
3073
3097
|
});
|
|
3074
3098
|
|
|
3075
3099
|
// src/components/DataTable/hooks.ts
|
|
3076
|
-
import { useState as
|
|
3100
|
+
import { useState as useState8, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useMemo as useMemo9, useCallback as useCallback9, useEffect as useEffect5, createRef } from "react";
|
|
3077
3101
|
function useColumnWidths(columnsByField) {
|
|
3078
|
-
const [widths, setWidths] =
|
|
3102
|
+
const [widths, setWidths] = useState8({});
|
|
3079
3103
|
const roRef = useRef5();
|
|
3080
3104
|
useLayoutEffect2(() => {
|
|
3081
3105
|
if (roRef.current) roRef.current.disconnect();
|
|
@@ -3133,7 +3157,7 @@ function useDataTableRenderer({
|
|
|
3133
3157
|
}
|
|
3134
3158
|
const onSelectionModelChangeRef = useRef5(onSelectionModelChange);
|
|
3135
3159
|
onSelectionModelChangeRef.current = onSelectionModelChange;
|
|
3136
|
-
const [focusedRowId, setFocusedRowId] =
|
|
3160
|
+
const [focusedRowId, setFocusedRowId] = useState8(null);
|
|
3137
3161
|
const [sortModel, setSortModel] = useControlledState(
|
|
3138
3162
|
controlledSortModel,
|
|
3139
3163
|
initialState?.sorting?.sortModel ?? [],
|
|
@@ -3193,7 +3217,7 @@ function useDataTableRenderer({
|
|
|
3193
3217
|
() => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
|
|
3194
3218
|
[_sortOrder]
|
|
3195
3219
|
);
|
|
3196
|
-
const [page, setPage] =
|
|
3220
|
+
const [page, setPage] = useState8(paginationModel?.page || 1);
|
|
3197
3221
|
const pageSize = paginationModel?.pageSize || 20;
|
|
3198
3222
|
const getId = useCallback9(
|
|
3199
3223
|
(row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
|
|
@@ -3932,7 +3956,7 @@ var DataTable = forwardRef7(Component);
|
|
|
3932
3956
|
DataTable.displayName = "DataTable";
|
|
3933
3957
|
|
|
3934
3958
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
3935
|
-
import React26, { forwardRef as forwardRef8, useCallback as useCallback12, useEffect as useEffect7, useImperativeHandle as useImperativeHandle3, useMemo as useMemo11, useRef as useRef7, useState as
|
|
3959
|
+
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";
|
|
3936
3960
|
import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
|
|
3937
3961
|
import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
|
|
3938
3962
|
import { styled as styled14, useThemeProps as useThemeProps5 } from "@mui/joy";
|
|
@@ -4100,10 +4124,10 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4100
4124
|
props.defaultValue || "",
|
|
4101
4125
|
useCallback12((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
4102
4126
|
);
|
|
4103
|
-
const [displayValue, setDisplayValue] =
|
|
4127
|
+
const [displayValue, setDisplayValue] = useState9(
|
|
4104
4128
|
() => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
|
|
4105
4129
|
);
|
|
4106
|
-
const [anchorEl, setAnchorEl] =
|
|
4130
|
+
const [anchorEl, setAnchorEl] = useState9(null);
|
|
4107
4131
|
const open = Boolean(anchorEl);
|
|
4108
4132
|
const calendarValue = useMemo11(
|
|
4109
4133
|
() => value ? parseDates(value, format) : void 0,
|
|
@@ -4462,7 +4486,7 @@ function RadioGroup2(props) {
|
|
|
4462
4486
|
RadioGroup2.displayName = "RadioGroup";
|
|
4463
4487
|
|
|
4464
4488
|
// src/components/FilterMenu/components/DateRange.tsx
|
|
4465
|
-
import React32, { useCallback as useCallback15, useMemo as useMemo12, useState as
|
|
4489
|
+
import React32, { useCallback as useCallback15, useMemo as useMemo12, useState as useState10, useEffect as useEffect8 } from "react";
|
|
4466
4490
|
import { Stack as Stack4 } from "@mui/joy";
|
|
4467
4491
|
function DateRange(props) {
|
|
4468
4492
|
const {
|
|
@@ -4481,7 +4505,7 @@ function DateRange(props) {
|
|
|
4481
4505
|
hideClearButton
|
|
4482
4506
|
} = props;
|
|
4483
4507
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
4484
|
-
const [selectedOption, setSelectedOption] =
|
|
4508
|
+
const [selectedOption, setSelectedOption] = useState10("all-time");
|
|
4485
4509
|
const dateRangeOptions = useMemo12(
|
|
4486
4510
|
() => [
|
|
4487
4511
|
{ label: "All Time", value: "all-time" },
|
|
@@ -4707,7 +4731,7 @@ import React36 from "react";
|
|
|
4707
4731
|
import { Stack as Stack7, Typography as Typography2 } from "@mui/joy";
|
|
4708
4732
|
|
|
4709
4733
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
4710
|
-
import React35, { useCallback as useCallback18, useMemo as useMemo13, useState as
|
|
4734
|
+
import React35, { useCallback as useCallback18, useMemo as useMemo13, useState as useState11 } from "react";
|
|
4711
4735
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
4712
4736
|
import { styled as styled20, useThemeProps as useThemeProps6 } from "@mui/joy";
|
|
4713
4737
|
var padDecimal = (value, decimalScale) => {
|
|
@@ -4766,7 +4790,7 @@ var PercentageInput = React35.forwardRef(
|
|
|
4766
4790
|
props.defaultValue,
|
|
4767
4791
|
useCallback18((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
4768
4792
|
);
|
|
4769
|
-
const [internalError, setInternalError] =
|
|
4793
|
+
const [internalError, setInternalError] = useState11(
|
|
4770
4794
|
max && _value && _value > max || min && _value && _value < min
|
|
4771
4795
|
);
|
|
4772
4796
|
const value = useMemo13(() => {
|
|
@@ -5028,7 +5052,7 @@ function FilterMenu(props) {
|
|
|
5028
5052
|
FilterMenu.displayName = "FilterMenu";
|
|
5029
5053
|
|
|
5030
5054
|
// src/components/Uploader/Uploader.tsx
|
|
5031
|
-
import React40, { useCallback as useCallback22, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef8, useState as
|
|
5055
|
+
import React40, { useCallback as useCallback22, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef8, useState as useState12 } from "react";
|
|
5032
5056
|
import { styled as styled21, Input as Input2 } from "@mui/joy";
|
|
5033
5057
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
5034
5058
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
@@ -5179,10 +5203,10 @@ var Uploader = React40.memo(
|
|
|
5179
5203
|
} = props;
|
|
5180
5204
|
const dropZoneRef = useRef8(null);
|
|
5181
5205
|
const inputRef = useRef8(null);
|
|
5182
|
-
const [errorText, setErrorText] =
|
|
5183
|
-
const [files, setFiles] =
|
|
5184
|
-
const [uploaded, setUploaded] =
|
|
5185
|
-
const [previewState, setPreviewState] =
|
|
5206
|
+
const [errorText, setErrorText] = useState12();
|
|
5207
|
+
const [files, setFiles] = useState12([]);
|
|
5208
|
+
const [uploaded, setUploaded] = useState12(props.uploaded || []);
|
|
5209
|
+
const [previewState, setPreviewState] = useState12("idle");
|
|
5186
5210
|
const accepts = useMemo14(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
5187
5211
|
const parsedAccepts = useMemo14(
|
|
5188
5212
|
() => accepts.flatMap((type) => {
|
|
@@ -5442,13 +5466,13 @@ function IconMenuButton(props) {
|
|
|
5442
5466
|
IconMenuButton.displayName = "IconMenuButton";
|
|
5443
5467
|
|
|
5444
5468
|
// src/components/Markdown/Markdown.tsx
|
|
5445
|
-
import React42, { lazy, Suspense, useEffect as useEffect10, useState as
|
|
5469
|
+
import React42, { lazy, Suspense, useEffect as useEffect10, useState as useState13 } from "react";
|
|
5446
5470
|
import { Skeleton } from "@mui/joy";
|
|
5447
5471
|
import { Link as Link2 } from "@mui/joy";
|
|
5448
5472
|
import remarkGfm from "remark-gfm";
|
|
5449
5473
|
var LazyReactMarkdown = lazy(() => import("react-markdown"));
|
|
5450
5474
|
var Markdown = (props) => {
|
|
5451
|
-
const [rehypeAccent2, setRehypeAccent] =
|
|
5475
|
+
const [rehypeAccent2, setRehypeAccent] = useState13(null);
|
|
5452
5476
|
useEffect10(() => {
|
|
5453
5477
|
const loadRehypeAccent = async () => {
|
|
5454
5478
|
const module = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
@@ -5555,7 +5579,7 @@ function MenuButton(props) {
|
|
|
5555
5579
|
MenuButton.displayName = "MenuButton";
|
|
5556
5580
|
|
|
5557
5581
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
5558
|
-
import React44, { forwardRef as forwardRef9, useCallback as useCallback23, useEffect as useEffect11, useImperativeHandle as useImperativeHandle4, useRef as useRef9, useState as
|
|
5582
|
+
import React44, { forwardRef as forwardRef9, useCallback as useCallback23, useEffect as useEffect11, useImperativeHandle as useImperativeHandle4, useRef as useRef9, useState as useState14 } from "react";
|
|
5559
5583
|
import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
|
|
5560
5584
|
import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
|
|
5561
5585
|
import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
|
|
@@ -5655,8 +5679,8 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5655
5679
|
},
|
|
5656
5680
|
[format, displayFormat, locale]
|
|
5657
5681
|
);
|
|
5658
|
-
const [displayValue, setDisplayValue] =
|
|
5659
|
-
const [anchorEl, setAnchorEl] =
|
|
5682
|
+
const [displayValue, setDisplayValue] = useState14(() => getFormattedDisplayValue(value));
|
|
5683
|
+
const [anchorEl, setAnchorEl] = useState14(null);
|
|
5660
5684
|
const open = Boolean(anchorEl);
|
|
5661
5685
|
useEffect11(() => {
|
|
5662
5686
|
if (!anchorEl) {
|
|
@@ -5808,7 +5832,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5808
5832
|
});
|
|
5809
5833
|
|
|
5810
5834
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
5811
|
-
import React45, { forwardRef as forwardRef10, useCallback as useCallback24, useEffect as useEffect12, useImperativeHandle as useImperativeHandle5, useMemo as useMemo15, useRef as useRef10, useState as
|
|
5835
|
+
import React45, { forwardRef as forwardRef10, useCallback as useCallback24, useEffect as useEffect12, useImperativeHandle as useImperativeHandle5, useMemo as useMemo15, useRef as useRef10, useState as useState15 } from "react";
|
|
5812
5836
|
import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
|
|
5813
5837
|
import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
|
|
5814
5838
|
import { styled as styled23, useThemeProps as useThemeProps8 } from "@mui/joy";
|
|
@@ -5922,7 +5946,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5922
5946
|
props.defaultValue || "",
|
|
5923
5947
|
useCallback24((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
5924
5948
|
);
|
|
5925
|
-
const [anchorEl, setAnchorEl] =
|
|
5949
|
+
const [anchorEl, setAnchorEl] = useState15(null);
|
|
5926
5950
|
const open = Boolean(anchorEl);
|
|
5927
5951
|
const calendarValue = useMemo15(() => value ? parseDates2(value) : void 0, [value]);
|
|
5928
5952
|
useEffect12(() => {
|